Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #11792

Re: 2to3 adds '.' in front dir of "from dir import ..." statements (Was: [MoM] lefse migration to python 3])

From Andrey Rahmatullin <wrar@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: 2to3 adds '.' in front dir of "from dir import ..." statements (Was: [MoM] lefse migration to python 3])
Date 2019-09-12 11:10 +0200
Message-ID <yFth0-3TF-17@gated-at.bofh.it> (permalink)
References <yEHm1-4FK-1@gated-at.bofh.it> <yFrIe-2FV-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Sep 12, 2019 at 08:30:20AM +0200, Thomas Goirand wrote:
> I wont comment on the relative import ambiguity problem, as Ghislain
> replied correctly. However, I do want to comment on 2to3.
> 
> I generally recommend against using it, in the favor of other tools. For
> example, you can use sixer, which I maintain in Debian, and often used
> (and abused) to do Python 3 conversions. There's also 2to6, which I
> don't know much about, but I've read it works about the same way as
> sixer (which was specifically written for OpenStack).
> 
> The advantage is that you'll get a source code that will work on both
> Python 2 and 3. It's generally a way more easy to submit upstream, which
> may not want to loose Python 2 compatibility.
I can add to this that it's non-trivial to convert from six to normal Py3
code, unless there are some tools that I didn't find. And it's really time
to do that, not to convert TO six.

-- 
WBR, wRAR

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

2to3 adds '.' in front dir of "from dir import ..." statements (Was:  [MoM] lefse migration to python 3]) Andreas Tille <andreas@an3as.eu> - 2019-09-10 08:00 +0200
  Re: 2to3 adds '.' in front dir of "from dir import ..." statements  (Was: [MoM] lefse migration to python 3]) Ghislain Vaillant <ghisvail@gmail.com> - 2019-09-10 08:30 +0200
  Re: 2to3 adds '.' in front dir of "from dir import ..." statements  (Was: [MoM] lefse migration to python 3]) Michael Kesper <mkesper@schokokeks.org> - 2019-09-12 09:30 +0200
    Re: 2to3 adds '.' in front dir of "from dir import ..." statements  (Was: [MoM] lefse migration to python 3]) Andreas Tille <andreas@an3as.eu> - 2019-09-12 09:50 +0200
  Re: 2to3 adds '.' in front dir of "from dir import ..." statements  (Was: [MoM] lefse migration to python 3]) Andrey Rahmatullin <wrar@debian.org> - 2019-09-12 11:10 +0200

csiph-web