{"action":"opened","number":161,"pull_request":{"url":"https://api.github.com/repos/msgpack/msgpack-python/pulls/161","id":51085122,"html_url":"https://github.com/msgpack/msgpack-python/pull/161","diff_url":"https://github.com/msgpack/msgpack-python/pull/161.diff","patch_url":"https://github.com/msgpack/msgpack-python/pull/161.patch","issue_url":"https://api.github.com/repos/msgpack/msgpack-python/issues/161","number":161,"state":"open","locked":false,"title":"Support packing arbitrary objects that support the Python's buffer interface","user":{"login":"jfolz","id":3245870,"avatar_url":"https://avatars.githubusercontent.com/u/3245870?v=3","gravatar_id":"","url":"https://api.github.com/users/jfolz","html_url":"https://github.com/jfolz","followers_url":"https://api.github.com/users/jfolz/followers","following_url":"https://api.github.com/users/jfolz/following{/other_user}","gists_url":"https://api.github.com/users/jfolz/gists{/gist_id}","starred_url":"https://api.github.com/users/jfolz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfolz/subscriptions","organizations_url":"https://api.github.com/users/jfolz/orgs","repos_url":"https://api.github.com/users/jfolz/repos","events_url":"https://api.github.com/users/jfolz/events{/privacy}","received_events_url":"https://api.github.com/users/jfolz/received_events","type":"User","site_admin":false},"body":"I am working on a high-throughput scenario where I need to avoid copying memory wherever possible. I frequently create buffers from existing objects and sometimes need to hand them to msgpack.\r\nUnfortunately I could not find a way to pass buffers to the current version of msgpack without copying.\r\nSo I wrote this small patch to support packing arbitrary buffer objects to binary data. It works well for my use case.\r\n\r\nThings I'm not so sure about:\r\n* Pure Python fallback is not implemented. Its structure is different from the Cython code and I'm not sure what to do exactly.\r\n* I'm not an expert in using this library. Does this interfere with any other functionality?\r\n* Information is lost in the conversion, e.g., shape of Numpy arrays. Since the lib just \"swallows\" everything that is a buffer. A user might expect to get the same type out again, but gets bytes instead.\r\n* Strided data is still copied.\r\n* No test cases yet. Might needs some more type checks.","created_at":"2015-11-18T13:41:04Z","updated_at":"2015-11-18T13:41:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/msgpack/msgpack-python/pulls/161/commits","review_comments_url":"https://api.github.com/repos/msgpack/msgpack-python/pulls/161/comments","review_comment_url":"https://api.github.com/repos/msgpack/msgpack-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/msgpack/msgpack-python/issues/161/comments","statuses_url":"https://api.github.com/repos/msgpack/msgpack-python/statuses/ac8d638e78a0494e1dc78b89dd227447d6ffdf0c","head":{"label":"jfolz:feature/packbuffers","ref":"feature/packbuffers","sha":"ac8d638e78a0494e1dc78b89dd227447d6ffdf0c","user":{"login":"jfolz","id":3245870,"avatar_url":"https://avatars.githubusercontent.com/u/3245870?v=3","gravatar_id":"","url":"https://api.github.com/users/jfolz","html_url":"https://github.com/jfolz","followers_url":"https://api.github.com/users/jfolz/followers","following_url":"https://api.github.com/users/jfolz/following{/other_user}","gists_url":"https://api.github.com/users/jfolz/gists{/gist_id}","starred_url":"https://api.github.com/users/jfolz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfolz/subscriptions","organizations_url":"https://api.github.com/users/jfolz/orgs","repos_url":"https://api.github.com/users/jfolz/repos","events_url":"https://api.github.com/users/jfolz/events{/privacy}","received_events_url":"https://api.github.com/users/jfolz/received_events","type":"User","site_admin":false},"repo":{"id":46046571,"name":"msgpack-python","full_name":"jfolz/msgpack-python","owner":{"login":"jfolz","id":3245870,"avatar_url":"https://avatars.githubusercontent.com/u/3245870?v=3","gravatar_id":"","url":"https://api.github.com/users/jfolz","html_url":"https://github.com/jfolz","followers_url":"https://api.github.com/users/jfolz/followers","following_url":"https://api.github.com/users/jfolz/following{/other_user}","gists_url":"https://api.github.com/users/jfolz/gists{/gist_id}","starred_url":"https://api.github.com/users/jfolz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfolz/subscriptions","organizations_url":"https://api.github.com/users/jfolz/orgs","repos_url":"https://api.github.com/users/jfolz/repos","events_url":"https://api.github.com/users/jfolz/events{/privacy}","received_events_url":"https://api.github.com/users/jfolz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jfolz/msgpack-python","description":"MessagePack serializer implementation for Python msgpack.org[Python]","fork":true,"url":"https://api.github.com/repos/jfolz/msgpack-python","forks_url":"https://api.github.com/repos/jfolz/msgpack-python/forks","keys_url":"https://api.github.com/repos/jfolz/msgpack-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jfolz/msgpack-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jfolz/msgpack-python/teams","hooks_url":"https://api.github.com/repos/jfolz/msgpack-python/hooks","issue_events_url":"https://api.github.com/repos/jfolz/msgpack-python/issues/events{/number}","events_url":"https://api.github.com/repos/jfolz/msgpack-python/events","assignees_url":"https://api.github.com/repos/jfolz/msgpack-python/assignees{/user}","branches_url":"https://api.github.com/repos/jfolz/msgpack-python/branches{/branch}","tags_url":"https://api.github.com/repos/jfolz/msgpack-python/tags","blobs_url":"https://api.github.com/repos/jfolz/msgpack-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jfolz/msgpack-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jfolz/msgpack-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/jfolz/msgpack-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jfolz/msgpack-python/statuses/{sha}","languages_url":"https://api.github.com/repos/jfolz/msgpack-python/languages","stargazers_url":"https://api.github.com/repos/jfolz/msgpack-python/stargazers","contributors_url":"https://api.github.com/repos/jfolz/msgpack-python/contributors","subscribers_url":"https://api.github.com/repos/jfolz/msgpack-python/subscribers","subscription_url":"https://api.github.com/repos/jfolz/msgpack-python/subscription","commits_url":"https://api.github.com/repos/jfolz/msgpack-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/jfolz/msgpack-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/jfolz/msgpack-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/jfolz/msgpack-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/jfolz/msgpack-python/contents/{+path}","compare_url":"https://api.github.com/repos/jfolz/msgpack-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jfolz/msgpack-python/merges","archive_url":"https://api.github.com/repos/jfolz/msgpack-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jfolz/msgpack-python/downloads","issues_url":"https://api.github.com/repos/jfolz/msgpack-python/issues{/number}","pulls_url":"https://api.github.com/repos/jfolz/msgpack-python/pulls{/number}","milestones_url":"https://api.github.com/repos/jfolz/msgpack-python/milestones{/number}","notifications_url":"https://api.github.com/repos/jfolz/msgpack-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jfolz/msgpack-python/labels{/name}","releases_url":"https://api.github.com/repos/jfolz/msgpack-python/releases{/id}","created_at":"2015-11-12T10:45:59Z","updated_at":"2015-11-12T10:46:00Z","pushed_at":"2015-11-12T10:50:17Z","git_url":"git://github.com/jfolz/msgpack-python.git","ssh_url":"git@github.com:jfolz/msgpack-python.git","clone_url":"https://github.com/jfolz/msgpack-python.git","svn_url":"https://github.com/jfolz/msgpack-python","homepage":"http://msgpack.org/","size":4556,"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":"msgpack:master","ref":"master","sha":"29266b024ec82c281fa63bf2b73622088a8c188c","user":{"login":"msgpack","id":198264,"avatar_url":"https://avatars.githubusercontent.com/u/198264?v=3","gravatar_id":"","url":"https://api.github.com/users/msgpack","html_url":"https://github.com/msgpack","followers_url":"https://api.github.com/users/msgpack/followers","following_url":"https://api.github.com/users/msgpack/following{/other_user}","gists_url":"https://api.github.com/users/msgpack/gists{/gist_id}","starred_url":"https://api.github.com/users/msgpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msgpack/subscriptions","organizations_url":"https://api.github.com/users/msgpack/orgs","repos_url":"https://api.github.com/users/msgpack/repos","events_url":"https://api.github.com/users/msgpack/events{/privacy}","received_events_url":"https://api.github.com/users/msgpack/received_events","type":"Organization","site_admin":false},"repo":{"id":2242705,"name":"msgpack-python","full_name":"msgpack/msgpack-python","owner":{"login":"msgpack","id":198264,"avatar_url":"https://avatars.githubusercontent.com/u/198264?v=3","gravatar_id":"","url":"https://api.github.com/users/msgpack","html_url":"https://github.com/msgpack","followers_url":"https://api.github.com/users/msgpack/followers","following_url":"https://api.github.com/users/msgpack/following{/other_user}","gists_url":"https://api.github.com/users/msgpack/gists{/gist_id}","starred_url":"https://api.github.com/users/msgpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msgpack/subscriptions","organizations_url":"https://api.github.com/users/msgpack/orgs","repos_url":"https://api.github.com/users/msgpack/repos","events_url":"https://api.github.com/users/msgpack/events{/privacy}","received_events_url":"https://api.github.com/users/msgpack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/msgpack/msgpack-python","description":"MessagePack serializer implementation for Python msgpack.org[Python]","fork":false,"url":"https://api.github.com/repos/msgpack/msgpack-python","forks_url":"https://api.github.com/repos/msgpack/msgpack-python/forks","keys_url":"https://api.github.com/repos/msgpack/msgpack-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/msgpack/msgpack-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/msgpack/msgpack-python/teams","hooks_url":"https://api.github.com/repos/msgpack/msgpack-python/hooks","issue_events_url":"https://api.github.com/repos/msgpack/msgpack-python/issues/events{/number}","events_url":"https://api.github.com/repos/msgpack/msgpack-python/events","assignees_url":"https://api.github.com/repos/msgpack/msgpack-python/assignees{/user}","branches_url":"https://api.github.com/repos/msgpack/msgpack-python/branches{/branch}","tags_url":"https://api.github.com/repos/msgpack/msgpack-python/tags","blobs_url":"https://api.github.com/repos/msgpack/msgpack-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/msgpack/msgpack-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/msgpack/msgpack-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/msgpack/msgpack-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/msgpack/msgpack-python/statuses/{sha}","languages_url":"https://api.github.com/repos/msgpack/msgpack-python/languages","stargazers_url":"https://api.github.com/repos/msgpack/msgpack-python/stargazers","contributors_url":"https://api.github.com/repos/msgpack/msgpack-python/contributors","subscribers_url":"https://api.github.com/repos/msgpack/msgpack-python/subscribers","subscription_url":"https://api.github.com/repos/msgpack/msgpack-python/subscription","commits_url":"https://api.github.com/repos/msgpack/msgpack-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/msgpack/msgpack-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/msgpack/msgpack-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/msgpack/msgpack-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/msgpack/msgpack-python/contents/{+path}","compare_url":"https://api.github.com/repos/msgpack/msgpack-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/msgpack/msgpack-python/merges","archive_url":"https://api.github.com/repos/msgpack/msgpack-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/msgpack/msgpack-python/downloads","issues_url":"https://api.github.com/repos/msgpack/msgpack-python/issues{/number}","pulls_url":"https://api.github.com/repos/msgpack/msgpack-python/pulls{/number}","milestones_url":"https://api.github.com/repos/msgpack/msgpack-python/milestones{/number}","notifications_url":"https://api.github.com/repos/msgpack/msgpack-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/msgpack/msgpack-python/labels{/name}","releases_url":"https://api.github.com/repos/msgpack/msgpack-python/releases{/id}","created_at":"2011-08-21T08:24:41Z","updated_at":"2015-11-17T15:47:00Z","pushed_at":"2015-11-17T15:08:25Z","git_url":"git://github.com/msgpack/msgpack-python.git","ssh_url":"git@github.com:msgpack/msgpack-python.git","clone_url":"https://github.com/msgpack/msgpack-python.git","svn_url":"https://github.com/msgpack/msgpack-python","homepage":"http://msgpack.org/","size":4556,"stargazers_count":514,"watchers_count":514,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"open_issues_count":20,"forks":83,"open_issues":20,"watchers":514,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/msgpack/msgpack-python/pulls/161"},"html":{"href":"https://github.com/msgpack/msgpack-python/pull/161"},"issue":{"href":"https://api.github.com/repos/msgpack/msgpack-python/issues/161"},"comments":{"href":"https://api.github.com/repos/msgpack/msgpack-python/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/msgpack/msgpack-python/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/msgpack/msgpack-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/msgpack/msgpack-python/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/msgpack/msgpack-python/statuses/ac8d638e78a0494e1dc78b89dd227447d6ffdf0c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":12,"deletions":0,"changed_files":1}}