Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-wheel for openSUSE:Factory checked in at 2022-12-04 14:57:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-wheel (Old) and /work/SRC/openSUSE:Factory/.python-wheel.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wheel" Sun Dec 4 14:57:41 2022 rev:30 rq:1039735 version:0.38.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-wheel/python-wheel.changes 2022-11-13 18:09:17.419553548 +0100 +++ /work/SRC/openSUSE:Factory/.python-wheel.new.1835/python-wheel.changes 2022-12-04 14:57:49.524087420 +0100 @@ -1,0 +2,9 @@ +Sat Dec 3 02:56:36 UTC 2022 - Yogalakshmi Arunachalam <yarunacha...@suse.com> + +- Update to version 0.38.4 + * Fixed PKG-INFO conversion in bdist_wheel mangling UTF-8 header values in METADATA (PR by Anderson Bravalheri) + +- Update to version 0.38.3 + * Fixed install failure when used with --no-binary, reported on Ubuntu 20.04, by removing setup_requires from setup.cfg + +------------------------------------------------------------------- Old: ---- wheel-0.38.2.tar.gz New: ---- wheel-0.38.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-wheel.spec ++++++ --- /var/tmp/diff_new_pack.QaTsX6/_old 2022-12-04 14:57:50.044090415 +0100 +++ /var/tmp/diff_new_pack.QaTsX6/_new 2022-12-04 14:57:50.060090508 +0100 @@ -31,7 +31,7 @@ %bcond_with test %endif Name: python-wheel%{psuffix} -Version: 0.38.2 +Version: 0.38.4 Release: 0 Summary: A built-package format for Python License: MIT ++++++ wheel-0.38.2.tar.gz -> wheel-0.38.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.38.2/docs/news.rst new/wheel-0.38.4/docs/news.rst --- old/wheel-0.38.2/docs/news.rst 2022-11-05 13:52:57.000000000 +0100 +++ new/wheel-0.38.4/docs/news.rst 2022-11-09 21:33:01.000000000 +0100 @@ -1,6 +1,16 @@ Release Notes ============= +**0.38.4 (2022-11-09)** + +- Fixed ``PKG-INFO`` conversion in ``bdist_wheel`` mangling UTF-8 header values in + ``METADATA`` (PR by Anderson Bravalheri) + +**0.38.3 (2022-11-08)** + +- Fixed install failure when used with ``--no-binary``, reported on Ubuntu 20.04, by + removing ``setup_requires`` from ``setup.cfg`` + **0.38.2 (2022-11-05)** - Fixed regression introduced in v0.38.1 which broke parsing of wheel file names with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.38.2/setup.cfg new/wheel-0.38.4/setup.cfg --- old/wheel-0.38.2/setup.cfg 2022-11-05 13:52:57.000000000 +0100 +++ new/wheel-0.38.4/setup.cfg 2022-11-09 21:33:01.000000000 +0100 @@ -32,7 +32,6 @@ = src packages = find: python_requires = >=3.7 -setup_requires = setuptools >= 45.2.0 zip_safe = False [options.packages.find] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.38.2/src/wheel/__init__.py new/wheel-0.38.4/src/wheel/__init__.py --- old/wheel-0.38.2/src/wheel/__init__.py 2022-11-05 13:52:57.000000000 +0100 +++ new/wheel-0.38.4/src/wheel/__init__.py 2022-11-09 21:33:01.000000000 +0100 @@ -1,3 +1,3 @@ from __future__ import annotations -__version__ = "0.38.2" +__version__ = "0.38.4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.38.2/src/wheel/bdist_wheel.py new/wheel-0.38.4/src/wheel/bdist_wheel.py --- old/wheel-0.38.2/src/wheel/bdist_wheel.py 2022-11-05 13:52:57.000000000 +0100 +++ new/wheel-0.38.4/src/wheel/bdist_wheel.py 2022-11-09 21:33:01.000000000 +0100 @@ -15,6 +15,7 @@ import warnings from collections import OrderedDict from email.generator import BytesGenerator, Generator +from email.policy import EmailPolicy from glob import iglob from io import BytesIO from shutil import rmtree @@ -534,8 +535,13 @@ adios(dependency_links_path) pkg_info_path = os.path.join(distinfo_path, "METADATA") + serialization_policy = EmailPolicy( + utf8=True, + mangle_from_=False, + max_line_length=0, + ) with open(pkg_info_path, "w", encoding="utf-8") as out: - Generator(out, mangle_from_=False, maxheaderlen=0).flatten(pkg_info) + Generator(out, policy=serialization_policy).flatten(pkg_info) for license_path in self.license_paths: filename = os.path.basename(license_path) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.38.2/tests/test_bdist_wheel.py new/wheel-0.38.4/tests/test_bdist_wheel.py --- old/wheel-0.38.2/tests/test_bdist_wheel.py 2022-11-05 13:52:57.000000000 +0100 +++ new/wheel-0.38.4/tests/test_bdist_wheel.py 2022-11-09 21:33:01.000000000 +0100 @@ -72,6 +72,45 @@ assert "åäö_æ¥æ¬èª.py".encode() in record +UTF8_PKG_INFO = """\ +Metadata-Version: 2.1 +Name: helloworld +Version: 42 +Author-email: "John X. ÃørçeÄ" <j...@utf8.org>, Îαμα ï æ± <g...@utf8.org> + + +UTF-8 æè¿° 説æ +""" + + +def test_preserve_unicode_metadata(monkeypatch, tmp_path): + monkeypatch.chdir(tmp_path) + egginfo = tmp_path / "dummy_dist.egg-info" + distinfo = tmp_path / "dummy_dist.dist-info" + + egginfo.mkdir() + (egginfo / "PKG-INFO").write_text(UTF8_PKG_INFO, encoding="utf-8") + (egginfo / "dependency_links.txt").touch() + + class simpler_bdist_wheel(bdist_wheel): + """Avoid messing with setuptools/distutils internals""" + + def __init__(self): + pass + + @property + def license_paths(self): + return [] + + cmd_obj = simpler_bdist_wheel() + cmd_obj.egg2dist(egginfo, distinfo) + + metadata = (distinfo / "METADATA").read_text(encoding="utf-8") + assert 'Author-email: "John X. ÃørçeÄ"' in metadata + assert "Îαμα ï æ± " in metadata + assert "UTF-8 æè¿° 説æ" in metadata + + def test_licenses_default(dummy_dist, monkeypatch, tmpdir): monkeypatch.chdir(dummy_dist) subprocess.check_call(