Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Alexander Walters
On 4/12/2016 12:14, Sven R. Kunze wrote: I cannot remember us using another datetime library. So, I don't value this "advantage" as much as you do. They exist, and there are many cases where you would use a datetime library other than datetime for various reasons (integration in third party s

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Barry Scott
On Mon, 11 Apr 2016 14:15:02 -0700 Ethan Furman wrote: > We've pretty decided that we have two options: > > 1. remove pathlib > 2. make the stdlib work with pathlib > > So we're trying to make option 2 work before falling back to option 1. I have been doing a lot of porting to Python 3 and hav

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Chris Barker
On Tue, Apr 12, 2016 at 8:57 AM, Sven R. Kunze wrote: > As an example: time.sleep takes a number of seconds (notice the primitive > datatype just like a string) and does not take timedelta. > > Why don't we add datetime.timedelta support to time.sleep? Very same thing. yup -- and it there were

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Sven R. Kunze
On 12.04.2016 18:04, Chris Barker wrote: On Tue, Apr 12, 2016 at 7:54 AM, Sven R. Kunze > wrote: My conclusion is that these changes are not optional and tweaking os, io and shutil is just yet another workaround for a clean solution. :) Is the clean solutio

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Chris Barker
On Tue, Apr 12, 2016 at 7:54 AM, Sven R. Kunze wrote: > > My conclusion is that these changes are not optional and tweaking os, io > and shutil is just yet another workaround for a clean solution. :) > Is the clean solution to re-implement EVERYTHING in the stdlib that involves a path in a new,

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Chris Barker
one little note: On Tue, Apr 12, 2016 at 3:41 AM, Paul Moore wrote: > 4. There are further improvements that could be made to pathlib, > certainly, but again they are optional, and pathlib is fine without > them. > Exactly -- "improvements to pathlib" and "make the stdlib pathlib compatible" ar

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Sven R. Kunze
On 12.04.2016 16:59, Random832 wrote: Strings are strings. Paths are paths. That's were the difference is. Yes but why aren't these both "things that you may want to use to open a file"? Because "things that you may want to use to open a file" is a bit vague and thus conceal the fact that w

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Random832
On Tue, Apr 12, 2016, at 10:52, Sven R. Kunze wrote: > On 12.04.2016 00:56, Random832 wrote: > > Fully general re-dispatch from argument types on any call to a function > > that raises TypeError or NotImplemented? [e.g. call > > Path.__missing_func__(os.open, path, mode)] > > > > Have pathlib monke

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Donald Stufft
> On Apr 12, 2016, at 10:52 AM, Sven R. Kunze wrote: > > Path(...).open() is your friend then. I don't see why you need os.open. > > Refusing to upgrade it like saying, everything was better in the old days. So > let's use os.open instead of Path(...).open(). I think it was a mistake to have

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Sven R. Kunze
On 12.04.2016 12:41, Paul Moore wrote: As your thoughts appear to have been triggered by my comments, I feel I should clarify. 1. I like pathlib even as it is right now, and I'm strongly -1 on removing it. 2. The "external dependency" aspect of 3rd party solutions makes them far less useful to m

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Sven R. Kunze
On 12.04.2016 00:56, Random832 wrote: Fully general re-dispatch from argument types on any call to a function that raises TypeError or NotImplemented? [e.g. call Path.__missing_func__(os.open, path, mode)] Have pathlib monkey-patch things at import? Implicit conversion. No, thanks. On Mon, A

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-12 Thread Paul Moore
On 11 April 2016 at 22:21, Sven R. Kunze wrote: > On 11.04.2016 23:08, Random832 wrote: >> >> On Mon, Apr 11, 2016, at 17:04, Sven R. Kunze wrote: >>> >>> PS: The only way out that I can imagine is to fix pathlib. I am not in >>> favor of fixing functions of "os" and "os.path" to except "path" >>>

[Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Stephen J. Turnbull
Alexander Walters writes: > If there is headway being made, I do not see it. Filter out everything but the posts by Brett, and see if you still feel that way. (Other people have contributed[1], but that filter has about 20dB better S/N than the whole thread does.) Footnotes: [1] Brett may e

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Random832
On Mon, Apr 11, 2016, at 17:15, Ethan Furman wrote: > So we're trying to make option 2 work before falling back to option 1. > > If you have a way to make pathlib work with the stdlib that doesn't > involve "fixing" os and os.path, now is the time to speak up. Fully general re-dispatch from argu

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Sven R. Kunze
On 11.04.2016 23:15, Ethan Furman wrote: We've pretty decided that we have two options: 1. remove pathlib 2. make the stdlib work with pathlib So we're trying to make option 2 work before falling back to option 1. If you have a way to make pathlib work with the stdlib that doesn't involve "fi

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Ben Finney
Alexander Walters writes: > That is great news. I just couldn't see it myself in the threads Agreed. A summary posting, from someone who has a good handle on the issue and outcome, would be very helpful. -- \ “Firmness in decision is often merely a form of stupidity. It | `\i

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Sven R. Kunze
On 11.04.2016 23:05, Random832 wrote: On Mon, Apr 11, 2016, at 16:48, Sven R. Kunze wrote: On 11.04.2016 22:33, Alexander Walters wrote: If there is headway being made, I do not see it. Funny that you brought it up. I was about posting something myself. I cannot agree completely. But starting

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Sven R. Kunze
On 11.04.2016 23:08, Random832 wrote: On Mon, Apr 11, 2016, at 17:04, Sven R. Kunze wrote: PS: The only way out that I can imagine is to fix pathlib. I am not in favor of fixing functions of "os" and "os.path" to except "path" objects; Why not? It occurred to me after pondering over Paul's co

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Alexander Walters
This stance was probably already argued in the threads in question. This thread is more of a health-check. As an observer, it did not look like any headway was being made, and I suggested the solimaic solution. It has been pointed out to me that headway IS being made and they are close to a s

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Ethan Furman
On 04/11/2016 02:04 PM, Sven R. Kunze wrote: On 11.04.2016 22:55, Alexander Walters wrote: Every conceivable way to fix pathlib have already been argued. Are any of them worth doing? Can we get consensus enough to implement one of them? If not, we should consider either dropping the matter o

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Random832
On Mon, Apr 11, 2016, at 17:04, Sven R. Kunze wrote: > PS: The only way out that I can imagine is to fix pathlib. I am not in > favor of fixing functions of "os" and "os.path" to except "path" > objects; Why not? ___ Python-Dev mailing list Python-Dev@

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Sven R. Kunze
On 11.04.2016 22:55, Alexander Walters wrote: Every conceivable way to fix pathlib have already been argued. Are any of them worth doing? Can we get consensus enough to implement one of them? If not, we should consider either dropping the matter or dropping the module. Right now, I don't se

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Random832
On Mon, Apr 11, 2016, at 16:48, Sven R. Kunze wrote: > On 11.04.2016 22:33, Alexander Walters wrote: > > If there is headway being made, I do not see it. > > Funny that you brought it up. I was about posting something myself. I > cannot agree completely. But starting with a comment from Paul, I

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Alexander Walters
That is great news. I just couldn't see it myself in the threads On 4/11/2016 16:51, Ethan Furman wrote: If there is headway being made, I do not see it. It's being made, and I dare say we are close to the end. ___ Python-Dev mailing list Python-

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Alexander Walters
If i had my druthers, this thread would be kept to either: "Shut up alex, we are really close to figuring this out" or "Ok, maybe you have a point." Every conceivable way to fix pathlib have already been argued. Are any of them worth doing? Can we get consensus enough to implement one of t

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Ethan Furman
On 04/11/2016 01:33 PM, Alexander Walters wrote: In reviewing the ongoing arguments about how to make pathlib better, there have been circular arguments about if it is even broken, if it should support bytes, if there should be a path protocol that all functions that touch the filesystem should

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Sven R. Kunze
On 11.04.2016 22:33, Alexander Walters wrote: If there is headway being made, I do not see it. Funny that you brought it up. I was about posting something myself. I cannot agree completely. But starting with a comment from Paul, I realized that pathlib is something different than a string. Af

Re: [Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread marky1991 .
Neverending email chains aside, as a mere user, I like pathlib even as it is today and like the convenience of it being in the stdlib. (And would like it even more if the stdlib played nicely with it) I would be disappointed if it were taken out. (It's one of the few recent additions that I find us

[Python-Dev] Maybe, just maybe, pathlib doesn't belong.

2016-04-11 Thread Alexander Walters
In reviewing the ongoing arguments about how to make pathlib better, there have been circular arguments about if it is even broken, if it should support bytes, if there should be a path protocol that all functions that touch the filesystem should use, if that protocol should support bytes, how