public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin now on Python 3? What about Mercurial?
@ 2021-03-04  8:45 Russell VT
  2021-03-04 11:05 ` marco atzeri
  2021-03-04 13:30 ` Stephen John Smoogen
  0 siblings, 2 replies; 11+ messages in thread
From: Russell VT @ 2021-03-04  8:45 UTC (permalink / raw)
  To: cygwin

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>

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

end of thread, other threads:[~2021-04-02 13:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04  8:45 Cygwin now on Python 3? What about Mercurial? Russell VT
2021-03-04 11:05 ` marco atzeri
2021-03-04 15:19   ` Ken Brown
2021-03-04 18:32     ` Marco Atzeri
2021-03-06 14:45       ` Jari Aalto
2021-03-06 14:49         ` Marco Atzeri
2021-03-07  9:32     ` Russell VT
2021-03-07 11:58       ` Marco Atzeri
2021-04-02 13:27         ` Oleksandr Gavenko
2021-03-11 11:57       ` Jari Aalto
2021-03-04 13:30 ` Stephen John Smoogen

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).