Is mercurial ready for Python 3?

Georges Racinet georges.racinet at octobus.net
Fri May 15 15:39:10 UTC 2020


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 <detlev at die-offenbachs.de>
>>
>> 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
>>> detlev at die-offenbachs.de
>>>
>>>
>>> _______________________________________________
>>> Mercurial mailing list
>>> Mercurial at mercurial-scm.org
>>> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20200515/12e46d26/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20200515/12e46d26/attachment.asc>


More information about the Mercurial mailing list