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-28 22:54:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-importlib-metadata (Old) and /work/SRC/openSUSE:Factory/.python-importlib-metadata.new.28375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-importlib-metadata" Thu Dec 28 22:54:48 2023 rev:23 rq:1135283 version:7.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-importlib-metadata/python-importlib-metadata.changes 2023-12-09 22:49:13.070772244 +0100 +++ /work/SRC/openSUSE:Factory/.python-importlib-metadata.new.28375/python-importlib-metadata.changes 2023-12-28 22:54:55.248096633 +0100 @@ -1,0 +2,8 @@ +Wed Dec 27 10:55:48 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 7.0.1: + * Corrected the interface for SimplePath to encompass the + expectations of locate_file and PackagePath. + * Fixed type annotations to allow strings. + +------------------------------------------------------------------- Old: ---- importlib_metadata-7.0.0.tar.gz New: ---- importlib_metadata-7.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-importlib-metadata.spec ++++++ --- /var/tmp/diff_new_pack.C8iJ6A/_old 2023-12-28 22:54:56.024124963 +0100 +++ /var/tmp/diff_new_pack.C8iJ6A/_new 2023-12-28 22:54:56.024124963 +0100 @@ -28,7 +28,7 @@ %define skip_python2 1 %{?sle15_python_module_pythons} Name: python-importlib-metadata%{psuffix} -Version: 7.0.0 +Version: 7.0.1 Release: 0 Summary: Read metadata from Python packages License: Apache-2.0 ++++++ importlib_metadata-7.0.0.tar.gz -> importlib_metadata-7.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/NEWS.rst new/importlib_metadata-7.0.1/NEWS.rst --- old/importlib_metadata-7.0.0/NEWS.rst 2023-12-03 18:41:47.000000000 +0100 +++ new/importlib_metadata-7.0.1/NEWS.rst 2023-12-22 18:16:52.000000000 +0100 @@ -1,3 +1,13 @@ +v7.0.1 +====== + +Bugfixes +-------- + +- Corrected the interface for SimplePath to encompass the expectations of locate_file and PackagePath. +- Fixed type annotations to allow strings. + + v7.0.0 ====== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/PKG-INFO new/importlib_metadata-7.0.1/PKG-INFO --- old/importlib_metadata-7.0.0/PKG-INFO 2023-12-03 18:42:06.648407700 +0100 +++ new/importlib_metadata-7.0.1/PKG-INFO 2023-12-22 18:17:12.568005800 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: importlib_metadata -Version: 7.0.0 +Version: 7.0.1 Summary: Read metadata from Python packages Home-page: https://github.com/python/importlib_metadata Author: Jason R. Coombs @@ -43,7 +43,7 @@ .. image:: https://img.shields.io/pypi/pyversions/importlib_metadata.svg -.. image:: https://github.com/python/importlib_metadata/workflows/tests/badge.svg +.. image:: https://github.com/python/importlib_metadata/actions/workflows/main.yml/badge.svg :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22tests%22 :alt: tests @@ -83,6 +83,8 @@ * - importlib_metadata - stdlib + * - 7.0 + - 3.13 * - 6.5 - 3.12 * - 4.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/README.rst new/importlib_metadata-7.0.1/README.rst --- old/importlib_metadata-7.0.0/README.rst 2023-12-03 18:41:47.000000000 +0100 +++ new/importlib_metadata-7.0.1/README.rst 2023-12-22 18:16:52.000000000 +0100 @@ -3,7 +3,7 @@ .. image:: https://img.shields.io/pypi/pyversions/importlib_metadata.svg -.. image:: https://github.com/python/importlib_metadata/workflows/tests/badge.svg +.. image:: https://github.com/python/importlib_metadata/actions/workflows/main.yml/badge.svg :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22tests%22 :alt: tests @@ -43,6 +43,8 @@ * - importlib_metadata - stdlib + * - 7.0 + - 3.13 * - 6.5 - 3.12 * - 4.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/docs/api.rst new/importlib_metadata-7.0.1/docs/api.rst --- old/importlib_metadata-7.0.0/docs/api.rst 2023-12-03 18:41:47.000000000 +0100 +++ new/importlib_metadata-7.0.1/docs/api.rst 2023-12-22 18:16:52.000000000 +0100 @@ -9,3 +9,8 @@ :members: :undoc-members: :show-inheritance: + +.. automodule:: importlib_metadata._meta + :members: + :undoc-members: + :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/docs/index.rst new/importlib_metadata-7.0.1/docs/index.rst --- old/importlib_metadata-7.0.0/docs/index.rst 2023-12-03 18:41:47.000000000 +0100 +++ new/importlib_metadata-7.0.1/docs/index.rst 2023-12-22 18:16:52.000000000 +0100 @@ -9,16 +9,14 @@ enabling early access to features of future Python versions and making functionality available for older Python versions. Users are encouraged to use the Python standard library where suitable and fall back to -this library for future compatibility. Developers looking for detailed API -descriptions should refer to the standard library documentation. - -The documentation here includes a general :ref:`usage <using>` guide. +this library for future compatibility. For general usage guidance, start +with :mod:`importlib.metadata` but substitute ``importlib_metadata`` +for ``importlib.metadata``. .. toctree:: :maxdepth: 1 - using api migration history diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/docs/using.rst new/importlib_metadata-7.0.1/docs/using.rst --- old/importlib_metadata-7.0.0/docs/using.rst 2023-12-03 18:41:47.000000000 +0100 +++ new/importlib_metadata-7.0.1/docs/using.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,381 +0,0 @@ -.. _using: - -================================= - Using :mod:`!importlib_metadata` -================================= - -``importlib_metadata`` is a library that provides access to -the metadata of an installed :term:`packaging:Distribution Package`, -such as its entry points -or its top-level names (:term:`packaging:Import Package`\s, modules, if any). -Built in part on Python's import system, this library -intends to replace similar functionality in the `entry point -API`_ and `metadata API`_ of ``pkg_resources``. Along with -:mod:`importlib.resources`, -this package can eliminate the need to use the older and less efficient -``pkg_resources`` package. - -``importlib_metadata`` operates on third-party *distribution packages* -installed into Python's ``site-packages`` directory via tools such as -`pip <https://pypi.org/project/pip/>`_. -Specifically, it works with distributions with discoverable -``dist-info`` or ``egg-info`` directories, -and metadata defined by the :ref:`packaging:core-metadata`. - -.. important:: - - These are *not* necessarily equivalent to or correspond 1:1 with - the top-level *import package* names - that can be imported inside Python code. - One *distribution package* can contain multiple *import packages* - (and single modules), - and one top-level *import package* - may map to multiple *distribution packages* - if it is a namespace package. - You can use :ref:`package_distributions() <package-distributions>` - to get a mapping between them. - -By default, distribution metadata can live on the file system -or in zip archives on -:data:`sys.path`. Through an extension mechanism, the metadata can live almost -anywhere. - - -.. seealso:: - - https://importlib-metadata.readthedocs.io/ - The documentation for ``importlib_metadata``, which supplies a - backport of ``importlib.metadata``. - This includes an `API reference - <https://importlib-metadata.readthedocs.io/en/latest/api.html>`__ - for this module's classes and functions, - as well as a `migration guide - <https://importlib-metadata.readthedocs.io/en/latest/migration.html>`__ - for existing users of ``pkg_resources``. - - -Overview -======== - -Let's say you wanted to get the version string for a -:term:`packaging:Distribution Package` you've installed -using ``pip``. We start by creating a virtual environment and installing -something into it:: - - $ python -m venv example - $ source example/bin/activate - (example) $ python -m pip install importlib_metadata - (example) $ python -m pip install wheel - -You can get the version string for ``wheel`` by running the following:: - - (example) $ python - >>> from importlib_metadata import version - >>> version('wheel') - '0.32.3' - -You can also get a collection of entry points selectable by properties of the EntryPoint (typically 'group' or 'name'), such as -``console_scripts``, ``distutils.commands`` and others. Each group contains a -collection of :ref:`EntryPoint <entry-points>` objects. - -You can get the :ref:`metadata for a distribution <metadata>`:: - - >>> list(metadata('wheel')) - ['Metadata-Version', 'Name', 'Version', 'Summary', 'Home-page', 'Author', 'Author-email', 'Maintainer', 'Maintainer-email', 'License', 'Project-URL', 'Project-URL', 'Project-URL', 'Keywords', 'Platform', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Classifier', 'Requires-Python', 'Provides-Extra', 'Requires-Dist', 'Requires-Dist'] - -You can also get a :ref:`distribution's version number <version>`, list its -:ref:`constituent files <files>`, and get a list of the distribution's -:ref:`requirements`. - - -Functional API -============== - -This package provides the following functionality via its public API. - - -.. _entry-points: - -Entry points ------------- - -The ``entry_points()`` function returns a collection of entry points. -Entry points are represented by ``EntryPoint`` instances; -each ``EntryPoint`` has a ``.name``, ``.group``, and ``.value`` attributes and -a ``.load()`` method to resolve the value. There are also ``.module``, -``.attr``, and ``.extras`` attributes for getting the components of the -``.value`` attribute. - -Query all entry points:: - - >>> eps = entry_points() - -The ``entry_points()`` function returns an ``EntryPoints`` object, -a collection of all ``EntryPoint`` objects with ``names`` and ``groups`` -attributes for convenience:: - - >>> sorted(eps.groups) - ['console_scripts', 'distutils.commands', 'distutils.setup_keywords', 'egg_info.writers', 'setuptools.installation'] - -``EntryPoints`` has a ``select`` method to select entry points -matching specific properties. Select entry points in the -``console_scripts`` group:: - - >>> scripts = eps.select(group='console_scripts') - -Equivalently, since ``entry_points`` passes keyword arguments -through to select:: - - >>> scripts = entry_points(group='console_scripts') - -Pick out a specific script named "wheel" (found in the wheel project):: - - >>> 'wheel' in scripts.names - True - >>> wheel = scripts['wheel'] - -Equivalently, query for that entry point during selection:: - - >>> (wheel,) = entry_points(group='console_scripts', name='wheel') - >>> (wheel,) = entry_points().select(group='console_scripts', name='wheel') - -Inspect the resolved entry point:: - - >>> wheel - EntryPoint(name='wheel', value='wheel.cli:main', group='console_scripts') - >>> wheel.module - 'wheel.cli' - >>> wheel.attr - 'main' - >>> wheel.extras - [] - >>> main = wheel.load() - >>> main - <function main at 0x103528488> - -The ``group`` and ``name`` are arbitrary values defined by the package author -and usually a client will wish to resolve all entry points for a particular -group. Read `the setuptools docs -<https://setuptools.pypa.io/en/latest/userguide/entry_point.html>`_ -for more information on entry points, their definition, and usage. - -*Compatibility Note* - -The "selectable" entry points were introduced in ``importlib_metadata`` -3.6 and Python 3.10. Prior to those changes, ``entry_points`` accepted -no parameters and always returned a dictionary of entry points, keyed -by group. With ``importlib_metadata`` 5.0 and Python 3.12, -``entry_points`` always returns an ``EntryPoints`` object. See -`backports.entry_points_selectable <https://pypi.org/project/backports.entry_points_selectable>`_ -for compatibility options. - - -.. _metadata: - -Distribution metadata ---------------------- - -Every :term:`packaging:Distribution Package` includes some metadata, -which you can extract using the -``metadata()`` function:: - - >>> wheel_metadata = metadata('wheel') - -The keys of the returned data structure, a ``PackageMetadata``, -name the metadata keywords, and -the values are returned unparsed from the distribution metadata:: - - >>> wheel_metadata['Requires-Python'] - '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' - -``PackageMetadata`` also presents a ``json`` attribute that returns -all the metadata in a JSON-compatible form per PEP 566:: - - >>> wheel_metadata.json['requires_python'] - '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' - -.. note:: - - The actual type of the object returned by ``metadata()`` is an - implementation detail and should be accessed only through the interface - described by the - `PackageMetadata protocol <https://importlib-metadata.readthedocs.io/en/latest/api.html#importlib_metadata.PackageMetadata>`_. - - -.. _version: - -Distribution versions ---------------------- - -The ``version()`` function is the quickest way to get a -:term:`packaging:Distribution Package`'s version -number, as a string:: - - >>> version('wheel') - '0.32.3' - - -.. _files: - -Distribution files ------------------- - -You can also get the full set of files contained within a distribution. The -``files()`` function takes a :term:`packaging:Distribution Package` name -and returns all of the -files installed by this distribution. Each file object returned is a -``PackagePath``, a :class:`pathlib.PurePath` derived object with additional ``dist``, -``size``, and ``hash`` properties as indicated by the metadata. For example:: - - >>> util = [p for p in files('wheel') if 'util.py' in str(p)][0] - >>> util - PackagePath('wheel/util.py') - >>> util.size - 859 - >>> util.dist - <importlib_metadata._hooks.PathDistribution object at 0x101e0cef0> - >>> util.hash - <FileHash mode: sha256 value: bYkw5oMccfazVCoYQwKkkemoVyMAFoR34mmKBx8R1NI> - -Once you have the file, you can also read its contents:: - - >>> print(util.read_text()) - import base64 - import sys - ... - def as_bytes(s): - if isinstance(s, text_type): - return s.encode('utf-8') - return s - -You can also use the ``locate`` method to get a the absolute path to the -file:: - - >>> util.locate() # doctest: +SKIP - PosixPath('/home/gustav/example/lib/site-packages/wheel/util.py') - -In the case where the metadata file listing files -(RECORD or SOURCES.txt) is missing, ``files()`` will -return ``None``. The caller may wish to wrap calls to -``files()`` in `always_iterable -<https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.always_iterable>`_ -or otherwise guard against this condition if the target -distribution is not known to have the metadata present. - -.. _requirements: - -Distribution requirements -------------------------- - -To get the full set of requirements for a :term:`packaging:Distribution Package`, -use the ``requires()`` -function:: - - >>> requires('wheel') - ["pytest (>=3.0.0) ; extra == 'test'", "pytest-cov ; extra == 'test'"] - - -.. _package-distributions: -.. _import-distribution-package-mapping: - -Mapping import to distribution packages ---------------------------------------- - -A convenience method to resolve the :term:`packaging:Distribution Package` -name (or names, in the case of a namespace package) -that provide each importable top-level -Python module or :term:`packaging:Import Package`:: - - >>> packages_distributions() - {'importlib_metadata': ['importlib-metadata'], 'yaml': ['PyYAML'], 'jaraco': ['jaraco.classes', 'jaraco.functools'], ...} - -Some editable installs, `do not supply top-level names -<https://github.com/pypa/packaging-problems/issues/609>`_, and thus this -function is not reliable with such installs. - -.. _distributions: - -Distributions -============= - -While the above API is the most common and convenient usage, you can get all -of that information from the ``Distribution`` class. A ``Distribution`` is an -abstract object that represents the metadata for -a Python :term:`packaging:Distribution Package`. You can -get the ``Distribution`` instance:: - - >>> from importlib_metadata import distribution - >>> dist = distribution('wheel') - -Thus, an alternative way to get the version number is through the -``Distribution`` instance:: - - >>> dist.version - '0.32.3' - -There are all kinds of additional metadata available on the ``Distribution`` -instance:: - - >>> dist.metadata['Requires-Python'] - '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' - >>> dist.metadata['License'] - 'MIT' - -The full set of available metadata is not described here. -See the :ref:`packaging:core-metadata` for additional details. - - -Distribution Discovery -====================== - -By default, this package provides built-in support for discovery of metadata -for file system and zip file :term:`packaging:Distribution Package`\s. -This metadata finder search defaults to ``sys.path``, but varies slightly in how it interprets those values from how other import machinery does. In particular: - -- ``importlib_metadata`` does not honor :class:`bytes` objects on ``sys.path``. -- ``importlib_metadata`` will incidentally honor :py:class:`pathlib.Path` objects on ``sys.path`` even though such values will be ignored for imports. - - -Extending the search algorithm -============================== - -Because :term:`packaging:Distribution Package` metadata -is not available through :data:`sys.path` searches, or -package loaders directly, -the metadata for a distribution is found through import -system :ref:`finders <finders-and-loaders>`. To find a distribution package's metadata, -``importlib.metadata`` queries the list of :term:`meta path finders <meta path finder>` on -:data:`sys.meta_path`. - -By default ``importlib_metadata`` installs a finder for distribution packages -found on the file system. -This finder doesn't actually find any *distributions*, -but it can find their metadata. - -The abstract class :py:class:`importlib.abc.MetaPathFinder` defines the -interface expected of finders by Python's import system. -``importlib_metadata`` extends this protocol by looking for an optional -``find_distributions`` callable on the finders from -:data:`sys.meta_path` and presents this extended interface as the -``DistributionFinder`` abstract base class, which defines this abstract -method:: - - @abc.abstractmethod - def find_distributions(context=DistributionFinder.Context()): - """Return an iterable of all Distribution instances capable of - loading the metadata for packages for the indicated ``context``. - """ - -The ``DistributionFinder.Context`` object provides ``.path`` and ``.name`` -properties indicating the path to search and name to match and may -supply other relevant context. - -What this means in practice is that to support finding distribution package -metadata in locations other than the file system, subclass -``Distribution`` and implement the abstract methods. Then from -a custom finder, return instances of this derived ``Distribution`` in the -``find_distributions()`` method. - - -.. _`entry point API`: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points -.. _`metadata API`: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#metadata-api diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/importlib_metadata/__init__.py new/importlib_metadata-7.0.1/importlib_metadata/__init__.py --- old/importlib_metadata-7.0.0/importlib_metadata/__init__.py 2023-12-03 18:41:47.000000000 +0100 +++ new/importlib_metadata-7.0.1/importlib_metadata/__init__.py 2023-12-22 18:16:52.000000000 +0100 @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import re import abc @@ -21,7 +23,6 @@ from ._collections import FreezableDefaultDict, Pair from ._compat import ( NullFinder, - StrPath, install, ) from ._functools import method_cache, pass_none @@ -315,14 +316,12 @@ dist: "Distribution" def read_text(self, encoding: str = 'utf-8') -> str: # type: ignore[override] - with self.locate().open(encoding=encoding) as stream: - return stream.read() + return self.locate().read_text(encoding=encoding) def read_binary(self) -> bytes: - with self.locate().open('rb') as stream: - return stream.read() + return self.locate().read_bytes() - def locate(self) -> pathlib.Path: + def locate(self) -> SimplePath: """Return a path-like object for this path""" return self.dist.locate_file(self) @@ -336,6 +335,7 @@ class DeprecatedNonAbstract: + # Required until Python 3.14 def __new__(cls, *args, **kwargs): all_names = { name for subclass in inspect.getmro(cls) for name in vars(subclass) @@ -355,20 +355,42 @@ class Distribution(DeprecatedNonAbstract): - """A Python distribution package.""" + """ + An abstract Python distribution package. + + Custom providers may derive from this class and define + the abstract methods to provide a concrete implementation + for their environment. + """ @abc.abstractmethod def read_text(self, filename) -> Optional[str]: """Attempt to load metadata file given by the name. + Python distribution metadata is organized by blobs of text + typically represented as "files" in the metadata directory + (e.g. package-1.0.dist-info). These files include things + like: + + - METADATA: The distribution metadata including fields + like Name and Version and Description. + - entry_points.txt: A series of entry points defined by + the Setuptools spec in an ini format with sections + representing the groups. + - RECORD: A record of files as installed by a typical + installer. + + A package may provide any set of files, including those + not listed here or none at all. + :param filename: The name of the file in the distribution info. :return: The text if found, otherwise None. """ @abc.abstractmethod - def locate_file(self, path: StrPath) -> pathlib.Path: + def locate_file(self, path: str | os.PathLike[str]) -> SimplePath: """ - Given a path to a file in this distribution, return a path + Given a path to a file in this distribution, return a SimplePath to it. """ @@ -391,16 +413,18 @@ raise PackageNotFoundError(name) @classmethod - def discover(cls, **kwargs) -> Iterable["Distribution"]: + def discover( + cls, *, context: Optional['DistributionFinder.Context'] = None, **kwargs + ) -> Iterable["Distribution"]: """Return an iterable of Distribution objects for all packages. Pass a ``context`` or pass keyword arguments for constructing a context. :context: A ``DistributionFinder.Context`` object. - :return: Iterable of Distribution objects for all packages. + :return: Iterable of Distribution objects for packages matching + the context. """ - context = kwargs.pop('context', None) if context and kwargs: raise ValueError("cannot accept context and kwargs") context = context or DistributionFinder.Context(**kwargs) @@ -409,8 +433,8 @@ ) @staticmethod - def at(path: StrPath) -> "Distribution": - """Return a Distribution for the indicated metadata path + def at(path: str | os.PathLike[str]) -> "Distribution": + """Return a Distribution for the indicated metadata path. :param path: a string or path-like object :return: a concrete Distribution instance for the path @@ -419,7 +443,7 @@ @staticmethod def _discover_resolvers(): - """Search the meta_path for resolvers.""" + """Search the meta_path for resolvers (MetadataPathFinders).""" declared = ( getattr(finder, 'find_distributions', None) for finder in sys.meta_path ) @@ -817,7 +841,7 @@ """ self._path = path - def read_text(self, filename: StrPath) -> Optional[str]: + def read_text(self, filename: str | os.PathLike[str]) -> Optional[str]: with suppress( FileNotFoundError, IsADirectoryError, @@ -831,7 +855,7 @@ read_text.__doc__ = Distribution.read_text.__doc__ - def locate_file(self, path: StrPath) -> pathlib.Path: + def locate_file(self, path: str | os.PathLike[str]) -> SimplePath: return self._path.parent / path @property diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/importlib_metadata/_compat.py new/importlib_metadata-7.0.1/importlib_metadata/_compat.py --- old/importlib_metadata-7.0.0/importlib_metadata/_compat.py 2023-12-03 18:41:47.000000000 +0100 +++ new/importlib_metadata-7.0.1/importlib_metadata/_compat.py 2023-12-22 18:16:52.000000000 +0100 @@ -1,9 +1,6 @@ -import os import sys import platform -from typing import Union - __all__ = ['install', 'NullFinder'] @@ -41,7 +38,7 @@ class NullFinder: """ - A "Finder" (aka "MetaClassFinder") that never finds any modules, + A "Finder" (aka "MetaPathFinder") that never finds any modules, but may find distributions. """ @@ -58,10 +55,3 @@ """ is_pypy = platform.python_implementation() == 'PyPy' return val + is_pypy - - -if sys.version_info >= (3, 9): - StrPath = Union[str, os.PathLike[str]] -else: - # PathLike is only subscriptable at runtime in 3.9+ - StrPath = Union[str, "os.PathLike[str]"] # pragma: no cover diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/importlib_metadata/_meta.py new/importlib_metadata-7.0.1/importlib_metadata/_meta.py --- old/importlib_metadata-7.0.0/importlib_metadata/_meta.py 2023-12-03 18:41:47.000000000 +0100 +++ new/importlib_metadata-7.0.1/importlib_metadata/_meta.py 2023-12-22 18:16:52.000000000 +0100 @@ -1,3 +1,6 @@ +from __future__ import annotations + +import os from typing import Protocol from typing import Any, Dict, Iterator, List, Optional, TypeVar, Union, overload @@ -44,20 +47,26 @@ """ -class SimplePath(Protocol[_T]): +class SimplePath(Protocol): """ - A minimal subset of pathlib.Path required by PathDistribution. + A minimal subset of pathlib.Path required by Distribution. """ - def joinpath(self, other: Union[str, _T]) -> _T: + def joinpath(self, other: Union[str, os.PathLike[str]]) -> SimplePath: ... # pragma: no cover - def __truediv__(self, other: Union[str, _T]) -> _T: + def __truediv__(self, other: Union[str, os.PathLike[str]]) -> SimplePath: ... # pragma: no cover @property - def parent(self) -> _T: + def parent(self) -> SimplePath: + ... # pragma: no cover + + def read_text(self, encoding=None) -> str: + ... # pragma: no cover + + def read_bytes(self) -> bytes: ... # pragma: no cover - def read_text(self) -> str: + def exists(self) -> bool: ... # pragma: no cover diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/importlib_metadata.egg-info/PKG-INFO new/importlib_metadata-7.0.1/importlib_metadata.egg-info/PKG-INFO --- old/importlib_metadata-7.0.0/importlib_metadata.egg-info/PKG-INFO 2023-12-03 18:42:06.000000000 +0100 +++ new/importlib_metadata-7.0.1/importlib_metadata.egg-info/PKG-INFO 2023-12-22 18:17:12.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: importlib-metadata -Version: 7.0.0 +Version: 7.0.1 Summary: Read metadata from Python packages Home-page: https://github.com/python/importlib_metadata Author: Jason R. Coombs @@ -43,7 +43,7 @@ .. image:: https://img.shields.io/pypi/pyversions/importlib_metadata.svg -.. image:: https://github.com/python/importlib_metadata/workflows/tests/badge.svg +.. image:: https://github.com/python/importlib_metadata/actions/workflows/main.yml/badge.svg :target: https://github.com/python/importlib_metadata/actions?query=workflow%3A%22tests%22 :alt: tests @@ -83,6 +83,8 @@ * - importlib_metadata - stdlib + * - 7.0 + - 3.13 * - 6.5 - 3.12 * - 4.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/importlib_metadata-7.0.0/importlib_metadata.egg-info/SOURCES.txt new/importlib_metadata-7.0.1/importlib_metadata.egg-info/SOURCES.txt --- old/importlib_metadata-7.0.0/importlib_metadata.egg-info/SOURCES.txt 2023-12-03 18:42:06.000000000 +0100 +++ new/importlib_metadata-7.0.1/importlib_metadata.egg-info/SOURCES.txt 2023-12-22 18:17:12.000000000 +0100 @@ -24,7 +24,6 @@ docs/history.rst docs/index.rst docs/migration.rst -docs/using.rst importlib_metadata/__init__.py importlib_metadata/_adapters.py importlib_metadata/_collections.py