Commit 1431cc4e authored by Stefan Behnel's avatar Stefan Behnel

Prevent false positives when issuing new "dotted filenames" warning.

See #2686.
parent 730641e3
......@@ -656,8 +656,9 @@ def search_include_directories(dirs, qualified_name, suffix, pos, include=False)
for dirname in dirs:
path = os.path.join(dirname, dotted_filename)
if os.path.exists(path):
warning(pos, "Dotted filenames ('%s') are deprecated."
" Please use the normal Python package directory layout." % dotted_filename, level=1)
if '.' in qualified_name and '.' in os.path.splitext(dotted_filename)[0]:
warning(pos, "Dotted filenames ('%s') are deprecated."
" Please use the normal Python package directory layout." % dotted_filename, level=1)
return path
# search for filename in package structure e.g. <dir>/foo/bar.pxd or <dir>/foo/bar/__init__.pxd
......
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