Jeremy Andrews
ae877638e8
Issue #2974 - Part 20: Use last few fixers.
...
Just rush through the last ones I semi-trust...
2to3 . --fix methodattrs -wpn
'' funcattrs ''
'' has_key ''
'' renames ''
'' types ''
'' nonzero ''
Ref:
https://docs.python.org/3/whatsnew/3.0.html
2026-03-06 02:08:07 -06:00
Jeremy Andrews
7abb343363
Issue #2974 - Part 18: Use str instead of unicode.
...
The standard str is unicode now...
2to3 . --fix unicode -wpn
Ref:
https://docs.python.org/3/whatsnew/3.0.html
2026-03-05 21:38:47 -06:00
Jeremy Andrews
af6ae6a1d3
Issue #2974 - Part 17: Use new unittest names.
...
2to3 . --fix asserts -wpn
Ref:
https://docs.python.org/3.11/library/unittest.html#deprecated-aliases
2026-03-05 21:11:31 -06:00
Jeremy Andrews
0c61ee391c
Issue #2974 - Part 14: Moved libraries and imports.
...
reduce is moved to functools, urllib reogranized.
2to3 . --fix urllib -wpn
2to3 . --fix reduce -wpn
2to3 . --fix import -wpn
2to3 . --fix imports -wpn
2to3 . --fix imports2 -wpn
Ref: PEP 3108, PEP 3100
https://peps.python.org/pep-3108/
https://peps.python.org/pep-3100/
2026-03-04 20:24:12 -06:00
Jeremy Andrews
5fdc8dd723
Issue #2974 - Part 13: Adapt octal number syntax.
...
Used to be like C, with 0755 or something, now it's
0o755. Also, long and int are the same type now.
2to3 . --fix numliterals -wpn
2to3 . --fix long -wpn
Ref: PEP 3127, PEP 237
https://peps.python.org/pep-3127/
https://peps.python.org/pep-0237/
2026-03-04 20:03:01 -06:00
Jeremy Andrews
5af8e3ba5c
Issue #2974 - Part 12: Adapt metaclass syntax.
...
It seems to have moved out of the body of the function,
into the class definition. Hit this a couple times...
2to3 . --fix metaclass -wpn
Ref: PEP 3115
https://peps.python.org/pep-3115/
2026-03-04 18:55:13 -06:00
Jeremy Andrews
8c0f0ccdcf
Issue #2974 - Part 6: Adapt dict
...
2to3 . --fix dict -wpn
Py2 dict was a list by default, the iterator versions
were switched around to be the default.
This lets you have the old behavior. Mechanical.
Ref: PEP 3106
https://peps.python.org/pep-3106/
2026-03-04 13:56:53 -06:00
Jeremy Andrews
e11fc9b4cf
Issue #2974 - Part 1: Adapt all print statements.
...
2to3 . --fix print -wn
Essentially, print is a function instead of statement.
Ref:
PEP 3105
https://peps.python.org/pep-3105/
2026-03-04 03:48:01 -06:00
Matt A. Tobin
5f8de423f1
Add m-esr52 at 52.6.0
2018-02-02 04:16:08 -05:00