Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Nick Coghlan
On 6 June 2017 at 10:59, Nathaniel Smith wrote: > On Jun 5, 2017 7:01 AM, "Nick Coghlan" wrote: > > On 5 June 2017 at 21:44, Donald Stufft wrote: >> Is pip allowed to use the hypothetical _ensurepip_ssl outside of >> ensurepip? > > Yes, so something like _tls_bootstrap would probably be a better

Re: [Python-Dev] The untuned tunable parameter ARENA_SIZE

2017-06-05 Thread Tim Peters
[Larry] > ... > Oh! I thought it also allocated the arenas themselves, in a loop. I > thought I saw that somewhere. Happy to be proved wrong... There is a loop in `new_arena()`, but it doesn't do what a casual glance may assume it's doing ;-) It's actually looping over the newly-allocated teen

Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Nathaniel Smith
On Jun 5, 2017 7:01 AM, "Nick Coghlan" wrote: On 5 June 2017 at 21:44, Donald Stufft wrote: > Is pip allowed to use the hypothetical _ensurepip_ssl outside of ensurepip? Yes, so something like _tls_bootstrap would probably be a better name for the helper module (assuming we go down the "private

Re: [Python-Dev] The untuned tunable parameter ARENA_SIZE

2017-06-05 Thread Larry Hastings
On 06/04/2017 01:18 PM, Tim Peters wrote: [Larry Hastings ] ... Yet CPython's memory consumption continues to grow. By the time a current "trunk" build of CPython reaches the REPL prompt it's already allocated 16 arenas. I'd be surprised if that's true ;-) The first time `new_arena()` is cal

Re: [Python-Dev] PEP 544: Protocols - second round

2017-06-05 Thread Guido van Rossum
On Fri, Jun 2, 2017 at 3:10 PM, Ivan Levkivskyi wrote: > On 1 June 2017 at 00:10, Guido van Rossum wrote: > >> >> On Wed, May 31, 2017 at 2:16 AM, Ivan Levkivskyi >> wrote: >> >>> On 31 May 2017 at 00:58, Guido van Rossum wrote: >>> [...] >>> >>> Thank you for very detailed answers! I have pra

Re: [Python-Dev] The untuned tunable parameter ARENA_SIZE

2017-06-05 Thread Gregory P. Smith
On Fri, Jun 2, 2017 at 12:33 PM Larry Hastings wrote: > > On 06/02/2017 02:46 AM, Victor Stinner wrote: > > I would be curious of another test: use pymalloc for objects larger > than 512 bytes. For example, allocate up to 4 KB? > > In the past, we already changed the maximum size from 256 to 512

Re: [Python-Dev] PEP 7 and braces { .... } on if

2017-06-05 Thread MRAB
On 2017-06-05 13:00, Skip Montanaro wrote: On Mon, Jun 5, 2017 at 12:41 AM, Serhiy Storchaka wrote: Barry and Victor prefer moving a brace on a new line in all multiline conditional cases. I think that it should be done only when the condition continuation lines and the following block of the c

Re: [Python-Dev] PEP 7 and braces { .... } on if

2017-06-05 Thread Ethan Furman
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "invalid escape sequence '\\%c'", *first_invalid_escape) < 0) { Py_DECREF(result); return NULL; } What other core developers think about this?

Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Nick Coghlan
On 5 June 2017 at 21:44, Donald Stufft wrote: > Is pip allowed to use the hypothetical _ensurepip_ssl outside of ensurepip? Yes, so something like _tls_bootstrap would probably be a better name for the helper module (assuming we go down the "private API to bootstrap 3rd party SSL modules" path).

Re: [Python-Dev] PEP 7 and braces { .... } on if

2017-06-05 Thread Skip Montanaro
On Mon, Jun 5, 2017 at 12:41 AM, Serhiy Storchaka wrote: > Barry and Victor prefer moving a brace on a new line in all multiline > conditional cases. I think that it should be done only when the condition > continuation lines and the following block of the code have the same > indentation (as in t

Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Donald Stufft
> On Jun 5, 2017, at 7:00 AM, Nick Coghlan wrote: > > On 5 June 2017 at 18:42, Cory Benfield > wrote: >> On 3 Jun 2017, at 07:25, Nick Coghlan wrote: >> As a result, as awkward and annoying as it would be, I'm wondering if >> the structure of the requests migration ma

Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Cory Benfield
> On 5 Jun 2017, at 12:00, Nick Coghlan wrote: > > Would you be OK with the notion of a "just for pip bootstrapping" > private backend in _ensurepip_ssl? > > That is, the only officially supported async-backed requests > configuration on Py2 would be with the PyOpenSSL dependency installed, > b

Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Nick Coghlan
On 5 June 2017 at 18:42, Cory Benfield wrote: > On 3 Jun 2017, at 07:25, Nick Coghlan wrote: > As a result, as awkward and annoying as it would be, I'm wondering if > the structure of the requests migration may need to be something like: > > - switch unconditionally to an async backend on Py3 > -

Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Cory Benfield
> On 3 Jun 2017, at 07:25, Nick Coghlan wrote: > > As a result, as awkward and annoying as it would be, I'm wondering if > the structure of the requests migration may need to be something like: > > - switch unconditionally to an async backend on Py3 > - switch conditionally to an async backend

Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Cory Benfield
> On 2 Jun 2017, at 17:59, Donald Stufft wrote: > > I suspect (though I’d let him speak for himself) that Cory would rather > continue to be sync only than require pip to go back to not using requests. We are not wedded to supporting pip, but I think the interaction between the two tools is p

Re: [Python-Dev] RFC: Backport ssl.MemoryBIO and ssl.SSLObject to Python 2.7

2017-06-05 Thread Cory Benfield
> On 2 Jun 2017, at 17:39, Nick Coghlan wrote: > > On 3 June 2017 at 02:22, Donald Stufft wrote: >> It’s not just bootstrapping that pip has a problem with for C extensions, it >> also prevents upgrading PyOpenSSL on Windows because having pip import >> PyOpenSSL locks the .dll, and we can’t de

Re: [Python-Dev] PEP 7 and braces { .... } on if

2017-06-05 Thread Stefan Behnel
Serhiy Storchaka schrieb am 03.06.2017 um 18:25: > Yet about braces. PEP 7 implicitly forbids breaking the line before an > opening brace. An opening brace should stay at the end the line of the > outer compound statement. > > if (mro != NULL) { > ... > } > else { > ...