You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
line 133 in CallTips.py of my install uses deprecated 'inspect.formatargspec'
From interactive session
- failure happens as soon as I type the '(' in >>>Base(
PythonWin 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32.
Portions Copyright 1994-2018 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
>>> class Base:
... def __new__(cls, *args):
... return object.__new__(cls).__init__(*args)
... def __init__(self, *args):
... print(args)
...
>>> BaseFailed to format the args
Traceback (most recent call last):
File "C:\Users\c32825\AppData\Local\Programs\Python\Python311\Lib\site-packages\pythonwin\pywin\idle\CallTips.py", line 133, in get_arg_text
argText = inspect.formatargspec(*inspect.getfullargspec(fob))
^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'formatargspec'
(
The text was updated successfully, but these errors were encountered:
scted
changed the title
inspect.formatargspec is deprecated in 3.11
install issue ... installed code uses deprecated inspect.formatargspec
Feb 24, 2023
This appears to be an issue with my install as the code in github has fixed the problem
I installed using pip ... python -m pip install pywin32 --upgrade
from CallTips.py in my install
if inspect.isfunction(fob) or inspect.ismethod(fob):
try:
argText = inspect.formatargspec(*inspect.getfullargspec(fob))
except:
print("Failed to format the args")
traceback.print_exc()
if inspect.isfunction(fob) or inspect.ismethod(fob):
try:
argText = str(inspect.signature(fob))
except:
print("Failed to format the args")
traceback.print_exc()
``
after a condescending comment on stackoverflow, i was able to ascertain that my install was from blob305 (Nov 7, 2022) and the fix to CallTips.py was subsequent to that
line 133 in CallTips.py of my install uses deprecated 'inspect.formatargspec'
From interactive session
- failure happens as soon as I type the '(' in >>>Base(
The text was updated successfully, but these errors were encountered: