[issue29934] % formatting fails to find formatting code in bytes type after a null byte

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:

Sorry, the fix is for 3.6.2 so 3.6.1 would still suffer from it. :-(

--

___
Python tracker 

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



[issue29934] % formatting fails to find formatting code in bytes type after a null byte

2017-03-28 Thread Xiang Zhang

Xiang Zhang added the comment:

Yes, this is a regression in 3.6.0 and it has been fixed in #29714 for 3.6.1. 
Try the new version. :-)

--
nosy: +xiang.zhang
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> can't interpolate byte string with \x00 before replacement 
identifier

___
Python tracker 

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



[issue29934] % formatting fails to find formatting code in bytes type after a null byte

2017-03-28 Thread Mert Bora Alper

Changes by Mert Bora Alper :


--
components: +Interpreter Core

___
Python tracker 

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



[issue29934] % formatting fails to find formatting code in bytes type after a null byte

2017-03-28 Thread Mert Bora Alper

New submission from Mert Bora Alper:

Hello,

In Python 3.6.0, % formatting fails to find formatting code after a null byte 
in bytes type.

Example:
>>> "%s_\x00%s" % ("hello", "world")
'hello_\x00world'
>>> b"%s_\x00%s" % (b"hello", b"world")
Traceback (most recent call last):
  File "", line 1, in 
TypeError: not all arguments converted during bytes formatting

In contrast, the exact same code works as expected in Python 3.5:

>>> "%s_\x00%s" % ("hello", "world")
'hello_\x00world'
>>> b"%s_\x00%s" % (b"hello", b"world")
b'hello_\x00world'

I used Python 3.6.0 that I installed using pyenv 1.0.8 on Kubuntu 16.04 x86_64.

--
messages: 290724
nosy: boramalper
priority: normal
severity: normal
status: open
title: % formatting fails to find formatting code in bytes type after a null 
byte
type: behavior
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