X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3BE74398E453
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1614847560;
	bh=Gj+6CKkCZBxxDifj0k2tfCu6OcJ/7GKGmt00b6MSiJI=;
	h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
	 List-Help:List-Subscribe:From:Reply-To:From;
	b=kTDr+j3YUlT/Ydi4WgNtnDIiNfAX/G2jkjwA/dGEAUiairDnJZnxsmo9QPLxatTaU
	 1Hab+2IXFtwlTcjHytjZ79XKar9j6uA/wU/yYz5FzsfxmYHD4C4ruvyDMkZagFePSV
	 uSbPPSpbyEog6oz6LGGFQE+RnAURj+SE0085rJmg=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 40CD23842411
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=oEyyuN252Hl+Z8SZH+WE0u8ebHTOe/YHdHQmGHyy78c=;
 b=c9+z1qdGDMKcsadMcZYGJg/Y2Kyl/Ud0d7Z1kt8Dh0lwfAx3DsaG2tbkgp7aSsms9E
 WBb+e1McH5e9513dIB8jSZlkmcb6lnHFfkvibAxhIkwM16vUfTYPG1L3o5juSTZWY6P/
 MIRaibRdC6nz8djKshrM1Qlbnj0rS4DwPrk/X1boemOueEj1KwEia4XSYEdYsRYi2n+q
 4COF5k8Ey9i0l7syEV5dHxo9mT0q2F8zgmZnPeFB01ocVMkjYlAhIX0oxL/PuXUNbcyo
 6uct5oaWsPEH92DsT7o/eiarv7Lr9U2oj4bZZWmYtkxEQOX+y2/Axh0yEqGHtdCtSUQA
 L3xg==
X-Gm-Message-State: AOAM533fkArXDajVY+JT6+jWFs3J4/LIYaNZW9eBH4abiwUV3HLtG6xm
 5ZcY9ZPkG1JMo2g8oWQ60DtQa6bWUG+/JPD4CjJKbwBDB+U=
X-Google-Smtp-Source: ABdhPJztVwcWe9WplIv4aMZuPl9cjnCGUxrD2wH4PJBfCXPS32JvPzpUyZxyGQz1VRdPlOmSJgQDdm+bV/Cj1GQV9PY=
X-Received: by 2002:a9d:709a:: with SMTP id l26mr2686940otj.178.1614847555251; 
 Thu, 04 Mar 2021 00:45:55 -0800 (PST)
MIME-Version: 1.0
Date: Thu, 4 Mar 2021 00:45:40 -0800
Message-ID: <CANV2+nVF4QyWL1LVkD38=u4gJVqFN_GpC6y965TQuoscxH=0SQ@mail.gmail.com>
Subject: Cygwin now on Python 3? What about Mercurial?
To: cygwin@cygwin.com
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE,
 RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
 TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Russell VT via Cygwin <cygwin@cygwin.com>
Reply-To: Russell VT <russellvt@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

Cygwin Enthusiasts!

Well, I was going to hold back on this one, but having now watched the list
for a bit, I think this is a fair question (feel free to smack me if I'm
feeling too entitled, albeit maybe a bit on the rambling side).

TLDR; Cygwin 64 Mercurial (5.5.1) blows chunks with default Python install.
I'm still not sure if this is a package dependency error, given the recent
Python 2.7 Deprecation "worldwide," or the way that Mercurial is packaged,
or even if the package installation order on-down the line screwed me up at
some point in the past.

TLDR2; Am I really the "only" one on Cygwin still using Mercurial in a
Complex Python Environment?

Here;s my primary operating environment, devoid of whatever tricks I may
try to play with Python Development environments (read: Path to /usr/bin
with no funny stuff getting in the way)
.

Cygwin: CYGWIN_NT-10.0 3.17(0.340/5/3) 2020-08-22 17:48 x86_64
Python: 3.8.7
Python2: 2.7.18
Python3: 3.8.7

$ ls -1 /usr/bin/python[0-9\.]*

/usr/bin/python2@

/usr/bin/python2.7.exe*

/usr/bin/python3@

/usr/bin/python3-config@

/usr/bin/python3.5@

/usr/bin/python3.5m.exe*

/usr/bin/python3.6@

/usr/bin/python3.6-config@

/usr/bin/python3.6m-config*

/usr/bin/python3.6m.exe*

/usr/bin/python3.7@

/usr/bin/python3.7m.exe*

/usr/bin/python3.8-config*

/usr/bin/python3.8.exe*



Now, running mercurial (hg) with no real options, trying to let python just
use the meta version (3.8.7), and it starts to break with JSONDecoder
issues.

ImportError: cannot import name 'JSONDecodeError'

Of course, Mercurial is also *evil*, and embeds annoying pieces of code,
like the following...
 (pretty much making my "fix" necessary - potentially intentional, to make
people fix their mercurial package prior to the end of the year, as well)

    >> libdir = '../lib/python2.7/site-packages'

...and REALLY hates pylint/pyflakes (in case your vim editor hates-on your
non PEP-8 code as much as mine is set to do.

So, with all that in-mind, here is whatt I summarize:

*Fixes and Workarounds:*
Update /etc/alternatives to point at Python2 (Bad Idea! No no no!)
Update Mercurial to specify /usr/bin/python2 to "stay behind" (Well, "it
works")
 . But, I think "the default" is that it should work... which either means
updating Python

So, digging deeper, and correct me if I'm wrong... but iott looks like the
meta version of Python on Cygwin is now at Python3, which is a good thing.
But with Mercurial depending on the meta Python, rather than sticking
themselves on Python2 (since the JSON import blows). So, the current
Mercurial seems to be 5.5.1 on Cygwin x86_64... which is only a short time
behind. But that's pretty easy, right?

Or to channel my BOFH persona (only because it's already the third month
following a long anticipated date), the Python 2 deprecation wasn't loud
enough for everyone? And now we're only two revisions behind (one major and
one bug fix)... though did Mercurial ever "force" Python 3, or at least get
"sensitive" to it?

So, I understand... that's a LONG way to go to ask all of y'all, how do we
fix this thing? Can someone point me at a good reference to being a Cygwin
contributor, to the point that I can actually help move some things along,
like this, rather than bitching to all y'all about getting it fixed? (Read:
Can I compile this myself, and submit it back to chief stakeholders so that
they may publish a new package? I'm "git" and "devops" fluent, though my C
and its close relatives are on the weak-side, these days - one of
the reasons I want good Python environments!)

Cheers!
Russell VT

-- 
Russell M. Van Tassell <russellvt@gmail.com>
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
