[issue19543] Add -3 warnings for codec convenience method changes

2016-02-11 Thread Nick Coghlan
Nick Coghlan added the comment: I think so - if anyone spots another place a Py3k warning could be usefully emitted, it can be handled as a new issue. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue19543] Add -3 warnings for codec convenience method changes

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is there something left to do with this issue? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue19543] Add -3 warnings for codec convenience method changes

2015-12-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: patch review -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue19543] Add -3 warnings for codec convenience method changes

2015-12-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset c89a0f24d5f6 by Serhiy Storchaka in branch '2.7': Issue #19543: Added Py3k warning for decoding unicode. https://hg.python.org/cpython/rev/c89a0f24d5f6 -- ___ Python tracker

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Nick Coghlan
Nick Coghlan added the comment: The last two commit notifications were intended for issue #24270. -- ___ Python tracker ___ ___ Python

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c8c123943cf by Tal Einat in branch 'default': Issue #19543: Implementation of isclose as per PEP 485 https://hg.python.org/cpython/rev/5c8c123943cf -- ___ Python tracker

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0347f6e14ad6 by Tal Einat in branch '3.5': Issue #19543: Implementation of isclose as per PEP 485 https://hg.python.org/cpython/rev/0347f6e14ad6 -- ___ Python tracker

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed patch covers a large part of this issue, but not all. Following patch emits py3k warning for unicode.decode(). For now unicode(u'a', 'ascii') is forbidden, but u'a'.decode('ascii') is allowed in 2.7. The risk of false positive in this patch is lowe

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf6e782a7f94 by Serhiy Storchaka in branch '2.7': Issue #19543: Emit deprecation warning for known non-text encodings. https://hg.python.org/cpython/rev/cf6e782a7f94 -- nosy: +python-dev ___ Python tracke

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-30 Thread Nick Coghlan
Nick Coghlan added the comment: Serhiy's patch looks to me like it would pragmatically cover all the cases most likely to affect porting efforts: using the standard library bytes<->bytes codecs through the convenience methods. For a Python 2 backport, I'm slightly more concerned with exposing

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nick, Benjamin, could you please look at the patch? -- ___ Python tracker ___ ___ Python-bugs-list

[issue19543] Add -3 warnings for codec convenience method changes

2015-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What would you say about this Benjamin? -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Pyt

[issue19543] Add -3 warnings for codec convenience method changes

2015-04-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that backports issue19619 and issue20404 with changing an exception to Py3k warning, and makes necessary changes in other modules and tests. $ ./python -3 Python 2.7.10rc0 (2.7:4234b0dd2a54+, Apr 28 2015, 16:51:51) [GCC 4.8.2] on linux2 Type

[issue19543] Add -3 warnings for codec convenience method changes

2015-04-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think we should just backport issue19619 and issue20404. -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue19543] Add -3 warnings for codec convenience method changes

2015-04-24 Thread Nick Coghlan
Nick Coghlan added the comment: For the warnings, it's actually bytes.decode() (et al) that are expected to return str, and str.encode() that's expected to return bytes. The codecs themselves remain free to do what they want (hence the recommendation to use codecs.encode() and codecs.decode()

[issue19543] Add -3 warnings for codec convenience method changes

2015-04-14 Thread Ned Deily
Changes by Ned Deily : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue19543] Add -3 warnings for codec convenience method changes

2015-04-13 Thread Dustin J. Mitchell
Dustin J. Mitchell added the comment: This fixes the four cases Nick referred to, although not in the functions expected: - str.encode no longer exists - unicode.decode no longer exists - encoders used by str.encode must return bytes (does not apply to codecs.encode) - decoders used by uni

[issue19543] Add -3 warnings for codec convenience method changes

2013-11-11 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue19543] Add -3 warnings for codec convenience method changes

2013-11-10 Thread Nick Coghlan
Nick Coghlan added the comment: Martin: you're right, it wouldn't be feasible to check for the 8-bit str encoding case, since the types of string literals will implicitly change between the two versions. However, the latter three cases would be feasible to check (the unicode.decode one is part

[issue19543] Add -3 warnings for codec convenience method changes

2013-11-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 10.11.2013 10:20, Nick Coghlan wrote: > > The long discussion in issue 7475 and some subsequent discussions I had with > Armin Ronacher have made it clear to me that the key distinction between the > codec systems in Python 2 and Python 3 is the followi

[issue19543] Add -3 warnings for codec convenience method changes

2013-11-10 Thread Martin Panter
Martin Panter added the comment: Just thinking the first case might get quite a few false positives. Maybe that would still be acceptable, I dunno. > - the str.encode method is called (redirect to codecs.encode to handle > arbitrary input types in a forward compatible way) I guess you are try

[issue19543] Add -3 warnings for codec convenience method changes

2013-11-10 Thread Nick Coghlan
New submission from Nick Coghlan: The long discussion in issue 7475 and some subsequent discussions I had with Armin Ronacher have made it clear to me that the key distinction between the codec systems in Python 2 and Python 3 is the following differences in type signatures of various operatio