cython.git
16 years agoSupport for with statement
Dag Sverre Seljebotn [Wed, 18 Jun 2008 06:22:49 +0000 (23:22 -0700)]
Support for with statement

16 years agoMore CodeWriter support
Dag Sverre Seljebotn [Wed, 18 Jun 2008 06:00:08 +0000 (23:00 -0700)]
More CodeWriter support

16 years agoStarted on TempName support, more CodeWriter
Dag Sverre Seljebotn [Wed, 18 Jun 2008 01:04:06 +0000 (18:04 -0700)]
Started on TempName support, more CodeWriter

16 years agoMerge
Dag Sverre Seljebotn [Fri, 30 May 2008 10:06:40 +0000 (12:06 +0200)]
Merge

16 years agoSourceDescriptor-related bug
Dag Sverre Seljebotn [Fri, 30 May 2008 10:06:21 +0000 (12:06 +0200)]
SourceDescriptor-related bug

16 years agoFixed bug related to embedding SourceDescriptor position in docstring
Dag Sverre Seljebotn [Fri, 30 May 2008 09:49:14 +0000 (11:49 +0200)]
Fixed bug related to embedding SourceDescriptor position in docstring

16 years agoMake TreeFragment.py more readable; copy substitution nodes and copy over pos attribu...
Dag Sverre Seljebotn [Fri, 30 May 2008 09:18:36 +0000 (11:18 +0200)]
Make TreeFragment.py more readable; copy substitution nodes and copy over pos attributes on substitutions

16 years agoAdded eq and hash to source descriptors
Dag Sverre Seljebotn [Fri, 30 May 2008 09:14:35 +0000 (11:14 +0200)]
Added eq and hash to source descriptors

16 years agoBugfix in __repr__ of SourceDescriptors
Dag Sverre Seljebotn [Fri, 30 May 2008 08:22:23 +0000 (10:22 +0200)]
Bugfix in __repr__ of SourceDescriptors

16 years agohispanic typos :)
Stefan Behnel [Fri, 30 May 2008 08:09:09 +0000 (10:09 +0200)]
hispanic typos :)

16 years ago'#define PyString_Type PyBytes_Type' in Py3: 'str' is considered a builtin and intern...
Stefan Behnel [Fri, 30 May 2008 06:32:41 +0000 (08:32 +0200)]
'#define PyString_Type PyBytes_Type' in Py3: 'str' is considered a builtin and internally mapped to PyString_Type, which must also work in Py3

16 years agocleanup
Stefan Behnel [Fri, 30 May 2008 05:45:58 +0000 (07:45 +0200)]
cleanup

16 years agomerge
Stefan Behnel [Fri, 30 May 2008 05:36:06 +0000 (07:36 +0200)]
merge

16 years agouse PyBytes_*() functions instead of PyString_*() in Py3
Stefan Behnel [Fri, 30 May 2008 05:31:17 +0000 (07:31 +0200)]
use PyBytes_*() functions instead of PyString_*() in Py3

16 years agoMinor fix in indexing test
Robert Bradshaw [Thu, 29 May 2008 18:42:11 +0000 (11:42 -0700)]
Minor fix in indexing test

16 years agoincrease warning level of __(set|del)slice_ methods
Stefan Behnel [Thu, 29 May 2008 10:01:05 +0000 (12:01 +0200)]
increase warning level of __(set|del)slice_ methods

16 years agoenable warning output in tests (currently unused)
Stefan Behnel [Thu, 29 May 2008 09:59:54 +0000 (11:59 +0200)]
enable warning output in tests (currently unused)

16 years agomerge
Robert Bradshaw [Thu, 29 May 2008 07:15:13 +0000 (00:15 -0700)]
merge

16 years agoFix bug when indexing with large unsigned int
Robert Bradshaw [Thu, 29 May 2008 03:42:48 +0000 (20:42 -0700)]
Fix bug when indexing with large unsigned int

16 years agoImplement "from module [c]import *", some more work on sequence indexing.
Robert Bradshaw [Thu, 29 May 2008 01:09:49 +0000 (18:09 -0700)]
Implement "from module [c]import *", some more work on sequence indexing.

16 years agoPy3.0beta compatibility fixes
Stefan Behnel [Wed, 28 May 2008 09:11:24 +0000 (11:11 +0200)]
Py3.0beta compatibility fixes

16 years agoAccept new for-from syntax.
Robert Bradshaw [Wed, 28 May 2008 08:58:32 +0000 (01:58 -0700)]
Accept new for-from syntax.

16 years agoOptimized indexing into sequences (partially from Greg Ewing).
Robert Bradshaw [Wed, 28 May 2008 08:41:03 +0000 (01:41 -0700)]
Optimized indexing into sequences (partially from Greg Ewing).

16 years agoInplace operators <<= >>= //= **=
Robert Bradshaw [Wed, 28 May 2008 07:55:02 +0000 (00:55 -0700)]
Inplace operators <<= >>= //= **=

16 years agoCasting from C pointer to object does not incref
Robert Bradshaw [Wed, 28 May 2008 07:18:34 +0000 (00:18 -0700)]
Casting from C pointer to object does not incref

Casting a non-Python pointer type to a Python type no longer
generates an incref, unless one is required for other reasons.
    [Arc Riley]

16 years agoFix typo for IF statement.
Robert Bradshaw [Wed, 28 May 2008 06:13:29 +0000 (23:13 -0700)]
Fix typo for IF statement.

16 years agoremove superfluous cast
Stefan Behnel [Tue, 27 May 2008 15:05:51 +0000 (17:05 +0200)]
remove superfluous cast

16 years agoMerge
Dag Sverre Seljebotn [Tue, 27 May 2008 11:41:55 +0000 (13:41 +0200)]
Merge

16 years agoTreeFragment fix: Replace enclosing ExprStatNode if statement is substituted
Dag Sverre Seljebotn [Tue, 27 May 2008 11:33:58 +0000 (13:33 +0200)]
TreeFragment fix: Replace enclosing ExprStatNode if statement is substituted

16 years agoRemoved str conversion from SourceDescriptors in order to be more explicit.
Dag Sverre Seljebotn [Tue, 27 May 2008 11:25:28 +0000 (13:25 +0200)]
Removed str conversion from SourceDescriptors in order to be more explicit.

16 years agoFocus on visitors rather than transforms; Transform.py renamed to Visitor.py
Dag Sverre Seljebotn [Tue, 27 May 2008 11:15:50 +0000 (13:15 +0200)]
Focus on visitors rather than transforms; Transform.py renamed to Visitor.py

Some changes in class hierarchies etc.; transforms no longer has a common
base class and VisitorTransform is a subclass of TreeVisitor rather than
the reverse. Also removed visitor use of get_child_accessors;
child_attrs is accessed directly (because of claims of overengineering :-) ).

--HG--
rename : Cython/Compiler/Transform.py => Cython/Compiler/Visitor.py

16 years agoinvalidate the cache of all subtypes when updating a type's tp_dict (algorithm copied...
Stefan Behnel [Mon, 26 May 2008 22:12:36 +0000 (00:12 +0200)]
invalidate the cache of all subtypes when updating a type's tp_dict (algorithm copied from typeobject.c in Py3)

16 years agoextended test case
Stefan Behnel [Mon, 26 May 2008 21:18:31 +0000 (23:18 +0200)]
extended test case

16 years agocomment
Stefan Behnel [Mon, 26 May 2008 19:34:55 +0000 (21:34 +0200)]
comment

16 years agomoved method cache invalidation next to dict update, as proposed by Lisandro
Stefan Behnel [Mon, 26 May 2008 19:34:41 +0000 (21:34 +0200)]
moved method cache invalidation next to dict update, as proposed by Lisandro

16 years agosimple test for extension class body
Stefan Behnel [Mon, 26 May 2008 16:58:03 +0000 (18:58 +0200)]
simple test for extension class body

16 years agodocument test runner options
Stefan Behnel [Mon, 26 May 2008 15:36:15 +0000 (17:36 +0200)]
document test runner options

16 years agotest cases for optional arguments in cdef functions
Stefan Behnel [Mon, 26 May 2008 08:22:09 +0000 (10:22 +0200)]
test cases for optional arguments in cdef functions

16 years agofix coverage analysis in test runner
Stefan Behnel [Mon, 26 May 2008 08:19:57 +0000 (10:19 +0200)]
fix coverage analysis in test runner

16 years agocleanup for test runner: use optparse to read cmd line options
Stefan Behnel [Sun, 25 May 2008 16:24:19 +0000 (18:24 +0200)]
cleanup for test runner: use optparse to read cmd line options

16 years agorequire options '-v' or '-vv' for status output in test runner
Stefan Behnel [Sun, 25 May 2008 13:49:59 +0000 (15:49 +0200)]
require options '-v' or '-vv' for status output in test runner

16 years agotest fixes
Stefan Behnel [Sun, 25 May 2008 13:36:51 +0000 (15:36 +0200)]
test fixes

16 years agobetter test output
Stefan Behnel [Sun, 25 May 2008 13:22:47 +0000 (15:22 +0200)]
better test output

16 years agonon-runnable test moved to tests/compile/
Stefan Behnel [Sun, 25 May 2008 13:20:19 +0000 (15:20 +0200)]
non-runnable test moved to tests/compile/

--HG--
rename : tests/run/docstrings.pyx => tests/compile/docstrings.pyx

16 years agoinvalidate type cache in Py2.6+
Stefan Behnel [Sat, 24 May 2008 08:33:28 +0000 (10:33 +0200)]
invalidate type cache in Py2.6+

16 years agoremoved left-over
Stefan Behnel [Fri, 23 May 2008 20:32:33 +0000 (22:32 +0200)]
removed left-over

16 years agosecond try to fix classmethods
Stefan Behnel [Fri, 23 May 2008 20:31:27 +0000 (22:31 +0200)]
second try to fix classmethods

16 years agoreverted last change, based on extended test case
Stefan Behnel [Fri, 23 May 2008 20:11:00 +0000 (22:11 +0200)]
reverted last change, based on extended test case

16 years agofix classmethod() calls
Stefan Behnel [Fri, 23 May 2008 18:44:03 +0000 (20:44 +0200)]
fix classmethod() calls

--HG--
rename : tests/run/classmethod.pyx => tests/run/staticmethod.pyx

16 years agosimple test case to emulate class methods as function attributes
Stefan Behnel [Fri, 23 May 2008 18:07:44 +0000 (20:07 +0200)]
simple test case to emulate class methods as function attributes

16 years agomerge
Stefan Behnel [Fri, 23 May 2008 15:22:55 +0000 (17:22 +0200)]
merge

16 years agosupport for new buffer protocol in Py3
Stefan Behnel [Fri, 23 May 2008 11:24:57 +0000 (13:24 +0200)]
support for new buffer protocol in Py3

16 years agoSome more unicode compile crash fixes.
Robert Bradshaw [Fri, 23 May 2008 10:28:14 +0000 (03:28 -0700)]
Some more unicode compile crash fixes.

16 years agotest output fix
Stefan Behnel [Fri, 23 May 2008 09:11:52 +0000 (11:11 +0200)]
test output fix

16 years agoPy2.6 test fixes
Stefan Behnel [Thu, 22 May 2008 19:10:20 +0000 (21:10 +0200)]
Py2.6 test fixes

16 years agoenabled most remaining tests from the 'broken' directory
Stefan Behnel [Wed, 21 May 2008 17:25:02 +0000 (19:25 +0200)]
enabled most remaining tests from the 'broken' directory

--HG--
rename : tests/broken/arraytoptrarg.pyx => tests/compile/arraytoptrarg.pyx
rename : tests/broken/ass2longlong.pyx => tests/compile/ass2longlong.pyx
rename : tests/broken/builtinfuncs.pyx => tests/compile/builtinfuncs.pyx
rename : tests/broken/cascmp.pyx => tests/compile/cascmp.pyx
rename : tests/broken/cassign.pyx => tests/compile/cassign.pyx
rename : tests/broken/casttoexttype.pyx => tests/compile/casttoexttype.pyx
rename : tests/broken/cnamespec.pyx => tests/compile/cnamespec.pyx
rename : tests/broken/cnumop.pyx => tests/compile/cnumop.pyx
rename : tests/broken/cunsignedlong.pyx => tests/compile/cunsignedlong.pyx
rename : tests/broken/del.pyx => tests/compile/del.pyx
rename : tests/broken/delslice.pyx => tests/compile/delslice.pyx
rename : tests/broken/drake1.pyx => tests/compile/drake1.pyx
rename : tests/broken/eqcmp.pyx => tests/compile/eqcmp.pyx
rename : tests/broken/ewing1.pyx => tests/compile/ewing1.pyx
rename : tests/broken/ewing5.pyx => tests/compile/ewing5.pyx
rename : tests/broken/excvalcheck.pyx => tests/compile/excvalcheck.pyx
rename : tests/broken/excvalreturn.pyx => tests/compile/excvalreturn.pyx
rename : tests/broken/extcoerce.pyx => tests/compile/extcoerce.pyx
rename : tests/broken/extdescrdel.pyx => tests/compile/extdescrdel.pyx
rename : tests/broken/extdescrget.pyx => tests/compile/extdescrget.pyx
rename : tests/broken/extdescrset.pyx => tests/compile/extdescrset.pyx
rename : tests/broken/extexttype.pyx => tests/compile/extexttype.pyx
rename : tests/broken/extgetitem.pyx => tests/compile/extgetitem.pyx
rename : tests/broken/extinheritdel.pyx => tests/compile/extinheritdel.pyx
rename : tests/broken/extinheritset.pyx => tests/compile/extinheritset.pyx
rename : tests/broken/extpropertyall.pyx => tests/compile/extpropertyall.pyx
rename : tests/broken/extpymemberdef.pyx => tests/compile/extpymemberdef.pyx
rename : tests/broken/forfromelse.pyx => tests/compile/forfromelse.pyx
rename : tests/broken/gencall.pyx => tests/compile/gencall.pyx
rename : tests/broken/globalstmt.pyx => tests/compile/globalstmt.pyx
rename : tests/broken/gustafsson2.pyx => tests/compile/gustafsson2.pyx
rename : tests/broken/index.pyx => tests/compile/index.pyx
rename : tests/broken/jiba5.pyx => tests/compile/jiba5.pyx
rename : tests/broken/jiba6.pyx => tests/compile/jiba6.pyx
rename : tests/broken/johnson1.pyx => tests/compile/johnson1.pyx
rename : tests/broken/magcmp.pyx => tests/compile/magcmp.pyx
rename : tests/broken/none.pyx => tests/compile/none.pyx
rename : tests/broken/notnonearg.pyx => tests/compile/notnonearg.pyx
rename : tests/broken/r_pernici1.pyx => tests/compile/r_pernici1.pyx
rename : tests/broken/slicex.pyx => tests/compile/slicex.pyx
rename : tests/broken/traceback.pyx => tests/compile/traceback.pyx
rename : tests/broken/watts2.pyx => tests/compile/watts2.pyx
rename : tests/broken/anonymousenum.pyx => tests/run/anonymousenum.pyx
rename : tests/broken/ass2cglobal.pyx => tests/run/ass2cglobal.pyx
rename : tests/broken/cstringmeth.pyx => tests/run/cstringmeth.pyx
rename : tests/broken/extcmethod.pyx => tests/run/extcmethod.pyx
rename : tests/broken/extpropertyref.pyx => tests/run/extpropertyref.pyx
rename : tests/broken/filenames.pxi => tests/run/filenames.pxi
rename : tests/broken/filenames.pyx => tests/run/filenames.pyx
rename : tests/broken/inhcmethcall.pyx => tests/run/inhcmethcall.pyx
rename : tests/broken/king1.pyx => tests/run/king1.pyx
rename : tests/broken/menten1.pyx => tests/run/menten1.pyx
rename : tests/broken/nononetypecheck.pyx => tests/run/nononetypecheck.pyx
rename : tests/broken/tandemstats.pyx => tests/run/tandemstats.pyx
rename : tests/broken/watts1.pyx => tests/run/watts1.pyx

16 years agobuiltin names must be EncodedStrings as they get reused
Stefan Behnel [Wed, 21 May 2008 17:23:23 +0000 (19:23 +0200)]
builtin names must be EncodedStrings as they get reused

16 years agofix intern() builtin in Py3
Stefan Behnel [Wed, 21 May 2008 16:56:31 +0000 (18:56 +0200)]
fix intern() builtin in Py3

16 years agocleanup
Stefan Behnel [Wed, 21 May 2008 14:49:51 +0000 (16:49 +0200)]
cleanup

16 years agofix method calls on Cython generated Python classes
Stefan Behnel [Wed, 21 May 2008 14:48:59 +0000 (16:48 +0200)]
fix method calls on Cython generated Python classes

16 years agocleanup
Stefan Behnel [Tue, 20 May 2008 19:18:04 +0000 (21:18 +0200)]
cleanup

16 years agoforgotten part of last commit
Stefan Behnel [Sun, 18 May 2008 23:05:36 +0000 (01:05 +0200)]
forgotten part of last commit

16 years agomake imported names behave like identifiers, too
Stefan Behnel [Sun, 18 May 2008 23:04:48 +0000 (01:04 +0200)]
make imported names behave like identifiers, too

16 years agomake imported names encoded strings to fix attribute access on them
Stefan Behnel [Sun, 18 May 2008 17:28:28 +0000 (19:28 +0200)]
make imported names encoded strings to fix attribute access on them

16 years agorename type imports of 'unicode' and 'str' type according to Py version
Stefan Behnel [Sun, 18 May 2008 14:36:18 +0000 (16:36 +0200)]
rename type imports of 'unicode' and 'str' type according to Py version

16 years agotest case fix
Stefan Behnel [Sun, 18 May 2008 10:25:54 +0000 (12:25 +0200)]
test case fix

16 years agofix keyword arguments in function calls: must be unicode in Py3 and strings in Py2...
Stefan Behnel [Sun, 18 May 2008 06:59:16 +0000 (08:59 +0200)]
fix keyword arguments in function calls: must be unicode in Py3 and strings in Py2, just like identifiers

16 years agocomment fix
Stefan Behnel [Sun, 18 May 2008 06:54:06 +0000 (08:54 +0200)]
comment fix

16 years agoUsability fixes in Transform
Dag Sverre Seljebotn [Sat, 17 May 2008 20:01:50 +0000 (22:01 +0200)]
Usability fixes in Transform

16 years agoextended test case on string literals
Stefan Behnel [Sat, 17 May 2008 05:44:31 +0000 (07:44 +0200)]
extended test case on string literals

16 years agotest case for various string literals
Stefan Behnel [Sat, 17 May 2008 05:33:41 +0000 (07:33 +0200)]
test case for various string literals

16 years agoenable ur'abc' literals and b'abc'/br'abc' literals
Stefan Behnel [Sat, 17 May 2008 04:37:25 +0000 (06:37 +0200)]
enable ur'abc' literals and b'abc'/br'abc' literals

16 years agomoved tests out of the way that are broken in Py3
Stefan Behnel [Fri, 16 May 2008 19:53:11 +0000 (21:53 +0200)]
moved tests out of the way that are broken in Py3

--HG--
rename : tests/compile/extinheritdel.pyx => tests/broken/extinheritdel.pyx
rename : tests/compile/extinheritset.pyx => tests/broken/extinheritset.pyx

16 years agomerge
Stefan Behnel [Fri, 16 May 2008 18:49:48 +0000 (20:49 +0200)]
merge

16 years agotrunk merge
Stefan Behnel [Fri, 16 May 2008 18:49:12 +0000 (20:49 +0200)]
trunk merge

16 years agotypo
Stefan Behnel [Fri, 16 May 2008 18:47:57 +0000 (20:47 +0200)]
typo

16 years agokeep tests from different directories separate to prevent overwriting files with...
Stefan Behnel [Fri, 16 May 2008 18:46:18 +0000 (20:46 +0200)]
keep tests from different directories separate to prevent overwriting files with the same name

16 years ago'make test3' target to build with the default python version and run the tests agains...
Stefan Behnel [Fri, 16 May 2008 18:30:13 +0000 (20:30 +0200)]
'make test3' target to build with the default python version and run the tests against python3.0

16 years agomore test fixes
Stefan Behnel [Fri, 16 May 2008 18:21:02 +0000 (20:21 +0200)]
more test fixes

16 years agomore test fixes
Stefan Behnel [Fri, 16 May 2008 18:07:49 +0000 (20:07 +0200)]
more test fixes

16 years agoclass names are identifiers, too
Stefan Behnel [Fri, 16 May 2008 17:58:56 +0000 (19:58 +0200)]
class names are identifiers, too

16 years agocleanup
Stefan Behnel [Fri, 16 May 2008 17:31:39 +0000 (19:31 +0200)]
cleanup

16 years agostruct fields were generated in the wrong order
Stefan Behnel [Fri, 16 May 2008 16:40:25 +0000 (18:40 +0200)]
struct fields were generated in the wrong order

16 years agoNew features: CodeWriter, TreeFragment, and a transform unit test framework.
Dag Sverre Seljebotn [Fri, 16 May 2008 16:12:21 +0000 (18:12 +0200)]
New features: CodeWriter, TreeFragment, and a transform unit test framework.

See the documentation of each class for details.

It is a rather big commit, however seperating it is non-trivial. The tests
for all of these features all rely on using each other, so there's a
circular dependency in the tests and I wanted to commit the tests and
features at the same time. (However, the non-test-code does not have a circular
dependency.)

16 years agoAdded Node.clone_node utility.
Dag Sverre Seljebotn [Fri, 16 May 2008 16:09:01 +0000 (18:09 +0200)]
Added Node.clone_node utility.

A method for cloning nodes. I expect this one to work on all descandants, but
it can be overriden if a node has special needs. It seems natural to put
such core functionality in the node classes rather than in a visitor.

16 years agotest fixes
Stefan Behnel [Fri, 16 May 2008 15:58:46 +0000 (17:58 +0200)]
test fixes

16 years agoAdded ReadonlyVisitor.
Dag Sverre Seljebotn [Fri, 16 May 2008 15:54:53 +0000 (17:54 +0200)]
Added ReadonlyVisitor.

There was an option in VisitorTransform for this but it was way too obscure,
better to have a seperate class.

16 years agoFixed typo children_attrs -> child_attrs
Dag Sverre Seljebotn [Fri, 16 May 2008 15:19:33 +0000 (17:19 +0200)]
Fixed typo children_attrs -> child_attrs

16 years agoVisitorTransform + smaller Transform changes
Dag Sverre Seljebotn [Fri, 16 May 2008 15:19:00 +0000 (17:19 +0200)]
VisitorTransform + smaller Transform changes

16 years agofix for name declarations of interned string values in functions
Stefan Behnel [Fri, 16 May 2008 15:02:20 +0000 (17:02 +0200)]
fix for name declarations of interned string values in functions

16 years agobig rewrite for the print statement in Py2 to provide the same interface in Py2 and Py3
Stefan Behnel [Fri, 16 May 2008 15:01:36 +0000 (17:01 +0200)]
big rewrite for the print statement in Py2 to provide the same interface in Py2 and Py3

16 years agoReplace filename strings with more generic source descriptors.
Dag Sverre Seljebotn [Fri, 16 May 2008 14:12:20 +0000 (16:12 +0200)]
Replace filename strings with more generic source descriptors.

This facilitates using the parser and compiler with runtime sources (such as
strings), while still being able to provide context for error messages/C debugging comments.

16 years agolet print statement use print() in Py3
Stefan Behnel [Fri, 16 May 2008 06:46:39 +0000 (08:46 +0200)]
let print statement use print() in Py3

16 years ago__future__ import fix for older Python versions
Stefan Behnel [Fri, 16 May 2008 06:46:17 +0000 (08:46 +0200)]
__future__ import fix for older Python versions

16 years agoenable __future__ imports
Stefan Behnel [Thu, 15 May 2008 16:49:13 +0000 (18:49 +0200)]
enable __future__ imports

16 years agofix for slot descriptor
Stefan Behnel [Thu, 15 May 2008 15:45:10 +0000 (17:45 +0200)]
fix for slot descriptor

16 years agotest fix
Stefan Behnel [Thu, 15 May 2008 09:36:04 +0000 (11:36 +0200)]
test fix

16 years agotest fix
Stefan Behnel [Thu, 15 May 2008 09:35:28 +0000 (11:35 +0200)]
test fix

16 years agorange optimisation fixes
Stefan Behnel [Thu, 15 May 2008 09:19:23 +0000 (11:19 +0200)]
range optimisation fixes

16 years agocleanup and provisionary Py3 fix
Stefan Behnel [Thu, 15 May 2008 09:14:12 +0000 (11:14 +0200)]
cleanup and provisionary Py3 fix