Skip to content

Fix mypyc failing to compile on CPython 3.10.0a6 (#10202) #57

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

Merged
merged 1 commit into from
Mar 17, 2021

Conversation

sthagen
Copy link
Owner

@sthagen sthagen commented Mar 17, 2021

  • Fix mypyc failing to compile on CPython 3.10.0a6

_PyObject_HasAttrId() has been removed in
python/cpython#22629

  • Keep using _PyObject_HasAttrId when python version is too old

We could potentionally already use _PyObject_LookupAttrId starting with
python 3.7 instead of 3.10. I'm not sure if we should switch as soon or
as late as possible.

Alternatively we could also try backporting _PyObject_LookupAttrId to
<3.7.

Have you read the Contributing Guidelines?

(Once you have, delete this section. If you leave it in, your PR may be closed without action.)

Description

(Explain how this PR changes mypy.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

* Fix mypyc failing to compile on CPython 3.10.0a6

_PyObject_HasAttrId() has been removed in
python/cpython#22629

* Keep using _PyObject_HasAttrId when python version is too old

We could potentionally already use _PyObject_LookupAttrId starting with
python 3.7 instead of 3.10. I'm not sure if we should switch as soon or
as late as possible.

Alternatively we could also try backporting _PyObject_LookupAttrId to
<3.7.
@sthagen sthagen merged commit 2d9b51c into sthagen:master Mar 17, 2021
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