Skip to content

chore: remove 3.8 and update to 3.10 - #1873

Merged
tonyandrewmeyer merged 3 commits into
canonical:mainfrom
IronCore864:drop-3.8-and-prepare-for-ops3
Jul 2, 2025
Merged

chore: remove 3.8 and update to 3.10#1873
tonyandrewmeyer merged 3 commits into
canonical:mainfrom
IronCore864:drop-3.8-and-prepare-for-ops3

Conversation

@IronCore864

Copy link
Copy Markdown
Contributor

Remove Python 3.8.

  • Bump Python version to 3.10 in pyproject.toml
  • Update tags that trigger publish to 3.*
  • Remove Python 3.8 (and 3.9 for some tests) from GitHub Actions
  • Update pyright config to 3.10

@IronCore864

Copy link
Copy Markdown
Contributor Author

o11y tests failed because they all have requires-python = "~=3.8"

@IronCore864
IronCore864 marked this pull request as ready for review July 2, 2025 02:54
@IronCore864

Copy link
Copy Markdown
Contributor Author

Pack failed because it tries to pack for 20.04. Tried locally to pack an example charm and it is OK.

@james-garner-canonical james-garner-canonical left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. One small suggestion: add a FIXME/TODO comment to the tool.ruff.target-version. Optional.

@tonyandrewmeyer
tonyandrewmeyer merged commit c456fda into canonical:main Jul 2, 2025
39 of 43 checks passed
@IronCore864
IronCore864 deleted the drop-3.8-and-prepare-for-ops3 branch July 2, 2025 03:42
@amandahla

Copy link
Copy Markdown
Contributor

Hi, is there a specific reason for this change?
We cant update Ops in this charm, for example
canonical/indico-operator#644

@tonyandrewmeyer

tonyandrewmeyer commented Jul 3, 2025

Copy link
Copy Markdown
Collaborator

Hi, is there a specific reason for this change?

Python 3.8 has been out of support since October last year, and 20.04 is out of standard support as of May. The Python ecosystem is dropping support for Python 3.8, making it increasingly difficult to use a modern toolchain and rely on fixes for dependencies.

This is roughly the same timeframe as dropping support for 18.04 in Ops 2.0. That was released in January 2023, 18.04 was out of standard support in May 2023, and Python 3.5 out of support in September 2020.

Juju 4 also drops support for 20.04, with Juju 3 expected to go into security fixes only in May next year.

If your charms need to support 20.04 still, then Ops 2.23 is available, and will receive critical bug fixes and security fixes for at least a year (and there will presumably be some avenue for security fixes until 20.04 is completely unsupported in 2030). Our recommendation is that you branch your code, leaving the branch that supports 20.04 with Ops 2 and moving main to Ops 3, so that you can use new features -- but you can just remain on Ops 2 if a single code base is preferable.

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.

5 participants