Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
730641e3
Commit
730641e3
authored
Feb 16, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate dotted filenames for package qualified module names.
Close #2686.
parent
531b9aa6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
0 deletions
+19
-0
CHANGES.rst
CHANGES.rst
+4
-0
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+8
-0
tests/build/dotted.filename.modules.pxd
tests/build/dotted.filename.modules.pxd
+0
-0
tests/build/dotted.filename.modules.pyx
tests/build/dotted.filename.modules.pyx
+7
-0
No files found.
CHANGES.rst
View file @
730641e3
...
...
@@ -163,6 +163,10 @@ Other changes
*
The
command
line
parser
was
rewritten
and
modernised
using
``
argparse
``.
Patch
by
Egor
Dranischnikow
.
(
Github
issue
#
2952
,
#
3001
)
*
Dotted
filenames
for
qualified
module
names
(``
pkg
.
mod
.
pyx
``)
are
deprecated
.
Use
the
normal
Python
package
directory
layout
instead
.
(
Github
issue
#
2686
)
*
Support
for
Python
2.6
was
removed
.
...
...
Cython/Compiler/Main.py
View file @
730641e3
...
...
@@ -494,6 +494,12 @@ def run_pipeline(source, options, full_module_name=None, context=None):
pipeline
=
Pipeline
.
create_pyx_pipeline
(
context
,
options
,
result
)
context
.
setup_errors
(
options
,
result
)
if
'.'
in
full_module_name
and
'.'
in
os
.
path
.
splitext
(
os
.
path
.
basename
(
abs_path
))[
0
]:
warning
((
source_desc
,
1
,
0
),
"Dotted filenames ('%s') are deprecated."
" Please use the normal Python package directory layout."
%
os
.
path
.
basename
(
abs_path
),
level
=
1
)
err
,
enddata
=
Pipeline
.
run_pipeline
(
pipeline
,
source
)
context
.
teardown_errors
(
err
,
options
,
result
)
return
result
...
...
@@ -650,6 +656,8 @@ 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
)
return
path
# search for filename in package structure e.g. <dir>/foo/bar.pxd or <dir>/foo/bar/__init__.pxd
...
...
tests/build/dotted.filename.modules.pxd
0 → 100644
View file @
730641e3
tests/build/dotted.filename.modules.pyx
0 → 100644
View file @
730641e3
# mode: compile
# tag: warnings
_WARNINGS
=
"""
1:0: Dotted filenames ('dotted.filename.modules.pxd') are deprecated. Please use the normal Python package directory layout.
1:0: Dotted filenames ('dotted.filename.modules.pyx') are deprecated. Please use the normal Python package directory layout.
"""
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