merge
[cython.git] / CHANGES_pyrex.txt
1 0.9.4.1
2 -------
3
4 Bug fixes:
5
6   - Fixed indentation problem in Pyrex.Distutils.build_ext.
7     [Oliver Grisel <ogrisel@nuxeo.com>]
8
9
10 0.9.4
11 -----
12
13 Improvements:
14
15   - All use of lvalue casts has been eliminated, for
16     compatibility with gcc4.
17   
18   - PyMODINIT_FUNC now used to declare the module init function.
19   
20   - Generated code should be compilable as either C or C++.
21     When compiling as C++, "extern C" is used where appropriate
22     to preserve linkage semantics. C++ functions still cannot
23     be called yet.
24   
25   - An extension type can be made weak-referenceable by
26     giving it a C attribute of type object called __weakref__.
27   
28   - Source files opened in universal newlines mode.
29   
30   - Support for public extension type C attributes of type
31     long long and unsigned long long added (but not tested).
32     [Sam Rushing <sam@rushing.nightmare.com>]
33   
34   - Distutils include directories now passed to Pyrex compiler.
35     [Konrad Hinsen <khinsen@cea.fr>]
36   
37   - Integer constants with an "L" suffix are now allowed
38     and are converted to Python long integers.
39     [Rainer Deyke <rainerd@eldwood.com>]
40   
41   - A broken .c file is no longer left behind if there are
42     compilation errors.
43   
44   - Using the result of a Python indexing or attribute access
45     operation as a char * is no longer considered an error in
46     most cases, as the former behaviour proved to be more
47     annoying than helpful.
48   
49 Bug fixes:
50
51   - Fixed problems with conversion from Python integers to
52     C unsigned longs. Now use PyInt_AsUnsignedLongMask and
53     PyInt_AsUnsignedLongLongMask instead of the PyLong_*
54     functions (which only work on Python longs).
55     [Wim Vree <wim@vree.be>]
56   
57   - C unsigned ints now converted to/from Python longs intead
58     of Python ints to avoid overflow problems.
59     [Heiko Wundram <me+pyrex@modelnine.org>]
60   
61   - Correct PyArg_ParseTuple format characters now used for
62     unsigned types. [Jeff Bowden <jlb@houseofdistraction.com>]
63   
64   - Nonzero return value from a base class tp_traverse call
65     is handled.
66   
67   - Taking sizeof an incomplete type caused a crash while
68     producing an error message. [Drew Perttula <dperttula@pdi.com>]
69   
70   - If a module cimported itself, definitions of global variables
71     were generated twice. [Parzival Herzog <parzp@shaw.ca>]
72   
73   - Distutils extension updated to handle changed signature of
74     swig_sources(). [David M. Cooke <cookedm@physics.mcmaster.ca>]
75   
76   - Incorrect C code generated for a raw string containing a double
77     quote preceded by a backslash. [Thomas Drake <bistroy@mac.com>]
78   
79   - Declaration of public C function with an exception value written
80     to generated .pxi file without the except clause.
81     [Robby Dermody <robbyd@u20.org>]
82   
83   - __delitem__ method of an extension type with no __setitem__
84     did not get called. [Richard Boulton <richard@tartarus.org>]
85   
86   - A spurious Py_INCREF was generated when a return statement
87     required a type test. [Jonathan Doda <jdoda@sympatico.ca>]
88   
89   - Casting a value to a function pointer and then immediately
90     calling it generated a cast to a function instead of a cast
91     to a function pointer. [Simon Burton <simon@arrowtheory.com>]
92   
93   - Py_TPFLAGS_HAVE_GC was not being set on an extension type that
94     inherited from an external extension type that used GC but did
95     not itself have any PyObject* attributes.
96     [Michael Hordijk <hoffbrinkle@hotmail.com>]
97   
98   - A return statement inside a for statement leaked a reference
99     to the loop's iterator.
100     [Jürgen Kartnaller <j.kartnaller@robotech.at>]
101   
102   - Full module name now appears in __module__ attribute of classes
103     and extension types, provided a correct dotted name is used
104     for the .pyx file. [Giovanni Bajo <rasky@develer.com>]
105
106   - Public extension type with no C attributes produced an
107     invalid .pxi file. [Simon Burton <simon@arrowtheory.com>]
108   
109   - Using a dict constructor as the second operand of a boolean
110     expression crashed the Pyrex compiler.
111     [Stefan Behnel <behnel_ml@gkec.informatik.tu-darmstadt.de>]
112   
113   - A C declaration list ending with a comma resulted in invalid
114     C code being generated. [Alex Coventry <alex_c@mit.edu>]
115   
116   - A raw string containing two consecutive backslashes produced
117     incorrect C code. [Helmut Jarausch <jarausch@igpm.rwth-aachen.de>]
118   
119   - An error is reported if you attempt to declare a special
120     method of an extension type using 'cdef' instead of 'def'.
121     [Sam Rushing <srushing@ironport.com>]
122
123 0.9.3
124 -----
125
126 Enhancements:
127
128   - Types defined with a ctypedef in a 'cdef extern from' block
129     are now referred to by the typedef name in generated C code,
130     so it is no longer necessary to match the type in the C
131     header file exactly.
132
133   - Conversion to/from unsigned long now done with
134     PyLong_AsUnsignedLong and PyLong_FromUnsignedLong.
135     [Dug Song <dugsong@monkey.org>]
136   
137   - A struct, union or enum definition in a 'cdef extern from'
138     block may now be left empty (using 'pass'). This can be useful
139     if you need to declare a variable of that type, but don't need
140     to refer to any of its members.
141   
142   - More flexible about ordering of qualifiers such as 'long' and
143     'unsigned'.
144     ["John (J5) Palmieri" <johnp@redhat.com>]
145
146
147 Bug fixes:
148
149   - Non-interned string literals used in a Python class
150     definition did not work.
151     [Atsuo Ishimoto <ishimoto@gembook.org>]
152     [Andreas Kostyrka <andreas@kostyrka.org>]
153   
154   - Return types of the buffer interface functions for extension
155     types have been corrected.
156     [Dug Song <dugsong@monkey.org>]
157   
158   - Added 'static' to declarations of string literals.
159     [Phil Frost <indigo@bitglue.com>]
160   
161   - Float literals are now copied directly to the C code as written,
162     to avoid problems with loss of precision.
163     [Mario Pernici <Mario.Pernici@mi.infn.it>]
164   
165   - Inheriting from an extension type with C methods defined in
166     another Pyrex module did not work.
167     [Itamar Shtull-Trauring <itamar@itamarst.org>]
168
169 0.9.2.1
170 -------
171
172 Bug fixes:
173
174   - Corrected an import statement setup.py, and made it
175     check for a unix platform in a more reliable way.
176
177 0.9.2
178 -----
179
180 Enhancements:
181
182   - Names of Python global variables and attributes are now
183     interned, and PyObject_GetAttr/SetAttr are used instead
184     of PyObject_GetAttrString/SetAttrString. String literals
185     which resemble Python identifiers are also interned.
186   
187   - String literals are now converted to Python objects only
188     once instead of every time they are used.
189   
190   - NUL characters are now allowed in Python string literals.
191
192   - Added some missing error checking code to the beginning
193     of module init functions. It's unlikely the operations
194     involved would ever fail, but you never know.
195
196 Bug fixes:
197
198   - Corrected some problems introduced by moving the Plex
199     package.
200
201 0.9.1.1
202 -------
203
204 Bug fixes:
205
206   - Corrected a problem in the setup.py (pyrexc script incorrectly
207     named).
208   
209   - Updated the distutils extension to match changes in the
210     Pyrex compiler calling interface.
211   
212   - Doing 'make clean' in Demos/callback was removing a little too
213     much (that's why cheesefinder.c kept disappearing).
214
215 0.9.1
216 -----
217
218 Enhancements:
219
220   - A C method can now call an inherited C method by the usual
221     Python technique.
222     [Jiba <jiba@tuxfamily.org>]
223   
224   - The __modname__ of a Python class is now set correctly.
225     [Paul Prescod <paul@prescod.net>]
226   
227   - A MANIFEST.in file has been added to the distribution to
228     facilitate building rpms.
229     [contributed by Konrad Hinsen <hinsen@cnrs-orleans.fr>]
230
231 Bug fixes:
232
233   - Conditional code now generated to allow for the renaming of LONG_LONG
234     to PY_LONG_LONG that occurred between Python 2.2 and 2.3.
235
236   - Header files referenced in cimported modules were not being included.
237     [Tom Popovich <tompopovich@aol.com>]
238   
239   - References to C functions and variables in a cimported module were
240     not being recognised if made from within a local scope.
241     [Tom Popovich <tompopovich@aol.com>]
242   
243   - Spurious declarations in code generated for a "finally" block.
244     [Brandon Long <blong@fiction.net>]
245   
246   - Attempting to return a value from a __contains__ method didn't work.
247     [Andreas Kostyrka <andreas@mtg.co.at>]
248   
249   - Incorrect code generated for an extension type with C methods
250     inheriting from a base type with no C methods.
251     [Robin Becker <robin@reportlab.com>]
252   
253   - Failure to report an error if a C method was defined in the
254     implementation part of an extension type that was not declared
255     in the corresponding definition part. Documentation also updated
256     to explain that this is necessary.
257     [Jiba <jiba@tuxfamily.org>]
258   
259   - Made it an error to forward-declare an extension type with
260     a different base class specification from its subsequent
261     definition.
262     [Jiba <jiba@tuxfamily.org>]
263   
264   - C attributes of an extension type were not being propagated
265     through more than one level of inheritance.
266     [Jiba <jiba@tuxfamily.org>]
267   
268   - If a garbage collection occurred early enough in the __new__
269     method of an extension type with Python-valued C attributes,
270     a crash could occur in its tp_traverse function.
271     [reported by Jiba <jiba@tuxfamily.org>]
272     [fix suggested by Paul Prescod <paul@prescod.net>]
273   
274   - An empty vtable struct is no longer generated for extension
275     types with no C methods.
276     [Robin Becker <robin@reportlab.com>]
277   
278   - Memory was leaked in the sq_item function of an extension
279     type with a __getitem__ method.
280     [Atsuo Ishimoto <ishimoto@gembook.org>]
281   
282   - Code generated to work around a bug in some versions of Python
283     2.2 which fails to initialise the tp_free slot correctly in
284     some circumstances.
285     [Matthias Baas <baas@ira.uka.de>]
286   
287   - Compiler crash when defining an extension type with a base
288     class specified by a dotted name.
289     [Alain Pointdexter <alainpoint@yahoo.fr>]
290   
291   - Referencing an extension type defined in a cimported module
292     at run time did not work correctly.
293     [Alain Pointdexter <alainpoint@yahoo.fr>]
294   
295   - Incorrect object struct code generated for an extension type
296     whose base class was defined in a .pxd file.
297     [Alain Pointdexter <alainpoint@yahoo.fr>]
298   
299   - Redeclaring a type that wasn't previously an extension type
300     as an extension type caused a compiler crash.
301     [Scott Robinson <scott@tranzoa.com>]
302   
303   - Incorrect code was generated for return statements in a
304     special method with no return value.
305     [Gary Bishop <gb@cs.unc.edu>]
306   
307   - Single-line def statement did not work.
308     [Francois Pinard <pinard@iro.umontreal.ca>]
309   
310 Modifications:
311   
312   - Only the last pathname component of the .pyx file is reported in
313     backtraces now.
314     [Bryan Weingarten <bryan.weingarten@pobox.com>]
315   
316   - Documentation corrected to remove the erroneous statement that
317     extension classes can have a __del__ method.
318     [Bryan Weingarten <bryan.weingarten@pobox.com>]
319   
320   - Note added to documentation explaining that it is not possible
321     for an extension type's __new__ method to explicitly call the
322     inherited __new__ method.
323   
324   - The version of Plex included with Pyrex is now installed
325     as a subpackage of the Pyrex package, rather than as a
326     top-level package, so as not to interfere with any other
327     version of Plex the user may have installed.
328
329 0.9
330 ---
331
332 New features:
333
334   - Extension types can have properties. See the new "Properties"
335     section in the "Extension Types" page.
336   
337   - An extension type can inherit from a builtin type or another
338     extension type. See "Subclassing" in the "Extension Types" page.
339   
340   - Extension types can have C methods, which can be overridden
341     in derived extension types. See "C Methods" in the "Extension Types"
342     page.
343
344 Enhancements:
345   
346   - Conversion is now performed between C long longs and Python
347     long integers without chopping to the size of a C long.
348     Also the Python PY_LONG_LONG type is now used for long longs
349     for greater portability.
350
351 Bug fixes:
352
353   - Names were sometimes being generated that were insufficiently 
354     unique in the presence of cimported declarations.
355   
356   - Changed the way the included filename table is declared from
357     char *[] to char **, to stop MSVC from complaining about it
358     having an unknown size.
359     [Alexander A Naanou <alex_nanou@pochta.ru>]
360   
361   - Second argument of assert statement was not being coerced
362     to a Python value.
363     [Francois Pinard   http://www.iro.umontreal.ca/~pinard]
364   
365   - Return statement without value wasn't accepted in some
366     extension type special methods when it should have been.
367     [Francois Pinard   http://www.iro.umontreal.ca/~pinard]
368
369   - Attempting to call a non-function C value crashed the
370     compiler.
371     [John J Lee <jjl@pobox.com>]
372   
373   - Functions declared as "except *" were not returning exceptions.
374     [John J Lee <jjl@pobox.com>]
375     
376   - A syntax warning from Plex about assignment to None has
377     been eliminated.
378     [Gordon Williams <g_will@cyberus.ca>]
379   
380   - Public function declaration with empty argument list was
381     producing (void) in .pxi file.
382     [Michael P. Dubner <dubnerm@mindless.com>]
383   
384   - Incorrect error signalling code was being generated in the
385     __hash__ special method of an extension type.
386     
387
388 0.8.1
389 -----
390
391 Bug fixes:
392
393   - Names of structs, unions and enums in external header
394     files were getting mangled when they shouldn't have been.
395     [Norman Shelley <Norman.Shelley@motorola.com>]
396   
397   - Modified distutils extension so that it will stop before
398     compiling the C file if the Pyrex compiler reports errors.
399     [John J Lee <jjl@pobox.com>]
400     
401
402 0.8
403 ---
404
405 New features:
406
407   - INCOMPATIBLE CHANGE: The type object of an external extension
408         type is now imported at run time using the Python import
409         mechanism. To make this possible, an 'extern' extension type
410         declaration must DECLARE THE MODULE from which the extension
411         type originates. See the new version of the "Extension Types"
412         documentation for details.
413         
414         This change was made to eliminate the need for Pyrex to be 
415         told the C name of the type object, or for the Pyrex module 
416         to be linked against the object code providing the type object.
417   
418         You will have to update any existing external extension type
419         declarations that you are using. I'm sorry about that, but it
420         was too hard to support both the old and new ways.
421   
422   - Compile-time importing: A Pyrex module can now import declarations 
423         from another Pyrex module using the new 'cimport' statement. See 
424         the new section on "Sharing Declarations Between Pyrex Modules" in 
425         the documentation.
426
427 Minor improvements:
428
429   - An error is reported if you declare a struct, union or
430     extension type using 'cdef' in one place and 'ctypedef'
431     in another.
432   
433   - Struct, union and extension types can only be forward-
434     declared using 'cdef', not 'ctypedef' (otherwise invalid 
435     C code would be generated).
436   
437   - The 'global' statement can be used at the module level to
438     declare that a name is a module-level name rather than a
439     builtin. This can be used to access module attributes such
440     as __name__ that would otherwise be assumed to be builtins.
441     [Pat Maupin <pmaupin@speakeasy.net>]
442   
443   - The 'assert' statement now accepts a second argument.
444     [Francois Pinard <pinard@iro.umontreal.ca>]
445
446 Bug fixes:
447
448   - When using Python 2.3, "True" or "False" could sometimes
449     turn up in generated code instead of "1" or "0".
450     [Adam Hixson <chixson@ou.edu>]
451   
452   - Function return value not always converted to or from a
453     Python object when it should have been.
454   
455   - Certain kinds of error in a function call expression
456     could crash the compiler.
457     ["Edward C. Jones" <edcjones@erols.com>]
458   
459   - Fixed memory leak in functions with * or ** args.
460     [Alexander A Naanou <alex_nanou@pochtamt.ru>]
461
462
463 0.7.1
464 -----
465
466 Bug fixes:
467
468   - Calling a function declared as returning an extension
469     type could crash the compiler.
470
471   - A function call with type errors in the argument list 
472     could crash the compiler.
473   
474   - An 'else' clause on a for-from statement could crash
475     the compiler.
476   
477   - Incorrect casting code was generated when a generic
478     object argument of a special method was declared as
479     being of an extension type.
480     [Phillip J. Eby <pje@telecommunity.com>]
481   
482   - A blank line that couldn't be interpreted wholly as
483     a valid indentation sequence caused a syntax error.
484     In particular, a formfeed character on an otherwise
485     blank line wasn't accepted. 
486     [Francois Pinard <pinard@iro.umontreal.ca>]
487
488   - Parallel assignments were incorrectly optimised.
489   
490   - A bare tuple constructor with an extra comma at the
491     end of a line caused a syntax error.
492
493 0.7
494 ---
495
496 New features:
497
498   - Attributes of extension types can be exposed to Python
499     code, either read/write or read-only.
500
501   - Different internal and external names can be specified
502     for C entities.
503   
504   - None is a compile-time constant, and more efficient code
505     is generated to reference it.
506   
507   - Command line options for specifying directories to
508     search for include files.
509
510 Enhancements:
511
512   - More efficient code is generated for access to Python
513     valued C attributes of extension types.
514   
515   - Cosmetic code improvement: Less casting back and forth
516     between extension types and PyObject * when referencing
517     C members of the object struct.
518   
519   - C arguments and variables declared as an extension type
520     can take the value None.
521   
522   - Form feed characters are accepted as whitespace.
523   
524   - Function names in tracebacks are qualified with
525     module name and class name.
526
527 Bug fixes:
528
529   - A sufficiently complex expression in a boolean context
530     could cause code to be generated twice for the same 
531     subexpression.
532   
533   - Incorrect casting code was generated when passing an
534     extension type to a function expecting a generic Python
535     object.
536   
537   - Executable statements are now disallowed inside a
538     cdef class block (previously they silently caused
539     crazy C code to be generated).
540   
541   - Tracebacks should now report the correct filename for
542     functions defined in files included with the 'include'
543     statement.
544   
545   - The documentation incorrectly claimed that an extension
546     type can't have a __del__ method. In fact, it can, and
547     it behaves as expected.
548
549
550 0.6.1
551 -----
552
553 Bug fixes:
554
555   - Fixed broken distutils extension.
556
557
558
559 0.6
560 ---
561
562 New features:
563
564   - Command line options for reporting version number,
565     requesting a listing file and specifying the name of
566     the generated C file.
567
568   - An 'include' statement allows inclusion of declarations
569     from other Pyrex source files.
570   
571   - If there are any public declarations, a Pyrex include
572     file is generated (as well as a .h file) containing 
573     declarations for them.
574   
575   - Extension types can be declared public, so their C
576     attributes are visible to other Pyrex and C code.
577   
578   - Try-except statements can now have an 'else' clause.
579     [Francois Pinard <pinard@iro.umontreal.ca>]
580   
581   - Multiple simple statements can be placed on one line
582     separated by semicolons.
583   
584   - A suite consisting of a simple statement list can now
585     be placed on the same line after the colon in most
586     cases.
587     [Francois Pinard <pinard@iro.umontreal.ca>]
588
589   - The automatic coercion of a C string to a C char has
590     been removed (it proved to be too error-prone).
591     Instead, there is a new form of literal for C
592     character constants: c'X'
593
594   - The __get__ special method (used by descriptor objects)
595     now allows for the possibility of the 2nd or 3rd
596     arguments being NULL. Also the __set__ method has been
597     split into two methods, __set__ and __delete__.
598     [Phillip J. Eby <pje@telecommunity.com>]
599   
600 Bug fixes:
601
602   - Values unpacked into a non-Python destination variable
603     were not being converted before assignment.
604     [Gareth Watts <gareth@omnipotent.net>]
605
606   - Hex constants greater than 0x7fffffff caused compiler
607     to crash. [Gareth Watts <gareth@omnipotent.net>]
608   
609   - Type slots are no longer statically initialised with
610     extern function pointers, to avoid problems with
611     some compilers. The hack in the distutils extension
612     to work around this by compiling as C++ has been
613     disabled. [Phillip J. Eby <pje@telecommunity.com>]
614   
615   - Fixed several more instances of the error-reporting
616     routine being called with arguments in the wrong
617     order. Hoping I've *finally* got all of them now...
618   
619   - Nested for-from loops used the same control variable.
620     [Sebastien de Menten <sdementen@hotmail.com>]
621   
622   - Fixed some other error message related bugs.
623     [Francois Pinard <pinard@iro.umontreal.ca>]
624   
625   - Assigning to slice didn't work.
626     [Francois Pinard <pinard@iro.umontreal.ca>]
627   
628   - Temp variables were being declared as extension
629     types and then being assigned PyObject *'s. All
630     Python temp vars are now declared as PyObject *.
631     [Francois Pinard <pinard@iro.umontreal.ca>]
632
633 0.5
634 ---
635
636 Bug fixes:
637
638   - Algorithm for allocating temp variables redesigned
639     to fix various errors concerning temp
640     variable re-use.
641     [Mark Rowe <bdash@gmx.net>]
642
643   - Memory leak occured sometimes when an implicit
644     type test was applied to the result of an 
645     expression.
646     [christoph.wiedemann@daimlerchrysler.com]
647   
648   - __set__ method of extension types had wrong
649     signature.
650     [Josh Littlefield <joshl@cisco.com>]
651     
652 0.4.6
653 -----
654
655 Bug fixes:
656
657   - Indexing multi-dimensional C arrays didn't
658     work.
659     [Gary Dietachmayer <gary.dietachmayer@dsto.defence.gov.au>]
660
661
662 0.4.5
663 -----
664
665 New features:
666
667   - There is now a 'public' declaration for
668     making Pyrex-defined variables and functions
669     available to external C code. A .h file is
670     also generated if there are any public
671     declarations.
672
673 Enhancements:
674
675   - Defining __len__/__getitem__ methods in an
676     extension class fills sq_length/sq_item slots
677     as well as mp_length/mp_subscript.
678     [Matthias Baas <baas@ira.uka.de>]
679   
680   - The Distutils extension now allows .c files
681     to be incorporated along with .pyx files.
682     [Modification to Distutils extension contributed
683     by Darrell Gallion <dgallion1@yahoo.com>.]
684
685 Bug fixes:
686
687   - Float literals without a decimal point
688     work again now.
689     [Mike Rovner <mike@bindkey.com>]
690     [Peter Lepage <gpl@mail.lns.cornell.edu>]
691   
692   - Compiler crashed if exception value didn't
693     match function return type.
694     [Michael JasonSmith <mpj17@smtphost.canterbury.ac.nz>]
695   
696   - The setup.py file should now install the
697     Lexicon.pickle file in the right place.
698     [Patch supplied by David M. Cooke 
699     <cookedm@arbutus.physics.mcmaster.ca>]
700     
701   - Compiler crashed when compiling a C function that
702     returned an extension type.
703     [David M. Cooke 
704     <cookedm@arbutus.physics.mcmaster.ca>]
705   
706   - Anonymous enum types did not have C code
707     suppressed inside an extern-from block.
708     [Matthew Mueller <donut@azstarnet.com>]
709
710
711 0.4.4
712 -----
713
714 Enhancements:
715
716   - Tracebacks now extend into Pyrex function
717     calls and show line numbers in the Pyrex
718     source file.
719
720   - Syntax for float literals made more lenient
721     (no longer requires digits both before and
722     after the point).
723     [Peter Lepage <gpl@mail.lns.cornell.edu>]
724   
725   - Method calls can be made on string literals
726     (e.g. ",".join(x)).
727     [pedro_rodriguez@club-internet.fr]
728
729 Bug fixes:
730
731   - Incorrect refcount code generated when a
732     Python function needing argument type tests
733     had local Python variables.
734     [Matthias Baas <baas@ira.uka.de>]
735   
736   - 'self' parameter of __getitem__ method of
737     extension type had wrong implicit type.
738     [Peter Lepage <gpl@mail.lns.cornell.edu>]
739   
740   - Repaired breakage introduced by trying to
741     allow an empty parameter list to be written
742     as (void). No longer attempting to allow
743     this (too hard to parse correctly).
744     [Peter Lepage <gpl@mail.lns.cornell.edu>]
745   
746   - Found bug in Plex 1.1.2 which was the *real*
747     cause of the two-newlines-in-a-row problem.
748     Removed the Opt(Eol)+Str("\n") hacks in
749     the scanner which were working around this
750     before.
751     [pedro_rodriguez@club-internet.fr]
752   
753   - __call__ special method of extension types
754     had wrong signature.
755     [Peter Lepage <gpl@mail.lns.cornell.edu>]
756
757
758 0.4.3
759 -----
760
761 New language features:
762
763   - For-from loop for iterating over integer
764     ranges, using pure C loop where possible.
765
766 Enhancements:
767
768   - sizeof() can now be applied to types as
769     well as variables.
770   
771   - Improved handling of forward-declared
772     extension types.
773
774 Bug fixes:
775
776   - Two newlines in a row in a triple quoted
777     string caused a parse error on some
778     platforms.
779     [Matthias Baas <baas@ira.uka.de>]
780   
781   - Fixed problem with break and continue in
782     the else-clause of a loop.
783
784
785 0.4.2
786 -----
787
788 New language features:
789
790   - C functions can be declared as having an
791     exception return value, which is checked
792     whenever the function is called. If an
793     exception is detected inside a C function
794     for which no exception value is declared,
795     a warning message is printed and the
796     exception is cleared.
797   
798   - Cascaded assignments (i.e. a = b = c 
799     are now supported.
800   
801   - Anonymous enum declarations are allowed,
802     for when you just want to declare constants.
803   
804   - The C types "long long" and "long double"
805     are now understood. Also, "int" is optional
806     after "short" or "long".
807   
808 Enhancements:
809
810   - A * argument in a function call can now be
811     any sequence, not just a tuple.
812
813   -     A C char* or char[] will be turned into
814     a char by taking its first character if
815     used in a context where a char is required,
816     thus allowing a string literal to be used as 
817     a char literal.
818   
819   - C string * C int or vice versa is now
820     interpreted as Python string replication.
821   
822   - Function arguments are checked for void or
823     incomplete type.
824
825 Bug fixes:
826
827   - Non-external extension types show up in the
828     module dict once more (this got broken in
829     0.4.1).
830   
831   - A spurious decref has been removed from the
832     runtime support code for the "import" statement.
833     Hopefully this will prevent the crashes some
834     people have been experiencing when importing
835     builtin modules.
836     [Mathew Yeates <mathew@comma.jpl.nasa.gov>]
837
838 0.4.1
839 -----
840
841 New language features:
842
843   - "ctypedef struct/union/enum/class" statements
844     added, for use in extern-from blocks when a
845     header file uses a ctypedef to declare a
846     tagless struct, union or enum type.
847   
848   - "pass" allowed in an extern-from block.
849   
850   - "cdef extern from *" for when you don't want
851     to specify an include file name.
852   
853   - Argument names may be omitted in function
854     signatures when they're not needed.
855   
856   - New reserved word NULL for the null C pointer.
857
858 Compiler enhancements:
859   
860   - Lexicon is now picked in binary format, so
861     startup should be much faster on slower
862     machines.
863   
864   - If Pyrex decides to rebuild the lexicon and
865     then finds that it can't write a pickle file,
866     it now prints a warning and carries on
867     instead of crashing.
868   
869   - Chat about hash codes and lexicon pickling
870     now turned off by default except when creating
871     a new lexicon (which ought never happen now
872     unless you change the scanner).
873
874 Bug fixes:
875
876   - Modified the runtime support code for "import"
877     statements, hopefully fixing problem with using
878     a Pyrex module in conjunction with py2exe.
879   
880   - DL_EXPORT now used in both the prototype and
881     definition of the module init function.
882   
883   - Exception state is now saved and restored around
884     calls to an extension type __dealloc__ method,
885     to avoid screwing up if the object is deallocated
886     while an exception is being propagated.
887   
888   - Making an attribute reference to a method of
889     an extension type caused a compiler crash.
890   
891   - Doc string in new-style class definition
892     caused a run-time error.
893   
894   - Insufficient parentheses were put around C type 
895     casts.
896
897   - Constructors for extension types are now read-only
898     C global variables instead of entries in the
899     module dict. This change was needed to prevent
900     Numeric from blowing up due to touching its
901     typeobject before import_numeric() could be called.
902
903 0.4
904 ---
905
906 New features:
907
908   - "cdef extern from" statement allows inclusion
909     of C header files to be specified, solving
910     a number of problems including:
911       - Clashes between Pyrex and C declarations,
912         due to "const" and other reasons
913       - Windows-specific features required in
914         function declarations
915       - Helping deal with types such as "size_t"
916       - Helping deal with functions defined as
917         macros
918   
919   - Access to internals of pre-existing extension
920     types is now possible by placing an extension
921     type declaration inside a "cdef extern from"
922     block.
923
924 Bug fixes:
925
926   - Error not reported properly when passing
927     wrong number of args to certain special
928     methods of extension types.
929     [Mitch Chapman <mitchchapman@earthlink.net>]
930   
931   - Compile-time crash when defining an extension
932     type with a __hash__ method.
933
934 Minor enhancements:
935
936   - Hashing of the scanner source file made more
937     platform-independent, making spurious regeneration 
938     of the pickle less likely.
939
940
941 0.3.4
942 -----
943
944 Bug fixes:
945
946   - Runtime crash when using * or ** args in
947     a method of an extension type fixed.
948     [Matthew Mueller <donut@azstarnet.com>]
949   
950   - Compiler crash when using default argument
951     values in a method of a Python class.
952     [Mike Rovner <mike@bindkey.com>]
953
954 Enhancements:
955
956   - Type slots filled with functions from outside
957     the extension module are now initialised dynamically,
958     which should eliminate at least some of the
959     "initialiser is not constant" problems experienced
960     on Windows.
961     [Marek Baczek <imbaczek@poczta.fm>]
962   
963   - On Windows, __declspec(dllexport) is now used for
964     the module init func declaration (or should be --
965     I haven't tested this).
966     [Marek Baczek <imbaczek@poczta.fm>]
967   
968   - The compiler shouldn't attempt to rewrite the
969     Lexicon.pickle file unless the source has been
970     changed (hashing is used now instead of comparing
971     timestamps). So there should be no problem any more
972     with installing Pyrex read-only.
973     [fawcett@uwindsor.ca]
974
975 0.3.3
976 -----
977
978 Bug fixes:
979
980 * A void * can be assigned from any other
981 pointer type.
982 [piers@cs.su.oz.au]
983
984 * File names in error messages no longer
985 quoted (this was apparently confusing some
986 editors).
987 [donut@azstarnet.com]
988
989 * Reference to a struct member which is an
990 array is coerced to a pointer.
991 [donut@azstarnet.com]
992
993 * Default argument values did not work
994 in methods of an extension type.
995 [donut@azstarnet.com]
996
997 * Single or double quote characters in a
998 triple-quoted string didn't work.
999 [donut@azstarnet.com]
1000
1001 * Using *args in a function definition
1002 sometimes caused a crash at runtime.
1003 [donut@azstarnet.com]
1004
1005 * A hack is included which tries to make
1006 functions in Python.h which use 'const'
1007 accessible from Pyrex. But it doesn't
1008 work on all platforms. Thinking about a
1009 better solution.
1010
1011
1012 New features:
1013
1014 * Comment containing Pyrex version number
1015 and date/time at top of generated C file.
1016 [baas@ira.uka.de]
1017
1018
1019 0.3.2
1020 -----
1021
1022 Bug fixes:
1023
1024 * The & operator works again.
1025 [matthias.oberlaender@daimlerchrysler.com]
1026 [baas@ira.uka.de]
1027
1028 * The & operator had incorrect precedence.
1029
1030 * "SystemError: 'finally' pops bad exception"
1031 under some circumstances when raising an
1032 exception. [baas@ira.uka.de]
1033
1034 * Calling a Python function sometimes leaked
1035 a reference.
1036
1037 * Crash under some circumstances when casting
1038 a Python object reference to a C pointer type.
1039 [mpj17@cosc.canterbury.ac.nz]
1040
1041 * Crash when redeclaring a function.
1042 [baas@ira.uka.de]
1043
1044 * Crash when using a string constant inside
1045 a Python class definition.
1046 [mike@bindkey.com]
1047
1048 * 2-element slice indexing expressions.
1049 [mike@bindkey.com]
1050
1051 * Crash when encountering mixed tabs and
1052 spaces.
1053 [mike@bindkey.com]
1054
1055 New features:
1056
1057 * A wider variety of constant expressions is
1058 now accepted for enum values, array
1059 dimensions, etc.
1060 [mike@bindkey.com]
1061
1062
1063 0.3.1
1064 -----
1065
1066 New features:
1067
1068 * More special methods for extension types:
1069 __delitem__, __delslice__, __getattr__,
1070 __setattr__, __delattr__
1071
1072 * Module-level variable of a Python object type
1073 declared with 'cdef' is private to the module, and
1074 held in a C variable instead of the module dict.
1075
1076 * External C functions with variable argument lists
1077 can be declared and called.
1078
1079 * Pyrex-defined Python functions can have default
1080 argument values and * and ** arguments, and can be
1081 called with keyword arguments.
1082
1083 * Pointer-to-function types can be declared.
1084
1085 * Pyrex now supports a declaration syntax that
1086 C doesn't! Example:
1087
1088   cdef (int (*)()) foo() # function returning a function ptr
1089
1090 * There is now a ctypedef statement.
1091
1092 * Extension types can now be forward-declared.
1093
1094 * All permutations of (non-Unicode) string literals 
1095 and escape codes should work now.
1096
1097 * Hex and octal integer literals.
1098
1099 * Imaginary number literals.
1100
1101 * Docstrings are now supported.
1102
1103 Bug fixes:
1104
1105 * Type tests are performed when using a Python object
1106 in a context requiring a particular extension type.
1107
1108 * Module-level variable holding the type object
1109 of an extension type had incorrect type.
1110
1111 0.3
1112 ---
1113
1114 New features:
1115
1116 * Extension types! Yay!
1117
1118 0.2.2
1119 -----
1120
1121 Bug fixes:
1122
1123 * Fixed error message generation again after a previous
1124 bug was accidentally re-indroduced.
1125
1126 * Removed the declaration of isspace() from the code
1127 generated for print statement support (it's not needed
1128 and was conflicting with the system-supplied one on
1129 some platforms).
1130
1131 0.2
1132 ---
1133
1134 New features:
1135
1136 * Executable statements are now allowed at the
1137 top level of a module.
1138
1139 * Python class definitions are now supported, with
1140 the following limitations:
1141
1142     - Class definitions are only allowed at the top
1143       level of a module, not inside a control structure
1144       or function or another class definition.
1145     
1146     - Assigning a Pyrex-defined Python function to a
1147       class attribute outside of the class definition
1148       will not create a method (because it's not an 
1149       interpreted Python function and therefore
1150       won't trigger the bound-method creation magic).
1151     
1152     - The __metaclass__ mechanism and the creation of
1153       new-style classes is not (yet) supported.
1154
1155 * Casting between Python and non-Python types is
1156 better supported.
1157
1158 Bug fixes:
1159
1160 * Fixed bug preventing for-loops from working.
1161
1162
1163 0.1.1
1164 -----
1165
1166 * I've discovered a flaw in my algorithm for releasing
1167 temp variables. Fixing this properly will require some
1168 extensive reworking; I've put in a hack in the meantime
1169 which should work at the cost of using more temp variables
1170 than are strictly necessary.
1171
1172 * Fixed bug preventing access to builtin names from
1173 working. This should also have fixed the import
1174 statement, but I haven't tested it.
1175
1176 * Fixed some errors in __Pyx_GetExcValue.
1177
1178 * Fixed bug causing boolean expressions to malfunction
1179 sometimes.