mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 21:33:18 -07:00
Update pytz to 2019.3
This commit is contained in:
parent
3a71929821
commit
3e520820d8
477 changed files with 1087 additions and 991 deletions
|
@ -27,8 +27,8 @@ from pytz.tzinfo import DstTzInfo, StaticTzInfo # noqa
|
|||
|
||||
# I test for expected version to ensure the correct version of pytz is
|
||||
# actually being tested.
|
||||
EXPECTED_VERSION = '2019.1'
|
||||
EXPECTED_OLSON_VERSION = '2019a'
|
||||
EXPECTED_VERSION = '2019.3'
|
||||
EXPECTED_OLSON_VERSION = '2019c'
|
||||
|
||||
fmt = '%Y-%m-%d %H:%M:%S %Z%z'
|
||||
|
||||
|
@ -183,8 +183,14 @@ class PicklingTest(unittest.TestCase):
|
|||
# Python 3 introduced a new pickle protocol where numbers are stored in
|
||||
# hexadecimal representation. Here we extract the pickle
|
||||
# representation of the number for the current Python version.
|
||||
old_pickle_pattern = pickle.dumps(tz._utcoffset.seconds)[3:-1]
|
||||
new_pickle_pattern = pickle.dumps(new_utcoffset)[3:-1]
|
||||
#
|
||||
# Test protocol 3 on Python 3 and protocol 0 on Python 2.
|
||||
if sys.version_info >= (3,):
|
||||
protocol = 3
|
||||
else:
|
||||
protocol = 0
|
||||
old_pickle_pattern = pickle.dumps(tz._utcoffset.seconds, protocol)[3:-1]
|
||||
new_pickle_pattern = pickle.dumps(new_utcoffset, protocol)[3:-1]
|
||||
hacked_p = p.replace(old_pickle_pattern, new_pickle_pattern)
|
||||
|
||||
self.assertNotEqual(p, hacked_p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue