[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2018-02-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-10-24 Thread Berker Peksag
Change by Berker Peksag : -- pull_requests: -4084 ___ Python tracker ___ ___

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-10-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: In the future, I don't think this sort of thing should be backported. It isn't a bug, rather, it is a "thing x doesn't exactly look like thing y". -- ___ Python tracker

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-10-24 Thread Antoine Pietri
Change by Antoine Pietri : -- keywords: +patch pull_requests: +4084 stage: -> patch review ___ Python tracker ___

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae by Serhiy Storchaka in branch 'master': bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709)

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 004e03fb0c2febe2ec8afbd28ffcb3e980c63228 by Serhiy Storchaka in branch 'master': bpo-29116: Improve error message for concatenating str with non-str. (#710) https://github.com/python/cpython/commit/004e03fb0c2febe2ec8afbd28ffcb3e980c63228

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3d258b1eb453bcbc412d6b252f5bdceae0303f07 by Serhiy Storchaka in branch '3.6': bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709) (#723)

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2c5b2c3832d4d2af7b60333a5a8f73dd51ef6245 by Serhiy Storchaka in branch '3.5': bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709) (#724)

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know why statuses was not updated automatically. Updated them manually. Ivan in the comment on GitHub suggested to use "concatenate" instead of "concat" in "can't concat to bytes". Maybe make it more similar to messages for list, tuple, deque,

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Something is strange: PRs 709, 723, 724 are shown as open in the "Pull Requests" section on this page. However, all four PRs are already merged. Are other see the same? Shouldn't status be automatically updated? --

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +639 ___ Python tracker ___ ___

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +638 ___ Python tracker ___ ___

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 709 fixes the order of types for concatenating bytes and and bytearray. b''+0 will raise "can't concat str to bytes" rather than "can't concat bytes to str". PR 710 makes error message for str concatenation more informative and similar to error messages

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +630 ___ Python tracker ___ ___

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +629 ___ Python tracker ___ ___

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-03 Thread Ned Deily
Ned Deily added the comment: I'm removing myself as assignee as this doesn't seem to need a 3.6 RM decision at this point. If necessary, we can discuss a 3.6 backport after the issue has been resolved for 3.7. -- assignee: ned.deily -> ___ Python

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-11 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: As I currently see this: - The error message for str can be changed to the one used for other sequences 'can only concatenate str (not "type") to str' - The error message for arrays can be changed to use concatenate instead of append, too. For

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can concatenate any object supporting the buffer protocol to bytes and bytearray. Current error message for bytes looks awkward too, because it says "bytes to othertype" instead of "othertype to bytes". --

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: By default, error message wording changes are 'enhancements' that wait for the next x.y.0 release unless the current wording is positively wrong'. This is different from doc changes because there are tests depending on error messages. 'Inconsistent' or

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-06 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-06 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-01-03 Thread Xiang Zhang
Xiang Zhang added the comment: > As for `operator.concat`, any reason why the check is made beforehand to see > if the first argument has a `__getitem__` method? Concatenation is an operation of sequence (+ could be used both for concatenation and addition), so you have to check __getitem__

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Originally this issue was raised on StackOverflow: http://stackoverflow.com/questions/41388606/python-3-6-vs-3-5-typeerror-message-on-string-concatenation -- ___ Python tracker

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Different cases accept different types. Not always we can say that only one specific type is accepted. "list +" accepts only lists, "list +=" is a syntax sugar for list.extend and accepts any iterables. "bytes +" and "bytearray +=" accept any objects that

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Should that message be the one predominantly used for sequences, i.e: TypeError: can only concatenate class1 (not "class2") to class1 or should another one be used like "Unsupported operand type(s) for op: 'class1' and 'class2'? The first is

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Old error message is misleading. It implied that there are objects that can be converted to str implicitly. This was true in Python 2, but is false in Python 3. New error message conforms with TypeError messages produced by PyArg_Parse*(). It is the same

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Specifically, bytes (always, from what I could find) had this error message: >>> b'' + '' TypeError: can't concat bytes to str while str, after a change in issue26057, was made to: >>> '' + b'' TypeError: must be str, not bytes from