Skip to content

Commit bd55e76

Browse files
committed
replace the open impl with _pyio.open on first call to _io.open call
1 parent 0f60d76 commit bd55e76

File tree

1 file changed

+3
-0
lines changed
  • graalpython/lib-graalpython

1 file changed

+3
-0
lines changed

graalpython/lib-graalpython/_io.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,9 @@ class TextIOWrapper(_TextIOBase):
672672

673673
def open(*args, **kwargs):
674674
import _pyio
675+
import builtins
676+
setattr(builtins, 'open', _pyio.open)
677+
setattr(globals(), 'open', _pyio.open)
675678
return _pyio.open(*args, **kwargs)
676679

677680

0 commit comments

Comments
 (0)