git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-p4, and python2 EOL
@ 2019-08-28  8:49 Luke Diamand
  2019-08-29  4:34 ` Andrey
  0 siblings, 1 reply; 2+ messages in thread
From: Luke Diamand @ 2019-08-28  8:49 UTC (permalink / raw)
  To: Git Users; +Cc: Andrey Mazo, Junio C Hamano, Peter Osterlund, Andrey, cclauss

We're coming up on when Python2 is end-of-lifed - we have until
January 1st 2020.

git-p4 uses python2, and doesn't work under python3 at all.

The problem is the conversions between Python3 unicode strings and git
(utf-8) and p4 (utf-8, except when it isn't).

I had a go at fixing this here:

https://github.com/luked99/git/commits/git-p4-python3-final-showdown

You can see from the comments that I wasn't really finding it straightforward.

I think I know a bit more about the problem now, but before I start
having another go at fixing this, I wondered if anyone else had any
thoughts on this, or even better, some time to spend on this.

Thanks
Luke

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git-p4, and python2 EOL
  2019-08-28  8:49 git-p4, and python2 EOL Luke Diamand
@ 2019-08-29  4:34 ` Andrey
  0 siblings, 0 replies; 2+ messages in thread
From: Andrey @ 2019-08-29  4:34 UTC (permalink / raw)
  To: Luke Diamand, Git Users
  Cc: Andrey Mazo, Junio C Hamano, Peter Osterlund, cclauss@me.com

Luke,

28.08.2019, 04:49, "Luke Diamand" <luke@diamand.org>:
> We're coming up on when Python2 is end-of-lifed - we have until
> January 1st 2020.
>
> git-p4 uses python2, and doesn't work under python3 at all.
>
> The problem is the conversions between Python3 unicode strings and git
> (utf-8) and p4 (utf-8, except when it isn't).
>
> I had a go at fixing this here:
>
> https://github.com/luked99/git/commits/git-p4-python3-final-showdown
>
> You can see from the comments that I wasn't really finding it straightforward.
>
> I think I know a bit more about the problem now, but before I start
> having another go at fixing this, I wondered if anyone else had any
> thoughts on this, or even better, some time to spend on this.

Please, find a few random thoughts below.
  1. As far as I can see, git-p4 tried to maintain compatibility with both python2 and python3.
     Since python2 is approaching it's EOL, would it make sense to drop support for it in git-p4 completely?
     This would simplify the implementation and wouldn't require fancy objects like PolyStringDict.
     Many projects [2] plan to drop python 2.7 support in 2020 or earlier.
     There are, of course, enterprise distros (RHEL, CentOS), which will keep supporting python2 for several years more.
     As far as I can see, python3 doesn't come by default with CentOS 7, which ends its support in 2024.
     However, RHEL/CentOS ships its own (old) version of git, and python3.6 is available through EPEL repository.
  2. Someone tried to use git-p4 with python3 and a bare repository [1] recently, unsuccessfully.
     A few my stupid attempts to patch git-p4 didn't help.
  3. I no longer work with git-p4 daily, neither have a real P4 repository to test on,
     so I can't really test anything beyond unit tests.
     I'll be glad to review any changes though.

[1] https://public-inbox.org/git/34d6121da46f35e4b81d38169b1b86ca123cef37.camel@gmx.net/
[2] https://python3statement.org/

Thank you,
Andrey.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-29  4:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28  8:49 git-p4, and python2 EOL Luke Diamand
2019-08-29  4:34 ` Andrey

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).