[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 10444778d41c by Serhiy Storchaka in branch '3.5':
Issue #27039: Fixed bytearray.remove() for values greater than 127.
https://hg.python.org/cpython/rev/10444778d41c

New changeset 9acf44b7ff7b by Serhiy Storchaka in branch '2.7':
Issue #27039: Fixed bytearray.remove() for values greater than 127.
https://hg.python.org/cpython/rev/9acf44b7ff7b

New changeset 3eb502d43616 by Serhiy Storchaka in branch 'default':
Issue #27039: Fixed bytearray.remove() for values greater than 127.
https://hg.python.org/cpython/rev/3eb502d43616

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, this is already checked in the converter.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But we first need to test that value is in the range from 0 to 255.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But we first need to test that value is in the range from 0 to 255.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka
stage:  -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread Joe Jevnik

Joe Jevnik added the comment:

This seems to just be a bug in the implementation of remove. I have a patch to 
fix this and a test case.

--
keywords: +patch
nosy: +ll
Added file: http://bugs.python.org/file42875/bytearray-remove.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread SilentGhost

SilentGhost added the comment:

Test is not catching it, because it only deals with ascii part.

--
nosy: +SilentGhost

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27039] bytearray.remove cannot remove bytes with value greater than 127

2016-05-16 Thread Damien George

New submission from Damien George:

The following code fails with a ValueError (but I expect it to succeed):

>>> bytearray([128]).remove(128)

Tested with Python 2.7.11 and 3.5.1.  Probably it's a case of comparing a char 
(signed byte) with an unsigned value.

--
components: Interpreter Core
messages: 265709
nosy: Damien George
priority: normal
severity: normal
status: open
title: bytearray.remove cannot remove bytes with value greater than 127
type: behavior
versions: Python 2.7, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com