[issue29337] BytesWarning at compile time

2017-03-31 Thread Donald Stufft

Changes by Donald Stufft :


--
pull_requests: +915

___
Python tracker 

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



[issue29337] BytesWarning at compile time

2017-01-24 Thread STINNER Victor

STINNER Victor added the comment:

I'm surprised that removing the type from the key works. Since tests pass,
it's ok for me :-)

I'm happy that I spent time to write these tests, I'm now more confident
when this code is modified. Serhiy asked me to write these tests if I
recall correctly ;-)

--

___
Python tracker 

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



[issue29337] BytesWarning at compile time

2017-01-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch 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



[issue29337] BytesWarning at compile time

2017-01-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2bd2ef1696cf by Serhiy Storchaka in branch '3.5':
Issue #29337: Fixed possible BytesWarning when compare the code objects.
https://hg.python.org/cpython/rev/2bd2ef1696cf

New changeset f6c327f2daa6 by Serhiy Storchaka in branch '3.6':
Issue #29337: Fixed possible BytesWarning when compare the code objects.
https://hg.python.org/cpython/rev/f6c327f2daa6

New changeset 00fb30d4905d by Serhiy Storchaka in branch 'default':
Issue #29337: Fixed possible BytesWarning when compare the code objects.
https://hg.python.org/cpython/rev/00fb30d4905d

--
nosy: +python-dev

___
Python tracker 

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



[issue29337] BytesWarning at compile time

2017-01-24 Thread INADA Naoki

INADA Naoki added the comment:

LGTM

--

___
Python tracker 

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



[issue29337] BytesWarning at compile time

2017-01-23 Thread Brett Cannon

Brett Cannon added the comment:

LGTM

--
nosy: +brett.cannon

___
Python tracker 

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



[issue29337] BytesWarning at compile time

2017-01-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch fixes the issue.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file46370/constant-key-bytes-warning.patch

___
Python tracker 

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



[issue29337] BytesWarning at compile time

2017-01-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

BytesWarning can be raised during compilation.

$ ./python -Wa -b -c "lambda: 'a'; lambda: b'a'"
sys:1: BytesWarning: Comparison between bytes and string
sys:1: BytesWarning: Comparison between bytes and string
sys:1: BytesWarning: Comparison between bytes and string
sys:1: BytesWarning: Comparison between bytes and string

_PyCode_ConstantKey() should produce keys that don't allow comparing bytes with 
strings nested in tuples or frozensets. Currently it returns (tuple, ('a',), 
((str, 'a'),)) for ('a',) and (tuple, (b'a',), ((bytes, b'a'),)) for (b'a',). 
Key tuples have the same size and the same first element. Comparing second 
elements emits a BytesWarning.

--
components: Interpreter Core
messages: 285940
nosy: haypo, inada.naoki, serhiy.storchaka
priority: normal
severity: normal
status: open
title: BytesWarning at compile time
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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