Commit e39ab940 authored by Stefan Behnel's avatar Stefan Behnel Committed by GitHub

Merge pull request #2904 from jdemeyer/remove_includes_deprecated

Remove Cython/Includes/Deprecated
parents 5c6a9024 d206ba81
...@@ -233,25 +233,6 @@ class Context(object): ...@@ -233,25 +233,6 @@ class Context(object):
# for a dotted filename, and its containing package root # for a dotted filename, and its containing package root
# directory is searched first for a non-dotted filename. # directory is searched first for a non-dotted filename.
pxd = self.search_include_directories(qualified_name, ".pxd", pos, sys_path=sys_path) pxd = self.search_include_directories(qualified_name, ".pxd", pos, sys_path=sys_path)
if pxd is None: # XXX Keep this until Includes/Deprecated is removed
if (qualified_name.startswith('python') or
qualified_name in ('stdlib', 'stdio', 'stl')):
standard_include_path = os.path.abspath(os.path.normpath(
os.path.join(os.path.dirname(__file__), os.path.pardir, 'Includes')))
deprecated_include_path = os.path.join(standard_include_path, 'Deprecated')
self.include_directories.append(deprecated_include_path)
try:
pxd = self.search_include_directories(qualified_name, ".pxd", pos)
finally:
self.include_directories.pop()
if pxd:
name = qualified_name
if name.startswith('python'):
warning(pos, "'%s' is deprecated, use 'cpython'" % name, 1)
elif name in ('stdlib', 'stdio'):
warning(pos, "'%s' is deprecated, use 'libc.%s'" % (name, name), 1)
elif name in ('stl'):
warning(pos, "'%s' is deprecated, use 'libcpp.*.*'" % name, 1)
if pxd is None and Options.cimport_from_pyx: if pxd is None and Options.cimport_from_pyx:
return self.find_pyx_file(qualified_name, pos) return self.find_pyx_file(qualified_name, pos)
return pxd return pxd
......
# Present for backwards compatibility
from cpython cimport *
# Present for backwards compatibility
from cpython.bool cimport *
# Present for backwards compatibility
from cpython.buffer cimport *
# Present for backwards compatibility
from cpython.bytes cimport *
# Present for backwards compatibility
from cpython.cobject cimport *
# Present for backwards compatibility
from cpython.complex cimport *
# Present for backwards compatibility
from cpython.dict cimport *
# Present for backwards compatibility
from cpython.exc cimport *
# Present for backwards compatibility
from cpython.float cimport *
# Present for backwards compatibility
from cpython.function cimport *
# Present for backwards compatibility
from cpython.getargs cimport *
# Present for backwards compatibility
from cpython.instance cimport *
# Present for backwards compatibility
from cpython.int cimport *
# Present for backwards compatibility
from cpython.iterator cimport *
# Present for backwards compatibility
from cpython.list cimport *
# Present for backwards compatibility
from cpython.long cimport *
# Present for backwards compatibility
from cpython.mapping cimport *
# Present for backwards compatibility
from cpython.mem cimport *
# Present for backwards compatibility
from cpython.method cimport *
# Present for backwards compatibility
from cpython.module cimport *
# Present for backwards compatibility
from cpython.number cimport *
# Present for backwards compatibility
from cpython.object cimport *
# Present for backwards compatibility
from cpython.oldbuffer cimport *
# Present for backwards compatibility
from cpython.pycapsule cimport *
# Present for backwards compatibility
from cpython.ref cimport *
# Present for backwards compatibility
from cpython.sequence cimport *
# Present for backwards compatibility
from cpython.set cimport *
# Present for backwards compatibility
from cpython.string cimport *
# Present for backwards compatibility
from cpython.tuple cimport *
# Present for backwards compatibility
from cpython.type cimport *
# Present for backwards compatibility
from cpython.unicode cimport *
# Present for backwards compatibility
from cpython.version cimport *
# Present for backwards compatibility
from cpython.weakref cimport *
# Present for backwards compatibility
from libc.stdio cimport *
# Present for backwards compatibility
from libc.stdlib cimport *
cdef extern from "<vector>" namespace std:
cdef cppclass vector[TYPE]:
#constructors
__init__()
__init__(vector&)
__init__(int)
__init__(int, TYPE&)
__init__(iterator, iterator)
#operators
TYPE& __getitem__(int)
TYPE& __setitem__(int, TYPE&)
vector __new__(vector&)
bool __eq__(vector&, vector&)
bool __ne__(vector&, vector&)
bool __lt__(vector&, vector&)
bool __gt__(vector&, vector&)
bool __le__(vector&, vector&)
bool __ge__(vector&, vector&)
#others
void assign(int, TYPE)
#void assign(iterator, iterator)
TYPE& at(int)
TYPE& back()
iterator begin()
int capacity()
void clear()
bool empty()
iterator end()
iterator erase(iterator)
iterator erase(iterator, iterator)
TYPE& front()
iterator insert(iterator, TYPE&)
void insert(iterator, int, TYPE&)
void insert(iterator, iterator)
int max_size()
void pop_back()
void push_back(TYPE&)
iterator rbegin()
iterator rend()
void reserve(int)
void resize(int)
void resize(int, TYPE&) #void resize(size_type num, const TYPE& = TYPE())
int size()
void swap(container&)
cdef extern from "<deque>" namespace std:
cdef cppclass deque[TYPE]:
#constructors
__init__()
__init__(deque&)
__init__(int)
__init__(int, TYPE&)
__init__(iterator, iterator)
#operators
TYPE& operator[]( size_type index );
const TYPE& operator[]( size_type index ) const;
deque __new__(deque&);
bool __eq__(deque&, deque&);
bool __ne__(deque&, deque&);
bool __lt__(deque&, deque&);
bool __gt__(deque&, deque&);
bool __le__(deque&, deque&);
bool __ge__(deque&, deque&);
#others
void assign(int, TYPE&)
void assign(iterator, iterator)
TYPE& at(int)
TYPE& back()
iterator begin()
void clear()
bool empty()
iterator end()
iterator erase(iterator)
iterator erase(iterator, iterator)
TYPE& front()
iterator insert(iterator, TYPE&)
void insert(iterator, int, TYPE&)
void insert(iterator, iterator, iterator)
int max_size()
void pop_back()
void pop_front()
void push_back(TYPE&)
void push_front(TYPE&)
iterator rbegin()
iterator rend()
void resize(int)
void resize(int, TYPE&)
int size()
void swap(container&)
...@@ -42,8 +42,7 @@ pxd_include_dirs = [ ...@@ -42,8 +42,7 @@ pxd_include_dirs = [
directory for directory, dirs, files directory for directory, dirs, files
in os.walk(os.path.join('Cython', 'Includes')) in os.walk(os.path.join('Cython', 'Includes'))
if '__init__.pyx' in files or '__init__.pxd' in files if '__init__.pyx' in files or '__init__.pxd' in files
or directory == os.path.join('Cython', 'Includes') or directory == os.path.join('Cython', 'Includes')]
or directory == os.path.join('Cython', 'Includes', 'Deprecated')]
pxd_include_patterns = [ pxd_include_patterns = [
p+'/*.pxd' for p in pxd_include_dirs ] + [ p+'/*.pxd' for p in pxd_include_dirs ] + [
......
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