[packages/python-freezegun] - updated to 0.3.11 - removed obsolete python3.7 patch

qboosh qboosh at pld-linux.org
Wed Nov 7 16:18:29 CET 2018


commit d700c20ce37a13f9044f723844be297a1b38713b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Nov 7 16:22:27 2018 +0100

    - updated to 0.3.11
    - removed obsolete python3.7 patch

 python-freezegun-python3.7.patch | 55 ----------------------------------------
 python-freezegun.spec            |  8 +++---
 2 files changed, 3 insertions(+), 60 deletions(-)
---
diff --git a/python-freezegun.spec b/python-freezegun.spec
index a6cc6b4..5de3882 100644
--- a/python-freezegun.spec
+++ b/python-freezegun.spec
@@ -7,15 +7,14 @@
 Summary:	FreezeGun: Let your Python 2 tests travel through time
 Summary(pl.UTF-8):	FreezeGun - umożliwienie testom Pythona 2 podróżowania w czasie
 Name:		python-freezegun
-Version:	0.3.10
-Release:	2
+Version:	0.3.11
+Release:	1
 License:	Apache v2.0
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/freezegun/
 Source0:	https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz
-# Source0-md5:	703b64446743c0d9f81ca9308e5097a0
+# Source0-md5:	f4914cb716505cb8067b5ceec7acbba8
 Patch0:		%{name}-mock.patch
-Patch1:		%{name}-python3.7.patch
 URL:		https://pypi.org/project/freezegun/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
@@ -68,7 +67,6 @@ czasie dzięki atrapie modułu datetime.
 %prep
 %setup -q -n freezegun-%{version}
 %patch0 -p1
-%patch1 -p1
 
 %build
 %if %{with python2}
diff --git a/python-freezegun-python3.7.patch b/python-freezegun-python3.7.patch
deleted file mode 100644
index e448f29..0000000
--- a/python-freezegun-python3.7.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 4fdad69659f15a9e62cf4f6c15c9f319276cf9b0 Mon Sep 17 00:00:00 2001
-From: Jonas Obrist <jonas.obrist at hde.co.jp>
-Date: Tue, 6 Mar 2018 12:21:38 +0900
-Subject: [PATCH] add support for Python 3.7 uuid module changes
-
-Python 3.7 removed uuid._uuid_generate_time. It now has
-uuid._load_system_functions and uuid._generate_time_safe.
-_generate_time_safe is set by calling _load_system_functions (subsequent
-calls to that function are no-op). This change detects the missing
-uuid._uuid_generate_time attribute and uses the new attribute/function
-if they're missing.
----
- freezegun/api.py | 14 +++++++++++---
- 1 file changed, 11 insertions(+), 3 deletions(-)
-
-diff --git a/freezegun/api.py b/freezegun/api.py
-index eb09932..a88a392 100644
---- a/freezegun/api.py
-+++ b/freezegun/api.py
-@@ -27,8 +27,14 @@
- 
- try:
-     real_uuid_generate_time = uuid._uuid_generate_time
--except (AttributeError, ImportError):
-+    uuid_generate_time_attr = '_uuid_generate_time'
-+except AttributeError:
-+    uuid._load_system_functions()
-+    real_uuid_generate_time = uuid._generate_time_safe
-+    uuid_generate_time_attr = '_generate_time_safe'
-+except ImportError:
-     real_uuid_generate_time = None
-+    uuid_generate_time_attr = None
- 
- try:
-     real_uuid_create = uuid._UuidCreate
-@@ -482,7 +488,8 @@ def start(self):
-         time.localtime = fake_localtime
-         time.gmtime = fake_gmtime
-         time.strftime = fake_strftime
--        uuid._uuid_generate_time = None
-+        if uuid_generate_time_attr:
-+            setattr(uuid, uuid_generate_time_attr, None)
-         uuid._UuidCreate = None
-         uuid._last_timestamp = None
- 
-@@ -573,7 +580,8 @@ def stop(self):
-         time.localtime = time.localtime.previous_localtime_function
-         time.strftime = time.strftime.previous_strftime_function
- 
--        uuid._uuid_generate_time = real_uuid_generate_time
-+        if uuid_generate_time_attr:
-+            setattr(uuid, uuid_generate_time_attr, real_uuid_generate_time)
-         uuid._UuidCreate = real_uuid_create
-         uuid._last_timestamp = None
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-freezegun.git/commitdiff/d700c20ce37a13f9044f723844be297a1b38713b



More information about the pld-cvs-commit mailing list