This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: 2to3: convert deprecated string.maketrans to str.maketrans
Type: enhancement Stage: test needed
Components: 2to3 (2.x to 3.x conversion tool) Versions:
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: ede, r.david.murray, rhettinger
Priority: normal Keywords:

Created on 2009-07-08 14:13 by ede, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg90268 - (view) Author: Eric Eisner (ede) Date: 2009-07-08 14:13
string.maketrans has been deprecated in 3.x in favor of the more
specific bytes.maketrans and str.maketrans (see issue5675). It would be
nice if 2to3 would automatically translate this to one of those two
(probably str.maketrans).

I briefly looked at lib2to3/fixes/, but this only seems to
convert things of the form module.X to module.Y. Is there another script
that deals with these jumping-around functions?
msg90286 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2009-07-08 22:05
Doesn't that create an issue depending on whether your 2-to-3 target is
3.0 or 3.1?  I don't think minor release changes should be conflated
with the major release changes.
msg90295 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-07-08 23:20
I think 2to3 should target 3.1.  We don't expect/want people to use 3.0
in production.
msg90296 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2009-07-08 23:30
It's the users wants not yours that matter.  If someone already has 3.0
in production and is maintaining code in both 2.6 and 3.0, then this
change will break their build.

Also, it is not a necessary change.  We already have a warning in-place
to alert anyone who is interested and the removal of the feature doesn't
take place until 3.2.  

It is feature creep to start retargeting the 2-to-3 tool.  This is just
a normal difference between minor versions and is outside the scope of
that tool.
msg90298 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-07-08 23:42
Ah, I missed the fact that this was a 3.2 change.  Somehow I thought it
was a 3.1 thing.  So you are right, IMO, this would be feature creap.
Date User Action Args
2022-04-11 14:56:50adminsetgithub: 50689
2009-07-11 19:25:48benjamin.petersonsetresolution: rejected
2009-07-08 23:42:02r.david.murraysetmessages: + msg90298
2009-07-08 23:30:58rhettingersetstatus: open -> closed

messages: + msg90296
2009-07-08 23:20:39r.david.murraysetpriority: normal

nosy: + r.david.murray
messages: + msg90295

stage: test needed
2009-07-08 22:05:11rhettingersetnosy: + rhettinger
messages: + msg90286
2009-07-08 14:13:19edecreate