Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Paste for openSUSE:Factory 
checked in at 2026-10-06 19:13:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Paste (Old)
 and      /work/SRC/openSUSE:Factory/.python-Paste.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Paste"

Tue Oct  6 19:13:08 2026 rev:45 rq:1382001 version:3.10.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Paste/python-Paste.changes        
2026-01-05 14:51:14.245474422 +0100
+++ /work/SRC/openSUSE:Factory/.python-Paste.new.3698736/python-Paste.changes   
2026-10-06 19:13:10.473340568 +0200
@@ -1,0 +2,6 @@
+Fri Oct  2 05:21:19 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Replace paste-pr105-partial-pkg_resources-remove.patch with a more
+  complete upstream patch, no-more-pkg-resources.patch
+
+-------------------------------------------------------------------

Old:
----
  paste-pr105-partial-pkg_resources-remove.patch

New:
----
  no-more-pkg-resources.patch

----------(Old B)----------
  Old:
- Replace paste-pr105-partial-pkg_resources-remove.patch with a more
  complete upstream patch, no-more-pkg-resources.patch
----------(Old E)----------

----------(New B)----------
  New:- Replace paste-pr105-partial-pkg_resources-remove.patch with a more
  complete upstream patch, no-more-pkg-resources.patch
----------(New E)----------

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

Other differences:
------------------
++++++ python-Paste.spec ++++++
--- /var/tmp/diff_new_pack.u8tVXr/_old  2026-10-06 19:13:12.048406464 +0200
+++ /var/tmp/diff_new_pack.u8tVXr/_new  2026-10-06 19:13:12.051406589 +0200
@@ -25,15 +25,14 @@
 URL:            https://github.com/cdent/paste
 Source:         
https://files.pythonhosted.org/packages/source/p/paste/paste-%{version}.tar.gz
 Patch0:         test_modified-fixup.patch
-# PATCH-FIX-UPSTREAM paste-pr105-partial-pkg_resources-remove.patch 
gh#pasteorg/paste#105 gh#pasteorg/paste#107
-Patch1:         paste-pr105-partial-pkg_resources-remove.patch
+# PATCH-FIX-UPSTREAM gh#pasteorg/paste#108
+Patch1:         no-more-pkg-resources.patch
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-setuptools
 Suggests:       python-flup
 Suggests:       python-python3-openid
 BuildArch:      noarch
@@ -65,5 +64,4 @@
 %doc README.rst
 %{python_sitelib}/paste
 %{python_sitelib}/[pP]aste-%{version}.dist-info
-%{python_sitelib}/Paste-%{version}-py*-nspkg.pth
 

++++++ no-more-pkg-resources.patch ++++++
>From af6c96afbde6d983318ca9c904a7ec65fdbf897c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= <[email protected]>
Date: Sun, 5 Jul 2026 19:13:14 +0200
Subject: [PATCH] Remove all pkg_resources usage

---
 paste/__init__.py          | 13 ++---------
 paste/urlparser.py         | 46 +++++++++++++++++++++++++-------------
 paste/util/template.py     |  6 ++---
 setup.py                   |  2 --
 tests/__init__.py          |  2 --
 tests/cgiapp_data/form.cgi |  9 --------
 tests/test_urlparser.py    |  7 ++----
 7 files changed, 37 insertions(+), 48 deletions(-)

diff --git a/paste/__init__.py b/paste/__init__.py
index ec8b065..0962681 100644
--- a/paste/__init__.py
+++ b/paste/__init__.py
@@ -1,17 +1,8 @@
 # (c) 2005 Ian Bicking and contributors; written for Paste 
(http://pythonpaste.org)
 # Licensed under the MIT license: 
http://www.opensource.org/licenses/mit-license.php
 
-import warnings
-
-try:
-    with warnings.catch_warnings():
-        warnings.simplefilter("ignore", category=DeprecationWarning)
-        import pkg_resources
-        pkg_resources.declare_namespace(__name__)
-except (AttributeError, ImportError):
-    # don't prevent use of paste if pkg_resources isn't installed
-    from pkgutil import extend_path
-    __path__ = extend_path(__path__, __name__)
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
 
 try:
     import modulefinder
diff --git a/paste/urlparser.py b/paste/urlparser.py
index 2210b22..755ef0e 100644
--- a/paste/urlparser.py
+++ b/paste/urlparser.py
@@ -9,12 +9,7 @@
 import mimetypes
 import warnings
 import importlib.util as imputil
-try:
-    with warnings.catch_warnings():
-        warnings.simplefilter("ignore", category=DeprecationWarning)
-        import pkg_resources
-except ImportError:
-    pkg_resources = None
+import importlib.metadata
 from paste import request
 from paste import fileapp
 from paste.util import import_string
@@ -521,19 +516,40 @@ def make_static(global_conf, document_root, 
cache_max_age=None):
     return StaticURLParser(
         document_root, cache_max_age=cache_max_age)
 
+class _DistributionResources:
+    """Minimal shim replacing pkg_resources distribution resource methods."""
+
+    def __init__(self, dist):
+        self._root = dist.locate_file('')
+        self.project_name = dist.metadata['Name']
+
+    def _path(self, resource_name):
+        return self._root / resource_name
+
+    def has_resource(self, resource_name):
+        p = self._path(resource_name)
+        return p.is_file() or p.is_dir()
+
+    def resource_isdir(self, resource_name):
+        return self._path(resource_name).is_dir()
+
+    def get_resource_stream(self, manager, resource_name):
+        return self._path(resource_name).open('rb')
+
+
 class PkgResourcesParser(StaticURLParser):
 
     def __init__(self, egg_or_spec, resource_name, manager=None, 
root_resource=None):
-        if pkg_resources is None:
-            raise NotImplementedError("This class requires pkg_resources.")
-        if isinstance(egg_or_spec, (bytes, str)):
-            self.egg = pkg_resources.get_distribution(egg_or_spec)
+        if isinstance(egg_or_spec, str):
+            dist = importlib.metadata.distribution(egg_or_spec)
+            self.egg = _DistributionResources(dist)
+        elif isinstance(egg_or_spec, bytes):
+            dist = importlib.metadata.distribution(egg_or_spec.decode())
+            self.egg = _DistributionResources(dist)
         else:
             self.egg = egg_or_spec
         self.resource_name = resource_name
-        if manager is None:
-            manager = pkg_resources.ResourceManager()
-        self.manager = manager
+        self.manager = manager  # kept for API compatibility; no longer used
         if root_resource is None:
             root_resource = resource_name
         self.root_resource = os.path.normpath(root_resource)
@@ -595,12 +611,10 @@ def not_found(self, environ, start_response, 
debug_message=None):
 def make_pkg_resources(global_conf, egg, resource_name=''):
     """
     A static file parser that loads data from an egg using
-    ``pkg_resources``.  Takes a configuration value ``egg``, which is
+    ``importlib.resources``.  Takes a configuration value ``egg``, which is
     an egg spec, and a base ``resource_name`` (default empty string)
     which is the path in the egg that this starts at.
     """
-    if pkg_resources is None:
-        raise NotImplementedError("This function requires pkg_resources.")
     return PkgResourcesParser(egg, resource_name)
 
 def make_url_parser(global_conf, directory, base_python_name,
diff --git a/paste/util/template.py b/paste/util/template.py
index ee6b25f..f4fe3af 100644
--- a/paste/util/template.py
+++ b/paste/util/template.py
@@ -682,12 +682,12 @@ def parse_default(tokens, name, context):
 """
 
 def fill_command(args=None):
-    import sys, optparse, pkg_resources, os
+    import sys, optparse, importlib.metadata, os
     if args is None:
         args = sys.argv[1:]
-    dist = pkg_resources.get_distribution('Paste')
+    version = importlib.metadata.version('Paste')
     parser = optparse.OptionParser(
-        version=str(dist),
+        version=version,
         usage=_fill_command_usage)
     parser.add_option(
         '-o', '--output',
diff --git a/setup.py b/setup.py
index cd1ac04..5bd6d89 100644
--- a/setup.py
+++ b/setup.py
@@ -52,10 +52,8 @@
       packages=find_packages(exclude=['ez_setup', 'examples', 'packages', 
'tests*']),
       package_data=finddata.find_package_data(
           exclude_directories=finddata.standard_exclude_directories + 
('tests',)),
-      namespace_packages=['paste'],
       zip_safe=False,
       install_requires=[
-        'setuptools',  # pkg_resources
         ],
       extras_require={
         'subprocess': [],
diff --git a/tests/__init__.py b/tests/__init__.py
index 2f10103..9f2d860 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -3,5 +3,3 @@
 import os
 
 sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
-
-import pkg_resources
diff --git a/tests/cgiapp_data/form.cgi b/tests/cgiapp_data/form.cgi
index 21dca13..4005dc3 100755
--- a/tests/cgiapp_data/form.cgi
+++ b/tests/cgiapp_data/form.cgi
@@ -4,20 +4,11 @@ print('Content-type: text/plain')
 print('')
 
 import sys
-import warnings
 from os.path import dirname
 
 base_dir = dirname(dirname(dirname(__file__)))
 sys.path.insert(0, base_dir)
 
-with warnings.catch_warnings():
-    warnings.simplefilter("ignore", category=DeprecationWarning)
-    try:
-        import pkg_resources
-    except ImportError:
-        # Ignore
-        pass
-
 from paste.util.field_storage import FieldStorage
 
 class FormFieldStorage(FieldStorage):
diff --git a/tests/test_urlparser.py b/tests/test_urlparser.py
index c0cf622..297f1d6 100644
--- a/tests/test_urlparser.py
+++ b/tests/test_urlparser.py
@@ -1,9 +1,6 @@
 import os
 import warnings
-
-with warnings.catch_warnings():
-    warnings.simplefilter("ignore", category=DeprecationWarning)
-    from pkg_resources import get_distribution
+import importlib.metadata
 
 from paste.fixture import TestApp
 from paste.urlparser import PkgResourcesParser, StaticURLParser, URLParser
@@ -155,7 +152,7 @@ def test_egg_parser():
     # Find a readable file in the Paste pkg's root directory (or upwards the
     # directory tree). Ensure it's not accessible via the URLParser
     unreachable_test_file = None
-    search_path = pkg_root_path = get_distribution('Paste').location
+    search_path = pkg_root_path = 
str(importlib.metadata.distribution('Paste').locate_file(''))
     level = 0
     # We might not find any readable files in the pkg's root directory (this
     # is likely when Paste is installed as a .egg in site-packages). We

Reply via email to