Skip to content

Verify that we are using the correct Python baseline#18

Merged
tchx84 merged 10 commits into
mainfrom
ebassi/python-check
Jul 7, 2026
Merged

Verify that we are using the correct Python baseline#18
tchx84 merged 10 commits into
mainfrom
ebassi/python-check

Conversation

@ebassi

@ebassi ebassi commented Jun 5, 2026

Copy link
Copy Markdown
Member

Ensure that the CI pipeline is using the build metadata for the Python interpreter and dependencies, so we are accurately testing the build against the right version of everything, instead of winging it.

Closes: #17

ebassi added 7 commits June 3, 2026 12:09
We are currently asking for 3.10, but we're implicitly depending on
newer Python features.
The `type` statement was introduced in Python 3.12 through PEP 695.

Python 3.10 introduced TypeAlias, which does the same, albeit with a
slightly different syntax.
Use tomli as an optional dependency when installing on systems with
Python older than 3.11.
Since we're manipulating the sys.path in order to import the local
module, we need to put the import directive into the __main__ block to
satisfy the linter.
We want a "lint" group for the CI, and a "dev" group for development
purposes.
The setup-python action and poetry allow us to manage the dependencies,
as well as the version of Python we want to use in CI.

The "lint" group of dependencies includes flake8 and mypy, so we don't
need to have separate installation commands for it, and we can leave it
to poetry.
@ebassi
ebassi force-pushed the ebassi/python-check branch from 07c5229 to 3cae6c2 Compare June 5, 2026 10:28
Comment thread src/moonforgecli/features/__init__.py Outdated
Comment thread pyproject.toml
@ebassi
ebassi force-pushed the ebassi/python-check branch from 6b25305 to 11d39a5 Compare June 9, 2026 10:03
ebassi added 2 commits June 9, 2026 11:04
The pyproject.toml file contains the oldest Python version, so the
constraint gets satisfied with any newer version.

We still want to test on the latest available Python, so we can deal
with new features; in order to verify that we're still handling the
oldest version of Python, we should add a dedicated CI job.
We're using TypeAlias until we can raise our minimum required version of
Python to one that has the type statement.
@ebassi
ebassi force-pushed the ebassi/python-check branch from 11d39a5 to 25c1643 Compare June 9, 2026 10:04
@ebassi
ebassi requested a review from tchx84 June 9, 2026 10:05
@tchx84
tchx84 merged commit 7095c1c into main Jul 7, 2026
3 checks passed
@tchx84
tchx84 deleted the ebassi/python-check branch July 7, 2026 16:31
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.

Verify minimum Python requirement

2 participants