Commit a52b16bb authored by Stefan Behnel's avatar Stefan Behnel

Disable the "dotted names not allowed" warning for include files, which may...

Disable the "dotted names not allowed" warning for include files, which may contain arbitrary directory paths and not just plain module names.
parent 9db1fc39
...@@ -658,7 +658,7 @@ def search_include_directories(dirs, qualified_name, suffix="", pos=None, includ ...@@ -658,7 +658,7 @@ def search_include_directories(dirs, qualified_name, suffix="", pos=None, includ
for dirname in dirs: for dirname in dirs:
path = os.path.join(dirname, dotted_filename) path = os.path.join(dirname, dotted_filename)
if os.path.exists(path): if os.path.exists(path):
if '.' in qualified_name and '.' in os.path.splitext(dotted_filename)[0]: if not include and '.' in qualified_name and '.' in os.path.splitext(dotted_filename)[0]:
warning(pos, "Dotted filenames ('%s') are deprecated." warning(pos, "Dotted filenames ('%s') are deprecated."
" Please use the normal Python package directory layout." % dotted_filename, level=1) " Please use the normal Python package directory layout." % dotted_filename, level=1)
return path return path
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment