RDFLib / rdflib

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.
https://rdflib.readthedocs.org
BSD 3-Clause "New" or "Revised" License
2.15k stars 555 forks source link

rdflib-3.2.1 test issues for python3 #211

Closed idella closed 12 years ago

idella commented 12 years ago

tests for python3.2 ALL fail. Having looked into the processes, it appears to come down to a class or two, or some functions in a class or two, not having compatibility with python3.2.

from the build log;

Skipping implicit fixer: set_literal Skipping implicit fixer: ws_comma Can't parse docstring in build-3.2/lib/rdflib/graph.py line 49: ParseError: bad input: type=24, value='%', context=('', (49, 40)) Can't parse docstring in build-3.2/lib/rdflib/graph.py line 77: ParseError: bad input: type=24, value='%', context=('', (77, 11)) Can't parse docstring in build-3.2/lib/rdflib/graph.py line 102: ParseError: bad input: type=24, value='%', context=('', (102, 35)) Can't parse docstring in build-3.2/lib/rdflib/graph.py line 106: ParseError: bad input: type=24, value='%', context=('', (106, 35)) Can't parse docstring in build-3.2/lib/rdflib/graph.py line 110: ParseError: bad input: type=24, value='%', context=('', (110, 35)) Can't parse docstring in build-3.2/lib/rdflib/graph.py line 624: ParseError: bad input: type=24, value='%', context=('', (624, 11)) Can't parse docstring in build-3.2/lib/rdflib/resource.py line 77: ParseError: bad input: type=24, value='%', context=('\n\n\n\n\n\n$ Can't parse docstring in build-3.2/lib/rdflib/term.py line 527: ParseError: bad input: type=24, value='%', context=('\n\n\n\n\n\n\n\$ Can't parse docstring in build-3.2/lib/rdflib/term.py line 529: ParseError: bad input: type=24, value='%', context=('', (529, 28)) Can't parse docstring in build-3.2/lib/rdflib/plugins/parsers/notation3.py line 141: ParseError: bad input: type=24, value='%', cont$ Can't parse docstring in build-3.2/lib/rdflib/plugins/parsers/notation3.py line 144: ParseError: bad input: type=24, value='%', cont$ Can't parse docstring in build-3.2/lib/rdflib/plugins/parsers/notation3.py line 339: ParseError: bad input: type=24, value='%', cont$ warning: build_py: byte-compiling is disabled, skipping.

Source compiled.

  • Testing of dev-python/rdflib-3.2.1 with CPython 3.2... version is 3.2 the PYTHONPATH is build-3.2/lib/ Running nose with: --attr= test rdflib --where=./ --with-doctest --doctest-extension=.doctest --doctest-tests EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE

Every single tests bails out. Most commonly cited are term.py and graph.py.

This; class URIRef(Identifier): in rdflib-3.2.1/rdflib/term.py && from rdflib.term import URIRef, BNode, Literal, Variable in rdflib-3.2.1/rdflib/init.py are commonly cited.

It appears the instances of ParseError: bad input: I highlighted are taking place in the compiling and or prep of the build-3.2 folder, the conversion for python3 anyway.

Hmmmm no facility to attach the log.

running build running build_py creating build-3.2 creating build-3.2/lib creating build-3.2/lib/rdflib copying build/src/rdflib/namespace.py -> build-3.2/lib/rdflib copying build/src/rdflib/store.py -> build-3.2/lib/rdflib copying build/src/rdflib/serializer.py -> build-3.2/lib/rdflib


and so forth creating build-3.2/lib/rdflib/plugins/parsers/rdfa/transform copying build/src/rdflib/plugins/parsers/rdfa/transform/headabout.py -> build-3.2/lib/rdflib/plugins/parsers/rdfa/transform copying build/src/rdflib/plugins/parsers/rdfa/transform/init.py -> build-3.2/lib/rdflib/plugins/parsers/rdfa/transform creating build-3.2/lib/rdflib/plugins/serializers copying build/src/rdflib/plugins/serializers/nquads.py -> build-3.2/lib/rdflib/plugins/serializers copying build/src/rdflib/plugins/serializers/rdfxml.py -> build-3.2/lib/rdflib/plugins/serializers copying build/src/rdflib/plugins/serializers/trix.py -> build-3.2/lib/rdflib/plugins/serializers copying build/src/rdflib/plugins/serializers/init.py -> build-3.2/lib/rdflib/plugins/serializers copying build/src/rdflib/plugins/serializers/turtle.py -> build-3.2/lib/rdflib/plugins/serializers copying build/src/rdflib/plugins/serializers/nt.py -> build-3.2/lib/rdflib/plugins/serializers copying build/src/rdflib/plugins/serializers/xmlwriter.py -> build-3.2/lib/rdflib/plugins/serializers copying build/src/rdflib/plugins/serializers/n3.py -> build-3.2/lib/rdflib/plugins/serializers Fixing build-3.2/lib/rdflib/namespace.py build-3.2/lib/rdflib/store.py build-3.2/lib/rdflib/serializer.py build-3.2/lib/rdflib/excep$ Skipping implicit fixer: buffer Skipping implicit fixer: idioms Skipping implicit fixer: set_literal Skipping implicit fixer: ws_comma Fixing build-3.2/lib/rdflib/namespace.py build-3.2/lib/rdflib/store.py build-3.2/lib/rdflib/serializer.py build-3.2/lib/rdflib/excep$ Skipping implicit fixer: buffer Skipping implicit fixer: idioms Skipping implicit fixer: set_literal Skipping implicit fixer: ws_comma

goes south at this point which is where the Can't parse docstring errors begin

takluyver commented 12 years ago

It looks like you're running the tests on the unconverted source (--where=./).

The CI tests are passing, although the same parse errors show up the build logs. They run with --where=./build/src. https://jenkins.shiningpanda.com/rdflib/job/rdflib/PLATFORM=debian6,TOXENV=py32/lastBuild/console

idella commented 12 years ago

seems I spoke too soon again., At the same time you said use --where the gentoo dev found it.

The copy process from build/src -> build-3.2/lib/ it seems left the tests folder behind. This then leaves a src/build folder which has had 2to3 run thru it, and a build-3.2 folder without the test suite. Needless to say the gentoo default traffic director didn't know that, so it needed an extra prompt in the ebuild to set it straight.

takluyver commented 12 years ago

I think it's intentional that the test suite isn't copied to the lib/ directory - it's not part of the library, after all. I'll close this issue as I think everything's working as intended, but let us know if you disagree. Thanks for testing it and reporting the problem.