Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generates DeprecationWarning in Python 3.5 and newer due to use of inspect.getargspec() #159

Open
rhertzog opened this issue Nov 10, 2017 · 2 comments · May be fixed by #206
Open

Generates DeprecationWarning in Python 3.5 and newer due to use of inspect.getargspec() #159

rhertzog opened this issue Nov 10, 2017 · 2 comments · May be fixed by #206

Comments

@rhertzog
Copy link
Contributor

Trying to run one of my code base in a warning-free manner resulted in this warning being emitted:

  File "/usr/lib/python3/dist-packages/pysimplesoap/transport.py", line 106, in <module>
    if 'timeout' in inspect.getargspec(httplib2.Http.__init__)[0]:
  File "/usr/lib/python3.5/inspect.py", line 1046, in getargspec
    stacklevel=2)
DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead

Can you update your code to not generate this warning? Thank you in advance.

@baryluk
Copy link

baryluk commented Nov 15, 2020

Same issue here using pysimplesoap 1.16.2:

/usr/lib/python3/dist-packages/pysimplesoap/transport.py:109: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
  if 'timeout' in inspect.getargspec(httplib2.Http.__init__)[0]:

@jelmer
Copy link

jelmer commented Jan 10, 2023

inspect.getargspec is completely gone in 3.11, breaking pysimplesoap:

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-ra2sor70/pysimplesoap_fb71047d4ddf4e38bb661dca2aae5304/setup.py", line 15, in <module>
          from pysimplesoap import __version__, __author__, __author_email__, __license__
        File "/tmp/pip-install-ra2sor70/pysimplesoap_fb71047d4ddf4e38bb661dca2aae5304/pysimplesoap/__init__.py", line 16, in <module>
          from . import client, server, simplexml, transport
        File "/tmp/pip-install-ra2sor70/pysimplesoap_fb71047d4ddf4e38bb661dca2aae5304/pysimplesoap/client.py", line 33, in <module>
          from .transport import get_http_wrapper, set_http_wrapper, get_Http
        File "/tmp/pip-install-ra2sor70/pysimplesoap_fb71047d4ddf4e38bb661dca2aae5304/pysimplesoap/transport.py", line 109, in <module>
          if 'timeout' in inspect.getargspec(httplib2.Http.__init__)[0]:
                          ^^^^^^^^^^^^^^^^^^
      AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
      [end of output]

jelmer added a commit to jelmer/pysimplesoap that referenced this issue Jan 10, 2023
This function is removed in Python 3.11 and has been deprecated for a
while. Use inspect.getfullargspec instead, which is also backwards
compatible with Python 2.

Fixes pysimplesoap#159
@jelmer jelmer linked a pull request Jan 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants