-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MAINT force NumPy version for building scikit-learn for CPython 3.10 in Windows #24742
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
MAINT force NumPy version for building scikit-learn for CPython 3.10 in Windows #24742
Conversation
pyproject.toml
Outdated
@@ -9,6 +9,7 @@ requires = [ | |||
# wheels on PyPI | |||
# | |||
# see: https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg | |||
"numpy==1.22.3; python_version=='3.10' and platform_system=='Windows' and platform_python_implementation != 'PyPy'", | |||
"oldest-supported-numpy", |
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.
The marker not
does not exist in the grammar defined by the PEP508.
I am wondering if changing the order would be enough then:
- if we have the first match then it will install NumPy 1.22.3
- otherwise, it will default to the oldest compatible NumPy
@ogrisel do you know if the ordering has an impact?
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.
I have no idea. Maybe @rgommers knows?
Otherwise, we can compute the negation ourselves:
"oldest-supported-numpy; python_version!='3.10' or platform_system!='Windows' or platform_python_implementation=='PyPy'",
"numpy==1.22.3; python_version=='3.10' and platform_system=='Windows' and platform_python_implementation != 'PyPy'",
I am not sure if python_version != '3.10'
is the exact negation of python_version= ='3.10'
and I am not sure about the use of whitespaces around operators.
BTW could you include a link to the original issue with the discussion that led to this PR?
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.
Disjunctive Normal Form for the win!
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.
Thank you for the fix!
Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…in Windows (scikit-learn#24742) Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…in Windows (#24742) Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…in Windows (scikit-learn#24742) Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
…in Windows (scikit-learn#24742) Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org> Co-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>
closes #24604
As specified in #24604 (comment), SciPy requires at least NumPy 1.22.3 with CPython 3.10 in Windows.
Unfortunately,
oldest-supported-numpy
set the minimum version to1.21.6
in this configuration and we, therefore, need to overwrite the NumPy version for this configuration.