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


Groups > linux.debian.user > #244854

Re: converting Python2 to Python3

From The Wanderer <wanderer@fastmail.fm>
Newsgroups linux.debian.user
Subject Re: converting Python2 to Python3
Date 2022-01-31 13:50 +0100
Message-ID <DLEi6-3Wl-15@gated-at.bofh.it> (permalink)
References <DLwky-7EU-3@gated-at.bofh.it>
Organization This space intentionally left blank.

Show all headers | View raw


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

On 2022-01-30 at 23:01, Mike Kupfer wrote:

> The Wanderer wrote:
> 
>> In my case, I started with the last Debian package version before the
>> removal, imported the source package into git, dropped the debian/
>> directory because that doesn't belong in the upstream codebase, ran the
>> '2to3' tool (from the package of the same name) against the codebase,
>> committed the result, and started doing "build" / run tests of the
>> updated code (including comparisons back and forth with the untouched
>> Python 2 version of the codebase).
> 
> FWIW, here are my notes from converting a couple small private scripts:
> 
>   * Note that 2to3 does not change the shebang line. And the actual
>     command in Debian10 [and 11] is 2to3-2.7.

This is in the 'python2.7' package. However, there is also a package
named '2to3', which contains a command by the same name.

I cannot actually remember which of the two I used.

>   * Run pylint before running 2to3, and address non-cosmetic issues. Then
>     run pylint3 after the conversion.

I don't think I did either of these things. I will have to follow up
with the latter, to make sure things are as clean as I can arrange for
them to be.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

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


Thread

sparse dictionary "Russell L. Harris" <russell@rlharris.org> - 2022-01-30 20:50 +0100
  Re: sparse dictionary Charlie <taoquester@gmail.com> - 2022-01-30 22:50 +0100
    Re: sparse dictionary "Russell L. Harris" <russell@rlharris.org> - 2022-01-31 01:20 +0100
      Re: sparse dictionary Greg Wooledge <greg@wooledge.org> - 2022-01-31 01:40 +0100
        Re: sparse dictionary Greg Wooledge <greg@wooledge.org> - 2022-01-31 02:30 +0100
          Re: sparse dictionary "Russell L. Harris" <russell@rlharris.org> - 2022-01-31 03:40 +0100
            Re: sparse dictionary The Wanderer <wanderer@fastmail.fm> - 2022-01-31 04:40 +0100
              converting Python2 to Python3 (was: sparse dictionary) Mike Kupfer <mkupfer@alum.berkeley.edu> - 2022-01-31 05:20 +0100
                Re: converting Python2 to Python3 The Wanderer <wanderer@fastmail.fm> - 2022-01-31 13:50 +0100
                Re: converting Python2 to Python3 Mike Kupfer <mkupfer@alum.berkeley.edu> - 2022-01-31 17:40 +0100
              Re: sparse dictionary "Russell L. Harris" <russell@rlharris.org> - 2022-01-31 06:20 +0100
                Re: sparse dictionary Charlie <taoquester@gmail.com> - 2022-01-31 06:50 +0100
                Re: sparse dictionary Polyna-Maude Racicot-Summerside <debian@polynamaude.com> - 2022-01-31 07:50 +0100
                Re: sparse dictionary The Wanderer <wanderer@fastmail.fm> - 2022-01-31 14:00 +0100
                Re: sparse dictionary Tixy <tixy@yxit.co.uk> - 2022-01-31 14:40 +0100
                Re: sparse dictionary The Wanderer <wanderer@fastmail.fm> - 2022-01-31 15:10 +0100
            Re: sparse dictionary Charlie <taoquester@gmail.com> - 2022-01-31 06:40 +0100
              Re: sparse dictionary Greg Wooledge <greg@wooledge.org> - 2022-01-31 13:40 +0100
          Re: sparse dictionary Polyna-Maude Racicot-Summerside <debian@polynamaude.com> - 2022-01-31 07:40 +0100
            Re: sparse dictionary David Wright <deblis@lionunicorn.co.uk> - 2022-01-31 17:50 +0100
        Re: sparse dictionary "Russell L. Harris" <russell@rlharris.org> - 2022-01-31 02:50 +0100

csiph-web