{"action":"created","issue":{"url":"https://api.github.com/repos/lukasschwab/arxiv.py/issues/13","repository_url":"https://api.github.com/repos/lukasschwab/arxiv.py","labels_url":"https://api.github.com/repos/lukasschwab/arxiv.py/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/lukasschwab/arxiv.py/issues/13/comments","events_url":"https://api.github.com/repos/lukasschwab/arxiv.py/issues/13/events","html_url":"https://github.com/lukasschwab/arxiv.py/pull/13","id":339742779,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMzE4NzU3","number":13,"title":"enable + in query string","user":{"login":"cnglen","id":4279208,"node_id":"MDQ6VXNlcjQyNzkyMDg=","avatar_url":"https://avatars2.githubusercontent.com/u/4279208?v=4","gravatar_id":"","url":"https://api.github.com/users/cnglen","html_url":"https://github.com/cnglen","followers_url":"https://api.github.com/users/cnglen/followers","following_url":"https://api.github.com/users/cnglen/following{/other_user}","gists_url":"https://api.github.com/users/cnglen/gists{/gist_id}","starred_url":"https://api.github.com/users/cnglen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cnglen/subscriptions","organizations_url":"https://api.github.com/users/cnglen/orgs","repos_url":"https://api.github.com/users/cnglen/repos","events_url":"https://api.github.com/users/cnglen/events{/privacy}","received_events_url":"https://api.github.com/users/cnglen/received_events","type":"User","site_admin":false},"labels":[{"id":291340266,"node_id":"MDU6TGFiZWwyOTEzNDAyNjY=","url":"https://api.github.com/repos/lukasschwab/arxiv.py/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"lukasschwab","id":4955943,"node_id":"MDQ6VXNlcjQ5NTU5NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/4955943?v=4","gravatar_id":"","url":"https://api.github.com/users/lukasschwab","html_url":"https://github.com/lukasschwab","followers_url":"https://api.github.com/users/lukasschwab/followers","following_url":"https://api.github.com/users/lukasschwab/following{/other_user}","gists_url":"https://api.github.com/users/lukasschwab/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasschwab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasschwab/subscriptions","organizations_url":"https://api.github.com/users/lukasschwab/orgs","repos_url":"https://api.github.com/users/lukasschwab/repos","events_url":"https://api.github.com/users/lukasschwab/events{/privacy}","received_events_url":"https://api.github.com/users/lukasschwab/received_events","type":"User","site_admin":false},"assignees":[{"login":"lukasschwab","id":4955943,"node_id":"MDQ6VXNlcjQ5NTU5NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/4955943?v=4","gravatar_id":"","url":"https://api.github.com/users/lukasschwab","html_url":"https://github.com/lukasschwab","followers_url":"https://api.github.com/users/lukasschwab/followers","following_url":"https://api.github.com/users/lukasschwab/following{/other_user}","gists_url":"https://api.github.com/users/lukasschwab/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasschwab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasschwab/subscriptions","organizations_url":"https://api.github.com/users/lukasschwab/orgs","repos_url":"https://api.github.com/users/lukasschwab/repos","events_url":"https://api.github.com/users/lukasschwab/events{/privacy}","received_events_url":"https://api.github.com/users/lukasschwab/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-07-10T08:32:00Z","updated_at":"2018-07-10T14:17:15Z","closed_at":"2018-07-10T14:17:15Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/lukasschwab/arxiv.py/pulls/13","html_url":"https://github.com/lukasschwab/arxiv.py/pull/13","diff_url":"https://github.com/lukasschwab/arxiv.py/pull/13.diff","patch_url":"https://github.com/lukasschwab/arxiv.py/pull/13.patch"},"body":"enable  + in query=\"au:del_maestro+AND+ti:checkerboard\""},"comment":{"url":"https://api.github.com/repos/lukasschwab/arxiv.py/issues/comments/403838744","html_url":"https://github.com/lukasschwab/arxiv.py/pull/13#issuecomment-403838744","issue_url":"https://api.github.com/repos/lukasschwab/arxiv.py/issues/13","id":403838744,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzgzODc0NA==","user":{"login":"lukasschwab","id":4955943,"node_id":"MDQ6VXNlcjQ5NTU5NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/4955943?v=4","gravatar_id":"","url":"https://api.github.com/users/lukasschwab","html_url":"https://github.com/lukasschwab","followers_url":"https://api.github.com/users/lukasschwab/followers","following_url":"https://api.github.com/users/lukasschwab/following{/other_user}","gists_url":"https://api.github.com/users/lukasschwab/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasschwab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasschwab/subscriptions","organizations_url":"https://api.github.com/users/lukasschwab/orgs","repos_url":"https://api.github.com/users/lukasschwab/repos","events_url":"https://api.github.com/users/lukasschwab/events{/privacy}","received_events_url":"https://api.github.com/users/lukasschwab/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T14:17:15Z","updated_at":"2018-07-10T14:17:15Z","author_association":"OWNER","body":"More fundamentally, there's a question of how query strings should function.\r\n\r\nThe default `urllib` behavior, via `quote_plus()`, is to convert each instance of ` ` to `+` in the query string. Your query is already possible in the existing library:\r\n\r\n``` python\r\n>>> import arxiv\r\n>>> arxiv.query(search_query=\"au:del_maestro+AND+ti:checkerboard\")\r\n```\r\n\r\nThere are conceivably cases in which a user might want to first URL-encode and then modify their query string before passing it to `arxiv.query()`. This could be accommodated by defining a wrapper for `urllib.parse.quote(s, safe=\"+\")`:\r\n\r\n```python\r\ndef query_with_plusses(string, safe=\"\", encoding=None, errors=None):\r\n    return quote(string, safe=safe + \"+\", encoding=None, errors=None)\r\n```\r\n\r\nMy concern is that this would produce issues for those expecting the standard `urllib` behavior––for example, those who want to include an escaped `+` in a part of their query––e.g. if they're searching for a paper entitled `Odds+Ends`. This should not be misinterpreted as a URL-encoded space by the server, so the character *should* be quoted.\r\n\r\nAdditionally, [Python2 urllib.urlencode()](https://docs.python.org/2/library/urllib.html#urllib.urlencode) doesn't support the specification of an alternative to `quote_plus()`. It'd take significant redundant code to implement this behavior *both* for Python 2 and Python 3.\r\n\r\nBecause the functionality in question is already available in `arxiv 0.2.3` by using spaces in the query string, and because a working enhancement is likely to interfere with expected query behavior and/or impact Python 2 support, I'm going to close the PR.\r\n\r\nIf there's a cleaner solution I'm missing––perhaps by refactoring the `query()` function  so that the request and the URL-encoding are separate––feel free to push those changes. I'll gladly reopen and review! 😃 \r\n\r\nThanks for your interest in `arxiv`! Let me know if I can clarify anything."}}
{"actor":{"display_login":"lukasschwab"}}