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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
331d9d82
Commit
331d9d82
authored
Jan 05, 2019
by
Jon Dufresne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update URLs to https:// in docs and comments
parent
8ab83030
Changes
60
Show whitespace changes
Inline
Side-by-side
Showing
60 changed files
with
86 additions
and
88 deletions
+86
-88
CHANGES.rst
CHANGES.rst
+2
-2
Cython/Build/Dependencies.py
Cython/Build/Dependencies.py
+2
-2
Cython/Compiler/CmdLine.py
Cython/Compiler/CmdLine.py
+1
-1
Cython/Compiler/Errors.py
Cython/Compiler/Errors.py
+2
-2
Cython/Compiler/Options.py
Cython/Compiler/Options.py
+1
-1
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+1
-1
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-1
Cython/Debugger/libpython.py
Cython/Debugger/libpython.py
+3
-3
Cython/Includes/libc/time.pxd
Cython/Includes/libc/time.pxd
+1
-1
Cython/Includes/posix/dlfcn.pxd
Cython/Includes/posix/dlfcn.pxd
+1
-1
Cython/Includes/posix/mman.pxd
Cython/Includes/posix/mman.pxd
+1
-1
Cython/Includes/posix/resource.pxd
Cython/Includes/posix/resource.pxd
+1
-1
Cython/Includes/posix/stdio.pxd
Cython/Includes/posix/stdio.pxd
+1
-1
Cython/Includes/posix/stdlib.pxd
Cython/Includes/posix/stdlib.pxd
+1
-1
Cython/Includes/posix/time.pxd
Cython/Includes/posix/time.pxd
+1
-1
Cython/Includes/posix/wait.pxd
Cython/Includes/posix/wait.pxd
+1
-1
Cython/Utility/Buffer.c
Cython/Utility/Buffer.c
+2
-2
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+1
-1
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+1
-1
Cython/Utility/Optimize.c
Cython/Utility/Optimize.c
+1
-1
Demos/benchmarks/bpnn3.py
Demos/benchmarks/bpnn3.py
+1
-1
Demos/benchmarks/nqueens.py
Demos/benchmarks/nqueens.py
+1
-1
Demos/freeze/README.rst
Demos/freeze/README.rst
+2
-2
Doc/s5/cython-ep2008.txt
Doc/s5/cython-ep2008.txt
+3
-3
Doc/s5/ui/default/iepngfix.htc
Doc/s5/ui/default/iepngfix.htc
+1
-1
Doc/s5/ui/default/slides.js
Doc/s5/ui/default/slides.js
+1
-1
LICENSE.txt
LICENSE.txt
+1
-1
README.rst
README.rst
+3
-3
Tools/cython-mode.el
Tools/cython-mode.el
+1
-1
appveyor.yml
appveyor.yml
+1
-1
appveyor/install.ps1
appveyor/install.ps1
+1
-1
docs/README
docs/README
+1
-1
docs/TODO
docs/TODO
+1
-1
docs/index.rst
docs/index.rst
+1
-1
docs/sphinxext/cython_highlighting.py
docs/sphinxext/cython_highlighting.py
+1
-1
docs/src/quickstart/build.rst
docs/src/quickstart/build.rst
+2
-2
docs/src/quickstart/install.rst
docs/src/quickstart/install.rst
+2
-2
docs/src/quickstart/overview.rst
docs/src/quickstart/overview.rst
+3
-3
docs/src/tutorial/profiling_tutorial.rst
docs/src/tutorial/profiling_tutorial.rst
+2
-4
docs/src/tutorial/related_work.rst
docs/src/tutorial/related_work.rst
+1
-1
docs/src/tutorial/strings.rst
docs/src/tutorial/strings.rst
+2
-2
docs/src/userguide/external_C_code.rst
docs/src/userguide/external_C_code.rst
+1
-1
docs/src/userguide/memoryviews.rst
docs/src/userguide/memoryviews.rst
+1
-1
docs/src/userguide/numpy_pythran.rst
docs/src/userguide/numpy_pythran.rst
+2
-2
docs/src/userguide/numpy_tutorial.rst
docs/src/userguide/numpy_tutorial.rst
+3
-3
docs/src/userguide/pypy.rst
docs/src/userguide/pypy.rst
+1
-1
docs/src/userguide/pyrex_differences.rst
docs/src/userguide/pyrex_differences.rst
+1
-1
docs/src/userguide/source_files_and_compilation.rst
docs/src/userguide/source_files_and_compilation.rst
+1
-1
pyximport/pyxbuild.py
pyximport/pyxbuild.py
+1
-1
runtests.py
runtests.py
+1
-1
setup.py
setup.py
+2
-2
tests/memoryview/memoryview.pyx
tests/memoryview/memoryview.pyx
+1
-1
tests/memoryview/relaxed_strides.pyx
tests/memoryview/relaxed_strides.pyx
+3
-3
tests/run/clear_to_null.pyx
tests/run/clear_to_null.pyx
+1
-1
tests/run/no_gc_clear.pyx
tests/run/no_gc_clear.pyx
+1
-1
tests/run/pep448_test_extcall.pyx
tests/run/pep448_test_extcall.pyx
+1
-1
tests/run/test_coroutines_pep492.pyx
tests/run/test_coroutines_pep492.pyx
+4
-4
tests/run/test_fstring.pyx
tests/run/test_fstring.pyx
+1
-1
tests/run/test_unicode.pyx
tests/run/test_unicode.pyx
+1
-1
tests/run/yield_from_pep380.pyx
tests/run/yield_from_pep380.pyx
+1
-1
No files found.
CHANGES.rst
View file @
331d9d82
...
@@ -1634,7 +1634,7 @@ Features added
...
@@ -1634,7 +1634,7 @@ Features added
* Generators have new properties ``__name__`` and ``__qualname__``
* Generators have new properties ``__name__`` and ``__qualname__``
that provide the plain/qualified name of the generator function
that provide the plain/qualified name of the generator function
(following CPython 3.5). See http://bugs.python.org/issue21205
(following CPython 3.5). See http
s
://bugs.python.org/issue21205
* The ``inline`` function modifier is available as a decorator
* The ``inline`` function modifier is available as a decorator
``@cython.inline`` in pure mode.
``@cython.inline`` in pure mode.
...
@@ -1680,7 +1680,7 @@ Optimizations
...
@@ -1680,7 +1680,7 @@ Optimizations
evaluation and generally improves the code flow in the generated C code.
evaluation and generally improves the code flow in the generated C code.
* The Python expression "2 ** N" is optimised into bit shifting.
* The Python expression "2 ** N" is optimised into bit shifting.
See http://bugs.python.org/issue21420
See http
s
://bugs.python.org/issue21420
* Cascaded assignments (a = b = ...) try to minimise the number of
* Cascaded assignments (a = b = ...) try to minimise the number of
type coercions.
type coercions.
...
...
Cython/Build/Dependencies.py
View file @
331d9d82
...
@@ -792,7 +792,7 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
...
@@ -792,7 +792,7 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
filepattern
=
cython_sources
[
0
]
filepattern
=
cython_sources
[
0
]
if
len
(
cython_sources
)
>
1
:
if
len
(
cython_sources
)
>
1
:
print
(
"Warning: Multiple cython sources found for extension '%s': %s
\
n
"
print
(
"Warning: Multiple cython sources found for extension '%s': %s
\
n
"
"See http://cython.readthedocs.io/en/latest/src/userguide/sharing_declarations.html "
"See http
s
://cython.readthedocs.io/en/latest/src/userguide/sharing_declarations.html "
"for sharing declarations among Cython files."
%
(
pattern
.
name
,
cython_sources
))
"for sharing declarations among Cython files."
%
(
pattern
.
name
,
cython_sources
))
else
:
else
:
# ignore non-cython modules
# ignore non-cython modules
...
@@ -1073,7 +1073,7 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
...
@@ -1073,7 +1073,7 @@ def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False,
# This is a bit more involved than it should be, because KeyboardInterrupts
# This is a bit more involved than it should be, because KeyboardInterrupts
# break the multiprocessing workers when using a normal pool.map().
# break the multiprocessing workers when using a normal pool.map().
# See, for example:
# See, for example:
# http://noswap.com/blog/python-multiprocessing-keyboardinterrupt
# http
s
://noswap.com/blog/python-multiprocessing-keyboardinterrupt
try
:
try
:
result
=
pool
.
map_async
(
cythonize_one_helper
,
to_compile
,
chunksize
=
1
)
result
=
pool
.
map_async
(
cythonize_one_helper
,
to_compile
,
chunksize
=
1
)
pool
.
close
()
pool
.
close
()
...
...
Cython/Compiler/CmdLine.py
View file @
331d9d82
...
@@ -9,7 +9,7 @@ import sys
...
@@ -9,7 +9,7 @@ import sys
from
.
import
Options
from
.
import
Options
usage
=
"""
\
usage
=
"""
\
Cython (http
://cython.org
) is a compiler for code written in the
Cython (http
s://cython.org/
) is a compiler for code written in the
Cython language. Cython is based on Pyrex by Greg Ewing.
Cython language. Cython is based on Pyrex by Greg Ewing.
Usage: cython [options] sourcefile.{pyx,py} ...
Usage: cython [options] sourcefile.{pyx,py} ...
...
...
Cython/Compiler/Errors.py
View file @
331d9d82
...
@@ -62,7 +62,7 @@ class CompileError(PyrexError):
...
@@ -62,7 +62,7 @@ class CompileError(PyrexError):
self
.
reported
=
False
self
.
reported
=
False
Exception
.
__init__
(
self
,
self
.
formatted_message
)
Exception
.
__init__
(
self
,
self
.
formatted_message
)
# Python Exception subclass pickling is broken,
# Python Exception subclass pickling is broken,
# see http://bugs.python.org/issue1692335
# see http
s
://bugs.python.org/issue1692335
self
.
args
=
(
position
,
message
)
self
.
args
=
(
position
,
message
)
def
__str__
(
self
):
def
__str__
(
self
):
...
@@ -110,7 +110,7 @@ class CompilerCrash(CompileError):
...
@@ -110,7 +110,7 @@ class CompilerCrash(CompileError):
message
+=
u'%s: %s'
%
(
cause
.
__class__
.
__name__
,
cause
)
message
+=
u'%s: %s'
%
(
cause
.
__class__
.
__name__
,
cause
)
CompileError
.
__init__
(
self
,
pos
,
message
)
CompileError
.
__init__
(
self
,
pos
,
message
)
# Python Exception subclass pickling is broken,
# Python Exception subclass pickling is broken,
# see http://bugs.python.org/issue1692335
# see http
s
://bugs.python.org/issue1692335
self
.
args
=
(
pos
,
context
,
message
,
cause
,
stacktrace
)
self
.
args
=
(
pos
,
context
,
message
,
cause
,
stacktrace
)
class
NoElementTreeInstalledException
(
PyrexError
):
class
NoElementTreeInstalledException
(
PyrexError
):
...
...
Cython/Compiler/Options.py
View file @
331d9d82
...
@@ -33,7 +33,7 @@ class ShouldBeFromDirective(object):
...
@@ -33,7 +33,7 @@ class ShouldBeFromDirective(object):
"""
"""
The members of this module are documented using autodata in
The members of this module are documented using autodata in
Cython/docs/src/reference/compilation.rst.
Cython/docs/src/reference/compilation.rst.
See http
://www.sphinx-doc.org/en/master/ext
/autodoc.html#directive-autoattribute
See http
s://www.sphinx-doc.org/en/master/usage/extensions
/autodoc.html#directive-autoattribute
for how autodata works.
for how autodata works.
Descriptions of those members should start with a #:
Descriptions of those members should start with a #:
Donc forget to keep the docs in sync by removing and adding
Donc forget to keep the docs in sync by removing and adding
...
...
Cython/Compiler/PyrexTypes.py
View file @
331d9d82
...
@@ -115,7 +115,7 @@ class BaseType(object):
...
@@ -115,7 +115,7 @@ class BaseType(object):
Deduce any template params in this (argument) type given the actual
Deduce any template params in this (argument) type given the actual
argument type.
argument type.
http://en.cppreference.com/w/cpp/language/function_template#Template_argument_deduction
http
s
://en.cppreference.com/w/cpp/language/function_template#Template_argument_deduction
"""
"""
return
{}
return
{}
...
...
Cython/Compiler/Symtab.py
View file @
331d9d82
...
@@ -443,7 +443,7 @@ class Scope(object):
...
@@ -443,7 +443,7 @@ class Scope(object):
if
type
.
is_buffer
and
not
isinstance
(
self
,
LocalScope
):
# and not is_type:
if
type
.
is_buffer
and
not
isinstance
(
self
,
LocalScope
):
# and not is_type:
error
(
pos
,
'Buffer types only allowed as function local variables'
)
error
(
pos
,
'Buffer types only allowed as function local variables'
)
if
not
self
.
in_cinclude
and
cname
and
re
.
match
(
"^_[_A-Z]+$"
,
cname
):
if
not
self
.
in_cinclude
and
cname
and
re
.
match
(
"^_[_A-Z]+$"
,
cname
):
# See http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html#Reserved-Names
# See http
s
://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html#Reserved-Names
warning
(
pos
,
"'%s' is a reserved name in C."
%
cname
,
-
1
)
warning
(
pos
,
"'%s' is a reserved name in C."
%
cname
,
-
1
)
entries
=
self
.
entries
entries
=
self
.
entries
if
name
and
name
in
entries
and
not
shadow
:
if
name
and
name
in
entries
and
not
shadow
:
...
...
Cython/Debugger/libpython.py
View file @
331d9d82
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb
From gdb 7 onwards, gdb's build can be configured --with-python, allowing gdb
to be extended with Python code e.g. for library-specific data visualizations,
to be extended with Python code e.g. for library-specific data visualizations,
such as for the C++ STL types. Documentation on this API can be seen at:
such as for the C++ STL types. Documentation on this API can be seen at:
http://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html
http
s
://sourceware.org/gdb/current/onlinedocs/gdb/Python-API.html
This python module deals with the case when the process being debugged (the
This python module deals with the case when the process being debugged (the
...
@@ -315,7 +315,7 @@ class PyObjectPtr(object):
...
@@ -315,7 +315,7 @@ class PyObjectPtr(object):
def
__repr__
(
self
):
def
__repr__
(
self
):
# For the NULL pointer, we have no way of knowing a type, so
# For the NULL pointer, we have no way of knowing a type, so
# special-case it as per
# special-case it as per
# http://bugs.python.org/issue8032#msg100882
# http
s
://bugs.python.org/issue8032#msg100882
if
self
.
address
==
0
:
if
self
.
address
==
0
:
return
'0x0'
return
'0x0'
return
'<%s at remote 0x%x>'
%
(
self
.
tp_name
,
self
.
address
)
return
'<%s at remote 0x%x>'
%
(
self
.
tp_name
,
self
.
address
)
...
@@ -1451,7 +1451,7 @@ register (gdb.current_objfile ())
...
@@ -1451,7 +1451,7 @@ register (gdb.current_objfile ())
# Unfortunately, the exact API exposed by the gdb module varies somewhat
# Unfortunately, the exact API exposed by the gdb module varies somewhat
# from build to build
# from build to build
# See http://bugs.python.org/issue8279?#msg102276
# See http
s
://bugs.python.org/issue8279?#msg102276
class
Frame
(
object
):
class
Frame
(
object
):
'''
'''
...
...
Cython/Includes/libc/time.pxd
View file @
331d9d82
# http://en.wikipedia.org/wiki/C_date_and_time_functions
# http
s
://en.wikipedia.org/wiki/C_date_and_time_functions
from
libc.stddef
cimport
wchar_t
from
libc.stddef
cimport
wchar_t
...
...
Cython/Includes/posix/dlfcn.pxd
View file @
331d9d82
# POSIX dynamic linking/loading interface.
# POSIX dynamic linking/loading interface.
# http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dlfcn.h.html
# http
s
://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dlfcn.h.html
cdef
extern
from
"<dlfcn.h>"
nogil
:
cdef
extern
from
"<dlfcn.h>"
nogil
:
void
*
dlopen
(
const
char
*
,
int
)
void
*
dlopen
(
const
char
*
,
int
)
...
...
Cython/Includes/posix/mman.pxd
View file @
331d9d82
# http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/mman.h.html
# http
s
://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/mman.h.html
from
posix.types
cimport
off_t
,
mode_t
from
posix.types
cimport
off_t
,
mode_t
...
...
Cython/Includes/posix/resource.pxd
View file @
331d9d82
# http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html
# http
s
://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/resource.h.html
from
posix.time
cimport
timeval
from
posix.time
cimport
timeval
from
posix.types
cimport
id_t
from
posix.types
cimport
id_t
...
...
Cython/Includes/posix/stdio.pxd
View file @
331d9d82
# POSIX additions to <stdio.h>.
# POSIX additions to <stdio.h>.
# http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html
# http
s
://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html
from
libc.stdio
cimport
FILE
from
libc.stdio
cimport
FILE
from
libc.stddef
cimport
wchar_t
from
libc.stddef
cimport
wchar_t
...
...
Cython/Includes/posix/stdlib.pxd
View file @
331d9d82
# POSIX additions to <stdlib.h>
# POSIX additions to <stdlib.h>
# http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html
# http
s
://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdlib.h.html
cdef
extern
from
"<stdlib.h>"
nogil
:
cdef
extern
from
"<stdlib.h>"
nogil
:
void
_Exit
(
int
)
void
_Exit
(
int
)
...
...
Cython/Includes/posix/time.pxd
View file @
331d9d82
# http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html
# http
s
://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html
from
posix.types
cimport
suseconds_t
,
time_t
,
clockid_t
,
timer_t
from
posix.types
cimport
suseconds_t
,
time_t
,
clockid_t
,
timer_t
from
posix.signal
cimport
sigevent
from
posix.signal
cimport
sigevent
...
...
Cython/Includes/posix/wait.pxd
View file @
331d9d82
# http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/wait.h.html
# http
s
://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/wait.h.html
from
posix.types
cimport
pid_t
,
id_t
from
posix.types
cimport
pid_t
,
id_t
from
posix.signal
cimport
siginfo_t
from
posix.signal
cimport
siginfo_t
...
...
Cython/Utility/Buffer.c
View file @
331d9d82
...
@@ -224,8 +224,8 @@ fail:;
...
@@ -224,8 +224,8 @@ fail:;
// the format string; the access mode/flags is checked by the
// the format string; the access mode/flags is checked by the
// exporter. See:
// exporter. See:
//
//
// http://docs.python.org/3/library/struct.html
// http
s
://docs.python.org/3/library/struct.html
// http
://legacy
.python.org/dev/peps/pep-3118/#additions-to-the-struct-string-syntax
// http
s://www
.python.org/dev/peps/pep-3118/#additions-to-the-struct-string-syntax
//
//
// The alignment code is copied from _struct.c in Python.
// The alignment code is copied from _struct.c in Python.
...
...
Cython/Utility/ModuleSetupCode.c
View file @
331d9d82
...
@@ -347,7 +347,7 @@
...
@@ -347,7 +347,7 @@
#endif
#endif
#endif
#endif
// Work around clang bug http://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor
// Work around clang bug http
s
://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor
template
<
typename
T
>
template
<
typename
T
>
void
__Pyx_call_destructor
(
T
&
x
)
{
void
__Pyx_call_destructor
(
T
&
x
)
{
x
.
~
T
();
x
.
~
T
();
...
...
Cython/Utility/ObjectHandling.c
View file @
331d9d82
...
@@ -1986,7 +1986,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
...
@@ -1986,7 +1986,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args,
// ((char *)(foo) \
// ((char *)(foo) \
// + Py_BUILD_ASSERT_EXPR(offsetof(struct foo, string) == 0))
// + Py_BUILD_ASSERT_EXPR(offsetof(struct foo, string) == 0))
//
//
// Written by Rusty Russell, public domain, http://ccodearchive.net/
// Written by Rusty Russell, public domain, http
s
://ccodearchive.net/
#define __Pyx_BUILD_ASSERT_EXPR(cond) \
#define __Pyx_BUILD_ASSERT_EXPR(cond) \
(sizeof(char [1 - 2*!(cond)]) - 1)
(sizeof(char [1 - 2*!(cond)]) - 1)
...
...
Cython/Utility/Optimize.c
View file @
331d9d82
...
@@ -648,7 +648,7 @@ static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject
...
@@ -648,7 +648,7 @@ static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject
static
PyObject
*
__Pyx__PyNumber_PowerOf2
(
PyObject
*
two
,
PyObject
*
exp
,
PyObject
*
none
,
int
inplace
)
{
static
PyObject
*
__Pyx__PyNumber_PowerOf2
(
PyObject
*
two
,
PyObject
*
exp
,
PyObject
*
none
,
int
inplace
)
{
// in CPython, 1<<N is substantially faster than 2**N
// in CPython, 1<<N is substantially faster than 2**N
// see http://bugs.python.org/issue21420
// see http
s
://bugs.python.org/issue21420
#if !CYTHON_COMPILING_IN_PYPY
#if !CYTHON_COMPILING_IN_PYPY
Py_ssize_t
shiftby
;
Py_ssize_t
shiftby
;
#if PY_MAJOR_VERSION < 3
#if PY_MAJOR_VERSION < 3
...
...
Demos/benchmarks/bpnn3.py
View file @
331d9d82
#!/usr/bin/python
#!/usr/bin/python
# Back-Propagation Neural Networks
# Back-Propagation Neural Networks
#
#
# Written in Python. See http://www.python.org/
# Written in Python. See http
s
://www.python.org/
#
#
# Neil Schemenauer <nascheme@enme.ucalgary.ca>
# Neil Schemenauer <nascheme@enme.ucalgary.ca>
...
...
Demos/benchmarks/nqueens.py
View file @
331d9d82
...
@@ -43,7 +43,7 @@ def permutations(iterable):
...
@@ -43,7 +43,7 @@ def permutations(iterable):
else
:
else
:
return
return
# From http://code.activestate.com/recipes/576647/
# From http
s
://code.activestate.com/recipes/576647/
@
cython
.
locals
(
queen_count
=
int
,
i
=
int
,
vec
=
list
)
@
cython
.
locals
(
queen_count
=
int
,
i
=
int
,
vec
=
list
)
def
n_queens
(
queen_count
):
def
n_queens
(
queen_count
):
"""N-Queens solver.
"""N-Queens solver.
...
...
Demos/freeze/README.rst
View file @
331d9d82
...
@@ -106,6 +106,6 @@ Cython 0.11.2 (or newer, assuming the API does not change)
...
@@ -106,6 +106,6 @@ Cython 0.11.2 (or newer, assuming the API does not change)
SEE ALSO
SEE ALSO
========
========
* `Python <http
://www.python.org
>`_
* `Python <http
s://www.python.org/
>`_
* `Cython <http://www.cython.org>`_
* `Cython <http://www.cython.org>`_
* `freeze.py <http://wiki.python.org/moin/Freeze>`_
* `freeze.py <http
s
://wiki.python.org/moin/Freeze>`_
Doc/s5/cython-ep2008.txt
View file @
331d9d82
...
@@ -51,7 +51,7 @@ Cython is
...
@@ -51,7 +51,7 @@ Cython is
* an Open-Source project
* an Open-Source project
* http
://cython.org
* http
s://cython.org/
* a Python compiler (almost)
* a Python compiler (almost)
...
@@ -115,7 +115,7 @@ Major Cython Developers
...
@@ -115,7 +115,7 @@ Major Cython Developers
* many, *many* others - see
* many, *many* others - see
* http://cython.org/
* http
s
://cython.org/
* the mailing list archives of Cython and Pyrex
* the mailing list archives of Cython and Pyrex
...
@@ -398,4 +398,4 @@ Cython
...
@@ -398,4 +398,4 @@ Cython
\... use it, and join the project!
\... use it, and join the project!
http://cython.org/
http
s
://cython.org/
Doc/s5/ui/default/iepngfix.htc
View file @
331d9d82
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<script>
<script>
// IE5.5+ PNG Alpha Fix v1.0 by Angus Turnbull http
://www.twinhelix.com
// IE5.5+ PNG Alpha Fix v1.0 by Angus Turnbull http
s://www.twinhelix.com/
// Free usage permitted as long as this notice remains intact.
// Free usage permitted as long as this notice remains intact.
// This must be a path to a blank image. That's all the configuration you need here.
// This must be a path to a blank image. That's all the configuration you need here.
...
...
Doc/s5/ui/default/slides.js
View file @
331d9d82
// S5 v1.1 slides.js -- released into the Public Domain
// S5 v1.1 slides.js -- released into the Public Domain
//
//
// Please see http
://www.
meyerweb.com/eric/tools/s5/credits.html for information
// Please see http
s://
meyerweb.com/eric/tools/s5/credits.html for information
// about all the wonderful and talented contributors to this code!
// about all the wonderful and talented contributors to this code!
var
undef
;
var
undef
;
...
...
LICENSE.txt
View file @
331d9d82
Apache License
Apache License
Version 2.0, January 2004
Version 2.0, January 2004
http://www.apache.org/licenses/
http
s
://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
...
...
README.rst
View file @
331d9d82
...
@@ -14,8 +14,8 @@ code from Cython code.
...
@@ -14,8 +14,8 @@ code from Cython code.
This makes Cython the ideal language for wrapping external C libraries, and
This makes Cython the ideal language for wrapping external C libraries, and
for fast C modules that speed up the execution of Python code.
for fast C modules that speed up the execution of Python code.
* Official website: http://cython.org/
* Official website: http
s
://cython.org/
* Documentation: http://docs.cython.org/
en/latest/
* Documentation: http://docs.cython.org/
* Github repository: https://github.com/cython/cython
* Github repository: https://github.com/cython/cython
* Wiki: https://github.com/cython/cython/wiki
* Wiki: https://github.com/cython/cython/wiki
...
...
Tools/cython-mode.el
View file @
331d9d82
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
(
defgroup
cython
nil
"Major mode for editing and compiling Cython files"
(
defgroup
cython
nil
"Major mode for editing and compiling Cython files"
:group
'languages
:group
'languages
:prefix
"cython-"
:prefix
"cython-"
:link
'
(
url-link
:tag
"Homepage"
"http
://cython.org
"
))
:link
'
(
url-link
:tag
"Homepage"
"http
s://cython.org/
"
))
;;;###autoload
;;;###autoload
(
defcustom
cython-default-compile-format
"cython -a %s"
(
defcustom
cython-default-compile-format
"cython -a %s"
...
...
appveyor.yml
View file @
331d9d82
...
@@ -5,7 +5,7 @@ environment:
...
@@ -5,7 +5,7 @@ environment:
global
:
global
:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script interpreter
# /E:ON and /V:ON options are not enabled in the batch script interpreter
# See: http
://stackoverflow.com/a/13751649/163740
# See: http
s://stackoverflow.com/questions/11267463/compiling-python-modules-on-windows-x64/13751649#13751649
WITH_ENV
:
"
cmd
/E:ON
/V:ON
/C
.
\\
appveyor
\\
run_with_env.cmd"
WITH_ENV
:
"
cmd
/E:ON
/V:ON
/C
.
\\
appveyor
\\
run_with_env.cmd"
matrix
:
matrix
:
...
...
appveyor/install.ps1
View file @
331d9d82
# Sample script to install Python and pip under Windows
# Sample script to install Python and pip under Windows
# Authors: Olivier Grisel and Kyle Kastner
# Authors: Olivier Grisel and Kyle Kastner
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
# License: CC0 1.0 Universal: http
s
://creativecommons.org/publicdomain/zero/1.0/
$PYTHON_BASE_URL
=
"https://www.python.org/ftp/python/"
$PYTHON_BASE_URL
=
"https://www.python.org/ftp/python/"
$GET_PIP_URL
=
"https://bootstrap.pypa.io/get-pip.py"
$GET_PIP_URL
=
"https://bootstrap.pypa.io/get-pip.py"
...
...
docs/README
View file @
331d9d82
...
@@ -11,7 +11,7 @@ On windows systems, you only need Sphinx. Open PowerShell and type::
...
@@ -11,7 +11,7 @@ On windows systems, you only need Sphinx. Open PowerShell and type::
You can then see the documentation by opening in a browser ``cython/docs/build/html/index.html``.
You can then see the documentation by opening in a browser ``cython/docs/build/html/index.html``.
The current Cython documentation files are hosted at
The current Cython documentation files are hosted at
https://cython.readthedocs.io/
en/latest/
https://cython.readthedocs.io/
Notes
Notes
...
...
docs/TODO
View file @
331d9d82
...
@@ -17,7 +17,7 @@ Eventually, it seems all of the old users manual could be whittled
...
@@ -17,7 +17,7 @@ Eventually, it seems all of the old users manual could be whittled
down into independent tutorial topics. Much discussion of what we'd
down into independent tutorial topics. Much discussion of what we'd
like to see is at
like to see is at
http://www.mail-archive.com/cython-dev@codespeak.net/msg06945.html
http
s
://www.mail-archive.com/cython-dev@codespeak.net/msg06945.html
There is currently a huge amount of redundancy, but no one section has
There is currently a huge amount of redundancy, but no one section has
it all.
it all.
...
...
docs/index.rst
View file @
331d9d82
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Welcome to Cython's Documentation
Welcome to Cython's Documentation
=================================
=================================
Also see the `Cython project homepage <http://cython.org/>`_.
Also see the `Cython project homepage <http
s
://cython.org/>`_.
.. toctree::
.. toctree::
:maxdepth: 2
:maxdepth: 2
...
...
docs/sphinxext/cython_highlighting.py
View file @
331d9d82
...
@@ -14,7 +14,7 @@ line_re = re.compile('.*?\n')
...
@@ -14,7 +14,7 @@ line_re = re.compile('.*?\n')
class
CythonLexer
(
RegexLexer
):
class
CythonLexer
(
RegexLexer
):
"""
"""
For `Cython <http
://cython.org
>`_ source code.
For `Cython <http
s://cython.org/
>`_ source code.
"""
"""
name
=
'Cython'
name
=
'Cython'
...
...
docs/src/quickstart/build.rst
View file @
331d9d82
...
@@ -104,5 +104,5 @@ Using the Sage notebook
...
@@ -104,5 +104,5 @@ Using the Sage notebook
functions defined in a Cython cell imported into the running session.
functions defined in a Cython cell imported into the running session.
.. [Jupyter] http://jupyter.org/
.. [Jupyter] http
s
://jupyter.org/
.. [Sage] W. Stein et al., Sage Mathematics Software, http://www.sagemath.org/
.. [Sage] W. Stein et al., Sage Mathematics Software, http
s
://www.sagemath.org/
docs/src/quickstart/install.rst
View file @
331d9d82
...
@@ -41,7 +41,7 @@ The simplest way of installing Cython is by using ``pip``::
...
@@ -41,7 +41,7 @@ The simplest way of installing Cython is by using ``pip``::
The newest Cython release can always be downloaded from
The newest Cython release can always be downloaded from
http
://cython.org
. Unpack the tarball or zip file, enter the
http
s://cython.org/
. Unpack the tarball or zip file, enter the
directory, and then run::
directory, and then run::
python setup.py install
python setup.py install
...
@@ -59,4 +59,4 @@ with
...
@@ -59,4 +59,4 @@ with
.. [Anaconda] https://docs.anaconda.com/anaconda/
.. [Anaconda] https://docs.anaconda.com/anaconda/
.. [Canopy] https://www.enthought.com/product/canopy/
.. [Canopy] https://www.enthought.com/product/canopy/
.. [Sage] W. Stein et al., Sage Mathematics Software, http://www.sagemath.org/
.. [Sage] W. Stein et al., Sage Mathematics Software, http
s
://www.sagemath.org/
docs/src/quickstart/overview.rst
View file @
331d9d82
...
@@ -44,13 +44,13 @@ thus merges the two worlds into a very broadly applicable programming
...
@@ -44,13 +44,13 @@ thus merges the two worlds into a very broadly applicable programming
language.
language.
.. [Cython] G. Ewing, R. W. Bradshaw, S. Behnel, D. S. Seljebotn et al.,
.. [Cython] G. Ewing, R. W. Bradshaw, S. Behnel, D. S. Seljebotn et al.,
The Cython compiler, http
://cython.org
.
The Cython compiler, http
s://cython.org/
.
.. [IronPython] Jim Hugunin et al., https://archive.codeplex.com/?p=IronPython.
.. [IronPython] Jim Hugunin et al., https://archive.codeplex.com/?p=IronPython.
.. [Jython] J. Huginin, B. Warsaw, F. Bock, et al.,
.. [Jython] J. Huginin, B. Warsaw, F. Bock, et al.,
Jython: Python for the Java platform, http://www.jython.org.
Jython: Python for the Java platform, http://www.jython.org.
.. [PyPy] The PyPy Group, PyPy: a Python implementation written in Python,
.. [PyPy] The PyPy Group, PyPy: a Python implementation written in Python,
http
://pypy.org
.
http
s://pypy.org/
.
.. [Pyrex] G. Ewing, Pyrex: C-Extensions for Python,
.. [Pyrex] G. Ewing, Pyrex: C-Extensions for Python,
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
http
s
://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
.. [Python] G. van Rossum et al., The Python programming language,
.. [Python] G. van Rossum et al., The Python programming language,
https://www.python.org/.
https://www.python.org/.
docs/src/tutorial/profiling_tutorial.rst
View file @
331d9d82
...
@@ -75,8 +75,8 @@ Enabling coverage analysis
...
@@ -75,8 +75,8 @@ Enabling coverage analysis
--------------------------
--------------------------
Since Cython 0.23, line tracing (see above) also enables support for coverage
Since Cython 0.23, line tracing (see above) also enables support for coverage
reporting with the `coverage.py <http
://coverage.readthedocs.io/>`_ tool.
reporting with the `coverage.py <http
s://coverage.readthedocs.io/>`_ tool. To
To
make the coverage analysis understand Cython modules, you also need to enable
make the coverage analysis understand Cython modules, you also need to enable
Cython's coverage plugin in your ``.coveragerc`` file as follows:
Cython's coverage plugin in your ``.coveragerc`` file as follows:
.. code-block:: ini
.. code-block:: ini
...
@@ -274,5 +274,3 @@ faster than calling pow(x,0.5).
...
@@ -274,5 +274,3 @@ faster than calling pow(x,0.5).
Even so, the result we achieved here is quite satisfactory: we came up with a
Even so, the result we achieved here is quite satisfactory: we came up with a
solution that is much faster then our original Python version while retaining
solution that is much faster then our original Python version while retaining
functionality and readability.
functionality and readability.
docs/src/tutorial/related_work.rst
View file @
331d9d82
...
@@ -42,7 +42,7 @@ Python modules.
...
@@ -42,7 +42,7 @@ Python modules.
.. [ctypes] https://docs.python.org/library/ctypes.html.
.. [ctypes] https://docs.python.org/library/ctypes.html.
.. there's also the original ctypes home page: http://python.net/crew/theller/ctypes/
.. there's also the original ctypes home page: http://python.net/crew/theller/ctypes/
.. [Pyrex] G. Ewing, Pyrex: C-Extensions for Python,
.. [Pyrex] G. Ewing, Pyrex: C-Extensions for Python,
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
http
s
://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
.. [ShedSkin] M. Dufour, J. Coughlan, ShedSkin,
.. [ShedSkin] M. Dufour, J. Coughlan, ShedSkin,
https://github.com/shedskin/shedskin
https://github.com/shedskin/shedskin
.. [SWIG] David M. Beazley et al.,
.. [SWIG] David M. Beazley et al.,
...
...
docs/src/tutorial/strings.rst
View file @
331d9d82
...
@@ -440,7 +440,7 @@ characters and is compatible with plain ASCII encoded text that it
...
@@ -440,7 +440,7 @@ characters and is compatible with plain ASCII encoded text that it
encodes efficiently. This makes it a very good choice for source code
encodes efficiently. This makes it a very good choice for source code
files which usually consist mostly of ASCII characters.
files which usually consist mostly of ASCII characters.
.. _`UTF-8`: http://en.wikipedia.org/wiki/UTF-8
.. _`UTF-8`: http
s
://en.wikipedia.org/wiki/UTF-8
As an example, putting the following line into a UTF-8 encoded source
As an example, putting the following line into a UTF-8 encoded source
file will print ``5``, as UTF-8 encodes the letter ``'ö'`` in the two
file will print ``5``, as UTF-8 encodes the letter ``'ö'`` in the two
...
@@ -553,7 +553,7 @@ above character.
...
@@ -553,7 +553,7 @@ above character.
For more information on this topic, it is worth reading the `Wikipedia
For more information on this topic, it is worth reading the `Wikipedia
article about the UTF-16 encoding`_.
article about the UTF-16 encoding`_.
.. _`Wikipedia article about the UTF-16 encoding`: http://en.wikipedia.org/wiki/UTF-16/UCS-2
.. _`Wikipedia article about the UTF-16 encoding`: http
s
://en.wikipedia.org/wiki/UTF-16/UCS-2
The same properties apply to Cython code that gets compiled for a
The same properties apply to Cython code that gets compiled for a
narrow CPython runtime environment. In most cases, e.g. when
narrow CPython runtime environment. In most cases, e.g. when
...
...
docs/src/userguide/external_C_code.rst
View file @
331d9d82
...
@@ -524,7 +524,7 @@ Acquiring and Releasing the GIL
...
@@ -524,7 +524,7 @@ Acquiring and Releasing the GIL
---------------------------------
---------------------------------
Cython provides facilities for acquiring and releasing the
Cython provides facilities for acquiring and releasing the
`Global Interpreter Lock (GIL) <http://docs.python.org/dev/glossary.html#term-global-interpreter-lock>`_.
`Global Interpreter Lock (GIL) <http
s
://docs.python.org/dev/glossary.html#term-global-interpreter-lock>`_.
This may be useful when calling from multi-threaded code into
This may be useful when calling from multi-threaded code into
(external C) code that may block, or when wanting to use Python
(external C) code that may block, or when wanting to use Python
from a (native) C thread callback. Releasing the GIL should
from a (native) C thread callback. Releasing the GIL should
...
...
docs/src/userguide/memoryviews.rst
View file @
331d9d82
...
@@ -652,6 +652,6 @@ object handling. For the details of how to compile and
...
@@ -652,6 +652,6 @@ object handling. For the details of how to compile and
call functions in C files, see :ref:`using_c_libraries`.
call functions in C files, see :ref:`using_c_libraries`.
.. _GIL: http://docs.python.org/dev/glossary.html#term-global-interpreter-lock
.. _GIL: http
s
://docs.python.org/dev/glossary.html#term-global-interpreter-lock
.. _NumPy: https://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html#memory-layout
.. _NumPy: https://docs.scipy.org/doc/numpy/reference/arrays.ndarray.html#memory-layout
.. _example: https://docs.scipy.org/doc/numpy/reference/arrays.indexing.html
.. _example: https://docs.scipy.org/doc/numpy/reference/arrays.indexing.html
docs/src/userguide/numpy_pythran.rst
View file @
331d9d82
...
@@ -20,7 +20,7 @@ Usage example with distutils
...
@@ -20,7 +20,7 @@ Usage example with distutils
----------------------------
----------------------------
You first need to install Pythran. See its `documentation
You first need to install Pythran. See its `documentation
<http
://pythran.readthedocs.io/en/latest
/>`_ for more information.
<http
s://pythran.readthedocs.io
/>`_ for more information.
Then, simply add a ``cython: np_pythran=True`` directive at the top of the
Then, simply add a ``cython: np_pythran=True`` directive at the top of the
Python files that needs to be compiled using Pythran numpy support.
Python files that needs to be compiled using Pythran numpy support.
...
...
docs/src/userguide/numpy_tutorial.rst
View file @
331d9d82
...
@@ -65,7 +65,7 @@ However there are several options to automate these steps:
...
@@ -65,7 +65,7 @@ However there are several options to automate these steps:
excellent support for using Cython and NumPy from an interactive command
excellent support for using Cython and NumPy from an interactive command
line or through a notebook interface (like
line or through a notebook interface (like
Maple/Mathematica). See `this documentation
Maple/Mathematica). See `this documentation
<http://doc.sagemath.org/html/en/developer/coding_in_cython.html>`_.
<http
s
://doc.sagemath.org/html/en/developer/coding_in_cython.html>`_.
2. Cython can be used as an extension within a Jupyter notebook,
2. Cython can be used as an extension within a Jupyter notebook,
making it easy to compile and use Cython code with just a ``%%cython``
making it easy to compile and use Cython code with just a ``%%cython``
at the top of a cell. For more information see
at the top of a cell. For more information see
...
@@ -487,8 +487,8 @@ than NumPy!
...
@@ -487,8 +487,8 @@ than NumPy!
Where to go from here?
Where to go from here?
======================
======================
* If you want to learn how to make use of `BLAS <http://www.netlib.org/blas/>`_
* If you want to learn how to make use of `BLAS <http
s
://www.netlib.org/blas/>`_
or `LAPACK <http://www.netlib.org/lapack/>`_ with Cython, you can watch
or `LAPACK <http
s
://www.netlib.org/lapack/>`_ with Cython, you can watch
`the presentation of Ian Henriksen at SciPy 2015
`the presentation of Ian Henriksen at SciPy 2015
<https://www.youtube.com/watch?v=R4yB-8tB0J0&t=693s&ab_channel=Enthought>`_.
<https://www.youtube.com/watch?v=R4yB-8tB0J0&t=693s&ab_channel=Enthought>`_.
* If you want to learn how to use Pythran as backend in Cython, you
* If you want to learn how to use Pythran as backend in Cython, you
...
...
docs/src/userguide/pypy.rst
View file @
331d9d82
...
@@ -2,7 +2,7 @@ Porting Cython code to PyPy
...
@@ -2,7 +2,7 @@ Porting Cython code to PyPy
===========================
===========================
Cython has basic support for cpyext, the layer in
Cython has basic support for cpyext, the layer in
`PyPy <http://pypy.org/>`_ that emulates CPython's C-API. This is
`PyPy <http
s
://pypy.org/>`_ that emulates CPython's C-API. This is
achieved by making the generated C code adapt at C compile time, so
achieved by making the generated C code adapt at C compile time, so
the generated code will compile in both CPython and PyPy unchanged.
the generated code will compile in both CPython and PyPy unchanged.
...
...
docs/src/userguide/pyrex_differences.rst
View file @
331d9d82
...
@@ -310,7 +310,7 @@ Automatic ``typecheck``
...
@@ -310,7 +310,7 @@ Automatic ``typecheck``
Rather than introducing a new keyword ``typecheck`` as explained in the
Rather than introducing a new keyword ``typecheck`` as explained in the
`Pyrex docs
`Pyrex docs
<http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/special_methods.html>`_,
<http
s
://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/special_methods.html>`_,
Cython emits a (non-spoofable and faster) typecheck whenever
Cython emits a (non-spoofable and faster) typecheck whenever
:func:`isinstance` is used with an extension type as the second parameter.
:func:`isinstance` is used with an extension type as the second parameter.
...
...
docs/src/userguide/source_files_and_compilation.rst
View file @
331d9d82
...
@@ -582,7 +582,7 @@ The Sage notebook allows transparently editing and compiling Cython
...
@@ -582,7 +582,7 @@ The Sage notebook allows transparently editing and compiling Cython
code simply by typing ``%cython`` at the top of a cell and evaluate
code simply by typing ``%cython`` at the top of a cell and evaluate
it. Variables and functions defined in a Cython cell are imported into the
it. Variables and functions defined in a Cython cell are imported into the
running session. Please check `Sage documentation
running session. Please check `Sage documentation
<http://www.sagemath.org/doc/>`_ for details.
<http
s
://www.sagemath.org/doc/>`_ for details.
You can tailor the behavior of the Cython compiler by specifying the
You can tailor the behavior of the Cython compiler by specifying the
directives below.
directives below.
...
...
pyximport/pyxbuild.py
View file @
331d9d82
...
@@ -103,7 +103,7 @@ def pyx_to_dll(filename, ext=None, force_rebuild=0, build_in_temp=False, pyxbuil
...
@@ -103,7 +103,7 @@ def pyx_to_dll(filename, ext=None, force_rebuild=0, build_in_temp=False, pyxbuil
so_path
=
obj_build_ext
.
get_outputs
()[
0
]
so_path
=
obj_build_ext
.
get_outputs
()[
0
]
if
obj_build_ext
.
inplace
:
if
obj_build_ext
.
inplace
:
# Python distutils get_outputs()[ returns a wrong so_path
# Python distutils get_outputs()[ returns a wrong so_path
# when --inplace ; see http://bugs.python.org/issue5977
# when --inplace ; see http
s
://bugs.python.org/issue5977
# workaround:
# workaround:
so_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
filename
),
so_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
filename
),
os
.
path
.
basename
(
so_path
))
os
.
path
.
basename
(
so_path
))
...
...
runtests.py
View file @
331d9d82
...
@@ -115,7 +115,7 @@ def get_distutils_distro(_cache=[]):
...
@@ -115,7 +115,7 @@ def get_distutils_distro(_cache=[]):
distutils_distro
=
Distribution
()
distutils_distro
=
Distribution
()
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
# TODO: Figure out why this hackery (see http://thread.gmane.org/gmane.comp.python.cython.devel/8280/).
# TODO: Figure out why this hackery (see http
s
://thread.gmane.org/gmane.comp.python.cython.devel/8280/).
config_files
=
distutils_distro
.
find_config_files
()
config_files
=
distutils_distro
.
find_config_files
()
try
:
try
:
config_files
.
remove
(
'setup.cfg'
)
config_files
.
remove
(
'setup.cfg'
)
...
...
setup.py
View file @
331d9d82
...
@@ -228,7 +228,7 @@ packages = [
...
@@ -228,7 +228,7 @@ packages = [
setup
(
setup
(
name
=
'Cython'
,
name
=
'Cython'
,
version
=
version
,
version
=
version
,
url
=
'http://cython.org/'
,
url
=
'http
s
://cython.org/'
,
author
=
'Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.'
,
author
=
'Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.'
,
author_email
=
'cython-devel@python.org'
,
author_email
=
'cython-devel@python.org'
,
description
=
"The Cython compiler for writing C extensions for the Python language."
,
description
=
"The Cython compiler for writing C extensions for the Python language."
,
...
@@ -253,7 +253,7 @@ setup(
...
@@ -253,7 +253,7 @@ setup(
pip install Cython --install-option="--no-cython-compile"
pip install Cython --install-option="--no-cython-compile"
.. _Pyrex: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
.. _Pyrex: http
s
://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
"""
),
"""
),
license
=
'Apache'
,
license
=
'Apache'
,
classifiers
=
[
classifiers
=
[
...
...
tests/memoryview/memoryview.pyx
View file @
331d9d82
...
@@ -1089,7 +1089,7 @@ def optimised_index_of_slice(int[:,:,:] arr, int x, int y, int z):
...
@@ -1089,7 +1089,7 @@ def optimised_index_of_slice(int[:,:,:] arr, int x, int y, int z):
def
test_assign_from_byteslike
(
byteslike
):
def
test_assign_from_byteslike
(
byteslike
):
# Once http
://python3statement.org
is accepted, should be just
# Once http
s://python3statement.org/
is accepted, should be just
# >>> test_assign_from_byteslike(bytes(b'hello'))
# >>> test_assign_from_byteslike(bytes(b'hello'))
# b'hello'
# b'hello'
# ...
# ...
...
...
tests/memoryview/relaxed_strides.pyx
View file @
331d9d82
...
@@ -10,12 +10,12 @@ Thanks to Nathaniel Smith and Sebastian Berg.
...
@@ -10,12 +10,12 @@ Thanks to Nathaniel Smith and Sebastian Berg.
See also:
See also:
Mailing list threads:
Mailing list threads:
http://thread.gmane.org/gmane.comp.python.cython.devel/14762
http
s
://thread.gmane.org/gmane.comp.python.cython.devel/14762
http://thread.gmane.org/gmane.comp.python.cython.devel/14634
http
s
://thread.gmane.org/gmane.comp.python.cython.devel/14634
Detailed discussion of the difference between numpy/cython's current
Detailed discussion of the difference between numpy/cython's current
definition of "contiguity", and the correct definition:
definition of "contiguity", and the correct definition:
http://thread.gmane.org/gmane.comp.python.cython.devel/14634/focus=14640
http
s
://thread.gmane.org/gmane.comp.python.cython.devel/14634/focus=14640
The PR implementing NPY_RELAXED_STRIDES_CHECKING:
The PR implementing NPY_RELAXED_STRIDES_CHECKING:
https://github.com/numpy/numpy/pull/3162
https://github.com/numpy/numpy/pull/3162
...
...
tests/run/clear_to_null.pyx
View file @
331d9d82
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Check that Cython generates a tp_clear function that actually clears object
Check that Cython generates a tp_clear function that actually clears object
references to NULL instead of None.
references to NULL instead of None.
Discussed here: http://article.gmane.org/gmane.comp.python.cython.devel/14833
Discussed here: http
s
://article.gmane.org/gmane.comp.python.cython.devel/14833
"""
"""
from
cpython.ref
cimport
PyObject
,
Py_TYPE
from
cpython.ref
cimport
PyObject
,
Py_TYPE
...
...
tests/run/no_gc_clear.pyx
View file @
331d9d82
...
@@ -3,7 +3,7 @@ Check that the @cython.no_gc_clear decorator disables generation of the
...
@@ -3,7 +3,7 @@ Check that the @cython.no_gc_clear decorator disables generation of the
tp_clear slot so that __dealloc__ will still see the original reference
tp_clear slot so that __dealloc__ will still see the original reference
contents.
contents.
Discussed here: http://article.gmane.org/gmane.comp.python.cython.devel/14986
Discussed here: http
s
://article.gmane.org/gmane.comp.python.cython.devel/14986
"""
"""
cimport
cython
cimport
cython
...
...
tests/run/pep448_test_extcall.pyx
View file @
331d9d82
...
@@ -474,7 +474,7 @@ def call_builtin_nonempty_dict():
...
@@ -474,7 +474,7 @@ def call_builtin_nonempty_dict():
''' Cython: currently just passes empty kwargs into f() while CPython keeps the content
''' Cython: currently just passes empty kwargs into f() while CPython keeps the content
# A corner case of keyword dictionary items being deleted during
# A corner case of keyword dictionary items being deleted during
# the function call setup. See <http://bugs.python.org/issue2016>.
# the function call setup. See <http
s
://bugs.python.org/issue2016>.
def call_kwargs_modified_while_building():
def call_kwargs_modified_while_building():
"""
"""
...
...
tests/run/test_coroutines_pep492.pyx
View file @
331d9d82
...
@@ -1075,7 +1075,7 @@ class CoroutineTest(unittest.TestCase):
...
@@ -1075,7 +1075,7 @@ class CoroutineTest(unittest.TestCase):
c
.
close
()
c
.
close
()
def
test_func_15
(
self
):
def
test_func_15
(
self
):
# See http://bugs.python.org/issue25887 for details
# See http
s
://bugs.python.org/issue25887 for details
async
def
spammer
():
async
def
spammer
():
return
'spam'
return
'spam'
...
@@ -1092,7 +1092,7 @@ class CoroutineTest(unittest.TestCase):
...
@@ -1092,7 +1092,7 @@ class CoroutineTest(unittest.TestCase):
reader
(
spammer_coro
).
send
(
None
)
reader
(
spammer_coro
).
send
(
None
)
def
test_func_16
(
self
):
def
test_func_16
(
self
):
# See http://bugs.python.org/issue25887 for details
# See http
s
://bugs.python.org/issue25887 for details
@
types_coroutine
@
types_coroutine
def
nop
():
def
nop
():
...
@@ -1123,7 +1123,7 @@ class CoroutineTest(unittest.TestCase):
...
@@ -1123,7 +1123,7 @@ class CoroutineTest(unittest.TestCase):
reader
.
throw
(
Exception
(
'wat'
))
reader
.
throw
(
Exception
(
'wat'
))
def
test_func_17
(
self
):
def
test_func_17
(
self
):
# See http://bugs.python.org/issue25887 for details
# See http
s
://bugs.python.org/issue25887 for details
async
def
coroutine
():
async
def
coroutine
():
return
'spam'
return
'spam'
...
@@ -1146,7 +1146,7 @@ class CoroutineTest(unittest.TestCase):
...
@@ -1146,7 +1146,7 @@ class CoroutineTest(unittest.TestCase):
coro
.
close
()
coro
.
close
()
def
test_func_18
(
self
):
def
test_func_18
(
self
):
# See http://bugs.python.org/issue25887 for details
# See http
s
://bugs.python.org/issue25887 for details
async
def
coroutine
():
async
def
coroutine
():
return
'spam'
return
'spam'
...
...
tests/run/test_fstring.pyx
View file @
331d9d82
...
@@ -93,7 +93,7 @@ class TestCase(CythonTest):
...
@@ -93,7 +93,7 @@ class TestCase(CythonTest):
self
.
assertEqual
(
type
(
y
).
__format__
(
y
,
''
),
'class'
)
self
.
assertEqual
(
type
(
y
).
__format__
(
y
,
''
),
'class'
)
def
__test_ast
(
self
):
def
__test_ast
(
self
):
# Inspired by http://bugs.python.org/issue24975
# Inspired by http
s
://bugs.python.org/issue24975
class
X
:
class
X
:
def
__init__
(
self
):
def
__init__
(
self
):
self
.
called
=
False
self
.
called
=
False
...
...
tests/run/test_unicode.pyx
View file @
331d9d82
...
@@ -1771,7 +1771,7 @@ class UnicodeTest(CommonTest,
...
@@ -1771,7 +1771,7 @@ class UnicodeTest(CommonTest,
# Issue #8271: during the decoding of an invalid UTF-8 byte sequence,
# Issue #8271: during the decoding of an invalid UTF-8 byte sequence,
# only the start byte and the continuation byte(s) are now considered
# only the start byte and the continuation byte(s) are now considered
# invalid, instead of the number of bytes specified by the start byte.
# invalid, instead of the number of bytes specified by the start byte.
# See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (page 95,
# See http
s
://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (page 95,
# table 3-8, Row 2) for more information about the algorithm used.
# table 3-8, Row 2) for more information about the algorithm used.
FFFD
=
'
\
ufffd
'
FFFD
=
'
\
ufffd
'
sequences
=
[
sequences
=
[
...
...
tests/run/yield_from_pep380.pyx
View file @
331d9d82
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
Test suite for PEP 380 implementation
Test suite for PEP 380 implementation
adapted from original tests written by Greg Ewing
adapted from original tests written by Greg Ewing
see <http://www.cosc.canterbury.ac.nz/greg.ewing/python/yield-from/YieldFrom-Python3.1.2-rev5.zip>
see <http
s
://www.cosc.canterbury.ac.nz/greg.ewing/python/yield-from/YieldFrom-Python3.1.2-rev5.zip>
"""
"""
import
sys
import
sys
...
...
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