Skip to content

Supported Python Versions and Backward Compatibility #330

@s-heppner

Description

@s-heppner

Currently, we're using datetime.UTC, a constant defined in the built-in datetime module.
However, this constant was only introduced in Python version 3.11, as you can see in the documentation:

We did not catch this, as we most likely programmed the module with Python >= 3.11 and our CI also runs mypy with Python 3.12.

Now, we have two ways forward, in my opinion:

  • Deprecate Python < 3.11 (which I'm against since Python 3.10 has its EoL in 2026-10)
  • Adapt the code to use datetime.timezones.utc instead (which existed beforehand) and furthermore adapt our CI to always test with the minimal supported Python version, as we can reasonably assume that Python is properly backward compatible between minor versions

If we decide for the latter, I'm for deprecating Python 3.8 in the same step, considering it reached its EoL 2024-10-07.
We should also note somehwere that we always support the currently active Python versions (so atm 3.9 - 3.13) and probably need a recurring task that checks the EoL of Python versions (Python 3.9 reaches EoL on 2025-10).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdiscussionIt's not clear yetsdkSomething to do with the `sdk` package

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions