Description of problem: ====== rh-python36 has the following issue when unpickling date-objects stored in python 2: Pickle a date in python 2: import datetime; pickle.dumps(datetime.date(2019, 12, 31), 2) '\x80\x02cdatetime\ndate\nq\x00U\x04\x07\xe3\x0c\x1fq\x01\x85q\x02Rq\x03.' Unpickle in python3 fails: x = b'\x80\x02cdatetime\ndate\nq\x00U\x04\x07\xe3\x0c\x1fq\x01\x85q\x02Rq\x03.'; pickle.loads(x, encoding='latin1') (...) TypeError: an integer is required (got type str) Version-Release number of selected component (if applicable): ====== rh-python36 (Python 3.6.3) How reproducible: ====== We're able to reproduce this ourselves Steps to Reproduce: ====== 1. $ python Python 2.7.5 (default, Mar 26 2019, 22:13:06) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import datetime; import pickle; pickle.dumps(datetime.date(2019, 12, 31), 2) '\x80\x02cdatetime\ndate\nq\x00U\x04\x07\xe3\x0c\x1fq\x01\x85q\x02Rq\x03.' >>> 2. $ scl enable rh-python36 bash 3. $ python Python 3.6.3 (default, Apr 10 2019, 14:37:36) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import datetime; import pickle; x = b'\x80\x02cdatetime\ndate\nq\x00U\x04\x07\xe3\x0c\x1fq\x01\x85q\x02Rq\x03.'; pickle.loads(x, encoding='latin1') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: an integer is required (got type str) >>> Actual results: ====== b'\x80\x02cdatetime\ndate\nq\x00U\x04\x07\xe3\x0c\x1fq\x01\x85q\x02Rq\x03.'; pickle.loads(x, encoding='latin1') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: an integer is required (got type str) Expected results: ====== '\x80\x02cdatetime\ndate\nq\x00U\x04\x07\xe3\x0c\x1fq\x01\x85q\x02Rq\x03.' Additional info: ====== This has been fixed upstream: https://github.com/python/cpython/commit/19f6e83bf03b3ce22300638906bd90dd2dd5c463
This should be fixed with a rebase to 3.6.9.