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

Merged
merged 6 commits into from
May 29, 2024
Merged

Commits on May 29, 2024

  1. add toml dependency

    Signed-off-by: Alvaro Frias Garay <[email protected]>
    qequ authored and sirosen committed May 29, 2024
    Configuration menu
    Copy the full SHA
    4999fea View commit details
    Browse the repository at this point in the history
  2. update session to handle toml files

    Signed-off-by: Alvaro Frias Garay <[email protected]>
    qequ authored and sirosen committed May 29, 2024
    Configuration menu
    Copy the full SHA
    7227199 View commit details
    Browse the repository at this point in the history
  3. add tests

    Signed-off-by: Alvaro Frias Garay <[email protected]>
    qequ authored and sirosen committed May 29, 2024
    Configuration menu
    Copy the full SHA
    557536d View commit details
    Browse the repository at this point in the history
  4. Convert 'toml' usage to tomllib/tomli

    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.
    sirosen committed May 29, 2024
    Configuration menu
    Copy the full SHA
    baa763a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7ccb3d2 View commit details
    Browse the repository at this point in the history
  6. Add TOML test data to packaged source

    This ensures that the tests work when run from the packaged source, as
    the pyproject.toml files used as test cases are included.
    sirosen committed May 29, 2024
    Configuration menu
    Copy the full SHA
    3cb4d45 View commit details
    Browse the repository at this point in the history