{"action":"created","issue":{"url":"https://api.github.com/repos/zopefoundation/ZODB/issues/133","repository_url":"https://api.github.com/repos/zopefoundation/ZODB","labels_url":"https://api.github.com/repos/zopefoundation/ZODB/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/zopefoundation/ZODB/issues/133/comments","events_url":"https://api.github.com/repos/zopefoundation/ZODB/issues/133/events","html_url":"https://github.com/zopefoundation/ZODB/issues/133","id":191713104,"number":133,"title":"ZODB4 incompatibility with transaction 2.0.3 on python2","user":{"login":"sblondon","id":1708780,"avatar_url":"https://avatars.githubusercontent.com/u/1708780?v=3","gravatar_id":"","url":"https://api.github.com/users/sblondon","html_url":"https://github.com/sblondon","followers_url":"https://api.github.com/users/sblondon/followers","following_url":"https://api.github.com/users/sblondon/following{/other_user}","gists_url":"https://api.github.com/users/sblondon/gists{/gist_id}","starred_url":"https://api.github.com/users/sblondon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sblondon/subscriptions","organizations_url":"https://api.github.com/users/sblondon/orgs","repos_url":"https://api.github.com/users/sblondon/repos","events_url":"https://api.github.com/users/sblondon/events{/privacy}","received_events_url":"https://api.github.com/users/sblondon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-25T14:29:28Z","updated_at":"2016-11-25T16:06:36Z","closed_at":null,"body":"The error occurs on python2 only (works with python3).\r\n\r\nWith transaction v.2.0.3, the database description fields must now be set with unicode. The code provides the byte string, not unicode:\r\nZODB.DB.py, line 455: t.description = 'initial database creation'\r\n\r\n\r\nHow to reproduce\r\n----------------------\r\n```\r\n$ virtualenv -p python2 venv\r\n$ ./venv/bin/pip install zodb==4.4.3\r\n$ ./venv/bin/python\r\nPython 2.7.3 (default, Jun 22 2015, 19:33:41) \r\n[GCC 4.6.3] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import ZODB\r\n>>> ZODB.DB(None)\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/home/stephane/src/demo_bug_yzodb/venv/local/lib/python2.7/site-packages/ZODB/DB.py\", line 455, in __init__\r\n    t.description = 'initial database creation'\r\n  File \"/home/stephane/src/demo_bug_yzodb/venv/local/lib/python2.7/site-packages/transaction/_transaction.py\", line 149, in description\r\n    raise TypeError(\"Description must be text (unicode)\")\r\nTypeError: Description must be text (unicode)\r\n```\r\n\r\nHow to fix\r\n----------\r\n\r\nZODB.DB.py, line 455: \r\n```\r\n--- DB.orig.py\t2016-11-25 15:26:06.303698887 +0100\r\n+++ DB.py\t2016-11-25 15:26:20.603572351 +0100\r\n@@ -452,7 +452,7 @@\r\n                 p.dump((root.__class__, None))\r\n                 p.dump(root.__getstate__())\r\n                 t = transaction.Transaction()\r\n-                t.description = 'initial database creation'\r\n+                t.description = u'initial database creation'\r\n                 temp_storage.tpc_begin(t)\r\n                 temp_storage.store(z64, None, file.getvalue(), '', t)\r\n                 temp_storage.tpc_vote(t)\r\n```\r\n\r\n\r\nI can do a pull/request if you want.\r\nI didn't check if the fix is relevant for other branches of ZODB.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zopefoundation/ZODB/issues/comments/262987738","html_url":"https://github.com/zopefoundation/ZODB/issues/133#issuecomment-262987738","issue_url":"https://api.github.com/repos/zopefoundation/ZODB/issues/133","id":262987738,"user":{"login":"jimfulton","id":772727,"avatar_url":"https://avatars.githubusercontent.com/u/772727?v=3","gravatar_id":"","url":"https://api.github.com/users/jimfulton","html_url":"https://github.com/jimfulton","followers_url":"https://api.github.com/users/jimfulton/followers","following_url":"https://api.github.com/users/jimfulton/following{/other_user}","gists_url":"https://api.github.com/users/jimfulton/gists{/gist_id}","starred_url":"https://api.github.com/users/jimfulton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimfulton/subscriptions","organizations_url":"https://api.github.com/users/jimfulton/orgs","repos_url":"https://api.github.com/users/jimfulton/repos","events_url":"https://api.github.com/users/jimfulton/events{/privacy}","received_events_url":"https://api.github.com/users/jimfulton/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T16:06:36Z","updated_at":"2016-11-25T16:06:36Z","body":"Oops, I forgot to update ZODB 4. I'm working on that now.\r\n\r\nThe change above is one of many needed (because tests).\r\n"}}
{"actor":{"display_login":"jimfulton"}}