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.

classification
Title: Reloading tokenize module leads to error
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Reloading tokenize breaks tokenize.open()
View: 23615
Assigned To: Nosy List: dmarks, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-03-26 11:17 by dmarks, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg239322 - (view) Author: David Marks (dmarks) Date: 2015-03-26 11:17
On 432 in tokenize.py there is an assignment

_builtin_open = open

Followed in 434 with a redefinition of open

def open(filename):

If the module is reloaded, _builtin_open gets reassigned to the new function and subsequent calls to _builtin_open fail.
msg239323 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-03-26 11:22
Fixed in issue23615.
History
Date User Action Args
2022-04-11 14:58:14adminsetgithub: 67972
2015-03-26 15:01:10r.david.murraysetsuperseder: Reloading tokenize breaks tokenize.open()
resolution: fixed -> duplicate
2015-03-26 12:33:16vstinnersetresolution: out of date -> fixed
2015-03-26 11:22:42serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg239323

resolution: out of date
stage: resolved
2015-03-26 11:17:57dmarkscreate