Refactor gensim.doctest
to work for gensim 4.0.0 and up
#2914
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
Pull Request Overview
gensim.doctest
allowing us to remove the<4.0.0
version lock of gensim.Details
See #2913 (comment) for a short discussion on gensim. It is currently locked to gensim < 4.0.0, and we'll want to start supporting newer versions. However, in 4.0.0, gensim made some changes in syntax, meaning that you either support before 4.0.0, or after 4.0.0.
This is us moving to the latter.
Beyond this PR
Lastly, I would like to propose the following, which is not included in this PR:
Let's deprecate gensim from
pip-req.txt
. gensim is not used anywhere in the codebase, except for this doctest, so we should remove it frompip-req.txt
, and keep it only inrequirements-ci.txt
/requirements-test.txt
. I have some other issues with these files at the moment, which I've brought up before in #2881:pip-req.txt
andrequirements-ci.txt
/requirements-test.txt
don't have the same naming structure. Perhaps we can change this? (To be honest, I don't remember ever seeing apip-req.txt
file before NLTK - I only encounterrequirements.txt
)cc: @purificant This PR might be relevant for you and your work to help with #2913.