walidazizi / rdflib

Automatically exported from code.google.com/p/rdflib
Other
0 stars 0 forks source link

SyntaxError in rdflib/plugins/serializers/nt.py with Python 2.4 #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run rdflib-3.1.0 tests with Python 2.4

What is the expected output? What do you see instead?

  File "/usr/lib/python2.4/site-packages/rdflib/plugins/serializers/nt.py", line 47
    chars.append('\u%04X' % ord(char) if ord(char) <= 0xFFFF else '\U%08X' % ord(char))
                                       ^
SyntaxError: invalid syntax

What version of the product are you using? On what operating system?
rdflib 3.1.0 with Python 2.4

Patch attached.

Original issue reported on code.google.com by dan...@gmail.com on 28 Jul 2011 at 2:56

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! I'll apply it - is this really the only thing that is not py2.4 
compatible in rdflib? I think we gave up trying to support 2.4 a while back.

Original comment by gromgull on 29 Jul 2011 at 12:09

GoogleCodeExporter commented 8 years ago
Our application is still running on Python 2.4 (RHEL5), so I'll be supporting 
rdflib on Python 2.4 even if the rdflib developers aren't :-)

With this patch applied to 3.1.0 all rdflib tests pass, as do the tests for our 
application, although we aren't running rdflib 3.1.0 in production yet. We have 
been using 3.0.0 successfully in production for some time now.

Original comment by dan...@gmail.com on 31 Jul 2011 at 5:31

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 91ca3aef3477.

Original comment by gromgull on 1 Aug 2011 at 3:16

GoogleCodeExporter commented 8 years ago
Sorry, new to python. Edited ny.py per patch, re-ran easy_install -U 
"rdflib>=3.0.0", getting error as if file wasn't edited:

File 
"/usr/lib/python2.4/site-packages/rdflib-3.1.0-py2.4.egg/rdflib/plugins/serializ
ers/nt.py", line 47
    chars.append('\u%04X' % ord(char) if ord(char) <= 0xFFFF else '\U%08X' % ord(char)) 

Original comment by jhz8...@gmail.com on 11 Sep 2011 at 2:18