ionelmc / python-tblib

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

Fix PyPy/twisted incompatibility #35

Closed arnimarj closed 5 years ago

arnimarj commented 6 years ago

This is a PR which fixes the issues described in #30. It adds a co_code attribute to the Code class, which allows Twisted Failure objects to be created which expects the co_code attribute to exist: https://github.com/twisted/twisted/blob/twisted-18.4.0/src/twisted/python/failure.py#L458

I also updated the .travis installed pypy versions to 6.0.0, for both Python 2 and 3.

In order to make the build succeed, deprecated links in README.rst were updated.

codecov-io commented 6 years ago

Codecov Report

Merging #35 into master will increase coverage by 0.92%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
+ Coverage   87.25%   88.17%   +0.92%     
==========================================
  Files           4        4              
  Lines         204      203       -1     
  Branches       28       27       -1     
==========================================
+ Hits          178      179       +1     
+ Misses         16       15       -1     
+ Partials       10        9       -1
Impacted Files Coverage Δ
src/tblib/pickling_support.py 100% <100%> (ø) :arrow_up:
src/tblib/__init__.py 91.12% <100%> (+1.44%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a963527...7d6bded. Read the comment docs.

ionelmc commented 6 years ago

Hmmm shouldn't there be some sort of backwards compatibility with old pickle format? Any particular reason you reverted https://github.com/ionelmc/python-tblib/pull/35/commits/bf15d923345fbf88e01db6a567a2627e6f67fcd8 ?

arnimarj commented 6 years ago

Hi. I wasn't sure what the policy was w.r.t. backwards compatibility, or even if it was the appropriate way to handle backwards compatibility. Any thoughts?

ionelmc commented 6 years ago

Just do a check like in bf15d92 - should be fine I guess.