python-peps/peps/pep-0042.rst

336 lines
11 KiB
ReStructuredText
Raw Normal View History

PEP: 42
Title: Feature Requests
Author: Jeremy Hylton <jeremy@alum.mit.edu>
Status: Withdrawn
Type: Process
Created: 12-Sep-2000
Post-History:
.. withdrawn::
It is `obsolete`_.
All new feature requests should either go to the `Python bug tracker`_
for very simple requests or the `Ideas Discourse category`_ for
everything else. The rest of this document is retained for historical
purposes only.
2016-09-26 11:41:33 -04:00
2016-06-22 14:40:40 -04:00
Introduction
2016-06-22 14:40:40 -04:00
============
2016-06-22 14:40:40 -04:00
This PEP contains a list of feature requests that may be considered
for future versions of Python. Large feature requests should not be
included here, but should be described in separate PEPs; however a
large feature request that doesn't have its own PEP can be listed here
until its own PEP is created. See :pep:`0` for details.
2016-06-22 14:40:40 -04:00
This PEP was created to allow us to close bug reports that are really
feature requests. Marked as Open, they distract from the list of real
bugs (which should ideally be less than a page). Marked as Closed,
they tend to be forgotten. The procedure now is: if a bug report is
really a feature request, add the feature request to this PEP; mark
the bug as "feature request", "later", and "closed"; and add a comment
to the bug saying that this is the case (mentioning the PEP
explicitly). It is also acceptable to move large feature requests
directly from the bugs database to a separate PEP.
2016-06-22 14:40:40 -04:00
This PEP should really be separated into four different categories
(categories due to Laura Creighton):
2016-06-22 14:40:40 -04:00
1. BDFL rejects as a bad idea. Don't come back with it.
2016-06-22 14:40:40 -04:00
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 up
with code.)
2016-06-22 14:40:40 -04:00
possibly divided into:
2016-06-22 14:40:40 -04:00
a) BDFL would really like to see some code!
2016-06-22 14:40:40 -04:00
b) BDFL is never going to be enthusiastic about this, but
2016-09-26 11:41:33 -04:00
will work it in when it's easy.
2016-06-22 14:40:40 -04:00
3. If you show up with code, BDFL will make a pronouncement. It might
be ICK.
2016-06-22 14:40:40 -04:00
4. This is too vague. This is rejected, but only on the grounds of
vagueness. If you like this enhancement, make a new PEP.
Core Language / Builtins
2016-06-22 14:40:40 -04:00
========================
2016-06-22 14:40:40 -04:00
* The parser should handle more deeply nested parse trees.
2016-06-22 14:40:40 -04:00
The following will fail -- ``eval("["*50`` + ``"]"*50)`` -- because
the parser has a hard-coded limit on stack size. This limit should
be raised or removed. Removal would be hard because the current
compiler can overflow the C stack if the nesting is too deep.
https://bugs.python.org/issue215555
2016-06-22 14:40:40 -04:00
* Non-accidental IEEE-754 support (Infs, NaNs, settable traps, etc).
Big project.
2016-06-22 14:40:40 -04:00
* Windows: Trying to create (or even access) files with certain
magic names can hang or crash Windows systems. This is really a
bug in the OSes, but some apps try to shield users from it. When
it happens, the symptoms are very confusing.
Hang using files named prn.txt, etc https://bugs.python.org/issue481171
2016-06-22 14:40:40 -04:00
* eval and free variables: It might be useful if there was a way to
pass bindings for free variables to eval when a code object with
free variables is passed. https://bugs.python.org/issue443866
Standard Library
2016-06-22 14:40:40 -04:00
================
* The urllib module should support proxies which require
authentication. See SourceForge bug #210619 for information:
https://bugs.python.org/issue210619
2016-06-22 14:40:40 -04:00
* os.rename() should be modified to handle EXDEV errors on platforms
that don't allow rename() to operate across filesystem boundaries
by copying the file over and removing the original. Linux is one
system that requires this treatment.
https://bugs.python.org/issue212317
2016-06-22 14:40:40 -04:00
* signal handling doesn't always work as expected. E.g. if
sys.stdin.readline() is interrupted by a (returning) signal
handler, it returns "". It would be better to make it raise an
exception (corresponding to EINTR) or to restart. But these
changes would have to applied to all places that can do blocking
interruptible I/O. So it's a big project.
https://bugs.python.org/issue210599
2016-06-22 14:40:40 -04:00
* Extend Windows utime to accept directory paths.
2000-09-17 15:36:22 -04:00
https://bugs.python.org/issue214245
2000-09-17 15:36:22 -04:00
2016-06-22 14:40:40 -04:00
* Extend copy.py to module & function types.
https://bugs.python.org/issue214553
2016-06-22 14:40:40 -04:00
* Better checking for bad input to ``marshal.load*().``
https://bugs.python.org/issue214754
2016-06-22 14:40:40 -04:00
* rfc822.py should be more lenient than the spec in the types of
address fields it parses. Specifically, an invalid address of the
form "From: Amazon.com <delivers-news2@amazon.com>" should be
parsed correctly.
https://bugs.python.org/issue210678
2016-06-22 14:40:40 -04:00
* cgi.py's FieldStorage class should be more conservative with memory
in the face of large binary file uploads.
https://bugs.python.org/issue210674
2016-06-22 14:40:40 -04:00
There are two issues here: first, because
read_lines_to_outerboundary() uses readline() it is possible that a
large amount of data will be read into memory for a binary file
upload. This should probably look at the Content-Type header of the
section and do a chunked read if it's a binary type.
2016-06-22 14:40:40 -04:00
The second issue was related to the self.lines attribute, which was
removed in revision 1.56 of cgi.py (see also):
https://bugs.python.org/issue219806
2016-06-22 14:40:40 -04:00
* urllib should support proxy definitions that contain just the host
and port
https://bugs.python.org/issue210849
2000-09-15 22:06:02 -04:00
* urlparse should be updated to comply with :rfc:`2396`, which defines
2016-06-22 14:40:40 -04:00
optional parameters for each segment of the path.
https://bugs.python.org/issue210834
2016-06-22 14:40:40 -04:00
* The exceptions raised by pickle and cPickle are currently
different; these should be unified (probably the exceptions should
be defined in a helper module that's imported by both). [No bug
report; I just thought of this.]
2016-06-22 14:40:40 -04:00
* More standard library routines should support Unicode. For
example, urllib.quote() could convert Unicode strings to UTF-8 and
then do the usual %HH conversion. But this is not the only one!
https://bugs.python.org/issue216716
2000-10-05 20:10:56 -04:00
2016-06-22 14:40:40 -04:00
* There should be a way to say that you don't mind if ``str()`` or
``__str__()`` return a Unicode string object. Or a different function
-- ``ustr()`` has been proposed. Or something...
2016-06-22 14:40:40 -04:00
http://sf.net/patch/?func=detailpatch&patch_id=101527&group_id=5470
2016-06-22 14:40:40 -04:00
* Killing a thread from another thread. Or maybe sending a signal.
Or maybe raising an asynchronous exception.
2000-10-25 16:58:27 -04:00
https://bugs.python.org/issue221115
2000-10-25 16:58:27 -04:00
2016-06-22 14:40:40 -04:00
* The debugger (pdb) should understand packages.
https://bugs.python.org/issue210631
2016-06-22 14:40:40 -04:00
* Jim Fulton suggested the following:
2000-12-13 08:36:49 -05:00
2016-06-22 14:40:40 -04:00
::
2000-12-13 08:36:49 -05:00
2016-06-22 14:40:40 -04:00
I wonder if it would be a good idea to have a new kind of
temporary file that stored data in memory unless:
2016-06-22 14:40:40 -04:00
- The data exceeds some size, or
2016-06-22 14:40:40 -04:00
- Somebody asks for a fileno.
2016-06-22 14:40:40 -04:00
Then the cgi module (and other apps) could use this thing in a
uniform way.
https://bugs.python.org/issue415692
2016-06-22 14:40:40 -04:00
* Jim Fulton pointed out that binascii's b2a_base64() function has
situations where it makes sense not to append a newline, or to
append something else than a newline.
2016-06-22 14:40:40 -04:00
Proposal:
2016-06-22 14:40:40 -04:00
- add an optional argument giving the delimiter string to be
appended, defaulting to "\\n"
2016-06-22 14:40:40 -04:00
- possibly special-case None as the delimiter string to avoid adding
the pad bytes too???
https://bugs.python.org/issue415694
2016-06-22 14:40:40 -04:00
* pydoc should be integrated with the HTML docs, or at least be able
to link to them.
https://bugs.python.org/issue405554
2003-02-05 15:21:49 -05:00
2016-06-22 14:40:40 -04:00
* Distutils should deduce dependencies for .c and .h files.
2003-02-05 15:21:49 -05:00
https://bugs.python.org/issue472881
2003-02-06 12:57:14 -05:00
2016-06-22 14:40:40 -04:00
* asynchat is buggy in the face of multithreading.
2003-02-06 12:57:14 -05:00
https://bugs.python.org/issue595217
2003-04-29 12:57:48 -04:00
2016-06-22 14:40:40 -04:00
* It would be nice if the higher level modules (httplib, smtplib,
nntplib, etc.) had options for setting socket timeouts.
2003-04-29 12:57:48 -04:00
https://bugs.python.org/issue723287
2003-05-13 10:57:08 -04:00
2016-06-22 14:40:40 -04:00
* The curses library is missing two important calls: newterm() and
delscreen()
2003-05-13 10:57:08 -04:00
https://bugs.python.org/issue665572, http://bugs.debian.org/175590
2003-10-23 13:58:20 -04:00
2016-06-22 14:40:40 -04:00
* It would be nice if the built-in SSL socket type could be used for
non-blocking SSL I/O. Currently packages such as Twisted which
implement async servers using SSL have to require third-party
packages such as pyopenssl.
2003-10-23 13:58:20 -04:00
2016-06-22 14:40:40 -04:00
* reST as a standard library module
2016-06-22 14:40:40 -04:00
* The import lock could use some redesign.
https://bugs.python.org/issue683658
2016-06-22 14:40:40 -04:00
* A nicer API to open text files, replacing the ugly (in some
people's eyes) "U" mode flag. There's a proposal out there to have
a new built-in type textfile(filename, mode, encoding). (Shouldn't
it have a bufsize argument too?)
2016-06-22 14:40:40 -04:00
* Support new widgets and/or parameters for Tkinter
2016-06-22 14:40:40 -04:00
* For a class defined inside another class, the __name__ should be
"outer.inner", and pickling should work. (GvR is no longer certain
this is easy or even right.)
https://bugs.python.org/issue633930
2016-06-22 14:40:40 -04:00
* Decide on a clearer deprecation policy (especially for modules) and
act on it.
2017-06-11 15:02:39 -04:00
https://mail.python.org/pipermail/python-dev/2002-April/023165.html
2016-06-22 14:40:40 -04:00
* Provide alternatives for common uses of the types module; Skip
Montanaro has posted a proto-PEP for this idea:
2017-06-11 15:02:39 -04:00
https://mail.python.org/pipermail/python-dev/2002-May/024346.html
2016-06-22 14:40:40 -04:00
* Use pending deprecation for the types and string modules. This
requires providing alternatives for the parts that aren't covered
yet (e.g. string.whitespace and types.TracebackType). It seems we
can't get consensus on this.
2016-06-22 14:40:40 -04:00
* Lazily tracking tuples?
2017-06-11 15:02:39 -04:00
https://mail.python.org/pipermail/python-dev/2002-May/023926.html
https://bugs.python.org/issue558745
2016-06-22 14:40:40 -04:00
* 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.)
2000-12-13 08:36:49 -05:00
C API wishes
2016-06-22 14:40:40 -04:00
============
2016-06-22 14:40:40 -04:00
* Add C API functions to help Windows users who are building embedded
applications where the FILE \* structure does not match the FILE \*
the interpreter was compiled with.
https://bugs.python.org/issue210821
2016-06-22 14:40:40 -04:00
See this bug report for a specific suggestion that will allow a
Borland C++ builder application to interact with a python.dll build
with MSVC.
Tools
2016-06-22 14:40:40 -04:00
=====
2016-06-22 14:40:40 -04:00
* Python could use a GUI builder.
https://bugs.python.org/issue210820
Building and Installing
2016-06-22 14:40:40 -04:00
=======================
2016-06-22 14:40:40 -04:00
* Modules/makesetup should make sure the 'config.c' file it generates
from the various Setup files, is valid C. It currently accepts
module names with characters that are not allowable in Python or C
identifiers.
https://bugs.python.org/issue216326
2016-06-22 14:40:40 -04:00
* Building from source should not attempt to overwrite the
Include/graminit.h and Parser/graminit.c files, at least for people
downloading a source release rather than working from Subversion or
snapshots. Some people find this a problem in unusual build
environments.
https://bugs.python.org/issue219221
2016-06-22 14:40:40 -04:00
* The configure script has probably grown a bit crufty with age and
may not track autoconf's more recent features very well. It should
be looked at and possibly cleaned up.
2017-06-11 15:02:39 -04:00
https://mail.python.org/pipermail/python-dev/2004-January/041790.html
2016-06-22 14:40:40 -04:00
* Make Python compliant to the FHS (the Filesystem Hierarchy
Standard)
2007-10-24 12:11:52 -04:00
2016-06-22 14:40:40 -04:00
http://bugs.python.org/issue588756
2007-10-24 12:11:52 -04:00
.. _`Python bug tracker`: https://github.com/python/cpython/issues
.. _`Ideas Discourse category`: https://discuss.python.org/c/ideas/6
.. _`obsolete`: https://github.com/python/peps/pull/108#issuecomment-249603204