PEP 4: convert to reST, update SourceForge -> bugs.python.org, update DeprecationWarning policy
and add removal of code using the module. Closes #8090.
This commit is contained in:
parent
b6e2ec03f3
commit
2679eb0c91
141
pep-0004.txt
141
pep-0004.txt
|
@ -5,90 +5,99 @@ Last-Modified: $Date$
|
||||||
Author: Martin von Löwis <martin@v.loewis.de>
|
Author: Martin von Löwis <martin@v.loewis.de>
|
||||||
Status: Active
|
Status: Active
|
||||||
Type: Process
|
Type: Process
|
||||||
|
Content-Type: text/x-rst
|
||||||
Created: 1-Oct-2000
|
Created: 1-Oct-2000
|
||||||
Post-History:
|
Post-History:
|
||||||
|
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
|
============
|
||||||
|
|
||||||
When new modules were added to the standard Python library in the
|
When new modules were added to the standard Python library in the
|
||||||
past, it was not possible to foresee whether they would still be
|
past, it was not possible to foresee whether they would still be
|
||||||
useful in the future. Even though Python "Comes With Batteries
|
useful in the future. Even though Python "Comes With Batteries
|
||||||
Included", batteries may discharge over time. Carrying old
|
Included", batteries may discharge over time. Carrying old modules
|
||||||
modules around is a burden on the maintainer, especially when
|
around is a burden on the maintainer, especially when there is no
|
||||||
there is no interest in the module anymore.
|
interest in the module anymore.
|
||||||
|
|
||||||
At the same time, removing a module from the distribution is
|
At the same time, removing a module from the distribution is
|
||||||
difficult, as it is not known in general whether anybody is still
|
difficult, as it is not known in general whether anybody is still
|
||||||
using it. This PEP defines a procedure for removing modules from
|
using it. This PEP defines a procedure for removing modules from the
|
||||||
the standard Python library. Usage of a module may be
|
standard Python library. Usage of a module may be 'deprecated', which
|
||||||
`deprecated', which means that it may be removed from a future
|
means that it may be removed from a future Python release. The
|
||||||
Python release. The rationale for deprecating a module is also
|
rationale for deprecating a module is also collected in this PEP. If
|
||||||
collected in this PEP. If the rationale turns out faulty, the
|
the rationale turns out faulty, the module may become 'undeprecated'.
|
||||||
module may become `undeprecated'.
|
|
||||||
|
|
||||||
|
|
||||||
Procedure for declaring a module deprecated
|
Procedure for declaring a module deprecated
|
||||||
|
===========================================
|
||||||
|
|
||||||
Since the status of module deprecation is recorded in this PEP,
|
Since the status of module deprecation is recorded in this PEP,
|
||||||
proposals for deprecating modules MUST be made by providing a
|
proposals for deprecating modules MUST be made by providing a change
|
||||||
change to the text of this PEP, which SHOULD be a patch posted to
|
to the text of this PEP, which SHOULD be a patch posted to
|
||||||
SourceForge, or sent by mail to the author of this PEP.
|
bugs.python.org.
|
||||||
|
|
||||||
A proposal for deprecation of the module MUST include the date of
|
A proposal for deprecation of the module MUST include the date of the
|
||||||
the proposed deprecation and a rationale for deprecating it. In
|
proposed deprecation and a rationale for deprecating it. In addition,
|
||||||
addition, the proposal MUST include a change to the documentation
|
the proposal MUST include a change to the documentation of the module;
|
||||||
of the module; deprecation is indicated by saying that the module
|
deprecation is indicated by saying that the module is "obsolete" or
|
||||||
is "obsolete" or "deprecated". The proposal MAY include a patch
|
"deprecated". The proposal SHOULD include a patch for the module's
|
||||||
for the module's source code to indicate deprecation there as
|
source code to indicate deprecation there as well, by raising a
|
||||||
well.
|
DeprecationWarning. The proposal MUST include patches to remove any
|
||||||
|
use of the deprecated module from the standard library.
|
||||||
|
|
||||||
It is expected that deprecated modules are included in the Python
|
It is expected that deprecated modules are included in the Python
|
||||||
releases that immediately follows the deprecation; later releases
|
releases that immediately follows the deprecation; later releases may
|
||||||
may ship without the deprecated modules.
|
ship without the deprecated modules.
|
||||||
|
|
||||||
|
|
||||||
Procedure for declaring a module undeprecated
|
Procedure for declaring a module undeprecated
|
||||||
|
=============================================
|
||||||
|
|
||||||
When a module becomes deprecated, a rationale is given for its
|
When a module becomes deprecated, a rationale is given for its
|
||||||
deprecation. In some cases, an alternative interface for the same
|
deprecation. In some cases, an alternative interface for the same
|
||||||
functionality is provided, so the old interface is deprecated. In
|
functionality is provided, so the old interface is deprecated. In
|
||||||
other cases, the need for having the functionality of the module
|
other cases, the need for having the functionality of the module may
|
||||||
may not exist anymore.
|
not exist anymore.
|
||||||
|
|
||||||
If the rationale is faulty, again a change to this PEP's text MUST
|
If the rationale is faulty, again a change to this PEP's text MUST be
|
||||||
be submitted. This change MUST include the date of undeprecation
|
submitted. This change MUST include the date of undeprecation and a
|
||||||
and a rationale for undeprecation. Modules that are undeprecated
|
rationale for undeprecation. Modules that are undeprecated under this
|
||||||
under this procedure MUST be listed in this PEP for at least one
|
procedure MUST be listed in this PEP for at least one major release of
|
||||||
major release of Python.
|
Python.
|
||||||
|
|
||||||
|
|
||||||
Obsolete modules
|
Obsolete modules
|
||||||
|
================
|
||||||
|
|
||||||
A number of modules are already listed as obsolete in the library
|
A number of modules are already listed as obsolete in the library
|
||||||
documentation. These are listed here for completeness.
|
documentation. These are listed here for completeness.
|
||||||
|
|
||||||
cl, sv, timing
|
cl, sv, timing
|
||||||
|
|
||||||
All these modules have been declared as obsolete in Python 2.0,
|
All these modules have been declared as obsolete in Python 2.0, some
|
||||||
some even earlier.
|
even earlier.
|
||||||
|
|
||||||
The following obsolete modules were removed in Python 2.5:
|
The following obsolete modules were removed in Python 2.5:
|
||||||
|
|
||||||
addpack, cmp, cmpcache, codehack, dircmp, dump, find, fmt,
|
addpack, cmp, cmpcache, codehack, dircmp, dump, find, fmt,
|
||||||
grep, lockfile, newdir, ni, packmail, Para, poly,
|
grep, lockfile, newdir, ni, packmail, Para, poly,
|
||||||
rand, reconvert, regex, regsub, statcache, tb, tzparse,
|
rand, reconvert, regex, regsub, statcache, tb, tzparse,
|
||||||
util, whatsound, whrandom, zmod
|
util, whatsound, whrandom, zmod
|
||||||
|
|
||||||
The following modules were removed in Python 2.6:
|
The following modules were removed in Python 2.6:
|
||||||
|
|
||||||
gopherlib, rgbimg, macfs
|
gopherlib, rgbimg, macfs
|
||||||
|
|
||||||
The following modules currently lack a DeprecationWarning:
|
The following modules currently lack a DeprecationWarning:
|
||||||
|
|
||||||
rfc822, mimetools, multifile
|
rfc822, mimetools, multifile
|
||||||
|
|
||||||
|
|
||||||
Deprecated modules
|
Deprecated modules
|
||||||
|
==================
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
Module name: posixfile
|
Module name: posixfile
|
||||||
Rationale: Locking is better done by fcntl.lockf().
|
Rationale: Locking is better done by fcntl.lockf().
|
||||||
|
@ -251,19 +260,31 @@ Deprecated modules
|
||||||
|
|
||||||
|
|
||||||
Deprecation of modules removed in Python 3.0
|
Deprecation of modules removed in Python 3.0
|
||||||
|
============================================
|
||||||
|
|
||||||
PEP 3108 lists all modules that have been removed from Python 3.0.
|
PEP 3108 lists all modules that have been removed from Python 3.0.
|
||||||
They all are documented as deprecated in Python 2.6, and raise a
|
They all are documented as deprecated in Python 2.6, and raise a
|
||||||
DeprecationWarning if the -3 flag is activated.
|
DeprecationWarning if the -3 flag is activated.
|
||||||
|
|
||||||
|
|
||||||
Undeprecated modules
|
Undeprecated modules
|
||||||
|
====================
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
|
||||||
|
|
||||||
|
Copyright
|
||||||
|
=========
|
||||||
|
|
||||||
|
This document has been placed in the public domain.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Local Variables:
|
..
|
||||||
mode: indented-text
|
Local Variables:
|
||||||
indent-tabs-mode: nil
|
mode: indented-text
|
||||||
End:
|
indent-tabs-mode: nil
|
||||||
|
sentence-end-double-space: t
|
||||||
|
fill-column: 70
|
||||||
|
coding: utf-8
|
||||||
|
End:
|
||||||
|
|
Loading…
Reference in New Issue