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

2019-09-13 Thread Thomas Goirand
On 9/12/19 9:22 AM, Michael Kesper wrote: > Hi all, > > On 12.09.19 08:30, 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

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

2019-09-12 Thread Andrey Rahmatullin
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

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

2019-09-12 Thread Andreas Tille
Hi Michael, On Thu, Sep 12, 2019 at 09:22:06AM +0200, Michael Kesper wrote: > On 12.09.19 08:30, 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

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

2019-09-12 Thread Michael Kesper
Hi all, On 12.09.19 08:30, 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. ... > > The advantage is that you'll get

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

2019-09-12 Thread Thomas Goirand
On 9/10/19 7:50 AM, Andreas Tille wrote: > Hi, > > in the process of the Python3 migration the package lefse was converted > using 2to3. Hi Andreas, I wont comment on the relative import ambiguity problem, as Ghislain replied correctly. However, I do want to comment on 2to3. I generally

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

2019-09-12 Thread Thomas Goirand
On 9/10/19 7:50 AM, Andreas Tille wrote: > Hi, > > in the process of the Python3 migration the package lefse was converted > using 2to3. Hi Andreas, I wont comment on the relative import ambiguity problem, as Ghislain replied correctly. However, I do want to comment on 2to3. I generally

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

2019-09-10 Thread Ghislain Vaillant
It results from the ambiguity between absolute and relative imports in Python 2. Here 2to3 considers your imports being relative, hence the added dot. I believe no dots would be added should a `from __future__ import absolute_import` be found in the preamble of the module. Hope this helps. Ghis