• Victor Stinner's avatar
    (Merge 3.4) Issue #22599: Enhance tokenize.open() to be able to call it during · 9d279b87
    Victor Stinner yazdı
    Python finalization.
    
    Before the module kept a reference to the builtins module, but the module
    attributes are cleared during Python finalization. Instead, keep directly a
    reference to the open() function.
    
    This enhancement is not perfect, calling tokenize.open() can still fail if
    called very late during Python finalization.  Usually, the function is called
    by the linecache module which is called to display a traceback or emit a
    warning.
    9d279b87
test_traceback.py 17.9 KB