[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Rob Cliffe via Python-Dev
On 19/10/2020 12:42, Steve Dower wrote: On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _now_, while os.scandir() returns the last

[Python-Dev] Re: PEP 638: Syntactic macros

2020-10-19 Thread Dima Tisnek
Martin sent good links, I'll just add a practical example: Without macros, styled-components works like this: import styled from "styled-components"; const Label = styled.div` color: red; `; (that's a js template literal, next level after f-strings, here without any arguments) When e.g. Hi i

[Python-Dev] Re: PEP 11: Drop support for AIX releases without dlopen

2020-10-19 Thread Kevin Adler
Brett Cannon wrote: > > Updated how? AIX is not mentioned in that PEP anywhere, so I'm not quite > sure what update you're suggesting. I'm referring to https://www.python.org/dev/peps/pep-0011/#unsupporting-platforms. "If a certain platform that currently has special code in CPython is deemed to

[Python-Dev] PEP 640: Unused variable syntax.

2020-10-19 Thread Thomas Wouters
One of the problems I have with the Pattern Matching proposal (PEP 622 originally, now PEPs 634, 635, 636) is the special-casing of '_' to not actually assign to the name, which is a subtle but meaningful divergence from the rest of Python. In discussions with the authors I proposed using '?' inste

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Greg Ewing
On 20/10/20 4:52 am, Gregory P. Smith wrote: Those of us with a traditional posix filesystem background may raise eyeballs at this duplication, seeing a directory as a place that merely maps names to inodes This is probably a holdover from MS-DOS, where there was no separate inode-like structu

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Eryk Sun
On 10/19/20, Steve Dower wrote: > > Resolving the path is the most expensive part, even if the file is not > opened (I've been working with the NTFS team on this area, and we've > been benchmarking/analysing all of it). If you say it's been extensively benchmarked and there's no direct way around

[Python-Dev] Re: PEP 11: Drop support for AIX releases without dlopen

2020-10-19 Thread Brett Cannon
On Mon, Oct 19, 2020 at 2:06 PM Kevin Adler wrote: > Brett Cannon wrote: > > > AIX is not officially supported. We have tried to be helpful and > add/remove > > things over the years related to AIX (we used to have an external > > contributor who actively tried to keep AIX supported), but we don'

[Python-Dev] Re: PEP 11: Drop support for AIX releases without dlopen

2020-10-19 Thread Kevin Adler
Brett Cannon wrote: > > AIX is not officially supported. We have tried to be helpful and add/remove > things over the years related to AIX (we used to have an external > contributor who actively tried to keep AIX supported), but we don't > guarantee things work since there is no core dev available

[Python-Dev] Re: Ideas for improving the contribution experience

2020-10-19 Thread Brett Cannon
On Mon., Oct. 19, 2020, 12:33 Tal Einat, wrote: > On Mon, Oct 19, 2020 at 9:24 PM Brett Cannon wrote: > >> I think the other way to help is to really lean into automation so >> reviewing is even lighterweight than it is now. Now this can be as simple >> as to remind people when they need to rege

[Python-Dev] Re: Ideas for improving the contribution experience

2020-10-19 Thread Tal Einat
On Mon, Oct 19, 2020 at 9:24 PM Brett Cannon wrote: > I think the other way to help is to really lean into automation so > reviewing is even lighterweight than it is now. Now this can be as simple > as to remind people when they need to regenerate a file like 'configure' > via a status check, sim

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Eryk Sun
On 10/19/20, Steve Dower wrote: > On 19Oct2020 1242, Steve Dower wrote: >> On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: >>> TLDR: In os.scandir directory entries, atime is always a copy of mtime >>> rather than the actual access time. >> >> Correction - os.stat() updates the access time to

[Python-Dev] Pickle for C extension?

2020-10-19 Thread Marco Sulla
TL;DR Is it possible to use C code to implement the (un)pickling of an type written in a C extension, as it was written in _pickle.c? Long explaining: I'm trying to create a C extension for frozendict. For simplicity, first I wrote it in CPython, then I started to move it in a C extension. It seem

[Python-Dev] Re: Ideas for improving the contribution experience

2020-10-19 Thread Brett Cannon
I think the other way to help is to really lean into automation so reviewing is even lighterweight than it is now. Now this can be as simple as to remind people when they need to regenerate a file like 'configure' via a status check, simply telling people when their PR failed a status check, or go

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Steve Dower
On 19Oct2020 1846, Eryk Sun wrote: On 10/19/20, Steve Dower wrote: On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _now_, while os.

[Python-Dev] Re: PEP 11: Drop support for AIX releases without dlopen

2020-10-19 Thread Brett Cannon
On Fri, Oct 16, 2020 at 2:52 PM Kevin Adler wrote: > Interesting. Given that, shouldn't PEP 11 be updated with that change? > Seems to me that PEP 11 only documents platforms with *official support*, > so is AIX officially supported? The comment in the issue would indicate it > is not officially

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Eryk Sun
On 10/19/20, Steve Dower wrote: > On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: >> TLDR: In os.scandir directory entries, atime is always a copy of mtime >> rather than the actual access time. > > Correction - os.stat() updates the access time to _now_, while > os.scandir() returns the last

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Steve Dower
On 19Oct2020 1652, Gregory P. Smith wrote: I'm sure this is covered in MSDN.  Linking to that if it has it in a concise explanation would make sense from a note in our docs. Probably unlikely :) I'm pretty sure this started "perfect" and was then wound back to improve performance. But it's alm

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Mats Wichmann
On 10/19/20 9:52 AM, Gregory P. Smith wrote: > > > On Mon, Oct 19, 2020 at 6:28 AM Ivan Pozdeev via Python-Dev > mailto:python-dev@python.org>> wrote: > > > On 19.10.2020 14:47, Steve Dower wrote: > > On 19Oct2020 1242, Steve Dower wrote: > >> On 15Oct2020 2239, Rob Cliffe via Pytho

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Gregory P. Smith
On Mon, Oct 19, 2020 at 6:28 AM Ivan Pozdeev via Python-Dev < python-dev@python.org> wrote: > > On 19.10.2020 14:47, Steve Dower wrote: > > On 19Oct2020 1242, Steve Dower wrote: > >> On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: > >>> TLDR: In os.scandir directory entries, atime is always a

[Python-Dev] Re: PEP 638: Syntactic macros

2020-10-19 Thread Martin (gzlist) via Python-Dev
On Fri, 16 Oct 2020 at 23:22, Guido van Rossum wrote: > > Dima, > > Do you have a link to "babel macros"? Searching for that brought up several > different things; not being a frequent JS user I don't know how to filter > these. These links should help: https://babeljs.io/blog/2017/09/11/zero-

[Python-Dev] Re: PEP 638: Syntactic macros

2020-10-19 Thread Random832
On Fri, Oct 16, 2020, at 18:59, Dan Stromberg wrote: > The complexity of a language varies with the square of its feature > count, Says who? I'd assume the orthogonality and regularity of features matters at least as much if not more than the number of features, and providing a system like this

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Random832
On Mon, Oct 19, 2020, at 07:42, Steve Dower wrote: > On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: > > TLDR: In os.scandir directory entries, atime is always a copy of mtime > > rather than the actual access time. > > Correction - os.stat() updates the access time to _now_, while > os.scan

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Ivan Pozdeev via Python-Dev
On 19.10.2020 14:47, Steve Dower wrote: On 19Oct2020 1242, Steve Dower wrote: On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _no

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Steve Dower
On 19Oct2020 1242, Steve Dower wrote: On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _now_, while os.scandir() returns the last acc

[Python-Dev] Re: os.scandir bug in Windows?

2020-10-19 Thread Steve Dower
On 15Oct2020 2239, Rob Cliffe via Python-Dev wrote: TLDR: In os.scandir directory entries, atime is always a copy of mtime rather than the actual access time. Correction - os.stat() updates the access time to _now_, while os.scandir() returns the last access time without updating it. Eryk re