Skip to content

chore: update pyproject.toml to tool-agnostic standard#1984

Open
mentonin wants to merge 4 commits into
kernelci:mainfrom
profusion:georg/chore/pyproject
Open

chore: update pyproject.toml to tool-agnostic standard#1984
mentonin wants to merge 4 commits into
kernelci:mainfrom
profusion:georg/chore/pyproject

Conversation

@mentonin

Copy link
Copy Markdown
Contributor

Uses the PEP621-defined pyproject.toml format. This is a tool-agnostic, poetry-compatible (since version 2) format. Advantages include better compatibility with other tools and no lock-in to poetry. poetry (through Poetry.lock) are still the sources of truth for versions we deploy/test against

Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
@mentonin
mentonin force-pushed the georg/chore/pyproject branch from 18768a9 to 4304dc1 Compare July 10, 2026 14:40
Comment thread backend/pyproject.toml Outdated

[build-system]
requires = ["poetry-core"]
requires = ["poetry-core>=1.0.0"]

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.

shouldnt we go for poetry-core>=2.0?
it seems they implemented some of the pep621 tags only at that version (project for instance)
https://python-poetry.org/blog/announcing-poetry-2.0.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I set it to 2.4.0 instead as that is what we are using, and version 2.2 would be needed for [dependency-groups] table support anyway. In truth, the [build-system] table is not strictly necessary (we are not packaging the project), but it makes our project clearer and supports installation with pip/setup-tools if that is wanted for any reason.

Comment thread backend/pyproject.toml
Comment thread backend/pyproject.toml
version = "0.1.0"
description = "Django Backend"
authors = ["Your Name <you@example.com>"]
requires-python = ">=3.12,<4"

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.

This might be a problem.
There is some dependency failing for python 3.14 that has not been addressed yet.

  - Installing rpds-py (0.23.1): Failed

Which seems to be a problem with pyo3 ffi module.
So, it might be safer to not allow newer python versions until we fix it.

@mentonin mentonin Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That is a dependencies issue, really;

rpds-py supports python 3.14 starting in version 0.25.0 (we have 0.23.1 in lock-file). We depend on it through jsonschema, which is required by drf-spectacular and kcidb-io. jsonschema requires rpds-py>=0.25.0 as of version 4.26.0, so we actually should require versions of drf-spectacular and kcidb-io which in turn require jsonschema>=4.26.0.

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.

so we set requires-python = ">=3.12,<3.14" and open a new issue to fix the deps?

Comment thread backend/pyproject.toml
mentonin added 2 commits July 18, 2026 18:26
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
The wrong path used to work because poetry 1.8.3 silently ignored a missing path.

Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
@mentonin
mentonin requested a review from alanpeixinho July 19, 2026 22:45
Signed-off-by: Luiz Georg <luiz.georg@profusion.mobi>
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.

3 participants