Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-05-11 Thread Georg Brandl
I'm happy with the latest version. Georg On 05/11/2016 06:46 PM, Guido van Rossum wrote: > If the authors are happy I'll accept it right away. > > (I vaguely recall there's another PEP that's ready for pronouncement -- but > which one?) > > On Wed, May 11, 2016 at 9:34 AM, Brett Cannon

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Serhiy Storchaka
On 12.05.16 01:13, Brett Cannon wrote: On Wed, 11 May 2016 at 13:45 Serhiy Storchaka > wrote: On 11.05.16 19:43, Brett Cannon wrote: > os.path > ''' > > The various path-manipulation functions of ``os.path``

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Serhiy Storchaka
On 11.05.16 23:51, Ethan Furman wrote: On 05/11/2016 01:44 PM, Serhiy Storchaka wrote: I afraid that this will hit a performance. Some os.path functions are used in tight loops, they are hard optimized, and adding support of path protocol can have visible negative effect. Do you have an

Re: [Python-Dev] ctypes compatibility with 2.3

2016-05-11 Thread Martin Panter
On 12 May 2016 at 01:05, Brett Cannon wrote: > > > On Wed, 11 May 2016 at 09:28 Brett Cannon wrote: >> >> On Wed, 11 May 2016 at 09:07 Thomas Heller wrote: >>> >>> Am 11.05.2016 um 18:04 schrieb Brett Cannon: >>> > >>> > >>> > On Wed, 11

Re: [Python-Dev] ctypes compatibility with 2.3

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 09:28 Brett Cannon wrote: > On Wed, 11 May 2016 at 09:07 Thomas Heller wrote: > >> Am 11.05.2016 um 18:04 schrieb Brett Cannon: >> > >> > >> > On Wed, 11 May 2016 at 04:35 Thomas Heller > >

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 15:13 Brett Cannon wrote: > On Wed, 11 May 2016 at 13:45 Serhiy Storchaka wrote: > >> On 11.05.16 19:43, Brett Cannon wrote: >> > os.path >> > ''' >> > >> > The various path-manipulation functions of ``os.path`` [#os-path]_ >> >

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 16:08 Koos Zevenhoven wrote: > On Thu, May 12, 2016 at 1:13 AM, Brett Cannon wrote: > > > > > > On Wed, 11 May 2016 at 13:45 Serhiy Storchaka > wrote: > >> > >> On 11.05.16 19:43, Brett Cannon wrote: > >> >

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Ethan Furman
On 05/11/2016 05:13 PM, Arthur Darcet wrote: os.path.getmtime could be used in a tight loop, to sync directories with a lot of files for instance. % python3 -m timeit -s "import os.path; p = 'out'" "hasattr(p, '__fspath__'), os.path.getmtime(p)" 10 loops, best of 3: 2.67 usec per loop %

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Arthur Darcet
On 11 May 2016 at 22:51, Ethan Furman wrote: > On 05/11/2016 01:44 PM, Serhiy Storchaka wrote: > > os.path >>> ''' >>> >>> The various path-manipulation functions of ``os.path`` [#os-path]_ >>> will be updated to accept path objects. For polymorphic functions that >>>

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Koos Zevenhoven
On Thu, May 12, 2016 at 2:53 AM, Koos Zevenhoven wrote: > On Thu, May 12, 2016 at 2:49 AM, Koos Zevenhoven wrote: >> On Thu, May 12, 2016 at 2:05 AM, Ethan Furman wrote: >>> On 05/11/2016 03:13 PM, Brett Cannon wrote: >>> If [...] I

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Koos Zevenhoven
On Thu, May 12, 2016 at 2:49 AM, Koos Zevenhoven wrote: > On Thu, May 12, 2016 at 2:05 AM, Ethan Furman wrote: >> On 05/11/2016 03:13 PM, Brett Cannon wrote: >> >>> If [...] I would drop os.path changes and make os.fspath() do what >> >>> Ethan and Koos

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Koos Zevenhoven
On Thu, May 12, 2016 at 2:05 AM, Ethan Furman wrote: > On 05/11/2016 03:13 PM, Brett Cannon wrote: > >> If [...] I would drop os.path changes and make os.fspath() do what > >> Ethan and Koos have suggested and simply pass through without checks >> >> whatever path.__fspath__()

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Koos Zevenhoven
On Thu, May 12, 2016 at 1:13 AM, Brett Cannon wrote: > > > On Wed, 11 May 2016 at 13:45 Serhiy Storchaka wrote: >> >> On 11.05.16 19:43, Brett Cannon wrote: >> > os.path >> > ''' >> > >> > The various path-manipulation functions of ``os.path``

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Ethan Furman
On 05/11/2016 03:13 PM, Brett Cannon wrote: If [...] I would drop os.path changes and make os.fspath() do what > Ethan and Koos have suggested and simply pass through without checks whatever path.__fspath__() returned if the argument wasn't str or bytes. Not to derail the conversation too

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 13:45 Serhiy Storchaka wrote: > On 11.05.16 19:43, Brett Cannon wrote: > > os.path > > ''' > > > > The various path-manipulation functions of ``os.path`` [#os-path]_ > > will be updated to accept path objects. For polymorphic functions that > >

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 14:29 Nikolaus Rath wrote: > On May 11 2016, Brett Cannon wrote: > > This PEP proposes a protocol for classes which represent a file system > > path to be able to provide a ``str`` or ``bytes`` representation. > [...] > > As I said

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Ethan Furman
On 05/11/2016 02:28 PM, Nikolaus Rath wrote: On May 11 2016, Brett Cannon wrote: This PEP proposes a protocol for classes which represent a file system path to be able to provide a ``str`` or ``bytes`` representation. [...] As I said before, to me this seems like a lot of effort for a very

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Koos Zevenhoven
On Thu, May 12, 2016 at 12:28 AM, Nikolaus Rath wrote: > On May 11 2016, Brett Cannon wrote: >> This PEP proposes a protocol for classes which represent a file system >> path to be able to provide a ``str`` or ``bytes`` representation. > [...] > > As I said

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Nikolaus Rath
On May 11 2016, Brett Cannon wrote: > This PEP proposes a protocol for classes which represent a file system > path to be able to provide a ``str`` or ``bytes`` representation. [...] As I said before, to me this seems like a lot of effort for a very specific use-case. So let me

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Koos Zevenhoven
On Thu, May 12, 2016 at 12:15 AM, Ethan Furman wrote: > On 05/11/2016 01:51 PM, Ethan Furman wrote: >> >> On 05/11/2016 01:44 PM, Serhiy Storchaka wrote: > > os.path ''' The various path-manipulation functions of ``os.path`` [#os-path]_ will be

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Ethan Furman
On 05/11/2016 01:51 PM, Ethan Furman wrote: On 05/11/2016 01:44 PM, Serhiy Storchaka wrote: os.path ''' The various path-manipulation functions of ``os.path`` [#os-path]_ will be updated to accept path objects. For polymorphic functions that accept both bytes and strings, they will be

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Koos Zevenhoven
On Wed, May 11, 2016 at 11:04 PM, Brett Cannon wrote: > A quick comment about sending me fixes. While I do appreciate them, sending > them as a pull request is much easier for me as (a) I don't have to hunt the > changes down in the text, and (b) you will see the fixes others

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Ethan Furman
On 05/11/2016 01:44 PM, Serhiy Storchaka wrote: os.path ''' The various path-manipulation functions of ``os.path`` [#os-path]_ will be updated to accept path objects. For polymorphic functions that accept both bytes and strings, they will be updated to simply use code very much similar to

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Serhiy Storchaka
On 11.05.16 19:43, Brett Cannon wrote: os.path ''' The various path-manipulation functions of ``os.path`` [#os-path]_ will be updated to accept path objects. For polymorphic functions that accept both bytes and strings, they will be updated to simply use code very much similar to

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Brett Cannon
A quick comment about sending me fixes. While I do appreciate them, sending them as a pull request is much easier for me as (a) I don't have to hunt the changes down in the text, and (b) you will see the fixes others have done already to the PEP and I then don't have to figure out what changes

Re: [Python-Dev] Slow downloads from python.org

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 10:56 Dima Tisnek wrote: > Sorry, this is probably wrong place to ask, but is it only me? > I can't get more than 40KB/s downloading from python.org It's just you or the problem has passed; just downloaded much faster than 40KB/s.

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 10:49 Guido van Rossum wrote: > On Wed, May 11, 2016 at 10:28 AM, Brett Cannon wrote: > >> >> >> On Wed, 11 May 2016 at 09:47 Guido van Rossum wrote: >> >>> If the authors are happy I'll accept it right away. >>> >>>

[Python-Dev] Slow downloads from python.org

2016-05-11 Thread Dima Tisnek
Sorry, this is probably wrong place to ask, but is it only me? I can't get more than 40KB/s downloading from python.org ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-05-11 Thread Guido van Rossum
On Wed, May 11, 2016 at 10:28 AM, Brett Cannon wrote: > > > On Wed, 11 May 2016 at 09:47 Guido van Rossum wrote: > >> If the authors are happy I'll accept it right away. >> >> (I vaguely recall there's another PEP that's ready for pronouncement -- >> but

Re: [Python-Dev] file system path protocol PEP

2016-05-11 Thread Koos Zevenhoven
**another deep, calming breath** On Wed, May 11, 2016 at 7:43 PM, Brett Cannon wrote: > Open Issues > === > > Should os.fspath() return bytes? > > In most cases, it of course should not. The section (or the title) do not represent my

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 09:47 Guido van Rossum wrote: > If the authors are happy I'll accept it right away. > > (I vaguely recall there's another PEP that's ready for pronouncement -- > but which one?) > PEP 509 is the only one I can think of. -Brett > > On Wed, May 11, 2016

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-05-11 Thread Guido van Rossum
If the authors are happy I'll accept it right away. (I vaguely recall there's another PEP that's ready for pronouncement -- but which one?) On Wed, May 11, 2016 at 9:34 AM, Brett Cannon wrote: > Is there anything holding up PEP 515 at this point in terms of acceptance > or

[Python-Dev] file system path protocol PEP

2016-05-11 Thread Brett Cannon
**deep, calming breath** Here is the PEP for __fspath__(). The draft lives at https://github.com/brettcannon/path-pep so feel free to send me PRs for spelling mistakes, grammatical errors, etc. - PEP: NNN Title: Adding a file system path protocol Version: $Revision$ Last-Modified: $Date$

Re: [Python-Dev] PEP 515: Underscores in Numeric Literals (revision 3)

2016-05-11 Thread Brett Cannon
Is there anything holding up PEP 515 at this point in terms of acceptance or implementation? On Sat, 19 Mar 2016 at 11:56 Guido van Rossum wrote: > All that sounds fine! > > On Sat, Mar 19, 2016 at 11:28 AM, Stefan Krah wrote: > > Guido van Rossum

Re: [Python-Dev] ctypes compatibility with 2.3

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 09:07 Thomas Heller wrote: > Am 11.05.2016 um 18:04 schrieb Brett Cannon: > > > > > > On Wed, 11 May 2016 at 04:35 Thomas Heller > > wrote: > > > > Am 10.05.2016 um 19:39 schrieb Brett Cannon: > >

Re: [Python-Dev] ctypes compatibility with 2.3

2016-05-11 Thread Meador Inge
On Wed, May 11, 2016 at 11:07 AM, Thomas Heller wrote: Cool. While you're at it, the compatibility restriction for modulefinder > could also be lifted. +1 The question of modulefinder actually came up recently*: http://bugs.python.org/issue26881 -- Meador * Posting

Re: [Python-Dev] ctypes compatibility with 2.3

2016-05-11 Thread Thomas Heller
Am 11.05.2016 um 18:04 schrieb Brett Cannon: On Wed, 11 May 2016 at 04:35 Thomas Heller > wrote: Am 10.05.2016 um 19:39 schrieb Brett Cannon: > > > On Tue, 10 May 2016 at 01:18 Martin Panter

Re: [Python-Dev] ctypes compatibility with 2.3

2016-05-11 Thread Brett Cannon
On Wed, 11 May 2016 at 04:35 Thomas Heller wrote: > Am 10.05.2016 um 19:39 schrieb Brett Cannon: > > > > > > On Tue, 10 May 2016 at 01:18 Martin Panter > > wrote: > > > > I am working on

Re: [Python-Dev] ctypes compatibility with 2.3

2016-05-11 Thread Thomas Heller
Am 10.05.2016 um 19:39 schrieb Brett Cannon: On Tue, 10 May 2016 at 01:18 Martin Panter > wrote: I am working on , to fix shell injection problems with ctypes.util.find_library(). The proposal for