summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* remove warning about missing 'const' support from docs and fix advice on ↵0.18.xStefan Behnel2013-01-301-43/+10
| | | | declaring macros as 'enum' (which works only for ints)
* prepare release of 0.180.18Stefan Behnel2013-01-282-3/+3
|
* Fix overflow_check CompileError with msvcChristoph Gohlke2013-01-271-1/+1
| | | | | --HG-- extra : transplant_source : %3FH%B6t%1FFL%D8%2BF%7CV%7D%10T9%EA%CB%A0%00
* set version to 0.18rc10.18rc1Stefan Behnel2013-01-271-1/+1
|
* fix C compiler warnings about missing PyModuleDef field initialisers in Py3.[01]Stefan Behnel2013-01-271-0/+5
|
* fix new test in Py2.[45]Stefan Behnel2013-01-271-0/+1
|
* Add test for memoryview of extension typeMatěj Laitl2012-11-291-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | A test for a bug fixed in commit 478b939a4c99a77c0863cfd. v2: add commit link above v3: # tag: instead of # tags:, drop cpp tag as it means something different that I originally thought There was a bug that produced C code where gcc emitted warnings: extension_type_memoryview.c: In function ‘__pyx_pf_25extension_type_memoryview_test_getitem’: extension_type_memoryview.c:1468:15: warning: assignment from incompatible pointer type extension_type_memoryview.c: In function ‘__pyx_pf_25extension_type_memoryview_2test_getitem_typed’: extension_type_memoryview.c:1565:15: warning: assignment from incompatible pointer type extension_type_memoryview.c:1568:18: warning: assignment from incompatible pointer type And g++ failed with errors: extension_type_memoryview.c: In function ‘PyObject* __pyx_pf_25extension_type_memoryview_test_getitem(PyObject*)’: extension_type_memoryview.c:1468:213: error: cannot convert ‘__pyx_obj_25extension_type_memoryview_ExtensionType*’ to ‘PyObject*’ in assignment extension_type_memoryview.c: In function ‘PyObject* __pyx_pf_25extension_type_memoryview_2test_getitem_typed(PyObject*)’: extension_type_memoryview.c:1565:213: error: cannot convert ‘__pyx_obj_25extension_type_memoryview_ExtensionType*’ to ‘PyObject*’ in assignment extension_type_memoryview.c:1568:20: error: cannot convert ‘PyObject*’ to ‘__pyx_obj_25extension_type_memoryview_ExtensionType*’ in assignment --HG-- extra : transplant_source : %02N%D4%B99N%D6%FBv%7C%F0%94%E5%BE%CE%C9t%D6%04%11
* Fix calling an "except +" cpp function in a nogil functionMatěj Laitl2013-01-252-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a source: |cdef extern from "<foo>": | cdef void foo_cpp() nogil except + | |cdef call_foo() nogil: | foo_cpp() We used to generate something like this to actually call foo_cpp() in call_foo(): |try{foo_cpp();} |catch(...) { | Py_BLOCK_THREADS; __Pyx_CppExn2PyErr(); Py_UNBLOCK_THREADS | `code.error_goto(self.pos))` |} where Py_BLOCK_THREADS expands to "PyEval_RestoreThread(_save);". __Pyx_CppExn2PyErr() (and alternatives, see SimpleCallNode) calls CPython A API methods so it needs to be guarded in a nogil environment. One problem is that "PyThreadState *_save" is only declared by "with nogil:" block, so a .cpp file that doesn't compile is generated for the above code. However, I think the real issue is that Py_(UN)BLOCK_THREADS is inappropriate here, as it isn't allowed to be called recursively and is valid only directly in a Py_BEGIN_ALLOW_THREADS ... Py_END_ALLOW_THREADS. IMO PyGILState_Ensure() and PyGILState_Release() (through `code.put_ensure_gil()` and a friend) is the correct thing to call here as it is allowed to be called recursively and actually ensures the current thread can call CPython C API. This patch does exactly this (and it breaks the generated code to multiple lines as it would be way too long otherwise), plus it extends the cpp_exceptions_nogil.pyx test with above example that doesn't compile with this fix not applied. Note that we explicitly pass declare_gilstate=True to put_ensure_gil(), as PyGILState_Ensure() docs state that recursive calls to it must not share the PyGILState_STATE. C++-style declaring a variable inside a block should be no-problem here, as try{} .. catch() is obviously valid only in a C++ code. --HG-- extra : transplant_source : %AA%F3%BDk%FE%F9%01%7F%8C%A4n%5E%DA4%97%A5%D9%AF%D60
* changelogStefan Behnel2013-01-261-0/+3
|
* fix test when using NumPy 1.7Stefan Behnel2013-01-261-1/+1
|
* fix new memory view error test in Py2.4Stefan Behnel2013-01-261-9/+12
| | | | | --HG-- extra : transplant_source : %8A%F1%17%5C%A7%CA%1C%B1%17%A1%C5t%06O%5BI%F2%19Vq
* Fix error propagation from memoryview-returning functionsMatěj Laitl2013-01-242-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix indentation error in userguideLars Buitinck2013-01-211-1/+1
| | | | | --HG-- extra : transplant_source : %7B%A4%F1%C4/%E4l%2C_%BFF%5B%B7%9C%9F%E0_%2B%15%3D
* fix compiler crash in error caseStefan Behnel2013-01-211-1/+4
|
* avoid unused utility code for abs()Stefan Behnel2013-01-211-1/+5
|
* simplify abs() optimisation for C integers and fix it for the most negative ↵Stefan Behnel2013-01-212-10/+30
| | | | int/long value
* fix testStefan Behnel2013-01-201-1/+1
|
* suppress C compiler warning on power operation on unsigned C int typesStefan Behnel2013-01-201-2/+6
|
* improve test output in failure caseStefan Behnel2013-01-201-6/+6
|
* move exception class into shadow function as we may not want to export it ↵Stefan Behnel2013-01-201-4/+3
| | | | under the cython.* namespace at this point
* remove references to 'minierror' module from Shadow.py0.18b1Stefan Behnel2013-01-191-3/+10
|
* undo code removal - not entirely clear what to make of itStefan Behnel2013-01-191-0/+60
|
* set version to 0.18b1Stefan Behnel2013-01-191-1/+1
|
* removed broken minivect related code from branch since minivect will not be ↵Stefan Behnel2013-01-191-60/+0
| | | | released as part of 0.18
* work around missing relative cimport support in cythonize()Stefan Behnel2013-01-183-3/+3
|
* changelogStefan Behnel2013-01-181-0/+2
|
* fix import of pyx modules when '' is in sys.pathSteinn Steinsen2013-01-161-1/+5
| | | | | | | | 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
* Use OS-dependent directory separator - a / on windows is interpreted by LINK ↵Steven Winfield2013-01-151-1/+1
| | | | | | | as a command line switch --HG-- extra : transplant_source : %A8%F23%AF%26%BC%82y1%86S%1Ac%D3%40%089o%DCQ
* fix cimport in libcpp.stringStefan Behnel2013-01-181-1/+1
| | | | | --HG-- extra : transplant_source : %E6%CA%F8%11%E8%81u%B9%95%3D%27%C1%0F%F3O%8A%12%3Cnl
* update 'const' section in string handling tutorial to reflect the new ↵Stefan Behnel2013-01-181-9/+20
| | | | | | | 'const' language support --HG-- extra : transplant_source : U%15%0B%8E%81%02%F2kE%AA%07u%EF%82%3D14%F1C%86
* replace 'const_xyz' work-arounds in standard .pxd files by real 'const' ↵Stefan Behnel2013-01-185-76/+82
| | | | | | | declarations --HG-- extra : transplant_source : H%91%CF%08t%B1%908%AE%26%81%1B%F9%2C%9A%3Fh%ECWK
* Merge remote-tracking branch 'remotes/main/0.17'Robert Bradshaw2013-01-141-1/+1
|\
| * Merge pull request #173 from yarikoptic/upstream-0.170.17Robert Bradshaw2013-01-071-1/+1
| |\ | | | | | | BF: replace show-ref with rev-parse --verify for determining current treeish location
| | * BF: replace show-ref with rev-parse --verify for determining current commitYaroslav Halchenko2012-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | git show-ref -s HEAD has shown to not work in all scenarios and git rev-parse --help provides this as an ultimate example: · Print the object name of the current commit: $ git rev-parse --verify HEAD
* | | Make __pyx_import_star_type_names static to remove link errors when freezing.Robert Bradshaw2013-01-121-1/+1
| | |
* | | preprocess byte string literal escaping instead of doing repeated ↵Stefan Behnel2013-01-101-11/+15
| | | | | | | | | | | | replacements at runtime
* | | undo Py3.3 surrogates support fixes - breaks too many special cases with stringsStefan Behnel2013-01-105-55/+19
| | |
* | | undo Py3.3 surrogates support fixes - breaks too many special cases with stringsStefan Behnel2013-01-101-8/+0
| | |
* | | extended (failing) test casesStefan Behnel2013-01-102-28/+44
| | |
* | | fix Unicode string initialisation in PyPyStefan Behnel2013-01-071-0/+8
| | |
* | | add error test case for unknown \N{...} Unicode escape nameStefan Behnel2013-01-062-1/+9
| | |
* | | implement \N{...} Unicode escapes for literalsStefan Behnel2013-01-066-15/+33
| | |
* | | add <locals> to __qualname__ for closures as defined by PEP 3155Stefan Behnel2013-01-062-9/+16
| | |
* | | safety fixes and a little branch prediction helping in CyFunction utility codeStefan Behnel2013-01-061-21/+25
| | |
* | | fix surrogates in Unicode literals in Python 3.3 (the UTF-8 codec rejects ↵Stefan Behnel2013-01-065-19/+55
| | | | | | | | | | | | them explictly)
* | | move __Pyx_InitStrings() utility function into StringTools.cStefan Behnel2013-01-053-41/+37
| | |
* | | fix testStefan Behnel2013-01-041-1/+1
| | |
* | | implement __qualname__ special attribute on Python functions/classes (PEP 3155)Stefan Behnel2013-01-046-29/+131
| | |
* | | make cleanup safety fix more explicitStefan Behnel2013-01-041-12/+13
| | |
* | | fix merge conflictStefan Behnel2013-01-041-4/+0
| | |