This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author davide.rizzo
Recipients davide.rizzo, martin.panter, pitrou, reidfaiv, rooter, serhiy.storchaka, vstinner
Date 2019-04-24.15:22:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556119344.27.0.138147884068.issue26528@roundup.psfhosted.org>
In-reply-to
Content
I've just stumbled on the same thing happening on some code that attempts to use logging on __del__.

Comparing dir(__builtins__) normally and on shutdown, these are missing:

['copyright', 'credits', 'exit', 'help', 'license', 'open', 'quit']

The traceback of the real error looks like this:

  [...]
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1383, in info
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1519, in _log
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1529, in handle
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1591, in callHandlers
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 905, in handle
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1131, in emit
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1121, in _open
NameError: name 'open' is not defined
History
Date User Action Args
2019-04-24 15:22:24davide.rizzosetrecipients: + davide.rizzo, pitrou, vstinner, martin.panter, serhiy.storchaka, reidfaiv, rooter
2019-04-24 15:22:24davide.rizzosetmessageid: <1556119344.27.0.138147884068.issue26528@roundup.psfhosted.org>
2019-04-24 15:22:24davide.rizzolinkissue26528 messages
2019-04-24 15:22:24davide.rizzocreate