Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-mwclient for openSUSE:Factory 
checked in at 2026-10-01 16:42:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mwclient (Old)
 and      /work/SRC/openSUSE:Factory/.python-mwclient.new.1253 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mwclient"

Thu Oct  1 16:42:14 2026 rev:3 rq:1381564 version:0.11.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mwclient/python-mwclient.changes  
2025-02-12 21:39:53.062898971 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-mwclient.new.1253/python-mwclient.changes    
    2026-10-01 16:44:02.447484998 +0200
@@ -1,0 +2,6 @@
+Wed Sep 30 05:01:50 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch no-more-pkg-resources.patch:
+  * Use importlib.metadata for version discovery.
+
+-------------------------------------------------------------------

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

----------(New B)----------
  New:
- Add patch no-more-pkg-resources.patch:
  * Use importlib.metadata for version discovery.
----------(New E)----------

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

Other differences:
------------------
++++++ python-mwclient.spec ++++++
--- /var/tmp/diff_new_pack.8Hh5LJ/_old  2026-10-01 16:44:03.134513798 +0200
+++ /var/tmp/diff_new_pack.8Hh5LJ/_new  2026-10-01 16:44:03.139514008 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-mwclient
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,16 +24,17 @@
 License:        MIT
 URL:            https://github.com/mwclient/mwclient
 Source:         
https://files.pythonhosted.org/packages/source/m/mwclient/mwclient-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM Based on gh#mwclient/mwclient#367
+Patch0:         no-more-pkg-resources.patch
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  python-rpm-macros
 # SECTION test requirements
 BuildRequires:  %{python_module requests-oauthlib}
-BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest-cov}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module responses >= 0.3.0}
-BuildRequires:  %{python_module responses}
-BuildRequires:  %{python_module wheel}
 # /SECTION
 BuildRequires:  fdupes
 Requires:       python-requests-oauthlib
@@ -61,6 +62,6 @@
 %files %{python_files}
 %doc README.md
 %license LICENSE.md
-%{python_sitelib}/mwclient-%{version}*-info
 %{python_sitelib}/mwclient
+%{python_sitelib}/mwclient-%{version}.dist-info
 

++++++ no-more-pkg-resources.patch ++++++
>From c84daef36f44dd542ab0f126d11053fe579c991a Mon Sep 17 00:00:00 2001
From: Marc Troelitzsch <[email protected]>
Date: Thu, 10 Oct 2024 20:29:03 +0200
Subject: [PATCH] test: replace pkg_resources with importlib.metadata for
 Python 3.8+

This change replaces the deprecated `pkg_resources` (part of
`setuptools`) with `importlib.metadata` for Python 3.8 and above.

Switching to `importlib.metadata` allows us to drop the test-dependency
on `setuptools` and gets rid of the `DeprecationWarning` raised by
certain versions of `pkg_resources` when being imported:

```
DeprecationWarning: pkg_resources is deprecated as an API
```
---
 pyproject.toml      |  2 +-
 test/test_client.py | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

Index: mwclient-0.11.0/test/test_client.py
===================================================================
--- mwclient-0.11.0.orig/test/test_client.py
+++ mwclient-0.11.0/test/test_client.py
@@ -5,8 +5,8 @@ import mwclient
 import logging
 import requests
 import responses
-import pkg_resources  # part of setuptools
 import time
+import sys
 import json
 from requests_oauthlib import OAuth1
 
@@ -85,7 +85,15 @@ class TestClient(TestCase):
 
     def testVersion(self):
         # The version specified in setup.py should equal the one specified in 
client.py
-        version = pkg_resources.require("mwclient")[0].version
+
+        if sys.version_info >= (3, 8):
+            import importlib.metadata
+
+            version = importlib.metadata.version("mwclient")
+        else:
+            import pkg_resources  # part of setuptools
+
+            version = pkg_resources.require("mwclient")[0].version
 
         assert version == mwclient.__version__
 

Reply via email to