Robert Bradshaw wrote:
On Apr 15, 2009, at 7:24 AM, Dag Sverre Seljebotn wrote:

Robert Bradshaw wrote:
Unless something is horribly broken, I will release in the next day or two.
http://cython.org/Cython-0.11.1.rc1.tar.gz
I know it is late (sorry!), but I just remembered some changes to directives behaviour which I'd like to get in; emitting a warning for change of behaviour in 0.12. I think they're rather safe, but I'll definitely take no for an answer.

The warning looks like it'd be fine to slip in at the last moment, but I'm not as sure about removing the -X option--perhaps a warning about that would be in order though.

OK, I've pushed changes to this effect. This also fixes the help text which is currently WRONG in this area.

In the list of patches I should have done earlier, there's also

http://trac.cython.org/cython_trac/attachment/ticket/210/buffernogil.patch

Again I'd be really surprised to have this break anything, and it is something there's been expressed a need for in the NumPy community.

I know how irritating this must be though :-) If you say no I won't complain.

--
Dag Sverre
# HG changeset patch
# User Dag Sverre Seljebotn <[email protected]>
# Date 1239825807 -7200
# Node ID a782d5979ad2905c581c53218deddfd9a09ffad9
# Parent  bbf007cb50f57bcf0c010661e66b883191958aa3
Deprecation warning for -X switch

diff -r bbf007cb50f5 -r a782d5979ad2 Cython/Compiler/CmdLine.py
--- a/Cython/Compiler/CmdLine.py	Wed Apr 15 00:27:57 2009 -0700
+++ b/Cython/Compiler/CmdLine.py	Wed Apr 15 22:03:27 2009 +0200
@@ -38,8 +38,9 @@ Options:
   -a, --annotate                 Produce a colorized HTML version of the source.
   --line-directives              Produce #line directives pointing to the .pyx source
   --cplus                        Output a c++ rather than c file.
-  -X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
+  --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
 """
+
 #The following experimental options are supported only on MacOSX:
 #  -C, --compile    Compile generated .c file to .o file
 #  -X, --link       Link .o file to produce extension module (implies -C)
@@ -80,6 +81,10 @@ def parse_command_line(args):
             elif option in ("-C", "--compile"):
                 options.c_only = 0
             elif option in ("-X", "--link"):
+                if option == "-X":
+                    print >>sys.stderr, "Deprecation warning: The -X command line switch will be changed to a"
+                    print >>sys.stderr, "shorthand for --directive in Cython 0.12. Please use --link instead."
+                    print >>sys.stderr
                 options.c_only = 0
                 options.obj_only = 0
             elif option in ("-+", "--cplus"):
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to