Skip to content

Add support for templating the set of supported python versions - #349

Open
Cadair wants to merge 1 commit into
sunpy:mainfrom
Cadair:python-version-bumps
Open

Cadair wants to merge 1 commit into
sunpy:mainfrom
Cadair:python-version-bumps

Conversation

@Cadair

@Cadair Cadair commented Nov 12, 2026

Copy link
Copy Markdown
Member

PR Description

This should allow us to add or remove supported Pythons and have most places update.

This replaces the old minimum_supported_python with a list of supported python versions, which is then used in various places to generate tox envs, default pythons (normally the second to newest), wheel versions etc.

AI Assistance Disclosure

AI tools were used for:

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding
  • No AI tools were used

Regardless of AI use, the human contributor remains fully responsible for correctness, design choices, licensing compatibility, and long-term maintainability.

Comment on lines +73 to +79
{%- for v in pys[1:] %}
- linux: py{{ v | replace('.', '') }}
{%- endfor %}
- windows: py{{ pys | first | replace('.', '') }}
- macos: py{{ pys[1] | replace('.', '') }}
- linux: py{{ pys | first | replace('.', '') }}-oldestdeps
- linux: py{{ pys | last | replace('.', '') }}-devdeps

@Cadair Cadair Nov 12, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It turns out it was reasonably hard to encode my gut instinct about what the [platform, version] matrix should be in jinja code.

As currently written we test the two oldest pythons on windows & macos and the newer ones on linux. Given the SPEC 0 rotation we should generally have 3 or maybe 4 supported Pythons. I think the latest one should be linux as it's more likely to work [compile quickly] when a version is very new.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this actually makes it clearer what combinations run, I think it could be doc'd quickly the specific combinations we run.

Comment on lines -43 to +46
- linux: py313
- linux: py{{ default_python | replace('.', '') }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this job is ran again below in test?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To be clear, don't think I care.

This branch has not been deployed

No deployments
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