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

test_inspect_wrapped_property fails #577

Open
doronbehar opened this issue Apr 15, 2024 · 2 comments · May be fixed by #578
Open

test_inspect_wrapped_property fails #577

doronbehar opened this issue Apr 15, 2024 · 2 comments · May be fixed by #578

Comments

@doronbehar
Copy link

In a batch of python updates to NixOS, we experienced this error:

=================================== FAILURES ===================================
________________________ test_inspect_wrapped_property _________________________

    def test_inspect_wrapped_property():
        class Wrapped(object):
            def __init__(self, func):
                self.func = func
    
            def __call__(self, *args, **kwargs):
                return self.func(*args, **kwargs)
    
            @property
            def __wrapped__(self):
                return self.func
    
        func = lambda x: x
        wrapped = Wrapped(func)
        assert inspect.signature(func) == inspect.signature(wrapped)
    
>       assert num_required_args(Wrapped) is None
E       AssertionError: assert 1 is None
E        +  where 1 = num_required_args(<class 'test_inspect_args.test_inspect_wrapped_property.<locals>.Wrapped'>)

toolz/tests/test_inspect_args.py:485: AssertionError
algitbot pushed a commit to alpinelinux/aports that referenced this issue Apr 17, 2024
@shadchin
Copy link

Fail on Python 3.11.9 or Python 3.12.3

@cjwatson
Copy link

This was probably due to python/cpython@59167c9, which was cherry-picked into both 3.11.9 and 3.12.3.

cjwatson added a commit to cjwatson/toolz that referenced this issue Apr 24, 2024
@cjwatson cjwatson linked a pull request Apr 24, 2024 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