Skip to content

[3.10] bpo-35753: Fix crash in doctest with unwrap-able functions (GH-22981) #25926

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
May 5, 2021

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 5, 2021

Ignore objects that inspect.unwrap throws due to
too many wrappers. This is a very rare case, however
it can easily be surfaced when a module under doctest
imports unitest.mock.call into its namespace.

We simply skip any object that throws this exception.
This should handle the majority of cases.
(cherry picked from commit 565a318)

Co-authored-by: Alfred Perlstein [email protected]

https://bugs.python.org/issue35753

…22981)

Ignore objects that inspect.unwrap throws due to
too many wrappers.  This is a very rare case, however
it can easily be surfaced when a module under doctest
imports unitest.mock.call into its namespace.

We simply skip any object that throws this exception.
This should handle the majority of cases.
(cherry picked from commit 565a318)

Co-authored-by: Alfred Perlstein <[email protected]>
@miss-islington
Copy link
Contributor Author

@splbio and @ambv: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@splbio and @ambv: Status check is done, and it's a success ✅ .

@ambv ambv merged commit 10d6f6b into python:3.10 May 5, 2021
@bedevere-bot
Copy link

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

@miss-islington miss-islington deleted the backport-565a318-3.10 branch May 5, 2021 18:01
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.

5 participants