5f89271
--- a/pytz/tests/test_tzinfo.py~	2019-07-26 08:38:47.000000000 -0500
5f89271
+++ b/pytz/tests/test_tzinfo.py	2019-07-26 08:40:12.751754602 -0500
5f89271
@@ -184,8 +184,11 @@
5f89271
         # Python 3 introduced a new pickle protocol where numbers are stored in
5f89271
         # hexadecimal representation. Here we extract the pickle
5f89271
         # representation of the number for the current Python version.
5f89271
-        old_pickle_pattern = pickle.dumps(tz._utcoffset.seconds)[3:-1]
5f89271
-        new_pickle_pattern = pickle.dumps(new_utcoffset)[3:-1]
5f89271
+        #
5f89271
+        # Test protocol 3 on Python 3 and protocol 0 on Python 2.
5f89271
+        protocol = (3 if sys.version_info >= (3,) else 0)
5f89271
+        old_pickle_pattern = pickle.dumps(tz._utcoffset.seconds, protocol)[3:-1]
5f89271
+        new_pickle_pattern = pickle.dumps(new_utcoffset, protocol)[3:-1]
5f89271
         hacked_p = p.replace(old_pickle_pattern, new_pickle_pattern)
5f89271
 
5f89271
         self.assertNotEqual(p, hacked_p)