Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

stackless python 2.7.3+: test.test_xrange fails #14

Closed
ghost opened this issue Nov 29, 2013 · 3 comments
Closed

stackless python 2.7.3+: test.test_xrange fails #14

ghost opened this issue Nov 29, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Nov 29, 2013

Originally reported by: RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew)


(originally reported in Trac by @akruis on 2013-02-01 19:47:11)

I'm using stackless python branch 2.7-slp from http://hg.python.org/stackless/

Since the merge of changeset 79317:bff269ee7288 the test test_xrange fails. This is caused by the stackless specific code for xrange objects in Stackless/pickling/prickelpit.c around line 1880-1925. This code predates the improved pickling support for xrange objects in plain CPython 2.6 and 3.0. See http://bugs.python.org/issue2582

I propose the remove the xrange specific code in prickelpit.c. See the attached patch.


@ghost
Copy link
Author

ghost commented Nov 29, 2013

Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew):


@akruis on 2013-02-01 21:25:33 said:

Unfortunately, simply removing the old code is not the best idea, because existing pickle files reference
stackless._wrap.xrange. Therefore I made a better patch, that

  • does not register the __reduce__ method with copy_reg
  • adds a test case to ensure that Stackless Python is able to unpickle old pickles.

@ghost
Copy link
Author

ghost commented Nov 29, 2013

Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew):


@ctismer on 2013-02-01 20:17:03 said:

Ah, very nice patch :-)

How comes that we didn't recognize that, our test cases seem pretty incomplete.

In any case, a patch that improves code by removing old stuff is more than welcome.
''By removing that code, our test coverage is virtually improved ;-)
''
Thanks for the finding and the report, it was fun to follow the references.

@ghost
Copy link
Author

ghost commented Nov 29, 2013

Original comment by RMTEW FULL NAME (Bitbucket: rmtew, GitHub: rmtew):


@akruis on 2013-04-24 16:34:49 said:

Fix is in changeset [d620fefaec70].

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

0 participants