-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
update dependency #10438
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
base: main
Are you sure you want to change the base?
update dependency #10438
Conversation
for more information, see https://pre-commit.ci
Thanks for taking this on. We'll need to update our CI yaml files too to update python 3.10 -> 3.11. Usually I just search for We'll also need a table in |
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.
Amazing, thanks!
from typing import TypeAlias | ||
else: | ||
from typing import TypeAlias | ||
from typing import TypeAlias |
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 try/except can probably be removed.
from typing import Self | ||
else: | ||
from typing_extensions import Self | ||
from typing import Self |
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.
Move Self to typing import higher up to around row 9
We now always add variable names and contents when encoding fails, in contrast to the current practice where variable names and values are only sometimes specified, based on the `name` passed into `VariableCoder.encode()`. This provides better debugging experience for users. In the future, we might remove `name` from `VariableCoder.encode()` because this makes it redundant. For example, attempting to save a int64 fail in netCDF3 file now shows something like the following: ValueError: could not safely cast array from int64 to int32... Raised while encoding variable 'invalid' with value <xarray.Variable (invalid: 1)> Size: 8B array([9223372036854775807]) Note that `Exception.add_note()` is a Python 3.11+ feature, so this PR will need to wait until pydata#10438 is submitted.
We now always add variable names and contents when encoding fails, in contrast to the current practice where variable names and values are only sometimes specified, based on the `name` passed into `VariableCoder.encode()`. This provides better debugging experience for users. In the future, we might remove `name` from `VariableCoder.encode()` because this makes it redundant. For example, attempting to save a int64 fail in netCDF3 file now shows something like the following: ValueError: could not safely cast array from int64 to int32... Raised while encoding variable 'invalid' with value <xarray.Variable (invalid: 1)> Size: 8B array([9223372036854775807]) Note that `Exception.add_note()` is a Python 3.11+ feature, so this PR will need to wait until pydata#10438 is submitted.
We now always add variable names and contents when encoding fails, in contrast to the current practice where variable names and values are only sometimes specified, based on the `name` passed into `VariableCoder.encode()`. This provides better debugging experience for users. In the future, we might remove `name` from `VariableCoder.encode()` because this makes it redundant. For example, attempting to save a int64 fail in netCDF3 file now shows something like the following: ValueError: could not safely cast array from int64 to int32... Raised while encoding variable 'invalid' with value <xarray.Variable (invalid: 1)> Size: 8B array([9223372036854775807]) Note that `Exception.add_note()` is a Python 3.11+ feature, so this PR will need to wait until pydata#10438 is submitted.
whats-new.rst
Update Minimum Dependencies
The minimum required versions for several key dependencies have been updated to their latest stable releases.
Details
python: >=3.10 -> >=3.11
numpy: >=1.24 -> >=1.26
packaging: >=23.2 -> >=24.0
pandas: >=2.1 -> >=2.2
scipy: -> >=1.13
numbagg: -> >=0.8
numba: >=0.54 -> >=0.59
flox: -> >=0.9
netCDF4: -> >=1.6.0
zarr: -> >=2.18
sparse: -> >=0.15
cartopy: -> >=0.23
Removed pydap; python_version<"3.10" as it is no longer needed with the new minimum Python version.