{"action":"created","comment":{"url":"https://api.github.com/repos/douban/libmc/pulls/comments/66751288","id":66751288,"diff_hunk":"@@ -658,50 +678,48 @@ cdef class PyClient:\n         cdef bytes enc_val = _encode_value(val, self.comp_threshold, &flags)\n         return self._store_raw(REPLACE_OP, key2, flags, time, enc_val, DEFAULT_CAS_UNIQUE)\n \n-    def prepend(self, basestring key, object val, compress=False):\n+    def prepend(self, basestring key, bytes val, compress=False):\n         self._record_thread_ident()\n         self._check_thread_ident()\n         cdef bytes key2 = self.normalize_key(key)\n-        cdef flags_t flags\n         comp_threshold = self.comp_threshold if compress else 0","path":"libmc/_client.pyx","position":230,"original_position":230,"commit_id":"e5d82b5b15f4b8493eb95c8753a17599e5609c05","original_commit_id":"e5d82b5b15f4b8493eb95c8753a17599e5609c05","user":{"login":"pypeng","id":22340,"avatar_url":"https://avatars.githubusercontent.com/u/22340?v=3","gravatar_id":"","url":"https://api.github.com/users/pypeng","html_url":"https://github.com/pypeng","followers_url":"https://api.github.com/users/pypeng/followers","following_url":"https://api.github.com/users/pypeng/following{/other_user}","gists_url":"https://api.github.com/users/pypeng/gists{/gist_id}","starred_url":"https://api.github.com/users/pypeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypeng/subscriptions","organizations_url":"https://api.github.com/users/pypeng/orgs","repos_url":"https://api.github.com/users/pypeng/repos","events_url":"https://api.github.com/users/pypeng/events{/privacy}","received_events_url":"https://api.github.com/users/pypeng/received_events","type":"User","site_admin":false},"body":"prepend/append 都不应该支持别的方式，如果走了str，那么内部会做pickle，再get的时候就拿不回来了。既然是prepend/append, 那么调用方应该知道自己往里塞的数据是什么，也会期待塞进去的数据和mc里保存的数据是一致的。\r\n\r\n之前只所以没问题，是因为python2里str是不做pickle的，直接就放进去了，但python3后就不行了。","created_at":"2016-06-13T07:50:55Z","updated_at":"2016-06-13T07:50:55Z","html_url":"https://github.com/douban/libmc/pull/41#discussion_r66751288","pull_request_url":"https://api.github.com/repos/douban/libmc/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/douban/libmc/pulls/comments/66751288"},"html":{"href":"https://github.com/douban/libmc/pull/41#discussion_r66751288"},"pull_request":{"href":"https://api.github.com/repos/douban/libmc/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/douban/libmc/pulls/41","id":73013485,"html_url":"https://github.com/douban/libmc/pull/41","diff_url":"https://github.com/douban/libmc/pull/41.diff","patch_url":"https://github.com/douban/libmc/pull/41.patch","issue_url":"https://api.github.com/repos/douban/libmc/issues/41","number":41,"state":"open","locked":false,"title":"Support Python 3.5","user":{"login":"pypeng","id":22340,"avatar_url":"https://avatars.githubusercontent.com/u/22340?v=3","gravatar_id":"","url":"https://api.github.com/users/pypeng","html_url":"https://github.com/pypeng","followers_url":"https://api.github.com/users/pypeng/followers","following_url":"https://api.github.com/users/pypeng/following{/other_user}","gists_url":"https://api.github.com/users/pypeng/gists{/gist_id}","starred_url":"https://api.github.com/users/pypeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypeng/subscriptions","organizations_url":"https://api.github.com/users/pypeng/orgs","repos_url":"https://api.github.com/users/pypeng/repos","events_url":"https://api.github.com/users/pypeng/events{/privacy}","received_events_url":"https://api.github.com/users/pypeng/received_events","type":"User","site_admin":false},"body":"1. Add encoding as an option for client\r\n2. Prepend/append only allow bytes value\r\n3. Internal xxx_raw accept bytes key/value","created_at":"2016-06-08T09:28:29Z","updated_at":"2016-06-13T07:50:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48a0f27de4f8bdd4f8360daafef367aa7d06c604","assignee":{"login":"youngsofun","id":5782159,"avatar_url":"https://avatars.githubusercontent.com/u/5782159?v=3","gravatar_id":"","url":"https://api.github.com/users/youngsofun","html_url":"https://github.com/youngsofun","followers_url":"https://api.github.com/users/youngsofun/followers","following_url":"https://api.github.com/users/youngsofun/following{/other_user}","gists_url":"https://api.github.com/users/youngsofun/gists{/gist_id}","starred_url":"https://api.github.com/users/youngsofun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youngsofun/subscriptions","organizations_url":"https://api.github.com/users/youngsofun/orgs","repos_url":"https://api.github.com/users/youngsofun/repos","events_url":"https://api.github.com/users/youngsofun/events{/privacy}","received_events_url":"https://api.github.com/users/youngsofun/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/douban/libmc/pulls/41/commits","review_comments_url":"https://api.github.com/repos/douban/libmc/pulls/41/comments","review_comment_url":"https://api.github.com/repos/douban/libmc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/douban/libmc/issues/41/comments","statuses_url":"https://api.github.com/repos/douban/libmc/statuses/e5d82b5b15f4b8493eb95c8753a17599e5609c05","head":{"label":"pypeng:py3k","ref":"py3k","sha":"e5d82b5b15f4b8493eb95c8753a17599e5609c05","user":{"login":"pypeng","id":22340,"avatar_url":"https://avatars.githubusercontent.com/u/22340?v=3","gravatar_id":"","url":"https://api.github.com/users/pypeng","html_url":"https://github.com/pypeng","followers_url":"https://api.github.com/users/pypeng/followers","following_url":"https://api.github.com/users/pypeng/following{/other_user}","gists_url":"https://api.github.com/users/pypeng/gists{/gist_id}","starred_url":"https://api.github.com/users/pypeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypeng/subscriptions","organizations_url":"https://api.github.com/users/pypeng/orgs","repos_url":"https://api.github.com/users/pypeng/repos","events_url":"https://api.github.com/users/pypeng/events{/privacy}","received_events_url":"https://api.github.com/users/pypeng/received_events","type":"User","site_admin":false},"repo":{"id":60685248,"name":"libmc","full_name":"pypeng/libmc","owner":{"login":"pypeng","id":22340,"avatar_url":"https://avatars.githubusercontent.com/u/22340?v=3","gravatar_id":"","url":"https://api.github.com/users/pypeng","html_url":"https://github.com/pypeng","followers_url":"https://api.github.com/users/pypeng/followers","following_url":"https://api.github.com/users/pypeng/following{/other_user}","gists_url":"https://api.github.com/users/pypeng/gists{/gist_id}","starred_url":"https://api.github.com/users/pypeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypeng/subscriptions","organizations_url":"https://api.github.com/users/pypeng/orgs","repos_url":"https://api.github.com/users/pypeng/repos","events_url":"https://api.github.com/users/pypeng/events{/privacy}","received_events_url":"https://api.github.com/users/pypeng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pypeng/libmc","description":"Fast and light-weight memcached client for C++ / #python / #golang #libmc","fork":true,"url":"https://api.github.com/repos/pypeng/libmc","forks_url":"https://api.github.com/repos/pypeng/libmc/forks","keys_url":"https://api.github.com/repos/pypeng/libmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pypeng/libmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pypeng/libmc/teams","hooks_url":"https://api.github.com/repos/pypeng/libmc/hooks","issue_events_url":"https://api.github.com/repos/pypeng/libmc/issues/events{/number}","events_url":"https://api.github.com/repos/pypeng/libmc/events","assignees_url":"https://api.github.com/repos/pypeng/libmc/assignees{/user}","branches_url":"https://api.github.com/repos/pypeng/libmc/branches{/branch}","tags_url":"https://api.github.com/repos/pypeng/libmc/tags","blobs_url":"https://api.github.com/repos/pypeng/libmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pypeng/libmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pypeng/libmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/pypeng/libmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pypeng/libmc/statuses/{sha}","languages_url":"https://api.github.com/repos/pypeng/libmc/languages","stargazers_url":"https://api.github.com/repos/pypeng/libmc/stargazers","contributors_url":"https://api.github.com/repos/pypeng/libmc/contributors","subscribers_url":"https://api.github.com/repos/pypeng/libmc/subscribers","subscription_url":"https://api.github.com/repos/pypeng/libmc/subscription","commits_url":"https://api.github.com/repos/pypeng/libmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/pypeng/libmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/pypeng/libmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/pypeng/libmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/pypeng/libmc/contents/{+path}","compare_url":"https://api.github.com/repos/pypeng/libmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pypeng/libmc/merges","archive_url":"https://api.github.com/repos/pypeng/libmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pypeng/libmc/downloads","issues_url":"https://api.github.com/repos/pypeng/libmc/issues{/number}","pulls_url":"https://api.github.com/repos/pypeng/libmc/pulls{/number}","milestones_url":"https://api.github.com/repos/pypeng/libmc/milestones{/number}","notifications_url":"https://api.github.com/repos/pypeng/libmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pypeng/libmc/labels{/name}","releases_url":"https://api.github.com/repos/pypeng/libmc/releases{/id}","deployments_url":"https://api.github.com/repos/pypeng/libmc/deployments","created_at":"2016-06-08T09:18:05Z","updated_at":"2016-06-08T09:18:06Z","pushed_at":"2016-06-13T02:45:29Z","git_url":"git://github.com/pypeng/libmc.git","ssh_url":"git@github.com:pypeng/libmc.git","clone_url":"https://github.com/pypeng/libmc.git","svn_url":"https://github.com/pypeng/libmc","homepage":"https://pypi.python.org/pypi/libmc/","size":416,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"douban:master","ref":"master","sha":"54b445e06a6321cf823d6e3c5c36f31dec1cf440","user":{"login":"douban","id":1220164,"avatar_url":"https://avatars.githubusercontent.com/u/1220164?v=3","gravatar_id":"","url":"https://api.github.com/users/douban","html_url":"https://github.com/douban","followers_url":"https://api.github.com/users/douban/followers","following_url":"https://api.github.com/users/douban/following{/other_user}","gists_url":"https://api.github.com/users/douban/gists{/gist_id}","starred_url":"https://api.github.com/users/douban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douban/subscriptions","organizations_url":"https://api.github.com/users/douban/orgs","repos_url":"https://api.github.com/users/douban/repos","events_url":"https://api.github.com/users/douban/events{/privacy}","received_events_url":"https://api.github.com/users/douban/received_events","type":"Organization","site_admin":false},"repo":{"id":33291534,"name":"libmc","full_name":"douban/libmc","owner":{"login":"douban","id":1220164,"avatar_url":"https://avatars.githubusercontent.com/u/1220164?v=3","gravatar_id":"","url":"https://api.github.com/users/douban","html_url":"https://github.com/douban","followers_url":"https://api.github.com/users/douban/followers","following_url":"https://api.github.com/users/douban/following{/other_user}","gists_url":"https://api.github.com/users/douban/gists{/gist_id}","starred_url":"https://api.github.com/users/douban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douban/subscriptions","organizations_url":"https://api.github.com/users/douban/orgs","repos_url":"https://api.github.com/users/douban/repos","events_url":"https://api.github.com/users/douban/events{/privacy}","received_events_url":"https://api.github.com/users/douban/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/douban/libmc","description":"Fast and light-weight memcached client for C++ / #python / #golang #libmc","fork":false,"url":"https://api.github.com/repos/douban/libmc","forks_url":"https://api.github.com/repos/douban/libmc/forks","keys_url":"https://api.github.com/repos/douban/libmc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/douban/libmc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/douban/libmc/teams","hooks_url":"https://api.github.com/repos/douban/libmc/hooks","issue_events_url":"https://api.github.com/repos/douban/libmc/issues/events{/number}","events_url":"https://api.github.com/repos/douban/libmc/events","assignees_url":"https://api.github.com/repos/douban/libmc/assignees{/user}","branches_url":"https://api.github.com/repos/douban/libmc/branches{/branch}","tags_url":"https://api.github.com/repos/douban/libmc/tags","blobs_url":"https://api.github.com/repos/douban/libmc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/douban/libmc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/douban/libmc/git/refs{/sha}","trees_url":"https://api.github.com/repos/douban/libmc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/douban/libmc/statuses/{sha}","languages_url":"https://api.github.com/repos/douban/libmc/languages","stargazers_url":"https://api.github.com/repos/douban/libmc/stargazers","contributors_url":"https://api.github.com/repos/douban/libmc/contributors","subscribers_url":"https://api.github.com/repos/douban/libmc/subscribers","subscription_url":"https://api.github.com/repos/douban/libmc/subscription","commits_url":"https://api.github.com/repos/douban/libmc/commits{/sha}","git_commits_url":"https://api.github.com/repos/douban/libmc/git/commits{/sha}","comments_url":"https://api.github.com/repos/douban/libmc/comments{/number}","issue_comment_url":"https://api.github.com/repos/douban/libmc/issues/comments{/number}","contents_url":"https://api.github.com/repos/douban/libmc/contents/{+path}","compare_url":"https://api.github.com/repos/douban/libmc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/douban/libmc/merges","archive_url":"https://api.github.com/repos/douban/libmc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/douban/libmc/downloads","issues_url":"https://api.github.com/repos/douban/libmc/issues{/number}","pulls_url":"https://api.github.com/repos/douban/libmc/pulls{/number}","milestones_url":"https://api.github.com/repos/douban/libmc/milestones{/number}","notifications_url":"https://api.github.com/repos/douban/libmc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/douban/libmc/labels{/name}","releases_url":"https://api.github.com/repos/douban/libmc/releases{/id}","deployments_url":"https://api.github.com/repos/douban/libmc/deployments","created_at":"2015-04-02T05:45:00Z","updated_at":"2016-06-12T03:43:13Z","pushed_at":"2016-06-13T02:45:29Z","git_url":"git://github.com/douban/libmc.git","ssh_url":"git@github.com:douban/libmc.git","clone_url":"https://github.com/douban/libmc.git","svn_url":"https://github.com/douban/libmc","homepage":"https://pypi.python.org/pypi/libmc/","size":426,"stargazers_count":330,"watchers_count":330,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":1,"forks":49,"open_issues":1,"watchers":330,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/douban/libmc/pulls/41"},"html":{"href":"https://github.com/douban/libmc/pull/41"},"issue":{"href":"https://api.github.com/repos/douban/libmc/issues/41"},"comments":{"href":"https://api.github.com/repos/douban/libmc/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/douban/libmc/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/douban/libmc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/douban/libmc/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/douban/libmc/statuses/e5d82b5b15f4b8493eb95c8753a17599e5609c05"}}}}
{"actor":{"display_login":"pypeng"}}