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

Remove funcsigs as it is only for Python 3.3 and earlier #5168

Merged
merged 2 commits into from
Jul 10, 2022
Merged

Conversation

oz123
Copy link
Contributor

@oz123 oz123 commented Jul 8, 2022

funcsigs is a backport of the PEP 362_ function signature features from
Python 3.3's inspect_ module. The backport is compatible with Python 2.6, 2.7
as well as 3.3 and up. 3.2

There is only one place which is used in pip-shims, but the exception
will never happen on current supported versions of pipenv and Python.

https://github.com/sarugaku/pip-shims/blob/d165d55a53065d51aaaebde4124a98c6a8c9fcba/src/pip_shims/utils.py#L387

    try:
        signature = inspect.signature(fn_or_class)
    except AttributeError: # never reached on python 3.3 or later.
        import funcsigs

``funcsigs`` is a backport of the `PEP 362`_ function signature features from
Python 3.3's `inspect`_ module. The backport is compatible with Python 2.6, 2.7
as well as 3.3 and up. 3.2

There is only one place which is used in pip-shims, but the execption
will never happen on current supported versions of pipenv and Python.

https://github.com/sarugaku/pip-shims/blob/d165d55a53065d51aaaebde4124a98c6a8c9fcba/src/pip_shims/utils.py#L387

```
    try:
        signature = inspect.signature(fn_or_class)
    except AttributeError: # never reached on python 3.3 or later.
        import funcsigs

```
@oz123 oz123 requested a review from matteius July 8, 2022 19:50
@matteius
Copy link
Member

matteius commented Jul 8, 2022

Thanks for pointing this out @oz123 I created: https://github.com/sarugaku/pip-shims/pull/84/files
and: sarugaku/pip-shims#83

@matteius
Copy link
Member

matteius commented Jul 9, 2022

Can you add a news fragment? If you merge main in you'll get the fix I applied for the windows tests failing.

@oz123 oz123 merged commit d00cf8f into main Jul 10, 2022
@oz123 oz123 deleted the remove-funcsigs branch July 10, 2022 10:41
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 this pull request may close these issues.

2 participants