[issue35396] Add support for __fspath__ to fnmatch.fnmatchase and filter

2018-12-05 Thread Andrés Delfino

Andrés Delfino  added the comment:

Closing, as __fspath__ returns paths and fnmatchcase/filter deals with 
filenames.

--
resolution:  -> rejected
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



[issue35396] Add support for __fspath__ to fnmatch.fnmatchase and filter

2018-12-03 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +10121
stage:  -> patch review

___
Python tracker 

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



[issue35396] Add support for __fspath__ to fnmatch.fnmatchase and filter

2018-12-03 Thread Andrés Delfino

New submission from Andrés Delfino :

Both fnmatch.fnmatchase and fnmatch.filter (in Unix) do not support path-like 
objects.

This is inconvenient, for example, when taking advantage of os.scandir and 
working with os.DirEntry objets.

Also, fnmatch.filter in Windows does support path-like objects, since it uses 
os.path.normcase (which works with path-like objects), so the change for Unix 
would add consistency.

I propose for both functions to accept path-like objects, and in the case of 
fnmatch.filter, to return the path-like object if it matches the pattern (as it 
does now for Windows).

--
components: Library (Lib)
messages: 330992
nosy: adelfino
priority: normal
severity: normal
status: open
title: Add support for __fspath__ to fnmatch.fnmatchase and filter
type: enhancement
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