Robert Bradshaw wrote:
> After much development, it looks like Cython 0.11 is getting stable
> enough to release. Please try out the beta, which is the current tip
> of sage-devel.
>
> http://cython.org/Cython-0.11.beta.tar.gz
Ok, problems I found so far:
1)
With Python 2.5.2, tests/run/charencoding.pyx gives a SyntaxError:
File "/tmp/Cython-0.11.beta/BUILD/run/c/charencoding.so", line ?, in
charencoding
Failed example:
expected = b''.join([chr(i) for i in range(0x10,0xFF,0x11)] + [chr(0xFF)])
Exception raised:
Traceback (most recent call last):
File "/usr/lib64/python2.5/doctest.py", line 1228, in __run
compileflags, 1) in test.globs
File "<doctest charencoding[0]>", line 1
expected = b''.join([chr(i) for i in range(0x10,0xFF,0x11)] +
[chr(0xFF)])
^
SyntaxError: invalid syntax
2)
After a pyximport.install(), "import some_module" does not work if
some_module.pyx is in the current dir, because os.path.isdir("") ==
False (line 179 pyximport/pyximport.py). I suggest something like the
following patch:
--- a/pyximport/pyximport.py Sun Jan 25 02:54:09 2009 +0100
+++ b/pyximport/pyximport.py Sun Jan 25 03:06:19 2009 +0100
@@ -176,7 +176,13 @@
paths = sys.path
join_path = os.path.join
is_file = os.path.isfile
- for path in filter(os.path.isdir, paths):
+ for path in paths:
+ # os.path.isdir('') == False
+ # os.listdir('') => OSError: [Errno 2] No such file or directory:
''
+ if path == '':
+ path = '.'
+ if not os.path.isdir(path):
+ continue
for filename in os.listdir(path):
if filename == pyx_module_name:
return PyxLoader(fullname, join_path(path, filename),
3)
A minor one. python2.6 -t -c "import pyximport" complains.
pyximport/pyxbuild.py: inconsistent use of tabs and spaces in indentation
Cython/Compiler/Nodes.py: inconsistent use of tabs and spaces in indentation
I haven't tested it with own code yet.
Ciao
Marc
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev