{"action":"created","comment":{"url":"https://api.github.com/repos/RDFLib/rdflib/pulls/comments/83036291","pull_request_review_id":3902860,"id":83036291,"diff_hunk":"@@ -0,0 +1,27 @@\n+from rdflib import Graph, Namespace, URIRef, Literal\n+from rdflib.compare import to_isomorphic\n+import unittest\n+\n+\n+class TestIssue655(unittest.TestCase):","path":"test/test_issue655.py","position":6,"original_position":6,"commit_id":"e2c89dc4e236e60b95226d1ed946226e3262d11a","original_commit_id":"192d6c0634026068bf05c978deb64e18ea347cb3","user":{"login":"cmaumet","id":5374264,"avatar_url":"https://avatars.githubusercontent.com/u/5374264?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaumet","html_url":"https://github.com/cmaumet","followers_url":"https://api.github.com/users/cmaumet/followers","following_url":"https://api.github.com/users/cmaumet/following{/other_user}","gists_url":"https://api.github.com/users/cmaumet/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaumet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaumet/subscriptions","organizations_url":"https://api.github.com/users/cmaumet/orgs","repos_url":"https://api.github.com/users/cmaumet/repos","events_url":"https://api.github.com/users/cmaumet/events{/privacy}","received_events_url":"https://api.github.com/users/cmaumet/received_events","type":"User","site_admin":false},"body":"Sure, tests have been added in 3e9a908 (ignoring datatypes). And the solution was extended to NaN in e2c89dc.","created_at":"2016-10-12T15:48:58Z","updated_at":"2016-10-12T15:48:58Z","html_url":"https://github.com/RDFLib/rdflib/pull/655#discussion_r83036291","pull_request_url":"https://api.github.com/repos/RDFLib/rdflib/pulls/655","_links":{"self":{"href":"https://api.github.com/repos/RDFLib/rdflib/pulls/comments/83036291"},"html":{"href":"https://github.com/RDFLib/rdflib/pull/655#discussion_r83036291"},"pull_request":{"href":"https://api.github.com/repos/RDFLib/rdflib/pulls/655"}}},"pull_request":{"url":"https://api.github.com/repos/RDFLib/rdflib/pulls/655","id":89002483,"html_url":"https://github.com/RDFLib/rdflib/pull/655","diff_url":"https://github.com/RDFLib/rdflib/pull/655.diff","patch_url":"https://github.com/RDFLib/rdflib/pull/655.patch","issue_url":"https://api.github.com/repos/RDFLib/rdflib/issues/655","number":655,"state":"open","locked":false,"title":"Serialisation and parsing of infinity","user":{"login":"cmaumet","id":5374264,"avatar_url":"https://avatars.githubusercontent.com/u/5374264?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaumet","html_url":"https://github.com/cmaumet","followers_url":"https://api.github.com/users/cmaumet/followers","following_url":"https://api.github.com/users/cmaumet/following{/other_user}","gists_url":"https://api.github.com/users/cmaumet/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaumet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaumet/subscriptions","organizations_url":"https://api.github.com/users/cmaumet/orgs","repos_url":"https://api.github.com/users/cmaumet/repos","events_url":"https://api.github.com/users/cmaumet/events{/privacy}","received_events_url":"https://api.github.com/users/cmaumet/received_events","type":"User","site_admin":false},"body":"This pull request is a proposed fix for the serialisation of infinite values. \r\n\r\nCurrently infinity is serialised as ` inf ` (with no data-type) which causes an error if parsed. \r\n\r\nHere is a minimal example:\r\n```\r\nfrom rdflib import Graph, Namespace, URIRef, Literal\r\n\r\nPROV = Namespace('http://www.w3.org/ns/prov#')\r\nbob = URIRef(\"http://example.org/object/Bob\")\r\nvalue = Literal(float(\"inf\"))\r\n\r\n# g1 is a simple graph with one attribute having an infinite value\r\ng1 = Graph()\r\ng1.add((bob, PROV.value, value))\r\n\r\n# Build g2 out of the deserialisation of g1 serialisation\r\ng2 = Graph()\r\ng2.parse(data=g1.serialize(format='turtle'), format='turtle')\r\n```\r\nthat throws the following error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"test_read_inf.py\", line 14, in <module>\r\n    g2.parse(data=g1.serialize(format='turtle'), format='turtle')\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/graph.py\", line 1042, in parse\r\n    parser.parse(source, self, **args)\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/plugins/parsers/notation3.py\", line 1870, in parse\r\n    p.loadStream(source.getByteStream())\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/plugins/parsers/notation3.py\", line 434, in loadStream\r\n    return self.loadBuf(stream.read())    # Not ideal\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/plugins/parsers/notation3.py\", line 440, in loadBuf\r\n    self.feed(buf)\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/plugins/parsers/notation3.py\", line 466, in feed\r\n    i = self.directiveOrStatement(s, j)\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/plugins/parsers/notation3.py\", line 487, in directiveOrStatement\r\n    j = self.statement(argstr, i)\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/plugins/parsers/notation3.py\", line 725, in statement\r\n    j = self.property_list(argstr, i, r[0])\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/plugins/parsers/notation3.py\", line 1089, in property_list\r\n    \"objectList expected\")\r\n  File \"[...]/anaconda/envs/prov_dev/lib/python3.5/site-packages/rdflib-4.2.2.dev0-py3.5.egg/rdflib/plugins/parsers/notation3.py\", line 1615, in BadSyntax\r\n    raise BadSyntax(self._thisDoc, self.lines, argstr, i, msg)\r\nrdflib.plugins.parsers.notation3.BadSyntax: at line 7 of <>:\r\nBad syntax (objectList expected) at ^ in:\r\n\"...b'001/XMLSchema#> .\\n\\n<http://example.org/object/Bob> ns1:value'^b' inf .\\n\\n'\"\r\n```\r\n\r\nThis PR includes:\r\n - Update of `term.py` to serialise infinity as `\"INF\"^^xsd:float` (cf. https://www.w3.org/TR/xmlschema-2/). \r\n - The updated behaviour is tested in `test_issuexxx.py`.\r\n","created_at":"2016-10-12T11:58:11Z","updated_at":"2016-10-12T15:48:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"49907ae2ac9f161bfb8a2887533ee6398cbc2fd5","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/RDFLib/rdflib/milestones/7","html_url":"https://github.com/RDFLib/rdflib/milestones/rdflib%204.2.2","labels_url":"https://api.github.com/repos/RDFLib/rdflib/milestones/7/labels","id":1250300,"number":7,"title":"rdflib 4.2.2","description":"","creator":{"login":"joernhees","id":464192,"avatar_url":"https://avatars.githubusercontent.com/u/464192?v=3","gravatar_id":"","url":"https://api.github.com/users/joernhees","html_url":"https://github.com/joernhees","followers_url":"https://api.github.com/users/joernhees/followers","following_url":"https://api.github.com/users/joernhees/following{/other_user}","gists_url":"https://api.github.com/users/joernhees/gists{/gist_id}","starred_url":"https://api.github.com/users/joernhees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joernhees/subscriptions","organizations_url":"https://api.github.com/users/joernhees/orgs","repos_url":"https://api.github.com/users/joernhees/repos","events_url":"https://api.github.com/users/joernhees/events{/privacy}","received_events_url":"https://api.github.com/users/joernhees/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":77,"state":"open","created_at":"2015-08-11T17:00:01Z","updated_at":"2016-10-12T12:52:47Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/RDFLib/rdflib/pulls/655/commits","review_comments_url":"https://api.github.com/repos/RDFLib/rdflib/pulls/655/comments","review_comment_url":"https://api.github.com/repos/RDFLib/rdflib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RDFLib/rdflib/issues/655/comments","statuses_url":"https://api.github.com/repos/RDFLib/rdflib/statuses/e2c89dc4e236e60b95226d1ed946226e3262d11a","head":{"label":"cmaumet:infinity","ref":"infinity","sha":"e2c89dc4e236e60b95226d1ed946226e3262d11a","user":{"login":"cmaumet","id":5374264,"avatar_url":"https://avatars.githubusercontent.com/u/5374264?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaumet","html_url":"https://github.com/cmaumet","followers_url":"https://api.github.com/users/cmaumet/followers","following_url":"https://api.github.com/users/cmaumet/following{/other_user}","gists_url":"https://api.github.com/users/cmaumet/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaumet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaumet/subscriptions","organizations_url":"https://api.github.com/users/cmaumet/orgs","repos_url":"https://api.github.com/users/cmaumet/repos","events_url":"https://api.github.com/users/cmaumet/events{/privacy}","received_events_url":"https://api.github.com/users/cmaumet/received_events","type":"User","site_admin":false},"repo":{"id":70694090,"name":"rdflib","full_name":"cmaumet/rdflib","owner":{"login":"cmaumet","id":5374264,"avatar_url":"https://avatars.githubusercontent.com/u/5374264?v=3","gravatar_id":"","url":"https://api.github.com/users/cmaumet","html_url":"https://github.com/cmaumet","followers_url":"https://api.github.com/users/cmaumet/followers","following_url":"https://api.github.com/users/cmaumet/following{/other_user}","gists_url":"https://api.github.com/users/cmaumet/gists{/gist_id}","starred_url":"https://api.github.com/users/cmaumet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmaumet/subscriptions","organizations_url":"https://api.github.com/users/cmaumet/orgs","repos_url":"https://api.github.com/users/cmaumet/repos","events_url":"https://api.github.com/users/cmaumet/events{/privacy}","received_events_url":"https://api.github.com/users/cmaumet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cmaumet/rdflib","description":"RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.","fork":true,"url":"https://api.github.com/repos/cmaumet/rdflib","forks_url":"https://api.github.com/repos/cmaumet/rdflib/forks","keys_url":"https://api.github.com/repos/cmaumet/rdflib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmaumet/rdflib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmaumet/rdflib/teams","hooks_url":"https://api.github.com/repos/cmaumet/rdflib/hooks","issue_events_url":"https://api.github.com/repos/cmaumet/rdflib/issues/events{/number}","events_url":"https://api.github.com/repos/cmaumet/rdflib/events","assignees_url":"https://api.github.com/repos/cmaumet/rdflib/assignees{/user}","branches_url":"https://api.github.com/repos/cmaumet/rdflib/branches{/branch}","tags_url":"https://api.github.com/repos/cmaumet/rdflib/tags","blobs_url":"https://api.github.com/repos/cmaumet/rdflib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmaumet/rdflib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmaumet/rdflib/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmaumet/rdflib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmaumet/rdflib/statuses/{sha}","languages_url":"https://api.github.com/repos/cmaumet/rdflib/languages","stargazers_url":"https://api.github.com/repos/cmaumet/rdflib/stargazers","contributors_url":"https://api.github.com/repos/cmaumet/rdflib/contributors","subscribers_url":"https://api.github.com/repos/cmaumet/rdflib/subscribers","subscription_url":"https://api.github.com/repos/cmaumet/rdflib/subscription","commits_url":"https://api.github.com/repos/cmaumet/rdflib/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmaumet/rdflib/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmaumet/rdflib/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmaumet/rdflib/issues/comments{/number}","contents_url":"https://api.github.com/repos/cmaumet/rdflib/contents/{+path}","compare_url":"https://api.github.com/repos/cmaumet/rdflib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmaumet/rdflib/merges","archive_url":"https://api.github.com/repos/cmaumet/rdflib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmaumet/rdflib/downloads","issues_url":"https://api.github.com/repos/cmaumet/rdflib/issues{/number}","pulls_url":"https://api.github.com/repos/cmaumet/rdflib/pulls{/number}","milestones_url":"https://api.github.com/repos/cmaumet/rdflib/milestones{/number}","notifications_url":"https://api.github.com/repos/cmaumet/rdflib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmaumet/rdflib/labels{/name}","releases_url":"https://api.github.com/repos/cmaumet/rdflib/releases{/id}","deployments_url":"https://api.github.com/repos/cmaumet/rdflib/deployments","created_at":"2016-10-12T11:40:33Z","updated_at":"2016-10-12T11:40:39Z","pushed_at":"2016-10-12T15:46:35Z","git_url":"git://github.com/cmaumet/rdflib.git","ssh_url":"git@github.com:cmaumet/rdflib.git","clone_url":"https://github.com/cmaumet/rdflib.git","svn_url":"https://github.com/cmaumet/rdflib","homepage":"https://rdflib.readthedocs.org/","size":12217,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"RDFLib:master","ref":"master","sha":"fbf95a8ea506f95394c36a09241448e6900fbd77","user":{"login":"RDFLib","id":1401847,"avatar_url":"https://avatars.githubusercontent.com/u/1401847?v=3","gravatar_id":"","url":"https://api.github.com/users/RDFLib","html_url":"https://github.com/RDFLib","followers_url":"https://api.github.com/users/RDFLib/followers","following_url":"https://api.github.com/users/RDFLib/following{/other_user}","gists_url":"https://api.github.com/users/RDFLib/gists{/gist_id}","starred_url":"https://api.github.com/users/RDFLib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RDFLib/subscriptions","organizations_url":"https://api.github.com/users/RDFLib/orgs","repos_url":"https://api.github.com/users/RDFLib/repos","events_url":"https://api.github.com/users/RDFLib/events{/privacy}","received_events_url":"https://api.github.com/users/RDFLib/received_events","type":"Organization","site_admin":false},"repo":{"id":3342046,"name":"rdflib","full_name":"RDFLib/rdflib","owner":{"login":"RDFLib","id":1401847,"avatar_url":"https://avatars.githubusercontent.com/u/1401847?v=3","gravatar_id":"","url":"https://api.github.com/users/RDFLib","html_url":"https://github.com/RDFLib","followers_url":"https://api.github.com/users/RDFLib/followers","following_url":"https://api.github.com/users/RDFLib/following{/other_user}","gists_url":"https://api.github.com/users/RDFLib/gists{/gist_id}","starred_url":"https://api.github.com/users/RDFLib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RDFLib/subscriptions","organizations_url":"https://api.github.com/users/RDFLib/orgs","repos_url":"https://api.github.com/users/RDFLib/repos","events_url":"https://api.github.com/users/RDFLib/events{/privacy}","received_events_url":"https://api.github.com/users/RDFLib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RDFLib/rdflib","description":"RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.","fork":false,"url":"https://api.github.com/repos/RDFLib/rdflib","forks_url":"https://api.github.com/repos/RDFLib/rdflib/forks","keys_url":"https://api.github.com/repos/RDFLib/rdflib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RDFLib/rdflib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RDFLib/rdflib/teams","hooks_url":"https://api.github.com/repos/RDFLib/rdflib/hooks","issue_events_url":"https://api.github.com/repos/RDFLib/rdflib/issues/events{/number}","events_url":"https://api.github.com/repos/RDFLib/rdflib/events","assignees_url":"https://api.github.com/repos/RDFLib/rdflib/assignees{/user}","branches_url":"https://api.github.com/repos/RDFLib/rdflib/branches{/branch}","tags_url":"https://api.github.com/repos/RDFLib/rdflib/tags","blobs_url":"https://api.github.com/repos/RDFLib/rdflib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RDFLib/rdflib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RDFLib/rdflib/git/refs{/sha}","trees_url":"https://api.github.com/repos/RDFLib/rdflib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RDFLib/rdflib/statuses/{sha}","languages_url":"https://api.github.com/repos/RDFLib/rdflib/languages","stargazers_url":"https://api.github.com/repos/RDFLib/rdflib/stargazers","contributors_url":"https://api.github.com/repos/RDFLib/rdflib/contributors","subscribers_url":"https://api.github.com/repos/RDFLib/rdflib/subscribers","subscription_url":"https://api.github.com/repos/RDFLib/rdflib/subscription","commits_url":"https://api.github.com/repos/RDFLib/rdflib/commits{/sha}","git_commits_url":"https://api.github.com/repos/RDFLib/rdflib/git/commits{/sha}","comments_url":"https://api.github.com/repos/RDFLib/rdflib/comments{/number}","issue_comment_url":"https://api.github.com/repos/RDFLib/rdflib/issues/comments{/number}","contents_url":"https://api.github.com/repos/RDFLib/rdflib/contents/{+path}","compare_url":"https://api.github.com/repos/RDFLib/rdflib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RDFLib/rdflib/merges","archive_url":"https://api.github.com/repos/RDFLib/rdflib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RDFLib/rdflib/downloads","issues_url":"https://api.github.com/repos/RDFLib/rdflib/issues{/number}","pulls_url":"https://api.github.com/repos/RDFLib/rdflib/pulls{/number}","milestones_url":"https://api.github.com/repos/RDFLib/rdflib/milestones{/number}","notifications_url":"https://api.github.com/repos/RDFLib/rdflib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RDFLib/rdflib/labels{/name}","releases_url":"https://api.github.com/repos/RDFLib/rdflib/releases{/id}","deployments_url":"https://api.github.com/repos/RDFLib/rdflib/deployments","created_at":"2012-02-03T05:49:13Z","updated_at":"2016-10-08T21:21:40Z","pushed_at":"2016-10-12T15:46:35Z","git_url":"git://github.com/RDFLib/rdflib.git","ssh_url":"git@github.com:RDFLib/rdflib.git","clone_url":"https://github.com/RDFLib/rdflib.git","svn_url":"https://github.com/RDFLib/rdflib","homepage":"https://rdflib.readthedocs.org/","size":13531,"stargazers_count":513,"watchers_count":513,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":166,"mirror_url":null,"open_issues_count":126,"forks":166,"open_issues":126,"watchers":513,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RDFLib/rdflib/pulls/655"},"html":{"href":"https://github.com/RDFLib/rdflib/pull/655"},"issue":{"href":"https://api.github.com/repos/RDFLib/rdflib/issues/655"},"comments":{"href":"https://api.github.com/repos/RDFLib/rdflib/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/RDFLib/rdflib/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/RDFLib/rdflib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RDFLib/rdflib/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/RDFLib/rdflib/statuses/e2c89dc4e236e60b95226d1ed946226e3262d11a"}}}}
{"actor":{"display_login":"cmaumet"}}