From 9afc43355970040ba02c881dbedf75df4f87fa485429b3d62585fb2f08d64157 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 5 May 2023 14:27:24 +0000 Subject: [PATCH] =?UTF-8?q?-=20Update=20to=204.0.2:=20=20=20-=20Remove=20d?= =?UTF-8?q?eprecated=20function=20to=20fix=20twine=20check=20with=20pkginf?= =?UTF-8?q?o=20=20=20=20=201.9.0.=20=20=20-=20Improve=20logging=20when=20k?= =?UTF-8?q?eyring=20fails.=20=20=20-=20Reconfgure=20root=20logger=20to=20s?= =?UTF-8?q?how=20all=20log=20messages.=20=20=20-=20Drop=20support=20for=20?= =?UTF-8?q?Python=203.6.=20=20=20-=20Use=20Rich=20instead=20of=20tqdm=20fo?= =?UTF-8?q?r=20upload=20progress=20bar.=20=20=20-=20Remove=20Twine?= =?UTF-8?q?=E2=80=99s=20dependencies=20from=20the=20User-Agent=20header=20?= =?UTF-8?q?when=20=20=20=20=20uploading.=20=20=20-=20Improve=20detection?= =?UTF-8?q?=20of=20disabled=20BLAKE2=20hashing=20due=20to=20FIPS=20=20=20?= =?UTF-8?q?=20=20mode.=20=20=20-=20Restore=20warning=20for=20missing=20lon?= =?UTF-8?q?g=5Fdescription.=20=20=20-=20Add=20--verbose=20logging=20for=20?= =?UTF-8?q?querying=20keyring=20credentials.=20=20=20-=20Log=20all=20uploa?= =?UTF-8?q?d=20responses=20with=20--verbose.=20=20=20-=20Show=20more=20hel?= =?UTF-8?q?pful=20error=20message=20for=20invalid=20metadata.=20=20=20-=20?= =?UTF-8?q?Require=20a=20recent=20version=20of=20urllib3.=20=20=20-=20Add?= =?UTF-8?q?=20support=20for=20core=20metadata=20version=202.2,=20defined?= =?UTF-8?q?=20in=20PEP=20=20=20=20=20643.=20=20=20-=20Add=20support=20for?= =?UTF-8?q?=20Python=203.10.=20=20=20-=20Show=20more=20helpful=20messages?= =?UTF-8?q?=20for=20invalid=20passwords.=20=20=20-=20Allow=20the=20--skip-?= =?UTF-8?q?existing=20option=20to=20work=20with=20GCP=20Artifact=20=20=20?= =?UTF-8?q?=20=20Registry.=20=20=20-=20Add=20a=20helpful=20error=20message?= =?UTF-8?q?=20when=20an=20upload=20fails=20due=20to=20=20=20=20=20missing?= =?UTF-8?q?=20a=20trailing=20slash=20in=20the=20URL.=20=20=20-=20Generaliz?= =?UTF-8?q?e=20--verbose=20suggestion=20when=20an=20upload=20fails.=20=20?= =?UTF-8?q?=20-=20Improve=20error=20messages=20=20=20-=20Do=20not=20includ?= =?UTF-8?q?e=20md5=5Fdigest=20or=20blake2=5F256=5Fdigest=20if=20FIPS=20mod?= =?UTF-8?q?e=20=20=20=20=20is=20enabled=20on=20the=20host.=20This=20remove?= =?UTF-8?q?s=20those=20fields=20from=20the=20=20=20=20=20metadata=20before?= =?UTF-8?q?=20sending=20the=20metadata=20to=20the=20repository.=20-=20Add?= =?UTF-8?q?=20license=5Ffiles.patch=20to=20make=20pip=20happy.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-twine?expand=0&rev=35 --- 0001-remove-disable-socket-pytest-opt.patch | 16 +++++----- license_files.patch | 13 ++++++++ python-twine.changes | 34 +++++++++++++++++++++ python-twine.spec | 32 +++++++++---------- twine-3.4.1.tar.gz | 3 -- twine-4.0.2.tar.gz | 3 ++ 6 files changed, 73 insertions(+), 28 deletions(-) create mode 100644 license_files.patch delete mode 100644 twine-3.4.1.tar.gz create mode 100644 twine-4.0.2.tar.gz diff --git a/0001-remove-disable-socket-pytest-opt.patch b/0001-remove-disable-socket-pytest-opt.patch index 6b1f4a3..40aba97 100644 --- a/0001-remove-disable-socket-pytest-opt.patch +++ b/0001-remove-disable-socket-pytest-opt.patch @@ -1,13 +1,13 @@ Only in twine-3.4.1: .coverage Only in twine-3.4.1: .pytest_cache -diff -ur twine-3.4.1.orig/pytest.ini twine-3.4.1/pytest.ini ---- twine-3.4.1.orig/pytest.ini 2021-03-17 01:42:01.000000000 +0100 -+++ twine-3.4.1/pytest.ini 2021-07-11 19:52:39.020680128 +0200 -@@ -7,4 +7,3 @@ +--- + pytest.ini | 1 - + 1 file changed, 1 deletion(-) + +--- a/pytest.ini ++++ b/pytest.ini +@@ -6,4 +6,3 @@ filterwarnings= + ignore:the imp module is deprecated::setuptools addopts = - --cov=twine --cov-context=test --cov-report= - --disable-socket -Only in twine-3.4.1/tests: __pycache__ -Only in twine-3.4.1/twine/commands: __pycache__ -Only in twine-3.4.1/twine: __pycache__ diff --git a/license_files.patch b/license_files.patch new file mode 100644 index 0000000..2182ee5 --- /dev/null +++ b/license_files.patch @@ -0,0 +1,13 @@ +--- + 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 622aca8..b894740 100644 --- a/python-twine.changes +++ b/python-twine.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Fri May 5 13:44:23 UTC 2023 - Matej Cepl + +- Update to 4.0.2: + - Remove deprecated function to fix twine check with pkginfo + 1.9.0. + - Improve logging when keyring fails. + - Reconfgure root logger to show all log messages. + - Drop support for Python 3.6. + - Use Rich instead of tqdm for upload progress bar. + - Remove Twine’s dependencies from the User-Agent header when + uploading. + - Improve detection of disabled BLAKE2 hashing due to FIPS + mode. + - Restore warning for missing long_description. + - Add --verbose logging for querying keyring credentials. + - Log all upload responses with --verbose. + - Show more helpful error message for invalid metadata. + - Require a recent version of urllib3. + - Add support for core metadata version 2.2, defined in PEP + 643. + - Add support for Python 3.10. + - Show more helpful messages for invalid passwords. + - Allow the --skip-existing option to work with GCP Artifact + Registry. + - Add a helpful error message when an upload fails due to + missing a trailing slash in the URL. + - Generalize --verbose suggestion when an upload fails. + - Improve error messages + - Do not include md5_digest or blake2_256_digest if FIPS mode + is enabled on the host. This removes those fields from the + metadata before sending the metadata to the repository. +- Add license_files.patch to make pip happy. + ------------------------------------------------------------------- Fri Apr 21 12:38:02 UTC 2023 - Dirk Müller diff --git a/python-twine.spec b/python-twine.spec index ef1ecef..26f9126 100644 --- a/python-twine.spec +++ b/python-twine.spec @@ -16,22 +16,24 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 %{?sle15_python_module_pythons} Name: python-twine -Version: 3.4.1 +Version: 4.0.2 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 -Patch1: 0001-remove-disable-socket-pytest-opt.patch -BuildRequires: %{python_module colorama >= 0.4.3} +Patch0: 0001-remove-disable-socket-pytest-opt.patch +# PATCH-FIX-UPSTREAM license_files.patch bsc#[0-9]+ mcepl@suse.com +# license_file -> license_files +Patch1: license_files.patch BuildRequires: %{python_module importlib-metadata} 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 portend} BuildRequires: %{python_module pretend} @@ -40,12 +42,12 @@ BuildRequires: %{python_module readme_renderer >= 21.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 tqdm >= 4.14} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-colorama >= 0.4.3 Requires: python-importlib-metadata Requires: python-keyring >= 15.1 Requires: python-pkginfo >= 1.4.2 @@ -53,10 +55,10 @@ Requires: python-readme_renderer >= 21.0 Requires: python-requests >= 2.20 Requires: python-requests-toolbelt >= 0.8.0 Requires: python-rfc3986 >= 1.4.0 -Requires: python-setuptools >= 0.7.0 -Requires: python-tqdm >= 4.14 +Requires: python-rich Requires(post): update-alternatives Requires(postun):update-alternatives +BuildArch: noarch %python_subpackages %description @@ -66,17 +68,15 @@ Currently it supports registering projects, uploading distributions, and checking, if descriptions will render correctly. %prep -%setup -q -n twine-%{version} -%patch1 -p1 +%autosetup -p1 -n twine-%{version} sed -i '1s/^#!.*//' twine/__main__.py -sed -i 's/--cov.*$//' pytest.ini %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/twine %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -95,10 +95,8 @@ rm tests/test_integration.py %files %{python_files} %doc AUTHORS README.rst %license LICENSE -%dir %{python_sitelib}/twine -%dir %{python_sitelib}/twine-%{version}-py*.egg-info -%{python_sitelib}/twine/* -%{python_sitelib}/twine-%{version}-py*.egg-info/* %python_alternative %{_bindir}/twine +%{python_sitelib}/twine +%{python_sitelib}/twine-%{version}*-info %changelog diff --git a/twine-3.4.1.tar.gz b/twine-3.4.1.tar.gz deleted file mode 100644 index 2c18ecf..0000000 --- a/twine-3.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a56c985264b991dc8a8f4234eb80c5af87fa8080d0c224ad8f2cd05a2c22e83b -size 215191 diff --git a/twine-4.0.2.tar.gz b/twine-4.0.2.tar.gz new file mode 100644 index 0000000..f9a79b3 --- /dev/null +++ b/twine-4.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e102ef5fdd5a20661eb88fad46338806c3bd32cf1db729603fe3697b1bc83c8 +size 215249