| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Using `pathlib.Path("http://example.com/").exists()` on windows causes an exception as a URL
is not a valid path, while `os.path.exists("http://example.com/")` just
returns false.
This patch reverts _create_input_source_from_location to using
`os.path.exists()` instead of pathlib.Path to make it possible to parse
graphs from http URLs on windows.
|
| | |
|
| |\
| |
| | |
pathname2url removal
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
I think that most of the difference actually comes from patching uuid
to not waste 25 milliseconds every time it is imported but there is a
bit of improvement here
|
| | |
| |
| |
| |
| | |
Graph.parse did already support pathlib.Path but there is no good
reason to not support PurePath AFAICT.
|
| |\ \
| | |
| | | |
Add handling for 308 (Permanent Redirect)
|
| | | |
| | |
| | |
| | |
| | | |
Even though HTTPError.hdrs works, it is not in the published API
and also not in python typeshed so not recognized by mypy.
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some/all supported versions of python does not handle 308 (Permanent
Redirect) in `urlopen`.
See https://bugs.python.org/issue40321 for more info on this.
This patch adds handling for 308 in rdflib.
I also extracted the HTTP mock from `test_sparqlstore.py` and
reused it in test_conneg.
Any feedback on it will be appreciated.
|
| |/ |
|
| |
|
|
|
|
| |
pathlib was added to the standard librarly as of Python 3.4.
This adds support for calling Graph.parse on a file specified
using a pathlib object.
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| |
| | |
# Conflicts:
# rdflib/namespace.py
# rdflib/parser.py
# rdflib/plugins/memory.py
# rdflib/plugins/parsers/ntriples.py
# test/test_iomemory.py
|
| | |
| |
| |
| |
| |
| |
| | |
Changed name of NTriplesParser to W3CNTriplesParser, it is the legacy parser
Populate CharacterStream attr on several types of rdflib InputSource, to provide unicode text stream, in addition to ByteStream
Add support to N3, Trig, NTriples, NQuads parsers to use the CharacterStream instead of the ByteStream where possible
Reduces many useless string->bytes->string conversions in parsers.
|
| |/
|
|
| |
Signed-off-by: t0b3 <thomas.bettler@gmail.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
opinions is mainly: no to long lines, but not at any cost.
notation3.py crashses autopep :D
Also rdflib/__init__.py gets completely broken
|
| | |
|
| |
|
|
| |
now six is used throughout.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Enables parsers to access response headers (such as Link headers).
|
| |
|
| |
Required by rdflib-jsonld to use http://schema.org context which requires fetching with ``Accept: application/ld+json``
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ flake8 rdflib --exclude=pyRdfa,host,extras,transform,rdfs,pyMicrodata
rdflib/graph.py:192: W801 redefinition of unused 'BytesIO' from line 189
rdflib/graph.py:194: W402 'BytesIO' imported but unused
rdflib/graph.py:680:80: E501 line too long (80 > 79 characters)
rdflib/graph.py:682:80: E501 line too long (80 > 79 characters)
rdflib/graph.py:686:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:690:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:692:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:695:80: E501 line too long (83 > 79 characters)
rdflib/graph.py:698:80: E501 line too long (83 > 79 characters)
rdflib/parser.py:21: W801 redefinition of unused 'BytesIO' from line 19
rdflib/compat.py:12: W801 redefinition of unused 'defaultdict' from line 10
rdflib/py3compat.py:10: W801 redefinition of unused 'wraps' from line 7
rdflib/py3compat.py:81: W806 redefinition of function 'b' from line 44
rdflib/py3compat.py:87: W806 redefinition of function 'format_doctest_out' from line 50
rdflib/py3compat.py:97: W806 redefinition of function 'type_cmp' from line 61
rdflib/term.py:54: W801 redefinition of unused 'md5' from line 52
rdflib/store.py:73: W801 redefinition of unused 'BytesIO' from line 71
rdflib/query.py:10: W801 redefinition of unused 'BytesIO' from line 8
rdflib/__init__.py:73: W402 'plugin' imported but unused
rdflib/__init__.py:74: W402 'query' imported but unused
rdflib/util.py:43: W806 redefinition of function 'sign' from line 50
rdflib/plugins/parsers/hturtle.py:25: W801 redefinition of unused 'html5lib' from line 24
rdflib/plugins/parsers/ntriples.py:141: W402 'BytesIO' imported but unused
rdflib/plugins/parsers/structureddata.py:23: W801 redefinition of unused 'html5lib' from line 22
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
unicode; commented out two test cases as Graph's parse method does not support them
|
| |
|
|
| |
ALTHOUGH, there is a more subtle issue here. Now we send the right accept header, but we might still get something else back, in which case we also get the mime-type of whatever it is. Whether we want to be tolerant and try to parse it as what it is, not what we asked for is another question. (Another ticket?)
|
| |
|
|
| |
subclasses). This made things work for Jython 2.5.
|
| |
|
|
| |
trying to be openned)
|
| | |
|
|
|
issues for URLInputSource and company along the way
|