mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +00:00
Added module stub for copy_reg renaming in 3.0.
Renamed copy_reg to copyreg in the standard library, to avoid spurious warnings and ease later merging to py3k branch. Public documentation remains intact.
This commit is contained in:
parent
f602c71b07
commit
9510e4a9f8
15 changed files with 302 additions and 294 deletions
|
@ -278,12 +278,12 @@ def _subx(pattern, template):
|
|||
|
||||
# register myself for pickling
|
||||
|
||||
import copy_reg
|
||||
import copyreg
|
||||
|
||||
def _pickle(p):
|
||||
return _compile, (p.pattern, p.flags)
|
||||
|
||||
copy_reg.pickle(_pattern_type, _pickle, _compile)
|
||||
copyreg.pickle(_pattern_type, _pickle, _compile)
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# experimental stuff (see python-dev discussions for details)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue