2000-09-15 14:35:35 -04:00
|
|
|
|
PEP: 42
|
2000-09-15 16:50:35 -04:00
|
|
|
|
Title: Feature Requests
|
2000-09-15 14:35:35 -04:00
|
|
|
|
Version: $Revision$
|
2001-08-01 16:11:56 -04:00
|
|
|
|
Author: Jeremy Hylton <jeremy@zope.com>
|
2000-09-15 14:35:35 -04:00
|
|
|
|
Status: Active
|
|
|
|
|
Type: Informational
|
|
|
|
|
Created: 12-Sep-2000
|
|
|
|
|
|
2001-06-04 14:50:40 -04:00
|
|
|
|
|
2000-09-15 14:35:35 -04:00
|
|
|
|
Introduction
|
|
|
|
|
|
2000-09-15 16:50:35 -04:00
|
|
|
|
This PEP contains a list of feature requests that may be
|
2000-09-15 14:35:35 -04:00
|
|
|
|
considered for future versions of Python. Large feature requests
|
2000-09-15 16:50:35 -04:00
|
|
|
|
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
|
2000-09-15 14:35:35 -04:00
|
|
|
|
pep-0000.txt for details.
|
|
|
|
|
|
2000-09-15 22:02:45 -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.
|
2000-09-15 16:50:35 -04:00
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
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 up
|
|
|
|
|
with code.)
|
|
|
|
|
|
|
|
|
|
(possibly divided into:
|
|
|
|
|
|
|
|
|
|
2a) BDFL would really like to see some code!
|
|
|
|
|
|
|
|
|
|
2b) BDFL is never going to be enthusiastic about this, but
|
|
|
|
|
will work it in when it's easy.
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
3. If you show up with code, BDFL will make a pronouncement. It
|
|
|
|
|
might be ICK.
|
|
|
|
|
|
|
|
|
|
4. This is too vague. This is rejected, but only on the grounds
|
|
|
|
|
of vagueness. If you like this enhancement, make a new PEP.
|
|
|
|
|
|
2000-09-15 14:35:35 -04:00
|
|
|
|
|
2000-09-15 15:27:09 -04:00
|
|
|
|
Core Language / Builtins
|
2000-09-15 14:35:35 -04:00
|
|
|
|
|
2000-09-15 14:56:47 -04:00
|
|
|
|
- A builtin function that returns the number of bytes an object
|
|
|
|
|
uses internally. Apparently mxTools has a sizeof function that
|
|
|
|
|
returns the size of the object struct itself.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210835
|
2000-09-15 14:35:35 -04:00
|
|
|
|
|
2000-10-06 11:56:27 -04:00
|
|
|
|
- The parser should handle more deeply nested parse trees.
|
|
|
|
|
|
|
|
|
|
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
|
2000-11-14 15:27:54 -05:00
|
|
|
|
deep.
|
2000-10-06 11:56:27 -04:00
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/215555
|
2000-10-05 11:36:34 -04:00
|
|
|
|
|
2001-09-05 16:18:49 -04:00
|
|
|
|
- Non-accidental IEEE-754 support (Infs, NaNs, settable traps, etc).
|
|
|
|
|
Big project.
|
|
|
|
|
|
|
|
|
|
pickle lacks float('inf')
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/445484
|
2001-09-05 16:18:49 -04:00
|
|
|
|
|
2001-11-14 00:57:34 -05: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
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/481171
|
2001-11-14 00:57:34 -05:00
|
|
|
|
|
2002-07-11 14:11:32 -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.
|
|
|
|
|
http://www.python.org/sf/443866
|
2001-06-04 14:50:40 -04:00
|
|
|
|
|
2000-09-15 15:27:09 -04:00
|
|
|
|
Standard Library
|
|
|
|
|
|
2000-09-15 18:02:51 -04:00
|
|
|
|
- The test suite is incomplete (and probably always will be).
|
|
|
|
|
This is a reminder to people that more regression tests are
|
|
|
|
|
needed.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210819
|
2000-09-15 18:02:51 -04:00
|
|
|
|
|
2000-09-15 15:27:09 -04:00
|
|
|
|
- The urllib module should support proxies which require
|
2002-07-23 15:41:36 -04:00
|
|
|
|
authenication. See SourceForge bug #210619 for information:
|
2000-09-15 15:27:09 -04:00
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210619
|
2000-09-15 15:27:09 -04:00
|
|
|
|
|
2000-09-15 16:04:01 -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.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/212317
|
2000-09-15 16:04:01 -04:00
|
|
|
|
|
2000-09-17 15:36:22 -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
|
|
|
|
|
interruptable I/O. So it's a big project.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210599
|
2000-09-17 15:36:22 -04:00
|
|
|
|
|
2000-09-15 22:02:45 -04:00
|
|
|
|
- Ensure that all .py files in the std library use 4-space indents and
|
|
|
|
|
no hard tabs. This was actually a PEP200 precondition for the
|
|
|
|
|
release of 2.0b1, but got misinterpreted as the weaker condition that
|
|
|
|
|
tabnanny not complain. Tim Peters will do this now, but, since about
|
|
|
|
|
250 files are affected, will wait until after 2.0final is released.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/214557
|
2000-09-15 16:04:01 -04:00
|
|
|
|
|
2000-09-15 22:17:51 -04:00
|
|
|
|
- Extend Windows utime to accept directory paths.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/214245
|
2000-09-15 22:17:51 -04:00
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
- Extend copy.py to module & function types.
|
2000-09-17 08:22:34 -04:00
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/214553
|
2000-09-17 08:22:34 -04:00
|
|
|
|
|
2000-09-18 21:31:30 -04:00
|
|
|
|
- Better checking for bad input to marshal.load*().
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/214754
|
2000-09-18 21:31:30 -04:00
|
|
|
|
|
2000-09-23 00:17:34 -04:00
|
|
|
|
- Generalize eval to accept any mapping objects for locals and globals.
|
2000-09-23 00:40:44 -04:00
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/215126
|
2000-09-23 00:17:34 -04:00
|
|
|
|
|
2000-09-25 11:59:01 -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.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210678
|
2000-09-25 11:59:01 -04:00
|
|
|
|
|
2000-09-25 18:07:45 -04:00
|
|
|
|
- cgi.py's FieldStorage class should be more conservative with
|
|
|
|
|
memory in the face of large binary file uploads.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210674
|
2000-09-25 18:07:45 -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.
|
|
|
|
|
|
2000-11-06 13:49:06 -05:00
|
|
|
|
The second issue was related to the self.lines attribute, which
|
|
|
|
|
was removed in revision 1.56 of cgi.py (see also):
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/219806
|
2000-09-15 22:06:02 -04:00
|
|
|
|
|
2000-10-02 19:04:02 -04:00
|
|
|
|
- urllib should support proxy definitions that contain just the
|
2000-11-14 15:27:54 -05:00
|
|
|
|
host and port
|
2000-10-02 19:04:02 -04:00
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210849
|
2000-10-02 19:04:02 -04:00
|
|
|
|
|
2000-10-03 10:18:13 -04:00
|
|
|
|
- urlparse should be updated to comply with RFC 2396, which
|
|
|
|
|
defines optional parameters for each segment of the page.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210834
|
2000-10-03 10:18:13 -04:00
|
|
|
|
|
2000-10-05 20:10:56 -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.]
|
|
|
|
|
|
2000-10-12 12:13:48 -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!
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/216716
|
2000-10-12 12:13:48 -04:00
|
|
|
|
|
2000-10-25 16:58:27 -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...
|
|
|
|
|
|
2001-08-09 12:53:49 -04:00
|
|
|
|
http://sf.net/patch/?func=detailpatch&patch_id=101527&group_id=5470
|
2000-10-25 16:58:27 -04:00
|
|
|
|
|
2000-11-13 15:21:08 -05:00
|
|
|
|
- Killing a thread from another thread. Or maybe sending a
|
|
|
|
|
signal. Or maybe raising an asynchronous exception.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/221115
|
2000-11-13 15:21:08 -05:00
|
|
|
|
|
2000-12-13 08:36:49 -05:00
|
|
|
|
- The debugger (pdb) should understand packages.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/210631
|
2000-12-13 08:36:49 -05:00
|
|
|
|
|
2001-02-15 08:39:53 -05:00
|
|
|
|
- every built-in function or method (including all core
|
|
|
|
|
extensions) that accepts a string, dict, or list, should also
|
|
|
|
|
accept a UserString, UserDict, or UserList. (The latter two
|
|
|
|
|
should more generally accept all mappings, all sequences.)
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/232493
|
2001-02-15 08:39:53 -05:00
|
|
|
|
|
2001-06-04 14:50:40 -04:00
|
|
|
|
- Fatter math module docs and docstrings.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/426539
|
2001-06-04 14:50:40 -04:00
|
|
|
|
|
2001-09-05 16:18:49 -04:00
|
|
|
|
- Jim Fulton suggested the following:
|
2001-08-09 12:53:49 -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:
|
|
|
|
|
|
2001-09-05 16:18:49 -04:00
|
|
|
|
- The data exceeds some size, or
|
2001-08-09 12:53:49 -04:00
|
|
|
|
|
2001-09-05 16:18:49 -04:00
|
|
|
|
- Somebody asks for a fileno.
|
2001-08-09 12:53:49 -04:00
|
|
|
|
|
|
|
|
|
Then the cgi module (and other apps) could use this thing in a
|
|
|
|
|
uniform way.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/415692
|
2001-08-09 12:53:49 -04:00
|
|
|
|
|
|
|
|
|
- Jim Fulton pointed out that binascii's b2a_base64() function
|
2002-12-17 20:33:24 -05:00
|
|
|
|
has situations where it makes sense not to append a newline,
|
|
|
|
|
or to append something else than a newline.
|
2001-08-09 12:53:49 -04:00
|
|
|
|
|
2001-09-05 16:18:49 -04:00
|
|
|
|
Proposal:
|
2001-08-09 12:53:49 -04:00
|
|
|
|
|
|
|
|
|
- add an optional argument giving the delimiter string to be
|
|
|
|
|
appended, defaulting to "\n"
|
|
|
|
|
|
|
|
|
|
- possibly special-case None as the delimiter string to avoid
|
|
|
|
|
adding the pad bytes too???
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/415694
|
2001-08-09 12:53:49 -04:00
|
|
|
|
|
2000-12-13 08:36:49 -05:00
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
C API wishes
|
2000-09-15 16:04:01 -04:00
|
|
|
|
|
2002-06-10 17:24:27 -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.
|
2000-09-15 16:04:01 -04:00
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
http://www.python.org/sf/210821
|
2000-09-15 16:04:01 -04:00
|
|
|
|
|
2002-06-10 17:24:27 -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.
|
2000-09-16 18:06:27 -04:00
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
- Add unsigneds to ParseTuple/BuildValue (due to David Beazley)
|
|
|
|
|
|
|
|
|
|
Since "integers" can now have arbitrary precision and can
|
|
|
|
|
represent large unsigned values, can you add three new format
|
|
|
|
|
characters to PyArg_ParseTuple() and Py_BuildValue() for the C
|
|
|
|
|
datatypes "unsigned int", "unsigned long", and "unsigned long
|
|
|
|
|
long"?
|
2000-09-16 18:06:27 -04:00
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
The "u" and "l" namespace is a little crowded (and I don't think
|
|
|
|
|
you would want to break that). However, here's one idea:
|
2000-10-06 13:18:55 -04:00
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
'I' - unsigned int (consistent with H and B)
|
|
|
|
|
'p' - unsigned long ('p' is for positive)
|
|
|
|
|
'P' - unsigned long long
|
2000-10-06 13:18:55 -04:00
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
http://www.python.org/sf/454896
|
2000-11-14 15:27:54 -05:00
|
|
|
|
|
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
Tools
|
2001-03-17 14:52:32 -05:00
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
- Python could use a GUI builder.
|
|
|
|
|
|
|
|
|
|
http://www.python.org/sf/210820
|
2000-10-05 11:36:34 -04:00
|
|
|
|
|
|
|
|
|
|
2002-06-10 17:24:27 -04:00
|
|
|
|
Building and Installing
|
2000-10-05 11:36:34 -04:00
|
|
|
|
|
2000-10-07 11:53:43 -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.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/216326
|
2000-10-07 11:53:43 -04:00
|
|
|
|
|
2000-11-13 15:21:08 -05:00
|
|
|
|
- There's a name conflict on case insensitive filesystems (in
|
|
|
|
|
particular Mac OSX) between the directory "Python" and the key
|
|
|
|
|
build target "python". That's currently solved by abusing the
|
|
|
|
|
--with-suffix option, but that's not ideal (since that also
|
|
|
|
|
causes the binary to be *installed* as python.exe). What should
|
|
|
|
|
be the solution?
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/222215
|
2000-11-13 15:21:08 -05:00
|
|
|
|
|
2000-11-29 10:35:24 -05: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 CVS
|
|
|
|
|
or snapshots. Some people find this a problem in unusual build
|
|
|
|
|
environments.
|
|
|
|
|
|
2002-04-02 18:13:08 -05:00
|
|
|
|
http://www.python.org/sf/219221
|
2000-11-29 10:35:24 -05:00
|
|
|
|
|
2000-09-15 14:35:35 -04:00
|
|
|
|
|
|
|
|
|
Local Variables:
|
|
|
|
|
mode: indented-text
|
|
|
|
|
indent-tabs-mode: nil
|
|
|
|
|
End:
|