forked from pytest-dev/pytest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid possible infinite recursion when writing pyc files in assert re…
…write What happens is that atomic_write on Python 2.7 on Windows will try to convert the paths to unicode, but this triggers the import of the encoding module for the file system codec, which in turn triggers the rewrite, which in turn again tries to import the module, and so on. This short-circuits the cases where we try to import another file when writing a pyc file; I don't expect this to affect anything because the only modules that could be affected are those imported by atomic_writes. Fix pytest-dev#3506
- Loading branch information
1 parent
9620b16
commit 14aa4d2
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix possible infinite recursion when writing ``.pyc`` files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters