extensions for issues: Artemis (how to upgrade to python 3.X)

Uwe Brauer oub at mat.ucm.es
Wed Aug 4 09:14:41 UTC 2021


>>> "DLB" == Dennis Lee Bieber <wlfraed at ix.netcom.com> writes:

> On Tue, 03 Aug 2021 18:50:48 +0200, Uwe Brauer <oub at mat.ucm.es> declaimed
> the following:

>> Unfortunately I have not much experience with python: is there any
>> documentation, of what to take into account when trying to make an
>> extension compatible with python 3.X?

> 	Presuming some of it is written in Python. First step would be to run
> https://docs.python.org/3/library/2to3.html on the source(s). That should
> -- at the least -- take care of easy syntax changes, and may provide
> warnings of stuff it can't handle.


> 	After that, you'll have to study the documentation for email file
> formats https://docs.python.org/3/library/mailbox.html, I believe that has
> had significant changes since Python 2.x (among other things, Python 2.x
> native strings are ASCII (or one of the ISO-Latin-xx sets based upon OS
> environment settings; and Unicode had to be entered as u"string"; in Python
> 3.x, native strings are Unicode, and to get plain 8-bit strings one has to
> enter b"string").

> 	For C/C++ code... https://docs.python.org/3/extending/index.html

Thanks this was very helpful. The extension is rather hm complicated. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5673 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20210804/86aebf21/attachment.p7s>


More information about the Mercurial mailing list