git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Yang Zhao <yang.zhao@skyboxlabs.com>
Subject: Re: [PATCH] doc: mention Python 3.x supports
Date: Wed, 16 Dec 2020 00:38:45 +0700	[thread overview]
Message-ID: <X9j0pf1lQQHZifvw@danh.dev> (raw)
In-Reply-To: <xmqq4kkoat8v.fsf@gitster.c.googlers.com>

On 2020-12-14 15:00:00-0800, Junio C Hamano <gitster@pobox.com> wrote:

Sorry, I didn't receive this email, I found your reply when looking
into public-inbox's archive. (I guess it's because of Google global
outage).

> Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:
> 
> > Commit 0b4396f068, (git-p4: make python2.7 the oldest supported version,
> > 2019-12-13) pointed out that git-p4 uses Python 2.7-or-later features
> > in the code.
> >
> > In addition, git-p4 gained enough support for Python 3 from
> > 6cec21a82f, (git-p4: encode/decode communication with p4 for
> > python3, 2019-12-13).
> 
> I am not a Perforce user, so with that in mind, please help me make
> sure I understand the situation well.  The statement "not 3.x, which
> is not supported by Perforce" is from early 2013, and 6cec21a82f
> talks about the format of marshalled dict object that comes out of
> p4 (Perforce) tool that needs to be read in a certain way to be
> compatible with Python3.  Does that mean sometime in these 6 years,
> Perforce started supporting 3.x?

AFAIK, p4 is an executable binary (in the sense of ELF binaries) from
forever. And its {in,out}put is in arbitrary encoding, while Python 3
expects UCS-2 or UCS-4 encoding. 6cec21a82f adds code to decode to
Python 3 string to overcome this limitation.

Not related, but Perforce's official Python bindings supports Python 3
from at least 2013 [p4r13]. And they still maintain in [PyPI].
That binding requires compiling with Python Development files, though.

Anyway, I added Yang Zhao to Cc to clarify.

@Yang: Would you please verify what I've said?

> The change to INSTALL just drops the mention of 3.x; do we want to
> specifically say that any version of 3.x is OK, or is it generally
> accepted that Python 3.x is "later" than "Python 2.7"?

I think it's generally accepted since there're no Python 2.x version
that is "later" than Python 2.7.
I haven't check the whole git-p4 but in general, a lot of Python script
said support 2.7 AND 3.y with y is a specific number,
since some scripts can work with 2.7 and e.g. 3.4+ but not 3.3.
I can add them into "INSTALL" if it looks better.

p4r13: https://www.perforce.com/perforce/r13.1/manuals/p4script/03_python.html
PyPI: https://pypi.org/project/p4python/

-- 
Danh

  reply	other threads:[~2020-12-15 17:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-10 14:30 [PATCH] doc: mention Python 3.x supports Đoàn Trần Công Danh
2020-12-14 23:00 ` Junio C Hamano
2020-12-15 17:38   ` Đoàn Trần Công Danh [this message]
2020-12-15 17:54     ` Yang Zhao
2020-12-15 21:06       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X9j0pf1lQQHZifvw@danh.dev \
    --to=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=yang.zhao@skyboxlabs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).