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

report.py Tries to parse non-existent files #1392

Closed
adam-grant-hendry opened this issue Jun 1, 2022 · 22 comments
Closed

report.py Tries to parse non-existent files #1392

adam-grant-hendry opened this issue Jun 1, 2022 · 22 comments
Labels
bug Something isn't working not a bug

Comments

@adam-grant-hendry
Copy link

adam-grant-hendry commented Jun 1, 2022

Describe the bug

After uninstalling PyQt5 and installing PySide6 in my virtual environment (using poetry add/remove), coverage reports warnings that it cannot parse some non-existent files. It is looking for site-packages pyscript, shibokensupport, and signature_bootstrap.py as if they are in my local folder, when they are actually in my .venv/Lib/site-packages folder:

myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\pyscript': No source for code: 'Myproj\pyscript'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\__init__.py': No source for code: 'Myproj\shibokensupport\__init__.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\feature.py': No source for code: 'Myproj\shibokensupport\feature.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\__init__.py': No source for code: 'Myproj\shibokensupport\signature\__init__.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\errorhandler.py': No source for code: 'Myproj\shibokensupport\signature\errorhandler.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\importhandler.py': No source for code: 'Myproj\shibokensupport\signature\importhandler.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\layout.py': No source for code: 'Myproj\shibokensupport\signature\layout.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\lib\__init__.py': No source for code: 'Myproj\shibokensupport\signature\lib\__init__.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\lib\enum_sig.py': No source for code: 'Myproj\shibokensupport\signature\lib\enum_sig.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\lib\pyi_generator.py': No source for code: 'Myproj\shibokensupport\signature\lib\pyi_generator.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\lib\tool.py': No source for code: 'Myproj\shibokensupport\signature\lib\tool.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\loader.py': No source for code: 'Myproj\shibokensupport\signature\loader.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\mapping.py': No source for code: 'Myproj\shibokensupport\signature\mapping.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\shibokensupport\signature\parser.py': No source for code: 'Myproj\shibokensupport\signature\parser.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse 'Myproj\signature_bootstrap.py': No source for code: 'Myproj\signature_bootstrap.py'. (couldnt-parse)       
  coverage._warn(msg, slug="couldnt-parse")

To Reproduce
How can we reproduce the problem? Please be specific. Don't link to a failing CI job. Answer the questions below:

  1. What version of Python are you using? 3.8.10
  2. What version of coverage.py shows the problem? The output of coverage debug sys is helpful. 6.4
  3. What versions of what packages do you have installed? The output of pip freeze is helpful.
[tool.poetry.dependencies]
appdirs = "^1.4.4"
h5py = "^3.6.0"
hypothesis = "^6.46.2"
ipython = "^8.3.0"
matplotlib = "^3.5.2"
merry = "^0.3.0"
meshio = "^5.3.4"
ninja = "^1.10.2"
numpy = "^1.22.3"
opencv-python = "^4.5.5.64"
pyembree = "^0.2.11"
pykdtree = "^1.3.4"
pymeshfix = "^0.15.0"
pyqtgraph = "^0.12.4"
PySide6 = "^6.3.0"
pytest-xdist = "^2.5.0"
python = "3.8"
pyvista = "^0.34.1"
pyvistaqt = "^0.9.0"
QtPy = "^2.1.0"
Rtree = "^1.0.0"
trimesh = "^3.11.2"
vtk = "^9.1.0"

[tool.poetry.dev-dependencies]
bandit = {extras = ["toml"], version = "^1.7.4"}
beautifulsoup4 = "4.11.1"
black = "^22.3.0"
bump2version = "^1.0.1"
check-jsonschema = "^0.14.3"
codecov = "^2.1.12"
codespell = "^2.1.0"
commitizen = "^2.27.0"
Cython = "^0.29.28"
docformatter = "^1.4"
flake8 = "^4.0.1"
flake8-docstrings = "^1.6.0"
flake8-quotes = "^3.3.1"
html5lib = "^1.1"
isort = "^5.10.1"
lxml = "^4.8.0"
memory-profiler = "^0.60.0"
MonkeyType = "^22.2.0"
mypy = "^0.950"
myst-parser = "^0.17.2"
pep8-naming = "^0.12.1"
pre-commit = "^2.18.1"
pydocstyle = "^6.1.1"
pyinstaller = "^5.1"
pylint = "^2.13.8"
pytest = "^7.1.2"
pytest-doctestplus = "^0.12.0"
pytest-env = "^0.6.2"
pytest-memprof = "^0.2.0"
pytest-qt = "^4.0.2"
pytest-randomly = "^3.11.0"
requests = "^2.27.1"
rstcheck = "^5.0.0"
Sphinx = "^4.5.0"
sphinx-rtd-theme = "^1.0.0"
sphinxcontrib-email = "^0.3.5"
sphinxcontrib-napoleon = "^0.7"
toml = "^0.10.2"
tox = "^3.25.0"
tqdm = "^4.64.0"
vulture = "^2.3"
wheel = "^0.37.1"
pytest-cov = "^3.0.0"
coverage = {extras = ["toml"], version = "^6.4"}
  1. What code shows the problem? Give us a specific commit of a specific repo that we can check out. If you've already worked around the problem, please provide a commit before that fix.
    Not a specific code example as this is an internal warning.

  2. What commands did you run?

pytest --cov --cov-report term-missing --cov-report html --cov-report xml

Expected behavior
A clear and concise description of what you expected to happen.
These warnings should not occur because these are non-existent file paths.

Additional context
Add any other context about the problem here.

I deleted every single __pycache__ and *.pyc, as well as the .coverage file in the project, but the problem persists.

@adam-grant-hendry adam-grant-hendry added bug Something isn't working needs triage labels Jun 1, 2022
@adam-grant-hendry adam-grant-hendry changed the title report.py Tries to parse non-existent file report.py Tries to parse non-existent files Jun 1, 2022
@nedbat
Copy link
Owner

nedbat commented Jun 2, 2022

I'm not sure how to help without a way to reproduce this. Can you try setting COVERAGE_DEBUG=trace in your environment? It will show tracing decisions that might provide clues.

@nedbat nedbat added question Further information is requested and removed needs triage labels Jun 2, 2022
@adam-grant-hendry
Copy link
Author

@nedbat Yes, I'll do this. One sec.

@adam-grant-hendry
Copy link
Author

I've attached the debug log. As you can see, it is trying to trace files that don't exist (they are not in myproj):

Tracing 'pyscript' as '%USERPROFILE%\\Code\\myproj\\pyscript'
Tracing 'signature_bootstrap.py' as '%USERPROFILE%\\Code\\myproj\\signature_bootstrap.py'
Tracing 'shibokensupport/__init__.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\__init__.py'
Tracing 'shibokensupport/signature/__init__.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\__init__.py'
Tracing 'shibokensupport/signature/loader.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\loader.py'
Tracing 'shibokensupport/feature.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\feature.py'
Tracing 'shibokensupport/signature/mapping.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\mapping.py'
Tracing 'shibokensupport/signature/errorhandler.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\errorhandler.py'
Tracing 'shibokensupport/signature/layout.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\layout.py'
Tracing 'shibokensupport/signature/lib/__init__.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\lib\\__init__.py'
Tracing 'shibokensupport/signature/parser.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\parser.py'
Tracing 'shibokensupport/signature/lib/tool.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\lib\\tool.py'
Tracing 'shibokensupport/signature/importhandler.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\importhandler.py'
Tracing 'shibokensupport/signature/lib/enum_sig.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\lib\\enum_sig.py'
Tracing 'shibokensupport/signature/lib/pyi_generator.py' as '%USERPROFILE%\\Code\\myproj\\shibokensupport\\signature\\lib\\pyi_generator.py'
Tracing 'config.py' as '%USERPROFILE%\\Code\\myproj\\config.py'
Tracing 'config-3.py' as '%USERPROFILE%\\Code\\myproj\\config-3.py'

Specifying source to myproj/ in my pyproject.toml will result in the debug saying "Not Tracing", but coverage shouldn't be looking for non-existent files in the first place. This is clearly a bug.

debug_log.txt

@adam-grant-hendry
Copy link
Author

I'm not sure how to help without a way to reproduce this

System

OS: Windows 10
Python: 3.8.10
VSCode: 1.67.2
coverage: 6.4 (with toml extra)

To reproduce,

Minimum Reproducible Example (MRE)

  1. Create and activate a virtual environment

    PS> py -m venv .venv
    PS> .venv/Scripts/Activate.ps1

    and ensure vscode sees the Python Interpreter (use Ctrl+Shift+p and set).

  2. Create a new poetry project

    PS> poetry init
  3. Install pytest, pytest-cov, pytest-env, pytest-qt, pyqt5, and qtpy

    PS> poetry add pytest pytest-cov pytest-qt pyqt5 qtpy
  4. Update the pyproject.toml and then run poetry install to make a local (editable) install

    [tool.poetry]
    name = "coverage-issue-1392"
    version = "0.1.0"
    description = ""
    authors = ["Hendry, Adam <adam.grant.hendry@gmail.com>"]
    packages = [
        {include = "myproj"},
        {include = "tests"}
    ]
    
    [tool.poetry.dependencies]
    PyQt5 = "^5.15.6"
    pytest = "^7.1.2"
    pytest-cov = "^3.0.0"
    pytest-env = "^0.6.2"
    pytest-qt = "^4.0.2"
    python = "3.8"
    QtPy = "^2.1.0"
    
    [tool.poetry.dev-dependencies]
    
    [build-system]
    requires = ["poetry-core>=1.0.0"]
    build-backend = "poetry.core.masonry.api"
    
    [tool.pytest.ini_options]
    minversion = "7.0"
    addopts = """\
    --last-failed --last-failed-no-failures all \
    -p no:faulthandler \
    --import-mode=importlib \
    --cov \
    --cov-report term-missing \
    --cov-report html \
    --cov-report xml \
    """
    testpaths = [
        "tests",
    ]
    qt_api = "pyqt5"
    env = [
        "D:COVERAGE_DEBUG=trace",
        "D:COVERAGE_DEBUG_FILE=debug_log.txt"
    ]
  5. Create a dummy Qt project

    myproj/main.py
    from qtpy import QtWidgets
    
    
    class MainApp(QtWidgets.QMainWindow):
        """The main window."""
    
    if __name__ == '__main__':
        app = QtWidgets.QApplication([])
        window = MainApp()
        window.show()
        app.exec_()
  6. Create a dummy test

    test/test_window.py
    import pytest
    from myproj.main import MainApp
    
    
    @pytest.fixture(name='app', scope='function')
    def fixture_app(qtbot):
        window = MainApp()
        window.show()
    
        qtbot.addWidget(window)
    
        yield window
    
    def test_window_appears(app) -> None:
        assert app.isVisible()
  7. Run pytest

    PS> pytest
  8. Add pyside6 and remove pyqt5

       PS> poetry add pyside6
       PS> poetry remove pyqt5

    NOTE: Before doing this, be sure to set python exactly to 3.8 in the pyproject.toml:

    python = "3.8"
  9. Change qt_api in pyproject.toml:

    [tool.pytest.ini_options]
    qt_api = "pyside6"
  10. Update project with new toml

    PS> poetry update
  11. Re-run pytest

    PS> pytest

This results in the error messages mentioned in this issue:

%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\pyscript': No source for code: '%userprofile%\Code\coverage-issue-1392\pyscript'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\__init__.py': No source for 
code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\__init__.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\feature.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\feature.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\__init__.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\__init__.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\errorhandler.py': 
No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\errorhandler.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\importhandler.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\importhandler.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\layout.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\layout.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\lib\__init__.py': 
No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\lib\__init__.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\lib\enum_sig.py': 
No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\lib\enum_sig.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\lib\pyi_generator.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\lib\pyi_generator.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\lib\tool.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\lib\tool.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\loader.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\loader.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\mapping.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\mapping.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\parser.py': No source for code: '%userprofile%\Code\coverage-issue-1392\shibokensupport\signature\parser.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\coverage-issue-1392\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\coverage-issue-1392\signature_bootstrap.py': No source for code: '%userprofile%\Code\coverage-issue-1392\signature_bootstrap.py'. (couldnt-parse)
  coverage._warn(msg, slug="couldnt-parse")

@nedbat
Copy link
Owner

nedbat commented Jun 8, 2022

This seems to be due to pyside using "shiboken6", which imports files from a zip file, reporting file names that don't exist on the file system. I don't see how coverage.py could know that they shouldn't be attempted.

You can tell reporting to omit those files using settings like this in pyproject.toml:

[tool.coverage.report]
omit = [
    "shibokensupport/*",
    "pyscript",
    "signature_bootstrap.py",
]

Or you can suppress that warning entirely with:

[tool.coverage.run]
disable_warnings = ["couldnt-parse"]

Either way, you will not be bothered with those messages.

@nedbat nedbat removed the question Further information is requested label Jun 8, 2022
@nedbat
Copy link
Owner

nedbat commented Jun 8, 2022

Feel free to reopen this if you have an idea about how coverage.py could do something more here.

@nedbat nedbat closed this as not planned Won't fix, can't repro, duplicate, stale Jun 8, 2022
@nedbat
Copy link
Owner

nedbat commented Jun 8, 2022

BTW, simpler reproduction steps, due to @SnoopJeDi:

pyproject.toml:

[tool.pytest.ini_options]
minversion = "7.0"
addopts = """\
--last-failed --last-failed-no-failures all \
-p no:faulthandler \
--import-mode=importlib \
--cov \
--cov-report term-missing \
--cov-report html \
--cov-report xml \
"""

requirements.txt:

pytest==7.1.2
pytest-cov==3.0.0
pyside6==6.3.0
qtpy==2.1.0

test_repro.py:

from qtpy import QtWidgets

Then in a Python3.8 environment, run:

python3 -m pip install -r requirements.txt
python3 -m pytest

@adam-grant-hendry
Copy link
Author

This seems to be due to pyside using "shiboken6", which imports files from a zip file

How were you able to see that it imports from a zip file?

@nedbat
Copy link
Owner

nedbat commented Jun 8, 2022

Actually, I'm guessing where the file came from. But I know it didn't exist because I added some debugging lines to coverage/inorout.py to log whether the claimed file exists.

@SnoopJ
Copy link

SnoopJ commented Jun 8, 2022

This seems to be due to pyside using "shiboken6", which imports files from a zip file

How were you able to see that it imports from a zip file?

If you print the contents of sys.modules after the import that causes these warnings, the offending modules indicate that they are instances of EmbeddableZipImporter objects (which are specific to pyside6) in their repr:

Input:

from pprint import pprint
import sys

from qtpy import QtWidgets

pprint(sys.modules)

Output:

{'PySide6': <module 'PySide6' from '/home/snoopjedi/repos/coveragepy-src/.direnv/python-3.8.12/lib/python3.8/site-packages/PySide6/__init__.py'>,       
 'PySide6.QtCore': <module 'PySide6.QtCore' from '/home/snoopjedi/repos/coveragepy-src/.direnv/python-3.8.12/lib/python3.8/site-packages/PySide6/QtCore.abi3.so'>,
 'PySide6.QtDataVisualization': <module 'PySide6.QtDataVisualization' from '/home/snoopjedi/repos/coveragepy-src/.direnv/python-3.8.12/lib/python3.8/site-packages/PySide6/Qt
DataVisualization.abi3.so'>,
# ... snipped ...
 'shiboken6': <module 'shiboken6' from '/home/snoopjedi/repos/coveragepy-src/.direnv/python-3.8.12/lib/python3.8/site-packages/shiboken6/__init__.py'>,
 'shiboken6.Shiboken': <module 'shiboken6.Shiboken' from '/home/snoopjedi/repos/coveragepy-src/.direnv/python-3.8.12/lib/python3.8/site-packages/shiboken6/Shiboken.abi3.so'>
,
 'shibokensupport': <module 'shibokensupport' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.feature': <module 'PySide6.support.__feature__' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature': <module 'PySide6.support.signature' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.errorhandler': <module 'PySide6.support.signature.errorhandler' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.importhandler': <module 'PySide6.support.signature.importhandler' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.layout': <module 'PySide6.support.signature.layout' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.lib': <module 'PySide6.support.signature.lib' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.lib.enum_sig': <module 'PySide6.support.signature.lib.enum_sig' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.lib.pyi_generator': <module 'PySide6.support.signature.lib.pyi_generator' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>
,
 'shibokensupport.signature.lib.tool': <module 'PySide6.support.signature.lib.tool' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.loader': <module 'shibokensupport.signature.loader' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.mapping': <module 'PySide6.support.signature.mapping' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
 'shibokensupport.signature.parser': <module 'PySide6.support.signature.parser' (<signature_bootstrap.EmbeddableZipImporter object at 0x7f9009ae1430>)>,
# ... snipped ...

@adam-grant-hendry
Copy link
Author

Actually, I'm guessing where the file came from. But I know it didn't exist because I added some debugging lines to coverage/inorout.py to log whether the claimed file exists.

I believe you are right. I dug deeper into a similar problem posted on SO and it does appear shiboken6 imports from a zip file.

I know I used to see a private . folder cached in my top-level project directory before, but I can't seem to find it.

@adam-grant-hendry
Copy link
Author

If you print the contents of sys.modules after the import that causes these warnings, the offending modules indicate that they are instances of EmbeddableZipImporter objects (which are specific to pyside6) in their repr:

Thank you! Great tip.

The bug on the PySide tracker (PYSIDE-932) does note that their solution was to embed everything now. That makes sense.

@adam-grant-hendry
Copy link
Author

adam-grant-hendry commented Jun 8, 2022

FWIW future readers (a tip), I've added a note in my pyproject.toml regarding this since newcomers to my codebase might scratch their heads when they see that a non-existent folder is being omitted:

# `shiboken6`, which creates the python bindings for `Qt` C++ source, imports from a
# `zip` file into the top-level directory at runtime. These files are deleted after
# running, but `coverage` attempts to look at their source after they're gone, causing
# warnings to appear. Namely, it looks for these modules/files:
#
#    myproj/pysrcript
#    myproj/shibokensupport
#    myproj/signature_bootstrap.py
#
# To avoid this error, `source` is specified to the package subdirectory. However, this
# can also be avoided by explicitly omitting these folders in the `omit` section.
#
# See https://github.com/nedbat/coveragepy/issues/1392

@SnoopJ
Copy link

SnoopJ commented Jun 8, 2022

It's conceivable that PySide could adjust the filenames of things provided by EmbeddableZipImporter to start with "<" which would cause coverage to ignore them, but I don't know if that would impact any of the other usage in their little ecosystem. Might be worth asking them about it, though.

@adam-grant-hendry
Copy link
Author

It's conceivable that PySide could adjust the filenames of things provided by EmbeddableZipImporter to start with "<" which would cause coverage to ignore them, but I don't know if that would impact any of the other usage in their little ecosystem. Might be worth asking them about it, though.

I'm comfortable in my own project, for the timebeing, commenting what's happening in my pyproject.toml.

If this surfaces into a bigger issue, I can open a request on their tracker later.

@jaraco
Copy link

jaraco commented Feb 16, 2023

I also encountered this issue in pytest-dev/pytest-cov#538 and in jaraco/zipp#93.

For example, this code triggers a warning when (test) can't be parsed:

https://github.com/jaraco/zipp/blob/a730c30dd4c2c9fe0c5a5374481adcaf984bfd37/tests/test_zipp.py#L271-L282

Probably that test is going to get removed soon, as it appears to be there for Python 2 compatibility. That doesn't change the fact that someone might want to invoke compile on inline logic. Is there a special value the user should supply to the filename parameter of compile to avoid triggering these warnings?

In other cases, warnings were emitted for temporary files loaded when processing temp files that were no longer available in a later scope.

It sounds as if the best recommendation is to blocklist the unwanted paths or disable the warnings altogether. I'll probably end up doing the latter.

@SnoopJ
Copy link

SnoopJ commented Feb 16, 2023

Is there a special value the user should supply to the filename parameter of compile to avoid triggering these warnings?

I believe that if the filename starts with <, then coverage will ignore it (seen in the code here) so perhaps you could use <test> instead of (test) there.

It sounds as if the best recommendation is to blocklist the unwanted paths or disable the warnings altogether. I'll probably end up doing the latter.

The former strikes me as the better option because the offending code can be quarantined with good granularity, but either of these imposes fewer constraints on the downstream consumer of coverage and are in that sense 'better' than restricting yourself to a special filename.

clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.functools that referenced this issue Feb 21, 2023
…2 to version 3.6.0

Jason R. Coombs (28):
      Update documentation of call_aside detailing the motivation and benefits of the construct.
      Adopt furo theme for docs.
      Indicate to use latest Python version (workaround for readthedocs/readthedocs.org/#9623). Requires also specifying the OS version (workaround for readthedocs/readthedocs.org#9635).
      GHA pretty env (#67)
      Pin mypy to '<0.990' due to realpython/pytest-mypy#141
      Remove the hyperlink for the Python versions badge. The PyPI badge is a better anchor for the hyperlink.
      Apply explicit_package_bases for mypy and unpin the version. Ref python/mypy#14057.
      Add Python 3.12 to matrix. Only test 3.8-3.10 on Linux.
      Disable flake8 on Python 3.12. Workaround for tholo/pytest-flake8#87.
      Honor ResourceWarnings. Fixes jaraco/skeleton#73.
      tox 4 requires a boolean value, so use '1' to FORCE_COLOR. Fixes jaraco/skeleton#74.
      Remove unnecessary shebang and encoding header in docs conf.
      Prevent Python 3.12 from blocking checks.
      Build docs in CI, including sphinx-lint.
      Restore doctests by utilizing importlib. Ref pytest-dev/pytest#3396.
      Put tidelift docs dependency in its own section to limit merge conflicts.
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Renamed 'call_aside' to 'invoke'. Fixes #21.
      Replace 'called_with' with 'assert_called_with'.
      🚡 Toil the docs.

Zach Burnett (1):
      rename `.readthedocs.yml` to `.readthedocs.yaml` (RTD docs indicate that `.readthedocs.yml` will be deprecated) (#68)
clrpackages pushed a commit to clearlinux-pkgs/pypi-importlib_resources that referenced this issue Feb 21, 2023
….10.2 to version 5.12.0

Gregory P. Smith (1):
      gh-82874: Convert remaining importlib format uses to f-str. (#98005)

Jason R. Coombs (27):
      ⚫ Fade to black.
      Prefer docstrings to comments where appropriate.
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      In MultiplexedPath.iterdir, honor multiple subdirectories of the same name.
      Prefer tee and only.
      Update changelog.
      Add section on Namespace Packages. Fixes #262.
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Remove 'absolute' call, unneeded.
      Extract fixture for zip_on_path.
      Prefer suppress to except/pass.
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Update _path.build/create from jaraco.path 3.4.1. Fixes EncodingWarnings.
      Fix EncodingWarnings
      Update changelog.
      Pass 'encoding' to target.open in test_open_text_FileNotFoundError. Fixes #280.
      Update changelog.
      Add tests capturing expectation of custom loaders. Ref #268.
      Disable native reader even if it supplies files, because it might not have features/fixes present in this library. Fixes #257.
      Give the local zip/namespace/file readers precedence over the native reader.
      Update changelog.

Joost Ellerbroek (1):
      Add test for MultiplexedPath.joinpath with common subdirs
@rbm-radius
Copy link

For what it's worth, I am running into a similar problem, but I don't think it's coming from a zip file.

code/xx/venv/lib/python3.9/site-packages/coverage/report.py:113: CoverageWarning: Couldn't parse 'code/xx/_run_request_middleware': No source for code: 'code/xx/_run_request_middleware'. (couldnt-parse)

(and a few similar errors with different paths)

That spurious path (_run_request_middleware) is only found in the code in the Sanic package installed in a virtual environment at code/venv. There is no file named _run_request_middleware anywhere. This happens whether I delete that __pycache__ directory or not.

$ grep -r _run_request_middleware *
Binary file venv/lib/python3.9/site-packages/sanic/__pycache__/app.cpython-39.pyc matches
venv/lib/python3.9/site-packages/sanic/app.py:        "_run_request_middleware",
venv/lib/python3.9/site-packages/sanic/app.py:            response = await self._run_request_middleware(request, middleware)
venv/lib/python3.9/site-packages/sanic/app.py:                response = await self._run_request_middleware(
venv/lib/python3.9/site-packages/sanic/app.py:    async def _run_request_middleware(

My .coveragerc is set to omit virtual env directories, __pycache__, and .pyc files:

[run]
command_line = -m pytest -W ignore::DeprecationWarning -W ignore::UserWarning --cov=xx --cov-reset --cov-report=html tests/unit/ops
omit = */tests/*,./*/*.pyc,*/venv/*,*/__pycache__/*

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
    # Have to re-enable the standard pragma
    pragma: no cover

    # Don't complain about missing debug-only code:
    def __repr__
    if self\.debug

    # Don't complain if tests don't hit defensive assertion code:
    raise NotImplementedError

    # Don't complain about abstract methods, they aren't run:
    @(abc\.)?abstractmethod

ignore_errors = True

No warnings are thrown during coverage run but they do appear when I run coverage xml

I tried adding the disable_warnings directive to .coveragerc in the [run] and [report] sections to no avail.

[tool.coverage.run]
disable_warnings = ["couldnt-parse"]

Any ideas?

Thanks.

@SnoopJ
Copy link

SnoopJ commented Feb 24, 2023

There is no file named _run_request_middleware anywhere.

Looks like sanic does some code generation at runtime as part of its "touchup" process (which is invoked because of the declaration here), so there isn't any source file for coverage to locate, but coverage doesn't know that because the code object's filename isn't distinguishable from a "real" filename.

See sanic-org/sanic#2345 for a downstream report of the same issue which points out that

these functions … are rewritten at startup time based upon your application's code.

Looks like sanic uses the name of the method being touched-up as the filename for the resulting code object. I don't know if they have load-bearing reasons for doing that, but if they used a filename starting with <, then coverage would ignore the generated code. It may be worth filing a downstream issue for this change.

I'm not sure about your other questions, it sounds like there may be a separate issue going on with your attempt to use disable_warnings to squelch this, maybe something is forcing the warning back on? I'll leave those other matters for @nedbat 😅

@rbm-radius
Copy link

@SnoopJ nice detective work on the sanic-related issue. I will file an issue there.

As to why disable_warnings is ignored, that is indeed a mystery.

clrpackages pushed a commit to clearlinux-pkgs/pypi-zipp that referenced this issue Feb 28, 2023
…n 3.15.0

Jason R. Coombs (15):
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Consume the _implied_dirs result, ensuring the algorithmic effect is exercised. Ref python/cpython#102209.
      Add doctests for _implied_dirs illustrating the behavior.
      Add test for getinfo on a missing. Restores 100% coverage.
      Fix EncodingWarning in doctest.
      Fix EncodingWarning in test_pickle.
      Fix coverage in conftest
      Use consume from more_itertools.
      Measure the complexity directly using the big-O library. Fixes python/cpython#102209.
      Allow sub-linear complexity (as observed on PyPy).
      Move complexity tests to their own module.
      Update changelog.
clrpackages pushed a commit to clearlinux-pkgs/pypi-setuptools that referenced this issue Mar 9, 2023
…version 67.5.1

Anderson Bravalheri (8):
      Remove htmlcov from auto **module** discovery
      Adjust news fragment for more descriptiveness
      Improve error messages for pyproject.toml validation
      Add news fragment
      Make pkg_resources more forgiving of non-compliant versions
      Remove duplication in warning message
      Add news fragment
      Bump version: 67.5.0 → 67.5.1

Jason R. Coombs (14):
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      ⚫ Fade to black.
      Use renamed extension. Fixes #3844.
      Deprecate pkg_resources, removing excuse that 'discouraged is not deprecated'.
      Add changelog entry.
      Bump version: 67.4.0 → 67.5.0
      ⚫ Fade to black.
      Use try/except in __setitem__.
      Rename value to avoid masking variable.
      Trap exception directly instead of tracking with boolean.
      Resolve setter once.
      Extract method for _section_options.
      Simplify _section_options using str.partition and a generator.

Yukihiko Shinoda (3):
      Add FlatLayoutPackageFinder's test for Coverage.py
      Hotfix add htmlcov to FlatLayoutPackageFinder.DEFAULT_EXCLUDE
      Add changelog entry
clrpackages pushed a commit to clearlinux-pkgs/pypi-importlib_metadata that referenced this issue Mar 22, 2023
…0.0 to version 6.1.0

Filipe Laíns (3):
      Sync PackageMetadata with email.message.Message
      Fix formatting in test_api
      Add missing modules to packages_distributions

Jason R. Coombs (16):
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Add comment to link rationale for existence.
      👹 Feed the hobgoblins (delint).
      Update changelog.
      Extend the workaround to satisfy docstring of typing._overload_dummy.
      Remove long-line comment.
      Extract variable for optional names.
      Restore logic for parts.
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.collections that referenced this issue Mar 25, 2023
…8.0 to version 3.9.0

Jason R. Coombs (24):
      Pin mypy to '<0.990' due to realpython/pytest-mypy#141
      Remove the hyperlink for the Python versions badge. The PyPI badge is a better anchor for the hyperlink.
      Apply explicit_package_bases for mypy and unpin the version. Ref python/mypy#14057.
      Add Python 3.12 to matrix. Only test 3.8-3.10 on Linux.
      Disable flake8 on Python 3.12. Workaround for tholo/pytest-flake8#87.
      Honor ResourceWarnings. Fixes jaraco/skeleton#73.
      tox 4 requires a boolean value, so use '1' to FORCE_COLOR. Fixes jaraco/skeleton#74.
      Remove unnecessary shebang and encoding header in docs conf.
      Prevent Python 3.12 from blocking checks.
      Build docs in CI, including sphinx-lint.
      Restore doctests by utilizing importlib. Ref pytest-dev/pytest#3396.
      Put tidelift docs dependency in its own section to limit merge conflicts.
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Remove superfluous str calls.
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      🚡 Toil the docs.
      Use set intersection len for DictFilter. Fixes #12.
clrpackages pushed a commit to clearlinux-pkgs/pypi-inflect that referenced this issue Apr 11, 2023
…ion 6.0.4

James Addison (4):
      Add illustrative test coverage
      Apply a minimal fix to allow the test cases to pass
      Test coverage: ordinals for real numbers
      Code style: apply updated black v23 style rules

Jason R. Coombs (33):
      Pin mypy to '<0.990' due to realpython/pytest-mypy#141
      Remove the hyperlink for the Python versions badge. The PyPI badge is a better anchor for the hyperlink.
      Apply explicit_package_bases for mypy and unpin the version. Ref python/mypy#14057.
      Add Python 3.12 to matrix. Only test 3.8-3.10 on Linux.
      Disable flake8 on Python 3.12. Workaround for tholo/pytest-flake8#87.
      Honor ResourceWarnings. Fixes jaraco/skeleton#73.
      tox 4 requires a boolean value, so use '1' to FORCE_COLOR. Fixes jaraco/skeleton#74.
      Remove unnecessary shebang and encoding header in docs conf.
      Prevent Python 3.12 from blocking checks.
      Build docs in CI, including sphinx-lint.
      Put tidelift docs dependency in its own section to limit merge conflicts.
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Add test capturing missed expectation in leading abbreviations. Ref #136.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Remove xfail now that test passes. Ref #179.
      Remove extra noqa. Fixes #177.
      Fix ResourceWarnings in tests.
      Remove commented code.
      Inline getwords
      Remove commented code.
      Extract filter function for suitable_for_pl_si
      Parameterize function instead of repeating one's self.
      Parameterize 'words' in test_pl_si
      Inline words parameterization, as it only has two words.
      Revert "Remove extra noqa. Fixes #177."
      Update changelog.

Khuyen Tran (1):
      Change the parameter for gender in README

kimgerdes (1):
      fix a/an issue 136 as indicated by tonywu7
clrpackages pushed a commit to clearlinux-pkgs/pypi-tempora that referenced this issue Apr 11, 2023
…ion 5.2.2

Jason R. Coombs (8):
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Update changelog.

Stanislav Levin (1):
      tests: Fix broken assumption for leap year
DavidDevoogdt added a commit to DavidDevoogdt/IMLCV that referenced this issue May 11, 2023
clrpackages pushed a commit to clearlinux-pkgs/pypi-keyring that referenced this issue Jun 20, 2023
…rsion 24.0.0

Jason R. Coombs (28):
      Build docs in CI, including sphinx-lint.
      Put tidelift docs dependency in its own section to limit merge conflicts.
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Warn if the keychain property is set. Fixes #623.
      Removed OS_X module. Ref #487.
      Removed deprecated keyring.util.properties module.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Remove unnecessary and incorrect copyright notice. Fixes jaraco/skeleton#78.
      Replace flake8 with ruff. Fixes jaraco/skeleton#79 and sheds debt.
      ⚫ Fade to black.
      ⚫ Fade to black.
      Make substitution fields more prominent and distinct from true 'skeleton' references. (#71)
      Suppress EncodingWarning in build.env. Ref pypa/build#615.
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Update RTD boilerplate to new issue. Ref readthedocs/readthedocs.org#10401.
      Add badge for Ruff.
      Remove inclusion of python version for docs
      Update platform_ to return pathlib objects. Extract function for _config_path.
      Add diagnose command. Fixes #633.
      Mark multiprocess tests as xfail for now. Ref #634.
      Update changelog.

Joyce (1):
      Feat: initial permissions to main.yml (jaraco/skeleton#76)

Philipp Hörist (4):
      docs: Remove trailing whitespace
      Add type annotations for core.py
      Add type annotations for backend.py
      Make defining priority property more consistent

wzy (1):
      Fix a typo of README.rst
clrpackages pushed a commit to clearlinux-pkgs/pypi-portend that referenced this issue Jun 29, 2023
…ion 3.2.0

Anderson Bravalheri (2):
      Ignore flake8/black warnings with pytest 7.0.1 (jaraco/skeleton#58)
      Update Github actions to v3 (#62)

Hugo van Kemenade (1):
      Update base URL for PEPs (#61)

Jason R. Coombs (56):
      Remove filtered warnings, addressed upstream.
      Update badge year
      Remove setup.py, no longer needed.
      Add exclusions for pytest 7 deprecations in plugins. Fixes jaraco/skeleton#57.
      Use the parent category PytestDeprecationWarning, which is available on older pytest versions. Fixes jaraco/skeleton#57.
      Bump pytest-mypy and remove workaround for realpython/pytest-mypy#131.
      Require jaraco.packaging 9 adding compatibility for projects with no setup.py file.
      Ran pre-commit autoupdate
      Add Python 3.11 into the matrix using workaround from actions/setup-python#213. Drop 3.9 from matrix for efficiency.
      Prefer spaces for rst. Fixes jaraco/skeleton#64.
      Honor PEP 518 with pytest-enabler.
      Ran pre-commit autoupdate
      Use '-dev' for every Python version. Ref actions/setup-python#213.
      Use Python 3.11 for cutting releases.
      Pin flake8. Workaround for tholo/pytest-flake8#87.
      Update to setup-python v4. Fixes jaraco/skeleton#65.
      Also update release to v4
      Add PyPy to the test matrix on Linux. Fixes jaraco/skeleton#63.
      When rendering docs, preserve the syntax for defaults. Fixes jaraco/path#197.
      Adopt furo theme for docs.
      Indicate to use latest Python version (workaround for readthedocs/readthedocs.org/#9623). Requires also specifying the OS version (workaround for readthedocs/readthedocs.org#9635).
      GHA pretty env (#67)
      Pin mypy to '<0.990' due to realpython/pytest-mypy#141
      Remove the hyperlink for the Python versions badge. The PyPI badge is a better anchor for the hyperlink.
      Apply explicit_package_bases for mypy and unpin the version. Ref python/mypy#14057.
      Add Python 3.12 to matrix. Only test 3.8-3.10 on Linux.
      Disable flake8 on Python 3.12. Workaround for tholo/pytest-flake8#87.
      Honor ResourceWarnings. Fixes jaraco/skeleton#73.
      tox 4 requires a boolean value, so use '1' to FORCE_COLOR. Fixes jaraco/skeleton#74.
      Remove unnecessary shebang and encoding header in docs conf.
      Prevent Python 3.12 from blocking checks.
      Build docs in CI, including sphinx-lint.
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Remove unnecessary and incorrect copyright notice. Fixes jaraco/skeleton#78.
      Replace flake8 with ruff. Fixes jaraco/skeleton#79 and sheds debt.
      Make substitution fields more prominent and distinct from true 'skeleton' references. (#71)
      Suppress EncodingWarning in build.env. Ref pypa/build#615.
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Update RTD boilerplate to new issue. Ref readthedocs/readthedocs.org#10401.
      Add badge for Ruff.
      Remove inclusion of python version for docs
      Adopt towncrier for managing changelog. Fixes jaraco/skeleton#83.
      Replace workaround for actions/setup-python#508 with 'allow-prereleases'
      Remove tox boilerplate, no longer necessary with later versions of tox.
      Require Python 3.8 or later.
      Expand 'finalize' to commit and tag the change.
      Leverage pytest-enabler 2.2 for the default config.
      Finalize

Joyce (1):
      Feat: initial permissions to main.yml (jaraco/skeleton#76)

Sviatoslav Sydorenko (1):
      Inject check job into CI workflow as ultimate flag (#55)

Zach Burnett (1):
      rename `.readthedocs.yml` to `.readthedocs.yaml` (RTD docs indicate that `.readthedocs.yml` will be deprecated) (#68)

wim glenn (1):
      exclude build env from cov reporting (#60)
clrpackages pushed a commit to clearlinux-pkgs/pypi-configparser that referenced this issue Jul 11, 2023
… version 6.0.0

Jason R. Coombs (61):
      Add PyPy to the test matrix on Linux. Fixes jaraco/skeleton#63.
      When rendering docs, preserve the syntax for defaults. Fixes jaraco/path#197.
      Adopt furo theme for docs.
      Indicate to use latest Python version (workaround for readthedocs/readthedocs.org/#9623). Requires also specifying the OS version (workaround for readthedocs/readthedocs.org#9635).
      GHA pretty env (#67)
      Pin mypy to '<0.990' due to realpython/pytest-mypy#141
      Remove the hyperlink for the Python versions badge. The PyPI badge is a better anchor for the hyperlink.
      Apply explicit_package_bases for mypy and unpin the version. Ref python/mypy#14057.
      Add Python 3.12 to matrix. Only test 3.8-3.10 on Linux.
      Disable flake8 on Python 3.12. Workaround for tholo/pytest-flake8#87.
      Honor ResourceWarnings. Fixes jaraco/skeleton#73.
      tox 4 requires a boolean value, so use '1' to FORCE_COLOR. Fixes jaraco/skeleton#74.
      Remove unnecessary shebang and encoding header in docs conf.
      Prevent Python 3.12 from blocking checks.
      Run tests on Windows again. Fixes #58.
      Exclude Python 3.7 + Windows from the matrix as permanent workaround for #58.
      Build docs in CI, including sphinx-lint.
      Put tidelift docs dependency in its own section to limit merge conflicts.
      Remove 'configparser' as that renders the stdlib docs.
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      ⚫ Fade to black.
      Remove unnecessary and incorrect copyright notice. Fixes jaraco/skeleton#78.
      Replace flake8 with ruff. Fixes jaraco/skeleton#79 and sheds debt.
      Make substitution fields more prominent and distinct from true 'skeleton' references. (#71)
      Suppress EncodingWarning in build.env. Ref pypa/build#615.
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Update RTD boilerplate to new issue. Ref readthedocs/readthedocs.org#10401.
      Add badge for Ruff.
      Remove inclusion of python version for docs
      Adopt towncrier for managing changelog. Fixes jaraco/skeleton#83.
      Replace workaround for actions/setup-python#508 with 'allow-prereleases'
      Remove tox boilerplate, no longer necessary with later versions of tox.
      Require Python 3.8 or later.
      Expand 'finalize' to commit and tag the change.
      Leverage pytest-enabler 2.2 for the default config.
      Prefer 3.x for Python version (latest stable).
      Collapse skeleton history. Workaround for jaraco/skeleton#87.
      Add links to project home page and pypi. Fixes jaraco/skeleton#77.
      Replace redundant step names with simple 'Run'.
      Increase visibility of security policy. (#4)
      Normalized headings in readme.
      👹 Feed the hobgoblins (delint).
      Bump exclusion to Python 3.8 now that Windows tests run there. Closes #67.
      Restore Windows tests on older Pythons (#68)
      Comment out just the option.
      cpython-v3.12.0b3 rev=f992a60014b7
      Apply pyupgrade for Python 3.8+ to test_backport.
      Move tests out of the package.
      Move package out of src
      Re-enable doctests now that pytest-dev/pytest#3396 is solved.
      Remove legacy support in configparser module.
      Skip unimportant coverage checks
      Finalize

Joyce (1):
      Feat: initial permissions to main.yml (jaraco/skeleton#76)

Zach Burnett (1):
      rename `.readthedocs.yml` to `.readthedocs.yaml` (RTD docs indicate that `.readthedocs.yml` will be deprecated) (#68)
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.classes that referenced this issue Jul 11, 2023
…to version 3.3.0

Jason R. Coombs (43):
      Adopt furo theme for docs.
      Indicate to use latest Python version (workaround for readthedocs/readthedocs.org/#9623). Requires also specifying the OS version (workaround for readthedocs/readthedocs.org#9635).
      GHA pretty env (#67)
      Pin mypy to '<0.990' due to realpython/pytest-mypy#141
      Remove the hyperlink for the Python versions badge. The PyPI badge is a better anchor for the hyperlink.
      Apply explicit_package_bases for mypy and unpin the version. Ref python/mypy#14057.
      Add Python 3.12 to matrix. Only test 3.8-3.10 on Linux.
      Disable flake8 on Python 3.12. Workaround for tholo/pytest-flake8#87.
      Honor ResourceWarnings. Fixes jaraco/skeleton#73.
      tox 4 requires a boolean value, so use '1' to FORCE_COLOR. Fixes jaraco/skeleton#74.
      Remove unnecessary shebang and encoding header in docs conf.
      Prevent Python 3.12 from blocking checks.
      Build docs in CI, including sphinx-lint.
      Put tidelift docs dependency in its own section to limit merge conflicts.
      Update badge for 2023
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Remove unnecessary and incorrect copyright notice. Fixes jaraco/skeleton#78.
      Replace flake8 with ruff. Fixes jaraco/skeleton#79 and sheds debt.
      Make substitution fields more prominent and distinct from true 'skeleton' references. (#71)
      Suppress EncodingWarning in build.env. Ref pypa/build#615.
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Update RTD boilerplate to new issue. Ref readthedocs/readthedocs.org#10401.
      Add badge for Ruff.
      Remove inclusion of python version for docs
      Adopt towncrier for managing changelog. Fixes jaraco/skeleton#83.
      Replace workaround for actions/setup-python#508 with 'allow-prereleases'
      Remove tox boilerplate, no longer necessary with later versions of tox.
      Require Python 3.8 or later.
      Expand 'finalize' to commit and tag the change.
      Leverage pytest-enabler 2.2 for the default config.
      Prefer 3.x for Python version (latest stable).
      Collapse skeleton history. Workaround for jaraco/skeleton#87.
      Add links to project home page and pypi. Fixes jaraco/skeleton#77.
      Replace redundant step names with simple 'Run'.
      Increase visibility of security policy. (#4)
      Finalize

Joyce (1):
      Feat: initial permissions to main.yml (jaraco/skeleton#76)

Zach Burnett (1):
      rename `.readthedocs.yml` to `.readthedocs.yaml` (RTD docs indicate that `.readthedocs.yml` will be deprecated) (#68)
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.text that referenced this issue Nov 28, 2023
… version 3.12.0

Jason R. Coombs (35):
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Remove unnecessary and incorrect copyright notice. Fixes jaraco/skeleton#78.
      Replace flake8 with ruff. Fixes jaraco/skeleton#79 and sheds debt.
      Make substitution fields more prominent and distinct from true 'skeleton' references. (#71)
      Suppress EncodingWarning in build.env. Ref pypa/build#615.
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Update RTD boilerplate to new issue. Ref readthedocs/readthedocs.org#10401.
      Add badge for Ruff.
      Remove inclusion of python version for docs
      Adopt towncrier for managing changelog. Fixes jaraco/skeleton#83.
      Replace workaround for actions/setup-python#508 with 'allow-prereleases'
      Remove tox boilerplate, no longer necessary with later versions of tox.
      Require Python 3.8 or later.
      Expand 'finalize' to commit and tag the change.
      Leverage pytest-enabler 2.2 for the default config.
      Prefer 3.x for Python version (latest stable).
      Collapse skeleton history. Workaround for jaraco/skeleton#87.
      Add links to project home page and pypi. Fixes jaraco/skeleton#77.
      Replace redundant step names with simple 'Run'.
      Increase visibility of security policy. (#4)
      Remove TOX_WORK_DIR workaround, no longer necessary with tox 4. Ref tox-dev/tox#3050.
      Pin against sphinx 7.2.5 as workaround for sphinx/sphinx-doc#11662. Closes jaraco/skeleton#88.
      Allow GITHUB_* settings to pass through to tests.
      Remove spinner disablement. If it's not already fixed upstream, that's where it should be fixed.
      Clean up 'color' environment variables.
      Add diff-cover check to Github Actions CI. Closes jaraco/skeleton#90.
      Add descriptions to the tox environments. Closes jaraco/skeleton#91.
      Add FORCE_COLOR to the TOX_OVERRIDE for GHA. Requires tox 4.11.1. Closes jaraco/skeleton#89.
      Prefer ``pass_env`` in tox config. Preferred failure mode for tox-dev/tox#3127 and closes jaraco/skeleton#92.
      Limit sphinxlint jobs to 1. Workaround for sphinx-contrib/sphinx-lint#83.
      Update for Python 3.8+
      Finalize

Joyce (1):
      Feat: initial permissions to main.yml (jaraco/skeleton#76)
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.context that referenced this issue Apr 9, 2024
…to version 5.1.0

Avasam (1):
      Allow mypy on PyPy (jaraco/skeleton#111)

Bartosz Sławecki (1):
      Tweak coverage configuration for type checking (jaraco/skeleton#97)

Christian Clauss (2):
      Upgrade GitHub Actions checkout (jaraco/skeleton#94)
      GitHub Actions: Combine tox jobs diffcov and docs (jaraco/skeleton#95)

Dimitri Papadopoulos Orfanos (2):
      Use the ruff formatter (jaraco/skeleton#99)
      ruff: extended-ignore → ignore (jaraco/skeleton#105)

Jason R. Coombs (71):
      ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default.
      Enable default encoding warning where available. See PEP 597.
      Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67.
      Exempt warning. Workaround for realpython/pytest-mypy#152
      Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750).
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Revert "exclude build env from cov reporting (jaraco/skeleton#60)"
      Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56.
      Remove unnecessary and incorrect copyright notice. Fixes jaraco/skeleton#78.
      Replace flake8 with ruff. Fixes jaraco/skeleton#79 and sheds debt.
      Make substitution fields more prominent and distinct from true 'skeleton' references. (#71)
      Suppress EncodingWarning in build.env. Ref pypa/build#615.
      Remove reference to EncodingWarning as it doesn't exist on some Pythons.
      Update RTD boilerplate to new issue. Ref readthedocs/readthedocs.org#10401.
      Add badge for Ruff.
      Remove inclusion of python version for docs
      Adopt towncrier for managing changelog. Fixes jaraco/skeleton#83.
      Replace workaround for actions/setup-python#508 with 'allow-prereleases'
      Remove tox boilerplate, no longer necessary with later versions of tox.
      Require Python 3.8 or later.
      Expand 'finalize' to commit and tag the change.
      Leverage pytest-enabler 2.2 for the default config.
      Prefer 3.x for Python version (latest stable).
      Collapse skeleton history. Workaround for jaraco/skeleton#87.
      Add links to project home page and pypi. Fixes jaraco/skeleton#77.
      Replace redundant step names with simple 'Run'.
      Increase visibility of security policy. (#4)
      Remove TOX_WORK_DIR workaround, no longer necessary with tox 4. Ref tox-dev/tox#3050.
      Pin against sphinx 7.2.5 as workaround for sphinx/sphinx-doc#11662. Closes jaraco/skeleton#88.
      Allow GITHUB_* settings to pass through to tests.
      Remove spinner disablement. If it's not already fixed upstream, that's where it should be fixed.
      Clean up 'color' environment variables.
      Add diff-cover check to Github Actions CI. Closes jaraco/skeleton#90.
      Add descriptions to the tox environments. Closes jaraco/skeleton#91.
      Add FORCE_COLOR to the TOX_OVERRIDE for GHA. Requires tox 4.11.1. Closes jaraco/skeleton#89.
      Prefer ``pass_env`` in tox config. Preferred failure mode for tox-dev/tox#3127 and closes jaraco/skeleton#92.
      Limit sphinxlint jobs to 1. Workaround for sphinx-contrib/sphinx-lint#83.
      Remove news fragment after allowing time to be processed downstream.
      Suppress deprecation warning in dateutil. Workaround for dateutil/dateutil#1284.
      Update Github Actions badge per actions/starter-workflows#1525.
      Separate collateral jobs on different lines for easier override/extension.
      Drop minimum requirement on pytest-mypy as most environments are already running much later. Closes jaraco/skeleton#96.
      Remove sole entry for branches-ignore. Workaround for and closes jaraco/skeleton#103.
      Bump year on badge
      Remove build and dist from excludes. It appears they are not needed and their presence blocks the names of packages like 'builder' and 'distutils'. Ref pypa/distutils#224.
      Exclude docs and tests directories properly per Setuptools behavior.
      Rely on default discovery for good heuristics for finding packages.
      Enable preview to enable preserving quotes.
      Use latest versions in RTD boilerplate.
      Remove Sphinx pin. Ref sphinx-doc/sphinx#11662.
      Include deps from the base config in diffcov.
      Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110.
      Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110.
      Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103.
      Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114.
      Move Python 3.11 out of the test matrix.
      Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112.
      Update readme and docs.
      👹 Feed the hobgoblins (delint).
      👹 Feed the hobgoblins (delint).
      Removed deprecated 'runner' parameter to tarball_context.
      Renamed tarball_context to tarball and deprecated tarball_context compatibility shim.
      Disentangle pushd from tarball.
      Add a few type hints. Ref #2
      Finalize
      👹 Feed the hobgoblins (delint).
      Implement compose for composing context managers.
      Make the function private for now, available experimentally until there's feedback (or not) on the approach.
      Deprecate null context.
      Rely on Python 3.8 syntax.
      Finalize

Joyce (1):
      Feat: initial permissions to main.yml (jaraco/skeleton#76)

Sviatoslav Sydorenko (1):
      Enable testing merge queues @ GitHub Actions CI/CD (jaraco/skeleton#93)
@bersbersbers
Copy link

Sorry for excavating this old thread, but how is

a filename starting with <

supposed to work on Windows? < is not allowed in Windows filenames, compare https://stackoverflow.com/q/1976007/.

@nedbat
Copy link
Owner

nedbat commented Oct 15, 2024

Sorry for excavating this old thread, but how is

a filename starting with <

supposed to work on Windows? < is not allowed in Windows filenames, compare https://stackoverflow.com/q/1976007/.

If you are referring to this earlier comment:

I believe that if the filename starts with <, then coverage will ignore it (seen in the code here) so perhaps you could use instead of (test) there.

This should be "if a reported filename starts with <, then it isn't actually a file name, it's a synthetic placeholder like <memory>."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not a bug
Projects
None yet
Development

No branches or pull requests

6 participants