Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Specify newer versions of numpy be used #32

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

Closed

Conversation

dbaxa
Copy link
Contributor

@dbaxa dbaxa commented Aug 15, 2022

While pandas makes use of https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg , we need not hold the version of numpy in use back. By requiring a recent release - there should be no issues with regards to architectures such as arm64 on darwin or loongarch64. For python 3.7, we can use 1.21.6.

@dbaxa
Copy link
Contributor Author

dbaxa commented Aug 15, 2022

This follows on from #31 .

@dbaxa
Copy link
Contributor Author

dbaxa commented Aug 15, 2022

Test execution can be seen at https://github.com/dbaxa/databricks-sql-python/runs/7837710866?check_suite_focus=true (note that installing dependencies in python 3.10 is considerably faster after this change than it was for #31 -> https://github.com/dbaxa/databricks-sql-python/runs/7837393055?check_suite_focus=true )

…s-of-numpy-be-used

# Conflicts:
#	poetry.lock
#	pyproject.toml

Signed-off-by: David Black <[email protected]>
@@ -11,7 +11,8 @@ include = ["CHANGELOG.md"]
[tool.poetry.dependencies]
python = "^3.7.1"
thrift = "^0.13.0"
pandas = "^1.3.0"
pandas = "^1.3.5"
numpy = [{version="^1.23.2", python=">=3.8"}, {version="^1.21.6", python="<3.8"}]
Copy link
Contributor Author

@dbaxa dbaxa Aug 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I have done what I want here. I want to specify "use at least this version of numpy for python >= 3.8". But this ends up as

{':python_version < "3.8"': ['numpy>=1.21.6,<2.0.0'],
  ':python_version >= "3.8"': ['numpy>=1.23.2,<2.0.0']}

Which is likely fine but pandas 1.3.5 for example ends up with

        numpy>=1.17.3; platform_machine!='aarch64' and platform_machine!='arm64' and python_version<'3.10'
        numpy>=1.19.2; platform_machine=='aarch64' and python_version<'3.10'
        numpy>=1.20.0; platform_machine=='arm64' and python_version<'3.10'
        numpy>=1.21.0; python_version>='3.10'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be addressed by using >=$version, but I still feel that obtaining numpy version information via pandas is better.

@dbaxa
Copy link
Contributor Author

dbaxa commented Aug 17, 2022

I am going to close this as it is likely better to use a minimum version of numpy according to what pandas wants.

@dbaxa dbaxa closed this Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants