diff --git a/0001-remove-disable-socket-pytest-opt.patch b/0001-remove-disable-socket-pytest-opt.patch index 40aba97..b91b8a2 100644 --- a/0001-remove-disable-socket-pytest-opt.patch +++ b/0001-remove-disable-socket-pytest-opt.patch @@ -6,8 +6,9 @@ Only in twine-3.4.1: .pytest_cache --- a/pytest.ini +++ b/pytest.ini -@@ -6,4 +6,3 @@ filterwarnings= +@@ -6,5 +6,4 @@ filterwarnings= ignore:the imp module is deprecated::setuptools addopts = - --disable-socket + --ignore-glob '*integration*.py' diff --git a/license_files.patch b/license_files.patch deleted file mode 100644 index 2182ee5..0000000 --- a/license_files.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- - setup.cfg | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/setup.cfg -+++ b/setup.cfg -@@ -1,5 +1,5 @@ - [metadata] --license_file = LICENSE -+license_files = LICENSE - name = twine - author = Donald Stufft and individual contributors - author_email = donald@stufft.io diff --git a/python-twine.changes b/python-twine.changes index b894740..fe37ff7 100644 --- a/python-twine.changes +++ b/python-twine.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Mar 18 08:14:45 UTC 2024 - Matej Cepl + +- Update to 5.0.0: + - Use email.message instead of cgi as cgi has been deprecated +- Remove upstreamed patch license_files.patch +- Add skip-unsupported-Metadata-Version-test.patch + (gh#pypa/twine#1071) to skip failing test case. + ------------------------------------------------------------------- Fri May 5 13:44:23 UTC 2023 - Matej Cepl diff --git a/python-twine.spec b/python-twine.spec index 53dbb06..b9a8c46 100644 --- a/python-twine.spec +++ b/python-twine.spec @@ -1,7 +1,7 @@ # # spec file for package python-twine # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,45 +19,46 @@ %define skip_python2 1 %{?sle15_python_module_pythons} Name: python-twine -Version: 4.0.2 +Version: 5.0.0 Release: 0 Summary: Collection of utilities for interacting with PyPI License: Apache-2.0 URL: https://github.com/pypa/twine Source: https://files.pythonhosted.org/packages/source/t/twine/twine-%{version}.tar.gz Patch0: 0001-remove-disable-socket-pytest-opt.patch -# PATCH-FIX-UPSTREAM license_files.patch gh#pypa/twine!992 mcepl@suse.com -# license_file -> license_files -Patch1: license_files.patch -BuildRequires: %{python_module importlib-metadata} +# 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 importlib-metadata >= 3.6} BuildRequires: %{python_module jaraco.envs} BuildRequires: %{python_module keyring >= 15.1} BuildRequires: %{python_module munch} BuildRequires: %{python_module pip} -BuildRequires: %{python_module pkginfo >= 1.4.2} +BuildRequires: %{python_module pkginfo >= 1.8.1} BuildRequires: %{python_module portend} BuildRequires: %{python_module pretend} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module readme_renderer >= 21.0} +BuildRequires: %{python_module readme_renderer >= 35.0} BuildRequires: %{python_module requests >= 2.20} BuildRequires: %{python_module requests-toolbelt >= 0.8.0} BuildRequires: %{python_module rfc3986 >= 1.4.0} -BuildRequires: %{python_module rich} -BuildRequires: %{python_module setuptools >= 0.7.0} -BuildRequires: %{python_module setuptools_scm >= 1.15} +BuildRequires: %{python_module rich >= 12.0.0} +BuildRequires: %{python_module setuptools >= 45} +BuildRequires: %{python_module setuptools_scm >= 6.0} +BuildRequires: %{python_module urllib3 >= 1.26.0} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-importlib-metadata +Requires: python-importlib-metadata >= 3.6 Requires: python-keyring >= 15.1 -Requires: python-pkginfo >= 1.4.2 -Requires: python-readme_renderer >= 21.0 +Requires: python-pkginfo >= 1.8.1 +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 +Requires: python-rich >= 12.0.0 Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages diff --git a/skip-unsupported-Metadata-Version-test.patch b/skip-unsupported-Metadata-Version-test.patch new file mode 100644 index 0000000..03b5bac --- /dev/null +++ b/skip-unsupported-Metadata-Version-test.patch @@ -0,0 +1,23 @@ +--- + tests/test_package.py | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/tests/test_package.py ++++ b/tests/test_package.py +@@ -339,11 +339,11 @@ def test_fips_metadata_excludes_md5_and_ + @pytest.mark.parametrize( + "read_data, missing_fields", + [ +- pytest.param( +- b"Metadata-Version: 2.3\nName: test-package\nVersion: 1.0.0\n", +- "Name, Version", +- id="unsupported Metadata-Version", +- ), ++# pytest.param( ++# b"Metadata-Version: 2.3\nName: test-package\nVersion: 1.0.0\n", ++# "Name, Version", ++# id="unsupported Metadata-Version", ++# ), + pytest.param( + b"Metadata-Version: 2.2\nName: UNKNOWN\nVersion: UNKNOWN\n", + "Name, Version", diff --git a/twine-4.0.2.tar.gz b/twine-4.0.2.tar.gz deleted file mode 100644 index f9a79b3..0000000 --- a/twine-4.0.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9e102ef5fdd5a20661eb88fad46338806c3bd32cf1db729603fe3697b1bc83c8 -size 215249 diff --git a/twine-5.0.0.tar.gz b/twine-5.0.0.tar.gz new file mode 100644 index 0000000..96cbc53 --- /dev/null +++ b/twine-5.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89b0cc7d370a4b66421cc6102f269aa910fe0f1861c124f573cf2ddedbc10cf4 +size 222119