Qirky / FoxDot

Python driven environment for Live Coding
http://foxdot.org
Other
1.03k stars 135 forks source link

getargspec #267

Open n-gram-hub opened 7 months ago

n-gram-hub commented 7 months ago

During the installation, after typing python -m FoxDot I get:

Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 148, in _get_module_details
  File "<frozen runpy>", line 112, in _get_module_details
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\__init__.py", line 106, in <module>
    from .lib import *
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\lib\__init__.py", line 12, in <module>
    from .TempoClock import *
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\lib\TempoClock.py", line 53, in <module>
    from .Players import Player
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\lib\Players.py", line 141, in <module>
    from .Key import *
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\lib\Key.py", line 3, in <module>
    from .Patterns import *
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\lib\Patterns\__init__.py", line 72, in <module>
    from .Main       import *
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\lib\Patterns\Main.py", line 81, in <module>
    class metaPattern(object):
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\lib\Patterns\Main.py", line 632, in metaPattern
    @loop_pattern_method
     ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ng\AppData\Local\Programs\Python\Python312\Lib\site-packages\FoxDot\lib\Patterns\Main.py", line 61, in loop_pattern_method
    new_function.argspec = inspect.getargspec(f)
                           ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

Is this a Python version issue?

HWiese1980 commented 5 months ago

Same. Any answer to this yet?

benmaier commented 4 months ago

has been removed in 3.11: https://docs.python.org/3.11/whatsnew/3.11.html#removed There's suggestions for alternative functions on the linked page. Or use FoxDot with a lower Python version

HWiese1980 commented 4 months ago

Right. Question is when it's going to be fixed. There already is an open PR addressing this. And seriously, this is a major road block!

benmaier commented 4 months ago

well, it doesn't look like development is active atm. But nothing stops you from forking and fixing things for your use case, does it? :)

HWiese1980 commented 4 months ago

Convenience does. But yeah, technically you're right.

lekstonjm commented 1 month ago

Apparently "getargspec" can be replaced by "getfullargspec". I replaced all occurrences and it works well, (just a little fix of another API break : "keywords" is no longer present and must be replaced by "kwonlyyagrs"). There is a MR ready that fix this, you can try this fork / branch to test it https://github.com/eevelweezel/FoxDot/tree/python311