Opened 12 years ago
Closed 12 years ago
#18590 closed Cleanup/optimization (fixed)
Remove workaround for a Python 2.4 bug in Model.__reduce__
Reported by: | Michal Petrucha | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Model.__reduce__
contains a workaround for a buggy implementation of pickling/unpickling where calling super(Model, self).__reduce__()
resulted in infinite recursion.
With Python 2.6 and 2.7 this seems no longer to be relevant, which means the workaround can probably be removed.
Attachments (1)
Change History (8)
by , 12 years ago
Attachment: | 18590-1.diff added |
---|
comment:1 by , 12 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Sure, less code is better. Attached patch passes all tests on Python 2.6 - SQLite.
comment:2 by , 12 years ago
Passes here as well. We still need someone to verify it passes on Mac; according to #12121, on the bug was present in the Mac version of 2.5.
comment:3 by , 12 years ago
All tests passes on Python 2.7.3rc1 - SQLite here as well.
@koniiiik I think we're dropping Python 2.5 support for 1.5?
comment:4 by , 12 years ago
Actually, what I meant was that someone should test against 2.6 on Mac to make sure 2.6 is no longer affected…
comment:5 by , 12 years ago
The test suite passes on OS X with this patch, SQLite and the following Pythons:
Python 2.6.7 (r267:88850, Jul 31 2011, 19:30:54) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) [GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
comment:6 by , 12 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Removed Python 2.4 workaround