Skip to content

Remove support of py3.9#7244

Open
agoscinski wants to merge 1 commit intoaiidateam:support-py3.14from
agoscinski:drop-py3.9
Open

Remove support of py3.9#7244
agoscinski wants to merge 1 commit intoaiidateam:support-py3.14from
agoscinski:drop-py3.9

Conversation

@agoscinski
Copy link
Copy Markdown
Collaborator

@agoscinski agoscinski commented Mar 1, 2026

Based on branch in PR #7240

I realized that our tox.ini is not updated for new python versions. I think no one is using it? I would try replace it actually with hatch since its developed by PyPA, it has the potential to replace multiple dev tools with one interface, and more important some people in our lab already use it and are familiar with it.

After this PR is merged, we need to update the branch protection rules.
Remember to delete base, since py3.14 PR is using branch on my fork

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 1, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.70%. Comparing base (a062fb4) to head (ef6ce28).

Files with missing lines Patch % Lines
src/aiida/orm/nodes/data/array/bands.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                 @@
##           support-py3.14    #7244      +/-   ##
==================================================
- Coverage           79.71%   79.70%   -0.00%     
==================================================
  Files                 565      565              
  Lines               43862    43863       +1     
==================================================
- Hits                34959    34957       -2     
- Misses               8903     8906       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@agoscinski agoscinski force-pushed the drop-py3.9 branch 4 times, most recently from 7ef644f to 852f0b3 Compare March 1, 2026 17:04
- Fix of linter error RUF007
- Fix the pre-commit hook generate-conda-environment that hardcoded
  the python version when generating the environment.yaml
- Bump `flask-cors` to ~=4.0 to fix `collections.Iterable` removal in
  Python 3.10+
@agoscinski agoscinski changed the base branch from main to support-py3.14 March 1, 2026 17:18
- defaults
dependencies:
- python~=3.9
- python>=3.10
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Doesn't this make more sense rather than python~=3.10? Its consistent with our pyproject.toml. I feel like there was a reason for it but I cannot guess it.

@agoscinski agoscinski marked this pull request as ready for review March 1, 2026 17:58
@agoscinski agoscinski requested a review from unkcpz as a code owner March 1, 2026 17:58
@agoscinski
Copy link
Copy Markdown
Collaborator Author

agoscinski commented Mar 1, 2026

Regarding codecov patch failing, I would add a test in a different PR . It does not make sense to add tests here, but I find it worrisome enough that the code section is not tested at all

@danielhollas danielhollas added pr/blocked PR is blocked by another PR that should be merged first and removed pr/blocked PR is blocked by another PR that should be merged first labels Mar 1, 2026
@agoscinski
Copy link
Copy Markdown
Collaborator Author

We can probably also drop the skip_below_py314 tags introduced in PR #7240 by changing typehints from Optional to using |. See #7240 (comment)

Copy link
Copy Markdown
Collaborator

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

if labels[-1][0] != len(bands) - 1:
labels.append((len(bands) - 1, ''))
for (position_from, label_from), (position_to, label_to) in zip(labels[:-1], labels[1:]):
for (position_from, label_from), (position_to, label_to) in itertools.pairwise(labels):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice, TIL 👍

@danielhollas
Copy link
Copy Markdown
Collaborator

Any blockers here? (asking since mypy 1.20 came out today and dropped support for python 3.9). Also merging this would make working with typing easier (could finally use the union operator :-) ) (@GeigerJ2)

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