Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-vulture for openSUSE:Factory checked in at 2024-11-06 16:51:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-vulture (Old) and /work/SRC/openSUSE:Factory/.python-vulture.new.2020 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-vulture" Wed Nov 6 16:51:30 2024 rev:12 rq:1221496 version:2.13 Changes: -------- --- /work/SRC/openSUSE:Factory/python-vulture/python-vulture.changes 2024-01-21 23:10:35.910409409 +0100 +++ /work/SRC/openSUSE:Factory/.python-vulture.new.2020/python-vulture.changes 2024-11-06 16:52:52.130345822 +0100 @@ -1,0 +2,13 @@ +Tue Nov 5 14:17:11 UTC 2024 - John Paul Adrian Glaubitz <[email protected]> + +- Update to 2.13 + * Add support for Python 3.13 (Jendrik Seipp, #369). + * Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). + * Include `tests/**/*.toml` in sdist (Colin Watson). +- from version 2.12 + * Use `ruff` for linting and formatting (Anh Trinh, #347, #349). + * Replace `tox` by `pre-commit` for linting and formatting (Anh Trinh, #349). + * Add `--config` flag to specify path to pyproject.toml configuration file + (Glen Robertson, #352). + +------------------------------------------------------------------- Old: ---- vulture-2.11.tar.gz New: ---- vulture-2.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-vulture.spec ++++++ --- /var/tmp/diff_new_pack.hFRMKd/_old 2024-11-06 16:52:52.626366420 +0100 +++ /var/tmp/diff_new_pack.hFRMKd/_new 2024-11-06 16:52:52.630366587 +0100 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-vulture -Version: 2.11 +Version: 2.13 Release: 0 Summary: Python module for finding dead code License: MIT ++++++ vulture-2.11.tar.gz -> vulture-2.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/CHANGELOG.md new/vulture-2.13/CHANGELOG.md --- old/vulture-2.11/CHANGELOG.md 2024-01-06 20:10:15.000000000 +0100 +++ new/vulture-2.13/CHANGELOG.md 2024-10-02 14:09:34.000000000 +0200 @@ -1,4 +1,17 @@ +# 2.13 (2024-10-02) + +* Add support for Python 3.13 (Jendrik Seipp, #369). +* Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). +* Include `tests/**/*.toml` in sdist (Colin Watson). + +# 2.12 (2024-09-17) + +* Use `ruff` for linting and formatting (Anh Trinh, #347, #349). +* Replace `tox` by `pre-commit` for linting and formatting (Anh Trinh, #349). +* Add `--config` flag to specify path to pyproject.toml configuration file (Glen Robertson, #352). + # 2.11 (2024-01-06) + * Switch to tomllib/tomli to support heterogeneous arrays (Sebastian Csar, #340). * Bump flake8, flake8-comprehensions and flake8-bugbear (Sebastian Csar, #341). * Provide whitelist parity for `MagicMock` and `Mock` (maxrake, #342). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/CONTRIBUTING.md new/vulture-2.13/CONTRIBUTING.md --- old/vulture-2.11/CONTRIBUTING.md 2023-08-21 16:22:48.000000000 +0200 +++ new/vulture-2.13/CONTRIBUTING.md 2024-01-19 20:54:32.000000000 +0100 @@ -87,6 +87,12 @@ or implement the desired new feature instead of making "drive-by" changes like adding type hints. +### Formating and linting + +Run `pre-commit` using: + + $ pre-commit run --all-files + ## Testing Run `tox` using: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/MANIFEST.in new/vulture-2.13/MANIFEST.in --- old/vulture-2.11/MANIFEST.in 2020-02-03 15:32:14.000000000 +0100 +++ new/vulture-2.13/MANIFEST.in 2024-10-01 20:01:47.000000000 +0200 @@ -1,5 +1,6 @@ include *.md include *.txt include tests/*.py +include tests/**/*.toml include tox.ini include vulture/whitelists/*.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/PKG-INFO new/vulture-2.13/PKG-INFO --- old/vulture-2.11/PKG-INFO 2024-01-06 20:10:48.979953300 +0100 +++ new/vulture-2.13/PKG-INFO 2024-10-02 14:10:27.960119200 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vulture -Version: 2.11 +Version: 2.13 Summary: Find dead code Home-page: https://github.com/jendrikseipp/vulture Author: Jendrik Seipp @@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Quality Assurance @@ -27,6 +28,8 @@ # Vulture - Find dead code +[](https://pypi.python.org/pypi/vulture) +[](https://anaconda.org/conda-forge/vulture)  [](https://codecov.io/gh/jendrikseipp/vulture?branch=main) @@ -212,7 +215,11 @@ verbose = true ``` -## Version control integration +Vulture will automatically look for a `pyproject.toml` in the current working directory. + +To use a `pyproject.toml` in another directory, you can use the `--config path/to/pyproject.toml` flag. + +## Integrations You can use a [pre-commit](https://pre-commit.com/#install) hook to run Vulture before each commit. For this, install pre-commit and add the @@ -230,6 +237,8 @@ in your repository and specify all files that Vulture should check under `[tool.vulture] --> paths` (see above). +There's also a [GitHub Action for Vulture](https://github.com/gtkacz/vulture-action). + ## How does it work? Vulture uses the `ast` module to build abstract syntax trees for all @@ -374,7 +383,20 @@ [TODO.md](https://github.com/jendrikseipp/vulture/blob/main/TODO.md) +# 2.13 (2024-10-02) + +* Add support for Python 3.13 (Jendrik Seipp, #369). +* Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). +* Include `tests/**/*.toml` in sdist (Colin Watson). + +# 2.12 (2024-09-17) + +* Use `ruff` for linting and formatting (Anh Trinh, #347, #349). +* Replace `tox` by `pre-commit` for linting and formatting (Anh Trinh, #349). +* Add `--config` flag to specify path to pyproject.toml configuration file (Glen Robertson, #352). + # 2.11 (2024-01-06) + * Switch to tomllib/tomli to support heterogeneous arrays (Sebastian Csar, #340). * Bump flake8, flake8-comprehensions and flake8-bugbear (Sebastian Csar, #341). * Provide whitelist parity for `MagicMock` and `Mock` (maxrake, #342). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/README.md new/vulture-2.13/README.md --- old/vulture-2.11/README.md 2024-01-06 19:47:37.000000000 +0100 +++ new/vulture-2.13/README.md 2024-10-01 20:01:47.000000000 +0200 @@ -1,5 +1,7 @@ # Vulture - Find dead code +[](https://pypi.python.org/pypi/vulture) +[](https://anaconda.org/conda-forge/vulture)  [](https://codecov.io/gh/jendrikseipp/vulture?branch=main) @@ -185,7 +187,11 @@ verbose = true ``` -## Version control integration +Vulture will automatically look for a `pyproject.toml` in the current working directory. + +To use a `pyproject.toml` in another directory, you can use the `--config path/to/pyproject.toml` flag. + +## Integrations You can use a [pre-commit](https://pre-commit.com/#install) hook to run Vulture before each commit. For this, install pre-commit and add the @@ -203,6 +209,8 @@ in your repository and specify all files that Vulture should check under `[tool.vulture] --> paths` (see above). +There's also a [GitHub Action for Vulture](https://github.com/gtkacz/vulture-action). + ## How does it work? Vulture uses the `ast` module to build abstract syntax trees for all diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/pyproject.toml new/vulture-2.13/pyproject.toml --- old/vulture-2.11/pyproject.toml 2023-08-21 16:22:48.000000000 +0200 +++ new/vulture-2.13/pyproject.toml 2024-01-19 20:55:38.000000000 +0100 @@ -1,19 +1,72 @@ -# NOTE: you have to use single-quoted strings in TOML for regular expressions. -# It's the equivalent of r-strings in Python. Multiline strings are treated as -# verbose regular expressions by Black. Use [ ] to denote a significant space -# character. +[tool.ruff] +exclude = [ + ".eggs", + ".git", + "_build", + "build", + "dist", + "htmlcov", + "vulture.egg-info", + ".cache", + ".coverage", + ".pytest_cache", + ".tox", + ".venv", + ".vscode", +] -[tool.black] +# Same as Black. line-length = 79 -include = '\.pyi?$' -exclude = ''' -/( - \.eggs - | \.git - | \.tox - | \.venv - | _build - | build - | dist -)/ -''' +indent-width = 4 + +target-version = "py38" + +[tool.ruff.lint] +# ruff enables Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. +select = [ + "F", # pyflakes + "E4", "E7", "E9", # pycodestyle + "B", # flake8-bugbear + "C4", # comprehensions + "UP", # pyupgrade +] +ignore = [ + "C408", # unnecessary dict call +] + +# Allow fix for all enabled rules (when `--fix`) is provided. +fixable = ["ALL"] +unfixable = [] + +# Allow unused variables when underscore-prefixed. +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" + +[tool.ruff.lint.per-file-ignores] +"vulture/whitelists/*.py" = ["B018"] + +[tool.ruff.format] +# Like Black, use double quotes for strings. +quote-style = "double" + +# Like Black, indent with spaces, rather than tabs. +indent-style = "space" + +# Like Black, respect magic trailing commas. +skip-magic-trailing-comma = false + +# Like Black, automatically detect the appropriate line ending. +line-ending = "auto" + +# Enable auto-formatting of code examples in docstrings. Markdown, +# reStructuredText code/literal blocks and doctests are all supported. +# +# This is currently disabled by default, but it is planned for this +# to be opt-out in the future. +docstring-code-format = false + +# Set the line length limit used when formatting code snippets in +# docstrings. +# +# This only has an effect when the `docstring-code-format` setting is +# enabled. +docstring-code-line-length = "dynamic" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/setup.py new/vulture-2.13/setup.py --- old/vulture-2.11/setup.py 2024-01-06 19:50:45.000000000 +0100 +++ new/vulture-2.13/setup.py 2024-10-01 20:55:45.000000000 +0200 @@ -46,6 +46,7 @@ "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 :: Quality Assurance", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/tests/__init__.py new/vulture-2.13/tests/__init__.py --- old/vulture-2.11/tests/__init__.py 2020-10-07 20:21:41.000000000 +0200 +++ new/vulture-2.13/tests/__init__.py 2024-10-01 20:55:45.000000000 +0200 @@ -8,7 +8,10 @@ REPO = pathlib.Path(__file__).resolve().parents[1] WHITELISTS = [ - str(path) for path in (REPO / "vulture" / "whitelists").glob("*.py") + str(path) + for path in (REPO / "vulture" / "whitelists").glob("*.py") + # Pint is incompatible with Python 3.13 (https://github.com/hgrecco/pint/issues/1969). + if sys.version_info < (3, 13) or path.name != "pint_whitelist.py" ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/tests/test_config.py new/vulture-2.13/tests/test_config.py --- old/vulture-2.11/tests/test_config.py 2024-01-01 14:13:18.000000000 +0100 +++ new/vulture-2.13/tests/test_config.py 2024-05-05 17:46:56.000000000 +0200 @@ -3,6 +3,7 @@ """ from io import BytesIO +import pathlib from textwrap import dedent import pytest @@ -33,6 +34,7 @@ exclude=["file*.py", "dir/"], ignore_decorators=["deco1", "deco2"], ignore_names=["name1", "name2"], + config="pyproject.toml", make_whitelist=True, min_confidence=10, sort_by_size=True, @@ -164,6 +166,7 @@ exclude=["cli_exclude"], ignore_decorators=["cli_deco"], ignore_names=["cli_name"], + config="pyproject.toml", make_whitelist=True, min_confidence=20, sort_by_size=True, @@ -172,6 +175,23 @@ assert result == expected +def test_toml_config_custom_path(): + """ + Ensure that TOML pyproject.toml files can be read from a custom path, + other than the current working directory. + + Test file is in tests/toml/mock_pyproject.toml + """ + here = pathlib.Path(__file__).parent + tomlfile_path = here.joinpath("toml", "mock_pyproject.toml") + cliargs = [ + f"--config={tomlfile_path}", + "cli_path", + ] + result = make_config(cliargs) + assert result["ignore_names"] == ["name_from_toml_file"] + + def test_config_merging_missing(): """ If we have set a boolean value in the TOML file, but not on the CLI, we diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/tests/toml/mock_pyproject.toml new/vulture-2.13/tests/toml/mock_pyproject.toml --- old/vulture-2.11/tests/toml/mock_pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/vulture-2.13/tests/toml/mock_pyproject.toml 2024-05-05 17:46:56.000000000 +0200 @@ -0,0 +1,5 @@ +# This file exists for the test case: test_config::test_toml_config_custom_path + +[tool.vulture] +verbose = true +ignore_names = ["name_from_toml_file"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/tox.ini new/vulture-2.13/tox.ini --- old/vulture-2.11/tox.ini 2024-01-01 14:13:18.000000000 +0100 +++ new/vulture-2.13/tox.ini 2024-10-01 20:55:45.000000000 +0200 @@ -1,20 +1,20 @@ [tox] -envlist = cleanup, py{38,310,311,312}, style # Skip py39 since it chokes on distutils. +envlist = cleanup, py{38,310,311,312,313}, style # Skip py39 since it chokes on distutils. skip_missing_interpreters = true # Erase old coverage results, then accumulate them during this tox run. [testenv:cleanup] deps = - coverage==7.0.5 + coverage commands = coverage erase [testenv] deps = - coverage==7.0.5 + coverage pint # Use latest version to catch API changes. - pytest==7.4.2 - pytest-cov==4.0.0 + pytest + pytest-cov commands = pytest {posargs} # Install package as wheel in all envs (https://hynek.me/articles/turbo-charge-tox/). @@ -25,32 +25,3 @@ filterwarnings = error::DeprecationWarning error::PendingDeprecationWarning - -[testenv:style] -basepython = python3 -deps = - black==22.3.0 - flake8==6.1.0 - flake8-2020==1.7.0 - flake8-bugbear==23.9.16 - flake8-comprehensions==3.14.0 - pyupgrade==2.28.0 -allowlist_externals = - bash -commands = - black --check --diff . - # B028: use !r conversion flag - # C408: unnecessary dict call - flake8 --extend-ignore=B028,C408 setup.py tests/ vulture/ - bash -c "pyupgrade --py38-plus `find dev/ tests/ vulture/ -name '*.py'` setup.py" - -[testenv:fix-style] -basepython = python3 -deps = - black==22.3.0 - pyupgrade==2.28.0 -allowlist_externals = - bash -commands = - black . - bash -c "pyupgrade --py38-plus --exit-zero `find dev/ tests/ vulture/ -name '*.py'` setup.py" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/vulture/config.py new/vulture-2.13/vulture/config.py --- old/vulture-2.11/vulture/config.py 2024-01-01 14:13:18.000000000 +0100 +++ new/vulture-2.13/vulture/config.py 2024-05-05 17:46:56.000000000 +0200 @@ -14,6 +14,7 @@ #: Possible configuration options and their respective defaults DEFAULTS = { + "config": "pyproject.toml", "min_confidence": 0, "paths": [], "exclude": [], @@ -159,6 +160,12 @@ help="Sort unused functions and classes by their lines of code.", ) parser.add_argument( + "--config", + type=str, + default="pyproject.toml", + help="Path to pyproject.toml config file.", + ) + parser.add_argument( "-v", "--verbose", action="store_true", default=missing ) parser.add_argument("--version", action="version", version=version) @@ -195,7 +202,7 @@ config = _parse_toml(tomlfile) detected_toml_path = str(tomlfile) else: - toml_path = pathlib.Path("pyproject.toml").resolve() + toml_path = pathlib.Path(cli_config["config"]).resolve() if toml_path.is_file(): with open(toml_path, "rb") as fconfig: config = _parse_toml(fconfig) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/vulture/utils.py new/vulture-2.13/vulture/utils.py --- old/vulture-2.11/vulture/utils.py 2023-10-06 17:49:47.000000000 +0200 +++ new/vulture-2.13/vulture/utils.py 2024-01-19 20:47:54.000000000 +0100 @@ -108,7 +108,7 @@ with tokenize.open(filename) as f: return f.read() except (SyntaxError, UnicodeDecodeError) as err: - raise VultureInputException(err) + raise VultureInputException from err class LoggingList(list): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/vulture/version.py new/vulture-2.13/vulture/version.py --- old/vulture-2.11/vulture/version.py 2024-01-06 20:10:48.000000000 +0100 +++ new/vulture-2.13/vulture/version.py 2024-10-02 14:10:27.000000000 +0200 @@ -1 +1 @@ -__version__ = "2.11" +__version__ = "2.13" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/vulture.egg-info/PKG-INFO new/vulture-2.13/vulture.egg-info/PKG-INFO --- old/vulture-2.11/vulture.egg-info/PKG-INFO 2024-01-06 20:10:48.000000000 +0100 +++ new/vulture-2.13/vulture.egg-info/PKG-INFO 2024-10-02 14:10:27.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: vulture -Version: 2.11 +Version: 2.13 Summary: Find dead code Home-page: https://github.com/jendrikseipp/vulture Author: Jendrik Seipp @@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Quality Assurance @@ -27,6 +28,8 @@ # Vulture - Find dead code +[](https://pypi.python.org/pypi/vulture) +[](https://anaconda.org/conda-forge/vulture)  [](https://codecov.io/gh/jendrikseipp/vulture?branch=main) @@ -212,7 +215,11 @@ verbose = true ``` -## Version control integration +Vulture will automatically look for a `pyproject.toml` in the current working directory. + +To use a `pyproject.toml` in another directory, you can use the `--config path/to/pyproject.toml` flag. + +## Integrations You can use a [pre-commit](https://pre-commit.com/#install) hook to run Vulture before each commit. For this, install pre-commit and add the @@ -230,6 +237,8 @@ in your repository and specify all files that Vulture should check under `[tool.vulture] --> paths` (see above). +There's also a [GitHub Action for Vulture](https://github.com/gtkacz/vulture-action). + ## How does it work? Vulture uses the `ast` module to build abstract syntax trees for all @@ -374,7 +383,20 @@ [TODO.md](https://github.com/jendrikseipp/vulture/blob/main/TODO.md) +# 2.13 (2024-10-02) + +* Add support for Python 3.13 (Jendrik Seipp, #369). +* Add PyPI and conda-forge badges to README file (Trevor James Smith, #356). +* Include `tests/**/*.toml` in sdist (Colin Watson). + +# 2.12 (2024-09-17) + +* Use `ruff` for linting and formatting (Anh Trinh, #347, #349). +* Replace `tox` by `pre-commit` for linting and formatting (Anh Trinh, #349). +* Add `--config` flag to specify path to pyproject.toml configuration file (Glen Robertson, #352). + # 2.11 (2024-01-06) + * Switch to tomllib/tomli to support heterogeneous arrays (Sebastian Csar, #340). * Bump flake8, flake8-comprehensions and flake8-bugbear (Sebastian Csar, #341). * Provide whitelist parity for `MagicMock` and `Mock` (maxrake, #342). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vulture-2.11/vulture.egg-info/SOURCES.txt new/vulture-2.13/vulture.egg-info/SOURCES.txt --- old/vulture-2.11/vulture.egg-info/SOURCES.txt 2024-01-06 20:10:48.000000000 +0100 +++ new/vulture-2.13/vulture.egg-info/SOURCES.txt 2024-10-02 14:10:27.000000000 +0200 @@ -29,6 +29,7 @@ tests/test_sorting.py tests/test_unreachable.py tests/test_utils.py +tests/toml/mock_pyproject.toml vulture/__init__.py vulture/__main__.py vulture/config.py
