platform/upstream/python-cython.git
11 years agochangelog
Stefan Behnel [Sat, 26 Jan 2013 18:15:09 +0000 (19:15 +0100)]
changelog

11 years agofix test when using NumPy 1.7
Stefan Behnel [Sat, 26 Jan 2013 10:06:26 +0000 (11:06 +0100)]
fix test when using NumPy 1.7

11 years agofix new memory view error test in Py2.4
Stefan Behnel [Sat, 26 Jan 2013 09:54:04 +0000 (10:54 +0100)]
fix new memory view error test in Py2.4

--HG--
extra : transplant_source : %8A%F1%17%5C%A7%CA%1C%B1%17%A1%C5t%06O%5BI%F2%19Vq

11 years agoFix error propagation from memoryview-returning functions
Matěj Laitl [Thu, 24 Jan 2013 10:59:23 +0000 (11:59 +0100)]
Fix error propagation from memoryview-returning functions

A code like
|cdef double[:] foo():
|    raise AttributeError('dummy')

generated C code like this:
|  __pyx_L1_error:;
|  (...)
|  __pyx_r.memview = NULL;
|  __Pyx_AddTraceback("view_return_errors.foo", __pyx_clineno, __pyx_lineno, __pyx_filename);
|  __pyx_L0:;
|  if (unlikely(!__pyx_r.memview)) {
|    PyErr_SetString(PyExc_TypeError,"Memoryview return value is not initialized");
|  }
|  __Pyx_RefNannyFinishContext();
|  return __pyx_r;
|}

Which is incorrect in error case, because we set __pyx_r.memview to NULL and
then we test it, so that the PyErr_SetString() is always called in the error
case, which swallows previously-set error. (it also swallowed the traceback,
which I don't understand)

A fix is to jump to return_from_error_cleanup label in case return type is
memoryview, as it is currently done for the case when buffers are present.

A testcase that fauils w/out this fix applied is included, too.

v2: fix test under Python 3 by not using StandardError

--HG--
extra : transplant_source : G%B5%99Og%D1%81%25k%8F%1F%7B%02V%3E%B9%A4y%FF%EA

11 years agofix indentation error in userguide
Lars Buitinck [Mon, 21 Jan 2013 08:54:39 +0000 (09:54 +0100)]
fix indentation error in userguide

--HG--
extra : transplant_source : %7B%A4%F1%C4/%E4l%2C_%BFF%5B%B7%9C%9F%E0_%2B%15%3D

11 years agofix compiler crash in error case
Stefan Behnel [Mon, 21 Jan 2013 07:42:11 +0000 (08:42 +0100)]
fix compiler crash in error case

11 years agoavoid unused utility code for abs()
Stefan Behnel [Mon, 21 Jan 2013 06:22:10 +0000 (07:22 +0100)]
avoid unused utility code for abs()

11 years agosimplify abs() optimisation for C integers and fix it for the most negative int/long...
Stefan Behnel [Mon, 21 Jan 2013 06:18:17 +0000 (07:18 +0100)]
simplify abs() optimisation for C integers and fix it for the most negative int/long value

11 years agofix test
Stefan Behnel [Sun, 20 Jan 2013 20:50:38 +0000 (21:50 +0100)]
fix test

11 years agosuppress C compiler warning on power operation on unsigned C int types
Stefan Behnel [Sun, 20 Jan 2013 16:36:39 +0000 (17:36 +0100)]
suppress C compiler warning on power operation on unsigned C int types

11 years agoimprove test output in failure case
Stefan Behnel [Sun, 20 Jan 2013 16:11:24 +0000 (17:11 +0100)]
improve test output in failure case

11 years agomove exception class into shadow function as we may not want to export it under the...
Stefan Behnel [Sun, 20 Jan 2013 07:08:15 +0000 (08:08 +0100)]
move exception class into shadow function as we may not want to export it under the cython.* namespace at this point

11 years agoremove references to 'minierror' module from Shadow.py 0.18b1
Stefan Behnel [Sat, 19 Jan 2013 19:47:29 +0000 (20:47 +0100)]
remove references to 'minierror' module from Shadow.py

11 years agoundo code removal - not entirely clear what to make of it
Stefan Behnel [Sat, 19 Jan 2013 13:14:16 +0000 (14:14 +0100)]
undo code removal - not entirely clear what to make of it

11 years agoset version to 0.18b1
Stefan Behnel [Sat, 19 Jan 2013 13:08:35 +0000 (14:08 +0100)]
set version to 0.18b1

11 years agoremoved broken minivect related code from branch since minivect will not be released...
Stefan Behnel [Sat, 19 Jan 2013 13:08:01 +0000 (14:08 +0100)]
removed broken minivect related code from branch since minivect will not be released as part of 0.18

11 years agowork around missing relative cimport support in cythonize()
Stefan Behnel [Fri, 18 Jan 2013 13:36:40 +0000 (14:36 +0100)]
work around missing relative cimport support in cythonize()

11 years agochangelog
Stefan Behnel [Fri, 18 Jan 2013 13:30:04 +0000 (14:30 +0100)]
changelog

11 years agofix import of pyx modules when '' is in sys.path
Steinn Steinsen [Wed, 16 Jan 2013 10:38:47 +0000 (10:38 +0000)]
fix import of pyx modules when '' is in sys.path

If '' is in sys.path and a module is found the package_path
is relative and breaks the build process.

--HG--
extra : transplant_source : 9%EA%CC%A6%3D%1B9R%EF%0DmM%CFZ%18%F3%EC%06%3B%B7

11 years agoUse OS-dependent directory separator - a / on windows is interpreted by LINK as a...
Steven Winfield [Tue, 15 Jan 2013 14:07:37 +0000 (14:07 +0000)]
Use OS-dependent directory separator - a / on windows is interpreted by LINK as a command line switch

--HG--
extra : transplant_source : %A8%F23%AF%26%BC%82y1%86S%1Ac%D3%40%089o%DCQ

11 years agofix cimport in libcpp.string
Stefan Behnel [Fri, 18 Jan 2013 13:11:00 +0000 (14:11 +0100)]
fix cimport in libcpp.string

--HG--
extra : transplant_source : %E6%CA%F8%11%E8%81u%B9%95%3D%27%C1%0F%F3O%8A%12%3Cnl

11 years agoupdate 'const' section in string handling tutorial to reflect the new 'const' languag...
Stefan Behnel [Fri, 18 Jan 2013 13:06:26 +0000 (14:06 +0100)]
update 'const' section in string handling tutorial to reflect the new 'const' language support

--HG--
extra : transplant_source : U%15%0B%8E%81%02%F2kE%AA%07u%EF%82%3D14%F1C%86

11 years agoreplace 'const_xyz' work-arounds in standard .pxd files by real 'const' declarations
Stefan Behnel [Fri, 18 Jan 2013 12:55:38 +0000 (13:55 +0100)]
replace 'const_xyz' work-arounds in standard .pxd files by real 'const' declarations

--HG--
extra : transplant_source : H%91%CF%08t%B1%908%AE%26%81%1B%F9%2C%9A%3Fh%ECWK

11 years agoMerge remote-tracking branch 'remotes/main/0.17'
Robert Bradshaw [Mon, 14 Jan 2013 18:57:06 +0000 (10:57 -0800)]
Merge remote-tracking branch 'remotes/main/0.17'

11 years agoMake __pyx_import_star_type_names static to remove link errors when freezing.
Robert Bradshaw [Sat, 12 Jan 2013 20:59:27 +0000 (12:59 -0800)]
Make __pyx_import_star_type_names static to remove link errors when freezing.

11 years agopreprocess byte string literal escaping instead of doing repeated replacements at...
Stefan Behnel [Thu, 10 Jan 2013 21:14:20 +0000 (22:14 +0100)]
preprocess byte string literal escaping instead of doing repeated replacements at runtime

11 years agoundo Py3.3 surrogates support fixes - breaks too many special cases with strings
Stefan Behnel [Thu, 10 Jan 2013 21:09:37 +0000 (22:09 +0100)]
undo Py3.3 surrogates support fixes - breaks too many special cases with strings

11 years agoundo Py3.3 surrogates support fixes - breaks too many special cases with strings
Stefan Behnel [Thu, 10 Jan 2013 21:07:01 +0000 (22:07 +0100)]
undo Py3.3 surrogates support fixes - breaks too many special cases with strings

11 years agoextended (failing) test cases
Stefan Behnel [Thu, 10 Jan 2013 21:00:03 +0000 (22:00 +0100)]
extended (failing) test cases

11 years agoMerge pull request #173 from yarikoptic/upstream-0.17
Robert Bradshaw [Tue, 8 Jan 2013 04:47:43 +0000 (20:47 -0800)]
Merge pull request #173 from yarikoptic/upstream-0.17

BF: replace show-ref with rev-parse --verify for determining current treeish location

11 years agofix Unicode string initialisation in PyPy
Stefan Behnel [Mon, 7 Jan 2013 19:08:22 +0000 (20:08 +0100)]
fix Unicode string initialisation in PyPy

11 years agoadd error test case for unknown \N{...} Unicode escape name
Stefan Behnel [Sun, 6 Jan 2013 19:26:39 +0000 (20:26 +0100)]
add error test case for unknown \N{...} Unicode escape name

11 years agoimplement \N{...} Unicode escapes for literals
Stefan Behnel [Sun, 6 Jan 2013 19:19:41 +0000 (20:19 +0100)]
implement \N{...} Unicode escapes for literals

11 years agoadd <locals> to __qualname__ for closures as defined by PEP 3155
Stefan Behnel [Sun, 6 Jan 2013 13:00:39 +0000 (14:00 +0100)]
add <locals> to __qualname__ for closures as defined by PEP 3155

11 years agosafety fixes and a little branch prediction helping in CyFunction utility code
Stefan Behnel [Sun, 6 Jan 2013 10:37:25 +0000 (11:37 +0100)]
safety fixes and a little branch prediction helping in CyFunction utility code

11 years agofix surrogates in Unicode literals in Python 3.3 (the UTF-8 codec rejects them explictly)
Stefan Behnel [Sun, 6 Jan 2013 10:10:43 +0000 (11:10 +0100)]
fix surrogates in Unicode literals in Python 3.3 (the UTF-8 codec rejects them explictly)

11 years agomove __Pyx_InitStrings() utility function into StringTools.c
Stefan Behnel [Sat, 5 Jan 2013 14:02:29 +0000 (15:02 +0100)]
move __Pyx_InitStrings() utility function into StringTools.c

11 years agofix test
Stefan Behnel [Fri, 4 Jan 2013 16:28:11 +0000 (17:28 +0100)]
fix test

11 years agoimplement __qualname__ special attribute on Python functions/classes (PEP 3155)
Stefan Behnel [Fri, 4 Jan 2013 15:39:01 +0000 (16:39 +0100)]
implement __qualname__ special attribute on Python functions/classes (PEP 3155)

11 years agomake cleanup safety fix more explicit
Stefan Behnel [Fri, 4 Jan 2013 06:36:45 +0000 (07:36 +0100)]
make cleanup safety fix more explicit

11 years agofix merge conflict
Stefan Behnel [Fri, 4 Jan 2013 06:29:34 +0000 (07:29 +0100)]
fix merge conflict

11 years agofix comparison of single character unicode literals
Stefan Behnel [Thu, 3 Jan 2013 20:55:20 +0000 (21:55 +0100)]
fix comparison of single character unicode literals

--HG--
extra : rebase_source : 5e91ffb0a20724dc92084bb68288cb6000814dca

11 years agoPrep for 0.17.4 release. 0.17.4
Robert Bradshaw [Thu, 3 Jan 2013 19:39:55 +0000 (11:39 -0800)]
Prep for 0.17.4 release.

11 years agogenerate safer cleanup code that also works in the case something goes badly wrong...
Stefan Behnel [Thu, 3 Jan 2013 15:57:07 +0000 (16:57 +0100)]
generate safer cleanup code that also works in the case something goes badly wrong early at module init time

--HG--
extra : rebase_source : 015495e6aee6c59b11ee9169d2ad597ff54bfd0c

11 years agoMore overflowcheck documentation.
Robert Bradshaw [Thu, 3 Jan 2013 20:34:13 +0000 (12:34 -0800)]
More overflowcheck documentation.

11 years agoMerge branch 'bugs'
Robert Bradshaw [Thu, 3 Jan 2013 20:25:13 +0000 (12:25 -0800)]
Merge branch 'bugs'

Conflicts:
CHANGES.rst
Cython/__init__.py

11 years agomerge
Stefan Behnel [Thu, 3 Jan 2013 06:30:35 +0000 (07:30 +0100)]
merge

11 years agoadd test tags
Stefan Behnel [Thu, 3 Jan 2013 06:28:55 +0000 (07:28 +0100)]
add test tags

11 years agoadd failing test case
Stefan Behnel [Thu, 3 Jan 2013 06:27:49 +0000 (07:27 +0100)]
add failing test case

11 years agoMerge branch 'bugs'
Robert Bradshaw [Thu, 3 Jan 2013 01:51:41 +0000 (17:51 -0800)]
Merge branch 'bugs'

11 years agoTest for trac #796.
Robert Bradshaw [Wed, 2 Jan 2013 22:16:19 +0000 (14:16 -0800)]
Test for trac #796.

11 years agoGuard deallocation with PyObject_GC_Untrack, trac #796.
Robert Bradshaw [Wed, 2 Jan 2013 22:15:23 +0000 (14:15 -0800)]
Guard deallocation with PyObject_GC_Untrack, trac #796.

11 years agoimplement in-place assignment operators on SliceIndexNode by converting it into an...
Stefan Behnel [Wed, 2 Jan 2013 20:33:09 +0000 (21:33 +0100)]
implement in-place assignment operators on SliceIndexNode by converting it into an IndexNode

11 years agofix left-overs from last commit
Stefan Behnel [Tue, 1 Jan 2013 22:19:42 +0000 (23:19 +0100)]
fix left-overs from last commit

11 years agomake AnalyseDeclarationsTransform inherit from EnvTransform to fix inconsistencies...
Stefan Behnel [Tue, 1 Jan 2013 21:14:32 +0000 (22:14 +0100)]
make AnalyseDeclarationsTransform inherit from EnvTransform to fix inconsistencies in scope tracking

11 years agodisable Py2.5 builds in travis - their installation appears to be broken
Stefan Behnel [Tue, 1 Jan 2013 08:14:19 +0000 (09:14 +0100)]
disable Py2.5 builds in travis - their installation appears to be broken

11 years agosupport non-trivial counter targets for enumerate() loop optimisation
Stefan Behnel [Tue, 1 Jan 2013 07:34:37 +0000 (08:34 +0100)]
support non-trivial counter targets for enumerate() loop optimisation

11 years agofix and normalise None index handling in SliceIndexNode
Stefan Behnel [Tue, 1 Jan 2013 07:14:28 +0000 (08:14 +0100)]
fix and normalise None index handling in SliceIndexNode

11 years agoadd tests
Stefan Behnel [Tue, 1 Jan 2013 06:38:46 +0000 (07:38 +0100)]
add tests

11 years agospeed up NodeFinder
Stefan Behnel [Tue, 1 Jan 2013 06:25:17 +0000 (07:25 +0100)]
speed up NodeFinder

11 years agofix compiler crash by using transform.visit() instead of trying to restart it while...
Stefan Behnel [Tue, 1 Jan 2013 06:07:53 +0000 (07:07 +0100)]
fix compiler crash by using transform.visit() instead of trying to restart it while it's running

11 years agoconvert IterationTransform to inherit from EnvTransform for better scope tracking
Stefan Behnel [Mon, 31 Dec 2012 22:08:04 +0000 (23:08 +0100)]
convert IterationTransform to inherit from EnvTransform for better scope tracking

11 years agofix doc typo
Stefan Behnel [Mon, 31 Dec 2012 15:22:11 +0000 (16:22 +0100)]
fix doc typo

11 years agoadd warning to string tutorial that users should avoid char* in favour of Python...
Stefan Behnel [Mon, 31 Dec 2012 15:10:38 +0000 (16:10 +0100)]
add warning to string tutorial that users should avoid char* in favour of Python objects unless they know what they are doing

11 years agofix with-statement when context manager comes from an inlined def-function call
Stefan Behnel [Mon, 31 Dec 2012 11:56:04 +0000 (12:56 +0100)]
fix with-statement when context manager comes from an inlined def-function call

11 years agoadd test case
Stefan Behnel [Mon, 31 Dec 2012 10:08:08 +0000 (11:08 +0100)]
add test case

11 years agooptimise iteration over dict(something).items()
Stefan Behnel [Mon, 31 Dec 2012 09:59:15 +0000 (10:59 +0100)]
optimise iteration over dict(something).items()

11 years agoavoid old-style classes in flow analysis code
Stefan Behnel [Sun, 30 Dec 2012 21:29:07 +0000 (22:29 +0100)]
avoid old-style classes in flow analysis code

11 years agofix build by removing unused code
Stefan Behnel [Sun, 30 Dec 2012 20:53:25 +0000 (21:53 +0100)]
fix build by removing unused code

11 years agoimprove initialisation analysis for entries from outer closures
Stefan Behnel [Sun, 30 Dec 2012 17:25:40 +0000 (18:25 +0100)]
improve initialisation analysis for entries from outer closures

11 years agodelete dead code (type.is_ptr never coincides with type.is_int)
Stefan Behnel [Sun, 30 Dec 2012 12:22:13 +0000 (13:22 +0100)]
delete dead code (type.is_ptr never coincides with type.is_int)

11 years agomake sure entry.all_entries() includes the defining entry
Stefan Behnel [Sun, 30 Dec 2012 11:49:49 +0000 (12:49 +0100)]
make sure entry.all_entries() includes the defining entry

11 years agoprevent default arguments from unnecessarily ending up in closures
Stefan Behnel [Sun, 30 Dec 2012 10:21:59 +0000 (11:21 +0100)]
prevent default arguments from unnecessarily ending up in closures

11 years agocoerce closure default arguments in outer function scope, not in global scope
Stefan Behnel [Sun, 30 Dec 2012 08:59:33 +0000 (09:59 +0100)]
coerce closure default arguments in outer function scope, not in global scope

11 years agomerge
Stefan Behnel [Sat, 29 Dec 2012 20:55:07 +0000 (21:55 +0100)]
merge

11 years agofix evaluation of assignment order when considering DefNode calls for inlining
Stefan Behnel [Sat, 29 Dec 2012 16:25:51 +0000 (17:25 +0100)]
fix evaluation of assignment order when considering DefNode calls for inlining

11 years agofix cross-closure analysis for names redefined inside of a closure function
Stefan Behnel [Sat, 29 Dec 2012 15:28:06 +0000 (16:28 +0100)]
fix cross-closure analysis for names redefined inside of a closure function

11 years agoOverflow benchmarks.
Robert Bradshaw [Fri, 28 Dec 2012 20:27:39 +0000 (12:27 -0800)]
Overflow benchmarks.

11 years agoMore overflow testing.
Robert Bradshaw [Fri, 28 Dec 2012 20:27:12 +0000 (12:27 -0800)]
More overflow testing.

11 years agoMinor cleanup.
Robert Bradshaw [Fri, 28 Dec 2012 20:27:03 +0000 (12:27 -0800)]
Minor cleanup.

11 years agoDirective for overflow folding.
Robert Bradshaw [Fri, 28 Dec 2012 20:25:12 +0000 (12:25 -0800)]
Directive for overflow folding.

11 years agoCheaper overflow checks for nested expressions.
Robert Bradshaw [Fri, 28 Dec 2012 01:37:27 +0000 (17:37 -0800)]
Cheaper overflow checks for nested expressions.

11 years agoClarify declaration sharing example.
Robert Bradshaw [Thu, 27 Dec 2012 22:40:49 +0000 (14:40 -0800)]
Clarify declaration sharing example.

11 years agoreimplement cross-closure type inference using a dedicated LocalEntry class for entry...
Stefan Behnel [Wed, 26 Dec 2012 11:30:30 +0000 (12:30 +0100)]
reimplement cross-closure type inference using a dedicated LocalEntry class for entry copies in closures to keep closure knowledge in one place

11 years agoimprove error output in test case
Stefan Behnel [Wed, 26 Dec 2012 11:25:34 +0000 (12:25 +0100)]
improve error output in test case

11 years agoadd test case for argument evaluation order in inlined DefNode calls
Stefan Behnel [Mon, 24 Dec 2012 10:22:51 +0000 (11:22 +0100)]
add test case for argument evaluation order in inlined DefNode calls

11 years agoprevent InlinedDefNodeCallNode from being considered 'simple' by making CallNode...
Stefan Behnel [Mon, 24 Dec 2012 07:34:40 +0000 (08:34 +0100)]
prevent InlinedDefNodeCallNode from being considered 'simple' by making CallNode generally non-simple

11 years agochangelog
Stefan Behnel [Sun, 23 Dec 2012 19:39:06 +0000 (20:39 +0100)]
changelog

11 years agoenable compile time DefNode call resolution for nested functions
Stefan Behnel [Sun, 23 Dec 2012 19:38:55 +0000 (20:38 +0100)]
enable compile time DefNode call resolution for nested functions

11 years agofix test that failed due to improved type inference
Stefan Behnel [Sun, 23 Dec 2012 19:35:17 +0000 (20:35 +0100)]
fix test that failed due to improved type inference

11 years agoadd pointer test to cross-closure type inference tests
Stefan Behnel [Sun, 23 Dec 2012 19:33:52 +0000 (20:33 +0100)]
add pointer test to cross-closure type inference tests

11 years agoadd safety check for cross-closure type inference
Stefan Behnel [Sun, 23 Dec 2012 19:02:00 +0000 (20:02 +0100)]
add safety check for cross-closure type inference

11 years agoimplement type inference across closures
Stefan Behnel [Sun, 23 Dec 2012 18:56:42 +0000 (19:56 +0100)]
implement type inference across closures

11 years agosupport @cython.final decorator in override .pxd files
Stefan Behnel [Sat, 22 Dec 2012 10:06:17 +0000 (11:06 +0100)]
support @cython.final decorator in override .pxd files

11 years agominor code cleanup
Stefan Behnel [Sat, 22 Dec 2012 08:42:05 +0000 (09:42 +0100)]
minor code cleanup

11 years agominor code cleanup
Stefan Behnel [Sat, 22 Dec 2012 08:40:11 +0000 (09:40 +0100)]
minor code cleanup

11 years agoenable 'optimize.inline_defnode_calls' in cystdlib.py build script
Stefan Behnel [Sat, 22 Dec 2012 08:09:13 +0000 (09:09 +0100)]
enable 'optimize.inline_defnode_calls' in cystdlib.py build script

11 years agoremove unnecessary option (and source of failures) from pyximport end-to-end test
Stefan Behnel [Fri, 21 Dec 2012 17:34:06 +0000 (18:34 +0100)]
remove unnecessary option (and source of failures) from pyximport end-to-end test

11 years agodisable Python versions that travis doesn't currently support
Stefan Behnel [Fri, 21 Dec 2012 17:29:15 +0000 (18:29 +0100)]
disable Python versions that travis doesn't currently support

11 years agodon't care about pypy results in travis build
Stefan Behnel [Fri, 21 Dec 2012 17:25:35 +0000 (18:25 +0100)]
don't care about pypy results in travis build