[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-11-02 Thread Berker Peksag

Berker Peksag  added the comment:

Thanks! I went ahead and merged PR 3420 since Łukasz (the configparser 
maintainer) has accepted the idea.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type: behavior -> enhancement

___
Python tracker 

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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-11-02 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset e314853d57450b2b9523157eebd405289a795a0e by Berker Peksag 
(Vincent Michel) in branch 'master':
bpo-31307: Make ConfigParser.read() accept bytes objects (GH-3420)
https://github.com/python/cpython/commit/e314853d57450b2b9523157eebd405289a795a0e


--
nosy: +berker.peksag

___
Python tracker 

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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-09-07 Thread Vincent Michel

Changes by Vincent Michel :


--
pull_requests: +3417

___
Python tracker 

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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-09-03 Thread David Ellis

David Ellis added the comment:

This is related to the issue I'd brought up previously here so closing this 
would also close that issue: http://bugs.python.org/issue29627

I did originally attempt to add support for bytes in PR where I added support 
for Path-like objects: 
https://github.com/python/cpython/pull/242 but I was asked to take it back out.

--
nosy: +David Ellis

___
Python tracker 

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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-09-01 Thread Łukasz Langa

Łukasz Langa added the comment:

Good catch. Supporting bytes passed as a path is a reasonable request since the 
builtin `open()` supports this, too. Go ahead and create a pull request! We 
only need to modify line 690 to also list `bytes`.

--

___
Python tracker 

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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-08-31 Thread Henk-Jaap Wagenaar

Changes by Henk-Jaap Wagenaar :


--
nosy: +Henk-Jaap Wagenaar

___
Python tracker 

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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-08-30 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue31307] ConfigParser.read silently fails if filenames argument is a byte string

2017-08-30 Thread Vincent Michel

New submission from Vincent Michel:

Calling `config_parser.read` with `'test'` is equivalent to:

config_parser.read(['test'])

while calling `config_parser.read` with `b'test'` is treated as:

config_parser.read([116, 101, 115, 116])

which means python will try to open the file descriptors 101, 115 and 116.

I don't know if byte path should be supported, but this is probably not the 
expected behavior.

The method code: 
https://github.com/python/cpython/blob/master/Lib/configparser.py#L678-L702

--
components: Library (Lib)
messages: 301026
nosy: vxgmichel
priority: normal
severity: normal
status: open
title: ConfigParser.read silently fails if filenames argument is a byte string
type: behavior
versions: Python 3.7

___
Python tracker 

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