Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b3e73b30
Commit
b3e73b30
authored
Jul 15, 2016
by
Brett Cannon
Browse files
Options
Browse Files
Download
Plain Diff
Merge for #27083
parents
33ed881f
a47a7a5b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2354 additions
and
2346 deletions
+2354
-2346
Lib/importlib/_bootstrap_external.py
Lib/importlib/_bootstrap_external.py
+2
-1
Lib/test/test_importlib/source/test_case_sensitivity.py
Lib/test/test_importlib/source/test_case_sensitivity.py
+9
-6
Misc/NEWS
Misc/NEWS
+2
-0
Python/importlib_external.h
Python/importlib_external.h
+2341
-2339
No files found.
Lib/importlib/_bootstrap_external.py
View file @
b3e73b30
...
@@ -29,7 +29,8 @@ def _make_relax_case():
...
@@ -29,7 +29,8 @@ def _make_relax_case():
if
sys
.
platform
.
startswith
(
_CASE_INSENSITIVE_PLATFORMS
):
if
sys
.
platform
.
startswith
(
_CASE_INSENSITIVE_PLATFORMS
):
def
_relax_case
():
def
_relax_case
():
"""True if filenames must be checked case-insensitively."""
"""True if filenames must be checked case-insensitively."""
return
b'PYTHONCASEOK'
in
_os
.
environ
return
(
b'PYTHONCASEOK'
in
_os
.
environ
or
'PYTHONCASEOK'
in
_os
.
environ
)
else
:
else
:
def
_relax_case
():
def
_relax_case
():
"""True if filenames must be checked case-insensitively."""
"""True if filenames must be checked case-insensitively."""
...
...
Lib/test/test_importlib/source/test_case_sensitivity.py
View file @
b3e73b30
...
@@ -38,12 +38,17 @@ class CaseSensitivityTest:
...
@@ -38,12 +38,17 @@ class CaseSensitivityTest:
insensitive_finder
=
self
.
finder
(
insensitive_path
)
insensitive_finder
=
self
.
finder
(
insensitive_path
)
return
self
.
find
(
sensitive_finder
),
self
.
find
(
insensitive_finder
)
return
self
.
find
(
sensitive_finder
),
self
.
find
(
insensitive_finder
)
def
env_changed
(
self
,
*
,
should_exist
):
possibilities
=
b'PYTHONCASEOK'
,
'PYTHONCASEOK'
if
any
(
x
in
self
.
importlib
.
_bootstrap_external
.
_os
.
environ
for
x
in
possibilities
)
==
should_exist
:
self
.
skipTest
(
'os.environ changes not reflected in '
'_os.environ'
)
def
test_sensitive
(
self
):
def
test_sensitive
(
self
):
with
test_support
.
EnvironmentVarGuard
()
as
env
:
with
test_support
.
EnvironmentVarGuard
()
as
env
:
env
.
unset
(
'PYTHONCASEOK'
)
env
.
unset
(
'PYTHONCASEOK'
)
if
b'PYTHONCASEOK'
in
self
.
importlib
.
_bootstrap_external
.
_os
.
environ
:
self
.
env_changed
(
should_exist
=
False
)
self
.
skipTest
(
'os.environ changes not reflected in '
'_os.environ'
)
sensitive
,
insensitive
=
self
.
sensitivity_test
()
sensitive
,
insensitive
=
self
.
sensitivity_test
()
self
.
assertIsNotNone
(
sensitive
)
self
.
assertIsNotNone
(
sensitive
)
self
.
assertIn
(
self
.
name
,
sensitive
.
get_filename
(
self
.
name
))
self
.
assertIn
(
self
.
name
,
sensitive
.
get_filename
(
self
.
name
))
...
@@ -52,9 +57,7 @@ class CaseSensitivityTest:
...
@@ -52,9 +57,7 @@ class CaseSensitivityTest:
def
test_insensitive
(
self
):
def
test_insensitive
(
self
):
with
test_support
.
EnvironmentVarGuard
()
as
env
:
with
test_support
.
EnvironmentVarGuard
()
as
env
:
env
.
set
(
'PYTHONCASEOK'
,
'1'
)
env
.
set
(
'PYTHONCASEOK'
,
'1'
)
if
b'PYTHONCASEOK'
not
in
self
.
importlib
.
_bootstrap_external
.
_os
.
environ
:
self
.
env_changed
(
should_exist
=
True
)
self
.
skipTest
(
'os.environ changes not reflected in '
'_os.environ'
)
sensitive
,
insensitive
=
self
.
sensitivity_test
()
sensitive
,
insensitive
=
self
.
sensitivity_test
()
self
.
assertIsNotNone
(
sensitive
)
self
.
assertIsNotNone
(
sensitive
)
self
.
assertIn
(
self
.
name
,
sensitive
.
get_filename
(
self
.
name
))
self
.
assertIn
(
self
.
name
,
sensitive
.
get_filename
(
self
.
name
))
...
...
Misc/NEWS
View file @
b3e73b30
...
@@ -10,6 +10,8 @@ What's New in Python 3.6.0 alpha 4
...
@@ -10,6 +10,8 @@ What's New in Python 3.6.0 alpha 4
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #27083: Respect the PYTHONCASEOK environment variable under Windows.
- Issue #27514: Make having too many statically nested blocks a SyntaxError
- Issue #27514: Make having too many statically nested blocks a SyntaxError
instead of SystemError.
instead of SystemError.
...
...
Python/importlib_external.h
View file @
b3e73b30
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment