[issue39691] Allow passing Pathlike objects to io.open_code

2020-05-01 Thread Steve Dower


Change by Steve Dower :


--
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



[issue39691] Allow passing Pathlike objects to io.open_code

2020-05-01 Thread miss-islington


miss-islington  added the comment:


New changeset c9d7d32b6dc6140f7fcbf1ae1120df6d59fc28d0 by Miss Islington (bot) 
in branch '3.8':
bpo-39691: Clarify io.open_code behavior (GH-19824)
https://github.com/python/cpython/commit/c9d7d32b6dc6140f7fcbf1ae1120df6d59fc28d0


--

___
Python tracker 

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



[issue39691] Allow passing Pathlike objects to io.open_code

2020-05-01 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +19158
pull_request: https://github.com/python/cpython/pull/19840

___
Python tracker 

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



[issue39691] Allow passing Pathlike objects to io.open_code

2020-05-01 Thread Steve Dower


Steve Dower  added the comment:


New changeset 831d58d7865cb98fa09227dc614f4f3ce6af968b by Shantanu in branch 
'master':
bpo-39691: Clarify io.open_code behavior (GH-19824)
https://github.com/python/cpython/commit/831d58d7865cb98fa09227dc614f4f3ce6af968b


--

___
Python tracker 

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



[issue39691] Allow passing Pathlike objects to io.open_code

2020-04-30 Thread Shantanu


Change by Shantanu :


--
keywords: +patch
nosy: +hauntsaninja
nosy_count: 3.0 -> 4.0
pull_requests: +19145
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19824

___
Python tracker 

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



[issue39691] Allow passing Pathlike objects to io.open_code

2020-02-23 Thread Steve Dower


Steve Dower  added the comment:

As per PEP 578 it only accepts absolute path str.

Requires a documentation update to clarify, as this is not the only report. And 
issue39517 should add a str() call and ensure that the path is absolute.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, steve.dower
versions: +Python 3.8

___
Python tracker 

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



[issue39691] Allow passing Pathlike objects to io.open_code

2020-02-19 Thread Maor Kleinberger


New submission from Maor Kleinberger :

As in many functions in python3, io.open_code should probably accept pathlike 
objects and not just path strings.

Below is  open_code's docstring:
> Opens the provided file with the intent to import the contents.
> This may perform extra validation beyond open(), but is otherwise 
> interchangeable with calling open(path, 'rb').

The second bit is not entirely true, as open accepts pathlike objects and 
open_code doesn't.
Fixing this will help solve future bugs and existing bugs like 
https://bugs.python.org/issue39517

I'd be happy to open a pull request if it is agreed that this should be changed.

--
components: Library (Lib)
messages: 362292
nosy: kmaork
priority: normal
severity: normal
status: open
title: Allow passing Pathlike objects to io.open_code
type: enhancement
versions: Python 3.9

___
Python tracker 

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