Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK: Bump required Python version to >= 3.9, Add version CI check #332

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

s-heppner
Copy link
Contributor

@s-heppner s-heppner commented Nov 14, 2024

This bumps the requires-python field in the pyproject.toml of the SDK from ">=3.8" to ">=3.9", due to the fact that Python v3.8 reached EoL on 2024-10-07.

Furthermore, to avoid future backward compatibility issues with the supported Python versions, as well as to ensure we're always supporting the currently supported Python versions, we add a CI check check-python-versions that uses two new scripts in ./etc/scripts to check:

a) our currently supported Python versions to an EoL database
b) that our currently supported Python versions defined in the CI match the ones in the pyproject.toml.

This should ensure that issues like #330 are avoided in the future.

adapter.http: Fix reference to constant from the future

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 ran mypy with Python 3.12.

Depends on rwth-iat#59

Fixes #330

@s-heppner s-heppner marked this pull request as draft November 14, 2024 16:17
@s-heppner s-heppner force-pushed the Fix/CI/PythonVersions branch 4 times, most recently from ab21d78 to b91718f Compare November 14, 2024 16:34
This bumps the `requires-python` fiels in the
`pyproject.toml` of the SDK from `">=3.8"` to
`">=3.9"`, due to the fact that Python v3.8
reached EoL on 2024-10-07.

Furthermore, to avoid future backward
compatibility issues in native Python, as well as
to ensure we're always supporting the currently
supported Python versions, we add a CI check
`check-python-versions` that uses two new scripts
in `./etc/scripts` to check:
a) our currently supported Python versions to an
   EoL database
b) that our currently supported Python versions
   defined in the CI match the ones in the
   `pyproject.toml`.

This should ensure that issues like eclipse-basyx#330 are
avoided in the future. (Note that we still need
to fix eclipse-basyx#330 though).
@s-heppner s-heppner force-pushed the Fix/CI/PythonVersions branch from b91718f to 1e93fa5 Compare November 14, 2024 16:36
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:

- Does not exist in [datetime Python 3.10]
- Exists in [datetime python 3.11]

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

[datetime Python 3.10]: https://docs.python.org/3.10/library/datetime.html#constants
[datetime python 3.11]: https://docs.python.org/3.11/library/datetime.html#datetime.UTC

Fixes eclipse-basyx#330
@s-heppner s-heppner force-pushed the Fix/CI/PythonVersions branch from 767fc57 to e17d7c4 Compare November 14, 2024 16:43
@s-heppner s-heppner marked this pull request as ready for review November 14, 2024 16:44
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
@zrgt
Copy link
Contributor

zrgt commented Nov 27, 2024

@s-heppner please check rwth-iat#59

@s-heppner s-heppner merged commit 4c07fe1 into eclipse-basyx:main Dec 3, 2024
9 checks passed
@s-heppner s-heppner deleted the Fix/CI/PythonVersions branch December 3, 2024 14:34
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.

Supported Python Versions and Backward Compatibility
2 participants