Bug 914414
| Summary: | python-rdflib: FTBFS in rawhide | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dennis Gilmore <dennis> |
| Component: | python-rdflib | Assignee: | Dave Malcolm <dmalcolm> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | dmalcolm, pingou |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-03-28 15:16:09 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 913825 | ||
|
Description
Dennis Gilmore
2013-02-22 10:14:09 UTC
For reference, it was:
python-rdflib-3.2.3-3.fc19
the failure was in %check:
======================================================================
FAIL: Doctest: rdflib
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 2201, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for rdflib
File "/builddir/build/BUILD/rdflib-3.2.3/rdflib/__init__.py", line 0, in rdflib
----------------------------------------------------------------------
File "/builddir/build/BUILD/rdflib-3.2.3/rdflib/__init__.py", line 17, in rdflib
Failed example:
result = g.parse("http://www.w3.org/2000/10/swap/test/meet/white.rdf")
Exception raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/doctest.py", line 1289, in __run
compileflags, 1) in test.globs
File "<doctest rdflib[2]>", line 1, in <module>
result = g.parse("http://www.w3.org/2000/10/swap/test/meet/white.rdf")
File "/builddir/build/BUILD/rdflib-3.2.3/rdflib/graph.py", line 910, in parse
data=data, format=format)
File "/builddir/build/BUILD/rdflib-3.2.3/rdflib/parser.py", line 162, in create_input_source
input_source = URLInputSource(absolute_location, format)
File "/builddir/build/BUILD/rdflib-3.2.3/rdflib/parser.py", line 93, in __init__
file = urlopen(req)
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)
URLError: <urlopen error [Errno -2] Name or service not known>
----------------------------------------------------------------------
File "/builddir/build/BUILD/rdflib-3.2.3/rdflib/__init__.py", line 19, in rdflib
Failed example:
print("graph has %s statements." % len(g))
Expected:
graph has 19 statements.
Got:
graph has 0 statements.
Running nose with: --attr= test rdflib --where=./ --doctest-extension=.doctest
----------------------------------------------------------------------
Ran 709 tests in 54.659s
FAILED (SKIP=17, failures=1)
For some reasons it seems to have ignored the sed command launch before that deactivate the run of the tests in the documentation (which I placed there for that exact problem) Adding "-v" to the run_tests.py passes it on to the nose invocation and logs the names of the tests being executed. In particular, it's clear that doctests *are* getting run even with the sed command from ed5650665df98c492b400cf6f7d3adf4b4e87e3f (which did successfully modify run_tests.py).
A better fix may be to disable just the tests that go to the network, which seem to be these two:
./rdflib/__init__.py:18: >>> result = g.parse("http://www.w3.org/2000/10/swap/test/meet/white.rdf")
./test/test_rules.py:63: f.parse("http://eikeon.com/")
I'm investigating a way of doing that. I tried patching to add this directive:
# doctest: +SKIP
but that works per-line.
Just wondering, did you try with the latest version? I saw upstream released one but I didn't have time to look into it yet. (In reply to comment #4) > Just wondering, did you try with the latest version? I saw upstream released > one but I didn't have time to look into it yet. I haven't tried yet; this is just with 3.2.3 in "master" The issue is that there's a setup.cfg containing:
[nosetests]
attr = !known_issue,!non_core,
verbosity = 1
with-doctest = 1
and that "with-doctest = 1" is forcing the option to be on, with:
'enable_plugin_doctest': True
Commenting out that line *does* turn them off though (assuming the existing sed changes)
(I initially tried editing that line to "with-doctest = 0", and that didn't work).
Note to self: "--collect-only" is *much* faster to run
[this took a *lot* of debugging]
Fix committed to git to master (for f20) as:
http://pkgs.fedoraproject.org/cgit/python-rdflib.git/commit/?id=70134fdca596f0bdc557848fd8efb4c1c52e1c7b
Building python-rdflib-3.2.3-4.fc20 for rawhide
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=5182657
(In reply to comment #6) > Building python-rdflib-3.2.3-4.fc20 for rawhide > Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=5182657 This succeeeded, and reviewing the build logs shows that the doctests were indeed *not* run. I pushed the change to the f19 branch also |