-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in 6.2.0 when URL source to be parsed contains a query string #2120
Comments
- Drops zc.buildout and uses a plain old venv like the rest of the world - Upgrades to Python 3.10 - Downgrades rdflib to 6.1.1 thanks to regression; see RDFLib/rdflib#2120 - Changes reStructuredText to Markdown - Ups version number to 1.1.0 - Adds an example RDF service that doesn't reveal any private data but honors the private data parameter - Adds Maureen's latest report requests
Issue: RDF source URLs with query strings get their query strings dropped See: RDFLib/rdflib#2120
Regression came in with #1902, the problem is that we are using quote(), which is designed for quoting paths, for non-path elements. The exact fix is not that simple, but not that complex either, should have this mostly-fixed for 6.3.2, though it likely will be some corner cases. If we can find a reference implementation, it will help a lot. |
Okay, this is not that complex to fix: werkzeug has a valid implementation of this [ref] and I will try to align our implementation of |
The URI to IRI conversion was percentage-quoting characters that should not have been quoted, like equals in the query string. It was also not quoting things that should have been quoted, like the username and password components of a URI. This change improves the conversion by only quoting characters that are not allowed in specific parts of the URI and quoting previously unquoted components. The safe characters for each segment are taken from [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986). The new behavior is heavily inspired by [`werkzeug.urls.iri_to_uri`](https://github.com/pallets/werkzeug/blob/92c6380248c7272ee668e1f8bbd80447027ccce2/src/werkzeug/urls.py#L926-L931) though there are some differences. - Closes <RDFLib#2120>.
The URI to IRI conversion was percentage-quoting characters that should not have been quoted, like equals in the query string. It was also not quoting things that should have been quoted, like the username and password components of a URI. This change improves the conversion by only quoting characters that are not allowed in specific parts of the URI and quoting previously unquoted components. The safe characters for each segment are taken from [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986). The new behavior is heavily inspired by [`werkzeug.urls.iri_to_uri`](https://github.com/pallets/werkzeug/blob/92c6380248c7272ee668e1f8bbd80447027ccce2/src/werkzeug/urls.py#L926-L931) though there are some differences. - Closes <RDFLib#2120>.
The URI to IRI conversion was percentage-quoting characters that should not have been quoted, like equals in the query string. It was also not quoting things that should have been quoted, like the username and password components of a URI. This change improves the conversion by only quoting characters that are not allowed in specific parts of the URI and quoting previously unquoted components. The safe characters for each segment are taken from [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986). The new behavior is heavily inspired by [`werkzeug.urls.iri_to_uri`](https://github.com/pallets/werkzeug/blob/92c6380248c7272ee668e1f8bbd80447027ccce2/src/werkzeug/urls.py#L926-L931) though there are some differences. - Closes <#2120>.
Wow! That pull-request was a lot more involved than I expected. Thank you for tackling this, @aucampia! 💃🕺 |
Graph.parse
in 6.2.0 is producing inconsistent statement counts when reading over HTTP versus 6.1.1 when the source URL contains a query string.To reproduce:
This should be
(2, 4, True)
.Using 6.1.1 produces the correct results:
Apparently in 6.2.2 the query string part of the URL
?all=right
gets stripped out. It is necessary with certain web services APIs in order to select different sets of RDF statements.The text was updated successfully, but these errors were encountered: