diff options
Diffstat (limited to 'pcr/renpy-python3')
-rw-r--r-- | pcr/renpy-python3/PKGBUILD | 2 | ||||
-rw-r--r-- | pcr/renpy-python3/python3.patch | 417 |
2 files changed, 382 insertions, 37 deletions
diff --git a/pcr/renpy-python3/PKGBUILD b/pcr/renpy-python3/PKGBUILD index 55ae76867..ff7ae3eba 100644 --- a/pcr/renpy-python3/PKGBUILD +++ b/pcr/renpy-python3/PKGBUILD @@ -26,7 +26,7 @@ sha256sums=('0eb0c763bf7e977db06039c69751f1ed5e69c4b738f7f6d975e99e8729eff58e' 'fccde3461617a098a78d938d9db782d403eda410a84ab52825a597498ab95834' '611edc07a40ccb8e04e8858847fc1d2a066d29c2ed54e5b357880a0605818dc5' 'c2d27a3f6b74f874a790ce6c12e9d4b718784478d8a8aa23c879d186f60a25ab' - 'd3fa4d78ceb52f4ec26bc18e87f94e19bcf579766ef2ffee080d11194f0fb913') + '664b708f5d4f39d8c3006b796c7e07fadb73fc8fd60b67d29b48d91b89c1299b') prepare() { cd renpy-${pkgver}-source diff --git a/pcr/renpy-python3/python3.patch b/pcr/renpy-python3/python3.patch index 972242311..3c406515b 100644 --- a/pcr/renpy-python3/python3.patch +++ b/pcr/renpy-python3/python3.patch @@ -709,6 +709,133 @@ index 5b64008..a88d089 100644 # Binary mode stdout for python3. try: +diff --git a/module/gen/renpy.text.textsupport.c b/module/gen/renpy.text.textsupport.c +index f09ec46..bbe9b3a 100644 +--- a/module/gen/renpy.text.textsupport.c ++++ b/module/gen/renpy.text.textsupport.c +@@ -800,7 +800,7 @@ int __pyx_module_is_main_renpy__text__textsupport = 0; + static PyObject *__pyx_builtin_range; + static PyObject *__pyx_builtin_Exception; + static PyObject *__pyx_builtin_ord; +-static PyObject *__pyx_builtin_unichr; ++static PyObject *__pyx_builtin_chr; + static int __pyx_pf_5renpy_4text_11textsupport_5Glyph___init__(struct __pyx_obj_5renpy_4text_11textsupport_Glyph *__pyx_v_self); /* proto */ + static PyObject *__pyx_pf_5renpy_4text_11textsupport_5Glyph_2__repr__(struct __pyx_obj_5renpy_4text_11textsupport_Glyph *__pyx_v_self); /* proto */ + static PyObject *__pyx_pf_5renpy_4text_11textsupport_5Glyph_1x___get__(struct __pyx_obj_5renpy_4text_11textsupport_Glyph *__pyx_v_self); /* proto */ +@@ -964,7 +964,7 @@ static char __pyx_k_offset[] = "offset"; + static char __pyx_k_source[] = "source"; + static char __pyx_k_spaces[] = "spaces"; + static char __pyx_k_splitx[] = "splitx"; +-static char __pyx_k_unichr[] = "unichr"; ++static char __pyx_k_chr[] = "chr"; + static char __pyx_k_CLASSES[] = "CLASSES"; + static char __pyx_k_advance[] = "advance"; + static char __pyx_k_justify[] = "justify"; +@@ -1190,7 +1190,7 @@ static PyObject *__pyx_n_s_text_align; + static PyObject *__pyx_n_s_tokenize; + static PyObject *__pyx_n_s_tpg; + static PyObject *__pyx_n_s_tweak_glyph_spacing; +-static PyObject *__pyx_n_s_unichr; ++static PyObject *__pyx_n_s_chr; + static PyObject *__pyx_n_s_w; + static PyObject *__pyx_n_s_width; + static PyObject *__pyx_n_s_x; +@@ -5652,7 +5652,7 @@ static PyObject *__pyx_pf_5renpy_4text_11textsupport_12linebreak_debug(CYTHON_UN + * if g.split == SPLIT_INSTEAD: + * rv += "|" + * elif g.split == SPLIT_BEFORE: # <<<<<<<<<<<<<< +- * rv += "[" + unichr(g.character) ++ * rv += "[" + chr(g.character) + * else: + */ + switch (__pyx_v_g->split) { +@@ -5671,7 +5671,7 @@ static PyObject *__pyx_pf_5renpy_4text_11textsupport_12linebreak_debug(CYTHON_UN + * if g.split == SPLIT_INSTEAD: + * rv += "|" # <<<<<<<<<<<<<< + * elif g.split == SPLIT_BEFORE: +- * rv += "[" + unichr(g.character) ++ * rv += "[" + chr(g.character) + */ + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_rv, __pyx_kp_s__2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 393; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); +@@ -5683,7 +5683,7 @@ static PyObject *__pyx_pf_5renpy_4text_11textsupport_12linebreak_debug(CYTHON_UN + * if g.split == SPLIT_INSTEAD: + * rv += "|" + * elif g.split == SPLIT_BEFORE: # <<<<<<<<<<<<<< +- * rv += "[" + unichr(g.character) ++ * rv += "[" + chr(g.character) + * else: + */ + case __pyx_e_5renpy_4text_11textsupport_SPLIT_BEFORE: +@@ -5691,9 +5691,9 @@ static PyObject *__pyx_pf_5renpy_4text_11textsupport_12linebreak_debug(CYTHON_UN + /* "renpy/text/textsupport.pyx":395 + * rv += "|" + * elif g.split == SPLIT_BEFORE: +- * rv += "[" + unichr(g.character) # <<<<<<<<<<<<<< ++ * rv += "[" + chr(g.character) # <<<<<<<<<<<<<< + * else: +- * rv += unichr(g.character) ++ * rv += chr(g.character) + */ + __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_g->character); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); +@@ -5702,7 +5702,7 @@ static PyObject *__pyx_pf_5renpy_4text_11textsupport_12linebreak_debug(CYTHON_UN + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; +- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_unichr, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ++ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Add(__pyx_kp_s__3, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} +@@ -5717,9 +5717,9 @@ static PyObject *__pyx_pf_5renpy_4text_11textsupport_12linebreak_debug(CYTHON_UN + default: + + /* "renpy/text/textsupport.pyx":397 +- * rv += "[" + unichr(g.character) ++ * rv += "[" + chr(g.character) + * else: +- * rv += unichr(g.character) # <<<<<<<<<<<<<< ++ * rv += chr(g.character) # <<<<<<<<<<<<<< + * + * return rv + */ +@@ -5730,7 +5730,7 @@ static PyObject *__pyx_pf_5renpy_4text_11textsupport_12linebreak_debug(CYTHON_UN + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; +- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_unichr, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ++ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_chr, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_rv, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 397; __pyx_clineno = __LINE__; goto __pyx_L1_error;} +@@ -5752,7 +5752,7 @@ static PyObject *__pyx_pf_5renpy_4text_11textsupport_12linebreak_debug(CYTHON_UN + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "renpy/text/textsupport.pyx":399 +- * rv += unichr(g.character) ++ * rv += chr(g.character) + * + * return rv # <<<<<<<<<<<<<< + * +@@ -10826,7 +10826,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_tokenize, __pyx_k_tokenize, sizeof(__pyx_k_tokenize), 0, 0, 1, 1}, + {&__pyx_n_s_tpg, __pyx_k_tpg, sizeof(__pyx_k_tpg), 0, 0, 1, 1}, + {&__pyx_n_s_tweak_glyph_spacing, __pyx_k_tweak_glyph_spacing, sizeof(__pyx_k_tweak_glyph_spacing), 0, 0, 1, 1}, +- {&__pyx_n_s_unichr, __pyx_k_unichr, sizeof(__pyx_k_unichr), 0, 0, 1, 1}, ++ {&__pyx_n_s_chr, __pyx_k_chr, sizeof(__pyx_k_chr), 0, 0, 1, 1}, + {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, + {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1}, + {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, +@@ -10838,7 +10838,7 @@ static int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ord = __Pyx_GetBuiltinName(__pyx_n_s_ord); if (!__pyx_builtin_ord) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} +- __pyx_builtin_unichr = __Pyx_GetBuiltinName(__pyx_n_s_unichr); if (!__pyx_builtin_unichr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ++ __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + return 0; + __pyx_L1_error:; + return -1; diff --git a/module/generate_linebreak.py b/module/generate_linebreak.py index 670adb7..8914199 100644 --- a/module/generate_linebreak.py @@ -1113,13 +1240,15 @@ index 9935b29..5b2e3b5 100644 for position, target in edits: output += data[consumed:position] diff --git a/renpy/ast.py b/renpy/ast.py -index ec2cbf5..78499e2 100644 +index ec2cbf5..286c54a 100644 --- a/renpy/ast.py +++ b/renpy/ast.py -@@ -31,6 +31,7 @@ import renpy.display +@@ -30,7 +30,8 @@ import renpy.display + import re import time - import md5 +-import md5 ++import hashlib +import collections def statement_name(name): @@ -1168,6 +1297,15 @@ index ec2cbf5..78499e2 100644 class PyCode(object): +@@ -261,7 +262,7 @@ class PyCode(object): + if isinstance(code, renpy.python.ast.AST): #@UndefinedVariable + code = renpy.python.ast.dump(code) #@UndefinedVariable + +- self.hash = chr(renpy.bytecode_version) + md5.md5(repr(self.location) + code.encode("utf-8")).digest() ++ self.hash = chr(renpy.bytecode_version) + hashlib.md5(repr(self.location) + code.encode("utf-8")).digest() + return self.hash + + @@ -291,7 +292,7 @@ class Scry(object): def __getattr__(self, name): return None @@ -1671,7 +1809,7 @@ index bf959b5..9ccce1c 100644 try: diff --git a/renpy/bootstrap.py b/renpy/bootstrap.py -index 9dbe2e0..a86088a 100644 +index 9dbe2e0..285e571 100644 --- a/renpy/bootstrap.py +++ b/renpy/bootstrap.py @@ -64,8 +64,8 @@ def extra_imports(): @@ -1707,7 +1845,7 @@ index 9dbe2e0..a86088a 100644 del os.environ["SDL_VIDEODRIVER"] - renpy_base = unicode(renpy_base, FSENCODING, "replace") -+ renpy_base = str(renpy_base, FSENCODING, "replace") ++ renpy_base = renpy_base.encode(FSENCODING, "replace").decode(FSENCODING, "replace") # If environment.txt exists, load it into the os.environ dictionary. if os.path.exists(renpy_base + "/environment.txt"): @@ -3970,7 +4108,7 @@ index 2201010..8e81dd2 100644 rv = _MultiPersistent() diff --git a/renpy/pyanalysis.py b/renpy/pyanalysis.py -index f5267bb..81f17a7 100644 +index f5267bb..041ea8d 100644 --- a/renpy/pyanalysis.py +++ b/renpy/pyanalysis.py @@ -19,11 +19,6 @@ @@ -3994,6 +4132,15 @@ index f5267bb..81f17a7 100644 # The set of names that should be treated as constants. always_constants = { 'True', 'False', 'None' } +@@ -45,7 +40,7 @@ pure_functions = { + "getattr", "globals", "hasattr", "hash", "hex", "int", "isinstance", + "len", "list", "long", "map", "max", "min", "oct", "ord", "pow", + "range", "reduce", "repr", "round", "set", "sorted", +- "str", "sum", "tuple", "unichr", "unicode", "vars", "zip", ++ "str", "sum", "tuple", "vars", "zip", + + # enumerator and reversed return iterators at the moment. + @@ -137,7 +132,7 @@ def pure(fn): name = fn @@ -4013,7 +4160,7 @@ index f5267bb..81f17a7 100644 return False diff --git a/renpy/python.py b/renpy/python.py -index 22e7405..c408ad4 100644 +index 22e7405..22f5ecb 100644 --- a/renpy/python.py +++ b/renpy/python.py @@ -30,7 +30,6 @@ import marshal @@ -4138,7 +4285,23 @@ index 22e7405..c408ad4 100644 if e.lineno is not None: e.lineno += line_offset -@@ -590,7 +589,7 @@ class RevertableList(list): +@@ -558,7 +557,6 @@ class RevertableList(list): + list.__init__(self, *args) + + __delitem__ = mutator(list.__delitem__) +- __delslice__ = mutator(list.__delslice__) + __setitem__ = mutator(list.__setitem__) + __iadd__ = mutator(list.__iadd__) + __imul__ = mutator(list.__imul__) +@@ -577,7 +575,6 @@ class RevertableList(list): + return newmethod + + __add__ = wrapper(list.__add__) +- __getslice__ = wrapper(list.__getslice__) + __mul__ = wrapper(list.__mul__) + __rmul__ = wrapper(list.__rmul__) + +@@ -590,7 +587,7 @@ class RevertableList(list): self[:] = old def revertable_range(*args): @@ -4147,7 +4310,7 @@ index 22e7405..c408ad4 100644 def revertable_sorted(*args, **kwargs): return RevertableList(sorted(*args, **kwargs)) -@@ -630,7 +629,7 @@ class RevertableDict(dict): +@@ -630,7 +627,7 @@ class RevertableDict(dict): return rv def get_rollback(self): @@ -4156,7 +4319,99 @@ index 22e7405..c408ad4 100644 def rollback(self, old): self.clear() -@@ -869,15 +868,15 @@ class Rollback(renpy.object.Object): +@@ -638,7 +635,7 @@ class RevertableDict(dict): + for k, v in old: + self[k] = v + +-class RevertableSet(sets.Set): ++class RevertableSet(set): + + def __init__(self, *args): + log = renpy.game.log +@@ -646,44 +643,43 @@ class RevertableSet(sets.Set): + if log is not None: + log.mutated[id(self)] = None + +- sets.Set.__init__(self, *args) +- +- __iand__ = mutator(sets.Set.__iand__) +- __ior__ = mutator(sets.Set.__ior__) +- __isub__ = mutator(sets.Set.__isub__) +- __ixor__ = mutator(sets.Set.__ixor__) +- add = mutator(sets.Set.add) +- clear = mutator(sets.Set.clear) +- difference_update = mutator(sets.Set.difference_update) +- discard = mutator(sets.Set.discard) +- intersection_update = mutator(sets.Set.intersection_update) +- pop = mutator(sets.Set.pop) +- remove = mutator(sets.Set.remove) +- symmetric_difference_update = mutator(sets.Set.symmetric_difference_update) +- union_update = mutator(sets.Set.union_update) +- update = mutator(sets.Set.update) ++ set.__init__(self, *args) ++ ++ __iand__ = mutator(set.__iand__) ++ __ior__ = mutator(set.__ior__) ++ __isub__ = mutator(set.__isub__) ++ __ixor__ = mutator(set.__ixor__) ++ add = mutator(set.add) ++ clear = mutator(set.clear) ++ difference_update = mutator(set.difference_update) ++ discard = mutator(set.discard) ++ intersection_update = mutator(set.intersection_update) ++ pop = mutator(set.pop) ++ remove = mutator(set.remove) ++ symmetric_difference_update = mutator(set.symmetric_difference_update) ++ union = mutator(set.union) ++ update = mutator(set.update) + + def wrapper(method): # E0213 @NoSelf + def newmethod(*args, **kwargs): + rv = method(*args, **kwargs) # E1102 +- if isinstance(rv, sets.Set): ++ if isinstance(rv, set): + return RevertableSet(rv) + else: + return rv + + return newmethod + +- __and__ = wrapper(sets.Set.__and__) +- __copy__ = wrapper(sets.Set.__copy__) +- __deepcopy__ = wrapper(sets.Set.__deepcopy__) +- __sub__ = wrapper(sets.Set.__sub__) +- __xor__ = wrapper(sets.Set.__xor__) +- __or__ = wrapper(sets.Set.__or__) +- copy = wrapper(sets.Set.copy) +- difference = wrapper(sets.Set.difference) +- intersection = wrapper(sets.Set.intersection) +- symmetric_difference = wrapper(sets.Set.symmetric_difference) +- union = wrapper(sets.Set.union) ++ __and__ = wrapper(set.__and__) ++ copy = wrapper(set.copy) ++ __sub__ = wrapper(set.__sub__) ++ __xor__ = wrapper(set.__xor__) ++ __or__ = wrapper(set.__or__) ++ copy = wrapper(set.copy) ++ difference = wrapper(set.difference) ++ intersection = wrapper(set.intersection) ++ symmetric_difference = wrapper(set.symmetric_difference) ++ union = wrapper(set.union) + + del wrapper + +@@ -691,8 +687,8 @@ class RevertableSet(sets.Set): + return list(self) + + def rollback(self, old): +- sets.Set.clear(self) +- sets.Set.update(self, old) ++ set.clear(self) ++ set.update(self, old) + + + class RevertableObject(object): +@@ -869,15 +865,15 @@ class Rollback(renpy.object.Object): # Add objects reachable from the stores. (Objects that might be # unreachable at the moment.) @@ -4175,7 +4430,7 @@ index 22e7405..c408ad4 100644 reached(v, reachable, wait) # Add in objects reachable through displayables. -@@ -892,7 +891,7 @@ class Rollback(renpy.object.Object): +@@ -892,7 +888,7 @@ class Rollback(renpy.object.Object): reached(rb, reachable, wait) else: if renpy.config.debug: @@ -4184,7 +4439,7 @@ index 22e7405..c408ad4 100644 pass -@@ -911,12 +910,12 @@ class Rollback(renpy.object.Object): +@@ -911,12 +907,12 @@ class Rollback(renpy.object.Object): if roll is not None: obj.rollback(roll) @@ -4199,7 +4454,7 @@ index 22e7405..c408ad4 100644 if value is deleted: if name in store: del store[name] -@@ -1045,7 +1044,7 @@ class RollbackLog(renpy.object.Object): +@@ -1045,7 +1041,7 @@ class RollbackLog(renpy.object.Object): self.rolled_forward = False # Reset the point that changes are relative to. @@ -4208,7 +4463,7 @@ index 22e7405..c408ad4 100644 sd.begin() def complete(self): -@@ -1059,18 +1058,18 @@ class RollbackLog(renpy.object.Object): +@@ -1059,18 +1055,18 @@ class RollbackLog(renpy.object.Object): # Update self.current.stores with the changes from each store. # Also updates .ever_been_changed. @@ -4230,7 +4485,7 @@ index 22e7405..c408ad4 100644 if v is None: continue -@@ -1102,7 +1101,7 @@ class RollbackLog(renpy.object.Object): +@@ -1102,7 +1098,7 @@ class RollbackLog(renpy.object.Object): rv = { } @@ -4239,7 +4494,7 @@ index 22e7405..c408ad4 100644 for name in sd.ever_been_changed: if name in sd: rv[store_name + "." + name] = sd[name] -@@ -1300,7 +1299,7 @@ class RollbackLog(renpy.object.Object): +@@ -1300,7 +1296,7 @@ class RollbackLog(renpy.object.Object): # Otherwise, just give up. @@ -4248,7 +4503,7 @@ index 22e7405..c408ad4 100644 revlog.reverse() self.log = self.log + revlog -@@ -1422,7 +1421,7 @@ class RollbackLog(renpy.object.Object): +@@ -1422,7 +1418,7 @@ class RollbackLog(renpy.object.Object): clean_stores() renpy.translation.init_translation() @@ -4257,7 +4512,7 @@ index 22e7405..c408ad4 100644 if "." in name: store_name, name = name.rsplit(".", 1) -@@ -1458,7 +1457,7 @@ def py_exec_bytecode(bytecode, hide=False, globals=None, locals=None, store="sto +@@ -1458,7 +1454,7 @@ def py_exec_bytecode(bytecode, hide=False, globals=None, locals=None, store="sto if locals is None: locals = globals #@ReservedAssignment @@ -4266,7 +4521,7 @@ index 22e7405..c408ad4 100644 def py_exec(source, hide=False, store=None): -@@ -1471,7 +1470,7 @@ def py_exec(source, hide=False, store=None): +@@ -1471,7 +1467,7 @@ def py_exec(source, hide=False, store=None): else: locals = store #@ReservedAssignment @@ -4275,7 +4530,7 @@ index 22e7405..c408ad4 100644 def py_eval_bytecode(bytecode, globals=None, locals=None): #@ReservedAssignment -@@ -1485,7 +1484,7 @@ def py_eval_bytecode(bytecode, globals=None, locals=None): #@ReservedAssignment +@@ -1485,7 +1481,7 @@ def py_eval_bytecode(bytecode, globals=None, locals=None): #@ReservedAssignment return eval(bytecode, globals, locals) def py_eval(code, globals=None, locals=None): #@ReservedAssignment @@ -4284,7 +4539,7 @@ index 22e7405..c408ad4 100644 code = py_compile(code, 'eval') return py_eval_bytecode(code, globals, locals) -@@ -1505,7 +1504,7 @@ def raise_at_location(e, loc): +@@ -1505,7 +1501,7 @@ def raise_at_location(e, loc): code = compile(node, filename, 'exec') # PY3 - need to change to exec(). @@ -4293,7 +4548,7 @@ index 22e7405..c408ad4 100644 # This was used to proxy accesses to the store. Now it's kept around to deal -@@ -1524,18 +1523,18 @@ class StoreProxy(object): +@@ -1524,18 +1520,18 @@ class StoreProxy(object): # Code for pickling bound methods. def method_pickle(method): @@ -4365,10 +4620,17 @@ index 4a537eb..b393a53 100644 raise renpy.parser.ParseError( filename, diff --git a/renpy/script.py b/renpy/script.py -index 61d6b5f..8773787 100644 +index 61d6b5f..98a6857 100644 --- a/renpy/script.py +++ b/renpy/script.py -@@ -33,7 +33,7 @@ import marshal +@@ -27,13 +27,13 @@ import renpy + import os + import imp + import difflib +-import md5 ++import hashlib + import time + import marshal import struct import zlib @@ -4386,7 +4648,17 @@ index 61d6b5f..8773787 100644 else: self.key = None -@@ -195,7 +195,7 @@ class Script(object): +@@ -130,7 +130,8 @@ class Script(object): + + self.serial = 0 + +- self.digest = md5.md5(renpy.version_only) ++ self.digest = hashlib.md5(renpy.version_only) ++ self.md5 = hashlib.md5 + + self.loaded_rpy = False + self.backup_list = [ ] +@@ -195,7 +196,7 @@ class Script(object): continue try: @@ -4395,7 +4667,7 @@ index 61d6b5f..8773787 100644 except: pass -@@ -402,7 +402,7 @@ class Script(object): +@@ -402,7 +403,7 @@ class Script(object): name = node.name if name in self.namemap: @@ -4404,7 +4676,7 @@ index 61d6b5f..8773787 100644 bad_name = name bad_node = node old_node = self.namemap[name] -@@ -566,7 +566,7 @@ class Script(object): +@@ -566,7 +567,7 @@ class Script(object): self.assign_names(stmts, fullfn) try: @@ -4413,7 +4685,16 @@ index 61d6b5f..8773787 100644 self.write_rpyc_header(f) self.write_rpyc_data(f, 1, dumps((data, stmts), 2)) -@@ -615,7 +615,7 @@ class Script(object): +@@ -579,7 +580,7 @@ class Script(object): + self.write_rpyc_data(f, 2, dumps((data, stmts), 2)) + + with open(fullfn, "rU") as fullf: +- rpydigest = md5.md5(fullf.read()).digest() ++ rpydigest = hashlib.md5(fullf.read()).digest() + + self.write_rpyc_md5(f, rpydigest) + +@@ -615,7 +616,7 @@ class Script(object): return None, None if data is None: @@ -4422,7 +4703,37 @@ index 61d6b5f..8773787 100644 return None, None if not isinstance(data, dict): -@@ -698,11 +698,11 @@ class Script(object): +@@ -652,8 +653,8 @@ class Script(object): + raise Exception("Could not load from archive %s." % (lastfn,)) + + f = renpy.loader.load(fn + compiled) +- f.seek(-md5.digest_size, 2) +- digest = f.read(md5.digest_size) ++ f.seek(-self.md5.digest_size, 2) ++ digest = f.read(self.md5.digest_size) + f.close() + + else: +@@ -667,15 +668,15 @@ class Script(object): + + if os.path.exists(rpyfn): + with open(rpyfn, "rU") as f: +- rpydigest = md5.md5(f.read()).digest() ++ rpydigest = hashlib.md5(f.read()).digest() + else: + rpydigest = None + + try: + if os.path.exists(rpycfn): + with open(rpycfn, "rb") as f: +- f.seek(-md5.digest_size, 2) +- rpycdigest = f.read(md5.digest_size) ++ f.seek(-self.md5.digest_size, 2) ++ rpycdigest = f.read(self.md5.digest_size) + else: + rpycdigest = None + except: +@@ -698,11 +699,11 @@ class Script(object): data, stmts = self.load_file(dir, fn + compiled) if data is None: @@ -4436,7 +4747,7 @@ index 61d6b5f..8773787 100644 raise pass -@@ -781,7 +781,7 @@ class Script(object): +@@ -781,7 +782,7 @@ class Script(object): elif i.mode == 'eval': code = renpy.python.py_compile_eval_bytecode(i.source, filename=i.location[0], lineno=i.location[1]) @@ -4484,7 +4795,7 @@ index 92994d0..6818c59 100644 new_stmts.append(i) diff --git a/renpy/sl2/slast.py b/renpy/sl2/slast.py -index defd86f..37022db 100644 +index defd86f..78c2f01 100644 --- a/renpy/sl2/slast.py +++ b/renpy/sl2/slast.py @@ -30,7 +30,7 @@ @@ -4496,7 +4807,17 @@ index defd86f..37022db 100644 import zlib import renpy.display -@@ -1398,7 +1398,7 @@ class SLFor(SLBlock): +@@ -43,7 +43,8 @@ from renpy.display.predict import displayable as predict_displayable + + from renpy.python import py_eval_bytecode + from renpy.pyanalysis import Analysis, NOT_CONST, GLOBAL_CONST, ccache +-import md5 ++import hashlib ++md5 = hashlib.md5 + + # This file contains the abstract syntax tree for a screen language + # screen. +@@ -1398,7 +1399,7 @@ class SLFor(SLBlock): if c is None: return @@ -4505,7 +4826,7 @@ index defd86f..37022db 100644 for i in self.children: i.copy_on_change(child_cache) -@@ -1422,7 +1422,7 @@ class SLPython(SLNode): +@@ -1422,7 +1423,7 @@ class SLPython(SLNode): analysis.python(self.code.source) def execute(self, context): @@ -4854,6 +5175,22 @@ index 0d78ddf..748dbbd 100644 new_tokens.append((kind2, text2)) +diff --git a/renpy/text/textsupport.pyx b/renpy/text/textsupport.pyx +index feabbc3..5b31613 100644 +--- a/renpy/text/textsupport.pyx ++++ b/renpy/text/textsupport.pyx +@@ -392,9 +392,9 @@ def linebreak_debug(list glyphs): + if g.split == SPLIT_INSTEAD: + rv += "|" + elif g.split == SPLIT_BEFORE: +- rv += "[" + unichr(g.character) ++ rv += "[" + chr(g.character) + else: +- rv += unichr(g.character) ++ rv += chr(g.character) + + return rv + diff --git a/renpy/translation.py b/renpy/translation.py index 3b62fee..0cd1150 100644 --- a/renpy/translation.py @@ -5022,10 +5359,18 @@ index 464440b..26ee95d 100644 if isinstance(v, Wrapper): v.name = k diff --git a/renpy/warp.py b/renpy/warp.py -index 41bd1be..a81102a 100644 +index 41bd1be..8675c4e 100644 --- a/renpy/warp.py +++ b/renpy/warp.py -@@ -56,7 +56,7 @@ def warp(): +@@ -24,7 +24,6 @@ + # location. + + import renpy +-import sets + + warp_spec = None + +@@ -56,7 +55,7 @@ def warp(): prev = { } @@ -5034,7 +5379,7 @@ index 41bd1be..a81102a 100644 seenset = sets.Set(workset) # This is called to indicate that next can be executed following node. -@@ -100,7 +100,7 @@ def warp(): +@@ -100,7 +99,7 @@ def warp(): add(n, n.get_next()) elif getattr(n, 'next', None) is not None: |