Re: [Python-Dev] Thoughts on "contexts". PEPs 550, 555, 567, 568

2018-01-09 Thread Koos Zevenhoven
On Jan 10, 2018 07:17, "Yury Selivanov" wrote: Wasn't PEP 555 rejected by Guido? What's the point of this post? I sure hope there is a point. I don't think mentioning PEP 555 in the discussions should hurt. A typo in my post btw: should be "PEP 567 (+568 ?)" in the

Re: [Python-Dev] Thoughts on "contexts". PEPs 550, 555, 567, 568

2018-01-09 Thread Yury Selivanov
Wasn't PEP 555 rejected by Guido? What's the point of this post? Yury On Wed, Jan 10, 2018 at 4:08 AM Koos Zevenhoven wrote: > Hi all, > > I feel like I should write some thoughts regarding the "context" > discussion, related to the various PEPs. > > I like PEP 567 (+ 567 ?)

[Python-Dev] Thoughts on "contexts". PEPs 550, 555, 567, 568

2018-01-09 Thread Koos Zevenhoven
Hi all, I feel like I should write some thoughts regarding the "context" discussion, related to the various PEPs. I like PEP 567 (+ 567 ?) better than PEP 550. However, besides providing cvar.set(), I'm not really sure about the gain compared to PEP 555 (which could easily have e.g. a dict-like

Re: [Python-Dev] PEP 567 pre v3

2018-01-09 Thread Guido van Rossum
There are too many words here for me to follow. I'll wait a few days and then hopefully there's a new proposal that you are all in agreement with, or there are two brief alternatives that I have to choose between. On Tue, Jan 9, 2018 at 7:41 AM, Yury Selivanov wrote: >

Re: [Python-Dev] subprocess not escaping "^" on Windows

2018-01-09 Thread Barry Scott
My feeling is that the number of uses for calling cmd /c is rather limited on Windows. Certainly calling out to use the CMD builtin is not to be encouraged I'd say. Between shutil and the os module you have most of the file handling commands. Admin tools might want to run special commands, but

Re: [Python-Dev] [RELEASE] Python 3.7.0a4 is now available fortesting

2018-01-09 Thread Steve Dower
FWIW, the ansi and mbcs encodings on Windows do exactly this (as does the oem encoding with a minor twist). Feel free to reuse either alias if it makes sense, or make sure a new one also works on Windows. Top-posted from my Windows phone From: Victor Stinner Sent: Wednesday, January 10, 2018

Re: [Python-Dev] Best Python API for exposing posix_spawn

2018-01-09 Thread Brett Cannon
On Tue, 9 Jan 2018 at 02:42 Nick Coghlan wrote: > On 9 January 2018 at 20:01, Antoine Pitrou wrote: > > On Mon, 08 Jan 2018 09:11:38 + > > Pablo Galindo Salgado wrote: > >> Hi, > >> > >> I'm currently working on exposing

Re: [Python-Dev] [RELEASE] Python 3.7.0a4 is now available for testing

2018-01-09 Thread Victor Stinner
Hi, Python 3.7.0a4 includes the implementation of the PEP 538 (C locale coercion) and PEP 540 (UTF-8 Mode). Please test this Python with various locales, especially with the POSIX ("C") locale! Note: The UTF-8 Mode has a known issue with the readline module, I see how to fix it (add new

[Python-Dev] [RELEASE] Python 3.7.0a4 is now available for testing

2018-01-09 Thread Ned Deily
Python 3.7.0a4 is the last of four planned alpha releases of Python 3.7, the next feature release of Python. During the alpha phase, Python 3.7 remains under heavy development: additional features will be added and existing features may be modified or deleted. Please keep in mind that this is a

Re: [Python-Dev] PEP 567 pre v3

2018-01-09 Thread Yury Selivanov
By default, threading.local raises an AttributeError (unless you subclass it.) Similar to that and to NameErrors, I think it's a good idea for ContextVars to raise a LookupError if a variable was not explicitly set. Yury On Tue, Jan 9, 2018 at 7:15 PM Victor Stinner

Re: [Python-Dev] PEP 567 pre v3

2018-01-09 Thread Victor Stinner
2018-01-09 12:41 GMT+01:00 Yury Selivanov : > But I'd be -1 on making all ContextVars have a None default > (effectively have a "ContextVar.get(default=None)" signature. This > would be a very loose semantics in my opinion. Why do you think that it's a loose semantics?

Re: [Python-Dev] PEP 567 pre v3

2018-01-09 Thread Yury Selivanov
On Tue, Jan 9, 2018 at 11:02 AM, Nathaniel Smith wrote: > On Mon, Jan 8, 2018 at 11:34 AM, Yury Selivanov > wrote: >> 1. Proposal: ContextVar has default set to None. >> >> From the typing point of view that would mean that if a context >> variable is

Re: [Python-Dev] PEP 567 v2

2018-01-09 Thread Yury Selivanov
> On Jan 9, 2018, at 11:18 AM, Nathaniel Smith wrote: > >> On Thu, Jan 4, 2018 at 9:42 PM, Guido van Rossum wrote: >>> On Thu, Jan 4, 2018 at 7:58 PM, Nathaniel Smith wrote: >>> This does make me think that I should write up a short PEP for

Re: [Python-Dev] Best Python API for exposing posix_spawn

2018-01-09 Thread Nick Coghlan
On 9 January 2018 at 20:01, Antoine Pitrou wrote: > On Mon, 08 Jan 2018 09:11:38 + > Pablo Galindo Salgado wrote: >> Hi, >> >> I'm currently working on exposing posix_spawn in the posix module (and by >> extension in the os module). You can find the

Re: [Python-Dev] Best Python API for exposing posix_spawn

2018-01-09 Thread Antoine Pitrou
On Mon, 08 Jan 2018 09:11:38 + Pablo Galindo Salgado wrote: > Hi, > > I'm currently working on exposing posix_spawn in the posix module (and by > extension in the os module). You can find the initial implementation in > this PR: > >

Re: [Python-Dev] Best Python API for exposing posix_spawn

2018-01-09 Thread Nick Coghlan
On 9 January 2018 at 17:07, Serhiy Storchaka wrote: > 09.01.18 05:31, Nick Coghlan пише: >> As with DirEntry, I don't see any obvious value in making the new >> objects iterable though - we should be able to just use named field >> access in both the C and Python APIs. > > Do

Re: [Python-Dev] subprocess not escaping "^" on Windows

2018-01-09 Thread eryk sun
On Mon, Jan 8, 2018 at 9:26 PM, Steve Dower wrote: > On 09Jan2018 0744, eryk sun wrote: >> >> It's common to discourage using `shell=True` because it's considered >> insecure. One of the reasons to use CMD in Windows is that it tries >> ShellExecuteEx if CreateProcess