Home
last modified time | relevance | path

Searched refs:copyreg (Results 1 – 24 of 24) sorted by relevance

/third_party/python/Lib/test/
Dtest_copyreg.py1 import copyreg
35 self.assertRaises(TypeError, copyreg.pickle,
39 self.assertRaises(TypeError, copyreg.pickle,
43 self.assertRaises(TypeError, copyreg.pickle,
55 self.assertRaises(ValueError, copyreg.remove_extension,
57 copyreg.add_extension(mod, func, code)
59 self.assertTrue(copyreg._extension_registry[mod, func] == code)
60 self.assertTrue(copyreg._inverted_registry[code] == (mod, func))
62 self.assertNotIn(code, copyreg._extension_cache)
64 copyreg.add_extension(mod, func, code) # shouldn't blow up
[all …]
Dpickletester.py2 import copyreg
117 if code in copyreg._inverted_registry:
118 self.pair = copyreg._inverted_registry[code]
119 copyreg.remove_extension(self.pair[0], self.pair[1], code)
126 curpair = copyreg._inverted_registry.get(code)
128 copyreg.remove_extension(curpair[0], curpair[1], code)
131 copyreg.add_extension(pair[0], pair[1], code)
1935 copyreg.pickle(pickling_metaclass, pickling_metaclass.__reduce__)
2163 copyreg.add_extension(__name__, "MyList", extcode)
Dtest_copy.py4 import copyreg
52 copyreg.pickle(C, pickle_C, C)
314 copyreg.pickle(C, pickle_C, C)
Dtest_descr.py2 import copyreg
5058 self.assertEqual(reduce_value[0], copyreg.__newobj_ex__)
5061 self.assertEqual(reduce_value[0], copyreg.__newobj__)
5074 reduce_value = (copyreg._reconstructor,
5475 import copyreg
5476 expected = (copyreg.__newobj__, (A,), (None, {'spam': 42}), None, None)
/third_party/protobuf/python/google/protobuf/internal/
Dtesting_refleaks.py45 import copy_reg as copyreg #PY26 namespace
47 import copyreg
81 self._saved_pickle_registry = copyreg.dispatch_table.copy()
104 copyreg.dispatch_table.clear()
105 copyreg.dispatch_table.update(self._saved_pickle_registry)
/third_party/python/Doc/library/
Dcopyreg.rst1 :mod:`copyreg` --- Register :mod:`pickle` support functions
4 .. module:: copyreg
7 **Source code:** :source:`Lib/copyreg.py`
15 The :mod:`copyreg` module offers a way to define functions used while pickling
51 >>> import copyreg, copy, pickle
60 >>> copyreg.pickle(C, pickle_c)
Dpersistence.rst19 copyreg.rst
Dmodulefinder.rst98 copyreg: _inverted_registry,_slotnames,__all__
Dpickle.rst352 :func:`copyreg.pickle`. It is a mapping whose keys are classes
360 global dispatch table managed by the :mod:`copyreg` module.
769 The global dispatch table managed by the :mod:`copyreg` module is
770 available as :data:`copyreg.dispatch_table`. Therefore, one may
771 choose to use a modified copy of :data:`copyreg.dispatch_table` as a
778 p.dispatch_table = copyreg.dispatch_table.copy()
786 dispatch_table = copyreg.dispatch_table.copy()
793 :mod:`copyreg` module is ::
795 copyreg.pickle(SomeClass, reduce_SomeClass)
1171 Module :mod:`copyreg`
Dcopy.rst76 pickle functions from the :mod:`copyreg` module.
/third_party/python/Lib/test/libregrtest/
Drefleak.py30 import copyreg
43 ps = copyreg.dispatch_table.copy()
152 import copyreg
157 copyreg.dispatch_table.clear()
158 copyreg.dispatch_table.update(ps)
/third_party/PyYAML/lib/yaml/
Drepresenter.py8 import datetime, copyreg, types, base64, collections
314 if cls in copyreg.dispatch_table:
315 reduce = copyreg.dispatch_table[cls](data)
/third_party/python/Lib/
Dre.py336 import copyreg
341 copyreg.pickle(Pattern, _pickle, _compile)
Dcopy.py53 from copyreg import dispatch_table
Dpickle.py27 from copyreg import dispatch_table
28 from copyreg import _extension_registry, _inverted_registry, _extension_cache
/third_party/python/Lib/multiprocessing/
Dreduction.py11 import copyreg
36 _copyreg_dispatch_table = copyreg.dispatch_table
/third_party/python/Lib/idlelib/
Drpc.py30 import copyreg
67 dispatch_table = {types.CodeType: pickle_code, **copyreg.dispatch_table}
/third_party/python/Objects/
Dtypeobject.c4812 _Py_IDENTIFIER(copyreg); in import_copyreg()
4836 PyObject *copyreg; in _PyType_GetSlotNames() local
4863 copyreg = import_copyreg(); in _PyType_GetSlotNames()
4864 if (copyreg == NULL) in _PyType_GetSlotNames()
4870 slotnames = _PyObject_CallMethodIdOneArg(copyreg, &PyId__slotnames, in _PyType_GetSlotNames()
4872 Py_DECREF(copyreg); in _PyType_GetSlotNames()
5172 PyObject *copyreg; in reduce_newobj() local
5186 copyreg = import_copyreg(); in reduce_newobj()
5187 if (copyreg == NULL) { in reduce_newobj()
5199 newobj = _PyObject_GetAttrId(copyreg, &PyId___newobj__); in reduce_newobj()
[all …]
/third_party/python/Modules/
D_pickle.c221 PyObject *copyreg = NULL; in _Pickle_InitState() local
231 copyreg = PyImport_ImportModule("copyreg"); in _Pickle_InitState()
232 if (!copyreg) in _Pickle_InitState()
234 st->dispatch_table = PyObject_GetAttrString(copyreg, "dispatch_table"); in _Pickle_InitState()
244 PyObject_GetAttrString(copyreg, "_extension_registry"); in _Pickle_InitState()
254 PyObject_GetAttrString(copyreg, "_inverted_registry"); in _Pickle_InitState()
263 st->extension_cache = PyObject_GetAttrString(copyreg, "_extension_cache"); in _Pickle_InitState()
272 Py_CLEAR(copyreg); in _Pickle_InitState()
347 Py_CLEAR(copyreg); in _Pickle_InitState()
/third_party/python/Misc/NEWS.d/
D3.6.3rc1.rst480 Fix `copyreg._slotnames()` mangled attribute calculation for classes whose
D3.7.0a1.rst1976 Fix `copyreg._slotnames()` mangled attribute calculation for classes whose
/third_party/python/Doc/whatsnew/
D3.0.rst580 copy_reg copyreg
/third_party/python/Tools/c-analyzer/
DTODO438 Objects/typeobject.c:import_copyreg():PyId_copyreg _Py_IDENTIFIER(copyreg)
/third_party/python/Misc/
DHISTORY3079 - Issue #19088: Fixed incorrect caching of the copyreg module in
3799 - Issue #19209: Remove import of copyreg from the os module to speed up
4418 - Issue #17408: Avoid using an obsolete instance of the copyreg module when
9178 metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and Craig
16768 - The copy_reg module has been renamed to copyreg.