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

Redo pypy tp flags #4517

Merged
merged 5 commits into from
Dec 25, 2021
Merged

Redo pypy tp flags #4517

merged 5 commits into from
Dec 25, 2021

Conversation

mattip
Copy link
Contributor

@mattip mattip commented Dec 23, 2021

After testing #4509 on PyPy3.8, it became clear that I messed up the condition: PY_VERSION_HEX > 0x03080000 should have been PY_VERSION_HEX >= 0x03090000 since the intention was to match a future PyPy3.9 build and not match any PyPy3.8 build (which of course has PY_VERSION_HEX == 0x03081200.

Along the way, the next release of PyPy will change a non-compatible AttributeError into a TypeError.

Also PyPy 3.8 cleans up a singular/plural error message.

def f(a, b, /):
    pass

When calling f(3, b=4) CPython emits

TypeError: f() got some positional-only arguments passed as keyword arguments: 'b'

while PyPy emits

TypeError: f() got a positional-only argument passed as keyword argument: 'b'

For f(a=3, b=4), both implementations emit

TypeError: f() got some positional-only arguments passed as keyword arguments: 'a, b'

@scoder
Copy link
Contributor

scoder commented Dec 23, 2021

LGTM. Is this ready or do you expect more changes to come?

@mattip
Copy link
Contributor Author

mattip commented Dec 23, 2021

I think this is good to go, thanks. It seems to pass locally for both PyPy HEAD and the latest release (the one in the CI here).

@scoder scoder merged commit d8bcbda into cython:master Dec 25, 2021
@scoder
Copy link
Contributor

scoder commented Dec 25, 2021

Picked for 0.29.x in 29ad964

@mattip
Copy link
Contributor Author

mattip commented Dec 26, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants