-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open not correctly patched with Python 3.12 #836
Labels
Comments
mrbean-bremen
changed the title
Open not correctly patched with Python3.12 beta1
Open not correctly patched with Python 3.12 beta1
May 29, 2023
Can you confirm the concrete Python version please. |
I had previously added support for Python 3.12 alpha 6, which worked fine (the changes were mainly related to |
mrbean-bremen
changed the title
Open not correctly patched with Python 3.12 beta1
Open not correctly patched with Python 3.12
Oct 8, 2023
mrbean-bremen
added a commit
to mrbean-bremen/pyfakefs
that referenced
this issue
Oct 8, 2023
- add patching _io, as this is used for io - add workaround for calling the real open_code (does not work yet under Windows) - add Python 3.12 to supported Python versions - fixes pytest-dev#836
6 tasks
mrbean-bremen
added a commit
that referenced
this issue
Oct 9, 2023
- add patching _io, as this is used for io - add workaround for calling the real open_code (does not work yet under Windows) - add Python 3.12 to supported Python versions - fixes #836
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After the beta release, something in the Python code had changed that prevents patching
open
as before.As before
open
is still an alias toio.open
(or vice verse), but patchingio
does no longer patchopen
.I tried to patch
builtins
as had been done in Python2, but that does only work if directly importingopen
frombuiltins
.As a temporary workaround, I'm now patching
open
directly, which breaks skip modules foropen
, and importingopen
orio.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.
The text was updated successfully, but these errors were encountered: