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

Implement PEP 3108 #47024

Closed
brettcannon opened this issue May 6, 2008 · 71 comments
Closed

Implement PEP 3108 #47024

brettcannon opened this issue May 6, 2008 · 71 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@brettcannon
Copy link
Member

BPO 2775
Nosy @freddrake, @warsaw, @brettcannon, @birkenfeld, @kbkaiser, @pitrou, @avassalotti, @hdiogenes, @benjaminp, @orivej, @juracy, @merwok, @florentx, @meadori, @ericsnowcurrently
Dependencies
  • bpo-2874: Remove use of the stat module in the stdlib
  • bpo-3260: fix_imports does not handle intra-package renames
  • Files
  • symtable_removed_on_py3k.diff: symtable/_symtable removed on py3000
  • deprecated_symtable_on_py26.patch: symtable/_symtable deprecated warnings added for python 2.6
  • htmllib_removed_on_py3k.diff: htmllib removed in py3000
  • http_package_on_py3k.diff: Patch for http package for py3000
  • http_package_on_py3k.status: SVN status for http package patch on py3000
  • renaming_leftovers_2.6.patch: Patch against trunk (r63318)
  • import_renames_py3k.patch: Patch for some imports in py3k
  • setup.py.remove-bsddb.diff: Remove bsddb build code
  • zipfile-patch.diff: Fixing zipfile.BadZipfile to zipfile.BadZipFile
  • 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 = 'https://github.com/brettcannon'
    closed_at = <Date 2012-11-17.15:05:49.421>
    created_at = <Date 2008-05-06.18:11:08.731>
    labels = ['type-bug', 'library']
    title = 'Implement PEP 3108'
    updated_at = <Date 2012-11-17.15:05:49.419>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2012-11-17.15:05:49.419>
    actor = 'brett.cannon'
    assignee = 'brett.cannon'
    closed = True
    closed_date = <Date 2012-11-17.15:05:49.421>
    closer = 'brett.cannon'
    components = ['Library (Lib)']
    creation = <Date 2008-05-06.18:11:08.731>
    creator = 'brett.cannon'
    dependencies = ['2874', '3260']
    files = ['10292', '10294', '10297', '10324', '10325', '10326', '10416', '14434', '19222']
    hgrepos = []
    issue_num = 2775
    keywords = ['patch']
    message_count = 71.0
    messages = ['66326', '66330', '66340', '66341', '66342', '66348', '66520', '66538', '66540', '66565', '66567', '66568', '66570', '66574', '66588', '66599', '66602', '66603', '66646', '66660', '66695', '66696', '66698', '66701', '66815', '66816', '66822', '66823', '66840', '66841', '66842', '66849', '66893', '66911', '66915', '66917', '66961', '67025', '67032', '67070', '67085', '67156', '67160', '67234', '67268', '68035', '68041', '68970', '69061', '83489', '90043', '90051', '97812', '97847', '118566', '118573', '118654', '118688', '118863', '118949', '118956', '119598', '119624', '119641', '124777', '147624', '147632', '147689', '149079', '149094', '175751']
    nosy_count = 22.0
    nosy_names = ['jhylton', 'fdrake', 'barry', 'brett.cannon', 'georg.brandl', 'kbk', 'pitrou', 'alexandre.vassalotti', 'hdiogenes', 'quentin.gallet-gilles', 'benjamin.peterson', 'gpolo', 'orivej', 'jnoller', 'andrewsmedina', 'juracy@gmail.com', 'eric.araujo', 'henry.precheur', 'Retro', 'flox', 'meador.inge', 'eric.snow']
    pr_nums = []
    priority = 'critical'
    resolution = 'fixed'
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue2775'
    versions = ['Python 3.3']

    @brettcannon
    Copy link
    Member Author

    This is to keep track of who is working on what for PEP-3108
    (http://www.python.org/dev/peps/pep-3108/). Once something is complete it
    should be denoted in the PEP itself, so always check the PEP to see what
    is left to be done (for both 2.6 and 3.0).

    @brettcannon brettcannon added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels May 6, 2008
    @brettcannon brettcannon self-assigned this May 6, 2008
    @jhylton
    Copy link
    Mannequin

    jhylton mannequin commented May 6, 2008

    I'm working on the new urllib package.

    @benjaminp
    Copy link
    Contributor

    I'm working on removing mac modules.

    @brettcannon
    Copy link
    Member Author

    I am working on audiodev to get the basic structure of removals worked out
    (testing infrastructure, etc.).

    @brettcannon
    Copy link
    Member Author

    For the TextMate users, I am going to be checking in a Python-Dev bundle
    into svn soon which will include a command to insert the warnpy3k() call
    for module deletions. Might want to wait for that if you want to cut out
    at least one copy-and-paste step. =)

    @brettcannon
    Copy link
    Member Author

    If you use TextMate, get the Python-Dev bundle and use the command in
    there to insert the deprecation boilerplate for removing a module.

    @andrewsmedina
    Copy link
    Mannequin

    andrewsmedina mannequin commented May 10, 2008

    I'm working on removing symtable/_symtable

    @juracy
    Copy link
    Mannequin

    juracy mannequin commented May 10, 2008

    I'm working on creating http package with httplib, BaseHTTPServer,
    CGIHTTPServer, SimpleHTTPServer, Cookie and cookielib

    @jnoller
    Copy link
    Mannequin

    jnoller mannequin commented May 10, 2008

    Here is a patch for the Queue module renaming - I can not easily do the
    actual svn rename to the lowercase queue myself (it's easier to do it with
    commit privs). Tests pass, documentation updated as well.

    @jnoller
    Copy link
    Mannequin

    jnoller mannequin commented May 10, 2008

    Here is a patch for the required changes to rename SocketServer.py - tests
    pass after I manually rename SocketServer.py locally. Again skipping the
    svn rename of the actual module. Doc updates included.

    @jnoller
    Copy link
    Mannequin

    jnoller mannequin commented May 10, 2008

    I'm working on xmlrpc/* changes

    @jhylton
    Copy link
    Mannequin

    jhylton mannequin commented May 10, 2008

    I think we should move robotparser into the urllib package. Anyone
    disagree?

    Jeremy

    @jnoller
    Copy link
    Mannequin

    jnoller mannequin commented May 10, 2008

    Should DocXMLRPCServer.py be moved into xmlrpc/ as well?

    @brettcannon
    Copy link
    Member Author

    On Sat, May 10, 2008 at 12:29 PM, Jesse Noller <report@bugs.python.org> wrote:

    Jesse Noller <jnoller@gmail.com> added the comment:

    Should DocXMLRPCServer.py be moved into xmlrpc/ as well?

    Yes, and end up in the server module. That was just an oversight on my
    part. The PEP has been updated.

    @andrewsmedina
    Copy link
    Mannequin

    andrewsmedina mannequin commented May 10, 2008

    I add deprecated warnings symtable/_symtable in python 2.6

    @brettcannon
    Copy link
    Member Author

    Just so people know, I have emailed python-dev about renaming urllib as I
    realized there are some issues with the solution proposed in the PEP.

    @andrewsmedina
    Copy link
    Mannequin

    andrewsmedina mannequin commented May 11, 2008

    The files Python/compile.c and Python/pythonrun.c depends of the
    _symtable (Python/symtable.c and Include/symtable.h).

    What I do for remove _symtable in py3k?

    @hdiogenes
    Copy link
    Mannequin

    hdiogenes mannequin commented May 11, 2008

    Andrews, this discussion would be more appropriate to the mailing list,
    but anyway: I believe you're mixing things up. When PEP-3108 says "remove
    symtable/_symtable", it must be talking only about symtable.py and
    symtablemodule.c, not symtable.[ch] (used by the compiler).

    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented May 11, 2008

    I'm working on the new package tkinter and dialogs merging where
    appropriate.

    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented May 11, 2008

    Patch regarding the move to tkinter package added.

    What this patch does
    --------------------

    • Moved lib-tk to tkinter and renamed modules according to PEP-3108
    • Merged tkFileDialog into filedialog
    • Merged tkSimpleDialog into simpledialog
    • Updated imports in pydoc
    • Updated imports in idlelib
    • Updated imports in Tools and Demos
    • Changed lib-tk to tkinter at Makefile.pre.in
    • Removed TKPATH from Modules/Setup.dist
    • Removed references of lib-tk at PC/

    What has to be done
    -------------------

    • Update iss script at PC/ to change lib-tk to tkinter
    • Update docs
    • stub modules ?

    @andrewsmedina
    Copy link
    Mannequin

    andrewsmedina mannequin commented May 12, 2008

    I'm working on creating html package with HTMLParser and htmlentitydefs

    @brettcannon
    Copy link
    Member Author

    Just so people know, feel free to create new issues for stuff if you want.
    Other issues can be made dependencies of this issue very easily.

    @gpolo
    Copy link
    Mannequin

    gpolo mannequin commented May 12, 2008

    New patch regarding the move to tkinter package, now with docs updated.
    This one should be the "final" patch, and while the patch is relatively
    large it mostly trivial to review.

    @andrewsmedina
    Copy link
    Mannequin

    andrewsmedina mannequin commented May 12, 2008

    For to remove the htmllib on Python 3000 is need to removed these files:

    Lib/htmllib.py
    Lib/test_htmllib.py

    And apply this patch

    @quentingallet-gilles
    Copy link
    Mannequin

    quentingallet-gilles mannequin commented May 14, 2008

    I'm working on renaming the ConfigParser module.

    @avassalotti
    Copy link
    Member

    Done with pickle and stringio.

    @warsaw
    Copy link
    Member

    warsaw commented Jun 12, 2008

    We've got what we've got for the first betas.

    @orivej
    Copy link
    Mannequin

    orivej mannequin commented Jun 29, 2008

    Not creating new bug entry because everybody can quickly fix it.

    In urllib/request.py some instances of URLError are raised with "raise
    urllib.error.URLError" and this works, buth there are lines with "raise
    URLError" which produces "NameError: global name 'URLError' is not defined"

    @birkenfeld
    Copy link
    Member

    Fixed in r64624.

    @brettcannon
    Copy link
    Member Author

    For those of you following along, the only thing keeping PEP-3108 and
    this issue from being finished are the two dependent issues: os.stat and
    profile/cProfile.

    @henryprecheur
    Copy link
    Mannequin

    henryprecheur mannequin commented Jul 3, 2009

    I found some bsddb code left in setup.py. Patch attached.

    @benjaminp
    Copy link
    Contributor

    Thanks for the patch. Applied in r738067.

    @florentx
    Copy link
    Mannequin

    florentx mannequin commented Jan 15, 2010

    Modules "hotshot" and "xmllib" give deprecation warnings. But they are not part of PEP-3108 or PEP-4.

    @brettcannon
    Copy link
    Member Author

    I don't know why hotshot was deprecated specifically for Python 3 as that was never directly part of the discussion for PEP-3108. As for xmllib, that is most likely an oversight. Either way they should get added to the relevant PEPs.

    @Retro
    Copy link
    Mannequin

    Retro mannequin commented Oct 13, 2010

    I am very glad you're reorganizing the Standard Library. Thumbs up! I hope everything will comply to PEP-8 after you're done.

    Since you're reorganizing, I have my own contribution. I have uploaded a patch. The bpo-7351 (http://bugs.python.org/issue7351) was not accepted at the time, I hope you'll accept this fix now.

    My point is that every class name in module zipfile is like this:

    • exception class: LargeZipFile
    • normal class: ZipFile
    • normal class: PyZipFile

    So apply my fix to make the exception class BadZipfile consistent to others and let it be BadZipFile.

    Thank you.

    @brettcannon
    Copy link
    Member Author

    The reorganization is over short of one or two lasting changes that may not even be made now. New suggestions are not directly being discussed here and would have to be taken up on python-dev.

    @Retro
    Copy link
    Mannequin

    Retro mannequin commented Oct 14, 2010

    Can you send my patch and comment to python-dev? Because I don't know how to. I don't know where is python-dev and what exactly you mean by this.

    @brettcannon
    Copy link
    Member Author

    No. Best I can do is suggest you perform an internet search on the term as it makes it obvious what python-dev is.

    @Retro
    Copy link
    Mannequin

    Retro mannequin commented Oct 16, 2010

    My patch "zipfile-patch.diff" was sent to python-dev. Please act on it as you see fit. Thank you.

    @Retro
    Copy link
    Mannequin

    Retro mannequin commented Oct 17, 2010

    Did you manage to apply my fix "zipfile-patch.diff" to the trunk?

    @brettcannon
    Copy link
    Member Author

    If any action regarding your patch takes place there will be a comment here about it. Until then assume nothing has happened.

    @pitrou
    Copy link
    Member

    pitrou commented Oct 26, 2010

    Shouldn't this be closed? Most of this has been done and we can't do the rest anyway, without breaking backwards compatibility.

    @brettcannon
    Copy link
    Member Author

    profile and cProfile could still conceivably be merged, even if it is under a new name if someone found the time to do the compatibility work.

    @birkenfeld
    Copy link
    Member

    I will have a go at the profiler situation.

    I imagine the following: deprecate the cProfile module, and provide both profiler classes from the profile module -- e.g. as PythonProfile and CProfile, and provide Profile = PythonProfile. (From cProfile.py, obviously Profile = CProfile). A lot of the interface (module-level helpers and script entry) are near duplicated anyway.

    In 3.3, the default Profile could then be reassigned to CProfile.

    @merwok merwok removed the easy label Nov 18, 2010
    @birkenfeld
    Copy link
    Member

    Alas, too late for 3.2 now.

    @brettcannon
    Copy link
    Member Author

    Just so people know, if the profile situation isn't resolved by 3.3 I'm considering PEP-3108 done.

    IOW, if anyone wants to step forward and deal with cProfile/profile, that would be appreciated. =)

    @ericsnowcurrently
    Copy link
    Member

    For the stat module in the "Obsolete" section[1], should the entry be updated to indicate that the module was left alone (see bpo-2874)?

    Would it be worth having the "Merging C and Python Impl..." section[2] include a reference to PEP-399?

    [1] http://www.python.org/dev/peps/pep-3108/#obsolete
    [2] http://www.python.org/dev/peps/pep-3108/#merging-c-and-python-implementations-of-the-same-interface

    @brettcannon
    Copy link
    Member Author

    Answers to Eric's questions: yes and yes, but I probably won't bother until I do a final update to the PEP.

    @avassalotti
    Copy link
    Member

    Brett, bpo-2919 had a patch that merges profile/cProfile for a while now but nobody test it yet.

    All I need it someone to download the patch, install it, test it on some random script and tell me if it works. I don't need more.

    @pitrou
    Copy link
    Member

    pitrou commented Dec 9, 2011

    Brett, bpo-2919 had a patch that merges profile/cProfile for a while
    now but nobody test it yet.

    All I need it someone to download the patch, install it, test it on
    some random script and tell me if it works. I don't need more.

    I don't see any patch there, only a .tgz and two Python files.

    @brettcannon
    Copy link
    Member Author

    I think we are as close as we are going to get with PEP-3018 being implemented. if profile/cProfile ever get merged that is great (issue bpo-16492), but I'm not holding my breath and thus I am closing this issue.

    @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 type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    10 participants