[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2020-01-02 Thread Brett Cannon


Brett Cannon  added the comment:

Yep, it looks like this is fixed, Batuhan. Thanks for letting us know!

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2019-12-25 Thread Batuhan


Batuhan  added the comment:

Looks like there is nothing left after PR 1712 if I am not missing something, 
can this issue be closed?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2019-03-28 Thread miss-islington


miss-islington  added the comment:


New changeset 74510e2a57f6d4b51ac1ab4f778cd7a4c54b541e by Miss Islington (bot) 
(Wolfgang Maier) in branch 'master':
bpo-30427: eliminate redundant type checks in os.path.normcase() (GH-1712)
https://github.com/python/cpython/commit/74510e2a57f6d4b51ac1ab4f778cd7a4c54b541e


--
nosy: +miss-islington

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Brett Cannon

Brett Cannon added the comment:

The problem with leaving os.fspath() out of os.path.normcase() is that suddenly 
a single function that deals with paths won't work with path-like objects. So 
that means support for path-like objects won't implicitly work in code that 
assumes a path but doesn't explicitly go out of its way to support path-like 
objects.

--

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Does calling os.fspath() needed in normcase() at all? Is normcase() even called 
with arguments which are not just str/bytes?

--
nosy: +brett.cannon, serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Wolfgang Maier

Wolfgang Maier added the comment:

Just created a PR for this, which eliminates the redundancy. This also changes 
the error message (making it less specific), but not the type of a raised 
exception.
If you think that the error message deserves to be preserved that could, of 
course, be done too.

--
type:  -> performance

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Wolfgang Maier

Changes by Wolfgang Maier :


--
pull_requests: +1803

___
Python tracker 

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



[issue30427] isinstance checks in os.path.normcase redundant with os.fspath

2017-05-22 Thread Wolfgang Maier

New submission from Wolfgang Maier:

os.path.normcase as defined in both posixpath and ntpath is now calling 
os.fspath on its argument first. With that I think the following 
isinstance(str, bytes) checks have become redundant since AFAIU os.fspath is 
guaranteed to return either str or bytes instances.

--
components: Library (Lib)
messages: 294130
nosy: wolma
priority: normal
severity: normal
status: open
title: isinstance checks in os.path.normcase redundant with os.fspath
versions: 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