public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [Attn: mercurial maintainer] hg fails with python3.9
@ 2022-04-28 14:27 Ken Brown
  2022-04-29  9:46 ` Jari Aalto
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Brown @ 2022-04-28 14:27 UTC (permalink / raw)
  To: cygwin; +Cc: Jari Aalto

/usr/bin/hg specifies /usr/bin/python3 in its shebang, but further down it has

   libdir = '../lib/python3.8/site-packages'

This causes hg to fail as follows if /usr/bin/python3 points to python3.9:

$ hg
Traceback (most recent call last):
   File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 69, in 
_importfrom
     fakelocals[modname] = mod = getattr(pkg, modname)
   File "/usr/lib/python3.8/site-packages/mercurial/pycompat.py", line 317, in w
     return f(object, sysstr(name), *args)
AttributeError: module 'mercurial.cext' has no attribute 'parsers'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "/usr/bin/hg", line 61, in <module>
     dispatch.run()
   File "/usr/lib/python3.9/importlib/util.py", line 245, in __getattribute__
     self.__spec__.loader.exec_module(self)
   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
   File "/usr/lib/python3.8/site-packages/mercurial/dispatch.py", line 21, in 
<module>
     from .i18n import _
   File "/usr/lib/python3.9/importlib/util.py", line 245, in __getattribute__
     self.__spec__.loader.exec_module(self)
   File "/usr/lib/python3.8/site-packages/mercurial/i18n.py", line 123, in <module>
     if _plain():
   File "/usr/lib/python3.8/site-packages/mercurial/i18n.py", line 115, in _plain
     b'HGPLAIN' not in encoding.environ
   File "/usr/lib/python3.9/importlib/util.py", line 245, in __getattribute__
     self.__spec__.loader.exec_module(self)
   File "/usr/lib/python3.8/site-packages/mercurial/encoding.py", line 41, in 
<module>
     charencode = policy.importmod('charencode')
   File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 116, in 
importmod
     mod = _importfrom(pn, mn)
   File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 71, in 
_importfrom
     raise ImportError('cannot import name %s' % modname)
ImportError: cannot import name parsers

Ken

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

* Re: [Attn: mercurial maintainer] hg fails with python3.9
  2022-04-28 14:27 [Attn: mercurial maintainer] hg fails with python3.9 Ken Brown
@ 2022-04-29  9:46 ` Jari Aalto
       [not found]   ` <4615caa2-972c-6f9e-1fc0-3d2bfbe3083c@dronecode.org.uk>
  0 siblings, 1 reply; 5+ messages in thread
From: Jari Aalto @ 2022-04-29  9:46 UTC (permalink / raw)
  To: cygwin

On 2022-04-28 10:27, Ken Brown wrote:
> /usr/bin/hg specifies /usr/bin/python3 in its shebang, but further down it has
> 
>   libdir = '../lib/python3.8/site-packages'
> 
> This causes hg to fail as follows if /usr/bin/python3 points to python3.9:
> 
> $ hg
> Traceback (most recent call last):
>   File "/usr/lib/python3.8/site-packages/mercurial/policy.py", line 69, in

While uploading fix, I got this:

  ERROR: package 'mercurial' version '5.7-3' is most recent non-test version, but version '6.0-1' is curr:

Jari

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

* Re: [Attn: mercurial maintainer] hg fails with python3.9
       [not found]   ` <4615caa2-972c-6f9e-1fc0-3d2bfbe3083c@dronecode.org.uk>
@ 2022-04-29 14:11     ` Jari Aalto
  2022-04-30 14:16       ` Jon Turney
  0 siblings, 1 reply; 5+ messages in thread
From: Jari Aalto @ 2022-04-29 14:11 UTC (permalink / raw)
  To: cygwin; +Cc: Jon Turney

On 2022-04-29 12:23, Jon Turney wrote:
> > >    libdir = '../lib/python3.8/site-packages'
> > > 
> > > This causes hg to fail as follows if /usr/bin/python3 points to python3.9:
> > 
> >    ERROR: package 'mercurial' version '5.7-3' is most recent non-test version, but version '6.0-1' is curr
> 
> This error is trying to tell you "version 6.0-1 exists, so the version you
> are uploading won't be installed for anyone who already has that higher
> version number installed, so maybe this isn't what you want to do".
> 
> mercurial version 6.0-1 does exist, for x86_64 only, dated 2021-11-25.

My mistake. I had the development environment in wrong server, so only 5.7
was in there and I forgot to check the latest in Cygwin.

6.1.1-1 uploaded

Thanks,
Jari

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

* Re: [Attn: mercurial maintainer] hg fails with python3.9
  2022-04-29 14:11     ` Jari Aalto
@ 2022-04-30 14:16       ` Jon Turney
  2022-05-02 14:57         ` Jari Aalto
  0 siblings, 1 reply; 5+ messages in thread
From: Jon Turney @ 2022-04-30 14:16 UTC (permalink / raw)
  To: Jari Aalto, The Cygwin Mailing List

On 29/04/2022 15:11, Jari Aalto wrote:
> On 2022-04-29 12:23, Jon Turney wrote:
>>>>     libdir = '../lib/python3.8/site-packages'
>>>>
>>>> This causes hg to fail as follows if /usr/bin/python3 points to python3.9:
>>>
>>>     ERROR: package 'mercurial' version '5.7-3' is most recent non-test version, but version '6.0-1' is curr
>>
>> This error is trying to tell you "version 6.0-1 exists, so the version you
>> are uploading won't be installed for anyone who already has that higher
>> version number installed, so maybe this isn't what you want to do".
>>
>> mercurial version 6.0-1 does exist, for x86_64 only, dated 2021-11-25.
> 
> My mistake. I had the development environment in wrong server, so only 5.7
> was in there and I forgot to check the latest in Cygwin.
> 
> 6.1.1-1 uploaded

No problem.  I'll see if I can improve that error message sometime.

I notice that mercurial appears to be pure python, so maybe we can 
upload it as noarch in future?

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

* Re: [Attn: mercurial maintainer] hg fails with python3.9
  2022-04-30 14:16       ` Jon Turney
@ 2022-05-02 14:57         ` Jari Aalto
  0 siblings, 0 replies; 5+ messages in thread
From: Jari Aalto @ 2022-05-02 14:57 UTC (permalink / raw)
  To: cygwin; +Cc: Jon Turney

On 2022-04-30 15:16, Jon Turney wrote:
> > My mistake. I had the development environment in wrong server, so only 5.7
> > was in there and I forgot to check the latest in Cygwin.
> > 
> > 6.1.1-1 uploaded
> 
> No problem.  I'll see if I can improve that error message sometime.
> 
> I notice that mercurial appears to be pure python, so maybe we can upload it
> as noarch in future?

Sure. I'll adjust it for the next upload.

Jari

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

end of thread, other threads:[~2022-05-02 14:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28 14:27 [Attn: mercurial maintainer] hg fails with python3.9 Ken Brown
2022-04-29  9:46 ` Jari Aalto
     [not found]   ` <4615caa2-972c-6f9e-1fc0-3d2bfbe3083c@dronecode.org.uk>
2022-04-29 14:11     ` Jari Aalto
2022-04-30 14:16       ` Jon Turney
2022-05-02 14:57         ` Jari Aalto

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