python / cpython

The Python programming language
https://www.python.org
Other
62.97k stars 30.15k forks source link

Deprecate lib2to3 (and 2to3) for future removal #84540

Closed gpshead closed 3 years ago

gpshead commented 4 years ago
BPO 40360
Nosy @gvanrossum, @gpshead, @vstinner, @carljm, @ambv, @ericsnowcurrently, @hroncok, @corona10, @miss-islington, @tirkarthi, @isidentical, @iritkatriel
PRs
  • python/cpython#19645
  • python/cpython#19663
  • python/cpython#19898
  • python/cpython#21694
  • python/cpython#21696
  • python/cpython#21697
  • python/cpython#28116
  • python/cpython#28122
  • python/cpython#28127
  • python/cpython#29064
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['type-feature', 'expert-2to3', '3.11'] title = 'Deprecate lib2to3 (and 2to3) for future removal' updated_at = user = 'https://github.com/gpshead' ``` bugs.python.org fields: ```python activity = actor = 'iritkatriel' assignee = 'none' closed = True closed_date = closer = 'vstinner' components = ['2to3 (2.x to 3.x conversion tool)'] creation = creator = 'gregory.p.smith' dependencies = [] files = [] hgrepos = [] issue_num = 40360 keywords = ['patch'] message_count = 51.0 messages = ['366973', '367005', '367031', '367051', '367208', '367209', '367230', '367235', '367716', '367726', '367730', '367743', '367744', '367766', '367767', '367770', '367771', '367884', '368077', '368388', '373185', '373198', '373327', '373332', '373334', '373444', '373538', '374348', '374349', '374566', '374572', '374573', '374574', '374611', '374634', '374643', '379014', '400876', '400877', '400879', '400883', '400885', '400892', '400905', '400906', '400923', '400927', '400933', '400937', '404324', '404532'] nosy_count = 14.0 nosy_names = ['gvanrossum', 'gregory.p.smith', 'vstinner', 'carljm', 'lukasz.langa', 'eric.snow', 'davidhalter', 'hroncok', 'corona10', 'miss-islington', 'xtreak', 'BTaskaya', 'Peter Ludemann', 'iritkatriel'] pr_nums = ['19645', '19663', '19898', '21694', '21696', '21697', '28116', '28122', '28127', '29064'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue40360' versions = ['Python 3.11'] ```

    iritkatriel commented 2 years ago

    Created bpo-45544 to close all open issues and list them there.

    johns1c commented 11 months ago

    What does this mean for someone who picks up a bit of code that happens to be obsolete and then starts getting warnings about print statements and lots of other stuff?

    gvanrossum commented 11 months ago

    @johns1c -- It means that you should ask for help somewhere else. :-) Seriously, try explaining your problem in our Discourse server at discuss.python.org.

    vstinner commented 11 months ago

    For people who still have a Python 2 code base: download/install Python 3.12 and run 2to3 included in this version. Or give a try to 2to3 alternatives.

    johns1c commented 11 months ago

    Thanks for your reply.

    This works for Python 3.11 with 2to3.exe being found in the Scripts directory of my Windows 11 64 bit install and 2to3.py being found in Tools\scripts (it was ‘tools\scripts’ in 3.8)

    Interestingly the Windows install for Python 3.12 does NOT provide either the library or the runnable utility.

    From now on it seems that a user wishing to upgrade old Python 2 code needs to install 2to3 using PIP. The command PIP install 2to3 will install 2to3.exe in the Scripts directory under the Python install directory or in the scripts directory of a virtual environment.

    Chris J

    From: Victor Stinner Sent: 14 November 2023 12:25 To: python/cpython Cc: C Johnson; Mention Subject: Re: [python/cpython] Deprecate lib2to3 (and 2to3) for future removal(#84540)

    For people who still have a Python 2 code base: download/install Python 3.12 and run 2to3 included in this version. Or give a try to 2to3 alternatives. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>