Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ current_version = 6.3.0
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file (badge):README.rst]
search = /v{current_version}.svg
Expand Down
12 changes: 9 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
# Note the order is intentional to avoid multiple passes of the hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.13
rev: v0.12.12
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes, --unsafe-fixes]
- id: ruff-format
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- id: taplo-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: '.*\.pth$'
- id: mixed-line-ending
args: [--fix=lf]
- id: debug-statements
3 changes: 3 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[formatting]
array_auto_collapse = false
indent_string = " "
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ Authors
* Dawn James - https://github.com/dawngerpony
* Tsvika Shapira - https://github.com/tsvikas
* Marcos Boger - https://github.com/marcosboger
* Ofek Lev - https://github.com/ofek
9 changes: 7 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Changelog
patch = subprocess

This release also requires at least coverage 7.10.6.
* Switched packaging to have metadata completely in ``pyproject.toml`` and use `hatchling <https://pypi.org/project/hatchling/>`_ for
building.
Contributed by Ofek Lev in `#551 <https://github.com/pytest-dev/pytest-cov/pull/551>`_
with some extras in `#716 <https://github.com/pytest-dev/pytest-cov/pull/716>`_.
* Removed some not really necessary testing deps like ``six``.

6.3.0 (2025-09-06)
------------------
Expand Down Expand Up @@ -277,8 +282,8 @@ Changelog
------------------

* Fixed ``RecursionError`` that can occur when using
`cleanup_on_signal <https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html#if-you-got-custom-signal-handling>`__ or
`cleanup_on_sigterm <https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html#if-you-got-custom-signal-handling>`__.
`cleanup_on_signal <https://pytest-cov.readthedocs.io/en/v2.8.0/subprocess-support.html#if-you-got-custom-signal-handling>`__ or
`cleanup_on_sigterm <https://pytest-cov.readthedocs.io/en/v2.8.0/subprocess-support.html#if-you-got-custom-signal-handling>`__.
See: `#294 <https://github.com/pytest-dev/pytest-cov/issues/294>`_.
The 2.7.x releases of pytest-cov should be considered broken regarding aforementioned cleanup API.
* Added compatibility with future xdist release that deprecates some internals
Expand Down
30 changes: 0 additions & 30 deletions MANIFEST.in

This file was deleted.

4 changes: 1 addition & 3 deletions ci/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ def exec_in_env():
else:
bin_path = env_path / 'bin'
if not env_path.exists():
import subprocess

print(f'Making bootstrap env in: {env_path} ...')
try:
check_call([sys.executable, '-m', 'venv', env_path])
Expand Down Expand Up @@ -59,7 +57,7 @@ def main():
# This uses sys.executable the same way that the call in
# cookiecutter-pylibrary/hooks/post_gen_project.py
# invokes this bootstrap.py itself.
for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], text=True).splitlines()
for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], universal_newlines=True).splitlines()
]
tox_environments = [line for line in tox_environments if line.startswith('py')]
for template in templates_path.rglob('*'):
Expand Down
9 changes: 4 additions & 5 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
virtualenv>=16.6.0
pip>=19.1.1
setuptools>=18.0.1
tox
twine
pip>=25
setuptools>=80
tox>=4
virtualenv>=20.34
2 changes: 1 addition & 1 deletion docs/releasing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The process for releasing should follow these steps:
These files need to be removed to force distutils/setuptools to rebuild everything and recreate the egg-info metadata.
#. Build the dists::

python3 setup.py clean --all sdist bdist_wheel
python -m build

#. Verify that the resulting archives (found in ``dist/``) are good.
#. Upload the sdist and wheel with twine::
Expand Down
101 changes: 86 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,76 @@
[build-system]
requires = [
"setuptools>=30.3.0",
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"

[project]
name = "pytest-cov"
dynamic = ["readme"]
version = "6.3.0"
description = "Pytest plugin for measuring coverage."
license = "MIT"
requires-python = ">=3.9"
authors = [
{ name = "Marc Schlaich", email = "[email protected]" },
]
maintainers = [
{ name = "Ionel Cristian Mărieș", email = "[email protected]" },
]
keywords = [
"cover",
"coverage",
"distributed",
"parallel",
"py.test",
"pytest",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Pytest",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
]
dependencies = [
"coverage[toml]>=7.10.6",
"pytest>=7",
"pluggy>=1.2",
]

[project.optional-dependencies]
testing = [
"process-tests",
"pytest-xdist",
"virtualenv",
]

[project.entry-points.pytest11]
pytest_cov = "pytest_cov.plugin"

[project.urls]
"Sources" = "https://github.com/pytest-dev/pytest-cov"
"Documentation" = "https://pytest-cov.readthedocs.io/"
"Changelog" = "https://pytest-cov.readthedocs.io/en/latest/changelog.html"
"Issue Tracker" = "https://github.com/pytest-dev/pytest-cov/issues"

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/x-rst"
fragments = [
{ path = "README.rst" },
{ path = "CHANGELOG.rst" },
]

[tool.ruff]
Expand All @@ -14,30 +84,31 @@ target-version = "py39"

[tool.ruff.lint]
ignore = [
"RUF001", # ruff-specific rules ambiguous-unicode-character-string
"S101", # flake8-bandit assert
"S308", # flake8-bandit suspicious-mark-safe-usage
"E501", # pycodestyle line-too-long
"PLC0415", # `import` should be at the top-level of a file
"RUF001", # ruff-specific rules ambiguous-unicode-character-string
"S101", # flake8-bandit assert
"S308", # flake8-bandit suspicious-mark-safe-usage
"E501", # pycodestyle line-too-long
]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"E", # pycodestyle errors
"EXE", # flake8-executable
"F", # pyflakes
"I", # isort
"F", # pyflakes
"I", # isort
"INT", # flake8-gettext
"PIE", # flake8-pie
"PLC", # pylint convention
"PLE", # pylint errors
"PT", # flake8-pytest-style
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RSE", # flake8-raise
"RUF", # ruff-specific rules
"S", # flake8-bandit
"UP", # pyupgrade
"W", # pycodestyle warnings
"S", # flake8-bandit
"UP", # pyupgrade
"W", # pycodestyle warnings
]

[tool.ruff.lint.flake8-pytest-style]
Expand Down
82 changes: 0 additions & 82 deletions setup.py

This file was deleted.

Loading
Loading