Skip to content

Commit

Permalink
merge 3.3-slp (Stackless python#128, pickling of module stackless)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anselm Kruis committed Apr 14, 2017
2 parents 43b9010 + 2aa8771 commit ca4b16a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/stackless.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

def __reduce__():
return "stackless"
def __reduce_ex_(*args):
def __reduce_ex__(*args):
return "stackless"

# Backwards support for unpickling older pickles, even from 2.7
Expand Down
3 changes: 3 additions & 0 deletions Stackless/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ What's New in Stackless 3.X.X?

*Release date: 20XX-XX-XX*

- https://bitbucket.org/stackless-dev/stackless/issues/128
Fix pickling of the module 'stackless'.

- https://bitbucket.org/stackless-dev/stackless/issues/127
Disable the Stackless specific code for pickling 'iterator' and
'callable_iterator' objects. C-Python 3.3 already pickles them.
Expand Down
4 changes: 4 additions & 0 deletions Stackless/unittests/test_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,10 @@ def _test(self, obj, *attributes, **kw):
# refer to the same objects
self.assertIs(value_c, value_obj)

def test_module_stackless(self):
# test for issue 128
self.assertIs(stackless, copy.copy(stackless))

def test_code(self):
def f():
pass
Expand Down

0 comments on commit ca4b16a

Please sign in to comment.