Commit ce2d24d
Victor Stinner
Fix test_undecodable_env of test_subproces for non-ASCII directory
This test was introduced by r80421 (issue #8391).
The fix: copy the environment variables instead of starting Python in an empty
environement. In an empty environment, the locale is C and Python uses ASCII
for the default file system encoding. The non-ASCII directory will be encoded
using surrogates, but Python3 is unable to load a module or package with a
filename using surrogates.
See issue #8242 for more information about running Python3 with a non-ascii
directory in an empty environement.1 parent 13bb71c commit ce2d24d
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
807 | 807 | | |
808 | 808 | | |
809 | 809 | | |
| 810 | + | |
| 811 | + | |
810 | 812 | | |
811 | 813 | | |
812 | | - | |
| 814 | + | |
813 | 815 | | |
814 | 816 | | |
815 | 817 | | |
816 | 818 | | |
817 | 819 | | |
818 | 820 | | |
819 | 821 | | |
| 822 | + | |
| 823 | + | |
820 | 824 | | |
821 | 825 | | |
822 | | - | |
| 826 | + | |
823 | 827 | | |
824 | 828 | | |
825 | 829 | | |
| |||
0 commit comments