Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix _PyObject_LookupAttrId for Python 3.13 #17505

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
Jul 7, 2024

Conversation

cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Jul 7, 2024

_PyObject_LookupAttrId was removed / replaced with PyObject_GetOptionalAttrString in python/cpython#106522.
https://docs.python.org/dev/c-api/object.html#c.PyObject_GetOptionalAttrString

Fixes

  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h: In function ‘update_bases’: (diff)
  /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h:51:13: error: implicit declaration of function ‘_PyObject_LookupAttrId’; did you mean ‘_PyObject_GetAttrId’? [-Werror=implicit-function-declaration] (diff)
     51 |         if (_PyObject_LookupAttrId(base, &PyId___mro_entries__, &meth) < 0) { (diff)
        |             ^~~~~~~~~~~~~~~~~~~~~~ (diff)
        |             _PyObject_GetAttrId (diff)

@cdce8p cdce8p added the topic-mypyc mypyc bugs label Jul 7, 2024
@hauntsaninja hauntsaninja merged commit 7f67090 into python:master Jul 7, 2024
14 checks passed
@cdce8p cdce8p deleted the fix-3.13-lookup-attr branch July 7, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-mypyc mypyc bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants