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

bpo-41991: Remove _PyObject_HasAttrId #22629

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Oct 10, 2020

It can silence arbitrary exceptions.

https://bugs.python.org/issue41991

It can silence arbitrary exceptions.
Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks, Serhiy for cleaning up this !

@miss-islington
Copy link
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the capi-remove-_PyObject_HasAttrId branch October 10, 2020 19:23
@miss-islington
Copy link
Contributor

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 98c4433a81a4cd88c7438adbee1f2aa486188ca3 3.9

@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.9 only security fixes label Oct 10, 2020
xzy3 pushed a commit to xzy3/cpython that referenced this pull request Oct 18, 2020
It can silence arbitrary exceptions.
@serhiy-storchaka serhiy-storchaka removed their assignment Dec 29, 2020
freundTech added a commit to freundTech/mypy that referenced this pull request Mar 11, 2021
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
It can silence arbitrary exceptions.
freundTech added a commit to freundTech/mypy that referenced this pull request Mar 15, 2021
JukkaL pushed a commit to python/mypy that referenced this pull request Mar 16, 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.
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.

5 participants