openSUSE Commits
Threads by month
- ----- 2024 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
July 2024
- 1 participants
- 1521 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package virt-manager for openSUSE:Factory checked in at 2024-07-01 11:19:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-manager (Old)
and /work/SRC/openSUSE:Factory/.virt-manager.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "virt-manager"
Mon Jul 1 11:19:27 2024 rev:257 rq:1184046 version:4.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-manager/virt-manager.changes 2024-06-21 16:03:04.421775532 +0200
+++ /work/SRC/openSUSE:Factory/.virt-manager.new.18349/virt-manager.changes 2024-07-01 11:19:30.097161646 +0200
@@ -1,0 +2,6 @@
+Thu Jun 20 13:40:47 UTC 2024 - Markéta Machová <mmachova(a)suse.com>
+
+- remove dependency on /usr/bin/python3 using
+ %python3_fix_shebang macro, [bsc#1212476]
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ virt-manager.spec ++++++
--- /var/tmp/diff_new_pack.4vE2v7/_old 2024-07-01 11:19:36.209384314 +0200
+++ /var/tmp/diff_new_pack.4vE2v7/_new 2024-07-01 11:19:36.213384460 +0200
@@ -290,6 +290,8 @@
install -m 755 %SOURCE3 %{buildroot}/usr/lib/supportconfig/plugins/virt_manager
chmod -x %{buildroot}%{_datadir}/virt-manager/virtManager/virtmanager.py
+%python3_fix_shebang
+
%find_lang %{name}
%endif
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package obs-service-tar_scm for openSUSE:Factory checked in at 2024-07-01 11:19:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-tar_scm (Old)
and /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-tar_scm"
Mon Jul 1 11:19:23 2024 rev:81 rq:1184039 version:0.10.43
Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes 2024-02-23 16:40:21.112511025 +0100
+++ /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new.18349/obs-service-tar_scm.changes 2024-07-01 11:19:28.857116471 +0200
@@ -1,0 +2,6 @@
+Fri Jun 14 18:33:15 UTC 2024 - Matej Cepl <mcepl(a)cepl.eu>
+
+- Fix shebang of the script to use the explicit version of Python
+ (bsc#1212476).
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-tar_scm.spec ++++++
--- /var/tmp/diff_new_pack.IMsrSF/_old 2024-07-01 11:19:29.673146199 +0200
+++ /var/tmp/diff_new_pack.IMsrSF/_new 2024-07-01 11:19:29.677146345 +0200
@@ -261,6 +261,9 @@
%install
%if %{without obs_scm_testsuite}
make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}" SYSCFG="%{_sysconfdir}" PYTHON="%{python_path}" WITH_GBP="%{enable_gbp}"
+# Doing %%python3_fix_shebang_path old fashioned way for the backward compatibility
+sed -i "1s@#\\!.*python\S*@#\\!$(realpath %__python3)@" \
+ %{buildroot}%{_prefix}/lib/obs/service/tar_scm
%else
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-debugpy for openSUSE:Factory checked in at 2024-07-01 11:19:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-debugpy (Old)
and /work/SRC/openSUSE:Factory/.python-debugpy.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-debugpy"
Mon Jul 1 11:19:22 2024 rev:17 rq:1184031 version:1.8.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-debugpy/python-debugpy.changes 2024-04-03 17:18:43.725766209 +0200
+++ /work/SRC/openSUSE:Factory/.python-debugpy.new.18349/python-debugpy.changes 2024-07-01 11:19:27.881080915 +0200
@@ -1,0 +2,9 @@
+Sat Jun 29 19:34:29 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.8.2:
+ * Fixed an issue where ApiScan couldn't scan some of our
+ binaries correctly. This involved changing some linker flags
+ and re-compiling/re-linking some of the pydevd executables
+ and dlls.
+
+-------------------------------------------------------------------
Old:
----
debugpy-1.8.1.tar.gz
New:
----
debugpy-1.8.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-debugpy.spec ++++++
--- /var/tmp/diff_new_pack.ustGvG/_old 2024-07-01 11:19:28.349097964 +0200
+++ /var/tmp/diff_new_pack.ustGvG/_new 2024-07-01 11:19:28.353098110 +0200
@@ -27,7 +27,7 @@
%endif
%{?sle15_python_module_pythons}
Name: python-debugpy%{psuffix}
-Version: 1.8.1
+Version: 1.8.2
Release: 0
Summary: An implementation of the Debug Adapter Protocol for Python
License: MIT
++++++ debugpy-1.8.1.tar.gz -> debugpy-1.8.2.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-debugpy/debugpy-1.8.1.tar.gz /work/SRC/openSUSE:Factory/.python-debugpy.new.18349/debugpy-1.8.2.tar.gz differ: char 13, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-Faker for openSUSE:Factory checked in at 2024-07-01 11:19:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Faker (Old)
and /work/SRC/openSUSE:Factory/.python-Faker.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Faker"
Mon Jul 1 11:19:21 2024 rev:57 rq:1184016 version:26.0.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Faker/python-Faker.changes 2024-06-12 15:38:00.685442941 +0200
+++ /work/SRC/openSUSE:Factory/.python-Faker.new.18349/python-Faker.changes 2024-07-01 11:19:26.361025539 +0200
@@ -1,0 +2,10 @@
+Sat Jun 29 16:42:25 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 26.0.0:
+ * Fix upper limit of nb_elements.
+ * Remove duplicate entry in currency provider.
+ * Change `pydecimal` type hint for `min_value`, `max_value` to
+ allow `int`s.
+ * Add support for Nigerian Yoruba names and surnames (`yo_NG`).
+
+-------------------------------------------------------------------
Old:
----
Faker-25.8.0.tar.gz
New:
----
Faker-26.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Faker.spec ++++++
--- /var/tmp/diff_new_pack.h2TJQH/_old 2024-07-01 11:19:26.901045212 +0200
+++ /var/tmp/diff_new_pack.h2TJQH/_new 2024-07-01 11:19:26.905045358 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-Faker
-Version: 25.8.0
+Version: 26.0.0
Release: 0
Summary: Python package that generates fake data
License: MIT
++++++ Faker-25.8.0.tar.gz -> Faker-26.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/CHANGELOG.md new/Faker-26.0.0/CHANGELOG.md
--- old/Faker-25.8.0/CHANGELOG.md 2024-06-07 19:47:16.000000000 +0200
+++ new/Faker-26.0.0/CHANGELOG.md 2024-06-26 23:16:48.000000000 +0200
@@ -1,11 +1,26 @@
## Changelog
+### [v26.0.0 - 2024-06-26](https://github.com/joke2k/faker/compare/v25.9.2...v26.0.0)
-### [v25.8.0 - 2024-05-07](https://github.com/joke2k/faker/compare/v25.7.0..v25.8.0)
+* Fix upper limit of nb_elements. Thanks @mileswatsonbjss.
+
+### [v25.9.2 - 2024-06-25](https://github.com/joke2k/faker/compare/v25.9.1...v25.9.2)
+
+* Remove duplicate entry in currency provider.
+
+### [v25.9.1 - 2024-06-20](https://github.com/joke2k/faker/compare/v25.9.0...v25.9.1)
+
+* Change `pydecimal` type hint for `min_value`, `max_value` to allow `int`s. Thanks @parsariyahi.
+
+### [v25.9.0 - 2024-06-20](https://github.com/joke2k/faker/compare/v25.8.0...v25.9.0)
+
+* Add support for Nigerian Yoruba names and surnames (`yo_NG`). Thanks @5uru.
+
+### [v25.8.0 - 2024-05-07](https://github.com/joke2k/faker/compare/v25.7.0...v25.8.0)
* Add handshake emoji with different color variations to emoji provider list. Thanks @tamkc.
-### [v25.7.0 - 2024-05-07](https://github.com/joke2k/faker/compare/v25.6.0..v25.7.0)
+### [v25.7.0 - 2024-05-07](https://github.com/joke2k/faker/compare/v25.6.0...v25.7.0)
* Add missing translation for countries in `pt-BR`. Thanks @LeonardoFurtado.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/Faker.egg-info/PKG-INFO new/Faker-26.0.0/Faker.egg-info/PKG-INFO
--- old/Faker-25.8.0/Faker.egg-info/PKG-INFO 2024-06-07 19:47:53.000000000 +0200
+++ new/Faker-26.0.0/Faker.egg-info/PKG-INFO 2024-06-26 23:17:23.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Faker
-Version: 25.8.0
+Version: 26.0.0
Summary: Faker is a Python package that generates fake data for you.
Home-page: https://github.com/joke2k/faker
Author: joke2k
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/Faker.egg-info/SOURCES.txt new/Faker-26.0.0/Faker.egg-info/SOURCES.txt
--- old/Faker-25.8.0/Faker.egg-info/SOURCES.txt 2024-06-07 19:47:53.000000000 +0200
+++ new/Faker-26.0.0/Faker.egg-info/SOURCES.txt 2024-06-26 23:17:23.000000000 +0200
@@ -526,6 +526,7 @@
faker/providers/person/tr_TR/__init__.py
faker/providers/person/tw_GH/__init__.py
faker/providers/person/uk_UA/__init__.py
+faker/providers/person/yo_NG/__init__.py
faker/providers/person/zh_CN/__init__.py
faker/providers/person/zh_TW/__init__.py
faker/providers/person/zu_ZA/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/PKG-INFO new/Faker-26.0.0/PKG-INFO
--- old/Faker-25.8.0/PKG-INFO 2024-06-07 19:47:54.880308900 +0200
+++ new/Faker-26.0.0/PKG-INFO 2024-06-26 23:17:25.112744800 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: Faker
-Version: 25.8.0
+Version: 26.0.0
Summary: Faker is a Python package that generates fake data for you.
Home-page: https://github.com/joke2k/faker
Author: joke2k
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/VERSION new/Faker-26.0.0/VERSION
--- old/Faker-25.8.0/VERSION 2024-06-07 19:47:37.000000000 +0200
+++ new/Faker-26.0.0/VERSION 2024-06-26 23:17:05.000000000 +0200
@@ -1 +1 @@
-25.8.0
+26.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/faker/__init__.py new/Faker-26.0.0/faker/__init__.py
--- old/Faker-25.8.0/faker/__init__.py 2024-06-07 19:47:37.000000000 +0200
+++ new/Faker-26.0.0/faker/__init__.py 2024-06-26 23:17:05.000000000 +0200
@@ -2,6 +2,6 @@
from faker.generator import Generator
from faker.proxy import Faker
-VERSION = "25.8.0"
+VERSION = "26.0.0"
__all__ = ("Factory", "Generator", "Faker")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/faker/providers/currency/__init__.py new/Faker-26.0.0/faker/providers/currency/__init__.py
--- old/Faker-25.8.0/faker/providers/currency/__init__.py 2023-04-06 17:25:42.000000000 +0200
+++ new/Faker-26.0.0/faker/providers/currency/__init__.py 2024-06-25 21:25:02.000000000 +0200
@@ -369,7 +369,6 @@
"TTD": "\u0024",
"TVD": "\u0024",
"TWD": "\u0024",
- "TWD": "\u0024",
"TZS": "Tsh",
"UAH": "\u20B4",
"UGX": "USh",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/faker/providers/lorem/__init__.py new/Faker-26.0.0/faker/providers/lorem/__init__.py
--- old/Faker-25.8.0/faker/providers/lorem/__init__.py 2022-11-14 16:56:33.000000000 +0100
+++ new/Faker-26.0.0/faker/providers/lorem/__init__.py 2024-06-26 19:06:02.000000000 +0200
@@ -23,23 +23,16 @@
word_connector = " "
sentence_punctuation = "."
- def words(
+ def get_words_list(
self,
- nb: int = 3,
part_of_speech: Optional[str] = None,
ext_word_list: Optional[Sequence[str]] = None,
- unique: bool = False,
) -> List[str]:
- """Generate a tuple of words.
-
- The ``nb`` argument controls the number of words in the resulting list,
- and if ``ext_word_list`` is provided, words from that list will be used
- instead of those from the locale provider's built-in word list.
+ """Get list of words.
- If ``unique`` is ``True``, this method will return a list containing
- unique words. Under the hood, |random_sample| will be used for sampling
- without replacement. If ``unique`` is ``False``, |random_choices| is
- used instead, and the list returned may contain duplicates.
+ ``ext_word_list`` is a parameter that allows the user to provide a list
+ of words to be used instead of the built-in word list. If ``ext_word_list``
+ is provided, then the value of ``part_of_speech`` is ignored.
``part_of_speech`` is a parameter that defines to what part of speech
the returned word belongs. If ``ext_word_list`` is not ``None``, then
@@ -47,16 +40,16 @@
not correspond to an existent part of speech according to the set locale,
then an exception is raised.
- .. warning::
- Depending on the length of a locale provider's built-in word list or
- on the length of ``ext_word_list`` if provided, a large ``nb`` can
- exhaust said lists if ``unique`` is ``True``, raising an exception.
+ :sample: part_of_speech="abc", ext_word_list=['abc', 'def', 'ghi', 'jkl']
+ :sample: part_of_speech="abc"
+ :sample: ext_word_list=['abc', 'def', 'ghi', 'jkl']
- :sample:
- :sample: nb=5
- :sample: nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']
- :sample: nb=4, ext_word_list=['abc', 'def', 'ghi', 'jkl'], unique=True
+ .. warning::
+ Depending on the length of a locale provider's built-in word list or
+ on the length of ``ext_word_list`` if provided, a large ``nb`` can
+ exhaust said lists if ``unique`` is ``True``, raising an exception.
"""
+
if ext_word_list is not None:
word_list = ext_word_list
elif part_of_speech:
@@ -67,6 +60,40 @@
else:
word_list = self.word_list # type: ignore[attr-defined]
+ return list(word_list)
+
+ def words(
+ self,
+ nb: int = 3,
+ ext_word_list: Optional[List[str]] = None,
+ unique: bool = False,
+ ) -> List[str]:
+ """Generate a tuple of words.
+
+ The ``nb`` argument controls the number of words in the resulting list,
+ and if ``ext_word_list`` is provided, words from that list will be used
+ instead of those from the locale provider's built-in word list.
+
+ if ``word_list`` is not provided, the method will use a default value of None,
+ which will result in the method calling the ``get_words_list`` method to get the
+ word list. If ``word_list`` is provided, the method will use the provided list.
+
+ If ``unique`` is ``True``, this method will return a list containing
+ unique words. Under the hood, |random_sample| will be used for sampling
+ without replacement. If ``unique`` is ``False``, |random_choices| is
+ used instead, and the list returned may contain duplicates.
+
+ :sample:
+ :sample: nb=5
+ :sample: nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']
+ :sample: nb=4, ext_word_list=['abc', 'def', 'ghi', 'jkl'], unique=True
+ """
+
+ if ext_word_list is None:
+ word_list = self.get_words_list()
+ else:
+ word_list = ext_word_list
+
if unique:
unique_samples = cast(List[str], self.random_sample(word_list, length=nb))
return unique_samples
@@ -82,7 +109,9 @@
:sample:
:sample: ext_word_list=['abc', 'def', 'ghi', 'jkl']
"""
- return self.words(1, part_of_speech, ext_word_list)[0]
+ word_list = self.get_words_list(part_of_speech, ext_word_list)
+
+ return self.words(1, word_list)[0]
def sentence(
self, nb_words: int = 6, variable_nb_words: bool = True, ext_word_list: Optional[Sequence[str]] = None
@@ -109,7 +138,8 @@
if variable_nb_words:
nb_words = self.randomize_nb_elements(nb_words, min=1)
- words = list(self.words(nb=nb_words, ext_word_list=ext_word_list))
+ word_list = self.get_words_list(ext_word_list=ext_word_list)
+ words = list(self.words(nb=nb_words, ext_word_list=word_list))
words[0] = words[0].title()
return self.word_connector.join(words) + self.sentence_punctuation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/faker/providers/lorem/en_PH/__init__.py new/Faker-26.0.0/faker/providers/lorem/en_PH/__init__.py
--- old/Faker-25.8.0/faker/providers/lorem/en_PH/__init__.py 2022-05-09 16:03:42.000000000 +0200
+++ new/Faker-26.0.0/faker/providers/lorem/en_PH/__init__.py 2024-06-26 19:06:19.000000000 +0200
@@ -32,7 +32,10 @@
:sample: nb=5
:sample: nb=5, unique=True
"""
- return self.words(nb=nb, ext_word_list=self.english_word_list, unique=unique)
+
+ word_list = self.generator.get_words_list(ext_word_list=self.english_word_list)
+
+ return self.words(nb=nb, ext_word_list=word_list, unique=unique)
def english_sentence(self, nb_words: int = 6, variable_nb_words: bool = True) -> str:
"""Generate a sentence in English.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/faker/providers/person/yo_NG/__init__.py new/Faker-26.0.0/faker/providers/person/yo_NG/__init__.py
--- old/Faker-25.8.0/faker/providers/person/yo_NG/__init__.py 1970-01-01 01:00:00.000000000 +0100
+++ new/Faker-26.0.0/faker/providers/person/yo_NG/__init__.py 2024-06-20 15:59:13.000000000 +0200
@@ -0,0 +1,340 @@
+from .. import Provider as PersonProvider
+
+
+class Provider(PersonProvider):
+ """
+ A Faker provider for generating fake Zulu names in South Africa.
+ """
+
+ formats = (
+ "{{first_name_male}} {{last_name_male}}",
+ "{{first_name_male}} {{last_name_male}}",
+ "{{first_name_male}} {{last_name_male}}",
+ "{{first_name_male}} {{last_name_male}}",
+ "{{first_name_male}} {{last_name_male}} {{last_name_male}}",
+ "{{first_name_female}} {{last_name_female}}",
+ "{{first_name_female}} {{last_name_female}}",
+ "{{first_name_female}} {{last_name_female}}",
+ "{{first_name_female}} {{last_name_female}}",
+ "{{first_name_female}} {{last_name_female}} {{last_name_female}}",
+ "{{prefix_male}} {{first_name_male}} {{last_name_male}}",
+ "{{prefix_female}} {{first_name_female}} {{last_name_female}}",
+ "{{prefix_male}} {{first_name_male}} {{last_name_male}}",
+ "{{prefix_female}} {{first_name_female}} {{last_name_female}}",
+ )
+
+ # first names sourced from:
+ # 1. https://github.com/faker-js/faker/blob/next/src/locales/yo_NG/person/last_n…
+ # 2. https://github.com/faker-js/faker/blob/next/src/locales/yo_NG/person/male_f…
+
+ first_names_male = (
+ "Abayomi",
+ "Abiodun",
+ "Abiona",
+ "Adebiyi",
+ "Adebowale",
+ "Adedayo",
+ "Adedeji",
+ "Adekitan",
+ "Adekola",
+ "Adekunle",
+ "Adeleke",
+ "Adeniyi",
+ "Adeolu",
+ "Adeoti",
+ "Aderopo",
+ "Adeshina",
+ "Adesoji",
+ "Adetayo",
+ "Adeyi",
+ "Adigun",
+ "Afolarin",
+ "Ajala",
+ "Ajani",
+ "Akanmu",
+ "Akinkunmi",
+ "Akinlabi",
+ "Akinwale",
+ "Alade",
+ "Alamu",
+ "Anjolaoluwa",
+ "Ayinde",
+ "Ayodeji",
+ "Ayodele",
+ "Babasola",
+ "Babatunji",
+ "Babawale",
+ "Damife",
+ "Demilade",
+ "Durodola",
+ "Ekundayo",
+ "Esupofo",
+ "Folu",
+ "Gbadebo",
+ "Gbolahan",
+ "Gbowoade",
+ "Ibidapo",
+ "Ige",
+ "Ikeoluwa",
+ "Inioluwa",
+ "Iseoluwa",
+ "Ishola",
+ "Juwon",
+ "Keji",
+ "Kolawole",
+ "Korede",
+ "Leke",
+ "Lere",
+ "Niyilolawa",
+ "Oba",
+ "ObaniJesu",
+ "Ogooluwa",
+ "Oke",
+ "Oladare",
+ "Oladimeji",
+ "Olakunle",
+ "Olanrewaju",
+ "Olansile",
+ "Olumorotimi",
+ "Oluwafemi",
+ "Oluwagbemiga",
+ "Oluwamumibori",
+ "Oluwamuyiwa",
+ "Oluwasanmi",
+ "Oluwasegun",
+ "Oluwole",
+ "Omobobola",
+ "Omotayo",
+ "Osunleke",
+ "Seye",
+ "Shekoni",
+ "Sijuade",
+ "Tade",
+ "Temidayo",
+ "Toki",
+ "Tokunbo",
+ "Tomori",
+ )
+ first_names_female = (
+ "Aanuoluwapo",
+ "Abebi",
+ "Abeni",
+ "Abosede",
+ "Adebukola",
+ "Adenike",
+ "Adepeju",
+ "Adesewa",
+ "Adesua",
+ "Adetoke",
+ "Adetoun",
+ "Adunni",
+ "Ajoke",
+ "Amoke",
+ "Amope",
+ "Arike",
+ "Arinola",
+ "Asake",
+ "Atinuke",
+ "Awero",
+ "Ayinke",
+ "Ayoka",
+ "Bolatito",
+ "Boluwatife",
+ "Bunmi",
+ "Doyinsola",
+ "Eniola",
+ "Ewatomi",
+ "Fadekemi",
+ "Faderera",
+ "Fehintola",
+ "Fibikemi",
+ "Fikayomi",
+ "Folashade",
+ "Ibironke",
+ "Iretioluwa",
+ "Iyabode",
+ "Iyadunni",
+ "Kikelomo",
+ "Modupe",
+ "Mofifoluwa",
+ "Mojisola",
+ "Mojisoluwa",
+ "Moradeke",
+ "Morayo",
+ "Morenike",
+ "Morolake",
+ "Mosinmileoluwa",
+ "Mosunmola",
+ "Motunrayo",
+ "Moyosore",
+ "Ninioluwa",
+ "Olajumoke",
+ "Olasunmbo",
+ "Ololade",
+ "Olufunke",
+ "Olufunmilayo",
+ "Oluwakemi",
+ "Omobolanle",
+ "Omodunni",
+ "Omolabake",
+ "Omolara",
+ "Omosalewa",
+ "Omotara",
+ "Omotola",
+ "Omotoun",
+ "Omowumi",
+ "Oreofe",
+ "Oyenike",
+ "Oyindasola",
+ "Radeke",
+ "Ronke",
+ "Segilola",
+ "Similoluwa",
+ "Simisola",
+ "Sowande",
+ "Subomi",
+ "Titilayo",
+ "Tolulope",
+ "Toluwanimi",
+ "Wuraola",
+ "Yejide",
+ "Yetunde",
+ "Yewande",
+ )
+
+ first_names = first_names_male + first_names_female
+
+ # last names sourced from :
+ # 1. https://github.com/faker-js/faker/blob/next/src/locales/yo_NG/person/last_n…
+ last_names_male = (
+ "Adebisi",
+ "Adegbite",
+ "Adegoke",
+ "Adekunle",
+ "Adelakun",
+ "Adeleke",
+ "Adelusi",
+ "Ademiluyi",
+ "Aderibigbe",
+ "Aderogba",
+ "Adesiyan",
+ "Adeyemo",
+ "Adisa",
+ "Afolabi",
+ "Afolayan",
+ "Afonja",
+ "Ajao",
+ "Ajayi",
+ "Ajewole",
+ "Akinrinola",
+ "Alabi",
+ "Aloba",
+ "Awodiran",
+ "Awolowo",
+ "Ayandokun",
+ "Ayoola",
+ "Babtunde",
+ "Bakare",
+ "Balogun",
+ "Bamidele",
+ "Bamiloye",
+ "Edun",
+ "Fadipe",
+ "Fagunwa",
+ "Fajimi",
+ "Falabi",
+ "Faleti",
+ "Faloye",
+ "Fasasi",
+ "Ibikunle",
+ "Ilori",
+ "Ilupeju",
+ "Iyanda",
+ "Jaiyeola",
+ "Kolade",
+ "Kosoko",
+ "Koya",
+ "Makinde",
+ "Makinwa",
+ "Morawo",
+ "Ninalowo",
+ "Odetola",
+ "Odunsi",
+ "Ogindan",
+ "Oginni",
+ "Ogulana",
+ "Ogunbamigbe",
+ "Ogunbiyi",
+ "Ogunbo",
+ "Ogunde",
+ "Ogunwobi",
+ "Ogunyeye",
+ "Ojo",
+ "Ojua",
+ "Olabode",
+ "Oladipupo",
+ "Olaiya",
+ "Olasupo",
+ "Olowokeere",
+ "Oloyede",
+ "Olubode",
+ "Olugbayila",
+ "Olujimi",
+ "Olukotun",
+ "Olukunga",
+ "Olusanya",
+ "Oluwagbemi",
+ "Omidina",
+ "Omojola",
+ "Omotoso",
+ "Oparinde",
+ "Oshin",
+ "Osuntokun",
+ "Owokoniran",
+ "Owolabi",
+ "Owoyemi",
+ "Oyadiran",
+ "Oyaifo",
+ "Oyeniyi",
+ "Oyetoro",
+ "Oyeyemi",
+ "Oyinlola",
+ "Paimo",
+ "Salako",
+ "Salami",
+ "Shekoni",
+ "Sobowale",
+ "Soyinka",
+ )
+
+ # last names are not sex dependant
+ last_names_female = last_names_male
+ last_names = last_names_male + last_names_female
+
+ prefixes_female = (
+ "Mrs.",
+ "Ms.",
+ "Dr.",
+ "Alhaja",
+ "Mama",
+ "Iya",
+ "Madam",
+ "Chief",
+ "Lady",
+ "Erelu",
+ "Olori",
+ "Princess",
+ )
+
+ prefixes_male = (
+ "Mr.",
+ "Dr.",
+ "Alhaji",
+ "Baba",
+ "Ogbeni",
+ "Oloye",
+ "Chief",
+ "Prince",
+ "Oba",
+ "Kabiyesi",
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/faker/providers/python/__init__.py new/Faker-26.0.0/faker/providers/python/__init__.py
--- old/Faker-25.8.0/faker/providers/python/__init__.py 2024-06-03 16:05:43.000000000 +0200
+++ new/Faker-26.0.0/faker/providers/python/__init__.py 2024-06-26 19:07:46.000000000 +0200
@@ -7,6 +7,8 @@
from enum import Enum
from typing import Any, Dict, Iterable, Iterator, List, Optional, Set, Tuple, Type, TypeVar, Union, cast, no_type_check
+from faker.typing import BasicNumber
+
from ...exceptions import BaseFakerException
from .. import BaseProvider, ElementsType
@@ -284,8 +286,8 @@
left_digits: Optional[int] = None,
right_digits: Optional[int] = None,
positive: bool = False,
- min_value: Optional[float] = None,
- max_value: Optional[float] = None,
+ min_value: Optional[BasicNumber] = None,
+ max_value: Optional[BasicNumber] = None,
) -> Decimal:
if left_digits is not None and left_digits < 0:
raise ValueError("A decimal number cannot have less than 0 digits in its " "integer part")
@@ -464,9 +466,20 @@
:variable_nb_elements: is use variable number of elements for dictionary
:value_types: type of dictionary values
"""
+
+ words_list_count = len(self.generator.get_words_list())
+
if variable_nb_elements:
nb_elements = self.randomize_nb_elements(nb_elements, min=1)
+ if nb_elements > words_list_count:
+ warnings.warn(
+ f"Number of nb_elements is greater than the number of words in the list."
+ f" {words_list_count} words will be used.",
+ RuntimeWarning,
+ )
+ nb_elements = words_list_count
+
return dict(
zip(
self.generator.words(nb_elements, unique=True),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/faker/proxy.pyi new/Faker-26.0.0/faker/proxy.pyi
--- old/Faker-25.8.0/faker/proxy.pyi 2024-06-07 19:46:39.000000000 +0200
+++ new/Faker-26.0.0/faker/proxy.pyi 2024-06-26 19:20:58.000000000 +0200
@@ -1588,6 +1588,32 @@
def isbn10(self, separator: str = ...) -> str: ...
def isbn13(self, separator: str = ...) -> str: ...
def job(self) -> str: ...
+ def get_words_list(
+ self, part_of_speech: Optional[str] = ..., ext_word_list: Optional[Sequence[str]] = ...
+ ) -> List[str]:
+ """
+ Get list of words.
+
+ ``ext_word_list`` is a parameter that allows the user to provide a list
+ of words to be used instead of the built-in word list. If ``ext_word_list``
+ is provided, then the value of ``part_of_speech`` is ignored.
+
+ ``part_of_speech`` is a parameter that defines to what part of speech
+ the returned word belongs. If ``ext_word_list`` is not ``None``, then
+ ``part_of_speech`` is ignored. If the value of ``part_of_speech`` does
+ not correspond to an existent part of speech according to the set locale,
+ then an exception is raised.
+
+ :sample: part_of_speech="abc", ext_word_list=['abc', 'def', 'ghi', 'jkl']
+ :sample: part_of_speech="abc"
+ :sample: ext_word_list=['abc', 'def', 'ghi', 'jkl']
+
+ .. warning::
+ Depending on the length of a locale provider's built-in word list or
+ on the length of ``ext_word_list`` if provided, a large ``nb`` can
+ exhaust said lists if ``unique`` is ``True``, raising an exception.
+ """
+ ...
def paragraph(
self, nb_sentences: int = ..., variable_nb_sentences: bool = ..., ext_word_list: Optional[Sequence[str]] = ...
) -> str:
@@ -1703,13 +1729,7 @@
:sample: ext_word_list=['abc', 'def', 'ghi', 'jkl']
"""
...
- def words(
- self,
- nb: int = ...,
- part_of_speech: Optional[str] = ...,
- ext_word_list: Optional[Sequence[str]] = ...,
- unique: bool = ...,
- ) -> List[str]:
+ def words(self, nb: int = ..., ext_word_list: Optional[List[str]] = ..., unique: bool = ...) -> List[str]:
"""
Generate a tuple of words.
@@ -1717,22 +1737,15 @@
and if ``ext_word_list`` is provided, words from that list will be used
instead of those from the locale provider's built-in word list.
+ if ``word_list`` is not provided, the method will use a default value of None,
+ which will result in the method calling the ``get_words_list`` method to get the
+ word list. If ``word_list`` is provided, the method will use the provided list.
+
If ``unique`` is ``True``, this method will return a list containing
unique words. Under the hood, |random_sample| will be used for sampling
without replacement. If ``unique`` is ``False``, |random_choices| is
used instead, and the list returned may contain duplicates.
- ``part_of_speech`` is a parameter that defines to what part of speech
- the returned word belongs. If ``ext_word_list`` is not ``None``, then
- ``part_of_speech`` is ignored. If the value of ``part_of_speech`` does
- not correspond to an existent part of speech according to the set locale,
- then an exception is raised.
-
- .. warning::
- Depending on the length of a locale provider's built-in word list or
- on the length of ``ext_word_list`` if provided, a large ``nb`` can
- exhaust said lists if ``unique`` is ``True``, raising an exception.
-
:sample:
:sample: nb=5
:sample: nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']
@@ -2247,8 +2260,8 @@
left_digits: Optional[int] = ...,
right_digits: Optional[int] = ...,
positive: bool = ...,
- min_value: Optional[float] = ...,
- max_value: Optional[float] = ...,
+ min_value: Union[float, int, None] = ...,
+ max_value: Union[float, int, None] = ...,
) -> Decimal: ...
def pydict(
self,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/faker/typing.py new/Faker-26.0.0/faker/typing.py
--- old/Faker-25.8.0/faker/typing.py 2024-04-29 17:31:18.000000000 +0200
+++ new/Faker-26.0.0/faker/typing.py 2024-06-20 16:41:05.000000000 +0200
@@ -33,6 +33,7 @@
self.security_code_length = security_code_length
+BasicNumber = Union[float, int]
CardType = TypeVar("CardType", "CreditCard", str)
DateParseType = Union[date, datetime, timedelta, str, int]
HueType = Union[str, float, int, Sequence[int]]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/tests/providers/test_lorem.py new/Faker-26.0.0/tests/providers/test_lorem.py
--- old/Faker-25.8.0/tests/providers/test_lorem.py 2024-02-07 15:40:32.000000000 +0100
+++ new/Faker-26.0.0/tests/providers/test_lorem.py 2024-06-26 18:58:04.000000000 +0200
@@ -165,29 +165,26 @@
words = re.sub(r"[.\n]+", " ", text.lower()).split()
assert all(word in self.custom_word_list for word in words)
- @pytest.mark.parametrize(
- "nb,part_of_speech", [(10, "verb"), (18, "adverb"), (11, "noun")], ids=["verb", "adverb", "noun"]
- )
- def test_words_part_of_speech(self, faker, nb, part_of_speech):
- words = faker.words(nb=nb, part_of_speech=part_of_speech)
- assert (word in EnUsLoremProvider.parts_of_speech[part_of_speech] for word in words)
+ def test_get_default_words_list(self, faker):
+ words_list = faker.get_words_list()
+ assert all(word in EnUsLoremProvider.word_list for word in words_list)
+
+ @pytest.mark.parametrize("part_of_speech", [("verb"), ("adverb"), ("noun")], ids=["verb", "adverb", "noun"])
+ def test_get_words_list_part_of_speech(self, faker, part_of_speech):
+ words_list = faker.get_words_list(part_of_speech=part_of_speech)
+ assert (word in EnUsLoremProvider.parts_of_speech[part_of_speech] for word in words_list)
+
+ def test_get_words_list_invalid_part_of_speech(self, faker):
+ part_of_speech = "invalid part of speech"
- @pytest.mark.parametrize("nb,part_of_speech", [(5, "abcdefg")], ids=["invalid part of speech"])
- def test_words_invalid_part_of_speech(self, faker, nb, part_of_speech):
with pytest.raises(ValueError) as exc_info:
- faker.words(nb=nb, part_of_speech=part_of_speech)
+ faker.get_words_list(part_of_speech=part_of_speech)
assert exc_info.type is ValueError
assert exc_info.value.args[0] == f"{part_of_speech} is not recognized as a part of speech."
- @pytest.mark.parametrize(
- "nb,part_of_speech",
- [(3, "adverb"), (5, "verb"), (4, "abcdefgh")],
- ids=["ignore adverb", "ignore verb", "ignore invalid part of speech"],
- )
- def test_words_part_of_speech_ignored(self, faker, nb, part_of_speech):
- words = faker.words(nb=nb, part_of_speech=part_of_speech, ext_word_list=self.custom_word_list)
- assert len(words) == nb
+ def test_get_words_list_part_of_speech_ignored(self, faker):
+ words = faker.get_words_list(part_of_speech="ignored part of speech", ext_word_list=self.custom_word_list)
assert all(word in self.custom_word_list for word in words)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/tests/providers/test_person.py new/Faker-26.0.0/tests/providers/test_person.py
--- old/Faker-25.8.0/tests/providers/test_person.py 2024-03-13 16:58:36.000000000 +0100
+++ new/Faker-26.0.0/tests/providers/test_person.py 2024-06-20 15:59:13.000000000 +0200
@@ -36,6 +36,7 @@
from faker.providers.person.th_TH import Provider as ThThProvider
from faker.providers.person.uk_UA import Provider as UkUAProvider
from faker.providers.person.uk_UA import translit as UkUATranslit
+from faker.providers.person.yo_NG import Provider as YoNGProvider
from faker.providers.person.zh_CN import Provider as ZhCNProvider
from faker.providers.person.zh_TW import Provider as ZhTWProvider
from faker.providers.person.zu_ZA import Provider as ZuZAProvider
@@ -1397,6 +1398,85 @@
Faker.seed(0)
+class TestYoNG(unittest.TestCase):
+ def setUp(self):
+ self.fake = Faker("yo_NG")
+ Faker.seed(0)
+
+ def test_last_name(self):
+ """
+ Test the generation of Zulu last names.
+ """
+ # There's no gender-specific last name in Zulu.
+ self.assertTrue(hasattr(YoNGProvider, "last_names_male"))
+ self.assertTrue(hasattr(YoNGProvider, "last_names_female"))
+
+ # All last names apply to all genders.
+ self.assertTrue(hasattr(YoNGProvider, "last_names"))
+
+ # General last name.
+ name = self.fake.last_name()
+ self.assertIsInstance(name, str)
+ self.assertIn(name, YoNGProvider.last_names)
+
+ # Females last name.
+ name = self.fake.last_name_female()
+ self.assertIsInstance(name, str)
+ self.assertIn(name, YoNGProvider.last_names)
+
+ # Male last name.
+ name = self.fake.last_name_male()
+ self.assertIsInstance(name, str)
+ self.assertIn(name, YoNGProvider.last_names)
+
+ def test_first_name(self):
+ """
+ Test the generation of Zulu first names.
+ """
+ # General first name.
+ name = self.fake.first_name()
+ self.assertIsInstance(name, str)
+ self.assertIn(name, YoNGProvider.first_names)
+
+ # Female first name.
+ name = self.fake.first_name_female()
+ self.assertIsInstance(name, str)
+ self.assertIn(name, YoNGProvider.first_names)
+ self.assertIn(name, YoNGProvider.first_names_female)
+
+ # Male first name.
+ name = self.fake.first_name_male()
+ self.assertIsInstance(name, str)
+ self.assertIn(name, YoNGProvider.first_names)
+ self.assertIn(name, YoNGProvider.first_names_male)
+
+ def test_full_name(self):
+ """
+ Test the generation of full Zulu names.
+ """
+ # Full name.
+ name = self.fake.name()
+ self.assertIsInstance(name, str)
+
+ full_name_parts = name.split()
+
+ if len(full_name_parts) == 2:
+ first_name = full_name_parts[0]
+ last_name = full_name_parts[1]
+ self.assertIn(first_name, YoNGProvider.first_names)
+ self.assertIn(last_name, YoNGProvider.last_names)
+ elif len(full_name_parts) == 3:
+ prefix = full_name_parts[0]
+ first_name = full_name_parts[1]
+ last_name = full_name_parts[2]
+
+ self.assertIn(prefix, YoNGProvider.prefixes_female + YoNGProvider.prefixes_male)
+ self.assertIn(first_name, YoNGProvider.first_names)
+ self.assertIn(last_name, YoNGProvider.last_names)
+ else:
+ raise AssertionError("Invalid number of name parts. Expected 2 or 3.")
+
+
class TestZuZa(unittest.TestCase):
def setUp(self):
self.fake = Faker("zu_ZA")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/tests/providers/test_python.py new/Faker-26.0.0/tests/providers/test_python.py
--- old/Faker-25.8.0/tests/providers/test_python.py 2024-02-16 16:30:49.000000000 +0100
+++ new/Faker-26.0.0/tests/providers/test_python.py 2024-06-26 19:20:57.000000000 +0200
@@ -3,7 +3,7 @@
import unittest
import warnings
-from typing import Iterable, Optional, Union
+from typing import Iterable, Optional, Type, Union
from unittest.mock import patch
import pytest
@@ -13,8 +13,20 @@
@pytest.mark.parametrize("object_type", (None, bool, str, float, int, tuple, set, list, Iterable, dict))
def test_pyobject(
- object_type: Optional[Union[bool, str, float, int, tuple, set, list, Iterable, dict]],
-):
+ object_type: Optional[
+ Union[
+ Type[bool],
+ Type[str],
+ Type[float],
+ Type[int],
+ Type[tuple],
+ Type[set],
+ Type[list],
+ Type[Iterable],
+ Type[dict],
+ ]
+ ],
+) -> None:
random_object = Faker().pyobject(object_type=object_type)
if object_type is None:
assert random_object is None
@@ -299,6 +311,34 @@
self.fake.pyfloat(min_value=2.3, max_value=2.5)
+class TestPyDict(unittest.TestCase):
+ def setUp(self):
+ self.fake = Faker()
+ Faker.seed(0)
+
+ def test_pydict_with_default_nb_elements(self):
+ result = self.fake.pydict()
+
+ self.assertEqual(len(result), 10)
+
+ def test_pydict_with_valid_number_of_nb_elements(self):
+ result = self.fake.pydict(nb_elements=5)
+
+ self.assertEqual(len(result), 5)
+
+ def test_pydict_with_invalid_number_of_nb_elements(self):
+ nb_elements = 10000
+
+ words_list_count = len(self.fake.get_words_list())
+ warning_msg = (
+ f"Number of nb_elements is greater than the number of words in the list."
+ f" {words_list_count} words will be used."
+ )
+ with pytest.warns(RuntimeWarning, match=warning_msg):
+ result = self.fake.pydict(nb_elements=nb_elements)
+ self.assertEqual(len(result), words_list_count)
+
+
class TestPydecimal(unittest.TestCase):
def setUp(self):
self.fake = Faker()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Faker-25.8.0/tests/pytest/session_overrides/session_locale/__init__.py new/Faker-26.0.0/tests/pytest/session_overrides/session_locale/__init__.py
--- old/Faker-25.8.0/tests/pytest/session_overrides/session_locale/__init__.py 2022-02-14 18:03:11.000000000 +0100
+++ new/Faker-26.0.0/tests/pytest/session_overrides/session_locale/__init__.py 2024-06-26 18:56:38.000000000 +0200
@@ -1 +1 @@
-_MODULE_LOCALES = ["en_GB"]
+_MODULE_LOCALES = ["en_US"]
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-twine for openSUSE:Factory checked in at 2024-07-01 11:19:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-twine (Old)
and /work/SRC/openSUSE:Factory/.python-twine.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-twine"
Mon Jul 1 11:19:20 2024 rev:16 rq:1183989 version:5.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-twine/python-twine.changes 2024-04-11 19:40:31.876380354 +0200
+++ /work/SRC/openSUSE:Factory/.python-twine.new.18349/python-twine.changes 2024-07-01 11:19:24.976975118 +0200
@@ -1,0 +2,6 @@
+Sat Jun 29 12:59:17 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 5.1.0:
+ * Add the experimental --attestations flag.
+
+-------------------------------------------------------------------
Old:
----
twine-5.0.0.tar.gz
New:
----
twine-5.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-twine.spec ++++++
--- /var/tmp/diff_new_pack.C4i2Qh/_old 2024-07-01 11:19:25.773004118 +0200
+++ /var/tmp/diff_new_pack.C4i2Qh/_new 2024-07-01 11:19:25.773004118 +0200
@@ -16,10 +16,9 @@
#
-%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-twine
-Version: 5.0.0
+Version: 5.1.0
Release: 0
Summary: Collection of utilities for interacting with PyPI
License: Apache-2.0
++++++ skip-unsupported-Metadata-Version-test.patch ++++++
--- /var/tmp/diff_new_pack.C4i2Qh/_old 2024-07-01 11:19:25.809005429 +0200
+++ /var/tmp/diff_new_pack.C4i2Qh/_new 2024-07-01 11:19:25.813005575 +0200
@@ -2,23 +2,20 @@
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(
+Index: twine-5.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",
[
-- pytest.param(
-- b"Metadata-Version: 2.3\nName: test-package\nVersion: 1.0.0\n",
+ pytest.param(
+- b"Metadata-Version: 102.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",
+- pytest.param(
+ b"Metadata-Version: 2.3\nName: UNKNOWN\nVersion: UNKNOWN\n",
"Name, Version",
+ id="missing Name and Version",
++++++ twine-5.0.0.tar.gz -> twine-5.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/.github/ISSUE_TEMPLATE/01_upload_failed.yml new/twine-5.1.0/.github/ISSUE_TEMPLATE/01_upload_failed.yml
--- old/twine-5.0.0/.github/ISSUE_TEMPLATE/01_upload_failed.yml 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/.github/ISSUE_TEMPLATE/01_upload_failed.yml 2024-05-16 15:46:47.000000000 +0200
@@ -44,7 +44,7 @@
validations:
required: true
- - type: markdown
+ - type: input
id: environment-os-other
attributes:
label: "If you selected 'Other', describe your Operating System here"
@@ -90,7 +90,7 @@
validations:
required: true
- - type: markdown
+ - type: input
id: package-repository
attributes:
label: "Which package repository are you using?"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/.github/ISSUE_TEMPLATE/02_bug.yml new/twine-5.1.0/.github/ISSUE_TEMPLATE/02_bug.yml
--- old/twine-5.0.0/.github/ISSUE_TEMPLATE/02_bug.yml 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/.github/ISSUE_TEMPLATE/02_bug.yml 2024-05-16 15:46:47.000000000 +0200
@@ -44,10 +44,11 @@
validations:
required: true
- - type: markdown
+ - type: input
id: environment-os-other
attributes:
label: "If you selected 'Other', describe your Operating System here"
+ placeholder: "example: Linux hostname 6.5.10-200.fc38.x86_64"
validations:
required: false
@@ -90,7 +91,7 @@
validations:
required: true
- - type: markdown
+ - type: input
id: package-repository
attributes:
label: "Which package repository are you using?"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/.github/workflows/codeql-analysis.yml new/twine-5.1.0/.github/workflows/codeql-analysis.yml
--- old/twine-5.0.0/.github/workflows/codeql-analysis.yml 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/.github/workflows/codeql-analysis.yml 2024-05-16 15:46:47.000000000 +0200
@@ -41,7 +41,7 @@
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout(a)v4.1.5
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/.github/workflows/main.yml new/twine-5.1.0/.github/workflows/main.yml
--- old/twine-5.0.0/.github/workflows/main.yml 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/.github/workflows/main.yml 2024-05-16 15:46:47.000000000 +0200
@@ -25,8 +25,8 @@
lint:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v5
+ - uses: actions/checkout(a)v4.1.5
+ - uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
- name: Install dependencies
@@ -49,8 +49,8 @@
- windows-latest
runs-on: ${{ matrix.platform }}
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v5
+ - uses: actions/checkout(a)v4.1.5
+ - uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -67,8 +67,8 @@
# Only run on Ubuntu because most of the tests are skipped on Windows
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v5
+ - uses: actions/checkout(a)v4.1.5
+ - uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Install dependencies
@@ -79,8 +79,8 @@
docs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v5
+ - uses: actions/checkout(a)v4.1.5
+ - uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Install dependencies
@@ -113,8 +113,8 @@
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v5
+ - uses: actions/checkout(a)v4.1.5
+ - uses: actions/setup-python(a)v5.1.0
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Install dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/.github/workflows/release.yml new/twine-5.1.0/.github/workflows/release.yml
--- old/twine-5.0.0/.github/workflows/release.yml 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/.github/workflows/release.yml 2024-05-16 15:46:47.000000000 +0200
@@ -19,10 +19,10 @@
steps:
- name: "Checkout repository"
- uses: "actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3"
+ uses: "actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b"
- name: "Setup Python"
- uses: "actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b"
+ uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d"
with:
python-version: "3.x"
@@ -37,10 +37,10 @@
- name: "Generate hashes"
id: hash
run: |
- cd dist && echo "::set-output name=hashes::$(sha256sum * | base64 -w0)"
+ cd dist && echo "hashes=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
- name: "Upload dists"
- uses: "actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce"
+ uses: "actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808"
with:
name: "dist"
path: "dist/"
@@ -53,7 +53,7 @@
actions: read
contents: write
id-token: write # Needed to access the workflow's OIDC identity.
- uses: "slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml(a)v1.5.0"
+ uses: "slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml(a)v2.0.0"
with:
base64-subjects: "${{ needs.build.outputs.hashes }}"
upload-assets: true
@@ -70,10 +70,10 @@
steps:
- name: "Download dists"
- uses: "actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a"
+ uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e"
with:
name: "dist"
path: "dist/"
- name: "Publish dists to PyPI"
- uses: "pypa/gh-action-pypi-publish@48b317d84d5f59668bb13be49d1697e36b3ad009"
+ uses: "pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/PKG-INFO new/twine-5.1.0/PKG-INFO
--- old/twine-5.0.0/PKG-INFO 2024-02-11 14:45:14.069720500 +0100
+++ new/twine-5.1.0/PKG-INFO 2024-05-16 15:46:51.487540500 +0200
@@ -1,10 +1,9 @@
Metadata-Version: 2.1
Name: twine
-Version: 5.0.0
+Version: 5.1.0
Summary: Collection of utilities for publishing packages on PyPI
-Home-page: https://twine.readthedocs.io/
-Author: Donald Stufft and individual contributors
-Author-email: donald(a)stufft.io
+Author-email: Donald Stufft and individual contributors <donald(a)stufft.io>
+Project-URL: Homepage, https://twine.readthedocs.io/
Project-URL: Source, https://github.com/pypa/twine/
Project-URL: Documentation, https://twine.readthedocs.io/en/latest/
Project-URL: Packaging tutorial, https://packaging.python.org/tutorials/packaging-projects/
@@ -38,18 +37,20 @@
Requires-Dist: rfc3986>=1.4.0
Requires-Dist: rich>=12.0.0
-.. image:: https://img.shields.io/pypi/v/twine.svg
+.. |twine-version| image:: https://img.shields.io/pypi/v/twine.svg
:target: https://pypi.org/project/twine
-.. image:: https://img.shields.io/pypi/pyversions/twine.svg
+.. |python-versions| image:: https://img.shields.io/pypi/pyversions/twine.svg
:target: https://pypi.org/project/twine
-.. image:: https://img.shields.io/readthedocs/twine
+.. |docs-badge| image:: https://img.shields.io/readthedocs/twine
:target: https://twine.readthedocs.io
-.. image:: https://img.shields.io/github/actions/workflow/status/pypa/twine/main.yml?b…
+.. |build-badge| image:: https://img.shields.io/github/actions/workflow/status/pypa/twine/main.yml?b…
:target: https://github.com/pypa/twine/actions
+|twine-version| |python-versions| |docs-badge| |build-badge|
+
twine
=====
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/README.rst new/twine-5.1.0/README.rst
--- old/twine-5.0.0/README.rst 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/README.rst 2024-05-16 15:46:47.000000000 +0200
@@ -1,15 +1,17 @@
-.. image:: https://img.shields.io/pypi/v/twine.svg
+.. |twine-version| image:: https://img.shields.io/pypi/v/twine.svg
:target: https://pypi.org/project/twine
-.. image:: https://img.shields.io/pypi/pyversions/twine.svg
+.. |python-versions| image:: https://img.shields.io/pypi/pyversions/twine.svg
:target: https://pypi.org/project/twine
-.. image:: https://img.shields.io/readthedocs/twine
+.. |docs-badge| image:: https://img.shields.io/readthedocs/twine
:target: https://twine.readthedocs.io
-.. image:: https://img.shields.io/github/actions/workflow/status/pypa/twine/main.yml?b…
+.. |build-badge| image:: https://img.shields.io/github/actions/workflow/status/pypa/twine/main.yml?b…
:target: https://github.com/pypa/twine/actions
+|twine-version| |python-versions| |docs-badge| |build-badge|
+
twine
=====
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/docs/changelog.rst new/twine-5.1.0/docs/changelog.rst
--- old/twine-5.0.0/docs/changelog.rst 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/docs/changelog.rst 2024-05-16 15:46:47.000000000 +0200
@@ -12,6 +12,24 @@
.. towncrier release notes start
+Twine 5.1.0 (2024-05-15)
+------------------------
+
+Features
+^^^^^^^^
+
+- Add the experimental ``--attestations`` flag. (`#1095 <https://github.com/pypa/twine/issues/1095>`_)
+
+
+Twine 5.1.0 (2024-05-15)
+------------------------
+
+Misc
+^^^^
+
+- `#1104 <https://github.com/pypa/twine/issues/1104>`_
+
+
Twine 5.0.0 (2024-02-10)
------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/pyproject.toml new/twine-5.1.0/pyproject.toml
--- old/twine-5.0.0/pyproject.toml 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/pyproject.toml 2024-05-16 15:46:47.000000000 +0200
@@ -1,8 +1,73 @@
# pyproject.toml
[build-system]
-requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.0"]
+requires = ["setuptools>=61.2", "wheel", "setuptools_scm[toml]>=6.0"]
build-backend = "setuptools.build_meta"
+[project]
+name = "twine"
+authors = [
+ { name = "Donald Stufft and individual contributors", email = "donald(a)stufft.io" },
+]
+description = "Collection of utilities for publishing packages on PyPI"
+classifiers = [
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: Apache Software License",
+ "Natural Language :: English",
+ "Operating System :: MacOS :: MacOS X",
+ "Operating System :: POSIX",
+ "Operating System :: POSIX :: BSD",
+ "Operating System :: POSIX :: Linux",
+ "Operating System :: Microsoft :: Windows",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: Implementation :: CPython",
+]
+requires-python = ">=3.8"
+dependencies = [
+ "pkginfo >= 1.8.1",
+ "readme-renderer >= 35.0",
+ "requests >= 2.20",
+ "requests-toolbelt >= 0.8.0, != 0.9.0",
+ "urllib3 >= 1.26.0",
+ "importlib-metadata >= 3.6",
+ "keyring >= 15.1",
+ "rfc3986 >= 1.4.0",
+ "rich >= 12.0.0",
+]
+dynamic = ["version"]
+
+[project.readme]
+file = "README.rst"
+content-type = "text/x-rst"
+
+[project.urls]
+Homepage = "https://twine.readthedocs.io/"
+Source = "https://github.com/pypa/twine/"
+Documentation = "https://twine.readthedocs.io/en/latest/"
+"Packaging tutorial" = "https://packaging.python.org/tutorials/packaging-projects/"
+
+[project.entry-points."twine.registered_commands"]
+check = "twine.commands.check:main"
+upload = "twine.commands.upload:main"
+register = "twine.commands.register:main"
+
+[project.scripts]
+twine = "twine.__main__:main"
+
+[tool.setuptools]
+packages = [
+ "twine",
+ "twine.commands",
+]
+include-package-data = true
+license-files = ["LICENSE"]
+
[tool.setuptools_scm]
[tool.towncrier]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/setup.cfg new/twine-5.1.0/setup.cfg
--- old/twine-5.0.0/setup.cfg 2024-02-11 14:45:14.069720500 +0100
+++ new/twine-5.1.0/setup.cfg 2024-05-16 15:46:51.487540500 +0200
@@ -1,60 +1,3 @@
-[metadata]
-license_files = LICENSE
-name = twine
-author = Donald Stufft and individual contributors
-author_email = donald(a)stufft.io
-description = Collection of utilities for publishing packages on PyPI
-long_description = file:README.rst
-long_description_content_type = text/x-rst
-url = https://twine.readthedocs.io/
-project_urls =
- Source = https://github.com/pypa/twine/
- Documentation = https://twine.readthedocs.io/en/latest/
- Packaging tutorial = https://packaging.python.org/tutorials/packaging-projects/
-classifiers =
- Intended Audience :: Developers
- License :: OSI Approved :: Apache Software License
- Natural Language :: English
- Operating System :: MacOS :: MacOS X
- Operating System :: POSIX
- Operating System :: POSIX :: BSD
- Operating System :: POSIX :: Linux
- Operating System :: Microsoft :: Windows
- Programming Language :: Python
- Programming Language :: Python :: 3
- Programming Language :: Python :: 3 :: Only
- Programming Language :: Python :: 3.8
- Programming Language :: Python :: 3.9
- Programming Language :: Python :: 3.10
- Programming Language :: Python :: 3.11
- Programming Language :: Python :: 3.12
- Programming Language :: Python :: Implementation :: CPython
-
-[options]
-packages =
- twine
- twine.commands
-python_requires = >=3.8
-install_requires =
- pkginfo >= 1.8.1
- readme-renderer >= 35.0
- requests >= 2.20
- requests-toolbelt >= 0.8.0, != 0.9.0
- urllib3 >= 1.26.0
- importlib-metadata >= 3.6
- keyring >= 15.1
- rfc3986 >= 1.4.0
- rich >= 12.0.0
-include_package_data = True
-
-[options.entry_points]
-twine.registered_commands =
- check = twine.commands.check:main
- upload = twine.commands.upload:main
- register = twine.commands.register:main
-console_scripts =
- twine = twine.__main__:main
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/tests/test_integration.py new/twine-5.1.0/tests/test_integration.py
--- old/twine-5.0.0/tests/test_integration.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/tests/test_integration.py 2024-05-16 15:46:47.000000000 +0200
@@ -48,7 +48,15 @@
run([sys.executable, "-m", "build", "--sdist"], cwd=checkout)
[dist, *_] = (checkout / "dist").glob("*")
- assert dist.name == f"twine-sampleproject-3.0.0.post{tag}.tar.gz"
+ # NOTE: newer versions of setuptools (invoked via build) adhere to PEP 625,
+ # causing the dist name to be `twine_sampleproject` instead of
+ # `twine-sampleproject`. Both are allowed here for now, but the hyphenated
+ # version can be removed eventually.
+ # See: https://github.com/pypa/setuptools/issues/3593
+ assert dist.name in (
+ f"twine-sampleproject-3.0.0.post{tag}.tar.gz",
+ f"twine_sampleproject-3.0.0.post{tag}.tar.gz",
+ )
return dist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/tests/test_package.py new/twine-5.1.0/tests/test_package.py
--- old/twine-5.0.0/tests/test_package.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/tests/test_package.py 2024-05-16 15:46:47.000000000 +0200
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+import json
import string
import pretend
@@ -114,6 +115,40 @@
assert package.signed_filename == (filename + ".asc")
+def test_package_add_attestations(tmp_path):
+ package = package_file.PackageFile.from_filename(helpers.WHEEL_FIXTURE, None)
+
+ assert package.attestations is None
+
+ attestations = []
+ for i in range(3):
+ path = tmp_path / f"fake.{i}.attestation"
+ path.write_text(json.dumps({"fake": f"attestation {i}"}))
+ attestations.append(str(path))
+
+ package.add_attestations(attestations)
+
+ assert package.attestations == [
+ {"fake": "attestation 0"},
+ {"fake": "attestation 1"},
+ {"fake": "attestation 2"},
+ ]
+
+
+def test_package_add_attestations_invalid_json(tmp_path):
+ package = package_file.PackageFile.from_filename(helpers.WHEEL_FIXTURE, None)
+
+ assert package.attestations is None
+
+ attestation = tmp_path / "fake.publish.attestation"
+ attestation.write_text("this is not valid JSON")
+
+ with pytest.raises(
+ exceptions.InvalidDistribution, match="invalid JSON in attestation"
+ ):
+ package.add_attestations([attestation])
+
+
@pytest.mark.parametrize(
"pkg_name,expected_name",
[
@@ -177,7 +212,7 @@
"requires_external",
"requires_python",
# Metadata 2.1
- "provides_extras",
+ "provides_extra",
"description_content_type",
# Metadata 2.2
"dynamic",
@@ -185,7 +220,8 @@
@pytest.mark.parametrize("gpg_signature", [(None), (pretend.stub())])
-def test_metadata_dictionary_values(gpg_signature):
+(a)pytest.mark.parametrize("attestation", [(None), ({"fake": "attestation"})])
+def test_metadata_dictionary_values(gpg_signature, attestation):
"""Pass values from pkginfo.Distribution through to dictionary."""
meta = pretend.stub(
name="whatever",
@@ -226,6 +262,8 @@
filetype=pretend.stub(),
)
package.gpg_signature = gpg_signature
+ if attestation:
+ package.attestations = [attestation]
result = package.metadata_dictionary()
@@ -268,7 +306,7 @@
assert result["requires_python"] == meta.requires_python
# Metadata 2.1
- assert result["provides_extras"] == meta.provides_extras
+ assert result["provides_extra"] == meta.provides_extras
assert result["description_content_type"] == meta.description_content_type
# Metadata 2.2
@@ -277,6 +315,12 @@
# GPG signature
assert result.get("gpg_signature") == gpg_signature
+ # Attestations
+ if attestation:
+ assert result["attestations"] == json.dumps(package.attestations)
+ else:
+ assert "attestations" not in result
+
TWINE_1_5_0_WHEEL_HEXDIGEST = package_file.Hexdigest(
"1919f967e990bee7413e2a4bc35fd5d1",
@@ -340,21 +384,36 @@
"read_data, missing_fields",
[
pytest.param(
- b"Metadata-Version: 2.3\nName: test-package\nVersion: 1.0.0\n",
+ b"Metadata-Version: 102.3\nName: test-package\nVersion: 1.0.0\n",
"Name, Version",
id="unsupported Metadata-Version",
),
pytest.param(
+ b"Metadata-Version: 2.3\nName: UNKNOWN\nVersion: UNKNOWN\n",
+ "Name, Version",
+ id="missing Name and Version",
+ ),
+ pytest.param(
b"Metadata-Version: 2.2\nName: UNKNOWN\nVersion: UNKNOWN\n",
"Name, Version",
id="missing Name and Version",
),
pytest.param(
+ b"Metadata-Version: 2.3\nName: UNKNOWN\nVersion: 1.0.0\n",
+ "Name",
+ id="missing Name",
+ ),
+ pytest.param(
b"Metadata-Version: 2.2\nName: UNKNOWN\nVersion: 1.0.0\n",
"Name",
id="missing Name",
),
pytest.param(
+ b"Metadata-Version: 2.3\nName: test-package\nVersion: UNKNOWN\n",
+ "Version",
+ id="missing Version",
+ ),
+ pytest.param(
b"Metadata-Version: 2.2\nName: test-package\nVersion: UNKNOWN\n",
"Version",
id="missing Version",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/tests/test_settings.py new/twine-5.1.0/tests/test_settings.py
--- old/twine-5.0.0/tests/test_settings.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/tests/test_settings.py 2024-05-16 15:46:47.000000000 +0200
@@ -164,3 +164,7 @@
monkeypatch.setenv("TWINE_NON_INTERACTIVE", "0")
args = self.parse_args([])
assert not args.non_interactive
+
+ def test_attestations_flag(self):
+ args = self.parse_args(["--attestations"])
+ assert args.attestations
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/tests/test_upload.py new/twine-5.1.0/tests/test_upload.py
--- old/twine-5.0.0/tests/test_upload.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/tests/test_upload.py 2024-05-16 15:46:47.000000000 +0200
@@ -69,10 +69,11 @@
upload_settings.sign = True
upload_settings.verbose = True
- package = upload._make_package(filename, signatures, upload_settings)
+ package = upload._make_package(filename, signatures, [], upload_settings)
assert package.filename == filename
assert package.gpg_signature is not None
+ assert package.attestations is None
assert caplog.messages == [
f"{filename} ({expected_size})",
@@ -94,7 +95,7 @@
monkeypatch.setattr(package_file.PackageFile, "sign", stub_sign)
- package = upload._make_package(filename, signatures, upload_settings)
+ package = upload._make_package(filename, signatures, [], upload_settings)
assert package.filename == filename
assert package.gpg_signature is not None
@@ -105,6 +106,56 @@
]
+def test_make_package_attestations_flagged_but_missing(upload_settings):
+ """Fail when the user requests attestations but does not supply any attestations."""
+ upload_settings.attestations = True
+
+ with pytest.raises(
+ exceptions.InvalidDistribution, match="Upload with attestations requested"
+ ):
+ upload._make_package(helpers.NEW_WHEEL_FIXTURE, {}, [], upload_settings)
+
+
+def test_split_inputs():
+ """Split inputs into dists, signatures, and attestations."""
+ inputs = [
+ helpers.WHEEL_FIXTURE,
+ helpers.WHEEL_FIXTURE + ".asc",
+ helpers.WHEEL_FIXTURE + ".build.attestation",
+ helpers.WHEEL_FIXTURE + ".publish.attestation",
+ helpers.SDIST_FIXTURE,
+ helpers.SDIST_FIXTURE + ".asc",
+ helpers.NEW_WHEEL_FIXTURE,
+ helpers.NEW_WHEEL_FIXTURE + ".frob.attestation",
+ helpers.NEW_SDIST_FIXTURE,
+ ]
+
+ inputs = upload._split_inputs(inputs)
+
+ assert inputs.dists == [
+ helpers.WHEEL_FIXTURE,
+ helpers.SDIST_FIXTURE,
+ helpers.NEW_WHEEL_FIXTURE,
+ helpers.NEW_SDIST_FIXTURE,
+ ]
+
+ expected_signatures = {
+ os.path.basename(dist) + ".asc": dist + ".asc"
+ for dist in [helpers.WHEEL_FIXTURE, helpers.SDIST_FIXTURE]
+ }
+ assert inputs.signatures == expected_signatures
+
+ assert inputs.attestations_by_dist == {
+ helpers.WHEEL_FIXTURE: [
+ helpers.WHEEL_FIXTURE + ".build.attestation",
+ helpers.WHEEL_FIXTURE + ".publish.attestation",
+ ],
+ helpers.SDIST_FIXTURE: [],
+ helpers.NEW_WHEEL_FIXTURE: [helpers.NEW_WHEEL_FIXTURE + ".frob.attestation"],
+ helpers.NEW_SDIST_FIXTURE: [],
+ }
+
+
def test_successs_prints_release_urls(upload_settings, stub_repository, capsys):
"""Print PyPI release URLS for each uploaded package."""
stub_repository.release_urls = lambda packages: {RELEASE_URL, NEW_RELEASE_URL}
@@ -619,3 +670,22 @@
helpers.NEW_WHEEL_FIXTURE,
],
)
+
+
+def test_upload_warns_attestations_non_pypi(upload_settings, caplog, stub_response):
+ upload_settings.repository_config["repository"] = "https://notpypi.example.com"
+ upload_settings.attestations = True
+
+ # This fails because the attestation isn't a real file, which is fine
+ # since our functionality under test happens before the failure.
+ with pytest.raises(exceptions.InvalidDistribution):
+ upload.upload(
+ upload_settings,
+ [helpers.WHEEL_FIXTURE, helpers.WHEEL_FIXTURE + ".foo.attestation"],
+ )
+
+ assert (
+ "Only PyPI and TestPyPI support attestations; if you experience "
+ "failures, remove the --attestations flag and re-try this command"
+ in caplog.messages
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/tests/test_utils.py new/twine-5.1.0/tests/test_utils.py
--- old/twine-5.0.0/tests/test_utils.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/tests/test_utils.py 2024-05-16 15:46:47.000000000 +0200
@@ -150,6 +150,31 @@
assert utils.get_repository_from_config(config_file, "pypi") == exp
+def test_get_repository_config_url_with_auth(config_file):
+ repository_url = "https://user:pass@notexisting.python.org/pypi"
+ exp = {
+ "repository": "https://notexisting.python.org/pypi",
+ "username": "user",
+ "password": "pass",
+ }
+ assert utils.get_repository_from_config(config_file, "foo", repository_url) == exp
+ assert utils.get_repository_from_config(config_file, "pypi", repository_url) == exp
+
+
+(a)pytest.mark.parametrize(
+ "input_url, expected_url",
+ [
+ ("https://upload.pypi.org/legacy/", "https://upload.pypi.org/legacy/"),
+ (
+ "https://user:pass@upload.pypi.org/legacy/",
+ "https://********@upload.pypi.org/legacy/",
+ ),
+ ],
+)
+def test_sanitize_url(input_url: str, expected_url: str) -> None:
+ assert utils.sanitize_url(input_url) == expected_url
+
+
@pytest.mark.parametrize(
"repo_url, message",
[
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/tests/test_wheel.py new/twine-5.1.0/tests/test_wheel.py
--- old/twine-5.0.0/tests/test_wheel.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/tests/test_wheel.py 2024-05-16 15:46:47.000000000 +0200
@@ -96,6 +96,8 @@
with pytest.raises(
exceptions.InvalidDistribution,
- match=re.escape(f"No METADATA in archive: {whl_file}"),
+ match=re.escape(
+ f"No METADATA in archive or METADATA missing 'Metadata-Version': {whl_file}"
+ ),
):
wheel.Wheel(whl_file)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/tox.ini new/twine-5.1.0/tox.ini
--- old/twine-5.0.0/tox.ini 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/tox.ini 2024-05-16 15:46:47.000000000 +0200
@@ -79,13 +79,17 @@
[testenv:types]
deps =
mypy
- lxml
+ # required for report generation. 5.2.1 is forbidden due to an observed
+ # broken wheel on CPython 3.8:
+ # https://bugs.launchpad.net/lxml/+bug/2064158
+ lxml >= 5.2.0, != 5.2.1
# required for more thorough type declarations
keyring >= 22.3
# consider replacing with `mypy --install-types` when
# https://github.com/python/mypy/issues/10600 is resolved
types-requests
commands =
+ pip list
mypy --html-report mypy --txt-report mypy {posargs:twine}
python -c 'with open("mypy/index.txt") as f: print(f.read())'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine/cli.py new/twine-5.1.0/twine/cli.py
--- old/twine-5.0.0/twine/cli.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/twine/cli.py 2024-05-16 15:46:47.000000000 +0200
@@ -118,6 +118,6 @@
configure_output()
- main = registered_commands[args.command].load() # type: ignore[no-untyped-call] # python/importlib_metadata#288 # noqa: E501
+ main = registered_commands[args.command].load()
return main(args.args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine/commands/upload.py new/twine-5.1.0/twine/commands/upload.py
--- old/twine-5.0.0/twine/commands/upload.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/twine/commands/upload.py 2024-05-16 15:46:47.000000000 +0200
@@ -14,9 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import argparse
+import fnmatch
import logging
import os.path
-from typing import Dict, List, cast
+from typing import Dict, List, NamedTuple, cast
import requests
from rich import print
@@ -72,9 +73,16 @@
def _make_package(
- filename: str, signatures: Dict[str, str], upload_settings: settings.Settings
+ filename: str,
+ signatures: Dict[str, str],
+ attestations: List[str],
+ upload_settings: settings.Settings,
) -> package_file.PackageFile:
- """Create and sign a package, based off of filename, signatures and settings."""
+ """Create and sign a package, based off of filename, signatures, and settings.
+
+ Additionally, any supplied attestations are attached to the package when
+ the settings indicate to do so.
+ """
package = package_file.PackageFile.from_filename(filename, upload_settings.comment)
signed_name = package.signed_basefilename
@@ -83,6 +91,17 @@
elif upload_settings.sign:
package.sign(upload_settings.sign_with, upload_settings.identity)
+ # Attestations are only attached if explicitly requested with `--attestations`.
+ if upload_settings.attestations:
+ # Passing `--attestations` without any actual attestations present
+ # indicates user confusion, so we fail rather than silently allowing it.
+ if not attestations:
+ raise exceptions.InvalidDistribution(
+ "Upload with attestations requested, but "
+ f"{filename} has no associated attestations"
+ )
+ package.add_attestations(attestations)
+
file_size = utils.get_file_size(package.filename)
logger.info(f"{package.filename} ({file_size})")
if package.gpg_signature:
@@ -91,6 +110,44 @@
return package
+class Inputs(NamedTuple):
+ """Represents structured user inputs."""
+
+ dists: List[str]
+ signatures: Dict[str, str]
+ attestations_by_dist: Dict[str, List[str]]
+
+
+def _split_inputs(
+ inputs: List[str],
+) -> Inputs:
+ """
+ Split the unstructured list of input files provided by the user into groups.
+
+ Three groups are returned: upload files (i.e. dists), signatures, and attestations.
+
+ Upload files are returned as a linear list, signatures are returned as a
+ dict of ``basename -> path``, and attestations are returned as a dict of
+ ``dist-path -> [attestation-path]``.
+ """
+ signatures = {os.path.basename(i): i for i in fnmatch.filter(inputs, "*.asc")}
+ attestations = fnmatch.filter(inputs, "*.*.attestation")
+ dists = [
+ dist
+ for dist in inputs
+ if dist not in (set(signatures.values()) | set(attestations))
+ ]
+
+ attestations_by_dist = {}
+ for dist in dists:
+ dist_basename = os.path.basename(dist)
+ attestations_by_dist[dist] = [
+ a for a in attestations if os.path.basename(a).startswith(dist_basename)
+ ]
+
+ return Inputs(dists, signatures, attestations_by_dist)
+
+
def upload(upload_settings: settings.Settings, dists: List[str]) -> None:
"""Upload one or more distributions to a repository, and display the progress.
@@ -105,24 +162,40 @@
The configured options related to uploading to a repository.
:param dists:
The distribution files to upload to the repository. This can also include
- ``.asc`` files; the GPG signatures will be added to the corresponding uploads.
+ ``.asc`` and ``.attestation`` files, which will be added to their respective
+ file uploads.
:raises twine.exceptions.TwineException:
The upload failed due to a configuration error.
:raises requests.HTTPError:
The repository responded with an error.
"""
- dists = commands._find_dists(dists)
- # Determine if the user has passed in pre-signed distributions
- signatures = {os.path.basename(d): d for d in dists if d.endswith(".asc")}
- uploads = [i for i in dists if not i.endswith(".asc")]
-
upload_settings.check_repository_url()
repository_url = cast(str, upload_settings.repository_config["repository"])
- print(f"Uploading distributions to {repository_url}")
+
+ # Attestations are only supported on PyPI and TestPyPI at the moment.
+ # We warn instead of failing to allow twine to be used in local testing
+ # setups (where the PyPI deployment doesn't have a well-known domain).
+ if upload_settings.attestations and not repository_url.startswith(
+ (utils.DEFAULT_REPOSITORY, utils.TEST_REPOSITORY)
+ ):
+ logger.warning(
+ "Only PyPI and TestPyPI support attestations; "
+ "if you experience failures, remove the --attestations flag and "
+ "re-try this command"
+ )
+
+ dists = commands._find_dists(dists)
+ # Determine if the user has passed in pre-signed distributions or any attestations.
+ uploads, signatures, attestations_by_dist = _split_inputs(dists)
+
+ print(f"Uploading distributions to {utils.sanitize_url(repository_url)}")
packages_to_upload = [
- _make_package(filename, signatures, upload_settings) for filename in uploads
+ _make_package(
+ filename, signatures, attestations_by_dist[filename], upload_settings
+ )
+ for filename in uploads
]
if any(p.gpg_signature for p in packages_to_upload):
@@ -177,8 +250,8 @@
# redirects as well.
if resp.is_redirect:
raise exceptions.RedirectDetected.from_args(
- repository_url,
- resp.headers["location"],
+ utils.sanitize_url(repository_url),
+ utils.sanitize_url(resp.headers["location"]),
)
if skip_upload(resp, upload_settings.skip_existing, package):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine/package.py new/twine-5.1.0/twine/package.py
--- old/twine-5.0.0/twine/package.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/twine/package.py 2024-05-16 15:46:47.000000000 +0200
@@ -13,11 +13,12 @@
# limitations under the License.
import hashlib
import io
+import json
import logging
import os
import re
import subprocess
-from typing import Dict, NamedTuple, Optional, Sequence, Tuple, Union, cast
+from typing import Any, Dict, List, NamedTuple, Optional, Sequence, Tuple, Union, cast
import importlib_metadata
import pkginfo
@@ -78,6 +79,7 @@
self.signed_filename = self.filename + ".asc"
self.signed_basefilename = self.basefilename + ".asc"
self.gpg_signature: Optional[Tuple[str, bytes]] = None
+ self.attestations: Optional[List[Dict[Any, str]]] = None
hasher = HashManager(filename)
hasher.hash()
@@ -177,7 +179,7 @@
"requires_external": meta.requires_external,
"requires_python": meta.requires_python,
# Metadata 2.1
- "provides_extras": meta.provides_extras,
+ "provides_extra": meta.provides_extras,
"description_content_type": meta.description_content_type,
# Metadata 2.2
"dynamic": meta.dynamic,
@@ -186,6 +188,9 @@
if self.gpg_signature is not None:
data["gpg_signature"] = self.gpg_signature
+ if self.attestations is not None:
+ data["attestations"] = json.dumps(self.attestations)
+
# FIPS disables MD5 and Blake2, making the digest values None. Some package
# repositories don't allow null values, so this only sends non-null values.
# See also: https://github.com/pypa/twine/issues/775
@@ -197,6 +202,19 @@
return data
+ def add_attestations(self, attestations: List[str]) -> None:
+ loaded_attestations = []
+ for attestation in attestations:
+ with open(attestation, "rb") as att:
+ try:
+ loaded_attestations.append(json.load(att))
+ except json.JSONDecodeError:
+ raise exceptions.InvalidDistribution(
+ f"invalid JSON in attestation: {attestation}"
+ )
+
+ self.attestations = loaded_attestations
+
def add_gpg_signature(
self, signature_filepath: str, signature_filename: str
) -> None:
@@ -266,7 +284,7 @@
self._blake_hasher = None
try:
self._blake_hasher = hashlib.blake2b(digest_size=256 // 8)
- except (ValueError, TypeError):
+ except (ValueError, TypeError, AttributeError):
# FIPS mode disables blake2
pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine/repository.py new/twine-5.1.0/twine/repository.py
--- old/twine-5.0.0/twine/repository.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/twine/repository.py 2024-05-16 15:46:47.000000000 +0200
@@ -25,7 +25,7 @@
import twine
from twine import package as package_file
-KEYWORDS_TO_NOT_FLATTEN = {"gpg_signature", "content"}
+KEYWORDS_TO_NOT_FLATTEN = {"gpg_signature", "attestations", "content"}
LEGACY_PYPI = "https://pypi.python.org/"
LEGACY_TEST_PYPI = "https://testpypi.python.org/"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine/settings.py new/twine-5.1.0/twine/settings.py
--- old/twine-5.0.0/twine/settings.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/twine/settings.py 2024-05-16 15:46:47.000000000 +0200
@@ -45,6 +45,7 @@
def __init__(
self,
*,
+ attestations: bool = False,
sign: bool = False,
sign_with: str = "gpg",
identity: Optional[str] = None,
@@ -64,6 +65,8 @@
) -> None:
"""Initialize our settings instance.
+ :param attestations:
+ Whether the package file should be uploaded with attestations.
:param sign:
Configure whether the package file should be signed.
:param sign_with:
@@ -114,6 +117,7 @@
repository_name=repository_name,
repository_url=repository_url,
)
+ self.attestations = attestations
self._handle_package_signing(
sign=sign,
sign_with=sign_with,
@@ -176,6 +180,12 @@
"(Can also be set via %(env)s environment variable.)",
)
parser.add_argument(
+ "--attestations",
+ action="store_true",
+ default=False,
+ help="Upload each file's associated attestations.",
+ )
+ parser.add_argument(
"-s",
"--sign",
action="store_true",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine/utils.py new/twine-5.1.0/twine/utils.py
--- old/twine-5.0.0/twine/utils.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/twine/utils.py 2024-05-16 15:46:47.000000000 +0200
@@ -100,6 +100,24 @@
return dict(config)
+def sanitize_url(url: str) -> str:
+ """Sanitize a URL.
+
+ Sanitize URLs, removing any user:password combinations and replacing them with
+ asterisks. Returns the original URL if the string is a non-matching pattern.
+
+ :param url:
+ str containing a URL to sanitize.
+
+ return:
+ str either sanitized or as entered depending on pattern match.
+ """
+ uri = rfc3986.urlparse(url)
+ if uri.userinfo:
+ return cast(str, uri.copy_with(userinfo="*" * 8).unsplit())
+ return url
+
+
def _validate_repository_url(repository_url: str) -> None:
"""Validate the given url for allowed schemes and components."""
# Allowed schemes are http and https, based on whether the repository
@@ -126,11 +144,7 @@
# Prefer CLI `repository_url` over `repository` or .pypirc
if repository_url:
_validate_repository_url(repository_url)
- return {
- "repository": repository_url,
- "username": None,
- "password": None,
- }
+ return _config_from_repository_url(repository_url)
try:
config = get_config(config_file)[repository]
@@ -154,6 +168,17 @@
}
+def _config_from_repository_url(url: str) -> RepositoryConfig:
+ parsed = urlparse(url)
+ config = {"repository": url, "username": None, "password": None}
+ if parsed.username:
+ config["username"] = parsed.username
+ config["password"] = parsed.password
+ config["repository"] = urlunparse((parsed.scheme, parsed.hostname) + parsed[2:])
+ config["repository"] = normalize_repository_url(cast(str, config["repository"]))
+ return config
+
+
def normalize_repository_url(url: str) -> str:
parsed = urlparse(url)
if parsed.netloc in _HOSTNAMES:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine/wheel.py new/twine-5.1.0/twine/wheel.py
--- old/twine-5.0.0/twine/wheel.py 2024-02-11 14:45:06.000000000 +0100
+++ new/twine-5.1.0/twine/wheel.py 2024-05-16 15:46:47.000000000 +0200
@@ -16,6 +16,7 @@
import re
import zipfile
from typing import List, Optional
+from typing import cast as type_cast
from pkginfo import distribution
@@ -72,20 +73,27 @@
"Not a known archive format for file: %s" % fqn
)
+ searched_files: List[str] = []
try:
for path in self.find_candidate_metadata_files(names):
candidate = "/".join(path)
data = read_file(candidate)
if b"Metadata-Version" in data:
return data
+ searched_files.append(candidate)
finally:
archive.close()
- raise exceptions.InvalidDistribution("No METADATA in archive: %s" % fqn)
+ raise exceptions.InvalidDistribution(
+ "No METADATA in archive or METADATA missing 'Metadata-Version': "
+ "%s (searched %s)" % (fqn, ",".join(searched_files))
+ )
def parse(self, data: bytes) -> None:
super().parse(data)
fp = io.StringIO(data.decode("utf-8", errors="replace"))
+ # msg is ``email.message.Message`` which is a legacy API documented
+ # here: https://docs.python.org/3/library/email.compat32-message.html
msg = distribution.parse(fp)
- self.description = msg.get_payload()
+ self.description = type_cast(str, msg.get_payload())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine.egg-info/PKG-INFO new/twine-5.1.0/twine.egg-info/PKG-INFO
--- old/twine-5.0.0/twine.egg-info/PKG-INFO 2024-02-11 14:45:14.000000000 +0100
+++ new/twine-5.1.0/twine.egg-info/PKG-INFO 2024-05-16 15:46:51.000000000 +0200
@@ -1,10 +1,9 @@
Metadata-Version: 2.1
Name: twine
-Version: 5.0.0
+Version: 5.1.0
Summary: Collection of utilities for publishing packages on PyPI
-Home-page: https://twine.readthedocs.io/
-Author: Donald Stufft and individual contributors
-Author-email: donald(a)stufft.io
+Author-email: Donald Stufft and individual contributors <donald(a)stufft.io>
+Project-URL: Homepage, https://twine.readthedocs.io/
Project-URL: Source, https://github.com/pypa/twine/
Project-URL: Documentation, https://twine.readthedocs.io/en/latest/
Project-URL: Packaging tutorial, https://packaging.python.org/tutorials/packaging-projects/
@@ -38,18 +37,20 @@
Requires-Dist: rfc3986>=1.4.0
Requires-Dist: rich>=12.0.0
-.. image:: https://img.shields.io/pypi/v/twine.svg
+.. |twine-version| image:: https://img.shields.io/pypi/v/twine.svg
:target: https://pypi.org/project/twine
-.. image:: https://img.shields.io/pypi/pyversions/twine.svg
+.. |python-versions| image:: https://img.shields.io/pypi/pyversions/twine.svg
:target: https://pypi.org/project/twine
-.. image:: https://img.shields.io/readthedocs/twine
+.. |docs-badge| image:: https://img.shields.io/readthedocs/twine
:target: https://twine.readthedocs.io
-.. image:: https://img.shields.io/github/actions/workflow/status/pypa/twine/main.yml?b…
+.. |build-badge| image:: https://img.shields.io/github/actions/workflow/status/pypa/twine/main.yml?b…
:target: https://github.com/pypa/twine/actions
+|twine-version| |python-versions| |docs-badge| |build-badge|
+
twine
=====
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/twine-5.0.0/twine.egg-info/SOURCES.txt new/twine-5.1.0/twine.egg-info/SOURCES.txt
--- old/twine-5.0.0/twine.egg-info/SOURCES.txt 2024-02-11 14:45:14.000000000 +0100
+++ new/twine-5.1.0/twine.egg-info/SOURCES.txt 2024-05-16 15:46:51.000000000 +0200
@@ -10,7 +10,6 @@
mypy.ini
pyproject.toml
pytest.ini
-setup.cfg
tox.ini
.github/dependabot.yml
.github/ISSUE_TEMPLATE/01_upload_failed.yml
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-build for openSUSE:Factory checked in at 2024-07-01 11:19:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-build (Old)
and /work/SRC/openSUSE:Factory/.python-build.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-build"
Mon Jul 1 11:19:19 2024 rev:11 rq:1183987 version:1.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-build/python-build.changes 2023-09-22 21:47:50.385787484 +0200
+++ /work/SRC/openSUSE:Factory/.python-build.new.18349/python-build.changes 2024-07-01 11:19:23.972938542 +0200
@@ -1,0 +2,24 @@
+Sat Jun 29 12:49:33 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 1.2.1:
+ * Avoid error when terminal width is undetectable on Python <
+ 3.11
+ * Add --installer option, supporting pip and uv. Added uv
+ extra.
+ * Improve console output and provide -v for dependency
+ installation
+ * Avoid compiling unused bytecode when using pip
+ * Dropped support for Python 3.7
+ * Fixed invoking outer pip from user site packages
+ * Corrected the minimum pip version required to use an outer
+ pip
+ * Use external pip if available instead of installing, speeds
+ up environment setup with virtualenv slightly and venv
+ significantly.
+ * Stopped injecting wheel as a build dependency automatically,
+ in the case of missing pyproject.toml -- by :user:`webknjaz`.
+ * Use importlib_metadata on Python <3.10.2 for bugfixes not
+ present in those CPython standard libraries (not required
+ when bootstrapping) -- by :user:`GianlucaFicarelli`.
+
+-------------------------------------------------------------------
Old:
----
build-1.0.3.tar.gz
New:
----
build-1.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-build.spec ++++++
--- /var/tmp/diff_new_pack.f3Zhsu/_old 2024-07-01 11:19:24.604961566 +0200
+++ /var/tmp/diff_new_pack.f3Zhsu/_new 2024-07-01 11:19:24.604961566 +0200
@@ -1,7 +1,7 @@
#
-# spec file
+# spec file for package python-build
#
-# 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
@@ -29,7 +29,7 @@
%{?sle15_python_module_pythons}
Name: python-build%{psuffix}
-Version: 1.0.3
+Version: 1.2.1
Release: 0
Summary: Simple PEP517 package builder
License: MIT
@@ -51,7 +51,7 @@
Requires: (python-tomli >= 1.1.0 if python-base < 3.11)
Recommends: python-virtualenv >= 20.0.35
Requires(post): update-alternatives
-Requires(postun):update-alternatives
+Requires(postun): update-alternatives
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module build = %{version}}
++++++ build-1.0.3.tar.gz -> build-1.2.1.tar.gz ++++++
++++ 3615 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-virtualenv for openSUSE:Factory checked in at 2024-07-01 11:19:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-virtualenv (Old)
and /work/SRC/openSUSE:Factory/.python-virtualenv.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-virtualenv"
Mon Jul 1 11:19:18 2024 rev:67 rq:1183986 version:20.26.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-virtualenv/python-virtualenv.changes 2024-06-11 18:27:25.528778740 +0200
+++ /work/SRC/openSUSE:Factory/.python-virtualenv.new.18349/python-virtualenv.changes 2024-07-01 11:19:21.728856792 +0200
@@ -1,0 +2,6 @@
+Sat Jun 29 12:43:58 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 20.26.3:
+ * Bump embeded wheels
+
+-------------------------------------------------------------------
Old:
----
virtualenv-20.26.2.tar.gz
New:
----
virtualenv-20.26.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-virtualenv.spec ++++++
--- /var/tmp/diff_new_pack.IW5Yqx/_old 2024-07-01 11:19:23.792931984 +0200
+++ /var/tmp/diff_new_pack.IW5Yqx/_new 2024-07-01 11:19:23.796932130 +0200
@@ -27,7 +27,7 @@
%{?sle15_python_module_pythons}
Name: python-virtualenv%{psuffix}
-Version: 20.26.2
+Version: 20.26.3
Release: 0
Summary: Virtual Python Environment builder
License: MIT
++++++ virtualenv-20.26.2.tar.gz -> virtualenv-20.26.3.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-virtualenv/virtualenv-20.26.2.tar.gz /work/SRC/openSUSE:Factory/.python-virtualenv.new.18349/virtualenv-20.26.3.tar.gz differ: char 28, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libjxl for openSUSE:Factory checked in at 2024-07-01 11:19:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libjxl (Old)
and /work/SRC/openSUSE:Factory/.libjxl.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libjxl"
Mon Jul 1 11:19:17 2024 rev:18 rq:1183951 version:0.10.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/libjxl/libjxl.changes 2024-06-22 13:23:21.378519710 +0200
+++ /work/SRC/openSUSE:Factory/.libjxl.new.18349/libjxl.changes 2024-07-01 11:19:19.428772998 +0200
@@ -1,0 +2,6 @@
+Sat Jun 29 03:56:34 UTC 2024 - Jan Engelhardt <jengelh(a)inai.de>
+
+- Update to release 0.10.3
+ * fix bug in huffman-rle-gradient (e1) specialized decode path
+
+-------------------------------------------------------------------
Old:
----
v0.10.2.tar.gz
New:
----
v0.10.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libjxl.spec ++++++
--- /var/tmp/diff_new_pack.WhjJKG/_old 2024-07-01 11:19:20.428809429 +0200
+++ /var/tmp/diff_new_pack.WhjJKG/_new 2024-07-01 11:19:20.432809575 +0200
@@ -24,7 +24,7 @@
Name: libjxl
%bcond_with gtk
%endif
-Version: 0.10.2
+Version: 0.10.3
Release: 0
Summary: JPEG XL reference implementation
License: BSD-3-Clause
++++++ v0.10.2.tar.gz -> v0.10.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/.github/workflows/conformance.yml new/libjxl-0.10.3/.github/workflows/conformance.yml
--- old/libjxl-0.10.2/.github/workflows/conformance.yml 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/.github/workflows/conformance.yml 2024-06-27 14:10:08.000000000 +0200
@@ -20,7 +20,7 @@
env:
CONFORMANCE_REPO_HASH: ee6008ef151489a5330cd886b422af8f6ed58881
- LIBJXL_VERSION: "0.10.2"
+ LIBJXL_VERSION: "0.10.3"
LIBJXL_ABI_VERSION: "0.10"
concurrency:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/CHANGELOG.md new/libjxl-0.10.3/CHANGELOG.md
--- old/libjxl-0.10.2/CHANGELOG.md 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/CHANGELOG.md 2024-06-27 14:10:08.000000000 +0200
@@ -5,6 +5,11 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [0.10.3] - 2024-06-27
+
+### Fixed
+ - fix decoding of some special images (#3662)
+
## [0.10.2] - 2024-03-08
### Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/WORKSPACE new/libjxl-0.10.3/WORKSPACE
--- old/libjxl-0.10.2/WORKSPACE 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/WORKSPACE 2024-06-27 14:10:08.000000000 +0200
@@ -1,5 +1,5 @@
-load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
workspace(name = "libjxl")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/debian/changelog new/libjxl-0.10.3/debian/changelog
--- old/libjxl-0.10.2/debian/changelog 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/debian/changelog 2024-06-27 14:10:08.000000000 +0200
@@ -1,4 +1,10 @@
-jpeg-xl (0.10.2) UNRELEASED; urgency=medium
+jpeg-xl (0.10.3) UNRELEASED; urgency=medium
+
+ * Bump JPEG XL version to 0.10.3.
+
+ -- JPEG XL Maintainers <jpegxl(a)google.com> Thu, 27 Jun 2024 12:23:45 +0200
+
+jpeg-xl (0.10.2) unstable; urgency=medium
* Bump JPEG XL version to 0.10.2.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/lib/BUILD new/libjxl-0.10.3/lib/BUILD
--- old/libjxl-0.10.2/lib/BUILD 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/lib/BUILD 2024-06-27 14:10:08.000000000 +0200
@@ -3,6 +3,9 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
+load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
+load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+
# Load sources/headers/tests lists.
load(
"jxl_lists.bzl",
@@ -56,8 +59,6 @@
"libjxl_test_shards",
"libjxl_test_timeouts",
)
-load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
-load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
DEFAULT_VISIBILITY = ["//:__subpackages__"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/lib/CMakeLists.txt new/libjxl-0.10.3/lib/CMakeLists.txt
--- old/libjxl-0.10.2/lib/CMakeLists.txt 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/lib/CMakeLists.txt 2024-06-27 14:10:08.000000000 +0200
@@ -5,7 +5,7 @@
set(JPEGXL_MAJOR_VERSION 0)
set(JPEGXL_MINOR_VERSION 10)
-set(JPEGXL_PATCH_VERSION 2)
+set(JPEGXL_PATCH_VERSION 3)
set(JPEGXL_LIBRARY_VERSION
"${JPEGXL_MAJOR_VERSION}.${JPEGXL_MINOR_VERSION}.${JPEGXL_PATCH_VERSION}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/lib/jxl/modular/encoding/encoding.cc new/libjxl-0.10.3/lib/jxl/modular/encoding/encoding.cc
--- old/libjxl-0.10.2/lib/jxl/modular/encoding/encoding.cc 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/lib/jxl/modular/encoding/encoding.cc 2024-06-27 14:10:08.000000000 +0200
@@ -138,8 +138,8 @@
const Tree &global_tree,
const weighted::Header &wp_header,
pixel_type chan, size_t group_id,
- TreeLut<uint8_t, true> &tree_lut,
- Image *image) {
+ TreeLut<uint8_t, true> &tree_lut, Image *image,
+ uint32_t &fl_run, uint32_t &fl_v) {
Channel &channel = image->channel[chan];
std::array<pixel_type, kNumStaticProperties> static_props = {
@@ -222,20 +222,19 @@
} else if (uses_lz77 && predictor == Predictor::Gradient && offset == 0 &&
multiplier == 1 && reader->HuffRleOnly()) {
JXL_DEBUG_V(8, "Gradient RLE (fjxl) very fast track.");
- uint32_t run = 0;
- uint32_t v = 0;
- pixel_type_w sv = 0;
+ pixel_type_w sv = UnpackSigned(fl_v);
for (size_t y = 0; y < channel.h; y++) {
pixel_type *JXL_RESTRICT r = channel.Row(y);
const pixel_type *JXL_RESTRICT rtop = (y ? channel.Row(y - 1) : r - 1);
const pixel_type *JXL_RESTRICT rtopleft =
(y ? channel.Row(y - 1) - 1 : r - 1);
pixel_type_w guess = (y ? rtop[0] : 0);
- if (run == 0) {
- reader->ReadHybridUintClusteredHuffRleOnly(ctx_id, br, &v, &run);
- sv = UnpackSigned(v);
+ if (fl_run == 0) {
+ reader->ReadHybridUintClusteredHuffRleOnly(ctx_id, br, &fl_v,
+ &fl_run);
+ sv = UnpackSigned(fl_v);
} else {
- run--;
+ fl_run--;
}
r[0] = sv + guess;
for (size_t x = 1; x < channel.w; x++) {
@@ -243,11 +242,12 @@
pixel_type top = rtop[x];
pixel_type topleft = rtopleft[x];
pixel_type_w guess = ClampedGradient(top, left, topleft);
- if (!run) {
- reader->ReadHybridUintClusteredHuffRleOnly(ctx_id, br, &v, &run);
- sv = UnpackSigned(v);
+ if (!fl_run) {
+ reader->ReadHybridUintClusteredHuffRleOnly(ctx_id, br, &fl_v,
+ &fl_run);
+ sv = UnpackSigned(fl_v);
} else {
- run--;
+ fl_run--;
}
r[x] = sv + guess;
}
@@ -484,16 +484,16 @@
const Tree &global_tree,
const weighted::Header &wp_header,
pixel_type chan, size_t group_id,
- TreeLut<uint8_t, true> &tree_lut,
- Image *image) {
+ TreeLut<uint8_t, true> &tree_lut, Image *image,
+ uint32_t &fl_run, uint32_t &fl_v) {
if (reader->UsesLZ77()) {
return detail::DecodeModularChannelMAANS</*uses_lz77=*/true>(
br, reader, context_map, global_tree, wp_header, chan, group_id,
- tree_lut, image);
+ tree_lut, image, fl_run, fl_v);
} else {
return detail::DecodeModularChannelMAANS</*uses_lz77=*/false>(
br, reader, context_map, global_tree, wp_header, chan, group_id,
- tree_lut, image);
+ tree_lut, image, fl_run, fl_v);
}
}
@@ -619,6 +619,8 @@
// Read channels
ANSSymbolReader reader(code, br, distance_multiplier);
auto tree_lut = jxl::make_unique<TreeLut<uint8_t, true>>();
+ uint32_t fl_run = 0;
+ uint32_t fl_v = 0;
for (; next_channel < nb_channels; next_channel++) {
Channel &channel = image.channel[next_channel];
if (!channel.w || !channel.h) {
@@ -631,7 +633,7 @@
}
JXL_RETURN_IF_ERROR(DecodeModularChannelMAANS(
br, &reader, *context_map, *tree, header.wp_header, next_channel,
- group_id, *tree_lut, &image));
+ group_id, *tree_lut, &image, fl_run, fl_v));
// Truncated group.
if (!br->AllReadsWithinBounds()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/lib/jxl_lists.bzl new/libjxl-0.10.3/lib/jxl_lists.bzl
--- old/libjxl-0.10.2/lib/jxl_lists.bzl 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/lib/jxl_lists.bzl 2024-06-27 14:10:08.000000000 +0200
@@ -551,7 +551,7 @@
libjxl_minor_version = 10
-libjxl_patch_version = 2
+libjxl_patch_version = 3
libjxl_public_headers = [
"include/jxl/cms.h",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libjxl-0.10.2/lib/lib.gni new/libjxl-0.10.3/lib/lib.gni
--- old/libjxl-0.10.2/lib/lib.gni 2024-03-08 09:10:58.000000000 +0100
+++ new/libjxl-0.10.3/lib/lib.gni 2024-06-27 14:10:08.000000000 +0200
@@ -549,7 +549,7 @@
libjxl_minor_version = 10
-libjxl_patch_version = 2
+libjxl_patch_version = 3
libjxl_public_headers = [
"include/jxl/cms.h",
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-wurlitzer for openSUSE:Factory checked in at 2024-07-01 11:19:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-wurlitzer (Old)
and /work/SRC/openSUSE:Factory/.python-wurlitzer.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wurlitzer"
Mon Jul 1 11:19:17 2024 rev:9 rq:1183915 version:3.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-wurlitzer/python-wurlitzer.changes 2024-05-03 19:44:08.631965977 +0200
+++ /work/SRC/openSUSE:Factory/.python-wurlitzer.new.18349/python-wurlitzer.changes 2024-07-01 11:19:18.444737151 +0200
@@ -1,0 +2,8 @@
+Sat Jun 29 05:32:32 UTC 2024 - Dirk Müller <dmueller(a)suse.com>
+
+- update to 3.1.1:
+ * fix restore after capture with optimized file pipes
+ * Minor readme clarification
+ * sys_pipes: check that sys.stdout isn't being forwarded to itself
+
+-------------------------------------------------------------------
Old:
----
wurlitzer-3.1.0.tar.gz
New:
----
wurlitzer-3.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-wurlitzer.spec ++++++
--- /var/tmp/diff_new_pack.U2Ebnt/_old 2024-07-01 11:19:19.076760175 +0200
+++ /var/tmp/diff_new_pack.U2Ebnt/_new 2024-07-01 11:19:19.076760175 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-wurlitzer
-Version: 3.1.0
+Version: 3.1.1
Release: 0
Summary: Python package to capture C-level output in context managers
License: MIT
++++++ wurlitzer-3.1.0.tar.gz -> wurlitzer-3.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wurlitzer-3.1.0/PKG-INFO new/wurlitzer-3.1.1/PKG-INFO
--- old/wurlitzer-3.1.0/PKG-INFO 2024-04-29 12:39:41.315538000 +0200
+++ new/wurlitzer-3.1.1/PKG-INFO 2024-06-12 12:27:24.982421600 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: wurlitzer
-Version: 3.1.0
+Version: 3.1.1
Summary: Capture C-level output in context managers
Home-page: https://github.com/minrk/wurlitzer
Author: Min RK
@@ -37,7 +37,7 @@
stdout = out.read()
```
-Capture stdout/stderr in StringIO:
+Capture both stdout and stderr in a single StringIO object:
```python
from io import StringIO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wurlitzer-3.1.0/README.md new/wurlitzer-3.1.1/README.md
--- old/wurlitzer-3.1.0/README.md 2024-04-29 12:39:34.000000000 +0200
+++ new/wurlitzer-3.1.1/README.md 2024-06-12 12:27:18.000000000 +0200
@@ -21,7 +21,7 @@
stdout = out.read()
```
-Capture stdout/stderr in StringIO:
+Capture both stdout and stderr in a single StringIO object:
```python
from io import StringIO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wurlitzer-3.1.0/pyproject.toml new/wurlitzer-3.1.1/pyproject.toml
--- old/wurlitzer-3.1.0/pyproject.toml 2024-04-29 12:39:34.000000000 +0200
+++ new/wurlitzer-3.1.1/pyproject.toml 2024-06-12 12:27:18.000000000 +0200
@@ -15,7 +15,7 @@
github_url = "https://github.com/minrk/wurlitzer"
[tool.tbump.version]
-current = "3.1.0"
+current = "3.1.1"
# Example of a semver regexp.
# Make sure this matches current_version before
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wurlitzer-3.1.0/test.py new/wurlitzer-3.1.1/test.py
--- old/wurlitzer-3.1.0/test.py 2024-04-29 12:39:34.000000000 +0200
+++ new/wurlitzer-3.1.1/test.py 2024-06-12 12:27:18.000000000 +0200
@@ -104,6 +104,16 @@
assert stderr.getvalue() == u"Hi, stdérr\n"
+def test_sys_pipes_check():
+ # pytest redirects stdout; un-redirect it for the test
+ with mock.patch('sys.stdout', sys.__stdout__), mock.patch(
+ 'sys.stderr', sys.__stderr__
+ ):
+ with pytest.raises(ValueError):
+ with sys_pipes():
+ pass
+
+
def test_redirect_everything():
stdout = io.StringIO()
stderr = io.StringIO()
@@ -219,6 +229,9 @@
assert w.thread is None
printf("some stdout")
printf_err("some stderr")
+ # make sure capture stopped
+ printf("after stdout")
+ printf_err("after stderr")
with test_stdout.open() as f:
assert f.read() == "some stdout\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wurlitzer-3.1.0/wurlitzer.egg-info/PKG-INFO new/wurlitzer-3.1.1/wurlitzer.egg-info/PKG-INFO
--- old/wurlitzer-3.1.0/wurlitzer.egg-info/PKG-INFO 2024-04-29 12:39:41.000000000 +0200
+++ new/wurlitzer-3.1.1/wurlitzer.egg-info/PKG-INFO 2024-06-12 12:27:24.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: wurlitzer
-Version: 3.1.0
+Version: 3.1.1
Summary: Capture C-level output in context managers
Home-page: https://github.com/minrk/wurlitzer
Author: Min RK
@@ -37,7 +37,7 @@
stdout = out.read()
```
-Capture stdout/stderr in StringIO:
+Capture both stdout and stderr in a single StringIO object:
```python
from io import StringIO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wurlitzer-3.1.0/wurlitzer.py new/wurlitzer-3.1.1/wurlitzer.py
--- old/wurlitzer-3.1.0/wurlitzer.py 2024-04-29 12:39:34.000000000 +0200
+++ new/wurlitzer-3.1.1/wurlitzer.py 2024-06-12 12:27:18.000000000 +0200
@@ -5,7 +5,7 @@
from __future__ import print_function
-__version__ = '3.1.0'
+__version__ = '3.1.1'
__all__ = [
'pipes',
@@ -209,6 +209,7 @@
real_fd = getattr(sys, '__%s__' % name).fileno()
save_fd = os.dup(real_fd)
self._save_fds[name] = save_fd
+ self._real_fds[name] = real_fd
try:
capture_fd = getattr(self, "_" + name).fileno()
@@ -233,7 +234,6 @@
dup2(pipe_in, real_fd)
os.close(pipe_in)
- self._real_fds[name] = real_fd
# make pipe_out non-blocking
flags = fcntl(pipe_out, F_GETFL)
@@ -532,10 +532,29 @@
def sys_pipes(encoding=_default_encoding, bufsize=None):
"""Redirect C-level stdout/stderr to sys.stdout/stderr
- This is useful of sys.sdout/stderr are already being forwarded somewhere.
+ This is useful of sys.sdout/stderr are already being forwarded somewhere,
+ e.g. in a Jupyter kernel.
DO NOT USE THIS if sys.stdout and sys.stderr are not already being forwarded.
"""
+ # check that we aren't forwarding stdout to itself
+ for name in ("stdout", "stderr"):
+ stream = getattr(sys, name)
+ capture_stream = getattr(sys, "__{}__".format(name))
+ try:
+ fd = stream.fileno()
+ capture_fd = capture_stream.fileno()
+ except Exception:
+ # ignore errors - if sys.stdout doesn't need a fileno,
+ # it's definitely not the original sys.__stdout__
+ continue
+ else:
+ if fd == capture_fd:
+ raise ValueError(
+ "Cannot forward sys.__{0}__ to sys.{0}: they are the same! Maybe you want wurlitzer.pipes()?".format(
+ name
+ )
+ )
return pipes(sys.stdout, sys.stderr, encoding=encoding, bufsize=bufsize)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package boost for openSUSE:Factory checked in at 2024-07-01 11:18:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/boost (Old)
and /work/SRC/openSUSE:Factory/.boost.new.18349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "boost"
Mon Jul 1 11:18:28 2024 rev:167 rq:1184037 version:1.85.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/boost/boost.changes 2024-04-24 15:14:02.516446752 +0200
+++ /work/SRC/openSUSE:Factory/.boost.new.18349/boost.changes 2024-07-01 11:18:29.666960183 +0200
@@ -1,0 +2,5 @@
+Sat Jun 29 09:13:57 CEST 2024 - Friedrich Haubensak <hsk17(a)mail.de>
+
+- add patch boost-1.85.0-python-numpy-2.patch from upstream
+
+-------------------------------------------------------------------
New:
----
boost-1.85.0-python-numpy-2.patch
BETA DEBUG BEGIN:
New:
- add patch boost-1.85.0-python-numpy-2.patch from upstream
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ boost.spec ++++++
--- /var/tmp/diff_new_pack.rmcsVf/_old 2024-07-01 11:18:31.543028528 +0200
+++ /var/tmp/diff_new_pack.rmcsVf/_new 2024-07-01 11:18:31.547028673 +0200
@@ -244,6 +244,8 @@
Patch21: boost-remove-cmakedir.patch
Patch22: boost-process.patch
Patch23: boost-charconv-quadmath.patch
+# PATCH-FIX-UPSTREAM boost-1.85.0-python-numpy-2.patch -- gh#boostorg/python/pull/432
+Patch24: boost-1.85.0-python-numpy-2.patch
%{?suse_build_hwcaps_libs}
BuildRequires: fdupes
BuildRequires: gcc-c++
@@ -1271,6 +1273,7 @@
%patch -P 21 -p1
%patch -P 22 -p2
%patch -P 23 -p1
+%patch -P 24 -p1
%build
find . -type f -exec chmod u+w {} +
++++++ boost-1.85.0-python-numpy-2.patch ++++++
https://bugs.gentoo.org/932459
https://github.com/boostorg/python/issues/431
https://github.com/boostorg/python/pull/432
From 33ac06ca59a68266d3d26edf08205d31ddab4a6c Mon Sep 17 00:00:00 2001
From: Alexis DUBURCQ <alexis.duburcq(a)gmail.com>
Date: Fri, 15 Mar 2024 14:10:16 +0100
Subject: [PATCH] Support numpy 2.0.0b1
--- a/libs/python/src/numpy/dtype.cpp
+++ b/libs/python/src/numpy/dtype.cpp
@@ -98,7 +98,13 @@ python::detail::new_reference dtype::convert(object const & arg, bool align)
return python::detail::new_reference(reinterpret_cast<PyObject*>(obj));
}
-int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;}
+int dtype::get_itemsize() const {
+#if NPY_ABI_VERSION < 0x02000000
+ return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;
+#else
+ return PyDataType_ELSIZE(reinterpret_cast<PyArray_Descr*>(ptr()));
+#endif
+}
bool equivalent(dtype const & a, dtype const & b) {
// On Windows x64, the behaviour described on
1
0