Update the PEP to not rename modules in 2.6; just add a note to their docs.
Also update that the modules that have been renamed in 2.6 need to be reverted. Some random other clean-ups were also done.
This commit is contained in:
parent
e4274bd3b0
commit
5f18379620
125
pep-3108.txt
125
pep-3108.txt
|
@ -563,6 +563,10 @@ for what the module is meant for.
|
|||
* dl [done: 2.6, 3.0]
|
||||
|
||||
+ ctypes provides better support for same functionality.
|
||||
|
||||
* dummy_thread (TODO after ``thread`` has been renamed)
|
||||
|
||||
+ ``thread`` is becoming a hidden API.
|
||||
|
||||
* fpformat [done: 2.6, 3.0]
|
||||
|
||||
|
@ -617,8 +621,7 @@ for what the module is meant for.
|
|||
|
||||
+ ``os.statvfs`` now returns a tuple with attributes.
|
||||
|
||||
* thread (TODO need to change import statements to ``_thread``;
|
||||
rename ``dummy_thread`` to ``_dummy_thread``)
|
||||
* thread (TODO deprecate direct importation in 2.6; same for dummy_thread)
|
||||
|
||||
+ People should use 'threading' instead.
|
||||
|
||||
|
@ -633,16 +636,14 @@ for what the module is meant for.
|
|||
|
||||
+ Superceded by urllib2.
|
||||
+ Functionality unique to urllib will be kept in the
|
||||
`urllib package`_.
|
||||
urllib package.
|
||||
|
||||
* UserDict [done: 3.0] (TODO For 2.6, backport from ``collections`` and change
|
||||
usage to ``collections.UserDict``)
|
||||
* UserDict [done: 3.0] (TODO handle 2.6)
|
||||
|
||||
+ Not as useful since types can be a superclass.
|
||||
+ Useful bits moved to the 'collections' module.
|
||||
|
||||
* UserList/UserString [done: 3.0] (TODO For 2.6, backport from ``collections`` and
|
||||
and change usage)
|
||||
* UserList/UserString [done: 3.0] (TODO handle 2.6)
|
||||
|
||||
+ Not useful since types can be a superclass.
|
||||
+ Moved to the 'collections' module.
|
||||
|
@ -672,10 +673,10 @@ Current Name Replacement Name
|
|||
_winreg winreg (rename also because module has a public
|
||||
interface and thus should not have a leading
|
||||
underscore) TODO
|
||||
ConfigParser configparser [done; 2.6, 3.0]
|
||||
copy_reg copyreg [done; 2.6, 3.0]
|
||||
Queue queue [done: 2.6, 3.0]
|
||||
SocketServer socketserver [done: 2.6, 3.0]
|
||||
ConfigParser configparser [done: 3.0] (TODO revert in 2.6)
|
||||
copy_reg copyreg [done: 3.0] (TODO revert in 2.6)
|
||||
Queue queue [done: 3.0] (TODO revert in 2.6)
|
||||
SocketServer socketserver [done: 3.0] (TODO revert in 2.6)
|
||||
================== ==================================================
|
||||
|
||||
|
||||
|
@ -726,12 +727,9 @@ should be renamed to reflect this fact.
|
|||
============ ===============================
|
||||
Current Name Replacement Name
|
||||
============ ===============================
|
||||
markupbase _markupbase [done: 3.0] (TODO 2.6)
|
||||
dummy_thread _dummy_thread [#]_ (TODO)
|
||||
markupbase _markupbase [done]
|
||||
============ ===============================
|
||||
|
||||
.. [#] Assumes ``thread`` is renamed to ``_thread``.
|
||||
|
||||
|
||||
Poorly chosen names
|
||||
-------------------
|
||||
|
@ -743,7 +741,7 @@ beyond the 2.x series.
|
|||
================= ===============================
|
||||
Current Name Replacement Name
|
||||
================= ===============================
|
||||
repr reprlib [done; 2.6, 3.0]
|
||||
repr reprlib [done: 3.0] (TODO revert change in 2.6)
|
||||
test.test_support test.support (TODO)
|
||||
================= ===============================
|
||||
|
||||
|
@ -756,10 +754,8 @@ include multiple modules (e.g., support for database files). It
|
|||
thus makes sense to group related modules into packages.
|
||||
|
||||
|
||||
dbm package
|
||||
///////////
|
||||
|
||||
TODO
|
||||
dbm package (TODO)
|
||||
//////////////////
|
||||
|
||||
================= ===============================
|
||||
Current Name Replacement Name
|
||||
|
@ -779,8 +775,8 @@ whichdb dbm.__init__ [1]_
|
|||
|
||||
|
||||
|
||||
html package
|
||||
////////////
|
||||
html package [done: 3.0] (TODO revert change in 2.6)
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
================== ===============================
|
||||
Current Name Replacement Name
|
||||
|
@ -790,9 +786,8 @@ htmlentitydefs html.entities
|
|||
================== ===============================
|
||||
|
||||
|
||||
http package
|
||||
////////////
|
||||
TODO
|
||||
http package (TODO)
|
||||
///////////////////
|
||||
|
||||
================= ===============================
|
||||
Current Name Replacement Name
|
||||
|
@ -809,8 +804,8 @@ cookielib http.cookiejar
|
|||
safely as they have no naming conflicts.
|
||||
|
||||
|
||||
tkinter package [done in 2.6, 3.0]
|
||||
//////////////////////////////////
|
||||
tkinter package [done: 3.0] (TODO revert change in 2.6)
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
================== ===============================
|
||||
Current Name Replacement Name
|
||||
|
@ -840,9 +835,8 @@ turtle tkinter.turtle
|
|||
and ``tkSimpleDialog`` have no naming conflicts.
|
||||
|
||||
|
||||
urllib package
|
||||
//////////////
|
||||
TODO
|
||||
urllib package (TODO)
|
||||
/////////////////////
|
||||
|
||||
Originally this new package was to be named ``url``, but because of
|
||||
the common use of the name as a variable, it has been deemed better
|
||||
|
@ -863,9 +857,8 @@ urllib urllib.parse, urllib.request [6]_
|
|||
as long as the documentation for both modules is updated.
|
||||
|
||||
|
||||
xmlrpc package
|
||||
//////////////
|
||||
TODO
|
||||
xmlrpc package (TODO)
|
||||
/////////////////////
|
||||
|
||||
================== ===============================
|
||||
Current Name Replacement Name
|
||||
|
@ -985,29 +978,11 @@ imported needs to be changed). The ``fix_imports`` fixer is an
|
|||
example of how to approach this.
|
||||
|
||||
|
||||
Python 2.6
|
||||
Python 3.0
|
||||
//////////
|
||||
|
||||
#. Use ``svn move`` to rename the module.
|
||||
|
||||
#. Create a stub module in ``Lib/lib-old``::
|
||||
|
||||
from warnings import warnpy3k
|
||||
warnpy3k("The OLDNAME module has been renamed to XXX in Python 3.0",
|
||||
stacklevel=2)
|
||||
|
||||
from sys import modules
|
||||
import NEWNAME
|
||||
modules[__name__] = NEWNAME
|
||||
|
||||
#. Add a test to ``test_py3kwarn``.
|
||||
|
||||
#. Add an entry in ``Misc/NEWS``.
|
||||
|
||||
#. Commit the changes (**block** in py3k; might be easiest to generate
|
||||
a patch first or use bzr to branch off at this point so as to be
|
||||
able to control commits easily).
|
||||
|
||||
#. Update all import statements in the stdlib to use the new name
|
||||
(use 2to3's ``fix_imports`` fixer for the easiest solution).
|
||||
|
||||
|
@ -1016,44 +991,26 @@ Python 2.6
|
|||
#. Update all references in the documentation from the old name to
|
||||
the new name.
|
||||
|
||||
#. Commit the changes (this checkin should be allowed to propagate to py3k).
|
||||
|
||||
#. Add an index entry in the module documentation for the old name which
|
||||
lists the module as deprecated under that name::
|
||||
|
||||
.. module:: OLDNAME
|
||||
:synopsis: Old name for the NEWNAME module.
|
||||
|
||||
#. In the module's documentation, add a note mentioning that the module was
|
||||
renamed in Python 2.6::
|
||||
|
||||
.. note::
|
||||
The :mod:`OLDNAME` module has been renamed to :mod:`NEWNAME` in
|
||||
Python 3.0. It is importable under both names in Python 2.6
|
||||
and the rest of the 2.x series.
|
||||
|
||||
#. Commit the changes (**block** in py3k).
|
||||
|
||||
|
||||
|
||||
Python 3.0
|
||||
//////////
|
||||
|
||||
#. Merge appropriate checkins from 2.6. Make sure that all changes were
|
||||
applied correctly. Be aware, that ``svnmerge.py`` will not merge
|
||||
changes made to previously renamed modules.
|
||||
|
||||
#. Use ``svn move`` to rename the module.
|
||||
|
||||
#. Update all references to use the new name.
|
||||
#. Run ``regrtest.py -uall`` to verify the rename worked.
|
||||
|
||||
#. Add an entry in ``Misc/NEWS``.
|
||||
|
||||
#. Run the test suite.
|
||||
|
||||
#. Commit the changes.
|
||||
|
||||
|
||||
Python 2.6
|
||||
//////////
|
||||
|
||||
#. In the module's documentation, add a note mentioning that the module is
|
||||
renamed in Python 3.0::
|
||||
|
||||
.. note::
|
||||
The :mod:`OLDNAME` module has been renamed to :mod:`NEWNAME` in
|
||||
Python 3.0.
|
||||
|
||||
#. Commit the documentation change.
|
||||
|
||||
|
||||
Open Issues
|
||||
===========
|
||||
|
||||
|
|
Loading…
Reference in New Issue