platform/upstream/python-cython.git
11 years agoadd frozen importlib module to excluded modules in cystdlib.py
Stefan Behnel [Sat, 31 Aug 2013 10:59:19 +0000 (12:59 +0200)]
add frozen importlib module to excluded modules in cystdlib.py

11 years agoimprove Python compatibility during stdlib compilation
Stefan Behnel [Sat, 31 Aug 2013 10:41:35 +0000 (12:41 +0200)]
improve Python compatibility during stdlib compilation

--HG--
extra : rebase_source : 3925751f19150188e9c65f87aca4039a7d551b7a

11 years agoinclude raw_input() in list of builtins that change names in Py3
Stefan Behnel [Sat, 31 Aug 2013 10:36:58 +0000 (12:36 +0200)]
include raw_input() in list of builtins that change names in Py3

--HG--
extra : rebase_source : f2f904fd21c1807c0dc51f02fb9d460061862fda

11 years agoMerge pull request #251 from jpaalasm/patch-1
scoder [Fri, 30 Aug 2013 09:38:24 +0000 (02:38 -0700)]
Merge pull request #251 from jpaalasm/patch-1

Fix typo

11 years agoFix typo
Joonas Paalasmaa [Fri, 30 Aug 2013 09:32:33 +0000 (12:32 +0300)]
Fix typo

11 years agomark bytearray() and complex() as returning an instance of their type
Stefan Behnel [Fri, 30 Aug 2013 07:13:42 +0000 (09:13 +0200)]
mark bytearray() and complex() as returning an instance of their type

11 years agoPyPy doesn't define Py_OptimizeFlag => always set it to off to enable assertions
Stefan Behnel [Fri, 30 Aug 2013 07:03:15 +0000 (09:03 +0200)]
PyPy doesn't define Py_OptimizeFlag => always set it to off to enable assertions

11 years agoPy2.5 test fix
Stefan Behnel [Fri, 30 Aug 2013 04:35:11 +0000 (06:35 +0200)]
Py2.5 test fix

11 years agoadd test for __debug__ and asserts with Python's -O/-OO options
Stefan Behnel [Thu, 29 Aug 2013 19:55:05 +0000 (21:55 +0200)]
add test for __debug__ and asserts with Python's -O/-OO options

11 years agodisable 'assert' when Python runtime runs with -O/-OO
Stefan Behnel [Thu, 29 Aug 2013 19:54:17 +0000 (21:54 +0200)]
disable 'assert' when Python runtime runs with -O/-OO

11 years agooptimize __debug__ flag
Stefan Behnel [Thu, 29 Aug 2013 19:52:33 +0000 (21:52 +0200)]
optimize __debug__ flag

11 years agocompile Tempita to speed up startup time and template parsing
Stefan Behnel [Wed, 28 Aug 2013 19:48:11 +0000 (21:48 +0200)]
compile Tempita to speed up startup time and template parsing

--HG--
rename : Cython/Tempita/__init__.py => Cython/Tempita/_tempita.py

11 years agoremove unnecessary imports
Stefan Behnel [Wed, 28 Aug 2013 19:26:48 +0000 (21:26 +0200)]
remove unnecessary imports

11 years agochangelog
Stefan Behnel [Wed, 28 Aug 2013 19:25:50 +0000 (21:25 +0200)]
changelog

11 years agoMerge branch 'common-types' into pristine
Robert Bradshaw [Tue, 27 Aug 2013 03:33:55 +0000 (20:33 -0700)]
Merge branch 'common-types' into pristine

11 years agoadd -3 option to cythonize script to make it easier to compile in Py3 mode
Stefan Behnel [Sun, 25 Aug 2013 18:23:53 +0000 (20:23 +0200)]
add -3 option to cythonize script to make it easier to compile in Py3 mode

11 years agoadd --quiet and --force options to cythonize script
Stefan Behnel [Sun, 25 Aug 2013 18:14:03 +0000 (20:14 +0200)]
add --quiet and --force options to cythonize script

11 years agofix distutils build
Stefan Behnel [Sat, 24 Aug 2013 14:14:12 +0000 (16:14 +0200)]
fix distutils build

11 years agoupdate and clean up cystdlib.py script
Stefan Behnel [Sat, 24 Aug 2013 06:09:39 +0000 (08:09 +0200)]
update and clean up cystdlib.py script

11 years agoadd --lenient option also to normal command line
Stefan Behnel [Fri, 23 Aug 2013 21:02:12 +0000 (23:02 +0200)]
add --lenient option also to normal command line

11 years agoremove redundant qualifier from method name
Stefan Behnel [Wed, 21 Aug 2013 19:13:17 +0000 (21:13 +0200)]
remove redundant qualifier from method name

11 years agosimplify and extend in/not-in and is/is-not optimisation, add test
Stefan Behnel [Wed, 21 Aug 2013 18:53:17 +0000 (20:53 +0200)]
simplify and extend in/not-in and is/is-not optimisation, add test

11 years agosimplify generated code by converting 'not X in Y' and 'not X is Y' into the equivale...
Stefan Behnel [Wed, 21 Aug 2013 13:51:26 +0000 (15:51 +0200)]
simplify generated code by converting 'not X in Y' and 'not X is Y' into the equivalent not-in and is-not operators

11 years agofix directive parsing in cythonize script
Stefan Behnel [Tue, 20 Aug 2013 07:14:54 +0000 (09:14 +0200)]
fix directive parsing in cythonize script

11 years agoCorrect globals for shared function types.
Robert Bradshaw [Thu, 15 Aug 2013 06:44:40 +0000 (23:44 -0700)]
Correct globals for shared function types.

11 years agoUse PyImport_GetModuleDict() for common utility types.
Robert Bradshaw [Tue, 13 Aug 2013 16:03:37 +0000 (09:03 -0700)]
Use PyImport_GetModuleDict() for common utility types.

11 years agominor doc fixes
Stefan Behnel [Tue, 13 Aug 2013 08:27:01 +0000 (10:27 +0200)]
minor doc fixes

11 years agoCommon utility types test.
Robert Bradshaw [Tue, 13 Aug 2013 07:08:02 +0000 (00:08 -0700)]
Common utility types test.

11 years agoPy3 fixes for shared types.
Robert Bradshaw [Tue, 13 Aug 2013 07:07:36 +0000 (00:07 -0700)]
Py3 fixes for shared types.

11 years agoMerge branch 'master' into common-types
Robert Bradshaw [Tue, 13 Aug 2013 05:56:59 +0000 (22:56 -0700)]
Merge branch 'master' into common-types

11 years agoUse shared module for more Cython types.
Robert Bradshaw [Tue, 13 Aug 2013 05:37:17 +0000 (22:37 -0700)]
Use shared module for more Cython types.

11 years agoCleanup type sharing.
Robert Bradshaw [Tue, 13 Aug 2013 05:21:45 +0000 (22:21 -0700)]
Cleanup type sharing.

11 years agoClarify cdef vs. def function arguments.
Robert Bradshaw [Tue, 13 Aug 2013 04:03:05 +0000 (21:03 -0700)]
Clarify cdef vs. def function arguments.

11 years agomake test terminate in Py2.6 by disabling parallel compilation
Stefan Behnel [Sun, 11 Aug 2013 17:44:46 +0000 (19:44 +0200)]
make test terminate in Py2.6 by disabling parallel compilation

11 years agodisable cythonize_script* tests in Py2.4: missing support for running 'python2.4...
Stefan Behnel [Sun, 11 Aug 2013 17:23:57 +0000 (19:23 +0200)]
disable cythonize_script* tests in Py2.4: missing support for running 'python2.4 -m a.b.c'

11 years agoextract normal cythonize script test from package compilation test as the latter...
Stefan Behnel [Sun, 11 Aug 2013 15:27:08 +0000 (17:27 +0200)]
extract normal cythonize script test from package compilation test as the latter is not supported in Py3.[012]

--HG--
rename : tests/build/cythonize_script.srctree => tests/build/cythonize_script_package.srctree

11 years agoproperly support '**' pattern in file selection
Stefan Behnel [Sun, 11 Aug 2013 15:20:13 +0000 (17:20 +0200)]
properly support '**' pattern in file selection

11 years agofix base path finding for in-place compilation
Stefan Behnel [Sun, 11 Aug 2013 14:58:26 +0000 (16:58 +0200)]
fix base path finding for in-place compilation

11 years agolooking up package path at import time requires Py3.3+
Stefan Behnel [Sun, 11 Aug 2013 13:21:40 +0000 (15:21 +0200)]
looking up package path at import time requires Py3.3+

11 years agoPy2.4 fix, no need to join the process pool in the error termination case
Stefan Behnel [Sun, 11 Aug 2013 11:04:32 +0000 (13:04 +0200)]
Py2.4 fix, no need to join the process pool in the error termination case

11 years agoShare common type object for Cython functions.
Robert Bradshaw [Sun, 11 Aug 2013 08:55:49 +0000 (01:55 -0700)]
Share common type object for Cython functions.

11 years agominor safety fix
Stefan Behnel [Sun, 11 Aug 2013 07:44:24 +0000 (09:44 +0200)]
minor safety fix

11 years agominor cleanup
Stefan Behnel [Sun, 11 Aug 2013 07:42:32 +0000 (09:42 +0200)]
minor cleanup

11 years agomerge
Stefan Behnel [Sun, 11 Aug 2013 07:37:10 +0000 (09:37 +0200)]
merge

11 years agomove cythonize script to Cython.Build.Cythonize to make it generally available and...
Stefan Behnel [Sun, 11 Aug 2013 07:29:14 +0000 (09:29 +0200)]
move cythonize script to Cython.Build.Cythonize to make it generally available and keep bin/cythonize only as a pure start script

11 years agoavoid useless overhead if we don't find anything to do
Stefan Behnel [Sun, 11 Aug 2013 07:15:17 +0000 (09:15 +0200)]
avoid useless overhead if we don't find anything to do

11 years agoExplicitly disallow caching + common_utility_include_dir.
Robert Bradshaw [Sun, 11 Aug 2013 05:58:50 +0000 (22:58 -0700)]
Explicitly disallow caching + common_utility_include_dir.

Also added note to change log.

11 years agoFix common_include_dir test for TravisCI.
Robert Bradshaw [Sun, 11 Aug 2013 05:55:12 +0000 (22:55 -0700)]
Fix common_include_dir test for TravisCI.

11 years agoprovide serialised fallback if parallel processing fails
Stefan Behnel [Sat, 10 Aug 2013 20:04:16 +0000 (22:04 +0200)]
provide serialised fallback if parallel processing fails

11 years agoadd simple test for cythonize script
Stefan Behnel [Sat, 10 Aug 2013 18:35:07 +0000 (20:35 +0200)]
add simple test for cythonize script

11 years agoreorder options in bin/cythonize
Stefan Behnel [Sat, 10 Aug 2013 18:21:55 +0000 (20:21 +0200)]
reorder options in bin/cythonize

11 years agoadd bin/cythonize script
Stefan Behnel [Sat, 10 Aug 2013 17:59:35 +0000 (19:59 +0200)]
add bin/cythonize script

11 years agoallow srctree header commands to be wrapped in triple string quotes to stop IDEs...
Stefan Behnel [Sat, 10 Aug 2013 15:11:58 +0000 (17:11 +0200)]
allow srctree header commands to be wrapped in triple string quotes to stop IDEs from complaining about them

11 years agofix for Py<=2.5
Stefan Behnel [Sat, 10 Aug 2013 14:01:36 +0000 (16:01 +0200)]
fix for Py<=2.5

11 years agoextend test
Stefan Behnel [Sat, 10 Aug 2013 13:37:12 +0000 (15:37 +0200)]
extend test

11 years agohandle failure to create a process pool in cythonize() by falling back to a single...
Stefan Behnel [Sat, 10 Aug 2013 13:20:56 +0000 (15:20 +0200)]
handle failure to create a process pool in cythonize() by falling back to a single process

11 years agofix "exclude_failures" mode in cythonize() by also ignoring stripped C files from...
Stefan Behnel [Sat, 10 Aug 2013 12:27:18 +0000 (14:27 +0200)]
fix "exclude_failures" mode in cythonize() by also ignoring stripped C files from compilation failures

11 years agochangelog
Stefan Behnel [Sat, 10 Aug 2013 10:48:51 +0000 (12:48 +0200)]
changelog

11 years agoextend test
Stefan Behnel [Sat, 10 Aug 2013 10:42:09 +0000 (12:42 +0200)]
extend test

11 years agoavoid generating empty PyMethodDef array for types (especially closures)
Stefan Behnel [Sat, 10 Aug 2013 10:12:45 +0000 (12:12 +0200)]
avoid generating empty PyMethodDef array for types (especially closures)

11 years agoencode code to bytes before hashing it
Stefan Behnel [Sat, 10 Aug 2013 08:28:45 +0000 (10:28 +0200)]
encode code to bytes before hashing it

11 years agoprint a proper exception traceback when parallel cythonizing crashes
Stefan Behnel [Sat, 10 Aug 2013 08:26:31 +0000 (10:26 +0200)]
print a proper exception traceback when parallel cythonizing crashes

11 years agoTests for common include dir.
Robert Bradshaw [Fri, 9 Aug 2013 07:00:49 +0000 (00:00 -0700)]
Tests for common include dir.

11 years agotest improved deallocation in Py3.4
Stefan Behnel [Fri, 9 Aug 2013 09:35:55 +0000 (11:35 +0200)]
test improved deallocation in Py3.4

11 years agoadd some tests for __dealloc__()
Stefan Behnel [Fri, 9 Aug 2013 09:04:23 +0000 (11:04 +0200)]
add some tests for __dealloc__()

11 years agofix code generated for __dealloc__() and __releasebuffer__() to call WriteUnraisable...
Stefan Behnel [Fri, 9 Aug 2013 08:47:02 +0000 (10:47 +0200)]
fix code generated for __dealloc__() and __releasebuffer__() to call WriteUnraisable() on exceptions instead of building a useless traceback

11 years agobe a tiny bit smarter about when to GC_Track for the base type in tp_dealloc()
Stefan Behnel [Fri, 9 Aug 2013 08:09:24 +0000 (10:09 +0200)]
be a tiny bit smarter about when to GC_Track for the base type in tp_dealloc()

11 years agoextend test
Stefan Behnel [Fri, 9 Aug 2013 08:07:21 +0000 (10:07 +0200)]
extend test

11 years agoclean up tp_dealloc() code and integrate call to tp_finalize() for Py3.4
Stefan Behnel [Fri, 9 Aug 2013 07:57:08 +0000 (09:57 +0200)]
clean up tp_dealloc() code and integrate call to tp_finalize() for Py3.4

11 years agochangelog
Stefan Behnel [Fri, 9 Aug 2013 07:07:26 +0000 (09:07 +0200)]
changelog

11 years agoprovide no_gc_clear decorator in pure mode
Stefan Behnel [Fri, 9 Aug 2013 07:05:28 +0000 (09:05 +0200)]
provide no_gc_clear decorator in pure mode

11 years agochangelog
Stefan Behnel [Fri, 9 Aug 2013 07:02:39 +0000 (09:02 +0200)]
changelog

11 years agomake generators use tp_finalize instead of tp_del for cleanup in Py3.4+
Stefan Behnel [Fri, 9 Aug 2013 06:58:10 +0000 (08:58 +0200)]
make generators use tp_finalize instead of tp_del for cleanup in Py3.4+

11 years agomove method from Scope to CClassScope that only applies to extension types
Stefan Behnel [Fri, 9 Aug 2013 06:44:11 +0000 (08:44 +0200)]
move method from Scope to CClassScope that only applies to extension types

11 years agoreformat and clean up some old code
Stefan Behnel [Fri, 9 Aug 2013 05:17:33 +0000 (07:17 +0200)]
reformat and clean up some old code

11 years agoPy3 fix
Stefan Behnel [Fri, 9 Aug 2013 05:13:55 +0000 (07:13 +0200)]
Py3 fix

11 years agofix docstring reuse from distutils Extension base class
Stefan Behnel [Fri, 9 Aug 2013 05:02:43 +0000 (07:02 +0200)]
fix docstring reuse from distutils Extension base class

11 years agoextend no_gc_clear test to check closures for their automatic tp_clear() behaviour
Stefan Behnel [Thu, 8 Aug 2013 18:30:53 +0000 (20:30 +0200)]
extend no_gc_clear test to check closures for their automatic tp_clear() behaviour

11 years agomake the NULL-instead-of-None change in tp_clear() optional and off by default -...
Stefan Behnel [Thu, 8 Aug 2013 17:49:11 +0000 (19:49 +0200)]
make the NULL-instead-of-None change in tp_clear() optional and off by default - breaks too much code for now

11 years agoremove outdated comment
Stefan Behnel [Thu, 8 Aug 2013 17:46:55 +0000 (19:46 +0200)]
remove outdated comment

11 years agoMerge pull request #233 from vitek/_type_inference_new
scoder [Thu, 8 Aug 2013 16:50:05 +0000 (09:50 -0700)]
Merge pull request #233 from vitek/_type_inference_new

Assignmment based type inference

11 years agoMerge pull request #248 from Bluehorn/master
scoder [Thu, 8 Aug 2013 16:48:17 +0000 (09:48 -0700)]
Merge pull request #248 from Bluehorn/master

no_gc_clear implementation (disable tp_clear) + doc and tests

11 years agodisable PyPy build on travis - takes way too long
Stefan Behnel [Tue, 6 Aug 2013 17:09:53 +0000 (19:09 +0200)]
disable PyPy build on travis - takes way too long

11 years agoRemoved directive_type for gc_no_clear as it can be inferred.
Torsten Landschoff [Tue, 6 Aug 2013 15:29:38 +0000 (17:29 +0200)]
Removed directive_type for gc_no_clear as it can be inferred.

11 years agoCleanup unneeded cpdefs and public declarations.
Torsten Landschoff [Tue, 6 Aug 2013 15:27:58 +0000 (17:27 +0200)]
Cleanup unneeded cpdefs and public declarations.

Per Stefan's comment these are unneeded and actually the tests still pass.

11 years agofix CPython version check for tp_finalize()
Stefan Behnel [Tue, 6 Aug 2013 07:28:07 +0000 (09:28 +0200)]
fix CPython version check for tp_finalize()

11 years agorevert actual tp_finalize() usages, needs more thought
Stefan Behnel [Tue, 6 Aug 2013 07:24:45 +0000 (09:24 +0200)]
revert actual tp_finalize() usages, needs more thought

11 years agominor C code simplification
Stefan Behnel [Tue, 6 Aug 2013 07:20:08 +0000 (09:20 +0200)]
minor C code simplification

11 years agouse proper C-API function for generator finalisation
Stefan Behnel [Sun, 4 Aug 2013 14:03:00 +0000 (16:03 +0200)]
use proper C-API function for generator finalisation

11 years agoenable Py_TPFLAGS_HAVE_FINALIZE flag for extension types that need it
Stefan Behnel [Sun, 4 Aug 2013 13:57:52 +0000 (15:57 +0200)]
enable Py_TPFLAGS_HAVE_FINALIZE flag for extension types that need it

11 years agofix CPython version checking for tp_finalize()
Stefan Behnel [Sun, 4 Aug 2013 13:57:30 +0000 (15:57 +0200)]
fix CPython version checking for tp_finalize()

11 years agominor code cleanup
Stefan Behnel [Sun, 4 Aug 2013 13:13:54 +0000 (15:13 +0200)]
minor code cleanup

11 years agomove object finalisation code from tp_dealloc() into tp_finalize() in Py3.4
Stefan Behnel [Sun, 4 Aug 2013 12:58:05 +0000 (14:58 +0200)]
move object finalisation code from tp_dealloc() into tp_finalize() in Py3.4

11 years agouse tp_finalize instead of tp_del for Cython generators
Stefan Behnel [Sat, 3 Aug 2013 19:43:24 +0000 (21:43 +0200)]
use tp_finalize instead of tp_del for Cython generators

11 years agoadapt more type structs to Py3.4
Stefan Behnel [Sat, 3 Aug 2013 19:28:15 +0000 (21:28 +0200)]
adapt more type structs to Py3.4

11 years agoadd tp_finalize slot for Py3.4+
Stefan Behnel [Sat, 3 Aug 2013 16:33:10 +0000 (18:33 +0200)]
add tp_finalize slot for Py3.4+

11 years agoAdd memory allocation from wiki.
Robert Bradshaw [Sat, 3 Aug 2013 08:04:04 +0000 (01:04 -0700)]
Add memory allocation from wiki.

11 years agoAdded limitations from wiki.
Robert Bradshaw [Sat, 3 Aug 2013 06:30:02 +0000 (23:30 -0700)]
Added limitations from wiki.

11 years agoFixed no_gc_clear test for Python 3.
Torsten Landschoff [Thu, 1 Aug 2013 23:48:31 +0000 (01:48 +0200)]
Fixed no_gc_clear test for Python 3.

11 years agoRenamed unit test to match decorator name.
Torsten Landschoff [Thu, 1 Aug 2013 23:47:08 +0000 (01:47 +0200)]
Renamed unit test to match decorator name.