Is mercurial ready for Python 3?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Is mercurial ready for Python 3?

Detlev Offenbach
Hello,

for a couple of days one could download a Mercurial installer for Windows
built for Python3. But now it is gone. I tried using Mercurial's hgweb with
Python3 but it gave me some errors. This leads to the question show in the
subject.

If it is not ready yet, when will it be? Python2 is EOL since a couple of
months.

Regards,
Detlev
--
Detlev Offenbach
[hidden email]


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Gregory Szorc
We stopped advertising the Windows Python 3 installers because https:// server interactions weren't working. We may publish installers for 5.4.1 if/when fixes land. The Python 3 installers are still available at https://www.mercurial-scm.org/release/windows/?C=M;O=D if you want to play around with them (they are the 5.4 installers without "-python2" in their filenames).

On Thu, May 14, 2020 at 9:15 AM Detlev Offenbach <[hidden email]> wrote:
Hello,

for a couple of days one could download a Mercurial installer for Windows
built for Python3. But now it is gone. I tried using Mercurial's hgweb with
Python3 but it gave me some errors. This leads to the question show in the
subject.

If it is not ready yet, when will it be? Python2 is EOL since a couple of
months.

Regards,
Detlev
--
Detlev Offenbach
[hidden email]


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Raffaele Salmaso-2
In reply to this post by Detlev Offenbach
On Thu, May 14, 2020 at 6:12 PM Detlev Offenbach <[hidden email]> wrote:
If it is not ready yet, when will it be? Python2 is EOL since a couple of
months.
I'm using hg with evolve/topic with python3, and I have no problem at all (and really happy about it :D).
Only hg-git is not (yet) compatible.
But I use hg on linux.

--

_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Manuel Jacob
On 2020-05-14 22:34, Raffaele Salmaso wrote:

> On Thu, May 14, 2020 at 6:12 PM Detlev Offenbach
> <[hidden email]>
> wrote:
>
>> If it is not ready yet, when will it be? Python2 is EOL since a couple
>> of
>> months.
>>
> I'm using hg with evolve/topic with python3, and I have no problem at
> all
> (and really happy about it :D).
> Only hg-git is not (yet) compatible.
> But I use hg on linux.

hg-git now mostly works on Python 3. Recently there was an alpha release
with Python 3 support.

You can install it with: pip3 install --user "hg-git>=0.9.0a1"

Here’s the announcement:
https://groups.google.com/forum/#!topic/hg-git/f4cWCdgDEew

If you find some bugs, please report them and we’ll try to fix them as
soon as possible.
_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Detlev Offenbach
In reply to this post by Gregory Szorc
How about hgweb? I have it working in a Docker container using Python2 and
gunicorn. But when I tried to switch to Python3 I first got an error message
stating that my WSGI script would be using unicode strings. I could overcome
this by prepending 'b' to make the 'faulty' string a bytes object. The message
was

mercurial.error.ProgrammingError: Mercurial only supports encoded strings: '/
etc/mercurial/hgweb.config

 Thereafter it failed with a message

 File "/usr/lib/python3.7/site-packages/mercurial/hgweb/hgwebdir_mod.py", line  
17, in <module>
   from .common import (
ImportError: cannot import name 'ErrorResponse' from 'mercurial.hgweb.common'
(/usr/lib/python3.7/site-packages/mercurial/hgweb/common.py)

Regards,
Detlev

Am Donnerstag, 14. Mai 2020, 21:34:12 CEST schrieb Gregory Szorc:

> We stopped advertising the Windows Python 3 installers because https://
> server interactions weren't working. We may publish installers for 5.4.1
> if/when fixes land. The Python 3 installers are still available at
> https://www.mercurial-scm.org/release/windows/?C=M;O=D if you want to play
> around with them (they are the 5.4 installers without "-python2" in their
> filenames).
>
> On Thu, May 14, 2020 at 9:15 AM Detlev Offenbach <[hidden email]>
>
> wrote:
> > Hello,
> >
> > for a couple of days one could download a Mercurial installer for Windows
> > built for Python3. But now it is gone. I tried using Mercurial's hgweb
> > with
> > Python3 but it gave me some errors. This leads to the question show in the
> > subject.
> >
> > If it is not ready yet, when will it be? Python2 is EOL since a couple of
> > months.
> >
> > Regards,
> > Detlev
> > --
> > Detlev Offenbach
> > [hidden email]
> >
> >
> > _______________________________________________
> > Mercurial mailing list
> > [hidden email]
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial
--
Detlev Offenbach
[hidden email]
_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

hgweb.py (211 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Georges Racinet-2
Hi,

On 5/15/20 5:29 PM, Detlev Offenbach wrote:
How about hgweb? I have it working in a Docker container using Python2 and 
gunicorn. But when I tried to switch to Python3 I first got an error message 
stating that my WSGI script would be using unicode strings. I could overcome 
this by prepending 'b' to make the 'faulty' string a bytes object. The message 
was

the WSGI script ships as an example in the contrib/ section of the Mercurial source tree, and doesn't have a `.py` extension. That could explain if it lags behind (even as an example).

I think it's worth a report with your precise changes on https://bz.mercurial-scm.org (maybe redacting things like exacts paths etc.)


mercurial.error.ProgrammingError: Mercurial only supports encoded strings: '/
etc/mercurial/hgweb.config

 Thereafter it failed with a message

 File "/usr/lib/python3.7/site-packages/mercurial/hgweb/hgwebdir_mod.py", line  
17, in <module> 
   from .common import ( 
ImportError: cannot import name 'ErrorResponse' from 'mercurial.hgweb.common' 
(/usr/lib/python3.7/site-packages/mercurial/hgweb/common.py)

Regards,
Detlev

Am Donnerstag, 14. Mai 2020, 21:34:12 CEST schrieb Gregory Szorc:
We stopped advertising the Windows Python 3 installers because https://
server interactions weren't working. We may publish installers for 5.4.1
if/when fixes land. The Python 3 installers are still available at
https://www.mercurial-scm.org/release/windows/?C=M;O=D if you want to play
around with them (they are the 5.4 installers without "-python2" in their
filenames).

On Thu, May 14, 2020 at 9:15 AM Detlev Offenbach [hidden email]

wrote:
Hello,

for a couple of days one could download a Mercurial installer for Windows
built for Python3. But now it is gone. I tried using Mercurial's hgweb
with
Python3 but it gave me some errors. This leads to the question show in the
subject.

If it is not ready yet, when will it be? Python2 is EOL since a couple of
months.

Regards,
Detlev
--
Detlev Offenbach
[hidden email]


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

      
_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial


-- 
Georges Racinet
https://octobus.net, https://about.heptapod.host, https://heptapod.net
GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics

_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Nathan
In reply to this post by Detlev Offenbach
Looks like this is 

And it’s an issue with how mercurial delays imports to runtime.

On Fri, May 15, 2020 at 9:36 AM Detlev Offenbach <[hidden email]> wrote:
How about hgweb? I have it working in a Docker container using Python2 and
gunicorn. But when I tried to switch to Python3 I first got an error message
stating that my WSGI script would be using unicode strings. I could overcome
this by prepending 'b' to make the 'faulty' string a bytes object. The message
was

mercurial.error.ProgrammingError: Mercurial only supports encoded strings: '/
etc/mercurial/hgweb.config

 Thereafter it failed with a message

 File "/usr/lib/python3.7/site-packages/mercurial/hgweb/hgwebdir_mod.py", line 
17, in <module>
   from .common import (
ImportError: cannot import name 'ErrorResponse' from 'mercurial.hgweb.common'
(/usr/lib/python3.7/site-packages/mercurial/hgweb/common.py)

Regards,
Detlev

Am Donnerstag, 14. Mai 2020, 21:34:12 CEST schrieb Gregory Szorc:
> We stopped advertising the Windows Python 3 installers because https://
> server interactions weren't working. We may publish installers for 5.4.1
> if/when fixes land. The Python 3 installers are still available at
> https://www.mercurial-scm.org/release/windows/?C=M;O=D if you want to play
> around with them (they are the 5.4 installers without "-python2" in their
> filenames).
>
> On Thu, May 14, 2020 at 9:15 AM Detlev Offenbach <[hidden email]>
>
> wrote:
> > Hello,
> >
> > for a couple of days one could download a Mercurial installer for Windows
> > built for Python3. But now it is gone. I tried using Mercurial's hgweb
> > with
> > Python3 but it gave me some errors. This leads to the question show in the
> > subject.
> >
> > If it is not ready yet, when will it be? Python2 is EOL since a couple of
> > months.
> >
> > Regards,
> > Detlev
> > --
> > Detlev Offenbach
> > [hidden email]
> >
> >
> > _______________________________________________
> > Mercurial mailing list
> > [hidden email]
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial

--
Detlev Offenbach
[hidden email]_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Manuel Jacob
Repeating it here for people not subscribed to the bug. Can you try
whether the error goes away with a6e12d477595?

On 2020-05-15 17:40, Nathan wrote:

> Looks like this is
> https://bz.mercurial-scm.org/show_bug.cgi?id=6268
>
> And it’s an issue with how mercurial delays imports to runtime.
>
> On Fri, May 15, 2020 at 9:36 AM Detlev Offenbach
> <[hidden email]>
> wrote:
>
>> How about hgweb? I have it working in a Docker container using Python2
>> and
>> gunicorn. But when I tried to switch to Python3 I first got an error
>> message
>> stating that my WSGI script would be using unicode strings. I could
>> overcome
>> this by prepending 'b' to make the 'faulty' string a bytes object. The
>> message
>> was
>>
>> mercurial.error.ProgrammingError: Mercurial only supports encoded
>> strings:
>> '/
>> etc/mercurial/hgweb.config
>>
>>  Thereafter it failed with a message
>>
>>  File
>> "/usr/lib/python3.7/site-packages/mercurial/hgweb/hgwebdir_mod.py",
>> line
>> 17, in <module>
>>    from .common import (
>> ImportError: cannot import name 'ErrorResponse' from
>> 'mercurial.hgweb.common'
>> (/usr/lib/python3.7/site-packages/mercurial/hgweb/common.py)
>>
>> Regards,
>> Detlev
>>
>> Am Donnerstag, 14. Mai 2020, 21:34:12 CEST schrieb Gregory Szorc:
>> > We stopped advertising the Windows Python 3 installers because https://
>> > server interactions weren't working. We may publish installers for 5.4.1
>> > if/when fixes land. The Python 3 installers are still available at
>> > https://www.mercurial-scm.org/release/windows/?C=M;O=D if you want to
>> play
>> > around with them (they are the 5.4 installers without "-python2" in their
>> > filenames).
>> >
>> > On Thu, May 14, 2020 at 9:15 AM Detlev Offenbach <
>> [hidden email]>
>> >
>> > wrote:
>> > > Hello,
>> > >
>> > > for a couple of days one could download a Mercurial installer for
>> Windows
>> > > built for Python3. But now it is gone. I tried using Mercurial's hgweb
>> > > with
>> > > Python3 but it gave me some errors. This leads to the question show in
>> the
>> > > subject.
>> > >
>> > > If it is not ready yet, when will it be? Python2 is EOL since a couple
>> of
>> > > months.
>> > >
>> > > Regards,
>> > > Detlev
>> > > --
>> > > Detlev Offenbach
>> > > [hidden email]
>> > >
>> > >
>> > > _______________________________________________
>> > > Mercurial mailing list
>> > > [hidden email]
>> > > https://www.mercurial-scm.org/mailman/listinfo/mercurial
>>
>> --
>> Detlev Offenbach
>> detlev@die-offenbachs.de_______________________________________________
>> Mercurial mailing list
>> [hidden email]
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>>
>
> _______________________________________________
> Mercurial mailing list
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Son Luong Ngoc via Mercurial
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Manuel Jacob wrote:
> Repeating it here for people not subscribed to the bug. Can you
> try whether the error goes away with a6e12d477595?
>
> On 2020-05-15 17:40, Nathan wrote:
>> Looks like this is
>> https://bz.mercurial-scm.org/show_bug.cgi?id=6268
>>
The error does not go away with the aforementioned revision.

- --
Charlie Li
Can't think of a witty .sigline today…

(This email address is for mailing list use only; replace local-part
with vishwin for off-list communication)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE/3/Cqr5a+41PbEb+jnB43vIDq2wFAl7FXzQACgkQjnB43vID
q2yNVA/+LKKoGLvPmvhhZaK1rOt3cdP/O7gB8n/zMtXu/B5gdJmyfg04hGdZgHqH
qv2+xfg9csL6Y+UOnvMB50qA3H31E0bNLIWuhvRVj3d042/MiKkNLBqrSrrBQbNx
PLKFvaLfNZQf+Wfi092BpJtM5PzEQM73bX97s8lq+5tcfA4is8u0OzhioGawSoS/
hvZO0tY9EaPW4l1NkH43sDbMRp8A+JKXtH4w0cVFBsAz+Ultl+E7tEhwHXSe7rM3
/GkYOHo01aKQ+/wzlDZ6haqy53gRT0qZRuRBUZtilOqAcNFXVdiofVdettpLhtDm
mI1tfLHJAwN3ijWtUt5qb/DnSLJC/YVJU2/vle05W83XKCk9N0N1BbFa+qGNHXGH
UJOYXeZ9RU/qCCBpeaxZ29P+8H/nbhN9ot+U+T2cVkgqutAS0EVJrreQutMcn1aN
8Ea7mbM4Eo52vT4YYpqke+EZ/6XK49k1hYWa8bCkwPaYSwzjfoO7aehyVXzTCXY+
PP7ucvqupy6snyDcydGIDMfcdGeRW03zDCABRCIuad64RqZwMOxSUBa/uNyec13L
lqIkysllp5A6+sjpARQLike8IYXkKjd5+h6uAmCOM6g+HfSujzJNImPuT9anWDfM
EXeitH4PEJIywzVomE4saPTu3Ih2g9/N0opthkCD6zdOhy+HgSQ=
=aFIJ
-----END PGP SIGNATURE-----

_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Is mercurial ready for Python 3?

Son Luong Ngoc via Mercurial
In reply to this post by Manuel Jacob
Manuel Jacob wrote:
> Repeating it here for people not subscribed to the bug. Can you try
> whether the error goes away with a6e12d477595?
>
> On 2020-05-15 17:40, Nathan wrote:
>> Looks like this is
>> https://bz.mercurial-scm.org/show_bug.cgi?id=6268
>>
The error does not go away with the aforementioned revision.

--
Charlie Li
Can't think of a witty .sigline today…

(This email address is for mailing list use only; replace local-part
with vishwin for off-list communication)


_______________________________________________
Mercurial mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial

signature.asc (849 bytes) Download Attachment