summaryrefslogtreecommitdiff
path: root/Misc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-06-08 08:27:06 -0700
committerGitHub <noreply@github.com>2019-06-08 08:27:06 -0700
commit51c9cc73cb8768a691688755af0a8b6b12cf712c (patch)
tree727b4f77cb5da601d67cd9a78bac242fad2c4778 /Misc
parent10b4fd98142edef6ab7b034e10ae5c9551043999 (diff)
downloadcpython-git-51c9cc73cb8768a691688755af0a8b6b12cf712c.tar.gz
bpo-37173: Show passed class in inspect.getfile error (GH-13861)
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 d407d2a7265f6102e51a1d62b3fd28b4f7a78d16) Co-authored-by: Philipp A <flying-sheep@web.de>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2019-06-08-11-33-48.bpo-37173.0e_8gS.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-06-08-11-33-48.bpo-37173.0e_8gS.rst b/Misc/NEWS.d/next/Library/2019-06-08-11-33-48.bpo-37173.0e_8gS.rst
new file mode 100644
index 0000000000..e996f97ecd
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-06-08-11-33-48.bpo-37173.0e_8gS.rst
@@ -0,0 +1 @@
+The exception message for ``inspect.getfile()`` now correctly reports the passed class rather than the builtins module. \ No newline at end of file