Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-path for openSUSE:Factory checked in at 2024-02-15 20:59:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-path (Old) and /work/SRC/openSUSE:Factory/.python-path.new.1815 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-path" Thu Feb 15 20:59:29 2024 rev:8 rq:1146655 version:16.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-path/python-path.changes 2024-01-05 22:58:49.400592341 +0100 +++ /work/SRC/openSUSE:Factory/.python-path.new.1815/python-path.changes 2024-02-15 20:59:55.835002269 +0100 @@ -1,0 +2,7 @@ +Wed Feb 7 20:16:20 UTC 2024 - Dirk Müller <dmuel...@suse.com> + +- update to 16.10.0: + * Added .with_name and .with_stem. + * Prefer .suffix to .ext and deprecate .ext. + +------------------------------------------------------------------- Old: ---- path-16.9.0.tar.gz New: ---- path-16.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-path.spec ++++++ --- /var/tmp/diff_new_pack.jnnEFD/_old 2024-02-15 20:59:56.871038682 +0100 +++ /var/tmp/diff_new_pack.jnnEFD/_new 2024-02-15 20:59:56.879038964 +0100 @@ -1,5 +1,5 @@ # -# spec file +# spec file for package python-path # # Copyright (c) 2024 SUSE LLC # @@ -27,7 +27,7 @@ %define modname path %{?sle15_python_module_pythons} Name: python-path%{psuffix} -Version: 16.9.0 +Version: 16.10.0 Release: 0 Summary: A module wrapper for os.path License: MIT ++++++ path-16.9.0.tar.gz -> path-16.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/.github/workflows/main.yml new/path-16.10.0/.github/workflows/main.yml --- old/path-16.9.0/.github/workflows/main.yml 2023-12-04 21:29:16.000000000 +0100 +++ new/path-16.10.0/.github/workflows/main.yml 2024-02-04 04:58:06.000000000 +0100 @@ -1,6 +1,12 @@ name: tests -on: [push, pull_request] +on: + merge_group: + push: + branches-ignore: + # disabled for jaraco/skeleton#103 + # - gh-readonly-queue/** # Temporary merge queue-related GH-made branches + pull_request: permissions: contents: read @@ -56,7 +62,9 @@ strategy: fail-fast: false matrix: - job: [diffcov, docs] + job: + - diffcov + - docs runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/.pre-commit-config.yaml new/path-16.10.0/.pre-commit-config.yaml --- old/path-16.9.0/.pre-commit-config.yaml 2023-12-04 21:29:16.000000000 +0100 +++ new/path-16.10.0/.pre-commit-config.yaml 2024-02-04 04:58:06.000000000 +0100 @@ -1,5 +1,6 @@ repos: -- repo: https://github.com/psf/black - rev: 22.6.0 +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.8 hooks: - - id: black + - id: ruff + - id: ruff-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/NEWS.rst new/path-16.10.0/NEWS.rst --- old/path-16.9.0/NEWS.rst 2023-12-04 21:29:16.000000000 +0100 +++ new/path-16.10.0/NEWS.rst 2024-02-04 04:58:06.000000000 +0100 @@ -1,10 +1,20 @@ +v16.10.0 +======== + +Features +-------- + +- Added .with_name and .with_stem. +- Prefer .suffix to .ext and deprecate .ext. + + v16.9.0 ======= Features -------- -- Added Path.iterdir() and deprecated Path.listdir(). Ref #214. (#214) +- Added ``.iterdir()`` and deprecated ``.listdir()``. (#214) v16.8.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/PKG-INFO new/path-16.10.0/PKG-INFO --- old/path-16.9.0/PKG-INFO 2023-12-04 21:29:35.268139400 +0100 +++ new/path-16.10.0/PKG-INFO 2024-02-04 04:58:31.101732500 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: path -Version: 16.9.0 +Version: 16.10.0 Summary: A module wrapper for os.path Home-page: https://github.com/jaraco/path Author: Jason Orendorff @@ -19,11 +19,10 @@ Provides-Extra: testing Requires-Dist: pytest>=6; extra == "testing" Requires-Dist: pytest-checkdocs>=2.4; extra == "testing" -Requires-Dist: pytest-black>=0.3.7; platform_python_implementation != "PyPy" and extra == "testing" Requires-Dist: pytest-cov; extra == "testing" -Requires-Dist: pytest-mypy>=0.9.1; platform_python_implementation != "PyPy" and extra == "testing" +Requires-Dist: pytest-mypy; platform_python_implementation != "PyPy" and extra == "testing" Requires-Dist: pytest-enabler>=2.2; extra == "testing" -Requires-Dist: pytest-ruff; extra == "testing" +Requires-Dist: pytest-ruff>=0.2.1; extra == "testing" Requires-Dist: appdirs; extra == "testing" Requires-Dist: packaging; extra == "testing" Requires-Dist: pywin32; (platform_system == "Windows" and python_version < "3.12") and extra == "testing" @@ -43,7 +42,7 @@ .. image:: https://img.shields.io/pypi/pyversions/path.svg -.. image:: https://github.com/jaraco/path/workflows/tests/badge.svg +.. image:: https://github.com/jaraco/path/actions/workflows/main.yml/badge.svg :target: https://github.com/jaraco/path/actions?query=workflow%3A%22tests%22 :alt: tests @@ -51,10 +50,6 @@ :target: https://github.com/astral-sh/ruff :alt: Ruff -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - :alt: Code style: Black - .. image:: https://readthedocs.org/projects/path/badge/?version=latest :target: https://path.readthedocs.io/en/latest/?badge=latest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/README.rst new/path-16.10.0/README.rst --- old/path-16.9.0/README.rst 2023-12-04 21:29:16.000000000 +0100 +++ new/path-16.10.0/README.rst 2024-02-04 04:58:06.000000000 +0100 @@ -3,7 +3,7 @@ .. image:: https://img.shields.io/pypi/pyversions/path.svg -.. image:: https://github.com/jaraco/path/workflows/tests/badge.svg +.. image:: https://github.com/jaraco/path/actions/workflows/main.yml/badge.svg :target: https://github.com/jaraco/path/actions?query=workflow%3A%22tests%22 :alt: tests @@ -11,10 +11,6 @@ :target: https://github.com/astral-sh/ruff :alt: Ruff -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - :alt: Code style: Black - .. image:: https://readthedocs.org/projects/path/badge/?version=latest :target: https://path.readthedocs.io/en/latest/?badge=latest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/path/__init__.py new/path-16.10.0/path/__init__.py --- old/path-16.9.0/path/__init__.py 2023-12-04 21:29:16.000000000 +0100 +++ new/path-16.10.0/path/__init__.py 2024-02-04 04:58:06.000000000 +0100 @@ -52,6 +52,7 @@ from . import matchers from . import masks from . import classes +from .compat.py38 import removesuffix __all__ = ['Path', 'TempDir'] @@ -277,11 +278,28 @@ base, ext = self.module.splitext(self.name) return base + def with_stem(self, stem): + """Return a new path with the stem changed. + + >>> Path('/home/guido/python.tar.gz').with_stem("foo") + Path('/home/guido/foo.gz') + """ + return self.with_name(stem + self.suffix) + @property - def ext(self): + def suffix(self): """The file extension, for example ``'.py'``.""" - f, ext = self.module.splitext(self) - return ext + f, suffix = self.module.splitext(self) + return suffix + + @property + def ext(self): + warnings.warn( + ".ext is deprecated; use suffix", + DeprecationWarning, + stacklevel=2, + ) + return self.suffix def with_suffix(self, suffix): """Return a new path with the file suffix changed (or added, if none) @@ -338,6 +356,14 @@ """, ) + def with_name(self, name): + """Return a new path with the name changed. + + >>> Path('/home/guido/python.tar.gz').with_name("foo.zip") + Path('/home/guido/foo.zip') + """ + return self._next_class(removesuffix(self, self.name) + name) + def splitpath(self): """Return two-tuple of ``.parent``, ``.name``. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/path/compat/py38.py new/path-16.10.0/path/compat/py38.py --- old/path-16.9.0/path/compat/py38.py 1970-01-01 01:00:00.000000000 +0100 +++ new/path-16.10.0/path/compat/py38.py 2024-02-04 04:58:06.000000000 +0100 @@ -0,0 +1,13 @@ +import sys + + +if sys.version_info < (3, 9): + def removesuffix(self, suffix): + # suffix='' should not call self[:-0]. + if suffix and self.endswith(suffix): + return self[:-len(suffix)] + else: + return self[:] +else: + def removesuffix(self, suffix): + return self.removesuffix(suffix) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/path.egg-info/PKG-INFO new/path-16.10.0/path.egg-info/PKG-INFO --- old/path-16.9.0/path.egg-info/PKG-INFO 2023-12-04 21:29:35.000000000 +0100 +++ new/path-16.10.0/path.egg-info/PKG-INFO 2024-02-04 04:58:31.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: path -Version: 16.9.0 +Version: 16.10.0 Summary: A module wrapper for os.path Home-page: https://github.com/jaraco/path Author: Jason Orendorff @@ -19,11 +19,10 @@ Provides-Extra: testing Requires-Dist: pytest>=6; extra == "testing" Requires-Dist: pytest-checkdocs>=2.4; extra == "testing" -Requires-Dist: pytest-black>=0.3.7; platform_python_implementation != "PyPy" and extra == "testing" Requires-Dist: pytest-cov; extra == "testing" -Requires-Dist: pytest-mypy>=0.9.1; platform_python_implementation != "PyPy" and extra == "testing" +Requires-Dist: pytest-mypy; platform_python_implementation != "PyPy" and extra == "testing" Requires-Dist: pytest-enabler>=2.2; extra == "testing" -Requires-Dist: pytest-ruff; extra == "testing" +Requires-Dist: pytest-ruff>=0.2.1; extra == "testing" Requires-Dist: appdirs; extra == "testing" Requires-Dist: packaging; extra == "testing" Requires-Dist: pywin32; (platform_system == "Windows" and python_version < "3.12") and extra == "testing" @@ -43,7 +42,7 @@ .. image:: https://img.shields.io/pypi/pyversions/path.svg -.. image:: https://github.com/jaraco/path/workflows/tests/badge.svg +.. image:: https://github.com/jaraco/path/actions/workflows/main.yml/badge.svg :target: https://github.com/jaraco/path/actions?query=workflow%3A%22tests%22 :alt: tests @@ -51,10 +50,6 @@ :target: https://github.com/astral-sh/ruff :alt: Ruff -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - :alt: Code style: Black - .. image:: https://readthedocs.org/projects/path/badge/?version=latest :target: https://path.readthedocs.io/en/latest/?badge=latest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/path.egg-info/SOURCES.txt new/path-16.10.0/path.egg-info/SOURCES.txt --- old/path-16.9.0/path.egg-info/SOURCES.txt 2023-12-04 21:29:35.000000000 +0100 +++ new/path-16.10.0/path.egg-info/SOURCES.txt 2024-02-04 04:58:31.000000000 +0100 @@ -13,6 +13,7 @@ mypy.ini pyproject.toml pytest.ini +ruff.toml setup.cfg test_path.py towncrier.toml @@ -38,4 +39,5 @@ path.egg-info/SOURCES.txt path.egg-info/dependency_links.txt path.egg-info/requires.txt -path.egg-info/top_level.txt \ No newline at end of file +path.egg-info/top_level.txt +path/compat/py38.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/path.egg-info/requires.txt new/path-16.10.0/path.egg-info/requires.txt --- old/path-16.9.0/path.egg-info/requires.txt 2023-12-04 21:29:35.000000000 +0100 +++ new/path-16.10.0/path.egg-info/requires.txt 2024-02-04 04:58:31.000000000 +0100 @@ -13,15 +13,14 @@ pytest-checkdocs>=2.4 pytest-cov pytest-enabler>=2.2 -pytest-ruff +pytest-ruff>=0.2.1 appdirs packaging more_itertools pygments [testing:platform_python_implementation != "PyPy"] -pytest-black>=0.3.7 -pytest-mypy>=0.9.1 +pytest-mypy [testing:platform_system == "Windows" and python_version < "3.12"] pywin32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/pyproject.toml new/path-16.10.0/pyproject.toml --- old/path-16.9.0/pyproject.toml 2023-12-04 21:29:16.000000000 +0100 +++ new/path-16.10.0/pyproject.toml 2024-02-04 04:58:06.000000000 +0100 @@ -2,7 +2,4 @@ requires = ["setuptools>=56", "setuptools_scm[toml]>=3.4.1"] build-backend = "setuptools.build_meta" -[tool.black] -skip-string-normalization = true - [tool.setuptools_scm] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/pytest.ini new/path-16.10.0/pytest.ini --- old/path-16.9.0/pytest.ini 2023-12-04 21:29:16.000000000 +0100 +++ new/path-16.10.0/pytest.ini 2024-02-04 04:58:06.000000000 +0100 @@ -7,14 +7,6 @@ # Ensure ResourceWarnings are emitted default::ResourceWarning - # shopkeep/pytest-black#55 - ignore:<class 'pytest_black.BlackItem'> is not using a cooperative constructor:pytest.PytestDeprecationWarning - ignore:The \(fspath. py.path.local\) argument to BlackItem is deprecated.:pytest.PytestDeprecationWarning - ignore:BlackItem is an Item subclass and should not be a collector:pytest.PytestWarning - - # shopkeep/pytest-black#67 - ignore:'encoding' argument not specified::pytest_black - # realpython/pytest-mypy#152 ignore:'encoding' argument not specified::pytest_mypy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/ruff.toml new/path-16.10.0/ruff.toml --- old/path-16.9.0/ruff.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/path-16.10.0/ruff.toml 2024-02-04 04:58:06.000000000 +0100 @@ -0,0 +1,22 @@ +[lint] +ignore = [ + # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules + "W191", + "E111", + "E114", + "E117", + "D206", + "D300", + "Q000", + "Q001", + "Q002", + "Q003", + "COM812", + "COM819", + "ISC001", + "ISC002", +] + +[format] +# https://docs.astral.sh/ruff/settings/#format-quote-style +quote-style = "preserve" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/setup.cfg new/path-16.10.0/setup.cfg --- old/path-16.9.0/setup.cfg 2023-12-04 21:29:35.268139400 +0100 +++ new/path-16.10.0/setup.cfg 2024-02-04 04:58:31.101732500 +0100 @@ -33,13 +33,11 @@ testing = pytest >= 6 pytest-checkdocs >= 2.4 - pytest-black >= 0.3.7; \ - python_implementation != "PyPy" pytest-cov - pytest-mypy >= 0.9.1; \ + pytest-mypy; \ python_implementation != "PyPy" pytest-enabler >= 2.2 - pytest-ruff + pytest-ruff >= 0.2.1 appdirs packaging diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-16.9.0/test_path.py new/path-16.10.0/test_path.py --- old/path-16.9.0/test_path.py 2023-12-04 21:29:16.000000000 +0100 +++ new/path-16.10.0/test_path.py 2024-02-04 04:58:06.000000000 +0100 @@ -131,9 +131,9 @@ assert f.name == 'xyzzy.py' assert f.parent.name == os_choose(nt='Lib', posix='lib') - # .ext - assert f.ext == '.py' - assert f.parent.ext == '' + # .suffix + assert f.suffix == '.py' + assert f.parent.suffix == '' # .drive assert f.drive == os_choose(nt='C:', posix='')