Skip to content

[3.7] bpo-37173: Show passed class in inspect.getfile error (GH-13861)#13918

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-d407d2a-3.7
Jun 8, 2019
Merged

[3.7] bpo-37173: Show passed class in inspect.getfile error (GH-13861)#13918
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-d407d2a-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 8, 2019

Copy link
Copy Markdown
Contributor

Currently, inspect.getfile(str) will report nonsense:

>>> inspect.getfile(str)
TypeError: <module 'builtins' (built-in)> is a built-in class

This fixes that

https://bugs.python.org/issue37173
(cherry picked from commit d407d2a)

Co-authored-by: Philipp A flying-sheep@web.de

https://bugs.python.org/issue37173

Currently, inspect.getfile(str) will report nonsense:

```pytb
>>> inspect.getfile(str)
TypeError: <module 'builtins' (built-in)> is a built-in class
```

This fixes that

https://bugs.python.org/issue37173
(cherry picked from commit d407d2a)

Co-authored-by: Philipp A <flying-sheep@web.de>
@gpshead gpshead added 🤖 automerge type-bug An unexpected behavior, bug, or error labels Jun 8, 2019
@miss-islington

Copy link
Copy Markdown
Contributor Author

@flying-sheep: Status check is done, and it's a success ✅ .

@miss-islington
miss-islington merged commit 51c9cc7 into python:3.7 Jun 8, 2019
@miss-islington
miss-islington deleted the backport-d407d2a-3.7 branch June 8, 2019 15:27
@miss-islington

Copy link
Copy Markdown
Contributor Author

@flying-sheep: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants