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

load_pyproject: Prefer the stdlib's TOML parser when available #344

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Conversation

nbraud
Copy link
Collaborator

@nbraud nbraud commented Nov 22, 2023

Upstream development of the toml package seem to have mostly stalled back in 2020.

Moreover, I'm not aware of any reason to prefer it over the stdlib's parser (introduced in Python 3.11) and that's one less dependency to care about. =^.^'=

@nbraud
Copy link
Collaborator Author

nbraud commented Nov 22, 2023

This is cursed:

  • test_repo_bork runs python -m bork in a clone of the bork repo;
  • the Python interpreter looks for the bork module, finds the bork/ folder in the (current) working directory;
  • the version of bork being run is the one from the repo's default branch, rather than the one pytest was called against;
  • because a dependency was removed in this PR (for Py3.11 and later), the version of bork in the default branch fails to run in the pytest environment.

nbraud added a commit that referenced this pull request Nov 22, 2023
Noticed in #344:
- `test_repo[bork]` runs `python -m bork` in a copy of the bork repo;
- the Python interpreter looks for the `bork` module, finds the `bork/` folder in the (current) working directory;
- the version of bork being run is the one `project_src` provided, rather than the one pytest was called against.
@nbraud
Copy link
Collaborator Author

nbraud commented Nov 22, 2023

Pushed a fix for the underlying issue (the version of bork being run wasn't the version under test) as part of #340 : 6886497

duckinator pushed a commit that referenced this pull request Nov 22, 2023
Noticed in #344:
- `test_repo[bork]` runs `python -m bork` in a copy of the bork repo;
- the Python interpreter looks for the `bork` module, finds the `bork/` folder in the (current) working directory;
- the version of bork being run is the one `project_src` provided, rather than the one pytest was called against.
@duckinator duckinator merged commit a0ee4a9 into main Nov 22, 2023
28 checks passed
@duckinator duckinator deleted the toml branch November 22, 2023 18:57
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