2007-01-01 19:02:41 -05:00
|
|
|
|
PEP: 3108
|
|
|
|
|
Title: Standard Library Reorganization
|
|
|
|
|
Version: $Revision$
|
|
|
|
|
Last-Modified: $Date$
|
2007-01-02 01:04:25 -05:00
|
|
|
|
Author: Brett Cannon <brett@python.org>
|
2007-01-01 19:02:41 -05:00
|
|
|
|
Status: Draft
|
2007-03-04 14:57:43 -05:00
|
|
|
|
Type: Standards Track
|
2007-01-01 19:02:41 -05:00
|
|
|
|
Content-Type: text/x-rst
|
|
|
|
|
Created: 01-Jan-2007
|
2007-06-19 00:20:07 -04:00
|
|
|
|
Python-Version: 3.0
|
2007-01-01 19:02:41 -05:00
|
|
|
|
Post-History:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Abstract
|
|
|
|
|
========
|
|
|
|
|
|
|
|
|
|
Just like the language itself, Python's standard library (stdlib) has
|
|
|
|
|
grown over the years to be very rich. But over time some modules
|
|
|
|
|
have lost their need to be included with Python. There has also been
|
|
|
|
|
an introduction of a naming convention for modules since Python's
|
|
|
|
|
inception that not all modules follow.
|
|
|
|
|
|
2007-01-02 01:53:47 -05:00
|
|
|
|
Python 3.0 has presented a chance to remove modules that do not have
|
|
|
|
|
long term usefulness. This chance also allows for the renaming of
|
|
|
|
|
modules so that they follow the Python style guide [#pep-0008]_. This
|
|
|
|
|
PEP lists modules that should not be included in Python 3.0 and what
|
|
|
|
|
modules need to be renamed.
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Modules to Remove
|
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
Guido pronounced that "silly old stuff" is to be deleted from the
|
|
|
|
|
stdlib for Py3K [#silly-old-stuff]_. This is open-ended on purpose.
|
|
|
|
|
Each module to be removed needs to have a justification as to why it
|
|
|
|
|
should no longer be distributed with Python. This can range from the
|
|
|
|
|
module being deprecated in Python 2.x to being for a platform that is
|
|
|
|
|
no longer widely used.
|
|
|
|
|
|
|
|
|
|
This section of the PEP lists the various modules to be removed. Each
|
|
|
|
|
subsection represents a different reason for modules to be
|
|
|
|
|
removed. Each module must have a specific justification on top of
|
|
|
|
|
being listed in a specific subsection so as to make sure only modules
|
|
|
|
|
that truly deserve to be removed are in fact removed.
|
|
|
|
|
|
|
|
|
|
When a reason mentions how long it has been since a module has been
|
|
|
|
|
"uniquely edited", it is in reference to how long it has been since a
|
|
|
|
|
checkin was done specifically for the module and not for a change that
|
|
|
|
|
applied universally across the entire stdlib. If an edit time is not
|
|
|
|
|
denoted as "unique" then it is the last time the file was edited,
|
|
|
|
|
period.
|
|
|
|
|
|
2007-05-14 16:06:30 -04:00
|
|
|
|
The procedure to thoroughly remove a module is:
|
|
|
|
|
|
|
|
|
|
#. Remove the module.
|
|
|
|
|
#. Remove the tests.
|
2007-05-16 00:02:15 -04:00
|
|
|
|
#. Edit ``Modules/Setup.dist`` and ``setup.py`` if needed.
|
2007-05-14 16:06:30 -04:00
|
|
|
|
#. Change all references to the removed module in the standard
|
|
|
|
|
library.
|
|
|
|
|
#. Remove the docs.
|
|
|
|
|
#. Delete the reference to the removed docs in ``Doc/Makefile.deps``
|
|
|
|
|
and ``Doc/lib/lib.tex``.
|
2007-05-17 17:52:13 -04:00
|
|
|
|
#. If possible, build the docs. (cd Doc ; make)
|
2007-05-14 16:06:30 -04:00
|
|
|
|
#. Run the regression test suite; watch out for tests that are skipped
|
|
|
|
|
because an import failed for the removed module.
|
|
|
|
|
|
2007-05-17 17:52:13 -04:00
|
|
|
|
If a deprecation warning is added to 2.6, it would be better to make
|
|
|
|
|
all the changes to 2.6, merge the changes into the 3k branch, then
|
|
|
|
|
perform the procedure above. This will avoid some merge conflicts.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
Previously deprecated
|
|
|
|
|
---------------------
|
|
|
|
|
|
2007-01-10 14:30:05 -05:00
|
|
|
|
PEP 4 lists all modules that have been deprecated in the stdlib
|
|
|
|
|
[#pep-0004]_. All modules listed in the PEP at the time of the first
|
|
|
|
|
alpha release of Python 3.0 will be removed.
|
|
|
|
|
|
2007-05-16 00:31:51 -04:00
|
|
|
|
The entire contents of lib-old will also be removed. These modules
|
2007-01-10 14:30:05 -05:00
|
|
|
|
have already been removed from being imported but are kept in the
|
|
|
|
|
distribution for Python for users that rely upon the code.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
Platform-specific with minimal use
|
|
|
|
|
----------------------------------
|
|
|
|
|
|
|
|
|
|
Python supports many platforms, some of which are not widely held.
|
|
|
|
|
And on some of these platforms there are modules that have limited use
|
|
|
|
|
to people on those platforms. Because of their limited usefulness it
|
|
|
|
|
would be better to no longer burden the Python development team with
|
|
|
|
|
their maintenance.
|
|
|
|
|
|
|
|
|
|
* IRIX (which is no longer produced [#irix-retirement]_)
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
+ AL/al [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
- Provides sound support on Indy and Indigo workstations.
|
|
|
|
|
- Both workstations are no longer available.
|
|
|
|
|
- Code has not been uniquely edited in three years.
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
+ cd [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
- CD drive control for SGI systems.
|
|
|
|
|
- SGI no longer sells machines with IRIX on them.
|
|
|
|
|
- Code has not been uniquely edited in 14 years.
|
|
|
|
|
|
2007-08-03 01:24:40 -04:00
|
|
|
|
+ cl [done]
|
|
|
|
|
|
|
|
|
|
- Compression library for SGI systems.
|
|
|
|
|
- SGI no longer sells machines with IRIX on them.
|
|
|
|
|
- Code has not been uniquely edited in 14 years.
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
+ DEVICE/GL/gl/cgen/cgensuport [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
- OpenGL access.
|
|
|
|
|
- Has not been edited in at least eight years.
|
|
|
|
|
- Third-party libraries provide better support (PyOpenGL [#pyopengl]_).
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
+ FL/fl/flp [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
- Wrapper for the FORMS library [#irix-forms]_
|
|
|
|
|
- FORMS has not been edited in 12 years.
|
|
|
|
|
- Library is not widely used.
|
|
|
|
|
- First eight hits on Google are for Python docs for fl.
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
+ fm [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
- Wrapper to the IRIS Font Manager library.
|
|
|
|
|
- Only available on SGI machines which no longer come with IRIX.
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
+ imgfile [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
- Wrapper for SGI libimage library for imglib image files
|
|
|
|
|
(``.rgb`` files).
|
|
|
|
|
- Python Imaging Library provdes read-only support [#pil]_.
|
|
|
|
|
- Not uniquely edited in 13 years.
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
+ jpeg [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
- Wrapper for JPEG (de)compressor.
|
|
|
|
|
- Code not uniquely edited in nine years.
|
|
|
|
|
- Third-party libraries provide better support
|
|
|
|
|
(Python Imaging Library [#pil]_).
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* Solaris
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
2007-08-03 01:24:40 -04:00
|
|
|
|
+ SUNAUDIODEV/sunaudiodev [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
- Access to the sound card on Sun machines.
|
|
|
|
|
- Code not uniquely edited in over eight years.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* Mac
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
2007-01-03 17:00:02 -05:00
|
|
|
|
+ aetools/aepack/aetypes/MiniAEFrame
|
|
|
|
|
|
|
|
|
|
- OSA support is better through third-party modules.
|
|
|
|
|
|
2007-01-05 01:00:48 -05:00
|
|
|
|
* Appscript [#appscript]_.
|
2007-01-03 17:00:02 -05:00
|
|
|
|
|
|
|
|
|
- Hard-coded endianness which breaks on Intel Macs.
|
2007-01-04 19:08:12 -05:00
|
|
|
|
- Might need to rename if Carbon package dependent.
|
2007-01-03 17:00:02 -05:00
|
|
|
|
|
2007-01-02 01:53:47 -05:00
|
|
|
|
+ applesingle
|
|
|
|
|
|
|
|
|
|
- Undocumented.
|
|
|
|
|
- AppleSingle is a binary file format for A/UX.
|
|
|
|
|
- A/UX no longer distributed.
|
|
|
|
|
|
2007-01-03 17:59:32 -05:00
|
|
|
|
+ autoGIL
|
|
|
|
|
|
|
|
|
|
- Very bad model for using Python with the CFRunLoop.
|
|
|
|
|
- Rename to _autogil if needed by Carbon package.
|
|
|
|
|
|
2007-01-04 13:54:34 -05:00
|
|
|
|
+ Carbon.CF
|
|
|
|
|
|
|
|
|
|
- Half-heared attempt.
|
|
|
|
|
|
2007-01-04 19:08:12 -05:00
|
|
|
|
+ findertools
|
|
|
|
|
|
|
|
|
|
- No longer useful.
|
|
|
|
|
|
2007-01-03 17:00:02 -05:00
|
|
|
|
+ FrameWork
|
|
|
|
|
|
|
|
|
|
- Poorly documented.
|
|
|
|
|
- Not updated to support Carbon Events.
|
|
|
|
|
|
2007-12-14 17:48:09 -05:00
|
|
|
|
+ icopen
|
2007-01-04 19:08:12 -05:00
|
|
|
|
|
2007-12-14 17:48:09 -05:00
|
|
|
|
- Not needed on OS X.
|
|
|
|
|
- Meant to replace 'open' which is usually a bad thing to do.
|
2007-01-04 13:54:34 -05:00
|
|
|
|
|
2007-12-14 17:48:09 -05:00
|
|
|
|
+ videoreader
|
2007-01-04 13:54:34 -05:00
|
|
|
|
|
2007-12-14 17:48:09 -05:00
|
|
|
|
- No longer used.
|
2007-01-04 19:08:12 -05:00
|
|
|
|
|
2007-12-14 17:48:09 -05:00
|
|
|
|
+ W
|
2007-01-04 13:54:34 -05:00
|
|
|
|
|
2007-12-14 17:48:09 -05:00
|
|
|
|
- No longer distributed with Python.
|
2007-01-04 13:54:34 -05:00
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2007-01-05 15:23:56 -05:00
|
|
|
|
Hardly used
|
|
|
|
|
------------
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2007-01-05 15:23:56 -05:00
|
|
|
|
Some modules that are platform-independent are hardly used. This
|
2007-01-01 19:02:41 -05:00
|
|
|
|
can be from how easy it is to implement the functionality from scratch
|
2007-01-05 15:23:56 -05:00
|
|
|
|
or because the audience for the code is very small.
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2007-08-03 01:24:40 -04:00
|
|
|
|
* audiodev [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Undocumented.
|
|
|
|
|
+ Not edited in five years.
|
|
|
|
|
+ If removed sunaudio should go as well (also undocumented; not
|
|
|
|
|
edited in over seven years).
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* imputil
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Undocumented.
|
|
|
|
|
+ Never updated to support absolute imports.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* mutex
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Easy to implement using a semaphore and a queue.
|
|
|
|
|
+ Cannot block on a lock attempt.
|
|
|
|
|
+ Not uniquely edited since its addition 15 years ago.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* repr
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Controls output of the repr of objects.
|
|
|
|
|
+ String slicing and string interpolation can do similar work.
|
|
|
|
|
+ Used by pdb, but do not need to expose API.
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
* stringold [done]
|
2007-01-10 14:30:05 -05:00
|
|
|
|
|
|
|
|
|
+ Function versions of the methods on string objects.
|
|
|
|
|
+ Obsolete since Python 1.6.
|
|
|
|
|
+ Any functionality not in the string object or module will be moved
|
|
|
|
|
to the string module (mostly constants).
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* symtable/_symtable
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Undocumented.
|
|
|
|
|
|
2007-08-03 01:24:40 -04:00
|
|
|
|
* toaiff [done, moved to Demo]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Undocumented.
|
|
|
|
|
+ Requires ``sox`` library to be installed on the system.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* user
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Easily handled by allowing the application specify its own
|
|
|
|
|
module name, check for existence, and import if found.
|
|
|
|
|
|
2007-12-14 18:59:22 -05:00
|
|
|
|
* new [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Just a rebinding of names from the 'types' module.
|
|
|
|
|
+ Can also call ``type`` built-in to get most types easily.
|
2007-01-10 14:30:05 -05:00
|
|
|
|
+ Docstring states the module is no longer useful as of revision
|
|
|
|
|
27241 (2002-06-15).
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
2007-05-16 00:06:53 -04:00
|
|
|
|
* pure [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Written before Pure Atria was bought by Rational which was then
|
|
|
|
|
bought by IBM (in other words, very old).
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
Obsolete
|
|
|
|
|
--------
|
|
|
|
|
|
|
|
|
|
Becoming obsolete signifies that either another module in the stdlib
|
|
|
|
|
or a widely distributed third-party library provides a better solution
|
|
|
|
|
for what the module is meant for.
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
* Bastion/rexec [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Restricted execution / security.
|
|
|
|
|
+ Turned off in Python 2.3.
|
|
|
|
|
+ Modules deemed unsafe.
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
* bsddb185 [done]
|
2007-04-29 16:03:44 -04:00
|
|
|
|
|
|
|
|
|
+ Superceded by bsddb3
|
|
|
|
|
+ Not built by default.
|
|
|
|
|
+ Documentation specifies that the "module should never be used
|
|
|
|
|
directly in new code".
|
|
|
|
|
|
2007-05-13 20:55:29 -04:00
|
|
|
|
* commands [only getstatus(), does whole module go?]/popen2 [done]
|
2007-01-03 15:16:24 -05:00
|
|
|
|
|
|
|
|
|
+ subprocess module replaces them [#pep-0324]_.
|
|
|
|
|
|
2007-05-14 17:12:58 -04:00
|
|
|
|
* compiler (need to add AST -> bytecode mechanism) [done - removal]
|
2007-05-14 16:18:53 -04:00
|
|
|
|
|
|
|
|
|
+ Having to maintain both the built-in compiler and the stdlib
|
|
|
|
|
package is redundant [#ast-removal]_.
|
|
|
|
|
+ The AST created by the compiler is available [#ast]_.
|
|
|
|
|
+ Mechanism to compile from an AST needs to be added.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* dl
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ ctypes provides better support for same functionality.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* fpformat
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ All functionality is supported by string interpolation.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* ihooks
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
2007-01-06 15:54:39 -05:00
|
|
|
|
+ Undocumented.
|
2007-01-02 01:53:47 -05:00
|
|
|
|
+ For use with rexec which has been turned off since Python 2.3.
|
|
|
|
|
|
2007-05-20 03:32:18 -04:00
|
|
|
|
* imageop [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Better support by third-party libraries
|
|
|
|
|
(Python Imaging Library [#pil]_).
|
2007-05-20 03:13:46 -04:00
|
|
|
|
+ Unit tests relied on rgbimg and imgfile.
|
|
|
|
|
- rgbimg was removed in Python 2.6.
|
|
|
|
|
- imgfile slated for removal in this PEP. [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
2007-10-05 01:39:45 -04:00
|
|
|
|
* linuxaudiodev [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Replaced by ossaudiodev.
|
|
|
|
|
|
2008-01-17 17:44:16 -05:00
|
|
|
|
* sched
|
|
|
|
|
|
|
|
|
|
+ Replaced by threading.Timer.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* stat
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ ``os.stat`` now returns a tuple with attributes.
|
2007-01-02 18:23:15 -05:00
|
|
|
|
+ Functions in the module should be made into methods for the object
|
|
|
|
|
returned by os.stat.
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* statvfs
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ ``os.statvfs`` now returns a tuple with attributes.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* thread
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ People should use 'threading' instead.
|
|
|
|
|
|
|
|
|
|
- Rename 'thread' to _thread.
|
2007-01-05 16:41:45 -05:00
|
|
|
|
- Deprecate dummy_thread and rename _dummy_thread.
|
|
|
|
|
- Move thread.get_ident over to threading.
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Guido has previously supported the deprecation
|
|
|
|
|
[#thread-deprecation]_.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
Modules to Rename
|
|
|
|
|
=================
|
|
|
|
|
|
|
|
|
|
Along with the stdlib gaining some modules that are no longer
|
|
|
|
|
relevant, there is also the issue of naming. Many modules existed in
|
|
|
|
|
the stdlib before PEP 8 came into existence [#pep-0008]_. This has
|
2008-01-21 17:18:06 -05:00
|
|
|
|
led to some naming inconsistencies and namespace bloat that should be
|
|
|
|
|
addressed.
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
Any module that has been suggested for removal and does not meet the
|
|
|
|
|
required naming scheme is *not* listed below.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PEP 8 violations
|
|
|
|
|
----------------
|
|
|
|
|
|
2007-01-05 15:23:56 -05:00
|
|
|
|
PEP 8 specifies that modules "should have short, all-lowercase names"
|
|
|
|
|
where "underscores can be used ... if it improves readability"
|
|
|
|
|
[#pep-0008]_. The use of underscores is discouraged in package names.
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2007-01-02 01:53:47 -05:00
|
|
|
|
================== ==================================================
|
|
|
|
|
Current Name Replacement Name
|
|
|
|
|
================== ==================================================
|
|
|
|
|
_winreg winreg (rename also because module has a public
|
2007-01-05 15:23:56 -05:00
|
|
|
|
interface and thus should not have a leading
|
|
|
|
|
underscore)
|
2007-01-02 01:53:47 -05:00
|
|
|
|
Carbon carbon
|
|
|
|
|
ColorPicker colorpicker
|
|
|
|
|
ConfigParser configparser
|
|
|
|
|
Cookie cookie
|
|
|
|
|
copy_reg copyreg
|
|
|
|
|
EasyDialogs easydialogs
|
|
|
|
|
HTMLParser htmlparser
|
|
|
|
|
MacOS macos
|
|
|
|
|
Nav nav
|
2007-01-05 15:23:56 -05:00
|
|
|
|
PixMapWrapper pixmap_wrapper
|
2007-01-02 01:53:47 -05:00
|
|
|
|
Queue queue
|
|
|
|
|
ScrolledText scrolledtext
|
|
|
|
|
SocketServer socketserver
|
|
|
|
|
Tix tix
|
|
|
|
|
Tkinter tkinter
|
|
|
|
|
UserDict userdict
|
|
|
|
|
UserList userlist
|
|
|
|
|
UserString userstring
|
|
|
|
|
================== ==================================================
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Merging C and Python implementations of the same interface
|
|
|
|
|
----------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Several interfaces have both a Python and C implementation. While it
|
|
|
|
|
is great to have a C implementation for speed with a Python
|
|
|
|
|
implementation as fallback, there is no need to expose the two
|
|
|
|
|
implementations independently in the stdlib. For Python 3.0 all
|
|
|
|
|
interfaces with two implementations will be merged into a single
|
|
|
|
|
public interface.
|
|
|
|
|
|
|
|
|
|
The C module is to be given a leading underscore to delineate the fact
|
|
|
|
|
that it is not the reference implementation (the Python implementation
|
|
|
|
|
is). This means that any semantic difference between the C and Python
|
|
|
|
|
versions must be dealt with before Python 3.0 or else the C
|
|
|
|
|
implementation will be removed until it can be fixed.
|
|
|
|
|
|
|
|
|
|
One interface that is not listed below is xml.etree.ElementTree. This
|
|
|
|
|
is an externally maintained module and thus is not under the direct
|
|
|
|
|
control of the Python development team for renaming. See `Open
|
|
|
|
|
Issues`_ for a discussion on this.
|
|
|
|
|
|
|
|
|
|
* pickle/cPickle
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Rename cPickle to _pickle.
|
|
|
|
|
+ Semantic completeness of C implementation *not* verified.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
* profile/cProfile
|
2007-01-02 01:53:47 -05:00
|
|
|
|
|
|
|
|
|
+ Rename cProfile to _profile.
|
|
|
|
|
+ Semantic completeness of C implementation *not* verified.
|
|
|
|
|
|
2007-12-14 19:36:23 -05:00
|
|
|
|
* StringIO/cStringIO [done]
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2007-12-14 19:36:23 -05:00
|
|
|
|
+ Added to the 'io' module as stringio.
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2008-02-03 18:11:38 -05:00
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
No public, documented interface
|
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
|
|
There are several modules in the stdlib that have no defined public
|
|
|
|
|
interface. These modules exist as support code for other modules that
|
|
|
|
|
are exposed. Because they are not meant to be used directly they
|
|
|
|
|
should be renamed to reflect this fact.
|
|
|
|
|
|
2007-01-02 01:53:47 -05:00
|
|
|
|
============ ===============================
|
|
|
|
|
Current Name Replacement Name
|
|
|
|
|
============ ===============================
|
|
|
|
|
bdb _bdb
|
2007-12-07 06:11:14 -05:00
|
|
|
|
markupbase _markupbase [done]
|
2007-01-02 01:53:47 -05:00
|
|
|
|
opcode _opcode
|
2008-02-03 18:11:38 -05:00
|
|
|
|
dummy_thread _dummy_thread [#]_
|
2007-01-02 01:53:47 -05:00
|
|
|
|
============ ===============================
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2008-02-03 18:11:38 -05:00
|
|
|
|
.. [#] Assumes ``thread`` is renamed to ``_thread``.
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2007-03-12 22:03:26 -04:00
|
|
|
|
Poorly chosen names
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
A few modules have names that were poorly chosen in hindsight. They
|
|
|
|
|
should be renamed so as to prevent their bad name from perpetuating
|
|
|
|
|
beyond the 2.x series.
|
|
|
|
|
|
|
|
|
|
================= ===============================
|
|
|
|
|
Current Name Replacement Name
|
|
|
|
|
================= ===============================
|
|
|
|
|
test.test_support test.support
|
|
|
|
|
================= ===============================
|
|
|
|
|
|
|
|
|
|
|
2008-01-21 17:18:06 -05:00
|
|
|
|
Grouping of modules
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
As the stdlib has grown, several areas within it have expanded to
|
|
|
|
|
include multiple modules (e.g., dbm support). Thus some new packages
|
|
|
|
|
make sense where the renaming makes a module's name easier to work
|
|
|
|
|
with.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dbm package
|
|
|
|
|
///////////
|
|
|
|
|
|
|
|
|
|
================= ===============================
|
|
|
|
|
Current Name Replacement Name
|
|
|
|
|
================= ===============================
|
2008-01-29 18:44:20 -05:00
|
|
|
|
anydbm dbm.tools [1]_
|
2008-01-21 17:18:06 -05:00
|
|
|
|
dbhash dbm.db
|
|
|
|
|
dbm dbm.ndbm
|
|
|
|
|
dumbdm dbm.dumb
|
|
|
|
|
gdbm dbm.gnu
|
2008-01-29 18:44:20 -05:00
|
|
|
|
whichdb dbm.tools [1]_
|
2008-01-21 17:18:06 -05:00
|
|
|
|
================= ===============================
|
|
|
|
|
|
|
|
|
|
|
2008-01-29 18:44:20 -05:00
|
|
|
|
.. [1] ``dbm.tools`` can combine ``anybdbm`` and ``whichdb`` since the public
|
|
|
|
|
API for both modules has no name conflict.
|
|
|
|
|
|
|
|
|
|
|
2008-02-03 18:11:38 -05:00
|
|
|
|
http package
|
|
|
|
|
////////////
|
|
|
|
|
|
|
|
|
|
================= ===============================
|
|
|
|
|
Current Name Replacement Name
|
|
|
|
|
================= ===============================
|
2008-02-05 15:13:45 -05:00
|
|
|
|
httplib http.client
|
2008-02-03 18:11:38 -05:00
|
|
|
|
BaseHTTPServer http.server [2]_
|
|
|
|
|
CGIHTTPServer http.server [2]_
|
|
|
|
|
SimpleHTTPServer http.server [2]_
|
|
|
|
|
================= ===============================
|
|
|
|
|
|
|
|
|
|
.. [2] The ``http.server`` module can combine the specified modules
|
|
|
|
|
safely as they have no naming conflicts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xmlrpc package
|
|
|
|
|
//////////////
|
|
|
|
|
|
|
|
|
|
================== ===============================
|
|
|
|
|
Current Name Replacement Name
|
|
|
|
|
================== ===============================
|
2008-02-05 15:13:45 -05:00
|
|
|
|
xmlrpclib xmlrpc.client
|
2008-02-03 18:11:38 -05:00
|
|
|
|
SimpleXMLRPCServer xmlrpc.server [3]_
|
|
|
|
|
CGIXMLRPCServer xmlrpc.server [3]_
|
|
|
|
|
================== ===============================
|
|
|
|
|
|
|
|
|
|
.. [3] The modules being combined into ``xmlrpc.server`` have no
|
|
|
|
|
naming conflicts and thus can safely be merged.
|
|
|
|
|
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
Transition Plan
|
|
|
|
|
===============
|
|
|
|
|
|
|
|
|
|
For modules to be removed
|
|
|
|
|
-------------------------
|
|
|
|
|
|
2007-01-12 16:57:29 -05:00
|
|
|
|
For the removal of modules that are continuing to exist in the Python
|
|
|
|
|
2.x series (i.e., not deprecated explicitly in the 2.x series), a
|
|
|
|
|
proper warning will be set that is silenced by default;
|
|
|
|
|
PendingDeprecationWarning initially, moving over to a Py3K-specific
|
|
|
|
|
warning later if one comes into existence.
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
|
2007-01-12 16:57:29 -05:00
|
|
|
|
Renaming of modules
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
For modules that are renamed, stub modules will be created with the
|
|
|
|
|
original names and be kept in a package within the stdlib. The need
|
|
|
|
|
to keep them within a package is to prevent naming conflicts
|
|
|
|
|
with case-insensitive filesystems.
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2007-01-12 16:57:29 -05:00
|
|
|
|
These stub modules will import the module code based on the new
|
|
|
|
|
naming. The same type of warning being raised by modules being
|
|
|
|
|
removed will be raised in the stub modules.
|
|
|
|
|
|
|
|
|
|
Support in the 2to3 refactoring tool for renames will also be used
|
|
|
|
|
[#2to3]_. Import statements will be rewritten so that only the import
|
|
|
|
|
statement and none of the rest of the code needs to be touched. This
|
2008-02-03 17:57:08 -05:00
|
|
|
|
will be accomplished by using the ``as`` keyword in import statements
|
2007-01-12 16:57:29 -05:00
|
|
|
|
to bind in the module namespace to the old name while importing based
|
|
|
|
|
on the new name.
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Open Issues
|
|
|
|
|
===========
|
|
|
|
|
|
|
|
|
|
Renaming of modules maintained outside of the stdlib
|
|
|
|
|
----------------------------------------------------
|
|
|
|
|
|
|
|
|
|
xml.etree.ElementTree not only does not meet PEP 8 naming standards
|
|
|
|
|
but it also has an exposed C implementation [#pep-0008]_. It is an
|
|
|
|
|
externally maintained package, though [#pep-0360]_. A request will be
|
|
|
|
|
made for the maintainer to change the name so that it matches PEP 8
|
|
|
|
|
and hides the C implementation.
|
|
|
|
|
|
|
|
|
|
|
2007-01-02 18:18:36 -05:00
|
|
|
|
Rejected Ideas
|
|
|
|
|
==============
|
|
|
|
|
|
2007-01-12 16:57:29 -05:00
|
|
|
|
Modules that were originally suggested for removal
|
|
|
|
|
--------------------------------------------------
|
2007-01-02 18:37:20 -05:00
|
|
|
|
|
2007-01-02 18:45:12 -05:00
|
|
|
|
* asynchat/asyncore
|
|
|
|
|
|
2007-01-12 16:57:29 -05:00
|
|
|
|
+ Josiah Carlson has said he will maintain the modules.
|
2007-01-02 18:45:12 -05:00
|
|
|
|
|
2007-01-03 15:12:09 -05:00
|
|
|
|
* base64/quopri/uu
|
|
|
|
|
|
|
|
|
|
+ All still widely used.
|
|
|
|
|
+ 'codecs' module does not provide as nice of an API for basic
|
|
|
|
|
usage.
|
|
|
|
|
|
2007-01-02 18:37:20 -05:00
|
|
|
|
* fileinput
|
|
|
|
|
|
2007-01-02 20:02:09 -05:00
|
|
|
|
+ Useful when having to work with stdin.
|
2007-01-02 18:18:36 -05:00
|
|
|
|
|
2007-01-03 02:39:03 -05:00
|
|
|
|
* nis
|
|
|
|
|
|
|
|
|
|
+ Testimonials from people that new installations of NIS are still
|
2007-01-12 16:57:29 -05:00
|
|
|
|
occurring
|
2007-01-03 02:39:03 -05:00
|
|
|
|
|
2007-12-06 14:11:29 -05:00
|
|
|
|
* getopt
|
|
|
|
|
|
|
|
|
|
+ Simpler than optparse.
|
|
|
|
|
|
2007-01-02 18:18:36 -05:00
|
|
|
|
* telnetlib
|
|
|
|
|
|
2007-01-02 20:02:09 -05:00
|
|
|
|
+ Really handy for quick-and-dirty remote access.
|
2007-01-12 16:57:29 -05:00
|
|
|
|
+ Some hardware supports using telnet for configuration and
|
|
|
|
|
querying.
|
2007-01-02 18:18:36 -05:00
|
|
|
|
|
|
|
|
|
|
2007-01-02 19:42:29 -05:00
|
|
|
|
Introducing a new top-level package
|
|
|
|
|
-----------------------------------
|
|
|
|
|
|
|
|
|
|
It has been suggested that the entire stdlib be placed within its own
|
|
|
|
|
package. This PEP will not address this issue as it has its own
|
|
|
|
|
design issues (naming, does it deserve special consideration in import
|
|
|
|
|
semantics, etc.). Everything within this PEP can easily be handled if
|
|
|
|
|
a new top-level package is introduced.
|
|
|
|
|
|
|
|
|
|
|
2007-01-13 14:24:12 -05:00
|
|
|
|
Introducing new packages to contain theme-related modules
|
|
|
|
|
---------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
During the writing of this PEP it was noticed that certain themes
|
|
|
|
|
appeared in the stdlib. In the past people have suggested introducing
|
|
|
|
|
new packages to help collect modules that share a similar theme (e.g.,
|
|
|
|
|
audio). An Open Issue was created to suggest some new packages to
|
|
|
|
|
introduce.
|
|
|
|
|
|
|
|
|
|
In the end, though, not enough support could be pulled together to
|
2008-02-03 17:57:08 -05:00
|
|
|
|
warrant moving forward with the idea. Instead name simplification has
|
|
|
|
|
been chosen as the guiding force for PEPs to create.
|
2007-01-13 14:24:12 -05:00
|
|
|
|
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
References
|
|
|
|
|
==========
|
|
|
|
|
|
|
|
|
|
.. [#pep-0004] PEP 4: Deprecation of Standard Modules
|
2007-01-02 19:54:06 -05:00
|
|
|
|
(http://www.python.org/dev/peps/pep-0004/)
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
.. [#pep-0008] PEP 8: Style Guide for Python Code
|
2007-01-02 19:54:06 -05:00
|
|
|
|
(http://www.python.org/dev/peps/pep-0008/)
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
2007-01-03 15:16:24 -05:00
|
|
|
|
.. [#pep-0324] PEP 324: subprocess -- New process module
|
|
|
|
|
(http://www.python.org/dev/peps/pep-0324/)
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
.. [#pep-0360] PEP 360: Externally Maintained Packages
|
2007-01-03 00:05:32 -05:00
|
|
|
|
(http://www.python.org/dev/peps/pep-0360/)
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
.. [#module-index] Python Documentation: Global Module Index
|
|
|
|
|
(http://docs.python.org/modindex.html)
|
|
|
|
|
|
|
|
|
|
.. [#timing-module] Python Library Reference: Obsolete
|
|
|
|
|
(http://docs.python.org/lib/obsolete-modules.html)
|
|
|
|
|
|
|
|
|
|
.. [#silly-old-stuff] Python-Dev email: "Py3k release schedule worries"
|
|
|
|
|
(http://mail.python.org/pipermail/python-3000/2006-December/005130.html)
|
|
|
|
|
|
|
|
|
|
.. [#thread-deprecation] Python-Dev email: Autoloading?
|
|
|
|
|
(http://mail.python.org/pipermail/python-dev/2005-October/057244.html)
|
|
|
|
|
|
|
|
|
|
.. [#py-dev-summary-2004-11-01] Python-Dev Summary: 2004-11-01
|
|
|
|
|
(http://www.python.org/dev/summary/2004-11-01_2004-11-15/#id10)
|
|
|
|
|
|
2007-01-12 16:57:29 -05:00
|
|
|
|
.. [#2to3] 2to3 refactoring tool
|
|
|
|
|
(http://svn.python.org/view/sandbox/trunk/2to3/)
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
.. [#pyopengl] PyOpenGL
|
|
|
|
|
(http://pyopengl.sourceforge.net/)
|
|
|
|
|
|
|
|
|
|
.. [#pil] Python Imaging Library (PIL)
|
|
|
|
|
(http://www.pythonware.com/products/pil/)
|
|
|
|
|
|
|
|
|
|
.. [#twisted] Twisted
|
|
|
|
|
(http://twistedmatrix.com/trac/)
|
|
|
|
|
|
|
|
|
|
.. [#irix-retirement] SGI Press Release:
|
|
|
|
|
End of General Availability for MIPS IRIX Products -- December 2006
|
|
|
|
|
(http://www.sgi.com/support/mips_irix.html)
|
|
|
|
|
|
|
|
|
|
.. [#irix-forms] FORMS Library by Mark Overmars
|
|
|
|
|
(ftp://ftp.cs.ruu.nl/pub/SGI/FORMS)
|
|
|
|
|
|
|
|
|
|
.. [#sun-au] Wikipedia: Au file format
|
|
|
|
|
(http://en.wikipedia.org/wiki/Au_file_format)
|
|
|
|
|
|
2007-01-05 01:00:48 -05:00
|
|
|
|
.. [#appscript] appscript
|
|
|
|
|
(http://appscript.sourceforge.net/)
|
|
|
|
|
|
2007-05-14 16:18:53 -04:00
|
|
|
|
.. [#ast] _ast module
|
|
|
|
|
(http://docs.python.org/lib/ast.html)
|
|
|
|
|
|
|
|
|
|
.. [#ast-removal] python-dev email: getting compiler package failures
|
|
|
|
|
(http://mail.python.org/pipermail/python-3000/2007-May/007615.html)
|
|
|
|
|
|
2007-01-01 19:02:41 -05:00
|
|
|
|
|
|
|
|
|
Copyright
|
|
|
|
|
=========
|
|
|
|
|
|
|
|
|
|
This document has been placed in the public domain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
..
|
|
|
|
|
Local Variables:
|
|
|
|
|
mode: indented-text
|
|
|
|
|
indent-tabs-mode: nil
|
|
|
|
|
sentence-end-double-space: t
|
|
|
|
|
fill-column: 70
|
|
|
|
|
coding: utf-8
|
|
|
|
|
End:
|