Dependency upgrade/cleanup after dropping py3.9#7245
Dependency upgrade/cleanup after dropping py3.9#7245agoscinski wants to merge 3 commits intoaiidateam:drop-py3.9from
Conversation
156e311 to
ab9c709
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## drop-py3.9 #7245 +/- ##
==============================================
+ Coverage 79.70% 79.70% +0.01%
==============================================
Files 565 565
Lines 43863 43859 -4
==============================================
- Hits 34957 34954 -3
+ Misses 8906 8905 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Consider also this #7240 (comment) |
|
Consider #7240 (comment) |
In Python 3.10-3.11, `importlib.metadata.entry_points()` returns a `SelectableGroups` dict (iterating yields group name strings, not `EntryPoint` objects), unlike the `importlib_metadata` backport which always returned a flat `EntryPoints` sequence. Flatten the dict before sorting to fix `AttributeError: 'str' object has no attribute 'group'`.
728a4c5 to
07373ba
Compare
|
Consider upgrading pytest_asyncio https://github.com/aiidateam/aiida-core/pull/7258/changes#r2889517642 |
Let's do that in a separate PR, last time I tried it I ran into some ugly issues. |
| except AttributeError: | ||
| # This type is not available for Python 3.9 and older | ||
| UnionType = None # type: ignore[assignment,misc] | ||
| UnionType = types.UnionType |
There was a problem hiding this comment.
You can just import the UnionType directly above as
from types import UnionType
| except AttributeError: | ||
| # This is the backport for Python 3.9 and older | ||
| from get_annotations import get_annotations # type: ignore[no-redef] | ||
| get_annotations = inspect.get_annotations |
There was a problem hiding this comment.
Same here, let's get rid of this alias
Removing two dependencies that are not anymore needed since we dropped 3.9.
We could also replace
pytzwithzoneinfobut that affects the hash function because the binary representation is not the same. A database migration seems a bit overkill to drop one dependency.