Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stdlib compatibility with pypy: mailbox module #59245

Closed
mattip opened this issue Jun 9, 2012 · 10 comments
Closed

stdlib compatibility with pypy: mailbox module #59245

mattip opened this issue Jun 9, 2012 · 10 comments
Labels
stdlib Python modules in the Lib dir topic-email type-bug An unexpected behavior, bug, or error

Comments

@mattip
Copy link
Contributor

mattip commented Jun 9, 2012

BPO 15040
Nosy @warsaw, @amauryfa, @bitdancer, @akheron, @mattip
Files
  • mailbox.patch
  • mailbox.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-10-23.12:04:28.635>
    created_at = <Date 2012-06-09.19:26:19.998>
    labels = ['type-bug', 'library', 'expert-email']
    title = 'stdlib compatibility with pypy: mailbox module'
    updated_at = <Date 2012-10-23.12:04:28.634>
    user = 'https://github.com/mattip'

    bugs.python.org fields:

    activity = <Date 2012-10-23.12:04:28.634>
    actor = 'petri.lehtinen'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-10-23.12:04:28.635>
    closer = 'petri.lehtinen'
    components = ['Library (Lib)', 'email']
    creation = <Date 2012-06-09.19:26:19.998>
    creator = 'mattip'
    dependencies = []
    files = ['25869', '25937']
    hgrepos = []
    issue_num = 15040
    keywords = ['patch']
    message_count = 10.0
    messages = ['162564', '162566', '162567', '162607', '162635', '162636', '162754', '162781', '173596', '173598']
    nosy_count = 6.0
    nosy_names = ['barry', 'amaury.forgeotdarc', 'r.david.murray', 'python-dev', 'petri.lehtinen', 'mattip']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue15040'
    versions = ['Python 2.7']

    @mattip
    Copy link
    Contributor Author

    mattip commented Jun 9, 2012

    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.

    @mattip mattip added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Jun 9, 2012
    @bitdancer
    Copy link
    Member

    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.

    @bitdancer
    Copy link
    Member

    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).

    @amauryfa
    Copy link
    Member

    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?

    @mattip
    Copy link
    Contributor Author

    mattip commented Jun 11, 2012

    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.

    @bitdancer
    Copy link
    Member

    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.

    @mattip
    Copy link
    Contributor Author

    mattip commented Jun 14, 2012

    What is the next stage in moving this forward? I am new here...

    @bitdancer
    Copy link
    Member

    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.

    @merwok merwok changed the title stdlib compatability with pypy: mailbox.py stdlib compatibility with pypy: mailbox module Jun 18, 2012
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 23, 2012

    New changeset 84cd07899baf by Petri Lehtinen in branch '2.7':
    bpo-15040: Close files in mailbox tests for PyPy compatibility
    http://hg.python.org/cpython/rev/84cd07899baf

    @akheron
    Copy link
    Member

    akheron commented Oct 23, 2012

    Applied, thanks!

    @akheron akheron closed this as completed Oct 23, 2012
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir topic-email type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants