Skip to content

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

Merged
ambv merged 1 commit into
python:3.10from
miss-islington:backport-565a318-3.10
May 5, 2021
Merged

[3.10] bpo-35753: Fix crash in doctest with unwrap-able functions (GH-22981)#25926
ambv merged 1 commit into
python:3.10from
miss-islington:backport-565a318-3.10

Conversation

@miss-islington

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

Copy link
Copy Markdown
Contributor

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 alfred@fb.com

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 <alfred@fb.com>
@miss-islington

Copy link
Copy Markdown
Contributor Author

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

@miss-islington

Copy link
Copy Markdown
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
Copy Markdown

@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