-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Python 3.11 and drop support for Python 3.7 #3402
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
01e3af4
add support for python 3.11
acul3 5f1309e
change to oldest version numpy and scipy that support 3.11
acul3 0f0f713
add build for python3.11
acul3 5aa1655
disable nmslib test for python 3.11
acul3 51ddf38
fix formatting
acul3 7a1ab1e
fix formatting
acul3 c178fdf
Merge branch 'develop' into python3.11-support
acul3 b2018d6
change build for 3.8
acul3 3a528ff
drop Py3.7 support and builds
mpenkov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the very latest version of scipy.
We want the oldest version (that works) here, because otherwise we make life difficult for users who don't have the very latest.
Could you please find which is the first version of numpy & scipy to support 3.11?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just check(install on local..pip)
the oldest version that support 3.11 for scipy and numpy are 1.9.2 and 1.23.0 (not very far from the lastest)
maybe we can add special condition just for python 3.11 ?
something like overriding version(numpy,scipy) like the cython https://github.com/RaRe-Technologies/gensim/blob/c93eb0b647ec9de7cfcb43c74c37f295f2944821/setup.py#L330
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://devguide.python.org/versions/, the currently oldest supported Python (before end-of-life) is Python 3.7. So we can ignore Pythons older than that (3.6 etc).
Now looking at SciPy's compatibility matrix https://docs.scipy.org/doc/scipy/dev/toolchain.html :
It seems for 3.11 we need Scipy 1.9.0 (or .1?) and Numpy 1.18.5. Which doesn't match your
the oldest version that support 3.11 for scipy and numpy are 1.9.2 and 1.23.0
– can you verify please?I don't think so. Gensim is a library used by ML developers, so we can afford to update its dependencies. We just shouldn't do it without a reason. @mpenkov WDYT?
If the matrix above is correct, I'd go with Scipy>=1.9.0 and Numpy>=1.18.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think that's fine. The versions you suggested also make sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah thank you for detail and correction
my missunderstanding
i refer to this issue scipy/scipy#16851 (comment) for oldest "wheel" scipy 1.9.2 and https://numpy.org/news/ for numpy
just tried with this version and it works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@piskvorky @acul3 Does this mean that 3.6 and 3.7 are no longer supported? If so, we need to update setup.py accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm it seems python 3.7 still need supported according to this argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the table above, it looks like it's impossible to support both 3.7 and 3.11 using a single version of scipy, numpy, etc.
So, our options are:
Personally, I think 2) is best. 1) requires a fair bit of effort for very little value (6 more months of 3.7 support, and after 6 months the value of that effort goes down to zero). We can do a major version bump. If people really need support for 3.7, they can continue to use the current version of gensim.
@piskvorky thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agreed. Now that Python versions go EOL frequently, there isn't much expectation to support older ones (not like when py2.7 was supported for ages).
So I'd give preference to the latest / best versions, rather than stability with older.