summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ParseTreeTransforms.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-07-21 07:00:01 +0200
committerStefan Behnel <stefan_ml@behnel.de>2017-07-21 07:00:01 +0200
commit47ce818dd028923f98cec1ca78da0922dd0f885c (patch)
tree1529e8b30980381850e7bb7c559f505b2f3f3283 /Cython/Compiler/ParseTreeTransforms.py
parent9c5281d436971261a9848dc381ff640511918bce (diff)
downloadcython-47ce818dd028923f98cec1ca78da0922dd0f885c.tar.gz
Escape another local variable in generated pickle helper function to prevent conflicts with the user defined class name. See #1786.
Diffstat (limited to 'Cython/Compiler/ParseTreeTransforms.py')
-rw-r--r--Cython/Compiler/ParseTreeTransforms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py
index 8ecdc7dc0..acbf0d08b 100644
--- a/Cython/Compiler/ParseTreeTransforms.py
+++ b/Cython/Compiler/ParseTreeTransforms.py
@@ -1671,8 +1671,8 @@ if VALUE is not None:
unpickle_func = TreeFragment(u"""
def %(unpickle_func_name)s(__pyx_type, long __pyx_checksum, __pyx_state):
if __pyx_checksum != %(checksum)s:
- from pickle import PickleError
- raise PickleError("Incompatible checksums (%%s vs %(checksum)s = (%(members)s))" %% __pyx_checksum)
+ from pickle import PickleError as __pyx_PickleError
+ raise __pyx_PickleError("Incompatible checksums (%%s vs %(checksum)s = (%(members)s))" %% __pyx_checksum)
__pyx_result = %(class_name)s.__new__(__pyx_type)
if __pyx_state is not None:
%(unpickle_func_name)s__set_state(<%(class_name)s> __pyx_result, __pyx_state)