Skip to content
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

Upgrade ci to 3.13 #633

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Upgrade ci to 3.13 #633

wants to merge 1 commit into from

Conversation

mraspaud
Copy link
Member

This PR adds support for python 3.13. This was triggered by the rebuild of pyresample for 3.13 in conda forge.

@mraspaud mraspaud self-assigned this Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.95%. Comparing base (4dd2948) to head (8faf3d3).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #633      +/-   ##
==========================================
- Coverage   93.96%   93.95%   -0.02%     
==========================================
  Files          86       86              
  Lines       13538    13538              
==========================================
- Hits        12721    12719       -2     
- Misses        817      819       +2     
Flag Coverage Δ
unittests 93.95% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coveralls
Copy link

Coverage Status

coverage: 93.645% (-0.02%) from 93.66%
when pulling 8faf3d3 on mraspaud:support-3.13
into ddc03ec on pytroll:main.

@mraspaud
Copy link
Member Author

ok so mypy is failing with

pyresample/_compat.py:31: error: Incompatible import of "ArrayLike" (imported name has type "type[ndarray[Any, Any]]", local name has type "UnionType[Buffer, _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]]")  [assignment]
pyresample/utils/__init__.py:22: error: Module "collections" does not explicitly export attribute "Mapping"  [attr-defined]

anyone knows what this is about?

@djhoese
Copy link
Member

djhoese commented Nov 27, 2024

I think I've misused the type ArrayLike in places. I always used it in a "we expect numpy or dask arrays" kind of way, but it is really meant for "we're going to take whatever you give us and make it a numpy array". The pyresample/_compat.py module I think has workarounds for older versions of numpy to reassign ArrayLike = np.ndarray. This shouldn't be needed as I think our minimum version for numpy includes the numpy.typing sub-package. So...I'd say remove pyresample/_compat.py's stuff about DtypeLike and ArrayLike and see if mypy still complains. If this is too much work let me know.

For the second error, change the import to from collections.abc import Mapping and I think that should work. We may have to drop Python 3.9 support if we haven't already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants