openSUSE Commits
Threads by month
- ----- 2024 -----
- December
- 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
February 2021
- 1 participants
- 2358 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-networkx for openSUSE:Factory checked in at 2021-02-01 13:27:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-networkx (Old)
and /work/SRC/openSUSE:Factory/.python-networkx.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-networkx"
Mon Feb 1 13:27:14 2021 rev:26 rq:867976 version:2.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-networkx/python-networkx.changes 2020-10-25 18:09:50.123527865 +0100
+++ /work/SRC/openSUSE:Factory/.python-networkx.new.28504/python-networkx.changes 2021-02-01 13:28:47.358157771 +0100
@@ -1,0 +2,16 @@
+Sat Jan 30 01:42:49 UTC 2021 - Ben Greiner <code(a)bnavigator.de>
+
+- Temporarily reenable python36 build until SciPy is updated,
+ because the PyYAML fix needs to be merged first
+
+-------------------------------------------------------------------
+Wed Jan 27 12:55:26 UTC 2021 - Mark��ta Machov�� <mmachova(a)suse.com>
+
+- Add yaml-loader.patch adding support for new PyYAML
+
+-------------------------------------------------------------------
+Mon Jan 18 01:43:05 UTC 2021 - Benjamin Greiner <code(a)bnavigator.de>
+
+- Skip python36 because of SciPy 1.6.0
+
+-------------------------------------------------------------------
New:
----
yaml-loader.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-networkx.spec ++++++
--- /var/tmp/diff_new_pack.zMKtKg/_old 2021-02-01 13:28:48.074158885 +0100
+++ /var/tmp/diff_new_pack.zMKtKg/_new 2021-02-01 13:28:48.078158891 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-networkx
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,6 +18,8 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
+# Temporarily reenabled until SciPy is updated, because the PyYAML fix needs to be merged first
+#%%define skip_python36 1
Name: python-networkx
Version: 2.5
Release: 0
@@ -26,6 +28,8 @@
URL: https://networkx.github.io/
Source: https://files.pythonhosted.org/packages/source/n/networkx/networkx-%{versio…
Patch0: 0001-Replace-hash-function-for-test-of-weighted-astar.patch
+# PATCH-FIX-UPSTREAM https://github.com/networkx/networkx/commit/a6dd458a12ad8db161271e227164480… fixes Github Actions failures
+Patch1: yaml-loader.patch
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module decorator >= 3.4.0}
BuildRequires: %{python_module matplotlib >= 3.1}
++++++ yaml-loader.patch ++++++
From a6dd458a12ad8db161271e2271644803d4f29a96 Mon Sep 17 00:00:00 2001
From: Douglas Fenstermacher <douglas.fenstermacher(a)gmail.com>
Date: Wed, 20 Jan 2021 10:47:56 -0500
Subject: [PATCH] fixes Github Actions failures (#4548)
Github Actions failing due to new release of pyyaml==5.4, this change should resolve that issue
---
networkx/readwrite/nx_yaml.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/networkx/readwrite/nx_yaml.py b/networkx/readwrite/nx_yaml.py
index 80bd5dfd0c..98b4b1d9cb 100644
--- a/networkx/readwrite/nx_yaml.py
+++ b/networkx/readwrite/nx_yaml.py
@@ -102,5 +102,5 @@ def read_yaml(path):
except ImportError as e:
raise ImportError("read_yaml() requires PyYAML: http://pyyaml.org/") from e
- G = yaml.load(path, Loader=yaml.FullLoader)
+ G = yaml.load(path, Loader=yaml.Loader)
return G
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-psutil for openSUSE:Factory checked in at 2021-02-01 13:27:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-psutil (Old)
and /work/SRC/openSUSE:Factory/.python-psutil.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-psutil"
Mon Feb 1 13:27:11 2021 rev:60 rq:867674 version:5.8.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-psutil/python-psutil.changes 2020-12-12 20:30:33.933739433 +0100
+++ /work/SRC/openSUSE:Factory/.python-psutil.new.28504/python-psutil.changes 2021-02-01 13:28:46.414156302 +0100
@@ -1,0 +2,48 @@
+Fri Jan 29 08:19:00 UTC 2021 - Antonio Larrosa <alarrosa(a)suse.com>
+
+- Do not install tests (and change the way they're run since they
+ were run from %{buildroot})
+
+-------------------------------------------------------------------
+Thu Jan 28 16:25:35 UTC 2021 - Antonio Larrosa <alarrosa(a)suse.com>
+
+- Add patch to skip tests related to rlimit and zombie processes
+ that fail when building for python2 on i586:
+ * skip_rlimit_tests_on_python2.patch
+
+-------------------------------------------------------------------
+Mon Jan 25 16:03:37 UTC 2021 - Antonio Larrosa <alarrosa(a)suse.com>
+
+- update to 5.8.0:
+ * Enhancements:
+ - 1863: disk_partitions() exposes 2 extra fields: maxfile and
+ maxpath, which are the maximum file name and path name
+ length.
+ - 1872: [Windows] added support for PyPy 2.7.
+ - 1879: provide pre-compiled wheels for Linux and macOS.
+ - 1880: get rid of Travis and Cirrus CI services (they are no
+ longer free). CI testing is now done by GitHub Actions on
+ Linux, macOS and FreeBSD (yes). AppVeyor is still being used
+ for Windows CI.
+ * Bug fixes:
+ - 1708: [Linux] get rid of sensors_temperatures() duplicates.
+ (patch by Tim Schlueter).
+ - 1839: [Windows] always raise AccessDenied when failing to
+ query 64 processes from 32 bit ones (NtWoW64 APIs).
+ - 1866: [Windows] process exe(), cmdline(), environ() may raise
+ "invalid access to memory location" on Python 3.9.
+ - 1874: [Solaris] wrong swap output given when encrypted column
+ is present.
+ - 1875: [Windows] process username() may raise
+ ERROR_NONE_MAPPED if the SID has no corresponding account
+ name. In this case AccessDenied is now raised.
+ - 1877: [Windows] OpenProcess may fail with ERROR_SUCCESS.
+ Turn it into AccessDenied or NoSuchProcess depending on
+ whether the PID is alive.
+ - 1886: [macOS] EIO error may be raised on cmdline() and
+ environment(). Now it gets translated into AccessDenied.
+ - 1891: [macOS] get rid of deprecated getpagesize().
+- Rebase patch and skip three other tests that fail on obs
+ * skip-obs.patch
+
+-------------------------------------------------------------------
Old:
----
psutil-5.7.3.tar.gz
New:
----
psutil-5.8.0.tar.gz
skip_rlimit_tests_on_python2.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-psutil.spec ++++++
--- /var/tmp/diff_new_pack.xg8yqg/_old 2021-02-01 13:28:47.018157242 +0100
+++ /var/tmp/diff_new_pack.xg8yqg/_new 2021-02-01 13:28:47.022157248 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-psutil
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
%endif
%bcond_without python2
Name: python-psutil
-Version: 5.7.3
+Version: 5.8.0
Release: 0
Summary: A process utilities module for Python
License: BSD-3-Clause
@@ -34,6 +34,8 @@
# PATCH-FIX-UPSTREAM skip_failing_tests.patch gh#giampaolo/psutil#1635 mcepl(a)suse.com
# skip tests failing because of incomplete emulation of the environment in osc build
Patch2: skip_failing_tests.patch
+# PATCH-FIX-SLE skip_rlimit_tests_on_python2.patch alarrosa(a)suse.com
+Patch3: skip_rlimit_tests_on_python2.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -75,6 +77,7 @@
%{python_expand mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-psutil
cp -r scripts %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
find %{buildroot}%{_docdir}/%{$python_prefix}-psutil/scripts/ -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python.*|#!%{__$python}|" {} \;
+rm -rf %{buildroot}%{$python_sitearch}/psutil/tests
%fdupes %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
%fdupes %{buildroot}%{$python_sitearch}
}
@@ -84,9 +87,10 @@
export LANG=en_US.UTF-8
export PSUTIL_TESTING=1
export TRAVIS=1
+march=`python3 -c "import platform ; print(platform.machine())"`
# Note test_fetch_all is a bit flaky, occasionally failing
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -Wa psutil/tests/runner.py
+%python_expand PYTHONPATH=build/lib.linux-${march}-%{$python_version}/ $python -Wa psutil/tests/runner.py
%endif
%files %{python_files}
++++++ psutil-5.7.3.tar.gz -> psutil-5.8.0.tar.gz ++++++
++++ 5305 lines of diff (skipped)
++++++ skip-obs.patch ++++++
--- /var/tmp/diff_new_pack.xg8yqg/_old 2021-02-01 13:28:47.154157454 +0100
+++ /var/tmp/diff_new_pack.xg8yqg/_new 2021-02-01 13:28:47.158157460 +0100
@@ -1,8 +1,16 @@
-Index: psutil-5.7.3/psutil/tests/test_misc.py
+Index: psutil-5.8.0/psutil/tests/test_misc.py
===================================================================
---- psutil-5.7.3.orig/psutil/tests/test_misc.py
-+++ psutil-5.7.3/psutil/tests/test_misc.py
-@@ -664,7 +664,7 @@ class TestScripts(PsutilTestCase):
+--- psutil-5.8.0.orig/psutil/tests/test_misc.py
++++ psutil-5.8.0/psutil/tests/test_misc.py
+@@ -354,6 +354,7 @@ class TestMisc(PsutilTestCase):
+ check(psutil.disk_usage(os.getcwd()))
+ check(psutil.users())
+
++ @unittest.skipIf(True, 'does not work on obs')
+ def test_setup_script(self):
+ setup_py = os.path.join(ROOT_DIR, 'setup.py')
+ if CI_TESTING and not os.path.exists(setup_py):
+@@ -667,7 +668,7 @@ class TestScripts(PsutilTestCase):
src = f.read()
ast.parse(src)
@@ -11,7 +19,7 @@
# make sure all example scripts have a test method defined
meths = dir(self)
for name in os.listdir(SCRIPTS_DIR):
-@@ -682,7 +682,7 @@ class TestScripts(PsutilTestCase):
+@@ -685,7 +686,7 @@ class TestScripts(PsutilTestCase):
if not stat.S_IXUSR & os.stat(path)[stat.ST_MODE]:
self.fail('%r is not executable' % path)
@@ -20,11 +28,11 @@
self.assert_stdout('disk_usage.py')
def test_free(self):
-Index: psutil-5.7.3/psutil/tests/test_linux.py
+Index: psutil-5.8.0/psutil/tests/test_linux.py
===================================================================
---- psutil-5.7.3.orig/psutil/tests/test_linux.py
-+++ psutil-5.7.3/psutil/tests/test_linux.py
-@@ -682,7 +682,7 @@ class TestSystemCPUCountLogical(PsutilTe
+--- psutil-5.8.0.orig/psutil/tests/test_linux.py
++++ psutil-5.8.0/psutil/tests/test_linux.py
+@@ -675,7 +675,7 @@ class TestSystemCPUCountLogical(PsutilTe
self.assertEqual(psutil.cpu_count(logical=True), num)
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
@@ -33,7 +41,7 @@
out = sh("lscpu -p")
num = len([x for x in out.split('\n') if not x.startswith('#')])
self.assertEqual(psutil.cpu_count(logical=True), num)
-@@ -725,7 +725,7 @@ class TestSystemCPUCountLogical(PsutilTe
+@@ -718,7 +718,7 @@ class TestSystemCPUCountLogical(PsutilTe
class TestSystemCPUCountPhysical(PsutilTestCase):
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
@@ -42,7 +50,7 @@
out = sh("lscpu -p")
core_ids = set()
for line in out.split('\n'):
-@@ -1080,7 +1080,7 @@ class TestSystemDiskPartitions(PsutilTes
+@@ -1068,7 +1068,7 @@ class TestSystemDiskPartitions(PsutilTes
@unittest.skipIf(not hasattr(os, 'statvfs'), "os.statvfs() not available")
@skip_on_not_implemented()
@@ -51,7 +59,7 @@
# test psutil.disk_usage() and psutil.disk_partitions()
# against "df -a"
def df(path):
-@@ -1254,7 +1254,7 @@ class TestSystemDiskIoCounters(PsutilTes
+@@ -1242,7 +1242,7 @@ class TestSystemDiskIoCounters(PsutilTes
self.assertEqual(ret.read_count, 1)
self.assertEqual(ret.write_count, 5)
@@ -60,29 +68,49 @@
def exists(path):
if path == '/proc/diskstats':
return False
-Index: psutil-5.7.3/psutil/tests/test_posix.py
+Index: psutil-5.8.0/psutil/tests/test_posix.py
===================================================================
---- psutil-5.7.3.orig/psutil/tests/test_posix.py
-+++ psutil-5.7.3/psutil/tests/test_posix.py
-@@ -371,7 +371,7 @@ class TestSystemAPIs(PsutilTestCase):
-
+--- psutil-5.8.0.orig/psutil/tests/test_posix.py
++++ psutil-5.8.0/psutil/tests/test_posix.py
+@@ -376,7 +376,7 @@ class TestSystemAPIs(PsutilTestCase):
# AIX can return '-' in df output instead of numbers, e.g. for /proc
@unittest.skipIf(AIX, "unreliable on AIX")
+ @retry_on_failure()
- def test_disk_usage(self):
+ def _test_disk_usage(self):
def df(device):
out = sh("df -k %s" % device).strip()
line = out.split('\n')[1]
-Index: psutil-5.7.3/psutil/tests/test_system.py
+Index: psutil-5.8.0/psutil/tests/test_system.py
===================================================================
---- psutil-5.7.3.orig/psutil/tests/test_system.py
-+++ psutil-5.7.3/psutil/tests/test_system.py
-@@ -591,7 +591,7 @@ class TestDiskAPIs(PsutilTestCase):
+--- psutil-5.8.0.orig/psutil/tests/test_system.py
++++ psutil-5.8.0/psutil/tests/test_system.py
+@@ -200,6 +200,7 @@ class TestMiscAPIs(PsutilTestCase):
+ self.assertLess(bt, time.time())
+
+ @unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
++ @unittest.skipIf(True, "does not work on obs")
+ def test_users(self):
+ users = psutil.users()
+ self.assertNotEqual(users, [])
+@@ -580,7 +581,7 @@ class TestDiskAPIs(PsutilTestCase):
def test_disk_usage_bytes(self):
psutil.disk_usage(b'.')
- def test_disk_partitions(self):
+ def _test_disk_partitions(self):
- # all = False
- ls = psutil.disk_partitions(all=False)
- # on travis we get:
+ def check_ntuple(nt):
+ self.assertIsInstance(nt.device, str)
+ self.assertIsInstance(nt.mountpoint, str)
+Index: psutil-5.8.0/psutil/tests/test_contracts.py
+===================================================================
+--- psutil-5.8.0.orig/psutil/tests/test_contracts.py
++++ psutil-5.8.0/psutil/tests/test_contracts.py
+@@ -246,6 +246,7 @@ class TestSystemAPITypes(PsutilTestCase)
+ self.assertIsInstance(k, str)
+ self.assert_ntuple_of_nums(v, type_=(int, long))
+
++ @unittest.skipIf(True, "does not work on obs")
+ def test_disk_partitions(self):
+ # Duplicate of test_system.py. Keep it anyway.
+ for disk in psutil.disk_partitions():
++++++ skip_rlimit_tests_on_python2.patch ++++++
Index: psutil-5.8.0/psutil/tests/test_process.py
===================================================================
--- psutil-5.8.0.orig/psutil/tests/test_process.py
+++ psutil-5.8.0/psutil/tests/test_process.py
@@ -416,6 +416,7 @@ class TestProcess(PsutilTestCase):
p.ionice(init)
@unittest.skipIf(not HAS_RLIMIT, "not supported")
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
def test_rlimit_get(self):
import resource
p = psutil.Process(os.getpid())
@@ -439,6 +440,7 @@ class TestProcess(PsutilTestCase):
self.assertGreaterEqual(ret[1], -1)
@unittest.skipIf(not HAS_RLIMIT, "not supported")
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
def test_rlimit_set(self):
p = self.spawn_psproc()
p.rlimit(psutil.RLIMIT_NOFILE, (5, 5))
@@ -452,6 +454,7 @@ class TestProcess(PsutilTestCase):
p.rlimit(psutil.RLIMIT_NOFILE, (5, 5, 5))
@unittest.skipIf(not HAS_RLIMIT, "not supported")
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
def test_rlimit(self):
p = psutil.Process()
testfn = self.get_testfn()
@@ -472,6 +475,7 @@ class TestProcess(PsutilTestCase):
self.assertEqual(p.rlimit(psutil.RLIMIT_FSIZE), (soft, hard))
@unittest.skipIf(not HAS_RLIMIT, "not supported")
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
def test_rlimit_infinity(self):
# First set a limit, then re-set it by specifying INFINITY
# and assume we overridden the previous limit.
@@ -487,6 +491,7 @@ class TestProcess(PsutilTestCase):
self.assertEqual(p.rlimit(psutil.RLIMIT_FSIZE), (soft, hard))
@unittest.skipIf(not HAS_RLIMIT, "not supported")
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
def test_rlimit_infinity_value(self):
# RLIMIT_FSIZE should be RLIM_INFINITY, which will be a really
# big number on a platform with large file support. On these
@@ -1270,6 +1275,7 @@ class TestProcess(PsutilTestCase):
self.assertEqual(normcase(p.exe()), normcase(PYTHON_EXE))
@unittest.skipIf(not POSIX, 'POSIX only')
+ @unittest.skipIf(sys.version_info.major == 2, "not supported on python2")
def test_zombie_process(self):
def succeed_or_zombie_p_exc(fun):
try:
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-Pillow for openSUSE:Factory checked in at 2021-02-01 13:27:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Pillow (Old)
and /work/SRC/openSUSE:Factory/.python-Pillow.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Pillow"
Mon Feb 1 13:27:08 2021 rev:45 rq:867671 version:8.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Pillow/python-Pillow.changes 2020-12-31 10:00:36.350981000 +0100
+++ /work/SRC/openSUSE:Factory/.python-Pillow.new.28504/python-Pillow.changes 2021-02-01 13:28:44.758153726 +0100
@@ -1,0 +2,33 @@
+Thu Jan 28 15:07:09 UTC 2021 - Oliver Kurz <okurz(a)suse.com>
+
+- Fix rpmlint warning about duplicate file definition
+- Fix package build by relying on %python_subpackages for Obsoletes/Conflicts (bsc#1181281)
+
+-------------------------------------------------------------------
+Sun Jan 24 11:00:39 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 8.1.0 (bsc#1180833, bsc#1180834, bsc#1180832):
+ * Fix TIFF OOB Write error. CVE-2020-35654
+ * Fix for Read Overflow in PCX Decoding. CVE-2020-35653
+ * Fix for SGI Decode buffer overrun. CVE-2020-35655
+ * Fix OOB Read when saving GIF of xsize=1
+ * Makefile updates
+ * Add support for PySide6
+ * Use disposal settings from previous frame in APNG
+ * Added exception explaining that _repr_png_ saves to PNG
+ * Use previous disposal method in GIF load_end
+ * Allow putpalette to accept 1024 integers to include alpha values
+ * Fix OOB Read when writing TIFF with custom Metadata
+ * Added append_images support for ICO
+ * Block TIFFTAG_SUBIFD
+ * Fixed dereferencing potential null pointers
+ * Deprecate FreeType 2.7
+ * Moved warning to end of execution
+ * Removed unused fromstring and tostring C methods
+ * init() if one of the formats is unrecognised
+ * Moved string_dimension CVE image to pillow-depends
+ * Support raw rgba8888 for DDS
+- drop patches python-Pillow-tiff-4.2.0.patch
+ python-Pillow-tiff-fix-oob-read.patch (upstream)
+
+-------------------------------------------------------------------
Old:
----
Pillow-8.0.1.tar.gz
python-Pillow-tiff-4.2.0.patch
python-Pillow-tiff-fix-oob-read.patch
New:
----
Pillow-8.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-Pillow.spec ++++++
--- /var/tmp/diff_new_pack.Zsi7J8/_old 2021-02-01 13:28:45.966155605 +0100
+++ /var/tmp/diff_new_pack.Zsi7J8/_new 2021-02-01 13:28:45.970155612 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-Pillow
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,16 +20,12 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-Pillow
-Version: 8.0.1
+Version: 8.1.0
Release: 0
Summary: Python Imaging Library (Fork)
License: HPND
URL: https://python-pillow.org/
Source: https://files.pythonhosted.org/packages/source/P/Pillow/Pillow-%{version}.t…
-# https://github.com/python-pillow/Pillow/commit/416f12e772d2b3cb920b18b3625e…
-Patch0: python-Pillow-tiff-fix-oob-read.patch
-# https://github.com/python-pillow/Pillow/pull/5153
-Patch1: python-Pillow-tiff-4.2.0.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module olefile}
BuildRequires: %{python_module pytest >= 4.0}
@@ -61,10 +57,8 @@
Obsoletes: %{oldpython}-imaging-sane < %{version}
Provides: %{oldpython}-imaging-sane = %{version}
%endif
-%ifpython3
-Obsoletes: python3-imaging < %{version}
-Provides: python3-imaging = %{version}
-%endif
+Obsoletes: python-imaging < %{version}
+Provides: python-imaging = %{version}
%python_subpackages
%description
@@ -91,17 +85,15 @@
%prep
%setup -q -n Pillow-%{version}
-%patch0 -p1
-%patch1 -p1
%build
%python_build
%install
%python_install
-%python_expand %fdupes %{buildroot}%{$python_sitearch}
# add missing path
%{python_expand echo "PIL" > %{buildroot}%{$python_sitearch}/PIL.pth}
+%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1
++++++ Pillow-8.0.1.tar.gz -> Pillow-8.1.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-Pillow/Pillow-8.0.1.tar.gz /work/SRC/openSUSE:Factory/.python-Pillow.new.28504/Pillow-8.1.0.tar.gz differ: char 5, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-wheel for openSUSE:Factory checked in at 2021-02-01 13:27:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-wheel (Old)
and /work/SRC/openSUSE:Factory/.python-wheel.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wheel"
Mon Feb 1 13:27:05 2021 rev:23 rq:867605 version:0.36.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-wheel/python-wheel.changes 2020-02-15 22:23:00.451231453 +0100
+++ /work/SRC/openSUSE:Factory/.python-wheel.new.28504/python-wheel.changes 2021-02-01 13:28:42.690150508 +0100
@@ -1,0 +2,30 @@
+Thu Jan 28 23:25:52 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 0.36.2:
+ - Updated vendored ``packaging`` library to v20.8
+ - Fixed wheel sdist missing ``LICENSE.txt``
+ - Don't use default ``macos/arm64`` deployment target in calculating the
+ platform tag for fat binaries (PR by Ronald Oussoren)
+ - Fixed ``AssertionError`` when ``MACOSX_DEPLOYMENT_TARGET`` was set to ``11``
+ (PR by Grzegorz Bokota and Fran��ois-Xavier Coudert)
+ - Fixed regression introduced in 0.36.0 on Python 2.7 when a custom generator
+ name was passed as unicode (Scikit-build)
+ (``TypeError: 'unicode' does not have the buffer interface``)
+ - Added official Python 3.9 support
+ - Updated vendored ``packaging`` library to v20.7
+ - Switched to always using LF as line separator when generating ``WHEEL`` files
+ (on Windows, CRLF was being used instead)
+ - The ABI tag is taken from the sysconfig SOABI value. On PyPy the SOABI value
+ is ``pypy37-pp73`` which is not compliant with PEP 3149, as it should have
+ both the API tag and the platform tag. This change future-proofs any change
+ in PyPy's SOABI tag to make sure only the ABI tag is used by wheel.
+ - Fixed regression and test for ``bdist_wheel --plat-name``. It was ignored for
+ C extensions in v0.35, but the regression was not detected by tests.
+ - Replaced install dependency on ``packaging`` with a vendored copy of its
+ ``tags`` module
+ - Fixed ``bdist_wheel`` not working on FreeBSD due to mismatching platform tag
+ name (it was not being converted to lowercase)
+ - Switched to the packaging_ library for computing wheel tags
+ - Fixed a resource leak in ``WheelFile.open()`` (PR by Jon Dufresne)
+
+-------------------------------------------------------------------
Old:
----
wheel-0.34.2.tar.gz
New:
----
wheel-0.36.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-wheel.spec ++++++
--- /var/tmp/diff_new_pack.ZIABo8/_old 2021-02-01 13:28:43.366151560 +0100
+++ /var/tmp/diff_new_pack.ZIABo8/_new 2021-02-01 13:28:43.370151566 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-wheel
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
%bcond_with test
%endif
Name: python-wheel%{psuffix}
-Version: 0.34.2
+Version: 0.36.2
Release: 0
Summary: A built-package format for Python
License: MIT
++++++ wheel-0.34.2.tar.gz -> wheel-0.36.2.tar.gz ++++++
++++ 2126 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-urllib3 for openSUSE:Factory checked in at 2021-02-01 13:27:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-urllib3 (Old)
and /work/SRC/openSUSE:Factory/.python-urllib3.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-urllib3"
Mon Feb 1 13:27:03 2021 rev:44 rq:867599 version:1.26.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-urllib3/python-urllib3.changes 2021-01-02 21:30:26.399402563 +0100
+++ /work/SRC/openSUSE:Factory/.python-urllib3.new.28504/python-urllib3.changes 2021-02-01 13:28:41.450148579 +0100
@@ -1,0 +2,9 @@
+Thu Jan 28 23:20:46 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 1.26.3:
+ * Fixed bytes and string comparison issue with headers (Pull #2141)
+ * Changed ``ProxySchemeUnknown`` error message to be
+ more actionable if the user supplies a proxy URL without
+ a scheme. (Pull #2107)
+
+-------------------------------------------------------------------
Old:
----
urllib3-1.26.2.tar.gz
New:
----
urllib3-1.26.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-urllib3.spec ++++++
--- /var/tmp/diff_new_pack.8EhkbR/_old 2021-02-01 13:28:42.346149973 +0100
+++ /var/tmp/diff_new_pack.8EhkbR/_new 2021-02-01 13:28:42.346149973 +0100
@@ -27,7 +27,7 @@
%bcond_with test
%endif
Name: python-urllib3%{psuffix}
-Version: 1.26.2
+Version: 1.26.3
Release: 0
Summary: HTTP library with thread-safe connection pooling, file post, and more
License: MIT
++++++ remove_mock.patch ++++++
--- /var/tmp/diff_new_pack.8EhkbR/_old 2021-02-01 13:28:42.386150035 +0100
+++ /var/tmp/diff_new_pack.8EhkbR/_new 2021-02-01 13:28:42.390150042 +0100
@@ -1,5 +1,7 @@
---- a/docs/conf.py
-+++ b/docs/conf.py
+Index: urllib3-1.26.3/docs/conf.py
+===================================================================
+--- urllib3-1.26.3.orig/docs/conf.py
++++ urllib3-1.26.3/docs/conf.py
@@ -14,7 +14,10 @@ sys.path.insert(0, root_path)
# Mock some expensive/platform-specific modules so build will work.
# (https://read-the-docs.readthedocs.io/en/latest/faq.html#\
@@ -12,17 +14,10 @@
class MockModule(mock.Mock):
-@@ -77,7 +80,7 @@ html_logo = "images/banner.svg"
-
- html_theme_options = {
- "announcement": """
-- <a style=\"text-decoration: none; color: white;\"
-+ <a style=\"text-decoration: none; color: white;\"
- href=\"https://opencollective.com/urllib3\">
- <img src=\"/en/latest/_static/favicon.png\"/> Sponsor urllib3 v2.0 on Open Collective
- </a>
---- a/test/appengine/test_urlfetch.py
-+++ b/test/appengine/test_urlfetch.py
+Index: urllib3-1.26.3/test/appengine/test_urlfetch.py
+===================================================================
+--- urllib3-1.26.3.orig/test/appengine/test_urlfetch.py
++++ urllib3-1.26.3/test/appengine/test_urlfetch.py
@@ -5,7 +5,10 @@ Engine-patched version of httplib to mak
import httplib
import pytest
@@ -35,8 +30,10 @@
from ..test_no_ssl import TestWithoutSSL
---- a/test/contrib/test_pyopenssl.py
-+++ b/test/contrib/test_pyopenssl.py
+Index: urllib3-1.26.3/test/contrib/test_pyopenssl.py
+===================================================================
+--- urllib3-1.26.3.orig/test/contrib/test_pyopenssl.py
++++ urllib3-1.26.3/test/contrib/test_pyopenssl.py
@@ -1,7 +1,10 @@
# -*- coding: utf-8 -*-
import os
@@ -49,8 +46,10 @@
import pytest
try:
---- a/test/contrib/test_pyopenssl_dependencies.py
-+++ b/test/contrib/test_pyopenssl_dependencies.py
+Index: urllib3-1.26.3/test/contrib/test_pyopenssl_dependencies.py
+===================================================================
+--- urllib3-1.26.3.orig/test/contrib/test_pyopenssl_dependencies.py
++++ urllib3-1.26.3/test/contrib/test_pyopenssl_dependencies.py
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
import pytest
@@ -62,8 +61,10 @@
try:
from urllib3.contrib.pyopenssl import extract_from_urllib3, inject_into_urllib3
---- a/test/test_connection.py
-+++ b/test/test_connection.py
+Index: urllib3-1.26.3/test/test_connection.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_connection.py
++++ urllib3-1.26.3/test/test_connection.py
@@ -1,6 +1,9 @@
import datetime
@@ -75,8 +76,10 @@
import pytest
from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname
---- a/test/test_connectionpool.py
-+++ b/test/test_connectionpool.py
+Index: urllib3-1.26.3/test/test_connectionpool.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_connectionpool.py
++++ urllib3-1.26.3/test/test_connectionpool.py
@@ -6,7 +6,10 @@ from ssl import SSLError as BaseSSLError
from test import SHORT_TIMEOUT
@@ -89,8 +92,10 @@
from dummyserver.server import DEFAULT_CA
from urllib3._collections import HTTPHeaderDict
---- a/test/test_queue_monkeypatch.py
-+++ b/test/test_queue_monkeypatch.py
+Index: urllib3-1.26.3/test/test_queue_monkeypatch.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_queue_monkeypatch.py
++++ urllib3-1.26.3/test/test_queue_monkeypatch.py
@@ -1,6 +1,9 @@
from __future__ import absolute_import
@@ -102,8 +107,10 @@
import pytest
from urllib3 import HTTPConnectionPool
---- a/test/test_response.py
-+++ b/test/test_response.py
+Index: urllib3-1.26.3/test/test_response.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_response.py
++++ urllib3-1.26.3/test/test_response.py
@@ -9,7 +9,10 @@ from base64 import b64decode
from io import BufferedReader, BytesIO, TextIOWrapper
from test import onlyBrotlipy
@@ -116,8 +123,10 @@
import pytest
import six
---- a/test/test_retry.py
-+++ b/test/test_retry.py
+Index: urllib3-1.26.3/test/test_retry.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_retry.py
++++ urllib3-1.26.3/test/test_retry.py
@@ -1,6 +1,9 @@
import warnings
@@ -129,8 +138,10 @@
import pytest
from urllib3.exceptions import (
---- a/test/test_retry_deprecated.py
-+++ b/test/test_retry_deprecated.py
+Index: urllib3-1.26.3/test/test_retry_deprecated.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_retry_deprecated.py
++++ urllib3-1.26.3/test/test_retry_deprecated.py
@@ -1,7 +1,10 @@
# This is a copy-paste of test_retry.py with extra asserts about deprecated options. It will be removed for v2.
import warnings
@@ -143,8 +154,10 @@
import pytest
from urllib3.exceptions import (
---- a/test/test_ssl.py
-+++ b/test/test_ssl.py
+Index: urllib3-1.26.3/test/test_ssl.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_ssl.py
++++ urllib3-1.26.3/test/test_ssl.py
@@ -1,6 +1,9 @@
from test import notPyPy2
@@ -156,8 +169,10 @@
import pytest
from urllib3.exceptions import SNIMissingWarning
---- a/test/test_ssltransport.py
-+++ b/test/test_ssltransport.py
+Index: urllib3-1.26.3/test/test_ssltransport.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_ssltransport.py
++++ urllib3-1.26.3/test/test_ssltransport.py
@@ -4,7 +4,10 @@ import socket
import ssl
import sys
@@ -170,8 +185,10 @@
import pytest
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
---- a/test/test_util.py
-+++ b/test/test_util.py
+Index: urllib3-1.26.3/test/test_util.py
+===================================================================
+--- urllib3-1.26.3.orig/test/test_util.py
++++ urllib3-1.26.3/test/test_util.py
@@ -9,7 +9,10 @@ from itertools import chain
from test import notBrotlipy, onlyBrotlipy, onlyPy2, onlyPy3
@@ -184,8 +201,10 @@
from urllib3 import add_stderr_logger, disable_warnings, util
from urllib3.exceptions import (
---- a/test/with_dummyserver/test_connectionpool.py
-+++ b/test/with_dummyserver/test_connectionpool.py
+Index: urllib3-1.26.3/test/with_dummyserver/test_connectionpool.py
+===================================================================
+--- urllib3-1.26.3.orig/test/with_dummyserver/test_connectionpool.py
++++ urllib3-1.26.3/test/with_dummyserver/test_connectionpool.py
@@ -10,7 +10,10 @@ import warnings
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2
from threading import Event
@@ -198,8 +217,10 @@
import pytest
import six
---- a/test/with_dummyserver/test_https.py
-+++ b/test/with_dummyserver/test_https.py
+Index: urllib3-1.26.3/test/with_dummyserver/test_https.py
+===================================================================
+--- urllib3-1.26.3.orig/test/with_dummyserver/test_https.py
++++ urllib3-1.26.3/test/with_dummyserver/test_https.py
@@ -19,7 +19,10 @@ from test import (
resolvesLocalhostFQDN,
)
@@ -212,8 +233,10 @@
import pytest
import trustme
---- a/test/with_dummyserver/test_socketlevel.py
-+++ b/test/with_dummyserver/test_socketlevel.py
+Index: urllib3-1.26.3/test/with_dummyserver/test_socketlevel.py
+===================================================================
+--- urllib3-1.26.3.orig/test/with_dummyserver/test_socketlevel.py
++++ urllib3-1.26.3/test/with_dummyserver/test_socketlevel.py
@@ -52,7 +52,10 @@ from test import (
)
from threading import Event
++++++ urllib3-1.26.2.tar.gz -> urllib3-1.26.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/CHANGES.rst new/urllib3-1.26.3/CHANGES.rst
--- old/urllib3-1.26.2/CHANGES.rst 2020-11-12 23:16:30.000000000 +0100
+++ new/urllib3-1.26.3/CHANGES.rst 2021-01-26 19:57:14.000000000 +0100
@@ -1,6 +1,16 @@
Changes
=======
+1.26.3 (2021-01-26)
+-------------------
+
+* Fixed bytes and string comparison issue with headers (Pull #2141)
+
+* Changed ``ProxySchemeUnknown`` error message to be
+ more actionable if the user supplies a proxy URL without
+ a scheme. (Pull #2107)
+
+
1.26.2 (2020-11-12)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/PKG-INFO new/urllib3-1.26.3/PKG-INFO
--- old/urllib3-1.26.2/PKG-INFO 2020-11-12 23:16:39.000000000 +0100
+++ new/urllib3-1.26.3/PKG-INFO 2021-01-26 19:57:39.199241600 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: urllib3
-Version: 1.26.2
+Version: 1.26.3
Summary: HTTP library with thread-safe connection pooling, file post, and more.
Home-page: https://urllib3.readthedocs.io/
Author: Andrey Petrov
@@ -116,6 +116,16 @@
Changes
=======
+ 1.26.3 (2021-01-26)
+ -------------------
+
+ * Fixed bytes and string comparison issue with headers (Pull #2141)
+
+ * Changed ``ProxySchemeUnknown`` error message to be
+ more actionable if the user supplies a proxy URL without
+ a scheme. (Pull #2107)
+
+
1.26.2 (2020-11-12)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/docs/conf.py new/urllib3-1.26.3/docs/conf.py
--- old/urllib3-1.26.2/docs/conf.py 2020-11-12 23:16:30.000000000 +0100
+++ new/urllib3-1.26.3/docs/conf.py 2021-01-26 19:57:14.000000000 +0100
@@ -78,8 +78,8 @@
html_theme_options = {
"announcement": """
<a style=\"text-decoration: none; color: white;\"
- href=\"https://opencollective.com/urllib3\">
- <img src=\"/en/latest/_static/favicon.png\"/> Sponsor urllib3 v2.0 on Open Collective
+ href=\"https://github.com/sponsors/urllib3\">
+ <img src=\"/en/latest/_static/favicon.png\"/> Support urllib3 on GitHub Sponsors
</a>
""",
"sidebar_hide_name": True,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/docs/sponsors.rst new/urllib3-1.26.3/docs/sponsors.rst
--- old/urllib3-1.26.2/docs/sponsors.rst 2020-11-12 23:16:30.000000000 +0100
+++ new/urllib3-1.26.3/docs/sponsors.rst 2021-01-26 19:56:40.000000000 +0100
@@ -15,7 +15,7 @@
`Get in contact <mailto:sethmichaellarson@gmail.com>`_ for additional
details on sponsorship and perks before making a contribution
- through `Open Collective <https://opencollective.com/urllib3>`_ if you have questions.
+ through `GitHub Sponsors <https://github.com/sponsors/urllib3>`_ if you have questions.
Silver v2.0 Sponsor Perks
@@ -76,12 +76,3 @@
`@Lukasa <https://github.com/Lukasa>`_
* `Stripe <https://stripe.com>`_ (June 23, 2014)
-
-
-Open Collective Supporters
---------------------------
-
-All donations are currently going towards the development of new features for urllib3 v2.0.
-Donate $5 or more as an individual or $50 or more as an organization to be added to the list of supporters below (coming soon).
-
-`Thanks to all our supporters on Open Collective <https://opencollective.com/urllib3#section-contributors>`_!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/docs/v2-roadmap.rst new/urllib3-1.26.3/docs/v2-roadmap.rst
--- old/urllib3-1.26.2/docs/v2-roadmap.rst 2020-11-12 23:16:30.000000000 +0100
+++ new/urllib3-1.26.3/docs/v2-roadmap.rst 2021-01-26 19:56:40.000000000 +0100
@@ -3,7 +3,7 @@
.. important::
- We're seeking `sponsors and supporters for urllib3 v2.0 on Open Collective <https://opencollective.com/urllib3>`_.
+ We're seeking `sponsors and supporters for urllib3 v2.0 on Open Collective <https://github.com/sponsors/urllib3>`_.
There's a lot of work to be done for our small team and we want to make sure
development can get completed on-time while also fairly compensating contributors
for the additional effort required for a large release like ``v2.0``.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/src/urllib3/_version.py new/urllib3-1.26.3/src/urllib3/_version.py
--- old/urllib3-1.26.2/src/urllib3/_version.py 2020-11-12 23:16:34.000000000 +0100
+++ new/urllib3-1.26.3/src/urllib3/_version.py 2021-01-26 19:57:14.000000000 +0100
@@ -1,2 +1,2 @@
# This file is protected via CODEOWNERS
-__version__ = "1.26.2"
+__version__ = "1.26.3"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/src/urllib3/connection.py new/urllib3-1.26.3/src/urllib3/connection.py
--- old/urllib3-1.26.2/src/urllib3/connection.py 2020-11-12 23:16:34.000000000 +0100
+++ new/urllib3-1.26.3/src/urllib3/connection.py 2021-01-26 19:57:14.000000000 +0100
@@ -67,7 +67,7 @@
# When it comes time to update this value as a part of regular maintenance
# (ie test_recent_date is failing) update it to ~6 months before the current date.
-RECENT_DATE = datetime.date(2019, 1, 1)
+RECENT_DATE = datetime.date(2020, 7, 1)
_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")
@@ -215,7 +215,7 @@
def putheader(self, header, *values):
""""""
- if SKIP_HEADER not in values:
+ if not any(isinstance(v, str) and v == SKIP_HEADER for v in values):
_HTTPConnection.putheader(self, header, *values)
elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS:
raise ValueError(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/src/urllib3/exceptions.py new/urllib3-1.26.3/src/urllib3/exceptions.py
--- old/urllib3-1.26.2/src/urllib3/exceptions.py 2020-11-12 23:16:30.000000000 +0100
+++ new/urllib3-1.26.3/src/urllib3/exceptions.py 2021-01-26 19:57:14.000000000 +0100
@@ -289,7 +289,17 @@
# TODO(t-8ch): Stop inheriting from AssertionError in v2.0.
def __init__(self, scheme):
- message = "Not supported proxy scheme %s" % scheme
+ # 'localhost' is here because our URL parser parses
+ # localhost:8080 -> scheme=localhost, remove if we fix this.
+ if scheme == "localhost":
+ scheme = None
+ if scheme is None:
+ message = "Proxy URL had no scheme, should start with http:// or https://"
+ else:
+ message = (
+ "Proxy URL had unsupported scheme %s, should use http:// or https://"
+ % scheme
+ )
super(ProxySchemeUnknown, self).__init__(message)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/src/urllib3.egg-info/PKG-INFO new/urllib3-1.26.3/src/urllib3.egg-info/PKG-INFO
--- old/urllib3-1.26.2/src/urllib3.egg-info/PKG-INFO 2020-11-12 23:16:39.000000000 +0100
+++ new/urllib3-1.26.3/src/urllib3.egg-info/PKG-INFO 2021-01-26 19:57:39.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: urllib3
-Version: 1.26.2
+Version: 1.26.3
Summary: HTTP library with thread-safe connection pooling, file post, and more.
Home-page: https://urllib3.readthedocs.io/
Author: Andrey Petrov
@@ -116,6 +116,16 @@
Changes
=======
+ 1.26.3 (2021-01-26)
+ -------------------
+
+ * Fixed bytes and string comparison issue with headers (Pull #2141)
+
+ * Changed ``ProxySchemeUnknown`` error message to be
+ more actionable if the user supplies a proxy URL without
+ a scheme. (Pull #2107)
+
+
1.26.2 (2020-11-12)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.2/test/with_dummyserver/test_proxy_poolmanager.py new/urllib3-1.26.3/test/with_dummyserver/test_proxy_poolmanager.py
--- old/urllib3-1.26.2/test/with_dummyserver/test_proxy_poolmanager.py 2020-11-12 23:16:30.000000000 +0100
+++ new/urllib3-1.26.3/test/with_dummyserver/test_proxy_poolmanager.py 2021-01-26 19:57:14.000000000 +0100
@@ -23,6 +23,7 @@
ConnectTimeoutError,
MaxRetryError,
ProxyError,
+ ProxySchemeUnknown,
ProxySchemeUnsupported,
SSLError,
)
@@ -502,6 +503,27 @@
r = http.request("GET", "%s/" % self.https_url.upper())
assert r.status == 200
+ @pytest.mark.parametrize(
+ "url, error_msg",
+ [
+ (
+ "127.0.0.1",
+ "Proxy URL had no scheme, should start with http:// or https://",
+ ),
+ (
+ "localhost:8080",
+ "Proxy URL had no scheme, should start with http:// or https://",
+ ),
+ (
+ "ftp://google.com",
+ "Proxy URL had unsupported scheme ftp, should use http:// or https://",
+ ),
+ ],
+ )
+ def test_invalid_schema(self, url, error_msg):
+ with pytest.raises(ProxySchemeUnknown, match=error_msg):
+ proxy_from_url(url)
+
@pytest.mark.skipif(not HAS_IPV6, reason="Only runs on IPv6 systems")
class TestIPv6HTTPProxyManager(IPv6HTTPDummyProxyTestCase):
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-soupsieve for openSUSE:Factory checked in at 2021-02-01 13:27:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-soupsieve (Old)
and /work/SRC/openSUSE:Factory/.python-soupsieve.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-soupsieve"
Mon Feb 1 13:27:01 2021 rev:11 rq:867598 version:2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-soupsieve/python-soupsieve.changes 2020-06-21 19:06:29.209022645 +0200
+++ /work/SRC/openSUSE:Factory/.python-soupsieve.new.28504/python-soupsieve.changes 2021-02-01 13:28:40.494147092 +0100
@@ -1,0 +2,22 @@
+Thu Jan 28 23:17:10 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 2.1.0:
+ - **NEW**: Officially support Python 3.9.
+ - **NEW**: Drop official support for Python 3.5.
+ - **NEW**: In order to avoid conflicts with future CSS specification changes,
+ non-standard pseudo classes will now start with the `:-soup-` prefix. As a
+ consequence, `:contains()` will now be known as `:-soup-contains()`, though
+ for a time the deprecated form of `:contains()` will still be allowed with
+ a warning that users should migrate over to
+ `:-soup-contains()`.
+ - **NEW**: Added new non-standard pseudo class `:-soup-contains-own()` which
+ operates similar to `:-soup-contains()` except that it only looks at text
+ nodes directly associated with the currently scoped element and not its
+ descendants.
+ - **FIX**: Import `bs4` globally instead of in local functions as it appears
+ there are no adverse affects due to circular imports as `bs4` does not
+ immediately reference `soupsieve` functions and `soupsieve` does not
+ immediately reference `bs4` functions. This should give a performance
+ boost to functions that had previously included `bs4` locally.
+
+-------------------------------------------------------------------
Old:
----
soupsieve-2.0.1.tar.gz
New:
----
soupsieve-2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-soupsieve.spec ++++++
--- /var/tmp/diff_new_pack.tR1HO1/_old 2021-02-01 13:28:41.086148013 +0100
+++ /var/tmp/diff_new_pack.tR1HO1/_new 2021-02-01 13:28:41.090148019 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-soupsieve
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -27,7 +27,7 @@
%endif
%define skip_python2 1
Name: python-soupsieve%{psuffix}
-Version: 2.0.1
+Version: 2.1
Release: 0
Summary: A modern CSS selector implementation for BeautifulSoup
License: MIT
++++++ soupsieve-2.0.1.tar.gz -> soupsieve-2.1.tar.gz ++++++
++++ 1769 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-setproctitle for openSUSE:Factory checked in at 2021-02-01 13:26:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-setproctitle (Old)
and /work/SRC/openSUSE:Factory/.python-setproctitle.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-setproctitle"
Mon Feb 1 13:26:59 2021 rev:28 rq:867595 version:1.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-setproctitle/python-setproctitle.changes 2020-12-23 14:18:48.865569215 +0100
+++ /work/SRC/openSUSE:Factory/.python-setproctitle.new.28504/python-setproctitle.changes 2021-02-01 13:28:39.618145729 +0100
@@ -1,0 +2,8 @@
+Thu Jan 28 23:04:25 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 1.2.2:
+ - Fixed Windows build (issues #89, #90).
+ - Added wheel packages for Windows (issues #47, #90).
+ - Added wheel packages for aarch64 (issues #95).
+
+-------------------------------------------------------------------
Old:
----
setproctitle-1.2.1.tar.gz
New:
----
setproctitle-1.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-setproctitle.spec ++++++
--- /var/tmp/diff_new_pack.QHb4D1/_old 2021-02-01 13:28:40.278146756 +0100
+++ /var/tmp/diff_new_pack.QHb4D1/_new 2021-02-01 13:28:40.282146762 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-setproctitle
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-setproctitle
-Version: 1.2.1
+Version: 1.2.2
Release: 0
Summary: Python module to allow customization of the process title
License: BSD-3-Clause
++++++ setproctitle-1.2.1.tar.gz -> setproctitle-1.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/HISTORY.rst new/setproctitle-1.2.2/HISTORY.rst
--- old/setproctitle-1.2.1/HISTORY.rst 2020-12-04 04:04:27.000000000 +0100
+++ new/setproctitle-1.2.2/HISTORY.rst 2021-01-23 04:21:39.000000000 +0100
@@ -1,6 +1,14 @@
Releases history
----------------
+Version 1.2.2
+-------------
+
+- Fixed Windows build (issues #89, #90).
+- Added wheel packages for Windows (issues #47, #90).
+- Added wheel packages for aarch64 (issues #95).
+
+
Version 1.2.1
-------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/PKG-INFO new/setproctitle-1.2.2/PKG-INFO
--- old/setproctitle-1.2.1/PKG-INFO 2020-12-04 04:04:28.207517100 +0100
+++ new/setproctitle-1.2.2/PKG-INFO 2021-01-23 04:21:40.167452800 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: setproctitle
-Version: 1.2.1
+Version: 1.2.2
Summary: A Python module to customize the process title
Home-page: https://github.com/dvarrazzo/py-setproctitle
Author: Daniele Varrazzo
@@ -10,6 +10,10 @@
Description: A Python module to customize the process title
==============================================
+ .. image:: https://github.com/dvarrazzo/py-setproctitle/workflows/Tests/badge.svg
+ :target: https://github.com/dvarrazzo/py-setproctitle/actions?query=workflow%3ATests
+ :alt: Tests
+
:author: Daniele Varrazzo
The ``setproctitle`` module allows a process to change its title (as displayed
@@ -138,6 +142,14 @@
Releases history
----------------
+ Version 1.2.2
+ -------------
+
+ - Fixed Windows build (issues #89, #90).
+ - Added wheel packages for Windows (issues #47, #90).
+ - Added wheel packages for aarch64 (issues #95).
+
+
Version 1.2.1
-------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/README.rst new/setproctitle-1.2.2/README.rst
--- old/setproctitle-1.2.1/README.rst 2020-12-04 04:04:27.000000000 +0100
+++ new/setproctitle-1.2.2/README.rst 2021-01-23 04:21:39.000000000 +0100
@@ -1,6 +1,10 @@
A Python module to customize the process title
==============================================
+.. image:: https://github.com/dvarrazzo/py-setproctitle/workflows/Tests/badge.svg
+ :target: https://github.com/dvarrazzo/py-setproctitle/actions?query=workflow%3ATests
+ :alt: Tests
+
:author: Daniele Varrazzo
The ``setproctitle`` module allows a process to change its title (as displayed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/setproctitle.egg-info/PKG-INFO new/setproctitle-1.2.2/setproctitle.egg-info/PKG-INFO
--- old/setproctitle-1.2.1/setproctitle.egg-info/PKG-INFO 2020-12-04 04:04:28.000000000 +0100
+++ new/setproctitle-1.2.2/setproctitle.egg-info/PKG-INFO 2021-01-23 04:21:40.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: setproctitle
-Version: 1.2.1
+Version: 1.2.2
Summary: A Python module to customize the process title
Home-page: https://github.com/dvarrazzo/py-setproctitle
Author: Daniele Varrazzo
@@ -10,6 +10,10 @@
Description: A Python module to customize the process title
==============================================
+ .. image:: https://github.com/dvarrazzo/py-setproctitle/workflows/Tests/badge.svg
+ :target: https://github.com/dvarrazzo/py-setproctitle/actions?query=workflow%3ATests
+ :alt: Tests
+
:author: Daniele Varrazzo
The ``setproctitle`` module allows a process to change its title (as displayed
@@ -138,6 +142,14 @@
Releases history
----------------
+ Version 1.2.2
+ -------------
+
+ - Fixed Windows build (issues #89, #90).
+ - Added wheel packages for Windows (issues #47, #90).
+ - Added wheel packages for aarch64 (issues #95).
+
+
Version 1.2.1
-------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/setproctitle.egg-info/SOURCES.txt new/setproctitle-1.2.2/setproctitle.egg-info/SOURCES.txt
--- old/setproctitle-1.2.1/setproctitle.egg-info/SOURCES.txt 2020-12-04 04:04:28.000000000 +0100
+++ new/setproctitle-1.2.2/setproctitle.egg-info/SOURCES.txt 2021-01-23 04:21:40.000000000 +0100
@@ -24,4 +24,5 @@
tests/conftest.py
tests/pyrun.c
tests/setproctitle_test.py
-tests/setthreadtitle_test.py
\ No newline at end of file
+tests/setthreadtitle_test.py
+tests/test_win32.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/setup.py new/setproctitle-1.2.2/setup.py
--- old/setproctitle-1.2.1/setup.py 2020-12-04 04:04:27.000000000 +0100
+++ new/setproctitle-1.2.2/setup.py 2021-01-23 04:21:39.000000000 +0100
@@ -12,12 +12,9 @@
except ImportError:
from distutils.core import setup, Extension
-
-VERSION = "1.2.1"
-
+VERSION = "1.2.2"
define_macros = {}
-
define_macros["SPT_VERSION"] = VERSION
if sys.platform.startswith("linux"):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/src/spt_setup.c new/setproctitle-1.2.2/src/spt_setup.c
--- old/setproctitle-1.2.1/src/spt_setup.c 2020-12-04 04:04:27.000000000 +0100
+++ new/setproctitle-1.2.2/src/spt_setup.c 2021-01-23 04:21:39.000000000 +0100
@@ -19,7 +19,7 @@
#if defined(__darwin__)
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
-#else
+#elif !defined(_WIN32)
extern char **environ;
#endif
@@ -456,7 +456,7 @@
spt_setup(void)
{
const int not_happened = 3;
- static int rv = not_happened;
+ static int rv = 3;
/* Make sure setup happens just once, either successful or failed */
if (rv != not_happened) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/tests/setproctitle_test.py new/setproctitle-1.2.2/tests/setproctitle_test.py
--- old/setproctitle-1.2.1/tests/setproctitle_test.py 2020-12-04 04:04:27.000000000 +0100
+++ new/setproctitle-1.2.2/tests/setproctitle_test.py 2021-01-23 04:21:39.000000000 +0100
@@ -18,9 +18,12 @@
from .conftest import run_script
-
IS_PYPY = "__pypy__" in sys.builtin_module_names
+if sys.platform == 'win32':
+ pytest.skip("skipping Posix tests on Windows",
+ allow_module_level=True)
+
def test_runner():
"""Test the script execution method."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/tests/setthreadtitle_test.py new/setproctitle-1.2.2/tests/setthreadtitle_test.py
--- old/setproctitle-1.2.1/tests/setthreadtitle_test.py 2020-12-04 04:04:27.000000000 +0100
+++ new/setproctitle-1.2.2/tests/setthreadtitle_test.py 2021-01-23 04:21:39.000000000 +0100
@@ -1,8 +1,13 @@
import os
import pytest
+import sys
from .conftest import run_script
+if sys.platform == 'win32':
+ pytest.skip("skipping Posix tests on Windows",
+ allow_module_level=True)
+
def test_thread_title_unchanged():
if not os.path.isdir("/proc/self/task/"):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.1/tests/test_win32.py new/setproctitle-1.2.2/tests/test_win32.py
--- old/setproctitle-1.2.1/tests/test_win32.py 1970-01-01 01:00:00.000000000 +0100
+++ new/setproctitle-1.2.2/tests/test_win32.py 2021-01-23 04:21:39.000000000 +0100
@@ -0,0 +1,19 @@
+import pytest
+import setproctitle
+import sys
+
+if sys.platform != 'win32':
+ pytest.skip("skipping Windows tests",
+ allow_module_level=True)
+
+
+def test_setproctitle():
+ title = "setproctitle_test"
+ setproctitle.setproctitle(title)
+ assert title == setproctitle.getproctitle()
+
+def test_setthreadtitle():
+ title = "setproctitle_test"
+ # This is currently a no-op on Windows. Let's make sure
+ # that at least it doesn't error out.
+ setproctitle.setthreadtitle(title)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-rsa for openSUSE:Factory checked in at 2021-02-01 13:26:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-rsa (Old)
and /work/SRC/openSUSE:Factory/.python-rsa.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rsa"
Mon Feb 1 13:26:57 2021 rev:20 rq:867594 version:4.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-rsa/python-rsa.changes 2020-12-12 20:31:36.545804760 +0100
+++ /work/SRC/openSUSE:Factory/.python-rsa.new.28504/python-rsa.changes 2021-02-01 13:28:38.574144104 +0100
@@ -1,0 +2,9 @@
+Thu Jan 28 23:02:47 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 4.7:
+ * CVE-2020-25658 - Bleichenbacher-style timing oracle in PKCS#1 v1.5 decryption code
+ * Add padding length check as described by PKCS#1 v1.5
+ * Reuse of blinding factors to speed up blinding operations.
+ * Declare & test support for Python 3.9
+
+-------------------------------------------------------------------
Old:
----
rsa-4.6.tar.gz
New:
----
rsa-4.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-rsa.spec ++++++
--- /var/tmp/diff_new_pack.bvUae2/_old 2021-02-01 13:28:39.270145187 +0100
+++ /var/tmp/diff_new_pack.bvUae2/_new 2021-02-01 13:28:39.274145194 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-rsa
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-rsa
-Version: 4.6
+Version: 4.7
Release: 0
Summary: Pure-Python RSA Implementation
License: Apache-2.0
++++++ rsa-4.6.tar.gz -> rsa-4.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/PKG-INFO new/rsa-4.7/PKG-INFO
--- old/rsa-4.6/PKG-INFO 2020-06-12 22:25:07.000000000 +0200
+++ new/rsa-4.7/PKG-INFO 2021-01-10 11:44:44.184212700 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: rsa
-Version: 4.6
+Version: 4.7
Summary: Pure-Python RSA implementation
Home-page: https://stuvel.eu/rsa
Author: Sybren A. Stuvel
@@ -33,6 +33,12 @@
The source code is maintained at [GitHub](https://github.com/sybrenstuvel/python-rsa/) and is
licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
+ Security
+ --------
+
+ Because of how Python internally stores numbers, it is very hard (if not impossible) to make a pure-Python program secure against timing attacks. This library is no exception, so use it with care. See https://securitypitfalls.wordpress.com/2018/08/03/constant-time-compare-in-… for more info.
+
+
Major changes in 4.1
--------------------
@@ -70,6 +76,7 @@
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Security :: Cryptography
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/README.md new/rsa-4.7/README.md
--- old/rsa-4.6/README.md 2020-06-12 22:22:56.000000000 +0200
+++ new/rsa-4.7/README.md 2021-01-10 11:09:07.000000000 +0100
@@ -23,6 +23,12 @@
The source code is maintained at [GitHub](https://github.com/sybrenstuvel/python-rsa/) and is
licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
+Security
+--------
+
+Because of how Python internally stores numbers, it is very hard (if not impossible) to make a pure-Python program secure against timing attacks. This library is no exception, so use it with care. See https://securitypitfalls.wordpress.com/2018/08/03/constant-time-compare-in-… for more info.
+
+
Major changes in 4.1
--------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/issue-80.py new/rsa-4.7/issue-80.py
--- old/rsa-4.6/issue-80.py 2017-01-16 13:04:39.000000000 +0100
+++ new/rsa-4.7/issue-80.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/usr/bin/env python -bb
-
-import rsa
-
-
-with open('privkey.pem') as privatefile:
- keydata = privatefile.read()
-pubkey = rsa.PrivateKey.load_pkcs1(keydata)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/randomness.py new/rsa-4.7/randomness.py
--- old/rsa-4.6/randomness.py 2020-04-14 19:05:30.000000000 +0200
+++ new/rsa-4.7/randomness.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-#!/usr/bin/env python3
-
-from collections import Counter
-from pprint import pprint
-
-from rsa.randnum import randint
-
-counter = Counter(randint(1024) for _ in range(1000000))
-
-def by_occurrence(item):
- return item[1], item[0]
-
-sorted_by_occurrence = sorted(counter.items(), key=by_occurrence)
-
-print('Number Occurrence')
-for number, occurrence in sorted_by_occurrence[:5]:
- print(f'{number:4d} {occurrence}')
-print("���")
-for number, occurrence in sorted_by_occurrence[-5:]:
- print(f'{number:4d} {occurrence}')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/rsa/__init__.py new/rsa-4.7/rsa/__init__.py
--- old/rsa-4.6/rsa/__init__.py 2020-06-12 22:24:55.000000000 +0200
+++ new/rsa-4.7/rsa/__init__.py 2021-01-10 11:34:53.000000000 +0100
@@ -26,8 +26,8 @@
VerificationError, find_signature_hash, sign_hash, compute_hash
__author__ = "Sybren Stuvel, Barry Mead and Yesudeep Mangalapilly"
-__date__ = '2020-06-12'
-__version__ = '4.6'
+__date__ = '2021-01-10'
+__version__ = '4.7'
# Do doctest if we're run directly
if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/rsa/common.py new/rsa-4.7/rsa/common.py
--- old/rsa-4.6/rsa/common.py 2020-06-12 22:22:56.000000000 +0200
+++ new/rsa-4.7/rsa/common.py 2021-01-10 11:09:07.000000000 +0100
@@ -49,8 +49,8 @@
try:
return num.bit_length()
- except AttributeError:
- raise TypeError('bit_size(num) only supports integers, not %r' % type(num))
+ except AttributeError as ex:
+ raise TypeError('bit_size(num) only supports integers, not %r' % type(num)) from ex
def byte_size(number: int) -> int:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/rsa/key.py new/rsa-4.7/rsa/key.py
--- old/rsa-4.6/rsa/key.py 2020-06-12 22:22:56.000000000 +0200
+++ new/rsa-4.7/rsa/key.py 2021-01-10 11:09:07.000000000 +0100
@@ -49,12 +49,15 @@
class AbstractKey:
"""Abstract superclass for private and public keys."""
- __slots__ = ('n', 'e')
+ __slots__ = ('n', 'e', 'blindfac', 'blindfac_inverse')
def __init__(self, n: int, e: int) -> None:
self.n = n
self.e = e
+ # These will be computed properly on the first call to blind().
+ self.blindfac = self.blindfac_inverse = -1
+
@classmethod
def _load_pkcs1_pem(cls, keyfile: bytes) -> 'AbstractKey':
"""Loads a key in PKCS#1 PEM format, implement in a subclass.
@@ -145,7 +148,7 @@
method = self._assert_format_exists(format, methods)
return method()
- def blind(self, message: int, r: int) -> int:
+ def blind(self, message: int) -> int:
"""Performs blinding on the message using random number 'r'.
:param message: the message, as integer, to blind.
@@ -159,10 +162,10 @@
See https://en.wikipedia.org/wiki/Blinding_%28cryptography%29
"""
+ self._update_blinding_factor()
+ return (message * pow(self.blindfac, self.e, self.n)) % self.n
- return (message * pow(r, self.e, self.n)) % self.n
-
- def unblind(self, blinded: int, r: int) -> int:
+ def unblind(self, blinded: int) -> int:
"""Performs blinding on the message using random number 'r'.
:param blinded: the blinded message, as integer, to unblind.
@@ -174,8 +177,27 @@
See https://en.wikipedia.org/wiki/Blinding_%28cryptography%29
"""
- return (rsa.common.inverse(r, self.n) * blinded) % self.n
+ return (self.blindfac_inverse * blinded) % self.n
+
+ def _initial_blinding_factor(self) -> int:
+ for _ in range(1000):
+ blind_r = rsa.randnum.randint(self.n - 1)
+ if rsa.prime.are_relatively_prime(self.n, blind_r):
+ return blind_r
+ raise RuntimeError('unable to find blinding factor')
+ def _update_blinding_factor(self):
+ if self.blindfac < 0:
+ # Compute initial blinding factor, which is rather slow to do.
+ self.blindfac = self._initial_blinding_factor()
+ self.blindfac_inverse = rsa.common.inverse(self.blindfac, self.n)
+ else:
+ # Reuse previous blinding factor as per section 9 of 'A Timing
+ # Attack against RSA with the Chinese Remainder Theorem' by Werner
+ # Schindler.
+ # See https://tls.mbed.org/public/WSchindler-RSA_Timing_Attack.pdf
+ self.blindfac = pow(self.blindfac, 2, self.n)
+ self.blindfac_inverse = pow(self.blindfac_inverse, 2, self.n)
class PublicKey(AbstractKey):
"""Represents a public RSA key.
@@ -414,13 +436,6 @@
def __hash__(self) -> int:
return hash((self.n, self.e, self.d, self.p, self.q, self.exp1, self.exp2, self.coef))
- def _get_blinding_factor(self) -> int:
- for _ in range(1000):
- blind_r = rsa.randnum.randint(self.n - 1)
- if rsa.prime.are_relatively_prime(self.n, blind_r):
- return blind_r
- raise RuntimeError('unable to find blinding factor')
-
def blinded_decrypt(self, encrypted: int) -> int:
"""Decrypts the message using blinding to prevent side-channel attacks.
@@ -431,11 +446,9 @@
:rtype: int
"""
- blind_r = self._get_blinding_factor()
- blinded = self.blind(encrypted, blind_r) # blind before decrypting
+ blinded = self.blind(encrypted) # blind before decrypting
decrypted = rsa.core.decrypt_int(blinded, self.d, self.n)
-
- return self.unblind(decrypted, blind_r)
+ return self.unblind(decrypted)
def blinded_encrypt(self, message: int) -> int:
"""Encrypts the message using blinding to prevent side-channel attacks.
@@ -447,10 +460,9 @@
:rtype: int
"""
- blind_r = self._get_blinding_factor()
- blinded = self.blind(message, blind_r) # blind before encrypting
+ blinded = self.blind(message) # blind before encrypting
encrypted = rsa.core.encrypt_int(blinded, self.d, self.n)
- return self.unblind(encrypted, blind_r)
+ return self.unblind(encrypted)
@classmethod
def _load_pkcs1_der(cls, keyfile: bytes) -> 'PrivateKey':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/rsa/pkcs1.py new/rsa-4.7/rsa/pkcs1.py
--- old/rsa-4.6/rsa/pkcs1.py 2020-06-12 22:22:56.000000000 +0200
+++ new/rsa-4.7/rsa/pkcs1.py 2021-01-10 11:09:07.000000000 +0100
@@ -30,6 +30,7 @@
import os
import sys
import typing
+from hmac import compare_digest
from . import common, transform, core, key
@@ -252,16 +253,24 @@
# encrypted value (as leading zeroes do not influence the value of an
# integer). This fixes CVE-2020-13757.
if len(crypto) > blocksize:
+ # This is operating on public information, so doesn't need to be constant-time.
raise DecryptionError('Decryption failed')
# If we can't find the cleartext marker, decryption failed.
- if cleartext[0:2] != b'\x00\x02':
- raise DecryptionError('Decryption failed')
+ cleartext_marker_bad = not compare_digest(cleartext[:2], b'\x00\x02')
# Find the 00 separator between the padding and the message
- try:
- sep_idx = cleartext.index(b'\x00', 2)
- except ValueError:
+ sep_idx = cleartext.find(b'\x00', 2)
+
+ # sep_idx indicates the position of the `\x00` separator that separates the
+ # padding from the actual message. The padding should be at least 8 bytes
+ # long (see https://tools.ietf.org/html/rfc8017#section-7.2.2 step 3), which
+ # means the separator should be at least at index 10 (because of the
+ # `\x00\x02` marker that preceeds it).
+ sep_idx_bad = sep_idx < 10
+
+ anything_bad = cleartext_marker_bad | sep_idx_bad
+ if anything_bad:
raise DecryptionError('Decryption failed')
return cleartext[sep_idx + 1:]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/rsa.egg-info/PKG-INFO new/rsa-4.7/rsa.egg-info/PKG-INFO
--- old/rsa-4.6/rsa.egg-info/PKG-INFO 2020-06-12 22:25:07.000000000 +0200
+++ new/rsa-4.7/rsa.egg-info/PKG-INFO 2021-01-10 11:44:44.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: rsa
-Version: 4.6
+Version: 4.7
Summary: Pure-Python RSA implementation
Home-page: https://stuvel.eu/rsa
Author: Sybren A. Stuvel
@@ -33,6 +33,12 @@
The source code is maintained at [GitHub](https://github.com/sybrenstuvel/python-rsa/) and is
licensed under the [Apache License, version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
+ Security
+ --------
+
+ Because of how Python internally stores numbers, it is very hard (if not impossible) to make a pure-Python program secure against timing attacks. This library is no exception, so use it with care. See https://securitypitfalls.wordpress.com/2018/08/03/constant-time-compare-in-… for more info.
+
+
Major changes in 4.1
--------------------
@@ -70,6 +76,7 @@
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Security :: Cryptography
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/rsa.egg-info/SOURCES.txt new/rsa-4.7/rsa.egg-info/SOURCES.txt
--- old/rsa-4.6/rsa.egg-info/SOURCES.txt 2020-06-12 22:25:07.000000000 +0200
+++ new/rsa-4.7/rsa.egg-info/SOURCES.txt 2021-01-10 11:44:44.000000000 +0100
@@ -2,15 +2,8 @@
MANIFEST.in
README.md
create_timing_table.py
-issue-80.py
-randomness.py
setup.cfg
setup.py
-speed_num_in_collection.py
-speedtest_pr_88.py
-wycheproof-2048.py
-wycheproof-4096.py
-wycheproof-crypto.py
rsa/__init__.py
rsa/_compat.py
rsa/asn1.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/setup.cfg new/rsa-4.7/setup.cfg
--- old/rsa-4.6/setup.cfg 2020-06-12 22:25:07.000000000 +0200
+++ new/rsa-4.7/setup.cfg 2021-01-10 11:44:44.189199700 +0100
@@ -1,6 +1,3 @@
-[bdist_wheel]
-universal = 1
-
[metadata]
license_file = LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/setup.py new/rsa-4.7/setup.py
--- old/rsa-4.6/setup.py 2020-06-12 22:24:55.000000000 +0200
+++ new/rsa-4.7/setup.py 2021-01-10 11:34:53.000000000 +0100
@@ -25,7 +25,7 @@
if __name__ == '__main__':
setup(name='rsa',
- version='4.6',
+ version='4.7',
description='Pure-Python RSA implementation',
long_description=long_description,
long_description_content_type='text/markdown',
@@ -49,6 +49,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Security :: Cryptography',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/speed_num_in_collection.py new/rsa-4.7/speed_num_in_collection.py
--- old/rsa-4.6/speed_num_in_collection.py 2016-03-17 16:15:38.000000000 +0100
+++ new/rsa-4.7/speed_num_in_collection.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-"""
-"""
-
-import timeit
-
-setup = '''
-import random
-
-random.seed('slartibartfast')
-numbers = [random.randint(0, 10) for _ in range(100)]
-'''
-
-if __name__ == '__main__':
- print('List time: ', timeit.timeit(
- '[number in [2, 3, 5, 7] for number in numbers]',
- setup=setup))
-
- print('Set time: ', timeit.timeit(
- '[number in {2, 3, 5, 7} for number in numbers]',
- setup=setup))
-
- print('Tuple time: ', timeit.timeit(
- '[number in (2, 3, 5, 7) for number in numbers]',
- setup=setup))
-
- print('Single construction: ', timeit.timeit(
- '[number in TRIVIAL_PRIMES for number in numbers]',
- setup=setup + 'TRIVIAL_PRIMES = {2, 3, 5, 7}'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/speedtest_pr_88.py new/rsa-4.7/speedtest_pr_88.py
--- old/rsa-4.6/speedtest_pr_88.py 2017-04-15 16:02:49.000000000 +0200
+++ new/rsa-4.7/speedtest_pr_88.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-#!/usr/bin/env python3
-
-import secrets
-import math
-import timeit
-
-
-def bit_size(number):
- return number.bit_length()
-
-
-def via_math_module(number):
- return int(math.ceil(bit_size(number) / 8.0))
-
-
-def via_divmod(number):
- quanta, mod = divmod(bit_size(number), 8)
-
- if mod:
- quanta += 1
- return quanta
-
-
-number = int.from_bytes(secrets.token_bytes(2048), 'little')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/tests/test_key.py new/rsa-4.7/tests/test_key.py
--- old/rsa-4.6/tests/test_key.py 2019-08-04 22:23:44.000000000 +0200
+++ new/rsa-4.7/tests/test_key.py 2021-01-10 11:09:07.000000000 +0100
@@ -21,11 +21,20 @@
message = 12345
encrypted = rsa.core.encrypt_int(message, pk.e, pk.n)
- blinded = pk.blind(encrypted, 4134431) # blind before decrypting
- decrypted = rsa.core.decrypt_int(blinded, pk.d, pk.n)
- unblinded = pk.unblind(decrypted, 4134431)
+ blinded_1 = pk.blind(encrypted) # blind before decrypting
+ decrypted = rsa.core.decrypt_int(blinded_1, pk.d, pk.n)
+ unblinded_1 = pk.unblind(decrypted)
- self.assertEqual(unblinded, message)
+ self.assertEqual(unblinded_1, message)
+
+ # Re-blinding should use a different blinding factor.
+ blinded_2 = pk.blind(encrypted) # blind before decrypting
+ self.assertNotEqual(blinded_1, blinded_2)
+
+ # The unblinding should still work, though.
+ decrypted = rsa.core.decrypt_int(blinded_2, pk.d, pk.n)
+ unblinded_2 = pk.unblind(decrypted)
+ self.assertEqual(unblinded_2, message)
class KeyGenTest(unittest.TestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/tests/test_pkcs1.py new/rsa-4.7/tests/test_pkcs1.py
--- old/rsa-4.6/tests/test_pkcs1.py 2020-06-12 22:22:56.000000000 +0200
+++ new/rsa-4.7/tests/test_pkcs1.py 2021-01-10 11:09:07.000000000 +0100
@@ -183,3 +183,36 @@
signature = signature + bytes.fromhex('0000')
with self.assertRaises(rsa.VerificationError):
pkcs1.verify(message, signature, self.pub)
+
+
+class PaddingSizeTest(unittest.TestCase):
+ def test_too_little_padding(self):
+ """Padding less than 8 bytes should be rejected."""
+
+ # Construct key that will be small enough to need only 7 bytes of padding.
+ # This key is 168 bit long, and was generated with rsa.newkeys(nbits=168).
+ self.private_key = rsa.PrivateKey.load_pkcs1(b'''
+-----BEGIN RSA PRIVATE KEY-----
+MHkCAQACFgCIGbbNSkIRLtprxka9NgOf5UxgxCMCAwEAAQIVQqymO0gHubdEVS68
+CdCiWmOJxVfRAgwBQM+e1JJwMKmxSF0CCmya6CFxO8Evdn8CDACMM3AlVC4FhlN8
+3QIKC9cjoam/swMirwIMAR7Br9tdouoH7jAE
+-----END RSA PRIVATE KEY-----
+ ''')
+ self.public_key = rsa.PublicKey(n=self.private_key.n, e=self.private_key.e)
+
+ cyphertext = self.encrypt_with_short_padding(b'op je hoofd')
+ with self.assertRaises(rsa.DecryptionError):
+ rsa.decrypt(cyphertext, self.private_key)
+
+ def encrypt_with_short_padding(self, message: bytes) -> bytes:
+ # This is a copy of rsa.pkcs1.encrypt() adjusted to use the wrong padding length.
+ keylength = rsa.common.byte_size(self.public_key.n)
+
+ # The word 'padding' has 7 letters, so is one byte short of a valid padding length.
+ padded = b'\x00\x02padding\x00' + message
+
+ payload = rsa.transform.bytes2int(padded)
+ encrypted_value = rsa.core.encrypt_int(payload, self.public_key.e, self.public_key.n)
+ cyphertext = rsa.transform.int2bytes(encrypted_value, keylength)
+
+ return cyphertext
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/wycheproof-2048.py new/rsa-4.7/wycheproof-2048.py
--- old/rsa-4.6/wycheproof-2048.py 2020-06-03 14:13:00.000000000 +0200
+++ new/rsa-4.7/wycheproof-2048.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-#!/usr/bin/env python3
-
-import rsa
-from rsa import PrivateKey
-
-privateKeyPem = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAs1EKK81M5kTFtZSuUFnhKy8FS2WNXaWVmi/fGHG4CLw98+Yo\n0nkuUarVwSS0O9pFPcpc3kvPKOe9Tv+6DLS3Qru21aATy2PRqjqJ4CYn71OYtSwM\n/ZfSCKvrjXybzgu+sBmobdtYm+sppbdL+GEHXGd8gdQw8DDCZSR6+dPJFAzLZTCd\nB+Ctwe/RXPF+ewVdfaOGjkZIzDoYDw7n+OHnsYCYozkbTOcWHpjVevipR+IBpGPi\n1rvKgFnlcG6d/tj0hWRl/6cS7RqhjoiNEtxqoJzpXs/Kg8xbCxXbCchkf11STA8u\ndiCjQWuWI8rcDwl69XMmHJjIQAq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xbEYI2unak18mikd2WB7Fp3h0YI4\nVpGZnwKBgBxkAYnZv+jGI4MyEKdsQgxvROXXYOJZkWzsKuKxVkVpYP2V4nR2YMOJ\nViJQ8FUEnPq35cMDlUk4SnoqrrHIJNOvcJSCqM+bWHAioAsfByLbUPM8sm3CDdIk\nXVJl32HuKYPJOMIWfc7hIfxLRHnCN+coz2M6tgqMDs0E/OfjuqVZ\n-----END RSA PRIVATE KEY-----"
-private_key = PrivateKey.load_pkcs1(privateKeyPem, format='PEM')
-
-original_ct = "4501b4d669e01b9ef2dc800aa1b06d49196f5a09fe8fbcd037323c60eaf027bfb98432be4e4a26c567ffec718bcbea977dd26812fa071c33808b4d5ebb742d9879806094b6fbeea63d25ea3141733b60e31c6912106e1b758a7fe0014f075193faa8b4622bfd5d3013f0a32190a95de61a3604711bc62945f95a6522bd4dfed0a994ef185b28c281f7b5e4c8ed41176d12d9fc1b837e6a0111d0132d08a6d6f0580de0c9eed8ed105531799482d1e466c68c23b0c222af7fc12ac279bc4ff57e7b4586d209371b38c4c1035edd418dc5f960441cb21ea2bedbfea86de0d7861e81021b650a1de51002c315f1e7c12debe4dcebf790caaa54a2f26b149cf9e77d"
-pt = bytes.fromhex("54657374")
-
-print('----------------------------------------------')
-print("Test with original ciphertext:")
-ct = bytes.fromhex(f"{original_ct}")
-try:
- message = rsa.decrypt(ct, private_key)
-except:
- print("[*] \033[91mInvalid decryption\033[0m")
-else:
- print("[!] \033[92mNo errors in decryption\033[0m")
- print("message == pt?", message == pt)
-
-print('----------------------------------------------')
-print("Test with prepended bytes to ciphertext:")
-ct_with_prepend = bytes.fromhex(f"0000{original_ct}")
-assert ct != ct_with_prepend
-try:
- message = rsa.decrypt(ct_with_prepend, private_key)
-except:
- print("\033[92m[*] Invalid decryption\033[0m")
-else:
- print("\033[91m[!] No errors in decryption\033[0m")
- print("message == pt?", message == pt)
-
-print('----------------------------------------------')
-print("Test with appended bytes to ciphertext:")
-ct_with_append = bytes.fromhex(f"{original_ct}0000")
-assert ct != ct_with_append
-try:
- message = rsa.decrypt(ct_with_append, private_key)
-except:
- print("\033[92m[*] Invalid decryption\033[0m")
-else:
- print("\033[91m[!] No errors in decryption\033[0m")
- print("message == pt?", message == pt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/wycheproof-4096.py new/rsa-4.7/wycheproof-4096.py
--- old/rsa-4.6/wycheproof-4096.py 2020-06-03 15:00:39.000000000 +0200
+++ new/rsa-4.7/wycheproof-4096.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,86 +0,0 @@
-#!/usr/bin/env python3
-
-import rsa
-from rsa import PrivateKey
-
-import json
-
-"""
-{
- "algorithm" : "RSAES-PKCS1-v1_5",
- "generatorVersion" : "0.8r12",
- "numberOfTests" : 65,
- "header" : [
- "Test vectors of type RsaesPkcs1Decrypt are intended to check the decryption",
- "of RSA encrypted ciphertexts."
- ],
- "notes" : {
- "InvalidPkcs1Padding" : "This is a test vector with an invalid PKCS #1 padding. Implementations must ensure that different error conditions cannot be distinguished, since the information about the error condition can be used for a padding oracle attack. (RFC 8017 Section 7.2.2)"
- },
- "schema" : "rsaes_pkcs1_decrypt_schema.json",
- "testGroups" : [
- {
- "d" : "00d3519bd86edf5dbe9c64a3781713dd049b747f5651fd918cce8a9b80b6d6a2fb6aab334ab569a89b58982e0aae373090299fa227f9652b802d23ee5ca6824c433d01d40bb0473b16190a8bfb137c0a704b4f49b45015bfbee1f670446f07595259d70c7d79ae95f9b2543b0162ebb763ebb81c4b6edff9d197dede1dbe57e40466d156d4dfd5d7634c45534fb2bbbd1bf257817a173c0795fdbcc533976f4a0d04160f299af5dc272a814b36d5bae5116b9542178f1d554cab7a6453035482b981add4bd8ffd5d500839b23e30ebd3f3868f07584cbd12ba089325982860f69f2bdc7077b6c60f58a2272823379e1023704165f7c14f64a18fd5b245a18149b7eda3385a56ba9e79502a27bf13865cde35be15de03d06aa6f08b172b7eeb4b73cbc157019c5d933584a8d1add61b7dbca3b253ca0cf93dc9a8a3aac2f50227022e692f7b4767556620cc928d63e31078c360e2ab4b71a917e19e7eb09380482e5b4ea88202871c2a29ca6f66b2fe304af609520e4f81d64c26768bb812a86679366611f4cf6e89e2bd1d9d7e28729c7f0e4e3152d7ad7f186fa32f01e169ff06a12001bc179dfd0dc942cbabc555f67f5fd043e0a3354340fa490d2f123367be926eb3e1dffe70c3151c87450f3217dc2aa0b5a7069c5a17d55614c9994139f7b37b49e9fe780af65a0e89
e2e58feaaffe163bc9d19eafd9cd29b0ef3cef3d01",
- "e" : "010001",
- "keysize" : 4096,
- "n" : "00f601be0dccd04aa40b12f3f191ae17c1f9c8c0b68e7a77e14be25c3c7907cb1d33a6ef418ef41852f32c98392bc5c9aed91c1a1501c503eab89b3ee6f4f8eb2e0fcfc41bd03609cf6a8eb3aa6f0fbe23187b33db4d34b66d128a8aba0a2abf40bb9d13d8e2554569a57ab1d8c61b8cad2dc88599ae0da5346e15dace1bac7bf69737c22f083be9b46bb8b1eab5957b2da740275e96c87195b96fe11452159dafcfd916cee5d749a77bc3905a5ebd387ae445e8fe70f16e9a086639779ceffbfd41557bd99aea6a371a6b4b160615a1a12bc6958d34bce0c85adcbd8392fa10ceca52209d56196ba3d273ce228f1f111192aa92de2a039798a17bcecb4dc6100e6f8ae8c2643f2ae768b2255f082c978e95ca551555f10608231cf8003bbf807969fff1e51914b9a8c9b8f4564645b9e5d705ffad29663f5dae3d76652b422e43f13e6c1491090805c2d1268a74a251177427e33a9a91175c3670b91746008bce1fd231e6e4f2ad70cb43aca5f07600a6d31dd02915243dfdd943a02165da367a6b7e4dae1dd2e8b836903080795d2585076cc1c15dd9e8d2e5e047526569b1bfd395d957eb9fde325d342d14426e71efdc1887515e53cdea5834921f928629e748eed097ac4024e2bf255d70411f87373948cf8e8aa7effa2b0ab47d5166091e1aedec60568b155bd9c27b
c55f3ece35f83d636dbcd5abf4853a051db94d5045",
- "privateKeyJwk" : {
- "alg" : "RSA1_5",
- "d"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KEY-----",
- "privateKeyPkcs8" : "30820944020100300d06092a864886f70d01010105000482092e3082092a0201000282020100f601be0dccd04aa40b12f3f191ae17c1f9c8c0b68e7a77e14be25c3c7907cb1d33a6ef418ef41852f32c98392bc5c9aed91c1a1501c503eab89b3ee6f4f8eb2e0fcfc41bd03609cf6a8eb3aa6f0fbe23187b33db4d34b66d128a8aba0a2abf40bb9d13d8e2554569a57ab1d8c61b8cad2dc88599ae0da5346e15dace1bac7bf69737c22f083be9b46bb8b1eab5957b2da740275e96c87195b96fe11452159dafcfd916cee5d749a77bc3905a5ebd387ae445e8fe70f16e9a086639779ceffbfd41557bd99aea6a371a6b4b160615a1a12bc6958d34bce0c85adcbd8392fa10ceca52209d56196ba3d273ce228f1f111192aa92de2a039798a17bcecb4dc6100e6f8ae8c2643f2ae768b2255f082c978e95ca551555f10608231cf8003bbf807969fff1e51914b9a8c9b8f4564645b9e5d705ffad29663f5dae3d76652b422e43f13e6c1491090805c2d1268a74a251177427e33a9a91175c3670b91746008bce1fd231e6e4f2ad70cb43aca5f07600a6d31dd02915243dfdd943a02165da367a6b7e4dae1dd2e8b836903080795d2585076cc1c15dd9e8d2e5e047526569b1bfd395d957eb9fde325d342d14426e71efdc1887515e53cdea5834921f928629
e748eed097ac4024e2bf255d70411f87373948cf8e8aa7effa2b0ab47d5166091e1aedec60568b155bd9c27bc55f3ece35f83d636dbcd5abf4853a051db94d504502030100010282020100d3519bd86edf5dbe9c64a3781713dd049b747f5651fd918cce8a9b80b6d6a2fb6aab334ab569a89b58982e0aae373090299fa227f9652b802d23ee5ca6824c433d01d40bb0473b16190a8bfb137c0a704b4f49b45015bfbee1f670446f07595259d70c7d79ae95f9b2543b0162ebb763ebb81c4b6edff9d197dede1dbe57e40466d156d4dfd5d7634c45534fb2bbbd1bf257817a173c0795fdbcc533976f4a0d04160f299af5dc272a814b36d5bae5116b9542178f1d554cab7a6453035482b981add4bd8ffd5d500839b23e30ebd3f3868f07584cbd12ba089325982860f69f2bdc7077b6c60f58a2272823379e1023704165f7c14f64a18fd5b245a18149b7eda3385a56ba9e79502a27bf13865cde35be15de03d06aa6f08b172b7eeb4b73cbc157019c5d933584a8d1add61b7dbca3b253ca0cf93dc9a8a3aac2f50227022e692f7b4767556620cc928d63e31078c360e2ab4b71a917e19e7eb09380482e5b4ea88202871c2a29ca6f66b2fe304af609520e4f81d64c26768bb812a86679366611f4cf6e89e2bd1d9d7e28729c7f0e4e3152d7ad7f186fa32f01e169ff06a12001bc179dfd0
dc942cbabc555f67f5fd043e0a3354340fa490d2f123367be926eb3e1dffe70c3151c87450f3217dc2aa0b5a7069c5a17d55614c9994139f7b37b49e9fe780af65a0e89e2e58feaaffe163bc9d19eafd9cd29b0ef3cef3d010282010100fc21b855c5ad4ca2b6970516406f71c6e79efc4126e6598772db1e082de6b0dddaaa2a2951f04148e86e0bde28213b7f600f987308301eacea134062bb0c3ddf628da9abf93ef1ce3e75b0953a484dbd3554bd5c0649933dd77e527563e90f05a8013fddac958c329378e94303b304be5f9df1fe5b043a7fdd94700a3f0b1cbbd0516b7cd94c57ca96d9fd2a8ca973991218cba33a1c23d810f7519d1f7702ab72affdb3f84a1b2a88116e4033bc4d0cfc7989c657e0fe94e964476ae58bae6b7876f36c09d32b1a63f8c47c94a74c92eedf75fc27cffe0f8452363e4bc8f7653f3cb55eaf693cec70d13c875de935a8b20439ab7e93f76981c5957fc5bb44d90282010100f9c7f748a505d23ecef9a85f8097c8cf7d7028ef6c90e22a336511582d2cc3636e34ead37204dbd22f142a3fb1d5f857b0310c7a433f51ae14d4608b01b43aa8c7ae67835f7fbe0b9d97948b39e9ba2d3a1687edb8b56ee70ff0536dab4d0551f71ed0daee9e412449f5f099bcc15e4ef0554dc79f87fec5a0dea717c7054392bf444613937401bbef3c22fbf7e738c5
8779b981609a1f9c11dd6f0bbe9996e2773459e4cef247b02a9fc21296ac57a5b10561824310cfbdecc90e06598370e3698713fdbe2528ec4ef3dccaae701eedc3e54ad6e7af4e68e3b39bd2e97ac9119936c647a503511cb283df984cfd7c07f0f56aa8ae3166948ef3f41b0859934d0282010100815486aab0a0896bf97f13e3eb1f7f5c49195b49cc3b6277412a3688798b18f46422df479cb941b3b54e25964a3d69b897bcc8355160e58b4af29f1745dd2cabb670f634b9c058e6b3514947f2c27de5ed424f73b1e1f1be4a188911a0333f3a6688658b3ee8e3265a512e4deacadc470ee304ebb5224123afb461984fe8524fe0b6b30d32a59f6ed2dc74a96bc7cbfd1bb44e58a7092235c5d6272e12a2c862cb8c8cf5d109aa4fb1c6472875a14460c1ed5207c4b22bc494c7947eb7ca63a8cafd31361d000ddf16a2d79f13dd9140d979149b488cbf44945a5b6aaf13221bf4491ebbb7fca27ca20e221f49c3c37b89fcf2dc0e2cb63f8f8a9b7a142250590282010100b61d84ff934a4e437b16ee1b4b9fdf4ae13370b5385bde7a5464a123c0343df575f9e128ef9df944230d39cc9cf5dc0edb28b7e740b69ef024c1bfee39fcd5340ffaea0010160c535dc0920e7cd81be533d00fa554a1fc4d3e02c461569f5e7ca787f1515edf45b196b759884de652c38d5934cf92524e807
b4d3b590bc39bc417ee4885a761d28ddadce6c8fdb3b961d3e7fd48064df9340a967f8b79997438841f48579a476ddb55088c308f68f2b29d01c6597a5a7c8d066284f63e37a68c3879c32aa3836675fd0eb2719883a91944561e9dd7e8aa6bb17157f08c48f8e6fae5c3e5a2bb6b5d580eec6c97ddcd9be0a49ef283a7031ad7aba8d438df4e950282010022fb8e5fcd9b767104e71244db53058c18061e1b0d1f63b73e2d59a95e2a10cd87426a33da13c287cdef8136e5e47e93fb9b30ad92628a7b543f48eb011a86356ab3cb480f27e391b018ca187d97af3d82e31861ecafa663db78aa89c3bd468e6aadefb3a43f78bc00b8014c95db54e9d21a017e8f21f671545edde9a965ea32dfff45cda37fca1aa5132f6c8eed222bd01fed5a6e7d639580c5955777a86544c2c4c939bdb8b4c486dda53072861a0334359bdb3758475e49d90d0539944e78cfcfd8fff55bb31a1cebc65b28f51e790701b2f7912188984f034e6e96e1c5251e33fe38fb221bce7a90a86857c5f56b6ca77307c45d5290b1f088ade082b349",
- "type" : "RsaesPkcs1Decrypt",
-
- {
- "tcId" : 31,
- "comment" : "prepended bytes to ciphertext",
- "msg" : "54657374",
- "ct" : "000004327a40b02bf671557124f963a57b3860e92cff62c439c0425b48b4346fc60c0ebf7a7584f94d34450d20cbd877c8d5dca12f517b486c2cccb8e1f467276ac03aadc94a97fcd224994d81672eb577cf0bbd6aa948d3dc4d7f06456f6650e5620435c078787db0f36124b292349ebe011ce54b3e932fac6525a37c793846a4f08ac3694d649f4a04e24e1f5e50f11a0492a68a509cf30e565ceb9931565b4aa5c3514b2ba87c4c0937ebcd6bb2b8248abb0970d30480059daea4c6ae556f6e91b25ffa5a4f723a9bf98a0bff668a1f0c799d3b0c85b19190dbfb5d894f84fa5d72d261dd2c09013dc0981cd0c46d7a08710801590aac8ff17b237387427ab3c6d6f2a59434b37f123bc7fc0a83d5ca5793540cba582e41b262859d36eabd0aa8203ca05d4c16aaf2a7b2bc7f251497d4c8f8654deae3cfffc5d3599ab4779585bf1673196782075a91ee7c3296a2edc6ee6c30344dd0c0a82274ae17982eeb23eca5c39c7d11a2dd171c70108b0a33164fc175425586f714deb5552e90e561f7882211d3f01c07867256d0cca511e61b0cb51189d8e5124e8cacdab6042bd421447ffa7fe6cad8e7f17dd3e599bae061f85bb5181726d1c0c5bbf2c2a5c1e60f486a81782e58d90ccd5a769f98361765441de142bb0a7f7bd406a537d5be0c2773e847b1df1d49a
c1daa963feec84954b72a695b74281159647a62a3c19acdda",
- "result" : "invalid",
- "flags" : []
- },
-
-
-"""
-
-print("\nTest with prepended bytes to ciphertext\n")
-
-privateKeyPem = "-----BEGIN RSA PRIVATE KEY-----\nMIIJKgIBAAKCAgEA9gG+DczQSqQLEvPxka4XwfnIwLaOenfhS+JcPHkHyx0zpu9B\njvQYUvMsmDkrxcmu2RwaFQHFA+q4mz7m9PjrLg/PxBvQNgnPao6zqm8PviMYezPb\nTTS2bRKKiroKKr9Au50T2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WlEu\nTerK3EcO4wTrtSJBI6+0YZhP6FJP4LazDTKln27S3HSpa8fL/Ru0TlinCSI1xdYn\nLhKiyGLLjIz10QmqT7HGRyh1oURgwe1SB8SyK8SUx5R+t8pjqMr9MTYdAA3fFqLX\nnxPdkUDZeRSbSIy/RJRaW2qvEyIb9Ekeu7f8onyiDiIfScPDe4n88twOLLY/j4qb\nehQiUFkCggEBALYdhP+TSk5DexbuG0uf30rhM3C1OFveelRkoSPAND31dfnhKO+d\n+UQjDTnMnPXcDtsot+dAtp7wJMG/7jn81TQP+uoAEBYMU13Akg582BvlM9APpVSh\n/E0+AsRhVp9efKeH8VFe30WxlrdZiE3mUsONWTTPklJOgHtNO1kLw5vEF+5Ihadh\n0o3a3ObI/bO5YdPn/UgGTfk0CpZ/i3mZdDiEH0hXmkdt21UIjDCPaPKynQHGWXpa\nfI0GYoT2PjemjDh5wyqjg2Z1/Q6ycZiDqRlEVh6d1+iqa7FxV/CMSPjm+uXD5aK7\na11YDuxsl93Nm+CknvKDpwMa16uo1DjfTpUCggEAIvuOX82bdnEE5xJE21MFjBgG\nHhsNH2O3Pi1ZqV4qEM2HQmoz2hPCh83vgTbl5
H6T+5swrZJiintUP0jrARqGNWqz\ny0gPJ+ORsBjKGH2Xrz2C4xhh7K+mY9t4qonDvUaOaq3vs6Q/eLwAuAFMldtU6dIa\nAX6PIfZxVF7d6all6jLf/0XNo3/KGqUTL2yO7SIr0B/tWm59Y5WAxZVXd6hlRMLE\nyTm9uLTEht2lMHKGGgM0NZvbN1hHXknZDQU5lE54z8/Y//Vbsxoc68ZbKPUeeQcB\nsveRIYiYTwNObpbhxSUeM/44+yIbznqQqGhXxfVrbKdzB8RdUpCx8Iit4IKzSQ==\n-----END RSA PRIVATE KEY-----"
-private_key = PrivateKey.load_pkcs1(privateKeyPem, format='PEM')
-
-ct = bytes.fromhex("000004327a40b02bf671557124f963a57b3860e92cff62c439c0425b48b4346fc60c0ebf7a7584f94d34450d20cbd877c8d5dca12f517b486c2cccb8e1f467276ac03aadc94a97fcd224994d81672eb577cf0bbd6aa948d3dc4d7f06456f6650e5620435c078787db0f36124b292349ebe011ce54b3e932fac6525a37c793846a4f08ac3694d649f4a04e24e1f5e50f11a0492a68a509cf30e565ceb9931565b4aa5c3514b2ba87c4c0937ebcd6bb2b8248abb0970d30480059daea4c6ae556f6e91b25ffa5a4f723a9bf98a0bff668a1f0c799d3b0c85b19190dbfb5d894f84fa5d72d261dd2c09013dc0981cd0c46d7a08710801590aac8ff17b237387427ab3c6d6f2a59434b37f123bc7fc0a83d5ca5793540cba582e41b262859d36eabd0aa8203ca05d4c16aaf2a7b2bc7f251497d4c8f8654deae3cfffc5d3599ab4779585bf1673196782075a91ee7c3296a2edc6ee6c30344dd0c0a82274ae17982eeb23eca5c39c7d11a2dd171c70108b0a33164fc175425586f714deb5552e90e561f7882211d3f01c07867256d0cca511e61b0cb51189d8e5124e8cacdab6042bd421447ffa7fe6cad8e7f17dd3e599bae061f85bb5181726d1c0c5bbf2c2a5c1e60f486a81782e58d90ccd5a769f98361765441de142bb0a7f7bd406a537d5be0c2773e847b1df1d4
9ac1daa963feec84954b72a695b74281159647a62a3c19acdda")
-pt = bytes.fromhex("54657374")
-
-try:
- message = rsa.decrypt(ct, private_key)
-except:
- print("[*] Invalid decryption")
-else:
- print("[!] No errors in decryption")
- print("message == pt?", message == pt)
-
-print("\nTest with original ciphertext\n")
-
-privateKeyPem = "-----BEGIN RSA PRIVATE KEY-----\nMIIJKgIBAAKCAgEA9gG+DczQSqQLEvPxka4XwfnIwLaOenfhS+JcPHkHyx0zpu9B\njvQYUvMsmDkrxcmu2RwaFQHFA+q4mz7m9PjrLg/PxBvQNgnPao6zqm8PviMYezPb\nTTS2bRKKiroKKr9Au50T2OJVRWmlerHYxhuMrS3IhZmuDaU0bhXazhuse/aXN8Iv\nCDvptGu4seq1lXstp0AnXpbIcZW5b+EUUhWdr8/ZFs7l10mne8OQWl69OHrkRej+\ncPFumghmOXec7/v9QVV72Zrq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3fFqLX\nnxPdkUDZeRSbSIy/RJRaW2qvEyIb9Ekeu7f8onyiDiIfScPDe4n88twOLLY/j4qb\nehQiUFkCggEBALYdhP+TSk5DexbuG0uf30rhM3C1OFveelRkoSPAND31dfnhKO+d\n+UQjDTnMnPXcDtsot+dAtp7wJMG/7jn81TQP+uoAEBYMU13Akg582BvlM9APpVSh\n/E0+AsRhVp9efKeH8VFe30WxlrdZiE3mUsONWTTPklJOgHtNO1kLw5vEF+5Ihadh\n0o3a3ObI/bO5YdPn/UgGTfk0CpZ/i3mZdDiEH0hXmkdt21UIjDCPaPKynQHGWXpa\nfI0GYoT2PjemjDh5wyqjg2Z1/Q6ycZiDqRlEVh6d1+iqa7FxV/CMSPjm+uXD5aK7\na11YDuxsl93Nm+CknvKDpwMa16uo1DjfTpUCggEAIvuOX82bdnEE5xJE21MFjBgG\nHhsNH2O3Pi1ZqV4qEM2HQmoz2hPCh83vgTbl5
H6T+5swrZJiintUP0jrARqGNWqz\ny0gPJ+ORsBjKGH2Xrz2C4xhh7K+mY9t4qonDvUaOaq3vs6Q/eLwAuAFMldtU6dIa\nAX6PIfZxVF7d6all6jLf/0XNo3/KGqUTL2yO7SIr0B/tWm59Y5WAxZVXd6hlRMLE\nyTm9uLTEht2lMHKGGgM0NZvbN1hHXknZDQU5lE54z8/Y//Vbsxoc68ZbKPUeeQcB\nsveRIYiYTwNObpbhxSUeM/44+yIbznqQqGhXxfVrbKdzB8RdUpCx8Iit4IKzSQ==\n-----END RSA PRIVATE KEY-----"
-private_key = PrivateKey.load_pkcs1(privateKeyPem, format='PEM')
-
-ct = bytes.fromhex("04327a40b02bf671557124f963a57b3860e92cff62c439c0425b48b4346fc60c0ebf7a7584f94d34450d20cbd877c8d5dca12f517b486c2cccb8e1f467276ac03aadc94a97fcd224994d81672eb577cf0bbd6aa948d3dc4d7f06456f6650e5620435c078787db0f36124b292349ebe011ce54b3e932fac6525a37c793846a4f08ac3694d649f4a04e24e1f5e50f11a0492a68a509cf30e565ceb9931565b4aa5c3514b2ba87c4c0937ebcd6bb2b8248abb0970d30480059daea4c6ae556f6e91b25ffa5a4f723a9bf98a0bff668a1f0c799d3b0c85b19190dbfb5d894f84fa5d72d261dd2c09013dc0981cd0c46d7a08710801590aac8ff17b237387427ab3c6d6f2a59434b37f123bc7fc0a83d5ca5793540cba582e41b262859d36eabd0aa8203ca05d4c16aaf2a7b2bc7f251497d4c8f8654deae3cfffc5d3599ab4779585bf1673196782075a91ee7c3296a2edc6ee6c30344dd0c0a82274ae17982eeb23eca5c39c7d11a2dd171c70108b0a33164fc175425586f714deb5552e90e561f7882211d3f01c07867256d0cca511e61b0cb51189d8e5124e8cacdab6042bd421447ffa7fe6cad8e7f17dd3e599bae061f85bb5181726d1c0c5bbf2c2a5c1e60f486a81782e58d90ccd5a769f98361765441de142bb0a7f7bd406a537d5be0c2773e847b1df1d49ac1
daa963feec84954b72a695b74281159647a62a3c19acdda")
-pt = bytes.fromhex("54657374")
-
-try:
- message = rsa.decrypt(ct, private_key)
-except:
- print("[*] Invalid decryption")
-else:
- print("[!] No errors in decryption")
- print("message == pt?", message == pt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-4.6/wycheproof-crypto.py new/rsa-4.7/wycheproof-crypto.py
--- old/rsa-4.6/wycheproof-crypto.py 2020-06-03 14:15:31.000000000 +0200
+++ new/rsa-4.7/wycheproof-crypto.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-
-from Crypto.Cipher import PKCS1_v1_5
-from Crypto.PublicKey import RSA
-from Crypto.Hash import SHA
-from Crypto.Hash import SHA
-from Crypto import Random
-
-privateKeyPem = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAs1EKK81M5kTFtZSuUFnhKy8FS2WNXaWVmi/fGHG4CLw98+Yo\n0nkuUarVwSS0O9pFPcpc3kvPKOe9Tv+6DLS3Qru21aATy2PRqjqJ4CY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swCnH\nK/bHF9+fZNqvwprPnceQj5oK1n4g6JSZNsy6GNAhosT+uwQ0misgR8SQE4W25dDG\nkdEYsz+BgCsyrCcu8J5C+tUCgYAFVPQbC4f2ikVyKzvgz0qx4WUDTBqRACq48p6e\n+eLatv7nskVbr7QgN+nS9+Uz80ihR0Ev1yCAvnwmM/XYAskcOea87OPmdeWZlQM8\nVXNwINrZ6LMNBLgorfuTBK1UoRo1pPUHCYdqxbEYI2unak18mikd2WB7Fp3h0YI4\nVpGZnwKBgBxkAYnZv+jGI4MyEKdsQgxvROXXYOJZkWzsKuKxVkVpYP2V4nR2YMOJ\nViJQ8FUEnPq35cMDlUk4SnoqrrHIJNOvcJSCqM+bWHAioAsfByLbUPM8sm3CDdIk\nXVJl32HuKYPJOMIWfc7hIfxLRHnCN+coz2M6tgqMDs0E/OfjuqVZ\n-----END RSA PRIVATE KEY-----"
-
-private_key = RSA.importKey(privateKeyPem)
-cipher = PKCS1_v1_5.new(private_key)
-"""
- "tcId" : 31,
- "comment" : "prepended bytes to ciphertext",
- "msg" : "54657374",
- "ct" : "00004501b4d669e01b9ef2dc800aa1b06d49196f5a09fe8fbcd037323c60eaf027bfb98432be4e4a26c567ffec718bcbea977dd26812fa071c33808b4d5ebb742d9879806094b6fbeea63d25ea3141733b60e31c6912106e1b758a7fe0014f075193faa8b4622bfd5d3013f0a32190a95de61a3604711bc62945f95a6522bd4dfed0a994ef185b28c281f7b5e4c8ed41176d12d9fc1b837e6a0111d0132d08a6d6f0580de0c9eed8ed105531799482d1e466c68c23b0c222af7fc12ac279bc4ff57e7b4586d209371b38c4c1035edd418dc5f960441cb21ea2bedbfea86de0d7861e81021b650a1de51002c315f1e7c12debe4dcebf790caaa54a2f26b149cf9e77d",
- "result" : "invalid",
- "flags" : []
- },
-"""
-
-ct = "4501b4d669e01b9ef2dc800aa1b06d49196f5a09fe8fbcd037323c60eaf027bfb98432be4e4a26c567ffec718bcbea977dd26812fa071c33808b4d5ebb742d9879806094b6fbeea63d25ea3141733b60e31c6912106e1b758a7fe0014f075193faa8b4622bfd5d3013f0a32190a95de61a3604711bc62945f95a6522bd4dfed0a994ef185b28c281f7b5e4c8ed41176d12d9fc1b837e6a0111d0132d08a6d6f0580de0c9eed8ed105531799482d1e466c68c23b0c222af7fc12ac279bc4ff57e7b4586d209371b38c4c1035edd418dc5f960441cb21ea2bedbfea86de0d7861e81021b650a1de51002c315f1e7c12debe4dcebf790caaa54a2f26b149cf9e77d"
-
-print("[*] Unmodified ciphertext")
-
-try:
- secret = cipher.decrypt(bytes.fromhex(ct), "test")
- print("\tDecryption OK")
-except Exception as e:
- print(e)
-
-print("[*] Ciphertext with prepended bytes")
-
-ct = "00004501b4d669e01b9ef2dc800aa1b06d49196f5a09fe8fbcd037323c60eaf027bfb98432be4e4a26c567ffec718bcbea977dd26812fa071c33808b4d5ebb742d9879806094b6fbeea63d25ea3141733b60e31c6912106e1b758a7fe0014f075193faa8b4622bfd5d3013f0a32190a95de61a3604711bc62945f95a6522bd4dfed0a994ef185b28c281f7b5e4c8ed41176d12d9fc1b837e6a0111d0132d08a6d6f0580de0c9eed8ed105531799482d1e466c68c23b0c222af7fc12ac279bc4ff57e7b4586d209371b38c4c1035edd418dc5f960441cb21ea2bedbfea86de0d7861e81021b650a1de51002c315f1e7c12debe4dcebf790caaa54a2f26b149cf9e77d"
-
-try:
- secret = cipher.decrypt(bytes.fromhex(ct), "test")
-except Exception as e:
- print("\t", e)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-lz4 for openSUSE:Factory checked in at 2021-02-01 13:26:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-lz4 (Old)
and /work/SRC/openSUSE:Factory/.python-lz4.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-lz4"
Mon Feb 1 13:26:55 2021 rev:9 rq:867593 version:3.1.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-lz4/python-lz4.changes 2020-04-15 19:56:37.345669031 +0200
+++ /work/SRC/openSUSE:Factory/.python-lz4.new.28504/python-lz4.changes 2021-02-01 13:28:37.630142636 +0100
@@ -1,0 +2,11 @@
+Thu Jan 28 22:59:45 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 3.1.3:
+ * Travis fixes
+ * Wheels for 3.9
+ * Correct how pkgconfig is handled in setup.py to account for multiple build flags
+ * Improve how CHAR_BIT is handled
+ * adds block size record support to the stream bindings
+ * fixups to the tests to reduce execution time
+
+-------------------------------------------------------------------
Old:
----
lz4-3.0.2.tar.gz
New:
----
lz4-3.1.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-lz4.spec ++++++
--- /var/tmp/diff_new_pack.oMF7r3/_old 2021-02-01 13:28:38.238143582 +0100
+++ /var/tmp/diff_new_pack.oMF7r3/_new 2021-02-01 13:28:38.242143588 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-lz4
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-lz4
-Version: 3.0.2
+Version: 3.1.3
Release: 0
Summary: LZ4 Bindings for Python
License: BSD-3-Clause
++++++ lz4-3.0.2.tar.gz -> lz4-3.1.3.tar.gz ++++++
++++ 3779 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-freezegun for openSUSE:Factory checked in at 2021-02-01 13:26:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-freezegun (Old)
and /work/SRC/openSUSE:Factory/.python-freezegun.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-freezegun"
Mon Feb 1 13:26:53 2021 rev:12 rq:867591 version:1.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-freezegun/python-freezegun.changes 2020-10-23 12:19:14.152555706 +0200
+++ /work/SRC/openSUSE:Factory/.python-freezegun.new.28504/python-freezegun.changes 2021-02-01 13:28:36.754141273 +0100
@@ -1,0 +2,8 @@
+Thu Jan 28 22:52:22 UTC 2021 - Dirk M��ller <dmueller(a)suse.com>
+
+- update to 1.1.0:
+ * Add support for `time.monotonic` (and `���_ns`)
+ * Allow to configure default ignore list, and also to just extend the default
+ * Fixed when accessing from thread after stop()
+
+-------------------------------------------------------------------
Old:
----
freezegun-1.0.0.tar.gz
New:
----
freezegun-1.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-freezegun.spec ++++++
--- /var/tmp/diff_new_pack.A9mK8x/_old 2021-02-01 13:28:37.350142200 +0100
+++ /var/tmp/diff_new_pack.A9mK8x/_new 2021-02-01 13:28:37.354142206 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-freezegun
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-freezegun
-Version: 1.0.0
+Version: 1.1.0
Release: 0
Summary: Mock time date for Python
License: Apache-2.0
++++++ freezegun-1.0.0.tar.gz -> freezegun-1.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/AUTHORS.rst new/freezegun-1.1.0/AUTHORS.rst
--- old/freezegun-1.0.0/AUTHORS.rst 2020-09-05 02:51:58.000000000 +0200
+++ new/freezegun-1.1.0/AUTHORS.rst 2021-01-20 08:25:47.000000000 +0100
@@ -16,3 +16,5 @@
- `James Lu <github.com/CrazyPython>`_
- `Dan Elkis <github.com/rinslow>`_
- `Bastien Vallet <github.com/djailla>`_
+- `Julian Mehnle <github.com/jmehnle>`_
+- `Lukasz Balcerzak <https://github.com/lukaszb>`_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/CHANGELOG new/freezegun-1.1.0/CHANGELOG
--- old/freezegun-1.0.0/CHANGELOG 2020-09-05 18:24:04.000000000 +0200
+++ new/freezegun-1.1.0/CHANGELOG 2021-01-20 08:29:44.000000000 +0100
@@ -1,8 +1,15 @@
Freezegun Changelog
===================
-Latest
-------
+1.1.0
+-----
+
+* Add support for `time.monotonic` (and `���_ns`)
+
+* Allow to configure default ignore list, and also to just extend the default
+
+* Fixed when accessing from thread after stop()
+
1.0.0
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/PKG-INFO new/freezegun-1.1.0/PKG-INFO
--- old/freezegun-1.0.0/PKG-INFO 2020-09-05 18:30:28.900934200 +0200
+++ new/freezegun-1.1.0/PKG-INFO 2021-01-20 08:45:05.444875000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: freezegun
-Version: 1.0.0
+Version: 1.1.0
Summary: Let your Python tests travel through time
Home-page: https://github.com/spulec/freezegun
Author: Steve Pulec
@@ -21,7 +21,7 @@
Usage
-----
- Once the decorator or context manager have been invoked, all calls to datetime.datetime.now(), datetime.datetime.utcnow(), datetime.date.today(), time.time(), time.localtime(), time.gmtime(), and time.strftime() will return the time that has been frozen.
+ Once the decorator or context manager have been invoked, all calls to datetime.datetime.now(), datetime.datetime.utcnow(), datetime.date.today(), time.time(), time.localtime(), time.gmtime(), and time.strftime() will return the time that has been frozen. time.monotonic() will also be frozen, but as usual it makes no guarantees about its absolute value, only its changes over time.
Decorator
~~~~~~~~~
@@ -32,6 +32,7 @@
import datetime
import unittest
+ # Freeze time for a pytest style test:
@freeze_time("2012-01-14")
def test():
@@ -181,7 +182,7 @@
.. code-block:: python
- def test_manual_increment():
+ def test_manual_tick():
initial_datetime = datetime.datetime(year=1, month=7, day=12,
hour=15, minute=6, second=3)
with freeze_time(initial_datetime) as frozen_datetime:
@@ -195,6 +196,18 @@
initial_datetime += datetime.timedelta(seconds=10)
assert frozen_datetime() == initial_datetime
+ .. code-block:: python
+
+ def test_monotonic_manual_tick():
+ initial_datetime = datetime.datetime(year=1, month=7, day=12,
+ hour=15, minute=6, second=3)
+ with freeze_time(initial_datetime) as frozen_datetime:
+ monotonic_t0 = time.monotonic()
+ frozen_datetime.tick(1.0)
+ monotonic_t1 = time.monotonic()
+ assert monotonic_t1 == monotonic_t0 + 1.0
+
+
Moving time to specify datetime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -260,6 +273,58 @@
$ sudo apt-get install python-freezegun
+
+ Ignore packages
+ ---------------
+
+ Sometimes it's desired to ignore FreezeGun behaviour for particular packages (i.e. libraries).
+ It's possible to ignore them for a single invocation:
+
+
+ .. code-block:: python
+
+ from freezegun import freeze_time
+
+ with freeze_time('2020-10-06', ignore=['threading']):
+ # ...
+
+
+ By default FreezeGun ignores following packages:
+
+ .. code-block:: python
+
+ [
+ 'nose.plugins',
+ 'six.moves',
+ 'django.utils.six.moves',
+ 'google.gax',
+ 'threading',
+ 'Queue',
+ 'selenium',
+ '_pytest.terminal.',
+ '_pytest.runner.',
+ 'gi',
+ ]
+
+
+ It's possible to set your own default ignore list:
+
+ .. code-block:: python
+
+ import freezegun
+
+ freezegun.configure(default_ignore_list=['threading', 'tensorflow'])
+
+
+ Please note this will override default ignore list. If you want to extend existing defaults
+ please use:
+
+ .. code-block:: python
+
+ import freezegun
+
+ freezegun.configure(extend_ignore_list=['tensorflow'])
+
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/README.rst new/freezegun-1.1.0/README.rst
--- old/freezegun-1.0.0/README.rst 2020-09-05 02:51:58.000000000 +0200
+++ new/freezegun-1.1.0/README.rst 2021-01-20 08:25:47.000000000 +0100
@@ -13,7 +13,7 @@
Usage
-----
-Once the decorator or context manager have been invoked, all calls to datetime.datetime.now(), datetime.datetime.utcnow(), datetime.date.today(), time.time(), time.localtime(), time.gmtime(), and time.strftime() will return the time that has been frozen.
+Once the decorator or context manager have been invoked, all calls to datetime.datetime.now(), datetime.datetime.utcnow(), datetime.date.today(), time.time(), time.localtime(), time.gmtime(), and time.strftime() will return the time that has been frozen. time.monotonic() will also be frozen, but as usual it makes no guarantees about its absolute value, only its changes over time.
Decorator
~~~~~~~~~
@@ -24,6 +24,7 @@
import datetime
import unittest
+ # Freeze time for a pytest style test:
@freeze_time("2012-01-14")
def test():
@@ -173,7 +174,7 @@
.. code-block:: python
- def test_manual_increment():
+ def test_manual_tick():
initial_datetime = datetime.datetime(year=1, month=7, day=12,
hour=15, minute=6, second=3)
with freeze_time(initial_datetime) as frozen_datetime:
@@ -187,6 +188,18 @@
initial_datetime += datetime.timedelta(seconds=10)
assert frozen_datetime() == initial_datetime
+.. code-block:: python
+
+ def test_monotonic_manual_tick():
+ initial_datetime = datetime.datetime(year=1, month=7, day=12,
+ hour=15, minute=6, second=3)
+ with freeze_time(initial_datetime) as frozen_datetime:
+ monotonic_t0 = time.monotonic()
+ frozen_datetime.tick(1.0)
+ monotonic_t1 = time.monotonic()
+ assert monotonic_t1 == monotonic_t0 + 1.0
+
+
Moving time to specify datetime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -251,3 +264,55 @@
.. code-block:: bash
$ sudo apt-get install python-freezegun
+
+
+Ignore packages
+---------------
+
+Sometimes it's desired to ignore FreezeGun behaviour for particular packages (i.e. libraries).
+It's possible to ignore them for a single invocation:
+
+
+.. code-block:: python
+
+ from freezegun import freeze_time
+
+ with freeze_time('2020-10-06', ignore=['threading']):
+ # ...
+
+
+By default FreezeGun ignores following packages:
+
+.. code-block:: python
+
+ [
+ 'nose.plugins',
+ 'six.moves',
+ 'django.utils.six.moves',
+ 'google.gax',
+ 'threading',
+ 'Queue',
+ 'selenium',
+ '_pytest.terminal.',
+ '_pytest.runner.',
+ 'gi',
+ ]
+
+
+It's possible to set your own default ignore list:
+
+.. code-block:: python
+
+ import freezegun
+
+ freezegun.configure(default_ignore_list=['threading', 'tensorflow'])
+
+
+Please note this will override default ignore list. If you want to extend existing defaults
+please use:
+
+.. code-block:: python
+
+ import freezegun
+
+ freezegun.configure(extend_ignore_list=['tensorflow'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/freezegun/__init__.py new/freezegun-1.1.0/freezegun/__init__.py
--- old/freezegun-1.0.0/freezegun/__init__.py 2020-09-05 18:24:31.000000000 +0200
+++ new/freezegun-1.1.0/freezegun/__init__.py 2021-01-20 08:30:17.000000000 +0100
@@ -7,12 +7,13 @@
"""
from .api import freeze_time
+from .config import configure
__title__ = 'freezegun'
-__version__ = '1.0.0'
+__version__ = '1.1.0'
__author__ = 'Steve Pulec'
__license__ = 'Apache License 2.0'
__copyright__ = 'Copyright 2012 Steve Pulec'
-__all__ = ["freeze_time"]
+__all__ = ["freeze_time", "configure"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/freezegun/api.py new/freezegun-1.1.0/freezegun/api.py
--- old/freezegun-1.0.0/freezegun/api.py 2020-09-05 02:51:58.000000000 +0200
+++ new/freezegun-1.1.0/freezegun/api.py 2021-01-20 08:25:47.000000000 +0100
@@ -1,3 +1,4 @@
+from . import config
import dateutil
import datetime
import functools
@@ -22,21 +23,27 @@
MayaDT = None
_TIME_NS_PRESENT = hasattr(time, 'time_ns')
+_MONOTONIC_NS_PRESENT = hasattr(time, 'monotonic_ns')
_EPOCH = datetime.datetime(1970, 1, 1)
_EPOCHTZ = datetime.datetime(1970, 1, 1, tzinfo=dateutil.tz.UTC)
real_time = time.time
real_localtime = time.localtime
real_gmtime = time.gmtime
+real_monotonic = time.monotonic
real_strftime = time.strftime
real_date = datetime.date
real_datetime = datetime.datetime
-real_date_objects = [real_time, real_localtime, real_gmtime, real_strftime, real_date, real_datetime]
+real_date_objects = [real_time, real_localtime, real_gmtime, real_monotonic, real_strftime, real_date, real_datetime]
if _TIME_NS_PRESENT:
real_time_ns = time.time_ns
real_date_objects.append(real_time_ns)
+if _MONOTONIC_NS_PRESENT:
+ real_monotonic_ns = time.monotonic_ns
+ real_date_objects.append(real_monotonic_ns)
+
_real_time_object_ids = {id(obj) for obj in real_date_objects}
# time.clock is deprecated and was removed in Python 3.8
@@ -160,6 +167,10 @@
if not call_stack_inspection_limit:
return False
+ # Means stop() has already been called, so we can now return the real time
+ if not ignore_lists:
+ return True
+
if not ignore_lists[-1]:
return False
@@ -211,6 +222,23 @@
return get_current_time().timetuple()
+def fake_monotonic():
+ if _should_use_real_time():
+ return real_monotonic()
+ current_time = get_current_time()
+ return calendar.timegm(current_time.timetuple()) + current_time.microsecond / 1000000.0
+
+if _MONOTONIC_NS_PRESENT:
+ def fake_monotonic_ns():
+ if _should_use_real_time():
+ return real_monotonic_ns()
+ current_time = get_current_time()
+ return (
+ calendar.timegm(current_time.timetuple()) * 1000000 +
+ current_time.microsecond
+ ) * 1000
+
+
def fake_strftime(format, time_to_format=None):
if time_to_format is None:
if not _should_use_real_time():
@@ -609,6 +637,7 @@
datetime.date = FakeDate
time.time = fake_time
+ time.monotonic = fake_monotonic
time.localtime = fake_localtime
time.gmtime = fake_gmtime
time.strftime = fake_strftime
@@ -626,6 +655,7 @@
('real_datetime', real_datetime, FakeDatetime),
('real_gmtime', real_gmtime, fake_gmtime),
('real_localtime', real_localtime, fake_localtime),
+ ('real_monotonic', real_monotonic, fake_monotonic),
('real_strftime', real_strftime, fake_strftime),
('real_time', real_time, fake_time),
]
@@ -634,6 +664,10 @@
time.time_ns = fake_time_ns
to_patch.append(('real_time_ns', real_time_ns, fake_time_ns))
+ if _MONOTONIC_NS_PRESENT:
+ time.monotonic_ns = fake_monotonic_ns
+ to_patch.append(('real_monotonic_ns', real_monotonic_ns, fake_monotonic_ns))
+
if real_clock is not None:
# time.clock is deprecated and was removed in Python 3.8
time.clock = fake_clock
@@ -710,6 +744,7 @@
setattr(module, module_attribute, real)
time.time = real_time
+ time.monotonic = real_monotonic
time.gmtime = real_gmtime
time.localtime = real_localtime
time.strftime = real_strftime
@@ -718,6 +753,9 @@
if _TIME_NS_PRESENT:
time.time_ns = real_time_ns
+ if _MONOTONIC_NS_PRESENT:
+ time.monotonic_ns = real_monotonic_ns
+
if uuid_generate_time_attr:
setattr(uuid, uuid_generate_time_attr, real_uuid_generate_time)
uuid._UuidCreate = real_uuid_create
@@ -776,19 +814,18 @@
if ignore is None:
ignore = []
ignore = ignore[:]
- ignore.extend(['nose.plugins',
- 'six.moves',
- 'django.utils.six.moves',
- 'google.gax',
- 'threading',
- 'Queue',
- 'selenium',
- '_pytest.terminal.',
- '_pytest.runner.',
- 'gi',
- ])
+ if config.settings.default_ignore_list:
+ ignore.extend(config.settings.default_ignore_list)
- return _freeze_time(time_to_freeze, tz_offset, ignore, tick, as_arg, as_kwarg, auto_tick_seconds)
+ return _freeze_time(
+ time_to_freeze_str=time_to_freeze,
+ tz_offset=tz_offset,
+ ignore=ignore,
+ tick=tick,
+ as_arg=as_arg,
+ as_kwarg=as_kwarg,
+ auto_tick_seconds=auto_tick_seconds,
+ )
# Setup adapters for sqlite
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/freezegun/config.py new/freezegun-1.1.0/freezegun/config.py
--- old/freezegun-1.0.0/freezegun/config.py 1970-01-01 01:00:00.000000000 +0100
+++ new/freezegun-1.1.0/freezegun/config.py 2021-01-20 08:25:47.000000000 +0100
@@ -0,0 +1,40 @@
+
+
+DEFAULT_IGNORE_LIST = [
+ 'nose.plugins',
+ 'six.moves',
+ 'django.utils.six.moves',
+ 'google.gax',
+ 'threading',
+ 'Queue',
+ 'selenium',
+ '_pytest.terminal.',
+ '_pytest.runner.',
+ 'gi',
+]
+
+
+class Settings:
+ def __init__(self, default_ignore_list=None):
+ self.default_ignore_list = default_ignore_list or DEFAULT_IGNORE_LIST[:]
+
+
+settings = Settings()
+
+
+class ConfigurationError(Exception):
+ pass
+
+
+def configure(default_ignore_list=None, extend_ignore_list=None):
+ if default_ignore_list is not None and extend_ignore_list is not None:
+ raise ConfigurationError("Either default_ignore_list or extend_ignore_list might be given, not both")
+ if default_ignore_list:
+ settings.default_ignore_list = default_ignore_list
+ if extend_ignore_list:
+ settings.default_ignore_list = [*settings.default_ignore_list, *extend_ignore_list]
+
+
+def reset_config():
+ global settings
+ settings = Settings()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/freezegun.egg-info/PKG-INFO new/freezegun-1.1.0/freezegun.egg-info/PKG-INFO
--- old/freezegun-1.0.0/freezegun.egg-info/PKG-INFO 2020-09-05 18:30:28.000000000 +0200
+++ new/freezegun-1.1.0/freezegun.egg-info/PKG-INFO 2021-01-20 08:45:05.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: freezegun
-Version: 1.0.0
+Version: 1.1.0
Summary: Let your Python tests travel through time
Home-page: https://github.com/spulec/freezegun
Author: Steve Pulec
@@ -21,7 +21,7 @@
Usage
-----
- Once the decorator or context manager have been invoked, all calls to datetime.datetime.now(), datetime.datetime.utcnow(), datetime.date.today(), time.time(), time.localtime(), time.gmtime(), and time.strftime() will return the time that has been frozen.
+ Once the decorator or context manager have been invoked, all calls to datetime.datetime.now(), datetime.datetime.utcnow(), datetime.date.today(), time.time(), time.localtime(), time.gmtime(), and time.strftime() will return the time that has been frozen. time.monotonic() will also be frozen, but as usual it makes no guarantees about its absolute value, only its changes over time.
Decorator
~~~~~~~~~
@@ -32,6 +32,7 @@
import datetime
import unittest
+ # Freeze time for a pytest style test:
@freeze_time("2012-01-14")
def test():
@@ -181,7 +182,7 @@
.. code-block:: python
- def test_manual_increment():
+ def test_manual_tick():
initial_datetime = datetime.datetime(year=1, month=7, day=12,
hour=15, minute=6, second=3)
with freeze_time(initial_datetime) as frozen_datetime:
@@ -195,6 +196,18 @@
initial_datetime += datetime.timedelta(seconds=10)
assert frozen_datetime() == initial_datetime
+ .. code-block:: python
+
+ def test_monotonic_manual_tick():
+ initial_datetime = datetime.datetime(year=1, month=7, day=12,
+ hour=15, minute=6, second=3)
+ with freeze_time(initial_datetime) as frozen_datetime:
+ monotonic_t0 = time.monotonic()
+ frozen_datetime.tick(1.0)
+ monotonic_t1 = time.monotonic()
+ assert monotonic_t1 == monotonic_t0 + 1.0
+
+
Moving time to specify datetime
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -260,6 +273,58 @@
$ sudo apt-get install python-freezegun
+
+ Ignore packages
+ ---------------
+
+ Sometimes it's desired to ignore FreezeGun behaviour for particular packages (i.e. libraries).
+ It's possible to ignore them for a single invocation:
+
+
+ .. code-block:: python
+
+ from freezegun import freeze_time
+
+ with freeze_time('2020-10-06', ignore=['threading']):
+ # ...
+
+
+ By default FreezeGun ignores following packages:
+
+ .. code-block:: python
+
+ [
+ 'nose.plugins',
+ 'six.moves',
+ 'django.utils.six.moves',
+ 'google.gax',
+ 'threading',
+ 'Queue',
+ 'selenium',
+ '_pytest.terminal.',
+ '_pytest.runner.',
+ 'gi',
+ ]
+
+
+ It's possible to set your own default ignore list:
+
+ .. code-block:: python
+
+ import freezegun
+
+ freezegun.configure(default_ignore_list=['threading', 'tensorflow'])
+
+
+ Please note this will override default ignore list. If you want to extend existing defaults
+ please use:
+
+ .. code-block:: python
+
+ import freezegun
+
+ freezegun.configure(extend_ignore_list=['tensorflow'])
+
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/freezegun.egg-info/SOURCES.txt new/freezegun-1.1.0/freezegun.egg-info/SOURCES.txt
--- old/freezegun-1.0.0/freezegun.egg-info/SOURCES.txt 2020-09-05 18:30:28.000000000 +0200
+++ new/freezegun-1.1.0/freezegun.egg-info/SOURCES.txt 2021-01-20 08:45:05.000000000 +0100
@@ -10,6 +10,7 @@
freezegun/_async.py
freezegun/_async_coroutine.py
freezegun/api.py
+freezegun/config.py
freezegun.egg-info/PKG-INFO
freezegun.egg-info/SOURCES.txt
freezegun.egg-info/dependency_links.txt
@@ -20,6 +21,7 @@
tests/fake_module.py
tests/test_asyncio.py
tests/test_class_import.py
+tests/test_configure.py
tests/test_datetimes.py
tests/test_errors.py
tests/test_import_alias.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/setup.py new/freezegun-1.1.0/setup.py
--- old/freezegun-1.0.0/setup.py 2020-09-05 18:24:08.000000000 +0200
+++ new/freezegun-1.1.0/setup.py 2021-01-20 08:44:45.000000000 +0100
@@ -1,13 +1,24 @@
#!/usr/bin/env python
+import os
+import re
from setuptools import setup
with open('README.rst') as f:
readme = f.read()
+
+def read_version():
+ with open(os.path.join('freezegun', '__init__.py')) as f:
+ m = re.search(r'''__version__\s*=\s*['"]([^'"]*)['"]''', f.read())
+ if m:
+ return m.group(1)
+ raise ValueError("couldn't find version")
+
+
setup(
name='freezegun',
- version='1.0.0',
+ version=read_version(),
description='Let your Python tests travel through time',
long_description=readme,
author='Steve Pulec',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/tests/test_configure.py new/freezegun-1.1.0/tests/test_configure.py
--- old/freezegun-1.0.0/tests/test_configure.py 1970-01-01 01:00:00.000000000 +0100
+++ new/freezegun-1.1.0/tests/test_configure.py 2021-01-20 08:25:47.000000000 +0100
@@ -0,0 +1,65 @@
+from unittest import mock
+import freezegun
+import freezegun.config
+
+
+def setup_function():
+ freezegun.config.reset_config()
+
+
+def teardown_function():
+ freezegun.config.reset_config()
+
+
+def test_default_ignore_list_is_overridden():
+ freezegun.configure(default_ignore_list=['threading', 'tensorflow'])
+
+ with mock.patch("freezegun.api._freeze_time.__init__", return_value=None) as _freeze_time_init_mock:
+
+ freezegun.freeze_time("2020-10-06")
+
+ expected_ignore_list = [
+ 'threading',
+ 'tensorflow',
+ ]
+
+ _freeze_time_init_mock.assert_called_once_with(
+ time_to_freeze_str="2020-10-06",
+ tz_offset=0,
+ ignore=expected_ignore_list,
+ tick=False,
+ as_arg=False,
+ as_kwarg='',
+ auto_tick_seconds=0,
+ )
+
+def test_extend_default_ignore_list():
+ freezegun.configure(extend_ignore_list=['tensorflow'])
+
+ with mock.patch("freezegun.api._freeze_time.__init__", return_value=None) as _freeze_time_init_mock:
+
+ freezegun.freeze_time("2020-10-06")
+
+ expected_ignore_list = [
+ 'nose.plugins',
+ 'six.moves',
+ 'django.utils.six.moves',
+ 'google.gax',
+ 'threading',
+ 'Queue',
+ 'selenium',
+ '_pytest.terminal.',
+ '_pytest.runner.',
+ 'gi',
+ 'tensorflow',
+ ]
+
+ _freeze_time_init_mock.assert_called_once_with(
+ time_to_freeze_str="2020-10-06",
+ tz_offset=0,
+ ignore=expected_ignore_list,
+ tick=False,
+ as_arg=False,
+ as_kwarg='',
+ auto_tick_seconds=0,
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/tests/test_datetimes.py new/freezegun-1.1.0/tests/test_datetimes.py
--- old/freezegun-1.0.0/tests/test_datetimes.py 2020-09-05 02:51:58.000000000 +0200
+++ new/freezegun-1.1.0/tests/test_datetimes.py 2021-01-20 08:25:47.000000000 +0100
@@ -21,6 +21,7 @@
# time.clock was removed in Python 3.8
HAS_CLOCK = hasattr(time, 'clock')
HAS_TIME_NS = hasattr(time, 'time_ns')
+HAS_MONOTONIC_NS = hasattr(time, 'monotonic_ns')
class temp_locale(object):
"""Temporarily change the locale."""
@@ -57,12 +58,14 @@
freezer.start()
assert time.time() == expected_timestamp
+ assert time.monotonic() >= 0.0
assert datetime.datetime.now() == datetime.datetime(2012, 1, 14)
assert datetime.datetime.utcnow() == datetime.datetime(2012, 1, 14)
assert datetime.date.today() == datetime.date(2012, 1, 14)
assert datetime.datetime.now().today() == datetime.datetime(2012, 1, 14)
freezer.stop()
assert time.time() != expected_timestamp
+ assert time.monotonic() >= 0.0
assert datetime.datetime.now() != datetime.datetime(2012, 1, 14)
assert datetime.datetime.utcnow() != datetime.datetime(2012, 1, 14)
freezer = freeze_time("2012-01-10 13:52:01")
@@ -113,6 +116,7 @@
assert datetime.datetime.now() == datetime.datetime(1970, 1, 1)
assert datetime.datetime.utcnow() == datetime.datetime(1970, 1, 1)
assert time.time() == 0.0
+ assert time.monotonic() >= 0.0
freezer.stop()
@@ -125,6 +129,7 @@
assert datetime.datetime.now() == datetime.datetime(1969, 12, 31, 20)
assert datetime.datetime.utcnow() == datetime.datetime(1970, 1, 1)
assert time.time() == 0.0
+ assert time.monotonic() >= 0
freezer.stop()
@@ -197,6 +202,29 @@
assert False, "Bad values should raise a ValueError"
+def test_time_monotonic():
+ initial_datetime = datetime.datetime(year=1, month=7, day=12,
+ hour=15, minute=6, second=3)
+ with freeze_time(initial_datetime) as frozen_datetime:
+ monotonic_t0 = time.monotonic()
+ if HAS_MONOTONIC_NS:
+ monotonic_ns_t0 = time.monotonic_ns()
+
+ frozen_datetime.tick()
+ monotonic_t1 = time.monotonic()
+ assert monotonic_t1 == monotonic_t0 + 1.0
+ if HAS_MONOTONIC_NS:
+ monotonic_ns_t1 = time.monotonic_ns()
+ assert monotonic_ns_t1 == monotonic_ns_t0 + 1000000000
+
+ frozen_datetime.tick(10)
+ monotonic_t11 = time.monotonic()
+ assert monotonic_t11 == monotonic_t1 + 10.0
+ if HAS_MONOTONIC_NS:
+ monotonic_ns_t11 = time.monotonic_ns()
+ assert monotonic_ns_t11 == monotonic_ns_t1 + 10000000000
+
+
def test_time_gmtime():
with freeze_time('2012-01-14 03:21:34'):
time_struct = time.gmtime()
@@ -649,6 +677,20 @@
assert time() == second
+def test_monotonic_with_nested():
+ from time import monotonic
+
+ with freeze_time('2015-01-01') as frozen_datetime_1:
+ initial_monotonic_1 = time.monotonic()
+ with freeze_time('2015-12-25') as frozen_datetime_2:
+ initial_monotonic_2 = time.monotonic()
+ frozen_datetime_2.tick()
+ assert time.monotonic() == initial_monotonic_2 + 1
+ assert time.monotonic() == initial_monotonic_1
+ frozen_datetime_1.tick()
+ assert time.monotonic() == initial_monotonic_1 + 1
+
+
def test_should_use_real_time():
frozen = datetime.datetime(2015, 3, 5)
expected_frozen = 1425513600.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/freezegun-1.0.0/tests/test_ticking.py new/freezegun-1.1.0/tests/test_ticking.py
--- old/freezegun-1.0.0/tests/test_ticking.py 2020-09-05 02:51:58.000000000 +0200
+++ new/freezegun-1.1.0/tests/test_ticking.py 2021-01-20 08:25:47.000000000 +0100
@@ -62,6 +62,14 @@
assert time.time() > 1326585599.0
+(a)utils.cpython_only
+def test_ticking_monotonic():
+ with freeze_time("Jan 14th, 2012, 23:59:59", tick=True):
+ initial_monotonic = time.monotonic()
+ time.sleep(0.001) # Deal with potential clock resolution problems
+ assert time.monotonic() > initial_monotonic
+
+
@mock.patch('freezegun.api._is_cpython', False)
def test_pypy_compat():
try:
1
0