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.

Title: fix tokenize so it can be reloaded
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, eric.araujo, georg.brandl, vstinner
Priority: normal Keywords: easy, patch

Created on 2011-01-31 04:04 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
tokenize_reload.diff brett.cannon, 2011-01-31 04:04 Make tokenize reloadable
Messages (3)
msg127570 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-01-31 04:04
The tokenize module stores the built-in open() module in a global assignment statement. Problem is that if you reload the module, that global assignment picks up the module's own open() that came into existence during the initial import.

The attached patch fixes this by having use instead of its own cached global version.
msg127926 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-02-04 19:37
msg129032 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-02-22 03:35
r88498 for 3.3
r88499 for 3.2
Date User Action Args
2022-04-11 14:57:12adminsetgithub: 55283
2011-02-22 03:35:40brett.cannonsetstatus: open -> closed
nosy: brett.cannon, georg.brandl, vstinner, eric.araujo
messages: + msg129032

resolution: fixed
stage: commit review -> resolved
2011-02-04 19:37:07eric.araujosetnosy: + eric.araujo
messages: + msg127926
2011-01-31 19:42:22brett.cannonsetassignee: georg.brandl -> brett.cannon
nosy: brett.cannon, georg.brandl, vstinner
versions: + Python 3.3, - Python 3.2
2011-01-31 04:04:10brett.cannoncreate