Issue 15040: stdlib compatibility with pypy: mailbox module (original) (raw)

Created on 2012-06-09 19:26 by mattip, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
mailbox.patch mattip,2012-06-09 19:26 review
mailbox.patch mattip,2012-06-11 18:47 review
Messages (10)
msg162564 - (view) Author: mattip (mattip) * Date: 2012-06-09 19:26
These are changes necessary to mailbox.py and its tests so that tests pass (windows platform) on pypy 1.9.0. Files must be explicitly closed on pypy. I would like to submit these as a "compatability" issue type, but that category does not exist, so I used "behavior". This is the first in a series of a number of such patches, I think there will be about 20.
msg162566 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-06-10 00:10
I see some code changes, but no added tests for those code changes. msg.fp doesn't exist in Python3. I'd like to understand those changes better, but I don't know when I'll have the time or if it is worth the effort.
msg162567 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-06-10 00:15
Oh, and the code changes should presumably be applied to Python3 as well (once there are tests), so I've added those versions. It might be better to have two patches, one for the close of _file, and the other for the msg.fp stuff (since that doesn't exist in Python3).
msg162607 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2012-06-11 07:31
I'm not sure about the __del__: if pypy's deferred garbage collection is not enough to close self._file, how can a __del__ method help?
msg162635 - (view) Author: mattip (mattip) * Date: 2012-06-11 18:47
Revised patch: changes to mailbox.py were not needed for pypy. Someone did a good job with mailbox.py in stdlib 2.7.3 Now the patch only changes tests. The tests in 3.3 are very different, it seems to me there is little that can be reused there.
msg162636 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-06-11 19:09
Ah, good. I thought we'd fixed the open/close issues, but I could easily believe we had missed something (especially in Python2). Since the fp stuff is gone in 3, I'd be OK with just applying this.
msg162754 - (view) Author: mattip (mattip) * Date: 2012-06-14 05:17
What is the next stage in moving this forward? I am new here...
msg162781 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-06-14 12:54
You could get one of the pypy devs that have push rights on cpython to commit it. If that doesn't happen, then at some point (probably not *too* long from now) I or someone else will commit it. We have many more patches than we have people with time to commit them, so it sometimes takes a bit.
msg173596 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-10-23 12:03
New changeset 84cd07899baf by Petri Lehtinen in branch '2.7': #15040: Close files in mailbox tests for PyPy compatibility http://hg.python.org/cpython/rev/84cd07899baf
msg173598 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2012-10-23 12:04
Applied, thanks!
History
Date User Action Args
2022-04-11 14:57:31 admin set github: 59245
2012-10-23 12:04:28 petri.lehtinen set status: open -> closednosy: + petri.lehtinenmessages: + resolution: fixedstage: commit review -> resolved
2012-10-23 12:03:37 python-dev set nosy: + python-devmessages: +
2012-06-18 14:55:39 eric.araujo set title: stdlib compatability with pypy: mailbox.py -> stdlib compatibility with pypy: mailbox module
2012-06-14 12:54:06 r.david.murray set messages: + stage: patch review -> commit review
2012-06-14 05:17:53 mattip set messages: +
2012-06-11 19:09:49 r.david.murray set messages: + versions: - Python 3.2, Python 3.3
2012-06-11 18:47:44 mattip set files: + mailbox.patchmessages: +
2012-06-11 07:31:55 amaury.forgeotdarc set nosy: + amaury.forgeotdarcmessages: +
2012-06-10 00:15:48 r.david.murray set versions: + Python 3.2, Python 3.3nosy: + barrymessages: + components: + emailstage: patch review
2012-06-10 00:10:10 r.david.murray set nosy: + r.david.murraymessages: +
2012-06-09 19:26:20 mattip create