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

Fixup pytest's pytest-cov default requirement. #13099

Merged

Conversation

jsirois
Copy link
Contributor

@jsirois jsirois commented Oct 4, 2021

The prior default was exactly the wrong one given the recent coverage
release which switched its toml support provider from toml to tomli.

The prior default was exactly the wrong one given the recent coverage
release which switched its toml support provider from `toml` to `tomli`.

[ci skip-rust]

[ci skip-build-wheels]
@jsirois
Copy link
Contributor Author

jsirois commented Oct 4, 2021

Without this, failures look like:

14:55:47.00 [WARN] Failed to generate coverage data for src/python/pants/option/options_test.py:tests.
14:55:47.02 [WARN] Failed to generate JUnit XML data for src/python/pants/option/options_test.py:tests.
14:55:47.08 [ERROR] Completed: Run Pytest - src/python/pants/option/options_test.py:tests failed (exit code 1).
Traceback (most recent call last):
  File "/tmp/process-executioneOZm5f/.cache/pex_root/venvs/a26271da641b48adb7b222e32dba3b8020ef1961/b51f7bb371da1685e9801cc4d2ea001472c91740/pex", line 169, in <module>
    sys.exit(func())
...
  File "/home/runner/.cache/pants/named_caches/pex_root/venvs/short/244302d6/lib/python3.7/site-packages/coverage/config.py", line 273, in from_file
    files_read = cp.read(filename)
  File "/home/runner/.cache/pants/named_caches/pex_root/venvs/short/244302d6/lib/python3.7/site-packages/coverage/tomlconfig.py", line 59, in read
    raise CoverageException(msg.format(filename))
coverage.exceptions.CoverageException: Can't read 'pyproject.toml' without TOML support. Install with [toml] extra

That was confusing given pytest-cov's direct dependency on toml. But this new coverage uses tomli: https://github.com/nedbat/coveragepy/pull/1186/files.

@jsirois jsirois merged commit 513647c into pantsbuild:main Oct 4, 2021
@jsirois jsirois deleted the pytest-cov/skip-past-coverage-toml-extra branch October 4, 2021 17:57
jsirois added a commit to jsirois/pants that referenced this pull request Oct 4, 2021
The prior default was exactly the wrong one given the recent coverage
release which switched its toml support provider from `toml` to `tomli`.

(cherry picked from commit 513647c)

[ci skip-rust]

[ci skip-build-wheels]
jsirois added a commit that referenced this pull request Oct 4, 2021
…3102)

This is a two-part cherry-pick:

1. Fixup pytest's pytest-cov default requirement. (#13099)
    
    The prior default was exactly the wrong one given the recent coverage
    release which switched its toml support provider from `toml` to `tomli`.
    
    (cherry picked from commit 513647c)

2. Upgrade to Pex 2.1.51. (#13098)
    
    This picks up a fix for non-ascii script handling.
    
    (cherry picked from commit b1d7ab9)

With a third commit that applies `./build-support/bin/generate_all_lockfiles.sh` since main uses an unsupported in 2.7 version 2 lockfile format.
@stuhood stuhood mentioned this pull request Oct 11, 2021
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.

2 participants