Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-importlib-metadata for
openSUSE:Factory checked in at 2023-12-09 22:49:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-importlib-metadata (Old)
and /work/SRC/openSUSE:Factory/.python-importlib-metadata.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-importlib-metadata"
Sat Dec 9 22:49:06 2023 rev:22 rq:1131745 version:7.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-importlib-metadata/python-importlib-metadata.changes
2023-07-17 19:22:55.249610358 +0200
+++
/work/SRC/openSUSE:Factory/.python-importlib-metadata.new.25432/python-importlib-metadata.changes
2023-12-09 22:49:13.070772244 +0100
@@ -1,0 +2,10 @@
+Thu Dec 7 22:49:16 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 7.0.0:
+ * Removed EntryPoint access by numeric index (tuple behavior).
+ * Added ``Distribution.origin`` supplying the
+ ``direct_url.json`` in a ``SimpleNamespace``. (#404)
+ * Added diagnose script. (#461)
+ * Added EntryPoints.__repr__ (#473)
+
+-------------------------------------------------------------------
Old:
----
importlib_metadata-6.8.0.tar.gz
New:
----
importlib_metadata-7.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-importlib-metadata.spec ++++++
--- /var/tmp/diff_new_pack.qCksTJ/_old 2023-12-09 22:49:13.794798383 +0100
+++ /var/tmp/diff_new_pack.qCksTJ/_new 2023-12-09 22:49:13.794798383 +0100
@@ -28,7 +28,7 @@
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-importlib-metadata%{psuffix}
-Version: 6.8.0
+Version: 7.0.0
Release: 0
Summary: Read metadata from Python packages
License: Apache-2.0
++++++ importlib_metadata-6.8.0.tar.gz -> importlib_metadata-7.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/.github/workflows/main.yml
new/importlib_metadata-7.0.0/.github/workflows/main.yml
--- old/importlib_metadata-6.8.0/.github/workflows/main.yml 2023-07-07
18:15:29.000000000 +0200
+++ new/importlib_metadata-7.0.0/.github/workflows/main.yml 2023-12-03
18:41:47.000000000 +0100
@@ -6,35 +6,17 @@
contents: read
env:
- # Environment variables to support color support (jaraco/skeleton#66):
- # Request colored output from CLI tools supporting it. Different tools
- # interpret the value differently. For some, just being set is sufficient.
- # For others, it must be a non-zero integer. For yet others, being set
- # to a non-empty value is sufficient. For tox, it must be one of
- # <blank>, 0, 1, false, no, off, on, true, yes. The only enabling value
- # in common is "1".
+ # Environment variable to support color support (jaraco/skeleton#66)
FORCE_COLOR: 1
- # MyPy's color enforcement (must be a non-zero number)
- MYPY_FORCE_COLOR: -42
- # Recognized by the `py` package, dependency of `pytest` (must be "1")
- PY_COLORS: 1
- # Make tox-wrapped tools see color requests
- TOX_TESTENV_PASSENV: >-
- FORCE_COLOR
- MYPY_FORCE_COLOR
- NO_COLOR
- PY_COLORS
- PYTEST_THEME
- PYTEST_THEME_MODE
# Suppress noisy pip warnings
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
PIP_NO_PYTHON_VERSION_WARNING: 'true'
PIP_NO_WARN_SCRIPT_LOCATION: 'true'
- # Disable the spinner, noise in GHA; TODO(webknjaz): Fix this upstream
- # Must be "1".
- TOX_PARALLEL_NO_SPINNER: 1
+ # Ensure tests can sense settings about the environment
+ TOX_OVERRIDE: >-
+ testenv.pass_env+=GITHUB_*,FORCE_COLOR
jobs:
@@ -54,48 +36,47 @@
platform: ubuntu-latest
- python: "3.10"
platform: ubuntu-latest
- # disabled for #463
- # - python: pypy3.9
- # platform: ubuntu-latest
+ - python: pypy3.10
+ platform: ubuntu-latest
runs-on: ${{ matrix.platform }}
- continue-on-error: ${{ matrix.python == '3.12' }}
+ continue-on-error: ${{ matrix.python == '3.13' }}
steps:
- - uses: actions/checkout@v3
- with:
- # fetch all branches and tags (to get tags for versioning)
- # ref actions/checkout#448
- fetch-depth: 0
+ - uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Install tox
- run: |
- python -m pip install tox
- - name: Run tests
+ run: python -m pip install tox
+ - name: Run
run: tox
- docs:
+ collateral:
+ strategy:
+ fail-fast: false
+ matrix:
+ job: [diffcov, docs]
runs-on: ubuntu-latest
- env:
- TOXENV: docs
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
+ with:
+ python-version: 3.x
- name: Install tox
- run: |
- python -m pip install tox
- - name: Run tests
- run: tox
+ run: python -m pip install tox
+ - name: Eval ${{ matrix.job }}
+ run: tox -e ${{ matrix.job }}
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- test
- - docs
+ - collateral
runs-on: ubuntu-latest
@@ -104,24 +85,6 @@
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
-
- diffcov:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- fetch-depth: 0
- - name: Setup Python
- uses: actions/setup-python@v2
- with:
- python-version: 3.9
- - name: Install tox
- run: |
- python -m pip install tox
- - name: Evaluate coverage
- run: tox
- env:
- TOXENV: diffcov
release:
permissions:
@@ -132,15 +95,14 @@
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install tox
- run: |
- python -m pip install tox
- - name: Release
+ run: python -m pip install tox
+ - name: Run
run: tox -e release
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/NEWS.rst
new/importlib_metadata-7.0.0/NEWS.rst
--- old/importlib_metadata-6.8.0/NEWS.rst 2023-07-07 18:15:29.000000000
+0200
+++ new/importlib_metadata-7.0.0/NEWS.rst 2023-12-03 18:41:47.000000000
+0100
@@ -1,3 +1,39 @@
+v7.0.0
+======
+
+Deprecations and Removals
+-------------------------
+
+- Removed EntryPoint access by numeric index (tuple behavior).
+
+
+v6.11.0
+=======
+
+Features
+--------
+
+- Added ``Distribution.origin`` supplying the ``direct_url.json`` in a
``SimpleNamespace``. (#404)
+
+
+v6.10.0
+=======
+
+Features
+--------
+
+- Added diagnose script. (#461)
+
+
+v6.9.0
+======
+
+Features
+--------
+
+- Added EntryPoints.__repr__ (#473)
+
+
v6.8.0
======
@@ -131,6 +167,10 @@
duplicate entry points by packages varying only by non-normalized
name are hidden.
+Note (#459): This change had a backward-incompatible effect for
+any installers that created metadata in the filesystem with dashes
+in the package names (not replaced by underscores).
+
v4.11.3
=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/PKG-INFO
new/importlib_metadata-7.0.0/PKG-INFO
--- old/importlib_metadata-6.8.0/PKG-INFO 2023-07-07 18:15:52.238363000
+0200
+++ new/importlib_metadata-7.0.0/PKG-INFO 2023-12-03 18:42:06.648407700
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: importlib_metadata
-Version: 6.8.0
+Version: 7.0.0
Summary: Read metadata from Python packages
Home-page: https://github.com/python/importlib_metadata
Author: Jason R. Coombs
@@ -11,10 +11,32 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
+License-File: LICENSE
+Requires-Dist: zipp>=0.5
+Requires-Dist: typing-extensions>=3.6.4; python_version < "3.8"
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-enabler>=2.2; extra == "testing"
+Requires-Dist: pytest-ruff; extra == "testing"
+Requires-Dist: importlib_resources>=1.3; python_version < "3.9" and extra ==
"testing"
+Requires-Dist: packaging; extra == "testing"
+Requires-Dist: pyfakefs; extra == "testing"
+Requires-Dist: flufl.flake8; extra == "testing"
+Requires-Dist: pytest-perf>=0.9.2; extra == "testing"
Provides-Extra: docs
+Requires-Dist: sphinx>=3.5; extra == "docs"
+Requires-Dist: sphinx<7.2.5; extra == "docs"
+Requires-Dist: jaraco.packaging>=9.3; extra == "docs"
+Requires-Dist: rst.linker>=1.9; extra == "docs"
+Requires-Dist: furo; extra == "docs"
+Requires-Dist: sphinx-lint; extra == "docs"
+Requires-Dist: jaraco.tidelift>=1.4; extra == "docs"
Provides-Extra: perf
-License-File: LICENSE
+Requires-Dist: ipython; extra == "perf"
.. image:: https://img.shields.io/pypi/v/importlib_metadata.svg
:target: https://pypi.org/project/importlib_metadata
@@ -108,10 +130,3 @@
This project and the maintainers of thousands of other packages are working
with Tidelift to deliver one enterprise subscription that covers all of the
open source you use.
`Learn more
<https://tidelift.com/subscription/pkg/pypi-importlib-metadata?utm_source=pypi-importlib-metadata&utm_medium=referral&utm_campaign=github>`_.
-
-Security Contact
-================
-
-To report a security vulnerability, please use the
-`Tidelift security contact <https://tidelift.com/security>`_.
-Tidelift will coordinate the fix and disclosure.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/README.rst
new/importlib_metadata-7.0.0/README.rst
--- old/importlib_metadata-6.8.0/README.rst 2023-07-07 18:15:29.000000000
+0200
+++ new/importlib_metadata-7.0.0/README.rst 2023-12-03 18:41:47.000000000
+0100
@@ -90,10 +90,3 @@
This project and the maintainers of thousands of other packages are working
with Tidelift to deliver one enterprise subscription that covers all of the
open source you use.
`Learn more
<https://tidelift.com/subscription/pkg/pypi-importlib-metadata?utm_source=pypi-importlib-metadata&utm_medium=referral&utm_campaign=github>`_.
-
-Security Contact
-================
-
-To report a security vulnerability, please use the
-`Tidelift security contact <https://tidelift.com/security>`_.
-Tidelift will coordinate the fix and disclosure.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/SECURITY.md
new/importlib_metadata-7.0.0/SECURITY.md
--- old/importlib_metadata-6.8.0/SECURITY.md 1970-01-01 01:00:00.000000000
+0100
+++ new/importlib_metadata-7.0.0/SECURITY.md 2023-12-03 18:41:47.000000000
+0100
@@ -0,0 +1,3 @@
+# Security Contact
+
+To report a security vulnerability, please use the [Tidelift security
contact](https://tidelift.com/security). Tidelift will coordinate the fix and
disclosure.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/docs/index.rst
new/importlib_metadata-7.0.0/docs/index.rst
--- old/importlib_metadata-6.8.0/docs/index.rst 2023-07-07 18:15:29.000000000
+0200
+++ new/importlib_metadata-7.0.0/docs/index.rst 2023-12-03 18:41:47.000000000
+0100
@@ -1,6 +1,10 @@
Welcome to |project| documentation!
===================================
+.. sidebar-links::
+ :home:
+ :pypi:
+
``importlib_metadata`` supplies a backport of :mod:`importlib.metadata`,
enabling early access to features of future Python versions and making
functionality available for older Python versions. Users are encouraged to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/importlib_metadata-6.8.0/importlib_metadata/__init__.py
new/importlib_metadata-7.0.0/importlib_metadata/__init__.py
--- old/importlib_metadata-6.8.0/importlib_metadata/__init__.py 2023-07-07
18:15:29.000000000 +0200
+++ new/importlib_metadata-7.0.0/importlib_metadata/__init__.py 2023-12-03
18:41:47.000000000 +0100
@@ -3,8 +3,10 @@
import abc
import csv
import sys
+import json
import zipp
import email
+import types
import inspect
import pathlib
import operator
@@ -21,7 +23,6 @@
NullFinder,
StrPath,
install,
- pypy_partial,
)
from ._functools import method_cache, pass_none
from ._itertools import always_iterable, unique_everseen
@@ -126,34 +127,7 @@
return line and not line.startswith('#')
-class DeprecatedTuple:
- """
- Provide subscript item access for backward compatibility.
-
- >>> recwarn = getfixture('recwarn')
- >>> ep = EntryPoint(name='name', value='value', group='group')
- >>> ep[:]
- ('name', 'value', 'group')
- >>> ep[0]
- 'name'
- >>> len(recwarn)
- 1
- """
-
- # Do not remove prior to 2023-05-01 or Python 3.13
- _warn = functools.partial(
- warnings.warn,
- "EntryPoint tuple interface is deprecated. Access members by name.",
- DeprecationWarning,
- stacklevel=pypy_partial(2),
- )
-
- def __getitem__(self, item):
- self._warn()
- return self._key()[item]
-
-
-class EntryPoint(DeprecatedTuple):
+class EntryPoint:
"""An entry point as defined by Python packaging conventions.
See `the packaging docs on entry points
@@ -293,6 +267,13 @@
except StopIteration:
raise KeyError(name)
+ def __repr__(self):
+ """
+ Repr with classname and tuple constructor to
+ signal that we deviate from regular tuple behavior.
+ """
+ return '%s(%r)' % (self.__class__.__name__, tuple(self))
+
def select(self, **params):
"""
Select entry points from self that match the
@@ -618,6 +599,16 @@
space = url_req_space(section.value)
yield section.value + space + quoted_marker(section.name)
+ @property
+ def origin(self):
+ return self._load_json('direct_url.json')
+
+ def _load_json(self, filename):
+ return pass_none(json.loads)(
+ self.read_text(filename),
+ object_hook=lambda data: types.SimpleNamespace(**data),
+ )
+
class DistributionFinder(MetaPathFinder):
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/importlib_metadata-6.8.0/importlib_metadata/_adapters.py
new/importlib_metadata-7.0.0/importlib_metadata/_adapters.py
--- old/importlib_metadata-6.8.0/importlib_metadata/_adapters.py
2023-07-07 18:15:29.000000000 +0200
+++ new/importlib_metadata-7.0.0/importlib_metadata/_adapters.py
2023-12-03 18:41:47.000000000 +0100
@@ -54,7 +54,7 @@
def __getitem__(self, item):
"""
Warn users that a ``KeyError`` can be expected when a
- mising key is supplied. Ref python/importlib_metadata#371.
+ missing key is supplied. Ref python/importlib_metadata#371.
"""
res = super().__getitem__(item)
if res is None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/importlib_metadata-6.8.0/importlib_metadata/diagnose.py
new/importlib_metadata-7.0.0/importlib_metadata/diagnose.py
--- old/importlib_metadata-6.8.0/importlib_metadata/diagnose.py 1970-01-01
01:00:00.000000000 +0100
+++ new/importlib_metadata-7.0.0/importlib_metadata/diagnose.py 2023-12-03
18:41:47.000000000 +0100
@@ -0,0 +1,21 @@
+import sys
+
+from . import Distribution
+
+
+def inspect(path):
+ print("Inspecting", path)
+ dists = list(Distribution.discover(path=[path]))
+ if not dists:
+ return
+ print("Found", len(dists), "packages:", end=' ')
+ print(', '.join(dist.name for dist in dists))
+
+
+def run():
+ for path in sys.path:
+ inspect(path)
+
+
+if __name__ == '__main__':
+ run()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/importlib_metadata-6.8.0/importlib_metadata.egg-info/PKG-INFO
new/importlib_metadata-7.0.0/importlib_metadata.egg-info/PKG-INFO
--- old/importlib_metadata-6.8.0/importlib_metadata.egg-info/PKG-INFO
2023-07-07 18:15:52.000000000 +0200
+++ new/importlib_metadata-7.0.0/importlib_metadata.egg-info/PKG-INFO
2023-12-03 18:42:06.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: importlib-metadata
-Version: 6.8.0
+Version: 7.0.0
Summary: Read metadata from Python packages
Home-page: https://github.com/python/importlib_metadata
Author: Jason R. Coombs
@@ -11,10 +11,32 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
+License-File: LICENSE
+Requires-Dist: zipp>=0.5
+Requires-Dist: typing-extensions>=3.6.4; python_version < "3.8"
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-enabler>=2.2; extra == "testing"
+Requires-Dist: pytest-ruff; extra == "testing"
+Requires-Dist: importlib_resources>=1.3; python_version < "3.9" and extra ==
"testing"
+Requires-Dist: packaging; extra == "testing"
+Requires-Dist: pyfakefs; extra == "testing"
+Requires-Dist: flufl.flake8; extra == "testing"
+Requires-Dist: pytest-perf>=0.9.2; extra == "testing"
Provides-Extra: docs
+Requires-Dist: sphinx>=3.5; extra == "docs"
+Requires-Dist: sphinx<7.2.5; extra == "docs"
+Requires-Dist: jaraco.packaging>=9.3; extra == "docs"
+Requires-Dist: rst.linker>=1.9; extra == "docs"
+Requires-Dist: furo; extra == "docs"
+Requires-Dist: sphinx-lint; extra == "docs"
+Requires-Dist: jaraco.tidelift>=1.4; extra == "docs"
Provides-Extra: perf
-License-File: LICENSE
+Requires-Dist: ipython; extra == "perf"
.. image:: https://img.shields.io/pypi/v/importlib_metadata.svg
:target: https://pypi.org/project/importlib_metadata
@@ -108,10 +130,3 @@
This project and the maintainers of thousands of other packages are working
with Tidelift to deliver one enterprise subscription that covers all of the
open source you use.
`Learn more
<https://tidelift.com/subscription/pkg/pypi-importlib-metadata?utm_source=pypi-importlib-metadata&utm_medium=referral&utm_campaign=github>`_.
-
-Security Contact
-================
-
-To report a security vulnerability, please use the
-`Tidelift security contact <https://tidelift.com/security>`_.
-Tidelift will coordinate the fix and disclosure.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/importlib_metadata-6.8.0/importlib_metadata.egg-info/SOURCES.txt
new/importlib_metadata-7.0.0/importlib_metadata.egg-info/SOURCES.txt
--- old/importlib_metadata-6.8.0/importlib_metadata.egg-info/SOURCES.txt
2023-07-07 18:15:52.000000000 +0200
+++ new/importlib_metadata-7.0.0/importlib_metadata.egg-info/SOURCES.txt
2023-12-03 18:42:06.000000000 +0100
@@ -6,6 +6,7 @@
LICENSE
NEWS.rst
README.rst
+SECURITY.md
conftest.py
exercises.py
mypy.ini
@@ -33,6 +34,7 @@
importlib_metadata/_meta.py
importlib_metadata/_py39compat.py
importlib_metadata/_text.py
+importlib_metadata/diagnose.py
importlib_metadata/py.typed
importlib_metadata.egg-info/PKG-INFO
importlib_metadata.egg-info/SOURCES.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/importlib_metadata-6.8.0/importlib_metadata.egg-info/requires.txt
new/importlib_metadata-7.0.0/importlib_metadata.egg-info/requires.txt
--- old/importlib_metadata-6.8.0/importlib_metadata.egg-info/requires.txt
2023-07-07 18:15:52.000000000 +0200
+++ new/importlib_metadata-7.0.0/importlib_metadata.egg-info/requires.txt
2023-12-03 18:42:06.000000000 +0100
@@ -5,7 +5,8 @@
[docs]
sphinx>=3.5
-jaraco.packaging>=9
+sphinx<7.2.5
+jaraco.packaging>=9.3
rst.linker>=1.9
furo
sphinx-lint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/pytest.ini
new/importlib_metadata-7.0.0/pytest.ini
--- old/importlib_metadata-6.8.0/pytest.ini 2023-07-07 18:15:29.000000000
+0200
+++ new/importlib_metadata-7.0.0/pytest.ini 2023-12-03 18:41:47.000000000
+0100
@@ -24,4 +24,7 @@
# pypa/build#615
ignore:'encoding' argument not specified::build.env
+ # dateutil/dateutil#1284
+
ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:dateutil.tz.tz
+
## end upstream
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/setup.cfg
new/importlib_metadata-7.0.0/setup.cfg
--- old/importlib_metadata-6.8.0/setup.cfg 2023-07-07 18:15:52.238363000
+0200
+++ new/importlib_metadata-7.0.0/setup.cfg 2023-12-03 18:42:06.652407600
+0100
@@ -47,7 +47,8 @@
pytest-perf >= 0.9.2
docs =
sphinx >= 3.5
- jaraco.packaging >= 9
+ sphinx < 7.2.5
+ jaraco.packaging >= 9.3
rst.linker >= 1.9
furo
sphinx-lint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/tests/fixtures.py
new/importlib_metadata-7.0.0/tests/fixtures.py
--- old/importlib_metadata-6.8.0/tests/fixtures.py 2023-07-07
18:15:29.000000000 +0200
+++ new/importlib_metadata-7.0.0/tests/fixtures.py 2023-12-03
18:41:47.000000000 +0100
@@ -1,6 +1,7 @@
import os
import sys
import copy
+import json
import shutil
import pathlib
import tempfile
@@ -85,7 +86,15 @@
self.fixtures.enter_context(self.add_sys_path(self.site_dir))
-class DistInfoPkg(OnSysPath, SiteDir):
+class SiteBuilder(SiteDir):
+ def setUp(self):
+ super().setUp()
+ for cls in self.__class__.mro():
+ with contextlib.suppress(AttributeError):
+ build_files(cls.files, prefix=self.site_dir)
+
+
+class DistInfoPkg(OnSysPath, SiteBuilder):
files: FilesSpec = {
"distinfo_pkg-1.0.0.dist-info": {
"METADATA": """
@@ -112,10 +121,6 @@
""",
}
- def setUp(self):
- super().setUp()
- build_files(DistInfoPkg.files, self.site_dir)
-
def make_uppercase(self):
"""
Rewrite metadata with everything uppercase.
@@ -127,7 +132,28 @@
build_files(files, self.site_dir)
-class DistInfoPkgWithDot(OnSysPath, SiteDir):
+class DistInfoPkgEditable(DistInfoPkg):
+ """
+ Package with a PEP 660 direct_url.json.
+ """
+
+ some_hash =
'524127ce937f7cb65665130c695abd18ca386f60bb29687efb976faa1596fdcc'
+ files: FilesSpec = {
+ 'distinfo_pkg-1.0.0.dist-info': {
+ 'direct_url.json': json.dumps(
+ {
+ "archive_info": {
+ "hash": f"sha256={some_hash}",
+ "hashes": {"sha256": f"{some_hash}"},
+ },
+ "url":
"file:///path/to/distinfo_pkg-1.0.0.editable-py3-none-any.whl",
+ }
+ )
+ },
+ }
+
+
+class DistInfoPkgWithDot(OnSysPath, SiteBuilder):
files: FilesSpec = {
"pkg_dot-1.0.0.dist-info": {
"METADATA": """
@@ -137,12 +163,8 @@
},
}
- def setUp(self):
- super().setUp()
- build_files(DistInfoPkgWithDot.files, self.site_dir)
-
-class DistInfoPkgWithDotLegacy(OnSysPath, SiteDir):
+class DistInfoPkgWithDotLegacy(OnSysPath, SiteBuilder):
files: FilesSpec = {
"pkg.dot-1.0.0.dist-info": {
"METADATA": """
@@ -158,18 +180,12 @@
},
}
- def setUp(self):
- super().setUp()
- build_files(DistInfoPkgWithDotLegacy.files, self.site_dir)
-
-class DistInfoPkgOffPath(SiteDir):
- def setUp(self):
- super().setUp()
- build_files(DistInfoPkg.files, self.site_dir)
+class DistInfoPkgOffPath(SiteBuilder):
+ files = DistInfoPkg.files
-class EggInfoPkg(OnSysPath, SiteDir):
+class EggInfoPkg(OnSysPath, SiteBuilder):
files: FilesSpec = {
"egginfo_pkg.egg-info": {
"PKG-INFO": """
@@ -204,12 +220,8 @@
""",
}
- def setUp(self):
- super().setUp()
- build_files(EggInfoPkg.files, prefix=self.site_dir)
-
-class EggInfoPkgPipInstalledNoToplevel(OnSysPath, SiteDir):
+class EggInfoPkgPipInstalledNoToplevel(OnSysPath, SiteBuilder):
files: FilesSpec = {
"egg_with_module_pkg.egg-info": {
"PKG-INFO": "Name: egg_with_module-pkg",
@@ -239,12 +251,8 @@
""",
}
- def setUp(self):
- super().setUp()
- build_files(EggInfoPkgPipInstalledNoToplevel.files,
prefix=self.site_dir)
-
-class EggInfoPkgPipInstalledNoModules(OnSysPath, SiteDir):
+class EggInfoPkgPipInstalledNoModules(OnSysPath, SiteBuilder):
files: FilesSpec = {
"egg_with_no_modules_pkg.egg-info": {
"PKG-INFO": "Name: egg_with_no_modules-pkg",
@@ -269,12 +277,8 @@
},
}
- def setUp(self):
- super().setUp()
- build_files(EggInfoPkgPipInstalledNoModules.files,
prefix=self.site_dir)
-
-class EggInfoPkgSourcesFallback(OnSysPath, SiteDir):
+class EggInfoPkgSourcesFallback(OnSysPath, SiteBuilder):
files: FilesSpec = {
"sources_fallback_pkg.egg-info": {
"PKG-INFO": "Name: sources_fallback-pkg",
@@ -295,12 +299,8 @@
""",
}
- def setUp(self):
- super().setUp()
- build_files(EggInfoPkgSourcesFallback.files, prefix=self.site_dir)
-
-class EggInfoFile(OnSysPath, SiteDir):
+class EggInfoFile(OnSysPath, SiteBuilder):
files: FilesSpec = {
"egginfo_file.egg-info": """
Metadata-Version: 1.0
@@ -316,10 +316,6 @@
""",
}
- def setUp(self):
- super().setUp()
- build_files(EggInfoFile.files, prefix=self.site_dir)
-
# dedent all text strings before writing
orig = _path.create.registry[str]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/tests/test_main.py
new/importlib_metadata-7.0.0/tests/test_main.py
--- old/importlib_metadata-6.8.0/tests/test_main.py 2023-07-07
18:15:29.000000000 +0200
+++ new/importlib_metadata-7.0.0/tests/test_main.py 2023-12-03
18:41:47.000000000 +0100
@@ -400,7 +400,7 @@
assert not any(name.endswith('.dist-info') for name in distributions)
- def test_packages_distributions_symlinked_top_level(self):
+ def test_packages_distributions_symlinked_top_level(self) -> None:
"""
Distribution is resolvable from a simple top-level symlink in RECORD.
See #452.
@@ -457,3 +457,10 @@
# sources_fallback-pkg has one import ('sources_fallback') inferred
from
# SOURCES.txt (top_level.txt and installed-files.txt is missing)
assert import_names_from_package('sources_fallback-pkg') ==
{'sources_fallback'}
+
+
+class EditableDistributionTest(fixtures.DistInfoPkgEditable,
unittest.TestCase):
+ def test_origin(self):
+ dist = Distribution.from_name('distinfo-pkg')
+ assert dist.origin.url.endswith('.whl')
+ assert dist.origin.archive_info.hashes.sha256
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/importlib_metadata-6.8.0/tox.ini
new/importlib_metadata-7.0.0/tox.ini
--- old/importlib_metadata-6.8.0/tox.ini 2023-07-07 18:15:29.000000000
+0200
+++ new/importlib_metadata-7.0.0/tox.ini 2023-12-03 18:41:47.000000000
+0100
@@ -1,8 +1,5 @@
-[tox]
-toxworkdir={env:TOX_WORK_DIR:.tox}
-
-
[testenv]
+description = perform primary checks (tests, style, types, coverage)
deps =
setenv =
PYTHONWARNDEFAULTENCODING = 1
@@ -14,41 +11,46 @@
extras =
testing
+[testenv:diffcov]
+description = run tests and check that diff from main is covered
+deps =
+ diff-cover
+commands =
+ pytest {posargs} --cov-report xml
+ diff-cover coverage.xml --compare-branch=origin/main --html-report
diffcov.html
+ diff-cover coverage.xml --compare-branch=origin/main --fail-under=100
[testenv:docs]
+description = build the documentation
extras =
docs
testing
changedir = docs
commands =
python -m sphinx -W --keep-going . {toxinidir}/build/html
- python -m sphinxlint
-
-[testenv:diffcov]
-deps =
- diff-cover
-commands =
- pytest {posargs} --cov-report xml
- diff-cover coverage.xml --compare-branch=origin/main --html-report
diffcov.html
- diff-cover coverage.xml --compare-branch=origin/main --fail-under=100
+ python -m sphinxlint \
+ # workaround for sphinx-contrib/sphinx-lint#83
+ --jobs 1
[testenv:finalize]
+description = assemble changelog and tag a release
skip_install = True
deps =
towncrier
jaraco.develop >= 7.23
-passenv = *
+pass_env = *
commands =
python -m jaraco.develop.finalize
[testenv:release]
+description = publish the package to PyPI and GitHub
skip_install = True
deps =
build
twine>=3
jaraco.develop>=7.1
-passenv =
+pass_env =
TWINE_PASSWORD
GITHUB_TOKEN
setenv =