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-01-04 17:50:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-importlib-metadata (Old)
 and      /work/SRC/openSUSE:Factory/.python-importlib-metadata.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-importlib-metadata"

Wed Jan  4 17:50:48 2023 rev:15 rq:1046282 version:6.0.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-importlib-metadata/python-importlib-metadata.changes
      2022-12-07 17:35:52.192836409 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-importlib-metadata.new.1563/python-importlib-metadata.changes
    2023-01-04 17:50:59.629612631 +0100
@@ -1,0 +2,12 @@
+Mon Jan  2 19:12:18 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 6.0.0:
+  * #419: Declared ``Distribution`` as an abstract class, enforcing
+  definition of abstract methods in instantiated subclasses. It's no
+  longer possible to instantiate a ``Distribution`` or any subclasses
+  unless they define the abstract methods.
+  * #371: Deprecated expectation that ``PackageMetadata.__getitem__``
+  will return ``None`` for missing keys. In the future, it will raise a
+  ``KeyError``.
+
+-------------------------------------------------------------------

Old:
----
  importlib_metadata-5.1.0.tar.gz

New:
----
  importlib_metadata-6.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-importlib-metadata.spec ++++++
--- /var/tmp/diff_new_pack.7gApjz/_old  2023-01-04 17:51:01.021620835 +0100
+++ /var/tmp/diff_new_pack.7gApjz/_new  2023-01-04 17:51:01.029620881 +0100
@@ -1,7 +1,7 @@
 #
 # spec file
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,7 +27,7 @@
 %{?!python_module:%define python_module() python3-%{**}}
 %define skip_python2 1
 Name:           python-importlib-metadata%{psuffix}
-Version:        5.1.0
+Version:        6.0.0
 Release:        0
 Summary:        Read metadata from Python packages
 License:        Apache-2.0

++++++ importlib_metadata-5.1.0.tar.gz -> importlib_metadata-6.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/.github/workflows/main.yml 
new/importlib_metadata-6.0.0/.github/workflows/main.yml
--- old/importlib_metadata-5.1.0/.github/workflows/main.yml     2022-11-24 
15:38:23.000000000 +0100
+++ new/importlib_metadata-6.0.0/.github/workflows/main.yml     2023-01-01 
19:02:39.000000000 +0100
@@ -7,8 +7,10 @@
   # 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.
-  FORCE_COLOR: -106
+  # 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".
+  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")
@@ -61,6 +63,7 @@
         - platform: ubuntu-latest
           python: "3.9"
     runs-on: ${{ matrix.platform }}
+    continue-on-error: ${{ matrix.python == '3.12' }}
     steps:
       - uses: actions/checkout@v3
         with:
@@ -77,11 +80,28 @@
       - name: Run tests
         run: tox
 
+  docs:
+    runs-on: ubuntu-latest
+    env:
+      TOXENV: docs
+    steps:
+      - uses: actions/checkout@v3
+      - name: Setup Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: ${{ matrix.python }}${{ matrix.dev }}
+      - name: Install tox
+        run: |
+          python -m pip install tox
+      - name: Run tests
+        run: tox
+
   check:  # This job does nothing and is only used for the branch protection
     if: always()
 
     needs:
     - test
+    - docs
 
     runs-on: ubuntu-latest
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/CHANGES.rst 
new/importlib_metadata-6.0.0/CHANGES.rst
--- old/importlib_metadata-5.1.0/CHANGES.rst    2022-11-24 15:38:23.000000000 
+0100
+++ new/importlib_metadata-6.0.0/CHANGES.rst    2023-01-01 19:02:39.000000000 
+0100
@@ -1,3 +1,22 @@
+v6.0.0
+======
+
+* #419: Declared ``Distribution`` as an abstract class, enforcing
+  definition of abstract methods in instantiated subclasses. It's no
+  longer possible to instantiate a ``Distribution`` or any subclasses
+  unless they define the abstract methods.
+
+  Please comment in the issue if this change breaks any projects.
+  This change will likely be rolled back if it causes significant
+  disruption.
+
+v5.2.0
+======
+
+* #371: Deprecated expectation that ``PackageMetadata.__getitem__``
+  will return ``None`` for missing keys. In the future, it will raise a
+  ``KeyError``.
+
 v5.1.0
 ======
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/PKG-INFO 
new/importlib_metadata-6.0.0/PKG-INFO
--- old/importlib_metadata-5.1.0/PKG-INFO       2022-11-24 15:38:50.014063800 
+0100
+++ new/importlib_metadata-6.0.0/PKG-INFO       2023-01-01 19:02:58.711871100 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: importlib_metadata
-Version: 5.1.0
+Version: 6.0.0
 Summary: Read metadata from Python packages
 Home-page: https://github.com/python/importlib_metadata
 Author: Jason R. Coombs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/docs/conf.py 
new/importlib_metadata-6.0.0/docs/conf.py
--- old/importlib_metadata-5.1.0/docs/conf.py   2022-11-24 15:38:23.000000000 
+0100
+++ new/importlib_metadata-6.0.0/docs/conf.py   2023-01-01 19:02:39.000000000 
+0100
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
 extensions = [
     'sphinx.ext.autodoc',
     'jaraco.packaging.sphinx',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/importlib_metadata-5.1.0/importlib_metadata/__init__.py 
new/importlib_metadata-6.0.0/importlib_metadata/__init__.py
--- old/importlib_metadata-5.1.0/importlib_metadata/__init__.py 2022-11-24 
15:38:23.000000000 +0100
+++ new/importlib_metadata-6.0.0/importlib_metadata/__init__.py 2023-01-01 
19:02:39.000000000 +0100
@@ -346,7 +346,7 @@
         return f'<FileHash mode: {self.mode} value: {self.value}>'
 
 
-class Distribution:
+class Distribution(metaclass=abc.ABCMeta):
     """A Python distribution package."""
 
     @abc.abstractmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/importlib_metadata-5.1.0/importlib_metadata/_adapters.py 
new/importlib_metadata-6.0.0/importlib_metadata/_adapters.py
--- old/importlib_metadata-5.1.0/importlib_metadata/_adapters.py        
2022-11-24 15:38:23.000000000 +0100
+++ new/importlib_metadata-6.0.0/importlib_metadata/_adapters.py        
2023-01-01 19:02:39.000000000 +0100
@@ -1,8 +1,20 @@
+import functools
+import warnings
 import re
 import textwrap
 import email.message
 
 from ._text import FoldedCase
+from ._compat import pypy_partial
+
+
+# Do not remove prior to 2024-01-01 or Python 3.14
+_warn = functools.partial(
+    warnings.warn,
+    "Implicit None on return values is deprecated and will raise KeyErrors.",
+    DeprecationWarning,
+    stacklevel=pypy_partial(2),
+)
 
 
 class Message(email.message.Message):
@@ -39,6 +51,16 @@
     def __iter__(self):
         return super().__iter__()
 
+    def __getitem__(self, item):
+        """
+        Warn users that a ``KeyError`` can be expected when a
+        mising key is supplied. Ref python/importlib_metadata#371.
+        """
+        res = super().__getitem__(item)
+        if res is None:
+            _warn()
+        return res
+
     def _repair_headers(self):
         def redent(value):
             "Correct for RFC822 indentation"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/importlib_metadata-5.1.0/importlib_metadata.egg-info/PKG-INFO 
new/importlib_metadata-6.0.0/importlib_metadata.egg-info/PKG-INFO
--- old/importlib_metadata-5.1.0/importlib_metadata.egg-info/PKG-INFO   
2022-11-24 15:38:49.000000000 +0100
+++ new/importlib_metadata-6.0.0/importlib_metadata.egg-info/PKG-INFO   
2023-01-01 19:02:58.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: importlib-metadata
-Version: 5.1.0
+Version: 6.0.0
 Summary: Read metadata from Python packages
 Home-page: https://github.com/python/importlib_metadata
 Author: Jason R. Coombs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/importlib_metadata-5.1.0/importlib_metadata.egg-info/requires.txt 
new/importlib_metadata-6.0.0/importlib_metadata.egg-info/requires.txt
--- old/importlib_metadata-5.1.0/importlib_metadata.egg-info/requires.txt       
2022-11-24 15:38:49.000000000 +0100
+++ new/importlib_metadata-6.0.0/importlib_metadata.egg-info/requires.txt       
2023-01-01 19:02:58.000000000 +0100
@@ -8,6 +8,7 @@
 jaraco.packaging>=9
 rst.linker>=1.9
 furo
+sphinx-lint
 jaraco.tidelift>=1.4
 
 [perf]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/pytest.ini 
new/importlib_metadata-6.0.0/pytest.ini
--- old/importlib_metadata-5.1.0/pytest.ini     2022-11-24 15:38:23.000000000 
+0100
+++ new/importlib_metadata-6.0.0/pytest.ini     2023-01-01 19:02:39.000000000 
+0100
@@ -3,6 +3,9 @@
 addopts=--doctest-modules
 doctest_optionflags=ALLOW_UNICODE ELLIPSIS
 filterwarnings=
+       # Ensure ResourceWarnings are emitted
+       default::ResourceWarning
+
        # Suppress deprecation warning in flake8
        ignore:SelectableGroups dict interface is deprecated::flake8
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/setup.cfg 
new/importlib_metadata-6.0.0/setup.cfg
--- old/importlib_metadata-5.1.0/setup.cfg      2022-11-24 15:38:50.014063800 
+0100
+++ new/importlib_metadata-6.0.0/setup.cfg      2023-01-01 19:02:58.711871100 
+0100
@@ -52,6 +52,8 @@
        jaraco.packaging >= 9
        rst.linker >= 1.9
        furo
+       sphinx-lint
+       
        jaraco.tidelift >= 1.4
 perf = 
        ipython
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/tests/test_api.py 
new/importlib_metadata-6.0.0/tests/test_api.py
--- old/importlib_metadata-5.1.0/tests/test_api.py      2022-11-24 
15:38:23.000000000 +0100
+++ new/importlib_metadata-6.0.0/tests/test_api.py      2023-01-01 
19:02:39.000000000 +0100
@@ -141,6 +141,14 @@
         resolved = version('importlib-metadata')
         assert re.match(self.version_pattern, resolved)
 
+    def test_missing_key_legacy(self):
+        """
+        Requesting a missing key will still return None, but warn.
+        """
+        md = metadata('distinfo-pkg')
+        with suppress_known_deprecation():
+            assert md['does-not-exist'] is None
+
     @staticmethod
     def _test_files(files):
         root = files[0].root
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/tests/test_main.py 
new/importlib_metadata-6.0.0/tests/test_main.py
--- old/importlib_metadata-5.1.0/tests/test_main.py     2022-11-24 
15:38:23.000000000 +0100
+++ new/importlib_metadata-6.0.0/tests/test_main.py     2023-01-01 
19:02:39.000000000 +0100
@@ -9,7 +9,6 @@
 from importlib_metadata import (
     Distribution,
     EntryPoint,
-    MetadataPathFinder,
     PackageNotFoundError,
     _unique,
     distributions,
@@ -35,7 +34,7 @@
     def test_package_not_found_mentions_metadata(self):
         """
         When a package is not found, that could indicate that the
-        packgae is not installed or that it is installed without
+        package is not installed or that it is installed without
         metadata. Ensure the exception mentions metadata to help
         guide users toward the cause. See #124.
         """
@@ -44,9 +43,9 @@
 
         assert "metadata" in str(ctx.exception)
 
-    def test_new_style_classes(self):
-        self.assertIsInstance(Distribution, type)
-        self.assertIsInstance(MetadataPathFinder, type)
+    def test_abc_enforced(self):
+        with self.assertRaises(TypeError):
+            type('DistributionSubclass', (Distribution,), {})()
 
     @fixtures.parameterize(
         dict(name=None),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/importlib_metadata-5.1.0/tox.ini 
new/importlib_metadata-6.0.0/tox.ini
--- old/importlib_metadata-5.1.0/tox.ini        2022-11-24 15:38:23.000000000 
+0100
+++ new/importlib_metadata-6.0.0/tox.ini        2023-01-01 19:02:39.000000000 
+0100
@@ -23,6 +23,7 @@
 changedir = docs
 commands =
        python -m sphinx -W --keep-going . {toxinidir}/build/html
+       python -m sphinxlint
 
 [testenv:diffcov]
 deps =

Reply via email to