Bug#500847: [cython] Does not accept Unicode docstrings

2008-10-04 Thread Robert Bradshaw

As noted on cython-devel, this bug has already been fixed upstream.

- Robert




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#500847: [cython] Does not accept Unicode docstrings

2008-10-02 Thread Ondrej Certik
On Thu, Oct 2, 2008 at 1:28 AM, P M [EMAIL PROTECTED] wrote:
 Package: cython
 Version: 0.9.8-1
 Severity: normal

 Cython does not accept Unicode docstrings in .pyx files. I have attached a
 sample session with a .pyx file, where I define a function with a docstring
 containing Greek characters. The file's contents are in UTF-8. What is more,
 instead of an error message, I got a python traceback! This problem does not
 show up with comments in Unicode or other string literals.

 $ cat bug.pyx
 def hello():
'''Γειά σου, κόσμε!'''
print 'Hello, world!'
 $ cython bug.pyx
 Traceback (most recent call last):
  File /usr/bin/cython, line 8, in module
main(command_line = 1)
  File /var/lib/python-support/python2.5/Cython/Compiler/Main.py, line 527,
 in main
result = compile(sources, options)
  File /var/lib/python-support/python2.5/Cython/Compiler/Main.py, line 505,
 in compile
return compile_multiple(source, options)
  File /var/lib/python-support/python2.5/Cython/Compiler/Main.py, line 472,
 in compile_multiple
result = context.compile(source, options)
  File /var/lib/python-support/python2.5/Cython/Compiler/Main.py, line 327,
 in compile
tree.process_implementation(scope, options, result)
  File /var/lib/python-support/python2.5/Cython/Compiler/ModuleNode.py, line
 59, in process_implementation
self.generate_c_code(env, options, result)
  File /var/lib/python-support/python2.5/Cython/Compiler/ModuleNode.py, line
 243, in generate_c_code
self.body.generate_function_definitions(env, code, options.transforms)
  File /var/lib/python-support/python2.5/Cython/Compiler/Nodes.py, line 839,
 in generate_function_definitions
with_pymethdef = env.is_py_class_scope)
  File /var/lib/python-support/python2.5/Cython/Compiler/Nodes.py, line
 1442, in generate_function_header
self.entry.doc))
  File /var/lib/python-support/python2.5/Cython/Compiler/Code.py, line 52,
 in putln
self.put(code)
  File /var/lib/python-support/python2.5/Cython/Compiler/Code.py, line 69,
 in put
self._write(code)
 UnicodeEncodeError: 'ascii' codec can't encode characters in position 38-41:
 ordinal not in range(128)
 $

 Thank you for your time.

Thanks, I reported it upstream.

Ondrej


Bug#500847: [Python-apps-team] Bug#500847: [cython] Does not accept Unicode docstrings

2008-10-02 Thread Piotr Ożarowski
[P M, 2008-10-02 01:34]
 $ cat bug.pyx
 def hello():
 '''Γειά σου, κόσμε!'''
 print 'Hello, world!'

there's a missing:

# -*- coding: utf-8 -*-

but it doesn't work with this line either



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#500847: [Python-apps-team] Bug#500847: [cython] Does not accept Unicode docstrings

2008-10-02 Thread Ondrej Certik
2008/10/2 Piotr Ożarowski [EMAIL PROTECTED]:
 [P M, 2008-10-02 01:34]
 $ cat bug.pyx
 def hello():
 '''Γειά σου, κόσμε!'''
 print 'Hello, world!'

 there's a missing:

 # -*- coding: utf-8 -*-

 but it doesn't work with this line either

Please follow the thread Does not accept Unicode docstrings here:

http://codespeak.net/pipermail/cython-dev/2008-October/thread.html#2506

and provide more info. Preferably speak with upstream directly.

Thanks,
Ondrej


Bug#500847: [cython] Does not accept Unicode docstrings

2008-10-01 Thread P M
Package: cython
Version: 0.9.8-1
Severity: normal

Cython does not accept Unicode docstrings in .pyx files. I have attached a 
sample session with a .pyx file, where I define a function with a docstring 
containing Greek characters. The file's contents are in UTF-8. What is more, 
instead of an error message, I got a python traceback! This problem does not 
show up with comments in Unicode or other string literals.

$ cat bug.pyx
def hello():
'''Γειά σου, κόσμε!'''
print 'Hello, world!'
$ cython bug.pyx
Traceback (most recent call last):
  File /usr/bin/cython, line 8, in module
main(command_line = 1)
  File /var/lib/python-support/python2.5/Cython/Compiler/Main.py, line 527, 
in main
result = compile(sources, options)
  File /var/lib/python-support/python2.5/Cython/Compiler/Main.py, line 505, 
in compile
return compile_multiple(source, options)
  File /var/lib/python-support/python2.5/Cython/Compiler/Main.py, line 472, 
in compile_multiple
result = context.compile(source, options)
  File /var/lib/python-support/python2.5/Cython/Compiler/Main.py, line 327, 
in compile
tree.process_implementation(scope, options, result)
  File /var/lib/python-support/python2.5/Cython/Compiler/ModuleNode.py, line 
59, in process_implementation
self.generate_c_code(env, options, result)
  File /var/lib/python-support/python2.5/Cython/Compiler/ModuleNode.py, line 
243, in generate_c_code
self.body.generate_function_definitions(env, code, options.transforms)
  File /var/lib/python-support/python2.5/Cython/Compiler/Nodes.py, line 839, 
in generate_function_definitions
with_pymethdef = env.is_py_class_scope)
  File /var/lib/python-support/python2.5/Cython/Compiler/Nodes.py, line 
1442, in generate_function_header
self.entry.doc))
  File /var/lib/python-support/python2.5/Cython/Compiler/Code.py, line 52, 
in putln
self.put(code)
  File /var/lib/python-support/python2.5/Cython/Compiler/Code.py, line 69, 
in put
self._write(code)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 38-41: 
ordinal not in range(128)
$

Thank you for your time.

--- System information. ---
Architecture: amd64
Kernel:   Linux 2.6.26-1-amd64

Debian Release: lenny/sid
  990 testing security.debian.org 
  990 testing ftp.duth.gr 
  990 testing ftp.de.debian.org 
  500 unstableftp.duth.gr 
  500 unstableftp.de.debian.org 
  500 stable  www.dipconsultants.com 
  500 lenny   kde4.debian.net 
1 experimentalftp.de.debian.org 

--- Package information. ---
Depends (Version) | Installed
=-+-===
python| 2.5.2-2
python-support (= 0.7.1) | 0.8.4





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]