[issue22276] pathlib glob issues

2014-08-29 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, it would be logical if pathlib gave special meaning to trailing slashes, 
which it (still) doesn't :-) I'm still not fond of encoding path 
characteristics in the path string itself.
(and what about symlinks? etc.)

--

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



[issue22276] pathlib glob issues

2014-08-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

What is */ supposed to do? Only select directories?

--

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



[issue22276] pathlib glob issues

2014-08-28 Thread João Guerra

João Guerra added the comment:

Yes.

--

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



[issue22276] pathlib glob issues

2014-08-28 Thread R. David Murray

R. David Murray added the comment:

Heh.  I never noticed that about shell globs, but it is logical.  Learn 
something new every day.

--
nosy: +r.david.murray

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



[issue22276] pathlib glob issues

2014-08-28 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue22276] pathlib glob issues

2014-08-26 Thread João Guerra

New submission from João Guerra:

Both fnmatch and glob support the */ glob. However, pathlib does not seem to 
handle this kind of globs correctly.

dir = Path(/a/directory/)
file = Path(/a/file)
print(dir.match(*/)) # True
print(file.match(*/)) # True

The / is being discarded by the match, resulting in incorrect matches.

Both the fnmatch and glob libraries support this correct.
print(fnmatch(/a/directory/, */)) # True
print(fnmatch(/a/file, */)) # False


Issue 21039 may be related to this.

--
components: Library (Lib)
messages: 225914
nosy: joca.bt
priority: normal
severity: normal
status: open
title: pathlib glob issues
type: behavior
versions: Python 3.4

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



[issue22276] pathlib glob issues

2014-08-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +pitrou
versions: +Python 3.5

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