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

Support loading config from pyproject.toml #606

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sirosen
Copy link
Collaborator

@sirosen sirosen commented May 8, 2024

This is a continuation of the work started in #596 -- thanks to @qequ for getting this started!

I've made some changes which I believe are important to nose2 supporting the full breadth of use cases, including test matrices which run tests with TOML parsers present and absent in lower python versions.
In general, I think nose2 should avoid addig dependencies outside of the stdlib, since it is a test runner.
There's some room for healthy debate on this, but with the current course of tomli->tomllib, I don't think it's necessary for TOML support to add a hard dependency or an extra.

qequ and others added 5 commits May 8, 2024 14:32
Signed-off-by: Alvaro Frias Garay <alvarofriasgaray@gmail.com>
Signed-off-by: Alvaro Frias Garay <alvarofriasgaray@gmail.com>
Signed-off-by: Alvaro Frias Garay <alvarofriasgaray@gmail.com>
tomli was ported to stdlib tomllib, so it's preferable to use these
implementations for clearer (and more standard/common style)
compatibility across versions.

In order to have the failthrough behavior be clear, with dispatch
onto TOML support controlled via a bool, this is wrapped in a module
which provides failover on import errors per the normal path to
prefer tomllib where available.

'tomli' is not required by nose2, not even on lower python versions,
to ensure that application testing which is sensitive to and
dispatched over the presence/absence of a toml loader is supported.

tox matrix config supports toml-enabled test invocation for the lower
python versions.
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.

None yet

2 participants