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

Deprecation Warning: inspect.getargspec and formatargspec #7

Open
daniel-farrell-blockfi opened this issue Sep 14, 2022 · 4 comments
Open

Comments

@daniel-farrell-blockfi
Copy link

../usr/local/lib/python3.10/site-packages/urllib3_mock.py:45
  /usr/local/lib/python3.10/site-packages/urllib3_mock.py:45: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
    args, a, kw, defaults = inspect.getargspec(func)

../usr/local/lib/python3.10/site-packages/urllib3_mock.py:47
  /usr/local/lib/python3.10/site-packages/urllib3_mock.py:47: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
    signature = inspect.formatargspec(args, a, kw, defaults)

../usr/local/lib/python3.10/site-packages/urllib3_mock.py:51
  /usr/local/lib/python3.10/site-packages/urllib3_mock.py:51: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
    callargs = inspect.formatargspec(args, a, kw, None)
@daniel-farrell-blockfi daniel-farrell-blockfi changed the title Deprecation Warning: inspect.getarbspec and inspect.formatargspec Deprecation Warning: inspect.getargspec and formatargspec Sep 14, 2022
@rskntroot
Copy link

bump

../urllib3_mock.py:45: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
    args, a, kw, defaults = inspect.getargspec(func)
../urllib3_mock.py:47: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
    args, a, kw, defaults = inspect.getargspec(func)
../urllib3_mock.py:51: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
    args, a, kw, defaults = inspect.getargspec(func)

please switching signature

@phillipuniverse
Copy link

Fully fails on Python 3.11:

../../../../Library/Caches/pypoetry/virtualenvs/iThYBuBH-py3.11/lib/python3.11/site-packages/urllib3_mock.py:135: in activate
    return get_wrapped(func, _wrapper_template, evaldict)
../../../../Library/Caches/pypoetry/virtualenvs/iThYBuBH-py3.11/lib/python3.11/site-packages/urllib3_mock.py:45: in get_wrapped
    args, a, kw, defaults = inspect.getargspec(func)
E   AttributeError: module 'inspect' has no attribute 'getargspec'

@matthewdeanmartin
Copy link

This hasn't been touched in 7 years, I'm going to guess it is abandoned and if we want a urllib3 specific mocking library someone will need to fork & publish.

@jhamon
Copy link

jhamon commented Oct 13, 2023

Can anyone recommend a good alternative package?

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

No branches or pull requests

5 participants