Skip to content

Conversation

@musicinmybrain
Copy link
Contributor

Avoid a test dependency on the PyPI toml package.

Fixes #2027.

Checklist

  • I have read the contributing doc.
  • I have included a link to the relevant issue number. N/A
  • I have checked to ensure there aren't other open pull requests
    for the same issue.
  • I have written new tests for these changes, as needed. Covered by existing tests.

Avoid a test dependency on the PyPI `toml` package.
@musicinmybrain
Copy link
Contributor Author

The toml case is written as

    pyproject_contents = toml.load(pyproject_path)

in this PR, which is concise and similar to what we had before. We could have instead written

    with open(pyproject_path) as pyproject:
        pyproject_contents = toml.load(pyproject)

which would more directly parallel the tomllib case. However, it’s slightly more verbose, and it wouldn’t allow us to share the part that opens the file, since tomllib wants the file opened in binary mode and toml doesn’t, so there’s no real advantage in writing it that way.

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.

Feature Report: Drop test dependency on PyPI toml package

1 participant