Replies: 11 comments 11 replies
-
Yeah, I should probably fix those
That one is a doozy. It might be a bit of a remnant from ren'py versions of days past. It might not be necessary any more I'd even half forgotten about it. But for a summary of what lead to that. When bootstrapping un.rpyc inside of ren'py, we have to perform a bit of a dance around the python import system. For that, it's useful to know what the import system actually does. It works in essentially the following steps:
Now ren'py inserts its own loader that handles importing of ren'py things. Which is very neat except we don't want to actually import ren'py things. So we remove that loader. Unfortunately that loader is/was also responsible for importing some python modules, IIRC like traceback and codecs. So after we remove that, we cannot import those properly any more. But by importing those before we remove the loader, we can ensure that their contents are in |
Beta Was this translation helpful? Give feedback.
-
Just so... For the pathlib pull i had some alternates instead of the nested triple for loop. e.g. i had this on in store: worklist = [elem for entry in args.file for globitem in glob_or_complain(entry)
for elem in traverse(globitem)] If you ever feel like making new pythonists cry, i think that's probably a way. I encountered something like this "thing" ~10 years ago and pulled my hair. Alternate 2 is the reverse: globlist = []
for entry in args.file:
globlist.extend([item for item in glob_or_complain(entry)])
worklist = []
for entry in globlist:
worklist.extend([ele for ele in traverse(entry)]) Interestingly as full comprehensions they would need a extra step, as they produce then list of lists(something i'm glad i got rid of) and would need flattening with |
Beta Was this translation helpful? Give feedback.
-
In the pathlib switch i mucked up some code in olli@tty2*blue $ python unrpyc.py /home/olli/.xlib/RPG/_test/OurBrightDays-0.1.3-pc/gam
File not found: /home/olli/.xlib/RPG/_test/OurBrightDays-0.1.3-pc/gam
Traceback (most recent call last):
File "/home/olli/Code/Git/unrpyc/unrpyc.py", line 334, in <module>
main()
File "/home/olli/Code/Git/unrpyc/unrpyc.py", line 284, in main
for globitem in glob_or_complain(entry):
TypeError: 'NoneType' object is not iterable Well. On top of this i noticed, If you don't do it before, i will fix this by return to the old test code in one of the next pulls i have in store. I mean this isn't badly needed in think. |
Beta Was this translation helpful? Give feedback.
-
It happens. That's why there's a |
Beta Was this translation helpful? Give feedback.
-
If its ok with you i have also another pull coming in time. With some cleanup of unused imports etc. and a lot of PEP8 which should improve readability a lot in some cases and also code quality. Could you when its opportune verify whats with the unused var in util.py#L446? Can this be removed or should there be a needed test which was never implemented? |
Beta Was this translation helpful? Give feedback.
-
I am trying to understand the "renpy" fake package and it would be nice if you could shine a bit light on this. |
Beta Was this translation helpful? Give feedback.
-
Alright. Just for info. A bit more complicated and more code changes as expected. At least i understand now why J.McBarn did go with two runs. Basically its still so, but i loop it after the first in the second without exit. So its as said in the "ish" just one argparse option. I waited with PRs about this for the other code merges, so i can rebase locally. This will then close #202, partly #211 and possibly also #183 with a second PR, as i overhauled the readme a bit for this. |
Beta Was this translation helpful? Give feedback.
-
Makes it sense to use the TL feature with option |
Beta Was this translation helpful? Give feedback.
-
On a side note about the spawn/fork start methods, don't know if you read it already: "Fork" is as standard on Linux on his way out with Python 3.14 and to be replaced by spawn. Maybe we should set it already to spawn on LX so we know already about future issues and have it on all OS on the same start method. |
Beta Was this translation helpful? Give feedback.
-
Well that was a bit of a wait, but doing it right now. |
Beta Was this translation helpful? Give feedback.
-
Very nice. I lost a bit track of what we did last, but i think we where basically done for the foreseeable future. Most of the issues left are minor or seldom used code things and older stuff, or not? Greets |
Beta Was this translation helpful? Give feedback.
-
Hi!
I noticed we have some small leftovers from the move to py3 and miscellaneous. I guess, even if they don't eat any bread, you want probably to address them at some point. I just write it down so it's not forgotten.
Beta Was this translation helpful? Give feedback.
All reactions