head 1.6; access; symbols pkgsrc-2021Q1:1.5.0.54 pkgsrc-2021Q1-base:1.5 pkgsrc-2020Q4:1.5.0.52 pkgsrc-2020Q4-base:1.5 pkgsrc-2020Q3:1.5.0.50 pkgsrc-2020Q3-base:1.5 pkgsrc-2020Q2:1.5.0.46 pkgsrc-2020Q2-base:1.5 pkgsrc-2020Q1:1.5.0.26 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.48 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.5.0.44 pkgsrc-2019Q3-base:1.5 pkgsrc-2019Q2:1.5.0.42 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.40 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.38 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.36 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.34 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.32 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.30 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.28 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.24 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.5.0.22 pkgsrc-2017Q1-base:1.5 pkgsrc-2016Q4:1.5.0.20 pkgsrc-2016Q4-base:1.5 pkgsrc-2016Q3:1.5.0.18 pkgsrc-2016Q3-base:1.5 pkgsrc-2016Q2:1.5.0.16 pkgsrc-2016Q2-base:1.5 pkgsrc-2016Q1:1.5.0.14 pkgsrc-2016Q1-base:1.5 pkgsrc-2015Q4:1.5.0.12 pkgsrc-2015Q4-base:1.5 pkgsrc-2015Q3:1.5.0.10 pkgsrc-2015Q3-base:1.5 pkgsrc-2015Q2:1.5.0.8 pkgsrc-2015Q2-base:1.5 pkgsrc-2015Q1:1.5.0.6 pkgsrc-2015Q1-base:1.5 pkgsrc-2014Q4:1.5.0.4 pkgsrc-2014Q4-base:1.5 pkgsrc-2014Q3:1.5.0.2 pkgsrc-2014Q3-base:1.5 pkgsrc-2014Q2:1.4.0.14 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.4.0.12 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.10 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.8 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.6 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.4 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.2 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.3.0.2 pkgsrc-2012Q3-base:1.3 pkgsrc-2012Q2:1.2.0.14 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.2.0.12 pkgsrc-2012Q1-base:1.2 pkgsrc-2011Q4:1.2.0.10 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q3:1.2.0.8 pkgsrc-2011Q3-base:1.2 pkgsrc-2011Q2:1.2.0.6 pkgsrc-2011Q2-base:1.2 pkgsrc-2011Q1:1.2.0.4 pkgsrc-2011Q1-base:1.2 pkgsrc-2010Q4:1.2.0.2 pkgsrc-2010Q4-base:1.2 pkgsrc-2010Q3:1.1.1.1.0.2 pkgsrc-2010Q3-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.6 date 2021.04.14.19.25.15; author adam; state dead; branches; next 1.5; commitid IpBaZs9n7X6BmiPC; 1.5 date 2014.09.14.17.44.49; author wiz; state Exp; branches; next 1.4; commitid Eo7kh6Np3rVb5lQx; 1.4 date 2012.12.16.16.07.53; author wiz; state Exp; branches; next 1.3; 1.3 date 2012.08.12.21.08.46; author wiz; state Exp; branches; next 1.2; 1.2 date 2010.11.24.17.58.22; author drochner; state Exp; branches; next 1.1; 1.1 date 2010.07.15.17.41.57; author drochner; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2010.07.15.17.41.57; author drochner; state Exp; branches; next ; desc @@ 1.6 log @py-cython: updated to 0.29.23 0.29.23 (2021-04-14) ==================== Bugs fixed ---------- * Some problems with Python 3.10 were resolved. * An incorrect "optimisation" was removed that allowed changes to a keyword dict to leak into keyword arguments passed into a function. * Multiplied str constants could end up as bytes constants with language_level=2. * ``PY_SSIZE_T_CLEAN`` does not get defined any more if it is already defined. @ text @$NetBSD: patch-ac,v 1.5 2014/09/14 17:44:49 wiz Exp $ Add missing rpath. --- Demos/embed/Makefile.orig 2014-09-10 15:49:05.000000000 +0000 +++ Demos/embed/Makefile @@@@ -15,7 +15,7 @@@@ LIBS := $(shell $(PYTHON) -c "import dis SYSLIBS := $(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('SYSLIBS'))") embedded: embedded.o - $(LINKCC) -o $@@ $^ -L$(LIBDIR1) -L$(LIBDIR2) -l$(PYLIB) $(LIBS) $(SYSLIBS) $(LINKFORSHARED) + $(LINKCC) -o $@@ $^ -L$(LIBDIR1) -L$(LIBDIR2) -l$(PYLIB) $(LIBS) $(SYSLIBS) $(LINKFORSHARED) -Wl,-R$(LIBDIR1) embedded.o: embedded.c $(CC) -c $^ -I$(INCDIR) -I$(PLATINCDIR) @ 1.5 log @Update to 0.21: 0.21 (2014-09-10) ================= Features added -------------- * C (cdef) functions allow inner Python functions. * Enums can now be declared as cpdef to export their values to the module's Python namespace. Cpdef enums in pxd files export their values to their own module, iff it exists. * Allow @@staticmethod decorator to declare static cdef methods. This is especially useful for declaring "constructors" for cdef classes that can take non-Python arguments. * Taking a ``char*`` from a temporary Python string object is safer in more cases and can be done inside of non-trivial expressions, including arguments of a function call. A compile time error is raised only when such a pointer is assigned to a variable and would thus exceed the lifetime of the string itself. * Generators have new properties ``__name__`` and ``__qualname__`` that provide the plain/qualified name of the generator function (following CPython 3.5). See http://bugs.python.org/issue21205 * The ``inline`` function modifier is available as a decorator ``@@cython.inline`` in pure mode. * When cygdb is run in a virtualenv, it enables the same virtualenv inside of the debugger. Patch by Marc Abramowitz. * PEP 465: dedicated infix operator for matrix multiplication (A @@ B). * HTML output of annotated code uses Pygments for code highlighting and generally received a major overhaul by Matthias Bussonier. * IPython magic support is now available directly from Cython with the command "%load_ext cython". Cython code can directly be executed in a cell when marked with "%%cython". Code analysis is available with "%%cython -a". Patch by Martín Gaitán. * Simple support for declaring Python object types in Python signature annotations. Currently requires setting the compiler directive ``annotation_typing=True``. * New directive ``use_switch`` (defaults to True) to optionally disable the optimization of chained if statement to C switch statements. * Defines dynamic_cast et al. in ``libcpp.cast`` and C++ heap data structure operations in ``libcpp.algorithm``. * Shipped header declarations in ``posix.*`` were extended to cover more of the POSIX API. Patches by Lars Buitinck and Mark Peek. Optimizations ------------- * Simple calls to C implemented Python functions/methods are faster. This also speeds up many operations on builtins that Cython cannot otherwise optimise. * The "and"/"or" operators try to avoid unnecessary coercions of their arguments. They now evaluate the truth value of each argument independently and only coerce the final result of the whole expression to the target type (e.g. the type on the left side of an assignment). This also avoids reference counting overhead for Python values during evaluation and generally improves the code flow in the generated C code. * The Python expression "2 ** N" is optimised into bit shifting. See http://bugs.python.org/issue21420 * Cascaded assignments (a = b = ...) try to minimise the number of type coercions. * Calls to ``slice()`` are translated to a straight C-API call. Bugs fixed ---------- * Crash when assigning memory views from ternary conditional expressions. * Nested C++ templates could lead to unseparated ">>" characters being generated into the C++ declarations, which older C++ compilers could not parse. * Sending SIGINT (Ctrl-C) during parallel cythonize() builds could hang the child processes. * No longer ignore local setup.cfg files for distutils in pyximport. Patch by Martin Teichmann. * Taking a ``char*`` from an indexed Python string generated unsafe reference counting code. * Set literals now create all of their items before trying to add them to the set, following the behaviour in CPython. This makes a difference in the rare case that the item creation has side effects and some items are not hashable (or if hashing them has side effects, too). * Cython no longer generates the cross product of C functions for code that uses memory views of fused types in function signatures (e.g. ``cdef func(floating[:] a, floating[:] b)``). This is considered the expected behaviour by most users and was previously inconsistent with other structured types like C arrays. Code that really wants all type combinations can create the same fused memoryview type under different names and use those in the signature to make it clear which types are independent. * Names that were unknown at compile time were looked up as builtins at runtime but not as global module names. Trying both lookups helps with globals() manipulation. * Fixed stl container conversion for typedef element types. * ``obj.pop(x)`` truncated large C integer values of x to ``Py_ssize_t``. * ``__init__.pyc`` is recognised as marking a package directory (in addition to .py, .pyx and .pxd). * Syntax highlighting in ``cython-mode.el`` for Emacs no longer incorrectly highlights keywords found as part of longer names. * Correctly handle ``from cython.submodule cimport name``. * Fix infinite recursion when using super with cpdef methods. * No-args ``dir()`` was not guaranteed to return a sorted list. Other changes ------------- * The header line in the generated C files no longer contains the timestamp but only the Cython version that wrote it. This was changed to make builds more reproducible. * Removed support for CPython 2.4, 2.5 and 3.1. * The licensing implications on the generated code were clarified to avoid legal constraints for users. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.4 2012/12/16 16:07:53 wiz Exp $ @ 1.4 log @Update to 0.17.3: 0.17.3: Bugs fixed ---------- * During final interpreter cleanup (with types cleanup enabled at compile time), extension types that inherit from base types over more than one level that were cimported from other modules could lead to a crash. * Weak-reference support in extension types (with a "cdef __weakref__" attribute) generated incorrect deallocation code. * In CPython 3.3, converting a Unicode character to the Py_UNICODE type could fail to raise an overflow for non-BMP characters that do not fit into a wchar_t on the current platform. * Negative C integer constants lost their longness suffix in the generated C code. 0.17.2: Features added -------------- * ``cythonize()`` gained a best effort compile mode that can be used to simply ignore .py files that fail to compile. Bugs fixed ---------- * Replacing an object reference with the value of one of its cdef attributes could generate incorrect C code that accessed the object after deleting its last reference. * C-to-Python type coercions during cascaded comparisons could generate invalid C code, specifically when using the 'in' operator. * "obj[1,]" passed a single integer into the item getter instead of a tuple. * Cyclic imports at module init time did not work in Py3. * The names of C++ destructors for template classes were built incorrectly. * In pure mode, type casts in Cython syntax and the C ampersand operator are now rejected. Use the pure mode replacements instead. * In pure mode, C type names and the sizeof() function are no longer recognised as such and can be used as normal Python names. * The extended C level support for the CPython array type was declared too late to be used by user defined classes. * C++ class nesting was broken. * Better checking for required nullary constructors for stack-allocated C++ instances. * Remove module docstring in no-docstring mode. * Fix specialization for varargs function signatures. * Fix several compiler crashes. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.3 2012/08/12 21:08:46 wiz Exp $ d5 1 a5 1 --- Demos/embed/Makefile.orig 2012-12-14 08:53:21.000000000 +0000 d7 2 a8 2 @@@@ -15,7 +15,7 @@@@ LIBS=$(shell $(PYTHON) -c "import distut SYSLIBS= $(shell $(PYTHON) -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('SYSLIBS'))") @ 1.3 log @Update to 0.16: 0.16 Features Enhancements to Cython's function type (support for weak references, default arguments, code objects, dynamic attributes, classmethods, staticmethods, and more) Fused Types - Template-like support for functions and methods CEP 522 (docs) Typed views on memory - Support for efficient direct and indirect buffers (indexing, slicing, transposing, ...) CEP 517 (docs) super() without arguments Final cdef methods (which translate into direct calls on known instances) General Improvements and Bug Fixes support default arguments for closures search sys.path for pxd files support C++ template casting faster traceback building and faster generator termination support inplace operators on indexed buffers fix alignment handling for record types in buffer support allow nested prange sections 0.15.1 This is a bugfix-only release. 0.15 Major Features Generators (yield) - Cython has full support for generators, generator expressions and PEP 342 coroutines. The nonlocal keyword is supported. Re-acquiring the gil: with gil - works as expected within a nogil context. OpenMP support: prange. Control flow analysis prunes dead code and emits warnings and errors about uninitialised variables. Debugger command cy set to assign values of expressions to Cython variables and cy exec counterpart $cy_eval(). Exception chaining PEP 3134. Relative imports PEP 328. Improved pure syntax including cython.cclass, cython.cfunc, and cython.ccall. The with statement has its own dedicated and faster C implementation. Support for del. Boundschecking directives implemented for builtin Python sequence types. Several updates and additions to the shipped standard library .pxd files. Forward declaration of types is no longer required for circular references. Note: this will be the last release to support Python 2.3; Python 2.4 will be supported for at least one more release. General improvements and bug fixes This release contains over a thousand commits including hundreds of bugfixes and optimizations. The bug tracker has not been as heavily used this release cycle, but is still an interesting subset of improvements and fixes Incompatible changes Uninitialized variables are no longer initialized to None and accessing them has the same semantics as standard Python. globals() now returns a read-only dict of the Cython module's globals, rather than the globals of the first non-Cython module in the stack Many C++ exceptions are now special cased to give closer Python counterparts. This means that except+ functions that formerly raised generic RuntimeErrors may raise something else such as ArithmeticError. Known regressions The inlined generator expressions (introduced in Cython 0.13) were disabled in favour of full generator expression support. This breaks code that previously used them inside of cdef functions (usage in def functions continues to work) and induces a performance regression for cases that continue to work but that were previously inlined. We hope to reinstate this feature in the near future. Generators (yield) - Cython has full support for generators, generator expressions and PEP 342 coroutines. The nonlocal keyword is supported. Re-acquiring the gil: with gil - works as expected within a nogil context. OpenMP support: prange. Control flow analysis prunes dead code and emits warnings and errors about uninitialised variables. Debugger command cy set to assign values of expressions to Cython variables and cy exec counterpart $cy_eval(). Exception chaining PEP 3134. Relative imports PEP 328. Improved pure syntax including cython.cclass, cython.cfunc, and cython.ccall. The with statement has its own dedicated and faster C implementation. Support for del. Boundschecking directives implemented for builtin Python sequence types. Several updates and additions to the shipped standard library .pxd files. Forward declaration of types is no longer required for circular references. Note: this will be the last release to support Python 2.3; Python 2.4 will be supported for at least one more release. General improvements and bug fixes This release contains over a thousand commits including hundreds of bugfixes and optimizations. The bug tracker has not been as heavily used this release cycle, but is still an interesting subset of improvements and fixes Incompatible changes Uninitialized variables are no longer initialized to None and accessing them has the same semantics as standard Python. globals() now returns a read-only dict of the Cython module's globals, rather than the globals of the first non-Cython module in the stack Many C++ exceptions are now special cased to give closer Python counterparts. This means that except+ functions that formerly raised generic RuntimeErrors may raise something else such as ArithmeticError. Known regressions The inlined generator expressions (introduced in Cython 0.13) were disabled in favour of full generator expression support. This breaks code that previously used them inside of cdef functions (usage in def functions continues to work) and induces a performance regression for cases that continue to work but that were previously inlined. We hope to reinstate this feature in the near future. 0.14.1 New Features The gdb debugging support was extended to include all major Cython features, including closures. raise MemoryError() is now safe to use as Cython replaces it with the correct C-API call. General improvements and bug fixes The bug tracker has a list of the major improvements and fixes Incompatible changes Decorators on special methods of cdef classes now raise a compile time error rather than being ignored. In Python 3 language level mode (-3 option), the 'str' type is now mapped to 'unicode', so that cdef str s declares a Unicode string even when running in Python 2. 0.14 New Features Python classes can now be nested and receive a proper closure at definition time. Redefinition is supported for Python functions, even within the same scope. Lambda expressions are supported in class bodies and at the module level. Metaclasses are supported for Python classes, both in Python 2 and Python 3 syntax. The Python 3 syntax (using a keyword argument in the type declaration) is preferred and optimised at compile time. "final" extension classes prevent inheritance in Python space. This feature is available through the new "cython.final" decorator. In the future, these classes may receive further optimisations. "internal" extension classes do not show up in the module dictionary. This feature is available through the new "cython.internal" decorator. Extension type inheritance from builtin types, such as "cdef class MyUnicode(unicode)", now works without further external type redeclarations (which are also strongly discouraged now and continue to issue a warning). GDB support. http://docs.cython.org/src/userguide/debugging.html A new build system with support for inline distutils directives, correct dependency tracking, and parallel compilation. http://wiki.cython.org/enhancements/distutils_preprocessing Support for dynamic compilation at runtime via the new cython.inline function and cython.compile decorator. http://wiki.cython.org/enhancements/inline General improvements and bug fixes In parallel assignments, the right side was evaluated in reverse order in 0.13. This could result in errors if it had side effects (e.g. function calls). In some cases, methods of builtin types would raise a SystemError instead of an AttributeError when called on None. Constant tuples are now cached over the lifetime of an extension module, just like CPython does. Constant argument tuples of Python function calls are also cached. Closures have tightened to include exactly the names used in the inner functions and classes. Previously, they held the complete locals of the defining function. "nogil" blocks are supported when compiling pure Python code by writing "with cython.nogil". The builtin "next()" function in Python 2.6 and later is now implemented internally and therefore available in all Python versions. This makes it the preferred and portable way of manually advancing an iterator. In addition to the previously supported inlined generator expressions in 0.13, "sorted(genexpr)" can now be used as well. Typing issues were fixed in "sum(genexpr)" that could lead to invalid C code being generated. Other known issues with inlined generator expressions were also fixed that make upgrading to 0.14 a strong recommendation for code that uses them. Note that general generators and generator expressions continue to be not supported. Iterating over arbitrary pointer types is now supported, as is an optimized version of the in operator, e.g. x in ptr[a:b]. Inplace arithmetic operators now respect the cdivision directive and are supported for complex types. Incompatible changes Typing a variable as type "complex" previously gave it the Python object type. It now uses the appropriate C/C++ double complex type. A side-effect is that assignments and typed function parameters now accept anything that Python can coerce to a complex, including integers and floats, and not only complex instances. Large integer literals pass through the compiler in a safer way. To prevent truncation in C code, non 32-bit literals are turned into Python objects if not used in a C context. This context can either be given by a clear C literal suffix such as "UL" or "LL" (or "L" in Python 3 code), or it can be an assignment to a typed variable or a typed function argument, in which case it is up to the user to take care of a sufficiently large value space of the target. Python functions are declared in the order they appear in the file, rather than all being created at module creation time. This is consistent with Python and needed to support, for example, conditional or repeated declarations of functions. In the face of circular imports this may cause code to break, so a new --disable-function-redefinition flag was added to revert to the old behavior. This flag will be removed in a future release, so should only be used as a stopgap until old code can be fixed. @ text @d1 1 a1 1 $NetBSD$ d5 1 a5 1 --- Demos/embed/Makefile.orig 2012-04-21 11:34:22.000000000 +0000 d7 1 a7 1 @@@@ -14,7 +14,7 @@@@ LIBS=$(shell $(PYTHON) -c "import distut d15 1 a15 1 $(CC) -c $^ -I$(INCDIR) @ 1.2 log @update to 0.13 too many changes to list here - see the ReleaseNotes @ text @d3 3 a5 1 --- Demos/embed/Makefile.orig 2010-08-25 06:38:31.000000000 +0000 d7 1 a7 1 @@@@ -13,7 +13,7 @@@@ LIBS=$(shell $(PYTHON) -c "import distut d11 2 a12 2 - $(LINKCC) -o $@@ $^ $(LINKFORSHARED) -L$(LIBDIR1) -L$(LIBDIR2) -lpython$(PYVERSION) $(LIBS) $(SYSLIBS) + $(LINKCC) -o $@@ $^ $(LINKFORSHARED) -L$(LIBDIR1) -L$(LIBDIR2) -lpython$(PYVERSION) $(LIBS) $(SYSLIBS) -Wl,-R$(LIBDIR1) @ 1.1 log @Initial revision @ text @d3 1 a3 1 --- Demos/embed/Makefile.orig 2010-02-02 10:11:16.000000000 +0000 d5 2 a6 9 @@@@ -1,17 +1,17 @@@@ # Makefile for creating our standalone Cython program -PYVERSION=$(shell python -c "import sys; print(sys.version[:3])") -PYPREFIX=$(shell python -c "import sys; print(sys.prefix)") -LINKFORSHARED=$(shell python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LINKFORSHARED'))") +PYVERSION=$(shell ${PYTHON} -c "import sys; print(sys.version[:3])") +PYPREFIX=$(shell ${PYTHON} -c "import sys; print(sys.prefix)") +LINKFORSHARED=$(shell ${PYTHON} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LINKFORSHARED'))") INCLUDES=-I$(PYPREFIX)/include/python$(PYVERSION) d9 2 a10 2 - gcc -o $@@ $^ $(LINKFORSHARED) -lpython$(PYVERSION) -lm -lpthread -ldl -lutil -L$(PYPREFIX)/lib + gcc -o $@@ $^ $(LINKFORSHARED) -lpython$(PYVERSION) -lm -lpthread -lutil -L$(PYPREFIX)/lib -Wl,-R$(PYPREFIX)/lib d13 1 a13 14 gcc -c $^ $(INCLUDES) embedded.c: embedded.pyx - @@python ../../cython.py --embed embedded.pyx + @@${PYTHON} ../../cython.py --embed embedded.pyx all: embedded @@@@ -21,4 +21,4 @@@@ clean: test: clean all ./embedded > test.output - python assert_equal.py embedded.output test.output + ${PYTHON} assert_equal.py embedded.output test.output @ 1.1.1.1 log @add py-cython-0.12.1, a compiler to build Pythin extensions, from Kamel Derouiche per pkgsrc-wip @ text @@