11
23
- Conversion to/from unsigned long now done with
12
24
PyLong_AsUnsignedLong and PyLong_FromUnsignedLong.
13
25
[Dug Song <dugsong@monkey.org>]
15
27
- A struct, union or enum definition in a 'cdef extern from'
16
28
block may now be left empty (using 'pass'). This can be useful
17
29
if you need to declare a variable of that type, but don't need
18
30
to refer to any of its members.
20
32
- More flexible about ordering of qualifiers such as 'long' and
22
34
["John (J5) Palmieri" <johnp@redhat.com>]
28
40
definition did not work.
29
41
[Atsuo Ishimoto <ishimoto@gembook.org>]
30
42
[Andreas Kostyrka <andreas@kostyrka.org>]
32
44
- Return types of the buffer interface functions for extension
33
45
types have been corrected.
34
46
[Dug Song <dugsong@monkey.org>]
36
48
- Added 'static' to declarations of string literals.
37
49
[Phil Frost <indigo@bitglue.com>]
39
51
- Float literals are now copied directly to the C code as written,
40
52
to avoid problems with loss of precision.
41
53
[Mario Pernici <Mario.Pernici@mi.infn.it>]
43
55
- Inheriting from an extension type with C methods defined in
44
56
another Pyrex module did not work.
45
57
[Itamar Shtull-Trauring <itamar@itamarst.org>]
114
126
- Header files referenced in cimported modules were not being included.
115
127
[Tom Popovich <tompopovich@aol.com>]
117
129
- References to C functions and variables in a cimported module were
118
130
not being recognised if made from within a local scope.
119
131
[Tom Popovich <tompopovich@aol.com>]
121
133
- Spurious declarations in code generated for a "finally" block.
122
134
[Brandon Long <blong@fiction.net>]
124
136
- Attempting to return a value from a __contains__ method didn't work.
125
137
[Andreas Kostyrka <andreas@mtg.co.at>]
127
139
- Incorrect code generated for an extension type with C methods
128
140
inheriting from a base type with no C methods.
129
141
[Robin Becker <robin@reportlab.com>]
131
143
- Failure to report an error if a C method was defined in the
132
144
implementation part of an extension type that was not declared
133
145
in the corresponding definition part. Documentation also updated
134
146
to explain that this is necessary.
135
147
[Jiba <jiba@tuxfamily.org>]
137
149
- Made it an error to forward-declare an extension type with
138
150
a different base class specification from its subsequent
140
152
[Jiba <jiba@tuxfamily.org>]
142
154
- C attributes of an extension type were not being propagated
143
155
through more than one level of inheritance.
144
156
[Jiba <jiba@tuxfamily.org>]
146
158
- If a garbage collection occurred early enough in the __new__
147
159
method of an extension type with Python-valued C attributes,
148
160
a crash could occur in its tp_traverse function.
149
161
[reported by Jiba <jiba@tuxfamily.org>]
150
162
[fix suggested by Paul Prescod <paul@prescod.net>]
152
164
- An empty vtable struct is no longer generated for extension
153
165
types with no C methods.
154
166
[Robin Becker <robin@reportlab.com>]
156
168
- Memory was leaked in the sq_item function of an extension
157
169
type with a __getitem__ method.
158
170
[Atsuo Ishimoto <ishimoto@gembook.org>]
160
172
- Code generated to work around a bug in some versions of Python
161
173
2.2 which fails to initialise the tp_free slot correctly in
162
174
some circumstances.
163
175
[Matthias Baas <baas@ira.uka.de>]
165
177
- Compiler crash when defining an extension type with a base
166
178
class specified by a dotted name.
167
179
[Alain Pointdexter <alainpoint@yahoo.fr>]
169
181
- Referencing an extension type defined in a cimported module
170
182
at run time did not work correctly.
171
183
[Alain Pointdexter <alainpoint@yahoo.fr>]
173
185
- Incorrect object struct code generated for an extension type
174
186
whose base class was defined in a .pxd file.
175
187
[Alain Pointdexter <alainpoint@yahoo.fr>]
177
189
- Redeclaring a type that wasn't previously an extension type
178
190
as an extension type caused a compiler crash.
179
191
[Scott Robinson <scott@tranzoa.com>]
181
193
- Incorrect code was generated for return statements in a
182
194
special method with no return value.
183
195
[Gary Bishop <gb@cs.unc.edu>]
185
197
- Single-line def statement did not work.
186
198
[Francois Pinard <pinard@iro.umontreal.ca>]
190
202
- Only the last pathname component of the .pyx file is reported in
192
204
[Bryan Weingarten <bryan.weingarten@pobox.com>]
194
206
- Documentation corrected to remove the erroneous statement that
195
207
extension classes can have a __del__ method.
196
208
[Bryan Weingarten <bryan.weingarten@pobox.com>]
198
210
- Note added to documentation explaining that it is not possible
199
211
for an extension type's __new__ method to explicitly call the
200
212
inherited __new__ method.
202
214
- The version of Plex included with Pyrex is now installed
203
215
as a subpackage of the Pyrex package, rather than as a
204
216
top-level package, so as not to interfere with any other
231
- Names were sometimes being generated that were insufficiently
243
- Names were sometimes being generated that were insufficiently
232
244
unique in the presence of cimported declarations.
234
246
- Changed the way the included filename table is declared from
235
247
char *[] to char **, to stop MSVC from complaining about it
236
248
having an unknown size.
237
249
[Alexander A Naanou <alex_nanou@pochta.ru>]
239
251
- Second argument of assert statement was not being coerced
240
252
to a Python value.
241
253
[Francois Pinard http://www.iro.umontreal.ca/~pinard]
243
255
- Return statement without value wasn't accepted in some
244
256
extension type special methods when it should have been.
245
257
[Francois Pinard http://www.iro.umontreal.ca/~pinard]
247
259
- Attempting to call a non-function C value crashed the
249
261
[John J Lee <jjl@pobox.com>]
251
263
- Functions declared as "except *" were not returning exceptions.
252
264
[John J Lee <jjl@pobox.com>]
254
266
- A syntax warning from Plex about assignment to None has
256
268
[Gordon Williams <g_will@cyberus.ca>]
258
270
- Public function declaration with empty argument list was
259
271
producing (void) in .pxi file.
260
272
[Michael P. Dubner <dubnerm@mindless.com>]
262
274
- Incorrect error signalling code was being generated in the
263
275
__hash__ special method of an extension type.
288
300
declaration must DECLARE THE MODULE from which the extension
289
301
type originates. See the new version of the "Extension Types"
290
302
documentation for details.
292
This change was made to eliminate the need for Pyrex to be
293
told the C name of the type object, or for the Pyrex module
304
This change was made to eliminate the need for Pyrex to be
305
told the C name of the type object, or for the Pyrex module
294
306
to be linked against the object code providing the type object.
296
308
You will have to update any existing external extension type
297
309
declarations that you are using. I'm sorry about that, but it
298
310
was too hard to support both the old and new ways.
300
- Compile-time importing: A Pyrex module can now import declarations
301
from another Pyrex module using the new 'cimport' statement. See
302
the new section on "Sharing Declarations Between Pyrex Modules" in
312
- Compile-time importing: A Pyrex module can now import declarations
313
from another Pyrex module using the new 'cimport' statement. See
314
the new section on "Sharing Declarations Between Pyrex Modules" in
303
315
the documentation.
305
317
Minor improvements:
307
319
- An error is reported if you declare a struct, union or
308
320
extension type using 'cdef' in one place and 'ctypedef'
311
323
- Struct, union and extension types can only be forward-
312
declared using 'cdef', not 'ctypedef' (otherwise invalid
324
declared using 'cdef', not 'ctypedef' (otherwise invalid
313
325
C code would be generated).
315
327
- The 'global' statement can be used at the module level to
316
328
declare that a name is a module-level name rather than a
317
329
builtin. This can be used to access module attributes such
318
330
as __name__ that would otherwise be assumed to be builtins.
319
331
[Pat Maupin <pmaupin@speakeasy.net>]
321
333
- The 'assert' statement now accepts a second argument.
322
334
[Francois Pinard <pinard@iro.umontreal.ca>]
326
338
- When using Python 2.3, "True" or "False" could sometimes
327
339
turn up in generated code instead of "1" or "0".
328
340
[Adam Hixson <chixson@ou.edu>]
330
342
- Function return value not always converted to or from a
331
343
Python object when it should have been.
333
345
- Certain kinds of error in a function call expression
334
346
could crash the compiler.
335
347
["Edward C. Jones" <edcjones@erols.com>]
337
349
- Fixed memory leak in functions with * or ** args.
338
350
[Alexander A Naanou <alex_nanou@pochtamt.ru>]
346
358
- Calling a function declared as returning an extension
347
359
type could crash the compiler.
349
- A function call with type errors in the argument list
361
- A function call with type errors in the argument list
350
362
could crash the compiler.
352
364
- An 'else' clause on a for-from statement could crash
355
367
- Incorrect casting code was generated when a generic
356
368
object argument of a special method was declared as
357
369
being of an extension type.
358
370
[Phillip J. Eby <pje@telecommunity.com>]
360
372
- A blank line that couldn't be interpreted wholly as
361
373
a valid indentation sequence caused a syntax error.
362
374
In particular, a formfeed character on an otherwise
363
blank line wasn't accepted.
375
blank line wasn't accepted.
364
376
[Francois Pinard <pinard@iro.umontreal.ca>]
366
378
- Parallel assignments were incorrectly optimised.
368
380
- A bare tuple constructor with an extra comma at the
369
381
end of a line caused a syntax error.
390
402
- More efficient code is generated for access to Python
391
403
valued C attributes of extension types.
393
405
- Cosmetic code improvement: Less casting back and forth
394
406
between extension types and PyObject * when referencing
395
407
C members of the object struct.
397
409
- C arguments and variables declared as an extension type
398
410
can take the value None.
400
412
- Form feed characters are accepted as whitespace.
402
414
- Function names in tracebacks are qualified with
403
415
module name and class name.
407
419
- A sufficiently complex expression in a boolean context
408
could cause code to be generated twice for the same
420
could cause code to be generated twice for the same
411
423
- Incorrect casting code was generated when passing an
412
424
extension type to a function expecting a generic Python
415
427
- Executable statements are now disallowed inside a
416
428
cdef class block (previously they silently caused
417
429
crazy C code to be generated).
419
431
- Tracebacks should now report the correct filename for
420
432
functions defined in files included with the 'include'
423
435
- The documentation incorrectly claimed that an extension
424
436
type can't have a __del__ method. In fact, it can, and
425
437
it behaves as expected.
446
458
- An 'include' statement allows inclusion of declarations
447
459
from other Pyrex source files.
449
461
- If there are any public declarations, a Pyrex include
450
file is generated (as well as a .h file) containing
462
file is generated (as well as a .h file) containing
451
463
declarations for them.
453
465
- Extension types can be declared public, so their C
454
466
attributes are visible to other Pyrex and C code.
456
468
- Try-except statements can now have an 'else' clause.
457
469
[Francois Pinard <pinard@iro.umontreal.ca>]
459
471
- Multiple simple statements can be placed on one line
460
472
separated by semicolons.
462
474
- A suite consisting of a simple statement list can now
463
475
be placed on the same line after the colon in most
484
496
- Hex constants greater than 0x7fffffff caused compiler
485
497
to crash. [Gareth Watts <gareth@omnipotent.net>]
487
499
- Type slots are no longer statically initialised with
488
500
extern function pointers, to avoid problems with
489
501
some compilers. The hack in the distutils extension
490
502
to work around this by compiling as C++ has been
491
503
disabled. [Phillip J. Eby <pje@telecommunity.com>]
493
505
- Fixed several more instances of the error-reporting
494
506
routine being called with arguments in the wrong
495
507
order. Hoping I've *finally* got all of them now...
497
509
- Nested for-from loops used the same control variable.
498
510
[Sebastien de Menten <sdementen@hotmail.com>]
500
512
- Fixed some other error message related bugs.
501
513
[Francois Pinard <pinard@iro.umontreal.ca>]
503
515
- Assigning to slice didn't work.
504
516
[Francois Pinard <pinard@iro.umontreal.ca>]
506
518
- Temp variables were being declared as extension
507
519
types and then being assigned PyObject *'s. All
508
520
Python temp vars are now declared as PyObject *.
567
579
[Mike Rovner <mike@bindkey.com>]
568
580
[Peter Lepage <gpl@mail.lns.cornell.edu>]
570
582
- Compiler crashed if exception value didn't
571
583
match function return type.
572
584
[Michael JasonSmith <mpj17@smtphost.canterbury.ac.nz>]
574
586
- The setup.py file should now install the
575
587
Lexicon.pickle file in the right place.
576
[Patch supplied by David M. Cooke
588
[Patch supplied by David M. Cooke
577
589
<cookedm@arbutus.physics.mcmaster.ca>]
579
591
- Compiler crashed when compiling a C function that
580
592
returned an extension type.
582
594
<cookedm@arbutus.physics.mcmaster.ca>]
584
596
- Anonymous enum types did not have C code
585
597
suppressed inside an extern-from block.
586
598
[Matthew Mueller <donut@azstarnet.com>]
610
622
Python function needing argument type tests
611
623
had local Python variables.
612
624
[Matthias Baas <baas@ira.uka.de>]
614
626
- 'self' parameter of __getitem__ method of
615
627
extension type had wrong implicit type.
616
628
[Peter Lepage <gpl@mail.lns.cornell.edu>]
618
630
- Repaired breakage introduced by trying to
619
631
allow an empty parameter list to be written
620
632
as (void). No longer attempting to allow
621
633
this (too hard to parse correctly).
622
634
[Peter Lepage <gpl@mail.lns.cornell.edu>]
624
636
- Found bug in Plex 1.1.2 which was the *real*
625
637
cause of the two-newlines-in-a-row problem.
626
638
Removed the Opt(Eol)+Str("\n") hacks in
627
639
the scanner which were working around this
629
641
[pedro_rodriguez@club-internet.fr]
631
643
- __call__ special method of extension types
632
644
had wrong signature.
633
645
[Peter Lepage <gpl@mail.lns.cornell.edu>]
672
684
for which no exception value is declared,
673
685
a warning message is printed and the
674
686
exception is cleared.
676
- Cascaded assignments (i.e. a = b = c
688
- Cascaded assignments (i.e. a = b = c
677
689
are now supported.
679
691
- Anonymous enum declarations are allowed,
680
692
for when you just want to declare constants.
682
694
- The C types "long long" and "long double"
683
695
are now understood. Also, "int" is optional
684
696
after "short" or "long".
688
700
- A * argument in a function call can now be
722
734
added, for use in extern-from blocks when a
723
735
header file uses a ctypedef to declare a
724
736
tagless struct, union or enum type.
726
738
- "pass" allowed in an extern-from block.
728
740
- "cdef extern from *" for when you don't want
729
741
to specify an include file name.
731
743
- Argument names may be omitted in function
732
744
signatures when they're not needed.
734
746
- New reserved word NULL for the null C pointer.
736
748
Compiler enhancements:
738
750
- Lexicon is now picked in binary format, so
739
751
startup should be much faster on slower
742
754
- If Pyrex decides to rebuild the lexicon and
743
755
then finds that it can't write a pickle file,
744
756
it now prints a warning and carries on
745
757
instead of crashing.
747
759
- Chat about hash codes and lexicon pickling
748
760
now turned off by default except when creating
749
761
a new lexicon (which ought never happen now
754
766
- Modified the runtime support code for "import"
755
767
statements, hopefully fixing problem with using
756
768
a Pyrex module in conjunction with py2exe.
758
770
- DL_EXPORT now used in both the prototype and
759
771
definition of the module init function.
761
773
- Exception state is now saved and restored around
762
774
calls to an extension type __dealloc__ method,
763
775
to avoid screwing up if the object is deallocated
764
776
while an exception is being propagated.
766
778
- Making an attribute reference to a method of
767
779
an extension type caused a compiler crash.
769
781
- Doc string in new-style class definition
770
782
caused a run-time error.
772
- Insufficient parentheses were put around C type
784
- Insufficient parentheses were put around C type
775
787
- Constructors for extension types are now read-only
1020
1032
- Class definitions are only allowed at the top
1021
1033
level of a module, not inside a control structure
1022
1034
or function or another class definition.
1024
1036
- Assigning a Pyrex-defined Python function to a
1025
1037
class attribute outside of the class definition
1026
will not create a method (because it's not an
1038
will not create a method (because it's not an
1027
1039
interpreted Python function and therefore
1028
1040
won't trigger the bound-method creation magic).
1030
1042
- The __metaclass__ mechanism and the creation of
1031
1043
new-style classes is not (yet) supported.