Movatterモバイル変換


[0]ホーム

URL:


Following system colour schemeSelected dark colour schemeSelected light colour scheme

Python Enhancement Proposals

PEP 42 – Feature Requests

Author:
Jeremy Hylton <jeremy at alum.mit.edu>
Status:
Withdrawn
Type:
Process
Created:
12-Sep-2000
Post-History:


Table of Contents

Important

This PEP has been withdrawn.

×

It isobsolete.All new feature requests should either go to thePython bug trackerfor very simple requests or theIdeas Discourse category foreverything else. The rest of this document is retained for historicalpurposes only.

Introduction

This PEP contains a list of feature requests that may be consideredfor future versions of Python. Large feature requests should not beincluded here, but should be described in separate PEPs; however alarge feature request that doesn’t have its own PEP can be listed hereuntil its own PEP is created. SeePEP 0 for details.

This PEP was created to allow us to close bug reports that are reallyfeature requests. Marked as Open, they distract from the list of realbugs (which should ideally be less than a page). Marked as Closed,they tend to be forgotten. The procedure now is: if a bug report isreally a feature request, add the feature request to this PEP; markthe bug as “feature request”, “later”, and “closed”; and add a commentto the bug saying that this is the case (mentioning the PEPexplicitly). It is also acceptable to move large feature requestsdirectly from the bugs database to a separate PEP.

This PEP should really be separated into four different categories(categories due to Laura Creighton):

  1. BDFL rejects as a bad idea. Don’t come back with it.
  2. BDFL will put in if somebody writes the code. (Or at any rate,BDFL will say ‘change this and I will put it in’ if you show upwith code.)

    possibly divided into:

    1. BDFL would really like to see some code!
    2. BDFL is never going to be enthusiastic about this, butwill work it in when it’s easy.
  3. If you show up with code, BDFL will make a pronouncement. It mightbe ICK.
  4. This is too vague. This is rejected, but only on the grounds ofvagueness. If you like this enhancement, make a new PEP.

Core Language / Builtins

  • The parser should handle more deeply nested parse trees.

    The following will fail –eval("["*50 +"]"*50) – becausethe parser has a hard-coded limit on stack size. This limit shouldbe raised or removed. Removal would be hard because the currentcompiler can overflow the C stack if the nesting is too deep.

    https://bugs.python.org/issue215555

  • Non-accidental IEEE-754 support (Infs, NaNs, settable traps, etc).Big project.
  • Windows: Trying to create (or even access) files with certainmagic names can hang or crash Windows systems. This is really abug in the OSes, but some apps try to shield users from it. Whenit happens, the symptoms are very confusing.

    Hang using files named prn.txt, etchttps://bugs.python.org/issue481171

  • eval and free variables: It might be useful if there was a way topass bindings for free variables to eval when a code object withfree variables is passed.https://bugs.python.org/issue443866

Standard Library

  • The urllib module should support proxies which requireauthentication. See SourceForge bug #210619 for information:

    https://bugs.python.org/issue210619

  • os.rename() should be modified to handle EXDEV errors on platformsthat don’t allow rename() to operate across filesystem boundariesby copying the file over and removing the original. Linux is onesystem that requires this treatment.

    https://bugs.python.org/issue212317

  • signal handling doesn’t always work as expected. E.g. ifsys.stdin.readline() is interrupted by a (returning) signalhandler, it returns “”. It would be better to make it raise anexception (corresponding to EINTR) or to restart. But thesechanges would have to applied to all places that can do blockinginterruptible I/O. So it’s a big project.

    https://bugs.python.org/issue210599

  • Extend Windows utime to accept directory paths.

    https://bugs.python.org/issue214245

  • Extend copy.py to module & function types.

    https://bugs.python.org/issue214553

  • Better checking for bad input tomarshal.load*().

    https://bugs.python.org/issue214754

  • rfc822.py should be more lenient than the spec in the types ofaddress fields it parses. Specifically, an invalid address of theform “From: Amazon.com <delivers-news2@amazon.com>” should beparsed correctly.

    https://bugs.python.org/issue210678

  • cgi.py’s FieldStorage class should be more conservative with memoryin the face of large binary file uploads.

    https://bugs.python.org/issue210674

    There are two issues here: first, becauseread_lines_to_outerboundary() uses readline() it is possible that alarge amount of data will be read into memory for a binary fileupload. This should probably look at the Content-Type header of thesection and do a chunked read if it’s a binary type.

    The second issue was related to the self.lines attribute, which wasremoved in revision 1.56 of cgi.py (see also):

    https://bugs.python.org/issue219806

  • urllib should support proxy definitions that contain just the hostand port

    https://bugs.python.org/issue210849

  • urlparse should be updated to comply withRFC 2396, which definesoptional parameters for each segment of the path.

    https://bugs.python.org/issue210834

  • The exceptions raised by pickle and cPickle are currentlydifferent; these should be unified (probably the exceptions shouldbe defined in a helper module that’s imported by both). [No bugreport; I just thought of this.]
  • More standard library routines should support Unicode. Forexample, urllib.quote() could convert Unicode strings to UTF-8 andthen do the usual %HH conversion. But this is not the only one!

    https://bugs.python.org/issue216716

  • There should be a way to say that you don’t mind ifstr() or__str__() return a Unicode string object. Or a different function–ustr() has been proposed. Or something…

    http://sf.net/patch/?func=detailpatch&patch_id=101527&group_id=5470

  • Killing a thread from another thread. Or maybe sending a signal.Or maybe raising an asynchronous exception.

    https://bugs.python.org/issue221115

  • The debugger (pdb) should understand packages.

    https://bugs.python.org/issue210631

  • Jim Fulton suggested the following:
    Iwonderifitwouldbeagoodideatohaveanewkindoftemporaryfilethatstoreddatainmemoryunless:-Thedataexceedssomesize,or-Somebodyasksforafileno.Thenthecgimodule(andotherapps)couldusethisthinginauniformway.

    https://bugs.python.org/issue415692

  • Jim Fulton pointed out that binascii’s b2a_base64() function hassituations where it makes sense not to append a newline, or toappend something else than a newline.

    Proposal:

    • add an optional argument giving the delimiter string to beappended, defaulting to “\n”
    • possibly special-case None as the delimiter string to avoid addingthe pad bytes too???

    https://bugs.python.org/issue415694

  • pydoc should be integrated with the HTML docs, or at least be ableto link to them.

    https://bugs.python.org/issue405554

  • Distutils should deduce dependencies for .c and .h files.

    https://bugs.python.org/issue472881

  • asynchat is buggy in the face of multithreading.

    https://bugs.python.org/issue595217

  • It would be nice if the higher level modules (httplib, smtplib,nntplib, etc.) had options for setting socket timeouts.

    https://bugs.python.org/issue723287

  • The curses library is missing two important calls: newterm() anddelscreen()

    https://bugs.python.org/issue665572,http://bugs.debian.org/175590

  • It would be nice if the built-in SSL socket type could be used fornon-blocking SSL I/O. Currently packages such as Twisted whichimplement async servers using SSL have to require third-partypackages such as pyopenssl.
  • reST as a standard library module
  • The import lock could use some redesign.

    https://bugs.python.org/issue683658

  • A nicer API to open text files, replacing the ugly (in somepeople’s eyes) “U” mode flag. There’s a proposal out there to havea new built-in type textfile(filename, mode, encoding). (Shouldn’tit have a bufsize argument too?)
  • Support new widgets and/or parameters for Tkinter
  • For a class defined inside another class, the __name__ should be“outer.inner”, and pickling should work. (GvR is no longer certainthis is easy or even right.)

    https://bugs.python.org/issue633930

  • Decide on a clearer deprecation policy (especially for modules) andact on it.

    https://mail.python.org/pipermail/python-dev/2002-April/023165.html

  • Provide alternatives for common uses of the types module; SkipMontanaro has posted a proto-PEP for this idea:

    https://mail.python.org/pipermail/python-dev/2002-May/024346.html

  • Use pending deprecation for the types and string modules. Thisrequires providing alternatives for the parts that aren’t coveredyet (e.g. string.whitespace and types.TracebackType). It seems wecan’t get consensus on this.
  • Lazily tracking tuples?

    https://mail.python.org/pipermail/python-dev/2002-May/023926.htmlhttps://bugs.python.org/issue558745

  • Make ‘as’ a keyword. It has been a pseudo-keyword long enough.(It’s deprecated in 2.5, and will become a keyword in 2.6.)

C API wishes

  • Add C API functions to help Windows users who are building embeddedapplications where the FILE * structure does not match the FILE *the interpreter was compiled with.

    https://bugs.python.org/issue210821

    See this bug report for a specific suggestion that will allow aBorland C++ builder application to interact with a python.dll buildwith MSVC.

Tools

Building and Installing

  • Modules/makesetup should make sure the ‘config.c’ file it generatesfrom the various Setup files, is valid C. It currently acceptsmodule names with characters that are not allowable in Python or Cidentifiers.

    https://bugs.python.org/issue216326

  • Building from source should not attempt to overwrite theInclude/graminit.h and Parser/graminit.c files, at least for peopledownloading a source release rather than working from Subversion orsnapshots. Some people find this a problem in unusual buildenvironments.

    https://bugs.python.org/issue219221

  • The configure script has probably grown a bit crufty with age andmay not track autoconf’s more recent features very well. It shouldbe looked at and possibly cleaned up.

    https://mail.python.org/pipermail/python-dev/2004-January/041790.html

  • Make Python compliant to the FHS (the Filesystem HierarchyStandard)

    http://bugs.python.org/issue588756


Source:https://github.com/python/peps/blob/main/peps/pep-0042.rst

Last modified:2024-04-14 20:08:31 GMT


[8]ページ先頭

©2009-2025 Movatter.jp