mirror of https://github.com/python/cpython.git
[3.9] gh-92049: Forbid pickling constants re._constants.SUCCESS etc (GH-92070) (GH-92073) (GH-92102)
Previously, pickling did not fail, but the result could not be unpickled. (cherry picked from commit6d0d547033
) (cherry picked from commite8ff3c92f6
)
This commit is contained in:
parent
fcbff77b26
commit
54f06aeb74
|
@ -62,6 +62,8 @@ def __new__(cls, value, name):
|
|||
def __repr__(self):
|
||||
return self.name
|
||||
|
||||
__reduce__ = None
|
||||
|
||||
MAXREPEAT = _NamedIntConstant(MAXREPEAT, 'MAXREPEAT')
|
||||
|
||||
def _makecodes(names):
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Forbid pickling constants ``re._constants.SUCCESS`` etc. Previously,
|
||||
pickling did not fail, but the result could not be unpickled.
|
Loading…
Reference in New Issue