| |
@@ -0,0 +1,34 @@
|
| |
+ From 0911072ed49ca4d15cc1cffa485b22584f088c83 Mon Sep 17 00:00:00 2001
|
| |
+ From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
| |
+ Date: Tue, 6 Dec 2022 10:39:13 -0500
|
| |
+ Subject: [PATCH] Use stdlib datetime.timezone instead of pytz in tests
|
| |
+
|
| |
+ This removes an implicit test dependency (satisfied via pandas) on pytz.
|
| |
+ ---
|
| |
+ tests/object_test.py | 6 +++---
|
| |
+ 1 file changed, 3 insertions(+), 3 deletions(-)
|
| |
+
|
| |
+ diff --git a/tests/object_test.py b/tests/object_test.py
|
| |
+ index 0d43b5a..2aff66a 100644
|
| |
+ --- a/tests/object_test.py
|
| |
+ +++ b/tests/object_test.py
|
| |
+ @@ -9,7 +9,6 @@
|
| |
+ import threading
|
| |
+
|
| |
+ import pytest
|
| |
+ -import pytz
|
| |
+ from helper import SkippableTest
|
| |
+
|
| |
+ import jsonpickle
|
| |
+ @@ -1104,8 +1103,9 @@ def test_unicode_mixin():
|
| |
+
|
| |
+ def test_datetime_with_tz_copies_refs():
|
| |
+ """Ensure that we create copies of referenced objects"""
|
| |
+ - d0 = datetime.datetime(2020, 5, 5, 5, 5, 5, 5, tzinfo=pytz.UTC)
|
| |
+ - d1 = datetime.datetime(2020, 5, 5, 5, 5, 5, 5, tzinfo=pytz.UTC)
|
| |
+ + utc = datetime.timezone.utc
|
| |
+ + d0 = datetime.datetime(2020, 5, 5, 5, 5, 5, 5, tzinfo=utc)
|
| |
+ + d1 = datetime.datetime(2020, 5, 5, 5, 5, 5, 5, tzinfo=utc)
|
| |
+ obj = [d0, d1]
|
| |
+ encoded = jsonpickle.encode(obj, make_refs=False)
|
| |
+ decoded = jsonpickle.decode(encoded)
|
| |
Adds conditionals and a patch so that the Rawhide spec file builds for EPEL9 as well. (I submitted the patch upstream, and it makes sense for current releases, not just EPEL9.)
This can be merged back to the
epel9branch to fix RHBZ#2097432: [EPEL9] Please branch and build python-jsonpickle in epel9.EPEL9 scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=95020212