{"action":"created","comment":{"url":"https://api.github.com/repos/Julian/jsonschema/pulls/comments/88791137","pull_request_review_id":9355576,"id":88791137,"diff_hunk":"@@ -771,6 +772,28 @@ class TestRefResolver(unittest.TestCase):\n     stored_uri = \"foo://stored\"\n     stored_schema = {\"stored\" : \"schema\"}\n \n+    def prev_resolve_fragment(self, document, fragment):\n+        fragment = fragment.lstrip(u\"/\")","path":"jsonschema/tests/test_validators.py","position":16,"original_position":16,"commit_id":"e74dedcc75e37ebb60a49549758f3a3cfec12e5b","original_commit_id":"d9efe693c037a11745b171bea8eb898311a12938","user":{"login":"mathewmarcus","id":14226006,"avatar_url":"https://avatars.githubusercontent.com/u/14226006?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewmarcus","html_url":"https://github.com/mathewmarcus","followers_url":"https://api.github.com/users/mathewmarcus/followers","following_url":"https://api.github.com/users/mathewmarcus/following{/other_user}","gists_url":"https://api.github.com/users/mathewmarcus/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewmarcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewmarcus/subscriptions","organizations_url":"https://api.github.com/users/mathewmarcus/orgs","repos_url":"https://api.github.com/users/mathewmarcus/repos","events_url":"https://api.github.com/users/mathewmarcus/events{/privacy}","received_events_url":"https://api.github.com/users/mathewmarcus/received_events","type":"User","site_admin":false},"body":"Ok sorry about that, I can remove some of the unnecessary parts of that method. I only put them in there to replicate the original method as closely as possible.","created_at":"2016-11-20T00:42:58Z","updated_at":"2016-11-20T00:42:58Z","html_url":"https://github.com/Julian/jsonschema/pull/306#discussion_r88791137","pull_request_url":"https://api.github.com/repos/Julian/jsonschema/pulls/306","_links":{"self":{"href":"https://api.github.com/repos/Julian/jsonschema/pulls/comments/88791137"},"html":{"href":"https://github.com/Julian/jsonschema/pull/306#discussion_r88791137"},"pull_request":{"href":"https://api.github.com/repos/Julian/jsonschema/pulls/306"}}},"pull_request":{"url":"https://api.github.com/repos/Julian/jsonschema/pulls/306","id":94501230,"html_url":"https://github.com/Julian/jsonschema/pull/306","diff_url":"https://github.com/Julian/jsonschema/pull/306.diff","patch_url":"https://github.com/Julian/jsonschema/pull/306.patch","issue_url":"https://api.github.com/repos/Julian/jsonschema/issues/306","number":306,"state":"open","locked":false,"title":"Fix relative references","user":{"login":"mathewmarcus","id":14226006,"avatar_url":"https://avatars.githubusercontent.com/u/14226006?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewmarcus","html_url":"https://github.com/mathewmarcus","followers_url":"https://api.github.com/users/mathewmarcus/followers","following_url":"https://api.github.com/users/mathewmarcus/following{/other_user}","gists_url":"https://api.github.com/users/mathewmarcus/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewmarcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewmarcus/subscriptions","organizations_url":"https://api.github.com/users/mathewmarcus/orgs","repos_url":"https://api.github.com/users/mathewmarcus/repos","events_url":"https://api.github.com/users/mathewmarcus/events{/privacy}","received_events_url":"https://api.github.com/users/mathewmarcus/received_events","type":"User","site_admin":false},"body":"Currently, calling the resolve_fragment method of the RefResolver class to return the JSON referenced by the pointer of a $ref key fails if the pointer is preceded by a `#` character. The JSON schema specs specify this format, e.g. { \"$ref\": \"#/definitions/address\" }. Specifically, the following exception is raised: jsonschema.exceptions.RefResolutionError: Unresolvable JSON pointer. This happens even if the pointer is valid.  \r\n\r\nI made changes to the resolve_fragment method of the RefResolver class in jsonschema/validators.py to strip away this character, and now the pointer resolves correctly. I also added two tests to jsonschema/tests/test_validators.py to demonstrate this behavior of the old method and to show the results of the revised method. Let me know if you have any questions.","created_at":"2016-11-20T00:16:36Z","updated_at":"2016-11-20T00:42:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43045d7bf4b10738b5c18ccb76db5fff72777439","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Julian/jsonschema/pulls/306/commits","review_comments_url":"https://api.github.com/repos/Julian/jsonschema/pulls/306/comments","review_comment_url":"https://api.github.com/repos/Julian/jsonschema/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Julian/jsonschema/issues/306/comments","statuses_url":"https://api.github.com/repos/Julian/jsonschema/statuses/e74dedcc75e37ebb60a49549758f3a3cfec12e5b","head":{"label":"mathewmarcus:fix_relative_references","ref":"fix_relative_references","sha":"e74dedcc75e37ebb60a49549758f3a3cfec12e5b","user":{"login":"mathewmarcus","id":14226006,"avatar_url":"https://avatars.githubusercontent.com/u/14226006?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewmarcus","html_url":"https://github.com/mathewmarcus","followers_url":"https://api.github.com/users/mathewmarcus/followers","following_url":"https://api.github.com/users/mathewmarcus/following{/other_user}","gists_url":"https://api.github.com/users/mathewmarcus/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewmarcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewmarcus/subscriptions","organizations_url":"https://api.github.com/users/mathewmarcus/orgs","repos_url":"https://api.github.com/users/mathewmarcus/repos","events_url":"https://api.github.com/users/mathewmarcus/events{/privacy}","received_events_url":"https://api.github.com/users/mathewmarcus/received_events","type":"User","site_admin":false},"repo":{"id":73878585,"name":"jsonschema","full_name":"mathewmarcus/jsonschema","owner":{"login":"mathewmarcus","id":14226006,"avatar_url":"https://avatars.githubusercontent.com/u/14226006?v=3","gravatar_id":"","url":"https://api.github.com/users/mathewmarcus","html_url":"https://github.com/mathewmarcus","followers_url":"https://api.github.com/users/mathewmarcus/followers","following_url":"https://api.github.com/users/mathewmarcus/following{/other_user}","gists_url":"https://api.github.com/users/mathewmarcus/gists{/gist_id}","starred_url":"https://api.github.com/users/mathewmarcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathewmarcus/subscriptions","organizations_url":"https://api.github.com/users/mathewmarcus/orgs","repos_url":"https://api.github.com/users/mathewmarcus/repos","events_url":"https://api.github.com/users/mathewmarcus/events{/privacy}","received_events_url":"https://api.github.com/users/mathewmarcus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mathewmarcus/jsonschema","description":"An(other) implementation of JSON Schema for Python","fork":true,"url":"https://api.github.com/repos/mathewmarcus/jsonschema","forks_url":"https://api.github.com/repos/mathewmarcus/jsonschema/forks","keys_url":"https://api.github.com/repos/mathewmarcus/jsonschema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mathewmarcus/jsonschema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mathewmarcus/jsonschema/teams","hooks_url":"https://api.github.com/repos/mathewmarcus/jsonschema/hooks","issue_events_url":"https://api.github.com/repos/mathewmarcus/jsonschema/issues/events{/number}","events_url":"https://api.github.com/repos/mathewmarcus/jsonschema/events","assignees_url":"https://api.github.com/repos/mathewmarcus/jsonschema/assignees{/user}","branches_url":"https://api.github.com/repos/mathewmarcus/jsonschema/branches{/branch}","tags_url":"https://api.github.com/repos/mathewmarcus/jsonschema/tags","blobs_url":"https://api.github.com/repos/mathewmarcus/jsonschema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mathewmarcus/jsonschema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mathewmarcus/jsonschema/git/refs{/sha}","trees_url":"https://api.github.com/repos/mathewmarcus/jsonschema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mathewmarcus/jsonschema/statuses/{sha}","languages_url":"https://api.github.com/repos/mathewmarcus/jsonschema/languages","stargazers_url":"https://api.github.com/repos/mathewmarcus/jsonschema/stargazers","contributors_url":"https://api.github.com/repos/mathewmarcus/jsonschema/contributors","subscribers_url":"https://api.github.com/repos/mathewmarcus/jsonschema/subscribers","subscription_url":"https://api.github.com/repos/mathewmarcus/jsonschema/subscription","commits_url":"https://api.github.com/repos/mathewmarcus/jsonschema/commits{/sha}","git_commits_url":"https://api.github.com/repos/mathewmarcus/jsonschema/git/commits{/sha}","comments_url":"https://api.github.com/repos/mathewmarcus/jsonschema/comments{/number}","issue_comment_url":"https://api.github.com/repos/mathewmarcus/jsonschema/issues/comments{/number}","contents_url":"https://api.github.com/repos/mathewmarcus/jsonschema/contents/{+path}","compare_url":"https://api.github.com/repos/mathewmarcus/jsonschema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mathewmarcus/jsonschema/merges","archive_url":"https://api.github.com/repos/mathewmarcus/jsonschema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mathewmarcus/jsonschema/downloads","issues_url":"https://api.github.com/repos/mathewmarcus/jsonschema/issues{/number}","pulls_url":"https://api.github.com/repos/mathewmarcus/jsonschema/pulls{/number}","milestones_url":"https://api.github.com/repos/mathewmarcus/jsonschema/milestones{/number}","notifications_url":"https://api.github.com/repos/mathewmarcus/jsonschema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mathewmarcus/jsonschema/labels{/name}","releases_url":"https://api.github.com/repos/mathewmarcus/jsonschema/releases{/id}","deployments_url":"https://api.github.com/repos/mathewmarcus/jsonschema/deployments","created_at":"2016-11-16T03:07:54Z","updated_at":"2016-11-16T03:07:55Z","pushed_at":"2016-11-20T00:41:23Z","git_url":"git://github.com/mathewmarcus/jsonschema.git","ssh_url":"git@github.com:mathewmarcus/jsonschema.git","clone_url":"https://github.com/mathewmarcus/jsonschema.git","svn_url":"https://github.com/mathewmarcus/jsonschema","homepage":"https://python-jsonschema.readthedocs.io","size":964,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Julian:master","ref":"master","sha":"83fd825f6f575c661160980e8ebb68eee0fbfd94","user":{"login":"Julian","id":329822,"avatar_url":"https://avatars.githubusercontent.com/u/329822?v=3","gravatar_id":"","url":"https://api.github.com/users/Julian","html_url":"https://github.com/Julian","followers_url":"https://api.github.com/users/Julian/followers","following_url":"https://api.github.com/users/Julian/following{/other_user}","gists_url":"https://api.github.com/users/Julian/gists{/gist_id}","starred_url":"https://api.github.com/users/Julian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Julian/subscriptions","organizations_url":"https://api.github.com/users/Julian/orgs","repos_url":"https://api.github.com/users/Julian/repos","events_url":"https://api.github.com/users/Julian/events{/privacy}","received_events_url":"https://api.github.com/users/Julian/received_events","type":"User","site_admin":false},"repo":{"id":3072629,"name":"jsonschema","full_name":"Julian/jsonschema","owner":{"login":"Julian","id":329822,"avatar_url":"https://avatars.githubusercontent.com/u/329822?v=3","gravatar_id":"","url":"https://api.github.com/users/Julian","html_url":"https://github.com/Julian","followers_url":"https://api.github.com/users/Julian/followers","following_url":"https://api.github.com/users/Julian/following{/other_user}","gists_url":"https://api.github.com/users/Julian/gists{/gist_id}","starred_url":"https://api.github.com/users/Julian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Julian/subscriptions","organizations_url":"https://api.github.com/users/Julian/orgs","repos_url":"https://api.github.com/users/Julian/repos","events_url":"https://api.github.com/users/Julian/events{/privacy}","received_events_url":"https://api.github.com/users/Julian/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Julian/jsonschema","description":"An(other) implementation of JSON Schema for Python","fork":false,"url":"https://api.github.com/repos/Julian/jsonschema","forks_url":"https://api.github.com/repos/Julian/jsonschema/forks","keys_url":"https://api.github.com/repos/Julian/jsonschema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Julian/jsonschema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Julian/jsonschema/teams","hooks_url":"https://api.github.com/repos/Julian/jsonschema/hooks","issue_events_url":"https://api.github.com/repos/Julian/jsonschema/issues/events{/number}","events_url":"https://api.github.com/repos/Julian/jsonschema/events","assignees_url":"https://api.github.com/repos/Julian/jsonschema/assignees{/user}","branches_url":"https://api.github.com/repos/Julian/jsonschema/branches{/branch}","tags_url":"https://api.github.com/repos/Julian/jsonschema/tags","blobs_url":"https://api.github.com/repos/Julian/jsonschema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Julian/jsonschema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Julian/jsonschema/git/refs{/sha}","trees_url":"https://api.github.com/repos/Julian/jsonschema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Julian/jsonschema/statuses/{sha}","languages_url":"https://api.github.com/repos/Julian/jsonschema/languages","stargazers_url":"https://api.github.com/repos/Julian/jsonschema/stargazers","contributors_url":"https://api.github.com/repos/Julian/jsonschema/contributors","subscribers_url":"https://api.github.com/repos/Julian/jsonschema/subscribers","subscription_url":"https://api.github.com/repos/Julian/jsonschema/subscription","commits_url":"https://api.github.com/repos/Julian/jsonschema/commits{/sha}","git_commits_url":"https://api.github.com/repos/Julian/jsonschema/git/commits{/sha}","comments_url":"https://api.github.com/repos/Julian/jsonschema/comments{/number}","issue_comment_url":"https://api.github.com/repos/Julian/jsonschema/issues/comments{/number}","contents_url":"https://api.github.com/repos/Julian/jsonschema/contents/{+path}","compare_url":"https://api.github.com/repos/Julian/jsonschema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Julian/jsonschema/merges","archive_url":"https://api.github.com/repos/Julian/jsonschema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Julian/jsonschema/downloads","issues_url":"https://api.github.com/repos/Julian/jsonschema/issues{/number}","pulls_url":"https://api.github.com/repos/Julian/jsonschema/pulls{/number}","milestones_url":"https://api.github.com/repos/Julian/jsonschema/milestones{/number}","notifications_url":"https://api.github.com/repos/Julian/jsonschema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Julian/jsonschema/labels{/name}","releases_url":"https://api.github.com/repos/Julian/jsonschema/releases{/id}","deployments_url":"https://api.github.com/repos/Julian/jsonschema/deployments","created_at":"2011-12-30T03:37:43Z","updated_at":"2016-11-17T17:04:33Z","pushed_at":"2016-11-20T00:41:23Z","git_url":"git://github.com/Julian/jsonschema.git","ssh_url":"git@github.com:Julian/jsonschema.git","clone_url":"https://github.com/Julian/jsonschema.git","svn_url":"https://github.com/Julian/jsonschema","homepage":"https://python-jsonschema.readthedocs.io","size":1454,"stargazers_count":985,"watchers_count":985,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":189,"mirror_url":null,"open_issues_count":15,"forks":189,"open_issues":15,"watchers":985,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Julian/jsonschema/pulls/306"},"html":{"href":"https://github.com/Julian/jsonschema/pull/306"},"issue":{"href":"https://api.github.com/repos/Julian/jsonschema/issues/306"},"comments":{"href":"https://api.github.com/repos/Julian/jsonschema/issues/306/comments"},"review_comments":{"href":"https://api.github.com/repos/Julian/jsonschema/pulls/306/comments"},"review_comment":{"href":"https://api.github.com/repos/Julian/jsonschema/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Julian/jsonschema/pulls/306/commits"},"statuses":{"href":"https://api.github.com/repos/Julian/jsonschema/statuses/e74dedcc75e37ebb60a49549758f3a3cfec12e5b"}}}}
{"actor":{"display_login":"mathewmarcus"}}