Eric Kafe

Results 236 comments of Eric Kafe

Thanks @cclauss, I try to keep it as simple as possible. The latest CI did well, even on 3.14t.

The segfaults on Python 3.13 were traced to the dict swap in LazyCorpusLoader._unload(), not the class swap. The fix here stops swapping out the instance dict and instead performs explicit,...

The segfaults on Python 3.13 were not caused by the wholesale self.__dict__ = corpus.__dict__ assignment (we’ve ruled that out). We’re only able to hypothesize among remaining factors—most plausibly the timing...

Thanks @purificant! - Indeed, it seems possible to remove the garbage collection, so let's try that. - The segfaults may not be a CPython concern if we can prevent them...

Squashed 14 duplicate commits since 12b1b23 into one for clarity.

@purificant, _make_bound_method() is back, with the original tests. I think this could be the final version of this PR, unless you have more suggestions (i.e. "the entire approach can be...

Thanks for your tests @purificant! I have not yet thought about the possibility of just abandoning the lazy-loading mechanism. It sounds like a radical solution, and may be worth considering.

This earlier commit: [d1b7e4f](https://github.com/nltk/nltk/pull/3460/commits/d1b7e4f1c343bdc99a9a18ecf55888a7a06f379f) passed CI, by doing this wholesale dict assignment ` self.__dict__ = LazyCorpusLoader(name, reader_cls, *args, **kwargs).__dict__ ` and without clearing the dict. So the key insight here...

Let's try to test this with pytest-run-parallel, to identify remaining thread-unsafe tests. But then, it is best to leave these problems to #3458, so revert to original ci.yml here.

It might be good to merge this PR, in order to use it for #3458.