Skip to content

bpo-38291: Fix a spurious warning when using help(object) #27039

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 2 commits into from
Jul 6, 2021

Conversation

srittau
Copy link
Contributor

@srittau srittau commented Jul 5, 2021

https://bugs.python.org/issue38291

Automerge-Triggered-By: GH:gvanrossum

help(object) via pydoc.TextDoc.docclass(object) iterates over the
subclasses of object, which includes typing.io and typing.re if typing
is imported. It tries to access cls.__module__ for each of those
sub-classes. This change suppresses warnings when accessing
cls.__module__.
@srittau
Copy link
Contributor Author

srittau commented Jul 5, 2021

This should not need a NEWS entry per:

These are the two exceptions:

  1. [...]
  2. If a change is a fix (or other adjustment) to an earlier unreleased change and the original NEWS entry remains valid, then no additional entry is needed.

@srittau
Copy link
Contributor Author

srittau commented Jul 5, 2021

The Azure build failure seems unrelated.

@miss-islington
Copy link
Contributor

@srittau: Status check is done, and it's a success ❌ .

@srittau
Copy link
Contributor Author

srittau commented Jul 6, 2021

This time, Azure passes, but the address sanitizer(?) test times out. Looks like an unrelated multiprocessing error, possibly a race condition.

@gvanrossum
Copy link
Member

Alas, we have to close and reopen the PR to make the last test pass (hopefully), GitHub won't let me merge without that.

@gvanrossum gvanrossum closed this Jul 6, 2021
@gvanrossum gvanrossum reopened this Jul 6, 2021
@miss-islington
Copy link
Contributor

@srittau: Status check is done, and it's a success ❌ .

2 similar comments
@miss-islington
Copy link
Contributor

@srittau: Status check is done, and it's a success ❌ .

@miss-islington
Copy link
Contributor

@srittau: Status check is done, and it's a success ❌ .

@gvanrossum gvanrossum merged commit 8b849ea into python:main Jul 6, 2021
@bedevere-bot
Copy link

@gvanrossum: Please replace # with GH- in the commit message next time. Thanks!

@gvanrossum
Copy link
Member

Is a backport needed?

@srittau srittau deleted the typing-io branch July 6, 2021 15:27
@srittau
Copy link
Contributor Author

srittau commented Jul 6, 2021

Thanks and no backport needed, the original change is just in the 3.11 branch trunk.

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