{"thread":{"id":"51765","subject":"git-p4, and python2 EOL","startedAt":"2019-08-28T08:49:14Z","lastAt":"2019-08-29T04:34:43Z","messageCount":2,"participants":["Luke Diamand","Andrey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"381423","messageId":"CAE5ih79dF7LJSp=hUgj_r2XUmWKYnU3XgSReSjOetG8Sek599A@mail.gmail.com","threadId":"51765","inReplyTo":null,"subject":"git-p4, and python2 EOL","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2019-08-28T08:49:00Z","receivedAt":"2019-08-28T08:49:14Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"We're coming up on when Python2 is end-of-lifed - we have until\nJanuary 1st 2020.\n\ngit-p4 uses python2, and doesn't work under python3 at all.\n\nThe problem is the conversions between Python3 unicode strings and git\n(utf-8) and p4 (utf-8, except when it isn't).\n\nI had a go at fixing this here:\n\nhttps://github.com/luked99/git/commits/git-p4-python3-final-showdown\n\nYou can see from the comments that I wasn't really finding it straightforward.\n\nI think I know a bit more about the problem now, but before I start\nhaving another go at fixing this, I wondered if anyone else had any\nthoughts on this, or even better, some time to spend on this.\n\nThanks\nLuke\n"},{"id":"381496","messageId":"44585511567053276@sas2-3b71b6ddd4dd.qloud-c.yandex.net","threadId":"51765","inReplyTo":"CAE5ih79dF7LJSp=hUgj_r2XUmWKYnU3XgSReSjOetG8Sek599A@mail.gmail.com","subject":"Re: git-p4, and python2 EOL","fromName":"Andrey","fromEmail":"ahippo@yandex.ru","sentAt":"2019-08-29T04:34:36Z","receivedAt":"2019-08-29T04:34:43Z","isPatch":false,"sender":{"key":"ahippo@yandex.ru","avatar":null},"body":"Luke,\n\n28.08.2019, 04:49, \"Luke Diamand\" <luke@diamand.org>:\n> We're coming up on when Python2 is end-of-lifed - we have until\n> January 1st 2020.\n>\n> git-p4 uses python2, and doesn't work under python3 at all.\n>\n> The problem is the conversions between Python3 unicode strings and git\n> (utf-8) and p4 (utf-8, except when it isn't).\n>\n> I had a go at fixing this here:\n>\n> https://github.com/luked99/git/commits/git-p4-python3-final-showdown\n>\n> You can see from the comments that I wasn't really finding it straightforward.\n>\n> I think I know a bit more about the problem now, but before I start\n> having another go at fixing this, I wondered if anyone else had any\n> thoughts on this, or even better, some time to spend on this.\n\nPlease, find a few random thoughts below.\n  1. As far as I can see, git-p4 tried to maintain compatibility with both python2 and python3.\n     Since python2 is approaching it's EOL, would it make sense to drop support for it in git-p4 completely?\n     This would simplify the implementation and wouldn't require fancy objects like PolyStringDict.\n     Many projects [2] plan to drop python 2.7 support in 2020 or earlier.\n     There are, of course, enterprise distros (RHEL, CentOS), which will keep supporting python2 for several years more.\n     As far as I can see, python3 doesn't come by default with CentOS 7, which ends its support in 2024.\n     However, RHEL/CentOS ships its own (old) version of git, and python3.6 is available through EPEL repository.\n  2. Someone tried to use git-p4 with python3 and a bare repository [1] recently, unsuccessfully.\n     A few my stupid attempts to patch git-p4 didn't help.\n  3. I no longer work with git-p4 daily, neither have a real P4 repository to test on,\n     so I can't really test anything beyond unit tests.\n     I'll be glad to review any changes though.\n\n[1] https://public-inbox.org/git/34d6121da46f35e4b81d38169b1b86ca123cef37.camel@gmx.net/\n[2] https://python3statement.org/\n\nThank you,\nAndrey.\n\n"}]}