Closed madeddy closed 4 months ago
Can confirm that this correctly fixes errors introduced in new ren'py versions.
This pull req fixes all known bugs(state 22.May'23) within Renpy 8 and 7.5 branches due to code changes there. RenPy 8 however needs also the py3 port for unrpyc(#159)!
Considering the above line this should effectively close the issues #146, #147, #149, #152, #156.
- adds in unrpyc.py Pythons
set()
to fakeclass factory RenPy 7.5.0 changes #146#issue-1290636410- adds instance-switch workaround in unrpyc.py relating revertable-fakeclass module name changes (see issue above)
- changed condition check in util.py to circumvent sometimes missing
arginfo
attributes RenPy 7.5.0 changes #146#issuecomment-1175599505- changed magic.py to circumvent new init-state of class
args/kwargs
FakeUnpicklingError and TypeError #149#issue-1315594422 (fix adapted from RevertableDict (Workaround - Fix?) #156#issue-1416743346)- removes
frozenset()
to reflect removal in Renpy (in renpy < 7.5 maybe still needed) see Remove frozenset from the revertableset methods renpy/renpy#3414A complete branch for RenPy 8, which already includes the Py3 port, is available here: https://github.com/madeddy/unrpyc/tree/py3_v1.1.8 For RenPy 7.5 should this branch work "as it is".
thank you so much!! this py works perfectly for me!! problem solved👍
Heya, I've folded a few of these issues into dev right now, some notes on what I did take and didn't take:
frozenset
support in astdump.py
. It is still a python builtin type, and as such can easily appear in files. Ren'py did not remove it from the code base, they just removed a single mention of it that caused it to almost always end up in AST structures. No reason to remove it.magic.py
was needed for for now, might be for 8.0 compat. I'm not there yet.RevertableList
/Dict
/Set
to both renpy.python
and renpy.revertable
instead of just moving them to renpy.revertable
for backwards compatability. Possible footgun for isinstance checking on those, but you can just check their name then.I've also already added changes to parameter parsing as well, ren'py changed that significantly so it was a likely next crash for many other items. That said, I don't have test cases for that yet. I'll close this one for now, but I'm curious what the change in magic.py
was needed for.
Possible footgun for isinstance checking on those... 🤣
Indeed. That's why the revertable switch seemed practical at this time. We will see. 🤷🏻♂️
...but I'm curious what the change in
magic.py
was needed for.
I should have added a longer explanation. As far as i remember the vars there can now be empty instead with a value or None type. Without the change this errors then in v7.5+(?) and v8.
Your can see here the old variant of the fix which is a bit more self explaining i think.
Edit: Oh and here: Initial post, first error: #146
Traceback (most recent call last):
File "<unrpyc>", line 40, in decompile_game
File "<unrpyc>", line 32, in decompile_rpyc
File "<unrpyc>", line 27, in read_ast_from_file
File "<magic>", line 143, in safe_loads
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/pickle.py", line 864, in load
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python2.7/pickle.py", line 1139, in load_reduce
File "<magic>", line 24, in __new__
FakeUnpicklingError: <class 'set'> was instantiated with unexpected arguments ([],), {}
This pull req fixes all known bugs(state 22.May'23) within Renpy 8 and 7.5 branches due to code changes there. RenPy 8 however needs also the py3 port for unrpyc(#159)!
Considering the above line this should effectively close the issues #146, #147, #149, #152, #156.
set()
to fakeclass factory #146#issue-1290636410arginfo
attributes #146#issuecomment-1175599505args/kwargs
#149#issue-1315594422 (fix adapted from #156#issue-1416743346)frozenset()
to reflect removal in Renpy (in renpy < 7.5 maybe still needed) see https://github.com/renpy/renpy/pull/3414A complete branch for RenPy 8, which already includes the Py3 port, is available here: https://github.com/madeddy/unrpyc/tree/py3_v1.1.8 For RenPy 7.5 should this branch work "as it is".