Re: [Python-ideas] sys.py

2017-09-14 Thread Eric Snow
On Thu, Sep 14, 2017 at 4:26 PM, Victor Stinner wrote: > How do you crash Python? See https://bugs.python.org/issue31404. > Can't we fix the interpreter? I'm looking into it. In the meantime I've split the original branch up into 3. The first I've already landed.

Re: [Python-ideas] sys.py

2017-09-14 Thread Victor Stinner
Le 14 sept. 2017 01:01, "Eric Snow" a écrit : In the case of sys.modules, the problem is that assigning a bogus value (e.g. []) can cause the interpreter to crash. It wasn't a problem until recently when I removed PyInterpreterState.modules and made sys.modules

Re: [Python-ideas] sys.py

2017-09-13 Thread Guido van Rossum
My preference is (1), revert. You have to understand how sys.modules works before you can change it, and if you waste time debugging your mistake, so be it. I think the sys.py proposal is the wrong way to fix the mistake you made there. On Wed, Sep 13, 2017 at 4:00 PM, Eric Snow

Re: [Python-ideas] sys.py

2017-09-13 Thread Eric Snow
On Tue, Sep 12, 2017 at 9:30 PM, Guido van Rossum wrote: > I find this a disturbing trend. Which trend? Moving away from "consenting adults"? In the case of sys.modules, the problem is that assigning a bogus value (e.g. []) can cause the interpreter to crash. It wasn't a

Re: [Python-ideas] sys.py

2017-09-12 Thread Guido van Rossum
I find this a disturbing trend. I think we have bigger fish to fry and this sounds like it could slow down startup. On Tue, Sep 12, 2017 at 8:35 PM, Nick Coghlan wrote: > On 13 September 2017 at 09:46, Eric Snow > wrote: > > The sys module is a

Re: [Python-ideas] sys.py

2017-09-12 Thread Nick Coghlan
On 13 September 2017 at 09:46, Eric Snow wrote: > The sys module is a rather special case as far as modules go. It is > effectively a "console" into the interpreter's internal state and that > includes some mutable state. Since it is a module, we don't have much >

[Python-ideas] sys.py

2017-09-12 Thread Eric Snow
The sys module is a rather special case as far as modules go. It is effectively a "console" into the interpreter's internal state and that includes some mutable state. Since it is a module, we don't have much of an opportunity to: * validate values assigned to its attributes [1] * issue