Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pkginfo for openSUSE:Factory 
checked in at 2024-11-18 19:57:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pkginfo (Old)
 and      /work/SRC/openSUSE:Factory/.python-pkginfo.new.2017 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pkginfo"

Mon Nov 18 19:57:10 2024 rev:12 rq:1224647 version:1.11.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pkginfo/python-pkginfo.changes    
2024-06-21 16:02:42.940987597 +0200
+++ /work/SRC/openSUSE:Factory/.python-pkginfo.new.2017/python-pkginfo.changes  
2024-11-18 19:57:25.919666232 +0100
@@ -1,0 +2,7 @@
+Fri Nov 15 16:40:01 UTC 2024 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Update to 1.11.2
+  * Swap order of zip/tarball checks to work around archives which fool
+    'zipfile.is_zipfile'.  LP #2084140.
+
+-------------------------------------------------------------------

Old:
----
  pkginfo-1.11.1.tar.gz

New:
----
  pkginfo-1.11.2.tar.gz

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

Other differences:
------------------
++++++ python-pkginfo.spec ++++++
--- /var/tmp/diff_new_pack.2vAU4M/_old  2024-11-18 19:57:26.403686438 +0100
+++ /var/tmp/diff_new_pack.2vAU4M/_new  2024-11-18 19:57:26.403686438 +0100
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-pkginfo
-Version:        1.11.1
+Version:        1.11.2
 Release:        0
 Summary:        Python package for querying metadatdata from 
sdists/bdists/installed packages
 License:        MIT

++++++ pkginfo-1.11.1.tar.gz -> pkginfo-1.11.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkginfo-1.11.1/CHANGES.txt 
new/pkginfo-1.11.2/CHANGES.txt
--- old/pkginfo-1.11.1/CHANGES.txt      2024-06-08 18:07:48.000000000 +0200
+++ new/pkginfo-1.11.2/CHANGES.txt      2024-10-10 19:33:33.000000000 +0200
@@ -1,10 +1,16 @@
 ``pkginfo`` Changelog
 =====================
 
+1.11.2 (2024-10-10)
+-------------------
+
+- Swap order of zip/tarball checks to work around archives which fool
+  'zipfile.is_zipfile'.  LP #2084140.
+
 1.11.1 (2024-06-08)
 -------------------
 
-- Updated typing stubs, adding additionaly checks to 'tox -e mypy' to
+- Update typing stubs, adding additional checks to 'tox -e mypy' to
   verify that they don't drift in the future.  LP #2068777.
 
 1.11.0 (2024-05-31)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkginfo-1.11.1/PKG-INFO new/pkginfo-1.11.2/PKG-INFO
--- old/pkginfo-1.11.1/PKG-INFO 2024-06-08 18:09:22.000000000 +0200
+++ new/pkginfo-1.11.2/PKG-INFO 2024-10-10 19:35:42.147549200 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pkginfo
-Version: 1.11.1
+Version: 1.11.2
 Summary: Query metadata from sdists / bdists / installed packages.
 Home-page: https://code.launchpad.net/~tseaver/pkginfo/trunk
 Author: Tres Seaver, Agendaless Consulting
@@ -23,8 +23,11 @@
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: System :: Software Distribution
 Requires-Python: >=3.8
-Provides-Extra: testing
 License-File: LICENSE.txt
+Provides-Extra: testing
+Requires-Dist: pytest; extra == "testing"
+Requires-Dist: pytest-cov; extra == "testing"
+Requires-Dist: wheel; extra == "testing"
 
 ``pkginfo`` README
 ==================
@@ -44,10 +47,16 @@
 ``pkginfo`` Changelog
 =====================
 
+1.11.2 (2024-10-10)
+-------------------
+
+- Swap order of zip/tarball checks to work around archives which fool
+  'zipfile.is_zipfile'.  LP #2084140.
+
 1.11.1 (2024-06-08)
 -------------------
 
-- Updated typing stubs, adding additionaly checks to 'tox -e mypy' to
+- Update typing stubs, adding additional checks to 'tox -e mypy' to
   verify that they don't drift in the future.  LP #2068777.
 
 1.11.0 (2024-05-31)
@@ -439,5 +448,3 @@
 ----------------
 
 - Initial release.
-
-
Binary files old/pkginfo-1.11.1/docs/examples/broken-tarball.tar.gz and 
new/pkginfo-1.11.2/docs/examples/broken-tarball.tar.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkginfo-1.11.1/pkginfo/sdist.py 
new/pkginfo-1.11.2/pkginfo/sdist.py
--- old/pkginfo-1.11.1/pkginfo/sdist.py 2024-05-31 20:15:06.000000000 +0200
+++ new/pkginfo-1.11.2/pkginfo/sdist.py 2024-10-10 19:16:38.000000000 +0200
@@ -49,16 +49,16 @@
         if not fqp.exists():
             raise NoSuchFile(fqp)
 
-        if zipfile.is_zipfile(fqp):
-            archive = zipfile.ZipFile(fqp)
-            names = archive.namelist()
-            def read_file(name):
-                return archive.read(name)
-        elif tarfile.is_tarfile(fqp):
+        if tarfile.is_tarfile(fqp):
             archive = tarfile.TarFile.open(fqp)
             names = archive.getnames()
             def read_file(name):
                 return archive.extractfile(name).read()
+        elif zipfile.is_zipfile(fqp):
+            archive = zipfile.ZipFile(fqp)
+            names = archive.namelist()
+            def read_file(name):
+                return archive.read(name)
         else:
             raise UnknownArchiveFormat(fqp)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkginfo-1.11.1/pkginfo/tests/test_sdist.py 
new/pkginfo-1.11.2/pkginfo/tests/test_sdist.py
--- old/pkginfo-1.11.1/pkginfo/tests/test_sdist.py      2024-05-31 
20:18:23.000000000 +0200
+++ new/pkginfo-1.11.2/pkginfo/tests/test_sdist.py      2024-10-10 
19:27:23.000000000 +0200
@@ -100,6 +100,13 @@
     with pytest.raises(ValueError):
         factory(filename, metadata_version='1.1')
 
+def test_sdist_ctor_w_tarball_fooling_is_zipfile(examples_dir):
+    # See: https://bugs.launchpad.net/pkginfo/+bug/2084140
+    filename = examples_dir / 'broken-tarball.tar.gz'
+
+    sdist = _make_sdist(filename, metadata_version='1.1')
+    assert sdist.name == "ratarmount"
+
 @pytest.mark.parametrize("w_metadata_version", [False, True])
 def test_sdist_ctor_w_archive(archive, w_metadata_version):
     if w_metadata_version:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkginfo-1.11.1/pkginfo.egg-info/PKG-INFO 
new/pkginfo-1.11.2/pkginfo.egg-info/PKG-INFO
--- old/pkginfo-1.11.1/pkginfo.egg-info/PKG-INFO        2024-06-08 
18:09:22.000000000 +0200
+++ new/pkginfo-1.11.2/pkginfo.egg-info/PKG-INFO        2024-10-10 
19:35:42.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pkginfo
-Version: 1.11.1
+Version: 1.11.2
 Summary: Query metadata from sdists / bdists / installed packages.
 Home-page: https://code.launchpad.net/~tseaver/pkginfo/trunk
 Author: Tres Seaver, Agendaless Consulting
@@ -23,8 +23,11 @@
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: System :: Software Distribution
 Requires-Python: >=3.8
-Provides-Extra: testing
 License-File: LICENSE.txt
+Provides-Extra: testing
+Requires-Dist: pytest; extra == "testing"
+Requires-Dist: pytest-cov; extra == "testing"
+Requires-Dist: wheel; extra == "testing"
 
 ``pkginfo`` README
 ==================
@@ -44,10 +47,16 @@
 ``pkginfo`` Changelog
 =====================
 
+1.11.2 (2024-10-10)
+-------------------
+
+- Swap order of zip/tarball checks to work around archives which fool
+  'zipfile.is_zipfile'.  LP #2084140.
+
 1.11.1 (2024-06-08)
 -------------------
 
-- Updated typing stubs, adding additionaly checks to 'tox -e mypy' to
+- Update typing stubs, adding additional checks to 'tox -e mypy' to
   verify that they don't drift in the future.  LP #2068777.
 
 1.11.0 (2024-05-31)
@@ -439,5 +448,3 @@
 ----------------
 
 - Initial release.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkginfo-1.11.1/pkginfo.egg-info/SOURCES.txt 
new/pkginfo-1.11.2/pkginfo.egg-info/SOURCES.txt
--- old/pkginfo-1.11.1/pkginfo.egg-info/SOURCES.txt     2024-06-08 
18:09:22.000000000 +0200
+++ new/pkginfo-1.11.2/pkginfo.egg-info/SOURCES.txt     2024-10-10 
19:35:42.000000000 +0200
@@ -14,6 +14,7 @@
 docs/index.rst
 docs/indexes.rst
 docs/metadata.rst
+docs/examples/broken-tarball.tar.gz
 docs/examples/distlib-0.3.1-py2.py3-none-any.whl
 docs/examples/invpkginfo-0.1.zip
 docs/examples/mypackage-0.1-cp26-none-linux_x86_64.whl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkginfo-1.11.1/pkginfo.egg-info/entry_points.txt 
new/pkginfo-1.11.2/pkginfo.egg-info/entry_points.txt
--- old/pkginfo-1.11.1/pkginfo.egg-info/entry_points.txt        2024-06-08 
18:09:22.000000000 +0200
+++ new/pkginfo-1.11.2/pkginfo.egg-info/entry_points.txt        2024-10-10 
19:35:42.000000000 +0200
@@ -1,3 +1,2 @@
 [console_scripts]
 pkginfo = pkginfo.commandline:main
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkginfo-1.11.1/setup.py new/pkginfo-1.11.2/setup.py
--- old/pkginfo-1.11.1/setup.py 2024-06-08 18:07:57.000000000 +0200
+++ new/pkginfo-1.11.2/setup.py 2024-10-10 19:31:29.000000000 +0200
@@ -20,7 +20,7 @@
 
 setup(
     name='pkginfo',
-    version='1.11.1',
+    version='1.11.2',
     description='Query metadata from sdists / bdists / installed packages.',
     platforms=['Unix', 'Windows'],
     long_description='\n\n'.join([README, CHANGES]),

Reply via email to