Hello community,

here is the log from the commit of package python-wheel for openSUSE:Factory 
checked in at 2019-02-25 17:45:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-wheel (Old)
 and      /work/SRC/openSUSE:Factory/.python-wheel.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-wheel"

Mon Feb 25 17:45:36 2019 rev:17 rq:674941 version:0.33.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-wheel/python-wheel.changes        
2018-11-28 11:09:15.163244717 +0100
+++ /work/SRC/openSUSE:Factory/.python-wheel.new.28833/python-wheel.changes     
2019-02-25 17:45:39.742899988 +0100
@@ -1,0 +2,13 @@
+Thu Feb 14 11:29:38 UTC 2019 - John Vandenberg <[email protected]>
+
+- Remove build dependency on pytest-cov
+- update to version 0.33.0
+  * Added the `--build-number` option to the `wheel pack` command
+  * Fixed bad shebangs sneaking into wheels
+  * Fixed documentation issue with `wheel pack` erroneously being
+    called `wheel repack`
+  * Fixed filenames with "bad" characters (like commas) not being
+    quoted in `RECORD` (PR by Paul Moore)
+  * Sort requirements extras to ensure deterministic builds
+
+-------------------------------------------------------------------

Old:
----
  wheel-0.32.3.tar.gz

New:
----
  wheel-0.33.0.tar.gz

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

Other differences:
------------------
++++++ python-wheel.spec ++++++
--- /var/tmp/diff_new_pack.nujCAe/_old  2019-02-25 17:45:41.822899133 +0100
+++ /var/tmp/diff_new_pack.nujCAe/_new  2019-02-25 17:45:41.854899120 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-wheel
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-wheel
-Version:        0.32.3
+Version:        0.33.0
 Release:        0
 Summary:        A built-package format for Python
 License:        MIT
@@ -38,12 +38,9 @@
 Recommends:     python-pyxdg
 BuildArch:      noarch
 # SECTION test
-BuildRequires:  %{python_module cov-core >= 1.6}
-BuildRequires:  %{python_module coverage}
 # Not compatible currently, see 
https://github.com/jaraco/keyrings.alt/issues/20
 #BuildRequires:  %%{python_module keyrings.alt}
 BuildRequires:  %{python_module keyring}
-BuildRequires:  %{python_module pytest-cov}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module pyxdg}
 # /SECTION
@@ -73,6 +70,11 @@
 
 %prep
 %setup -q -n wheel-%{version}
+# Remove addopts as it requires pytest-cov.  The reported coverage is not
+# nearly near 100%, and setup.cfg doesnt provide a minimum acceptable
+# coverage percentage, so coverage is not a metric which can be used
+# by automated QA to determine acceptance of the package.
+sed -i '/addopts = /d' setup.cfg
 
 %build
 %python_build

++++++ wheel-0.32.3.tar.gz -> wheel-0.33.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/.travis.yml new/wheel-0.33.0/.travis.yml
--- old/wheel-0.32.3/.travis.yml        2018-11-19 01:16:37.000000000 +0100
+++ new/wheel-0.33.0/.travis.yml        2019-02-12 07:58:33.000000000 +0100
@@ -15,12 +15,11 @@
 
     - stage: test
       env: TOXENV=pypy
-      dist: trusty
-      python: pypy
+      python: pypy2.7-6.0
 
     - stage: test
       env: TOXENV=pypy3
-      python: pypy3.5
+      python: pypy3.5-6.0
 
     - stage: test
       env: TOXENV=py27
@@ -48,7 +47,7 @@
       python: "3.7"
 
     - stage: deploy to PyPI
-      install: pip install -U setuptools
+      install: true
       script: skip
       after_success: true
       deploy:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/docs/news.rst 
new/wheel-0.33.0/docs/news.rst
--- old/wheel-0.32.3/docs/news.rst      2018-11-19 01:16:37.000000000 +0100
+++ new/wheel-0.33.0/docs/news.rst      2019-02-12 07:58:33.000000000 +0100
@@ -1,6 +1,17 @@
 Release Notes
 =============
 
+**0.33.0**
+
+- Added the ``--build-number`` option to the ``wheel pack`` command
+- Fixed bad shebangs sneaking into wheels
+- Fixed documentation issue with ``wheel pack`` erroneously being called
+  ``wheel repack``
+- Fixed filenames with "bad" characters (like commas) not being quoted in
+  ``RECORD`` (PR by Paul Moore)
+- Sort requirements extras to ensure deterministic builds
+  (PR by PoncinMatthieu)
+
 **0.32.3**
 
 - Fixed compatibility with Python 2.7.0 – 2.7.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/docs/reference/wheel_pack.rst 
new/wheel-0.33.0/docs/reference/wheel_pack.rst
--- old/wheel-0.32.3/docs/reference/wheel_pack.rst      2018-11-19 
01:16:37.000000000 +0100
+++ new/wheel-0.33.0/docs/reference/wheel_pack.rst      2019-02-12 
07:58:33.000000000 +0100
@@ -1,12 +1,12 @@
-wheel repack
-============
+wheel pack
+==========
 
 Usage
 -----
 
 ::
 
-    wheel repack <wheel_directory>
+    wheel pack <wheel_directory>
 
 
 Description
@@ -26,14 +26,17 @@
 
     Directory to put the new wheel file into.
 
+.. option:: --build-number <tag>
+
+    Override the build tag in the new wheel file name
 
 Examples
 --------
 
-* Unpack a wheel, add a dummy module and then repack it::
+* Unpack a wheel, add a dummy module and then repack it (with a new build 
number)::
 
     $ wheel unpack someproject-1.5.0-py2-py3-none.whl
     Unpacking to: ./someproject-1.5.0
     $ touch someproject-1.5.0/somepackage/module.py
-    $ wheel repack someproject-1.5.0
-    Repacking wheel as ./someproject-1.5.0-py2-py3-none.whl...OK
+    $ wheel pack --build-number 2 someproject-1.5.0
+    Repacking wheel as ./someproject-1.5.0-2-py2-py3-none.whl...OK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/tests/cli/test_pack.py 
new/wheel-0.33.0/tests/cli/test_pack.py
--- old/wheel-0.32.3/tests/cli/test_pack.py     2018-11-19 01:16:37.000000000 
+0100
+++ new/wheel-0.33.0/tests/cli/test_pack.py     2019-02-12 07:58:33.000000000 
+0100
@@ -1,6 +1,8 @@
 import os
 from zipfile import ZipFile
 
+import pytest
+
 from wheel.cli.pack import pack
 
 THISDIR = os.path.dirname(__file__)
@@ -8,15 +10,19 @@
 TESTWHEEL_PATH = os.path.join(THISDIR, '..', 'testdata', TESTWHEEL_NAME)
 
 
-def test_pack(tmpdir_factory, tmpdir):
[email protected]('build_number, filename', [
+    (None, 'test-1.0-py2.py3-none-any.whl'),
+    ('2b', 'test-1.0-2b-py2.py3-none-any.whl')
+], ids=['nobuildnum', 'buildnum'])
+def test_pack(tmpdir_factory, tmpdir, build_number, filename):
     unpack_dir = str(tmpdir_factory.mktemp('wheeldir'))
     with ZipFile(TESTWHEEL_PATH) as zf:
         old_record = zf.read('test-1.0.dist-info/RECORD')
         old_record_lines = sorted(line.rstrip() for line in 
old_record.split(b'\n') if line)
         zf.extractall(unpack_dir)
 
-    pack(unpack_dir, str(tmpdir))
-    new_wheel_path = tmpdir.join(TESTWHEEL_NAME)
+    pack(unpack_dir, str(tmpdir), build_number)
+    new_wheel_path = tmpdir.join(filename)
     assert new_wheel_path.isfile()
 
     with ZipFile(str(new_wheel_path)) as zf:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/tests/test_bdist_wheel.py 
new/wheel-0.33.0/tests/test_bdist_wheel.py
--- old/wheel-0.32.3/tests/test_bdist_wheel.py  2018-11-19 01:16:37.000000000 
+0100
+++ new/wheel-0.33.0/tests/test_bdist_wheel.py  2019-02-12 07:58:33.000000000 
+0100
@@ -14,7 +14,7 @@
     'dummy_dist-1.0.dist-info/RECORD'
 }
 DEFAULT_LICENSE_FILES = {
-    'LICENSE', 'LICENSE.txt', 'LICENCE', 'LICENSE.txt', 'COPYING',
+    'LICENSE', 'LICENSE.txt', 'LICENCE', 'LICENCE.txt', 'COPYING',
     'COPYING.md', 'NOTICE', 'NOTICE.rst', 'AUTHORS', 'AUTHORS.txt'
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/tests/test_wheelfile.py 
new/wheel-0.33.0/tests/test_wheelfile.py
--- old/wheel-0.32.3/tests/test_wheelfile.py    2018-11-19 01:16:37.000000000 
+0100
+++ new/wheel-0.33.0/tests/test_wheelfile.py    2019-02-12 07:58:33.000000000 
+0100
@@ -1,6 +1,7 @@
 # coding: utf-8
 from __future__ import unicode_literals
 
+import sys
 from zipfile import ZipFile, ZIP_DEFLATED
 
 import pytest
@@ -110,17 +111,21 @@
 def test_write_str(wheel_path):
     with WheelFile(wheel_path, 'w') as wf:
         wf.writestr(native('hello/héllö.py'), as_bytes('print("Héllö, 
world!")\n'))
+        wf.writestr(native('hello/h,ll,.py'), as_bytes('print("Héllö, 
world!")\n'))
 
     with ZipFile(wheel_path, 'r') as zf:
         infolist = zf.infolist()
-        assert len(infolist) == 2
+        assert len(infolist) == 3
         assert infolist[0].filename == native('hello/héllö.py')
         assert infolist[0].file_size == 25
-        assert infolist[1].filename == 'test-1.0.dist-info/RECORD'
+        assert infolist[1].filename == native('hello/h,ll,.py')
+        assert infolist[1].file_size == 25
+        assert infolist[2].filename == 'test-1.0.dist-info/RECORD'
 
         record = zf.read('test-1.0.dist-info/RECORD')
         assert record == as_bytes(
             
'hello/héllö.py,sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25\n'
+            
'"hello/h,ll,.py",sha256=bv-QV3RciQC2v3zL8Uvhd_arp40J5A9xmyubN34OVwo,25\n'
             'test-1.0.dist-info/RECORD,,\n')
 
 
@@ -132,7 +137,7 @@
         build_dir.join(filename).write(filename + '\n')
 
     # The earliest date representable in TarInfos, 1980-01-01
-    monkeypatch.setenv('SOURCE_DATE_EPOCH', '315576060')
+    monkeypatch.setenv(native('SOURCE_DATE_EPOCH'), native('315576060'))
 
     with WheelFile(wheel_path, 'w') as wf:
         wf.write_files(str(build_dir))
@@ -143,6 +148,8 @@
             assert info.compress_type == ZIP_DEFLATED
 
 
[email protected](sys.platform == 'win32',
+                    reason='Windows does not support UNIX-like permissions')
 def test_attributes(tmpdir_factory, wheel_path):
     # With the change from ZipFile.write() to .writestr(), we need to manually
     # set member attributes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/tests/testdata/headers.dist/setup.cfg 
new/wheel-0.33.0/tests/testdata/headers.dist/setup.cfg
--- old/wheel-0.32.3/tests/testdata/headers.dist/setup.cfg      2018-11-19 
01:16:37.000000000 +0100
+++ new/wheel-0.33.0/tests/testdata/headers.dist/setup.cfg      2019-02-12 
07:58:33.000000000 +0100
@@ -1,2 +1,2 @@
-[wheel]
+[bdist_wheel]
 universal=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/wheel/__init__.py 
new/wheel-0.33.0/wheel/__init__.py
--- old/wheel-0.32.3/wheel/__init__.py  2018-11-19 01:16:37.000000000 +0100
+++ new/wheel-0.33.0/wheel/__init__.py  2019-02-12 07:58:33.000000000 +0100
@@ -1,2 +1,2 @@
 # __variables__ with double-quoted values will be available in setup.py:
-__version__ = "0.32.3"
+__version__ = "0.33.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/wheel/bdist_wheel.py 
new/wheel-0.33.0/wheel/bdist_wheel.py
--- old/wheel-0.32.3/wheel/bdist_wheel.py       2018-11-19 01:16:37.000000000 
+0100
+++ new/wheel-0.33.0/wheel/bdist_wheel.py       2019-02-12 07:58:33.000000000 
+0100
@@ -183,6 +183,10 @@
     def run(self):
         build_scripts = self.reinitialize_command('build_scripts')
         build_scripts.executable = 'python'
+        build_scripts.force = True
+
+        build_ext = self.reinitialize_command('build_ext')
+        build_ext.inplace = False
 
         if not self.skip_build:
             self.run_command('build')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/wheel/cli/__init__.py 
new/wheel-0.33.0/wheel/cli/__init__.py
--- old/wheel-0.32.3/wheel/cli/__init__.py      2018-11-19 01:16:37.000000000 
+0100
+++ new/wheel-0.33.0/wheel/cli/__init__.py      2019-02-12 07:58:33.000000000 
+0100
@@ -54,6 +54,7 @@
     repack_parser.add_argument('directory', help='Root directory of the 
unpacked wheel')
     repack_parser.add_argument('--dest-dir', '-d', default=os.path.curdir,
                                help="Directory to store the wheel (default 
%(default)s)")
+    repack_parser.add_argument('--build-number', help="Build tag to use in the 
wheel name")
     repack_parser.set_defaults(func=pack_f)
 
     convert_parser = s.add_parser('convert', help='Convert egg or wininst to 
wheel')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/wheel/cli/pack.py 
new/wheel-0.33.0/wheel/cli/pack.py
--- old/wheel-0.32.3/wheel/cli/pack.py  2018-11-19 01:16:37.000000000 +0100
+++ new/wheel-0.33.0/wheel/cli/pack.py  2019-02-12 07:58:33.000000000 +0100
@@ -10,7 +10,7 @@
 DIST_INFO_RE = 
re.compile(r"^(?P<namever>(?P<name>.+?)-(?P<ver>\d.*?))\.dist-info$")
 
 
-def pack(directory, dest_dir):
+def pack(directory, dest_dir, build_number=None):
     """Repack a previously unpacked wheel directory into a new wheel file.
 
     The .dist-info/WHEEL file must contain one or more tags so that the target
@@ -31,6 +31,10 @@
     dist_info_dir = dist_info_dirs[0]
     name_version = DIST_INFO_RE.match(dist_info_dir).group('namever')
 
+    # Add the build number if specific
+    if build_number:
+        name_version += '-' + build_number
+
     # Read the tags from .dist-info/WHEEL
     with open(os.path.join(directory, dist_info_dir, 'WHEEL')) as f:
         tags = [line.split(' ')[1].rstrip() for line in f if 
line.startswith('Tag: ')]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/wheel/metadata.py 
new/wheel-0.33.0/wheel/metadata.py
--- old/wheel-0.32.3/wheel/metadata.py  2018-11-19 01:16:37.000000000 +0100
+++ new/wheel-0.33.0/wheel/metadata.py  2019-02-12 07:58:33.000000000 +0100
@@ -34,7 +34,7 @@
     for req in requirements:
         parsed_requirement = pkg_resources.Requirement.parse(req)
         spec = requires_to_requires_dist(parsed_requirement)
-        extras = ",".join(parsed_requirement.extras)
+        extras = ",".join(sorted(parsed_requirement.extras))
         if extras:
             extras = "[%s]" % extras
         yield (parsed_requirement.project_name + extras + spec)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/wheel/util.py 
new/wheel-0.33.0/wheel/util.py
--- old/wheel-0.32.3/wheel/util.py      2018-11-19 01:16:37.000000000 +0100
+++ new/wheel-0.33.0/wheel/util.py      2019-02-12 07:58:33.000000000 +0100
@@ -1,10 +1,13 @@
 import base64
+import io
 import sys
 
 
 if sys.version_info[0] < 3:
     text_type = unicode  # noqa: F821
 
+    StringIO = io.BytesIO
+
     def native(s, encoding='utf-8'):
         if isinstance(s, unicode):
             return s.encode(encoding)
@@ -12,6 +15,8 @@
 else:
     text_type = str
 
+    StringIO = io.StringIO
+
     def native(s, encoding='utf-8'):
         if isinstance(s, bytes):
             return s.decode(encoding)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/wheel-0.32.3/wheel/wheelfile.py 
new/wheel-0.33.0/wheel/wheelfile.py
--- old/wheel-0.32.3/wheel/wheelfile.py 2018-11-19 01:16:37.000000000 +0100
+++ new/wheel-0.33.0/wheel/wheelfile.py 2019-02-12 07:58:33.000000000 +0100
@@ -1,5 +1,6 @@
 from __future__ import print_function
 
+import csv
 import hashlib
 import os.path
 import re
@@ -9,7 +10,7 @@
 from zipfile import ZIP_DEFLATED, ZipInfo, ZipFile
 
 from wheel.cli import WheelError
-from wheel.util import urlsafe_b64decode, as_unicode, native, 
urlsafe_b64encode, as_bytes
+from wheel.util import urlsafe_b64decode, as_unicode, native, 
urlsafe_b64encode, as_bytes, StringIO
 
 # Non-greedy matching of an optional build number may be too clever (more
 # invalid wheel filenames will match). Separate regex for .dist-info?
@@ -148,13 +149,20 @@
     def close(self):
         # Write RECORD
         if self.fp is not None and self.mode == 'w' and self._file_hashes:
-            content = '\n'.join('{},{}={},{}'.format(fname, algorithm, hash_,
-                                                     self._file_sizes[fname])
-                                for fname, (algorithm, hash_) in 
self._file_hashes.items())
-            content += '\n{},,\n'.format(self.record_path)
+            data = StringIO()
+            writer = csv.writer(data, delimiter=',', quotechar='"', 
lineterminator='\n')
+            writer.writerows((
+                (
+                    fname,
+                    algorithm + "=" + hash_,
+                    self._file_sizes[fname]
+                )
+                for fname, (algorithm, hash_) in self._file_hashes.items()
+            ))
+            writer.writerow((format(self.record_path), "", ""))
             zinfo = ZipInfo(native(self.record_path), 
date_time=get_zipinfo_datetime())
             zinfo.compress_type = ZIP_DEFLATED
             zinfo.external_attr = 0o664 << 16
-            self.writestr(zinfo, as_bytes(content))
+            self.writestr(zinfo, as_bytes(data.getvalue()))
 
         ZipFile.close(self)


Reply via email to