RDFLib/rdflib — Issue #121: Not compatible with Python 2.4
Author: gjhiggins
Created: 2012-02-20 08:33:14+00:00
State: open

victor.e...@gmail.com, 2010-05-21T12:45:37.000Z

What steps will reproduce the problem?
1. sudo easy_install rdflib

What is the expected output? What do you see instead?
I expect the latest version to be installed, but instead I see the
following output:
Searching for rdflib
Reading http://cheeseshop.python.org/pypi/rdflib/
Reading http://rdflib.net/
Reading http://cheeseshop.python.org/pypi/rdflib/3.0.0
Best match: rdflib 3.0.0
Downloading
http://pypi.python.org/packages/source/r/rdflib/rdflib-3.0.0.tar.gz#md5=226e615a5d82f12ebbc36e6af562384c
Processing rdflib-3.0.0.tar.gz
Running rdflib-3.0.0/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-MnWx8d/rdflib-3.0.0/egg-dist-tmp-kC9dwq
Traceback (most recent call last):
File "/usr/bin/easy_install", line 7, in ?
sys.exit(
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
1670, in main
with_ei_usage(lambda:
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
1659, in with_ei_usage
return f()
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
1674, in
distclass=DistributionWithoutHelpCommands, **kw
File "/usr/lib64/python2.4/distutils/core.py", line 149, in setup
dist.run_commands()
File "/usr/lib64/python2.4/distutils/dist.py", line 946, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.4/distutils/dist.py", line 966, in run_command
cmd_obj.run()
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
211, in run
self.easy_install(spec, not self.no_deps)
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
446, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
471, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
655, in install_eggs
return self.build_and_install(setup_script, setup_base)
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
930, in build_and_install
self.run_setup(setup_script, setup_base, args)
File
"/usr/lib/python2.4/site-packages/setuptools/command/easy_install.py", line
919, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 26,
in run_setup
DirectorySandbox(setup_dir).run(
File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 63,
in run
return func()
File "/usr/lib/python2.4/site-packages/setuptools/sandbox.py", line 29,
in
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 6, in ?
File "/tmp/easy_install-MnWx8d/rdflib-3.0.0/rdflib/__init__.py", line 68,
in ?
File "/tmp/easy_install-MnWx8d/rdflib-3.0.0/rdflib/graph.py", line 166, in ?
File "/tmp/easy_install-MnWx8d/rdflib-3.0.0/rdflib/plugin.py", line 24, in ?
File "/tmp/easy_install-MnWx8d/rdflib-3.0.0/rdflib/store.py", line 263
yield
^
SyntaxError: invalid syntax

What version of the product are you using? On what operating system?
Version 3.0.0, on Scientific Linux CERN 5.

Please provide any additional information below.
It would be very nice if you could reinstate earlier versions in the Python
Package Index; `sudo easy_install 'rdflib==2.4.1'` doesn't work at all
since the older versions have been deleted :/

Comment 1 by metatoas...@gmail.com
If this code is used under Python 2.4, the syntax for this should be changed to `yield
None` and that will achieve the same effect as it would under Python 2.5 (raises
StopIteration on calling next()).

Comment 2 by bad...@gmail.com
The fix proposed does work however it would be nice to have this fixed in the code.

Comment 3 by gromgull
This issue was updated by revision r1909.

I have fixed the one "yield (nothing)" I could find. I no longer have python2.4 handy to make sure it works now.

Comment 4 by gromgull
This issue was updated by revision 6a801c958e5f.

I have fixed the one "yield (nothing)" I could find. I no longer have python2.4 handy to make sure it works now.

Comment 5 by gromgull
According to Issue 177, this is fixed now.