Skip to content

Commit 6a0a368

Browse files
committed
Fix-up docs for the copyreg module renaming.
1 parent 7a148c2 commit 6a0a368

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

Doc/library/copy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ of lists by assigning a slice of the entire list, for example,
6363

6464
Classes can use the same interfaces to control copying that they use to control
6565
pickling. See the description of module :mod:`pickle` for information on these
66-
methods. The :mod:`copy` module does not use the :mod:`copy_reg` registration
66+
methods. The :mod:`copy` module does not use the :mod:`copyreg` registration
6767
module.
6868

6969
.. index::

Doc/library/copy_reg.rst renamed to Doc/library/copyreg.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
2-
:mod:`copy_reg` --- Register :mod:`pickle` support functions
3-
============================================================
1+
:mod:`copyreg` --- Register :mod:`pickle` support functions
2+
===========================================================
43

54
.. module:: copy_reg
5+
:synopsis: Old name for the copyreg module.
6+
7+
.. module:: copyreg
68
:synopsis: Register pickle support functions.
79

810
.. note::
9-
The :mod:`copy_reg` module has been renamed to `copyreg` in Python 3.0.
11+
The :mod:`copy_reg` module has been renamed to :mod:`copyreg` in Python 3.0.
12+
It is importable under both names in Python 2.6 and the rest of the 2.x
13+
series.
1014

1115
.. index::
1216
module: pickle
1317
module: cPickle
1418
module: copy
1519

16-
The :mod:`copy_reg` module provides support for the :mod:`pickle` and
20+
The :mod:`copyreg` module provides support for the :mod:`pickle` and
1721
:mod:`cPickle` modules. The :mod:`copy` module is likely to use this in the
1822
future as well. It provides configuration information about object constructors
1923
which are not classes. Such constructors may be factory functions or class

Doc/library/persistence.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The list of modules described in this chapter is:
1919
.. toctree::
2020

2121
pickle.rst
22-
copy_reg.rst
22+
copyreg.rst
2323
shelve.rst
2424
marshal.rst
2525
anydbm.rst

Doc/library/pickle.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ not :meth:`__reduce_ex__`, the :meth:`__reduce_ex__` implementation detects this
535535
and calls :meth:`__reduce__`.
536536

537537
An alternative to implementing a :meth:`__reduce__` method on the object to be
538-
pickled, is to register the callable with the :mod:`copy_reg` module. This
538+
pickled, is to register the callable with the :mod:`copyreg` module. This
539539
module provides a way for programs to register "reduction functions" and
540540
constructors for user-defined types. Reduction functions have the same
541541
semantics and interface as the :meth:`__reduce__` method described above, except
@@ -786,7 +786,7 @@ the same process or a new process. ::
786786

787787
.. seealso::
788788

789-
Module :mod:`copy_reg`
789+
Module :mod:`copyreg`
790790
Pickle interface constructor registration for extension types.
791791

792792
Module :mod:`shelve`

0 commit comments

Comments
 (0)