[issue17823] 2to3 fixers for missing codecs

2013-11-10 Thread Nick Coghlan
Nick Coghlan added the comment: Due to the data driven nature of this particular incompatibility, I'm rejecting this in favour of the Py3k warning based approach in issue 19543. -- dependencies: -codecs missing: base64 bz2 hex zlib hex_codec ... resolution: -> rejected stage: -> comm

[issue17823] 2to3 fixers for missing codecs

2013-11-07 Thread Martin Panter
Changes by Martin Panter : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue17823] 2to3 fixers for missing codecs

2013-11-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue17823] 2to3 fixers for missing codecs

2013-11-07 Thread Nick Coghlan
Nick Coghlan added the comment: After thinking about this some more, perhaps a -3 warning in 2.7 would be a better solution? That would be more robust, as it could complain any time unicode.encode produced unicode and str.decode produced str and point users to the codecs module level functions as

[issue17823] 2to3 fixers for missing codecs

2013-11-06 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue17823] 2to3 fixers for missing codecs

2013-11-06 Thread Nick Coghlan
Nick Coghlan added the comment: On 7 November 2013 00:06, Nick Coghlan wrote: > I'm sure how useful such a fixer would be in practice, though, since it only > triggers when the codec name is passed as a literal - passing in a variable > instead keeps it from firing. Oops, that should say "I'm

[issue17823] 2to3 fixers for missing codecs

2013-11-06 Thread Nick Coghlan
Nick Coghlan added the comment: Attached diff shows a proof of concept fixer for the encode case. It could be adjusted fairly easily to also handle decode methods (by including an alternative in the pattern and also capturing the method name) I'm sure how useful such a fixer would be in practi

[issue17823] 2to3 fixers for missing codecs

2013-11-06 Thread Nick Coghlan
Nick Coghlan added the comment: Switch direction of dependency to make this fixer rely on restoring the codec aliases in issue 7475 first. -- dependencies: +codecs missing: base64 bz2 hex zlib hex_codec ... ___ Python tracker

[issue17823] 2to3 fixers for missing codecs

2013-11-06 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue17823] 2to3 fixers for missing codecs

2013-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > A more consistent alternative conversion: What advantages `codecs.encode("...", "base64_codec")` has comparing with `base64.b64encode("...")`? The latter is at least more portable and powerfull (it allows to specify altchars). I think that main problem wi

[issue17823] 2to3 fixers for missing codecs

2013-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: Sure, that's what issue 7475 is about, and if we do that, then the fixers can be simplified to just replace the method with the function call for the known set of non-text-model related codecs. However, I also wanted to make a note of what the fixers should look

[issue17823] 2to3 fixers for missing codecs

2013-04-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 25.04.2013 10:14, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > A more consistent alternative conversion: > > "...".encode("base64") => codecs.encode("...", "base64_codec") > "...".encode("rot13") => codecs.encode("...", "rot_13") > "...".

[issue17823] 2to3 fixers for missing codecs

2013-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: A more consistent alternative conversion: "...".encode("base64") => codecs.encode("...", "base64_codec") "...".encode("rot13") => codecs.encode("...", "rot_13") "...".encode("zlib") => codecs.encode("...", "zlib_codec") "...".encode("hex") => codecs.encode("...",

[issue17823] 2to3 fixers for missing codecs

2013-04-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: 2to3 fixers for -> 2to3 fixers for missing codecs ___ Python tracker ___ ___ Python-bugs-list