ionelmc / python-tblib

Serialization library for Exceptions and Tracebacks.
BSD 2-Clause "Simplified" License
165 stars 33 forks source link

Unpickling traceback crashes on Python 3.8. #46

Closed felixxm closed 5 years ago

felixxm commented 5 years ago

CodeType signature was changed in Python 3.8 (see issue36886). Please find below traceback from the Django's test suite:

======================================================================
ERROR: test_add_failing_subtests (test_runner.test_parallel.RemoteTestResultTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/felixx/repo/django/tests/test_runner/test_parallel.py", line 75, in test_add_failing_subtests
    subtest_test.run(result=result)
  File "/usr/local/lib/python3.8/unittest/case.py", line 679, in run
    self._feedErrorsToResult(result, outcome.errors)
  File "/usr/local/lib/python3.8/unittest/case.py", line 592, in _feedErrorsToResult
    result.addSubTest(test.test_case, test, exc_info)
  File "/home/felixx/repo/django/django/test/runner.py", line 238, in addSubTest
    self.check_picklable(test, err)
  File "/home/felixx/repo/django/django/test/runner.py", line 156, in check_picklable
    self._confirm_picklable(err)
  File "/home/felixx/repo/django/django/test/runner.py", line 130, in _confirm_picklable
    pickle.loads(pickle.dumps(obj))
  File "/home/felixx/.virtualenvs/django-test-3.8/lib/python3.8/site-packages/tblib/pickling_support.py", line 16, in unpickle_traceback
    return ret.as_traceback()
  File "/home/felixx/.virtualenvs/django-test-3.8/lib/python3.8/site-packages/tblib/__init__.py", line 99, in as_traceback
    code = CodeType(
TypeError: an integer is required (got type bytes)
felixxm commented 5 years ago

OK it looks that it's already fixed by f6e191af71a98620961e8e9bfefea2cb3dbb8534. Can we ask for a new release?

ionelmc commented 5 years ago

Ah whoops looks like I forgot to release.

ionelmc commented 5 years ago

1.5.0 out now.

felixxm commented 5 years ago

Thanks :rocket: