-
Notifications
You must be signed in to change notification settings - Fork 94
Description
After the beta release, something in the Python code had changed that prevents patching open as before.
As before open is still an alias to io.open (or vice verse), but patching io does no longer patch open.
I tried to patch builtins as had been done in Python2, but that does only work if directly importing open from builtins.
As a temporary workaround, I'm now patching open directly, which breaks skip modules for open, and importing open or io.open using another name (e.g. import open as _open). There are 4 respective tests that are currently disabled for Python 3.12.
I could not find the relevant change in the Python code yet. Have to check again once beta 2 is released, just in case this change is reverted (though I doubt that).
Edit: still true for Python 3.12.0.