internal error with 2.9.0 (latest) in cython project
See original GitHub issueSummary
I use pytest-cov on CircleCI for my project (python-mbedtls) and the latest 2.9.0 crashes with a traceback, although the previous versions were working without problem. The crashes happen after seemingly innocuous changes (like comments and docstrings). I am not sure how to reliably trigger the faulty behaviour.
Reproducer
Versions
It is cython
code. I could reproduce this with CI running on Python 3.7 and 3.8. I updated pytest-cov
and moved to pyproject.toml
about at the same time.
Config
pyproject.toml
[tool.black]
line-length = 79
target-version = ['py36', 'py37', 'py38']
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'def __repr__',
'raise MemoryError()',
'raise NotImplementedError',
'free(\w)',
]
include = ['src/*']
[tool.coverage.run]
plugins = ['Cython.Coverage']
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
line_length = 79
[tool.pylint.master]
extension-pkg-whitelist='mbedtls'
[tool.pylint.messages_control]
disable = "C0103, C0326, C0330"
[tool.pylint.similarities]
ignore-comments = "yes"
ignore-docstrings = "yes"
min-similarity-lines = "8"
requirements/tests.txt
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements/tests.in
#
atomicwrites==1.3.0 # via pytest
attrs==19.3.0 # via pytest
bleach==3.1.4 # via readme-renderer
docutils==0.16 # via readme-renderer
importlib-metadata==1.6.0 # via pluggy, pytest
more-itertools==5.0.0 # via -r requirements/tests.in (line 4), pytest
packaging==20.3 # via pytest
pluggy==0.13.1 # via pytest
py==1.8.1 # via pytest
pygments==2.5.2 # via readme-renderer
pyparsing==2.4.6 # via packaging
pytest==4.6.9 # via -r requirements/tests.in (line 1)
readme-renderer==24.0 # via -r requirements/tests.in (line 2)
six==1.14.0 # via bleach, more-itertools, packaging, pytest, readme-renderer
wcwidth==0.1.8 # via pytest
webencodings==0.5.1 # via bleach
zipp==1.2.0 # via -r requirements/tests.in (line 5), importlib-metadata
requirements/qa.txt
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile requirements/qa.in
#
appdirs==1.4.4 # via black
astroid==2.4.1 # via pylint
attrs==19.3.0 # via black, pytest
black==19.10b0 # via -r requirements/qa.in, pytest-black
click==7.1.2 # via black
coverage==5.1 # via -r requirements/qa.in, pytest-cov
cython==0.29.19 # via -r requirements/qa.in
importlib-metadata==1.6.0 # via pluggy, pytest
isort==4.3.21 # via -r requirements/qa.in, pylint, pytest-isort
lazy-object-proxy==1.4.3 # via astroid
mccabe==0.6.1 # via pylint
more-itertools==8.3.0 # via pytest
packaging==20.4 # via pytest
pathspec==0.8.0 # via black
pluggy==0.13.1 # via pytest
py==1.8.1 # via pytest
pylint==2.5.2 # via -r requirements/qa.in
pyparsing==2.4.7 # via packaging
pytest-black==0.3.9 # via -r requirements/qa.in
pytest-cov==2.9.0 # via -r requirements/qa.in
pytest-isort==1.0.0 # via -r requirements/qa.in
pytest-repeat==0.8.0 # via -r requirements/qa.in
pytest==5.4.2 # via -r requirements/qa.in, pytest-black, pytest-cov, pytest-isort, pytest-repeat
regex==2020.5.14 # via black
six==1.15.0 # via astroid, packaging
toml==0.10.1 # via black, pylint, pytest-black
typed-ast==1.4.1 # via astroid, black
wcwidth==0.1.9 # via pytest
wrapt==1.12.1 # via astroid
zipp==3.1.0 # via importlib-metadata
Code
- Repo: https://github.com/Synss/python-mbedtls/
- Full CI run: https://circleci.com/gh/Synss/python-mbedtls/2060
- Traceback (after a successful
pytest
run)
tests/test_version.py ............. [ 98%]
tests/test_x509.py ..................................................... [ 99%]
..........ss. [100%]Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1278.414817' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1278.414817': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1299.521891' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1299.521891': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1270.850865' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1270.850865': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1288.513062' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1288.513062': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1283.472350' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1283.472350': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1296.507622' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1296.507622': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1279.561734' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1279.561734': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1287.607928' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1287.607928': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1261.127773' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1261.127773': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1286.970446' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1286.970446': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1272.256838' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1272.256838': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1290.260024' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1290.260024': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1298.998491' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1298.998491': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1269.456692' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1269.456692': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1281.832317' doesn't seem to be a coverage data file: cannot unpack non-iterable NoneType object
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1274.460264' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1274.460264': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1291.285188' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1291.285188': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1297.840775' doesn't seem to be a coverage data file: cannot unpack non-iterable NoneType object
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1268.294857' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1268.294857': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1267.842671' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1267.842671': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1271.215002' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1271.215002': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1257.202118' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1257.202118': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1276.619447' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1276.619447': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1263.597798' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1263.597798': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1275.167240' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1275.167240': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1284.848148' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1284.848148': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1258.901421' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1258.901421': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1260.829977' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1260.829977': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1292.747814' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1292.747814': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1255.339660' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1255.339660': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1273.872576' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1273.872576': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1282.599886' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1282.599886': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1264.796347' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1264.796347': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1294.871575' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1294.871575': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1265.581917' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1265.581917': no such table: coverage_schema
Coverage.py warning: Data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1293.179374' doesn't seem to be a coverage data file: Couldn't use data file '/home/circleci/python-mbedtls/.coverage.57e205fd9ce4.1293.179374': no such table: coverage_schema
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/_pytest/main.py", line 191, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/_pytest/main.py", line 247, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
INTERNALERROR> gen.send(outcome)
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/pytest_cov/plugin.py", line 264, in pytest_runtestloop
INTERNALERROR> self.cov_controller.finish()
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/pytest_cov/engine.py", line 46, in ensure_topdir_wrapper
INTERNALERROR> return meth(self, *args, **kwargs)
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/pytest_cov/engine.py", line 231, in finish
INTERNALERROR> self.cov.stop()
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/coverage/control.py", line 687, in combine
INTERNALERROR> combine_parallel_data(self._data, aliases=aliases, data_paths=data_paths, strict=strict)
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/coverage/data.py", line 117, in combine_parallel_data
INTERNALERROR> data.update(new_data, aliases=aliases)
INTERNALERROR> File "/home/circleci/.local/lib/python3.7/site-packages/coverage/sqldata.py", line 661, in update
INTERNALERROR> path, this_tracer, other_tracer
INTERNALERROR> coverage.misc.CoverageException: Conflicting file tracer name for '/home/circleci/python-mbedtls/src/mbedtls/tls.pyx': 'Cython.Coverage.Plugin' vs ''
===== 6218 passed, 342 skipped, 7 xfailed, 1 warning in 112.90s (0:01:52) ======
Exited with code exit status 3
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Cython: C-Extensions for Python
We regularly run integration tests against all supported CPython versions and their latest in-development branches to make sure that the generated code ...
Read more >Cython Changelog — Cython 3.0.0a11 documentation
A new Cython build option --cython-compile-minimal was added to compile only a ... The generated modules no longer import NumPy internally when using...
Read more >pytest-dev - Bountysource
I use pytest-cov on CircleCI for my project (python-mbedtls) and the latest 2.9.0 crashes with a traceback, although the previous versions were working...
Read more >git bash - Invalid requirement - Stack Overflow
I converted the requirements of my project into a txt file with the ... -r requirements.txt Usage: pip [options] ERROR: Invalid requirement: ...
Read more >TypeError: 'NoneType' object is not callable : PY-52137
the last year without issue, then this error popped up as soon as I updated ... In the end: "...underlying issue seems in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Turns out I was just missing some options in coverage. Someone had turned on multiprocessing in our test suite:
could it be some bad coincidence with installed
pytest-xdit
at the same time even the tests are not running in parallel?