From 9a47f4c371f0ad27823398481c712dce33e349849f0e862785589d99c6b07a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Sat, 17 May 2025 16:10:47 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-twine revision 74a309a004a8760fd6664ad1e12a21ec --- python-twine.changes | 42 ++++++++++++++++++++ python-twine.spec | 16 +++++--- skip-unsupported-Metadata-Version-test.patch | 18 ++++----- twine-5.1.1.tar.gz | 3 -- twine-6.1.0.tar.gz | 3 ++ 5 files changed, 64 insertions(+), 18 deletions(-) delete mode 100644 twine-5.1.1.tar.gz create mode 100644 twine-6.1.0.tar.gz diff --git a/python-twine.changes b/python-twine.changes index 80f4e8c..e763f72 100644 --- a/python-twine.changes +++ b/python-twine.changes @@ -1,3 +1,45 @@ +------------------------------------------------------------------- +Sat Jan 25 21:08:56 UTC 2025 - Matej Cepl + +- Add missing Requires. + +------------------------------------------------------------------- +Fri Jan 24 15:30:25 UTC 2025 - ecsos + +- Update to 6.1.0 + * Features + - Twine now has preliminary built-in support for Trusted Publishing as an authentication mechanism. (#1194) + * Deprecations and Removals + - Remove support for egg and wininst distribution types. + These are not accepted by PyPI and not produced by any modern build-backends. (#1195) + - Twine no longer supports .tar.bz2 source distributions. (#1200) + * Misc + - packaging is used instead of pkginfo for parsing and validating metadata. + This aligns metadata validation to the one performed by PyPI. + packaging version 24.0 or later is required. Support for metadata version 2.4 + requires packaging 24.2 or later. pkginfo is not a dependency anymore. (#1180) + - Use "source" instead of None as pyversion for sdist uploads. This is what PyPI (and most likely other package indexes) expects. (#1191) +- Changes from 6.0.1 + * Bugfixes + - Fixed a regression where twine check would fail to expand wildcards, e.g. twine check 'dist/*'. (#1188) + * Misc + #1184 +- Changes from 6.0.0 + * Bugfixes + - Restore support for pkginfo 1.11 (#1116) + * Deprecations and Removals + - Username for PyPI and Test PyPI now defaults to __token__ but no longer overrides a username + configured in the environment or supplied on the command line. Workflows still supplying + anything other than __token__ for the username when uploading to PyPI or Test PyPI will now fail. + Either supply __token__ or do not supply a username at all. (#1121) + * Misc + #1024 + +------------------------------------------------------------------- +Thu Nov 14 03:51:14 UTC 2024 - Steve Kowalik + +- Skip a test broken by importlib_metadata 8.5+. + ------------------------------------------------------------------- Fri Oct 11 11:50:51 UTC 2024 - John Paul Adrian Glaubitz diff --git a/python-twine.spec b/python-twine.spec index 0cb50fd..f26d58c 100644 --- a/python-twine.spec +++ b/python-twine.spec @@ -1,7 +1,7 @@ # # spec file for package python-twine # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # 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 @@ %{?sle15_python_module_pythons} Name: python-twine -Version: 5.1.1 +Version: 6.1.0 Release: 0 Summary: Collection of utilities for interacting with PyPI License: Apache-2.0 @@ -28,11 +28,13 @@ Patch0: 0001-remove-disable-socket-pytest-opt.patch # PATCH-FIX-UPSTREAM skip-unsupported-Metadata-Version-test.patch gh#pypa/twine#1071 mcepl@suse.com # Skip failing test case Patch1: skip-unsupported-Metadata-Version-test.patch +BuildRequires: %{python_module id} BuildRequires: %{python_module importlib-metadata >= 3.6} BuildRequires: %{python_module jaraco.envs} BuildRequires: %{python_module jaraco.packaging >= 9} BuildRequires: %{python_module keyring >= 15.1} BuildRequires: %{python_module munch} +BuildRequires: %{python_module packaging >= 24.2} BuildRequires: %{python_module pip} BuildRequires: %{python_module pkginfo >= 1.8.1} BuildRequires: %{python_module portend} @@ -49,14 +51,15 @@ BuildRequires: %{python_module urllib3 >= 1.26.0} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-importlib-metadata >= 3.6 +Requires: python-id Requires: python-keyring >= 15.1 -Requires: python-pkginfo >= 1.8.1 +Requires: python-packaging Requires: python-readme_renderer >= 35.0 Requires: python-requests >= 2.20 Requires: python-requests-toolbelt >= 0.8.0 Requires: python-rfc3986 >= 1.4.0 Requires: python-rich >= 12.0.0 +Requires: python-urllib3 >= 1.26 Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch @@ -85,7 +88,8 @@ sed -i '1s/^#!.*//' twine/__main__.py # do not run integration tests rm tests/test_integration.py # test_check_status_code_for_wrong_repo_url is online test -%pytest -k 'not test_check_status_code_for_wrong_repo_url' +# test_package_from_egg broken by importlib_metadata 8.5+ +%pytest -k 'not (test_check_status_code_for_wrong_repo_url or test_package_from_egg)' %post %python_install_alternative twine @@ -98,6 +102,6 @@ rm tests/test_integration.py %license LICENSE %python_alternative %{_bindir}/twine %{python_sitelib}/twine -%{python_sitelib}/twine-%{version}*-info +%{python_sitelib}/twine-%{version}.dist-info %changelog diff --git a/skip-unsupported-Metadata-Version-test.patch b/skip-unsupported-Metadata-Version-test.patch index b0767b0..aabcdf7 100644 --- a/skip-unsupported-Metadata-Version-test.patch +++ b/skip-unsupported-Metadata-Version-test.patch @@ -2,19 +2,19 @@ tests/test_package.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -Index: twine-5.1.0/tests/test_package.py +Index: twine-6.1.0/tests/test_package.py =================================================================== ---- twine-5.1.0.orig/tests/test_package.py -+++ twine-5.1.0/tests/test_package.py -@@ -384,11 +384,6 @@ def test_fips_metadata_excludes_md5_and_ - "read_data, missing_fields", +--- twine-6.1.0.orig/tests/test_package.py ++++ twine-6.1.0/tests/test_package.py +@@ -349,11 +349,6 @@ def test_fips_metadata_excludes_md5_and_ + "read_data, exception_message", [ pytest.param( - b"Metadata-Version: 102.3\nName: test-package\nVersion: 1.0.0\n", -- "Name, Version", +- "'102.3' is not a valid metadata version", - id="unsupported Metadata-Version", - ), - pytest.param( - b"Metadata-Version: 2.3\nName: UNKNOWN\nVersion: UNKNOWN\n", - "Name, Version", - id="missing Name and Version", + b"Metadata-Version: 2.3\nName: test-package\nVersion: UNKNOWN\n", + "'UNKNOWN' is invalid for 'version'", + id="invalid Version", diff --git a/twine-5.1.1.tar.gz b/twine-5.1.1.tar.gz deleted file mode 100644 index ea51d73..0000000 --- a/twine-5.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9aa0825139c02b3434d913545c7b847a21c835e11597f5255842d457da2322db -size 225531 diff --git a/twine-6.1.0.tar.gz b/twine-6.1.0.tar.gz new file mode 100644 index 0000000..54b06a8 --- /dev/null +++ b/twine-6.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be324f6272eff91d07ee93f251edf232fc647935dd585ac003539b42404a8dbd +size 168404