Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

On 03/30/2012 03:02 PM, Guido van Rossum wrote:
Hey Etienne, I am honestly trying to understand your contribution but you seem to have started a discussion about free speech. Trust me that we don't mind your contributions, we're just trying to understand what you're saying, and the free speech discussion isn't helping with that.
I agree.
So if you have a comment on the dict mutation problem, please say so.
OK.
If you need help understanding the problem, python-dev is not the place to ask questions; you could ask on the bug, or on the core-mentorship list as Nick suggested. But please stop bringing up free speech, that's not an issue.
Guido, thanks for the wisdom and clarity of your reasoning. I really appreciate a positive attitude towards questioning not so obvious problems. So far I was only attempting to verify whether this is related to PEP-416 or not. If this is indeed related PEP 416, then I must obviously attest that I must still understand why a immutable dict would prevent this bug or not... Either ways, I fail to see where this is OT or should be discussed on a more obscur forum than python-dev. :-) Kind regards, Etienne

On Fri, 30 Mar 2012 15:13:36 -0400, Etienne Robillard <animelovin@gmail.com> wrote:
So far I was only attempting to verify whether this is related to PEP-416 or not. If this is indeed related PEP 416, then I must obviously attest that I must still understand why a immutable dict would prevent this bug or not...
OK, that seems to be the source of your confusion, then. This has nothing to do with PEP-416. We are talking about issue Issue 14417 (like it says in the subject), which in turn is a reaction to the fix for issue 14205. --David

On 03/30/2012 03:25 PM, R. David Murray wrote:
On Fri, 30 Mar 2012 15:13:36 -0400, Etienne Robillard<animelovin@gmail.com> wrote:
So far I was only attempting to verify whether this is related to PEP-416 or not. If this is indeed related PEP 416, then I must obviously attest that I must still understand why a immutable dict would prevent this bug or not...
OK, that seems to be the source of your confusion, then. This has nothing to do with PEP-416.
We are talking about issue Issue 14417 (like it says in the subject), which in turn is a reaction to the fix for issue 14205.
--David
Don't be so naive, David. This issue is more likely related to immutable dicts whether you like it or not, otherwise there would be no need to patch python 3.3 and include a new dict proxy type without exposing it fully. And secondly this is not only a speculation but my humble understanding of the interdependencies which seems to be related to the inclusion of a new dict proxy (immutable) mapper affecting invariably code expecting a mutable dictionary lookup to succeed whenever the dict structure has changed by (ie) overriding __hash__. Now if you don't mind, I don't mind to remind you how cell phones can be unsafe on an extended period of times for your health and brain so I really don't recommend their uses for cloud-based platforms requiring more advanced thread locking mecanism than what is being included in traditional CPython using standard (mutable) dicts. Regards, Etienne

On Fri, Mar 30, 2012 at 12:13 PM, Etienne Robillard <animelovin@gmail.com> wrote:
On 03/30/2012 03:02 PM, Guido van Rossum wrote:
Hey Etienne, I am honestly trying to understand your contribution but you seem to have started a discussion about free speech. Trust me that we don't mind your contributions, we're just trying to understand what you're saying, and the free speech discussion isn't helping with that.
I agree.
So if you have a comment on the dict mutation problem, please say so.
OK.
If you need help understanding the problem, python-dev is not the place to ask questions; you could ask on the bug, or on the core-mentorship list as Nick suggested. But please stop bringing up free speech, that's not an issue.
Guido, thanks for the wisdom and clarity of your reasoning. I really appreciate a positive attitude towards questioning not so obvious problems.
So far I was only attempting to verify whether this is related to PEP-416 or not. If this is indeed related PEP 416, then I must obviously attest that I must still understand why a immutable dict would prevent this bug or not...
It's not related to PEP 416 (which was rejected). Please refer to http://bugs.python.org/issue14417 for the issue being discussed.
Either ways, I fail to see where this is OT or should be discussed on a more obscur forum than python-dev. :-)
We need to keep that list clear for important discussions. It is the only channel that the core Python developers have. If it has too much noise people will stop reading it and it stops functioning. Hence, we try to keep questions from newbies to a minimum -- there are other places where we welcome such questions though. So, once more, if you don't understand the issue and cannot figure it out by reading up, please ask somewhere else (or just accept that you don't have anything to contribute to this particular issue). This includes explaining basic terms like "mutate". On the other hand, if you *do* understand the problem, by all means let us know what you think of the question at hand (whether the change referred to in the issue is going to break people's code or not). We don't need more speculation though; that's how we got here in the first place (my speculation that it's not going to be an issue vs. RDM's speculation that it's going to cause widespread havoc :-). I hope you understand. -- --Guido van Rossum (python.org/~guido)

On 03/30/2012 03:27 PM, Guido van Rossum wrote:
On Fri, Mar 30, 2012 at 12:13 PM, Etienne Robillard <animelovin@gmail.com> wrote:
On 03/30/2012 03:02 PM, Guido van Rossum wrote:
Hey Etienne, I am honestly trying to understand your contribution but you seem to have started a discussion about free speech. Trust me that we don't mind your contributions, we're just trying to understand what you're saying, and the free speech discussion isn't helping with that.
I agree.
So if you have a comment on the dict mutation problem, please say so.
OK.
If you need help understanding the problem, python-dev is not the place to ask questions; you could ask on the bug, or on the core-mentorship list as Nick suggested. But please stop bringing up free speech, that's not an issue.
Guido, thanks for the wisdom and clarity of your reasoning. I really appreciate a positive attitude towards questioning not so obvious problems.
So far I was only attempting to verify whether this is related to PEP-416 or not. If this is indeed related PEP 416, then I must obviously attest that I must still understand why a immutable dict would prevent this bug or not...
It's not related to PEP 416 (which was rejected). Please refer to http://bugs.python.org/issue14417 for the issue being discussed.
Either ways, I fail to see where this is OT or should be discussed on a more obscur forum than python-dev. :-)
We need to keep that list clear for important discussions. It is the only channel that the core Python developers have. If it has too much noise people will stop reading it and it stops functioning. Hence, we try to keep questions from newbies to a minimum -- there are other places where we welcome such questions though.
So, once more, if you don't understand the issue and cannot figure it out by reading up, please ask somewhere else (or just accept that you don't have anything to contribute to this particular issue). This includes explaining basic terms like "mutate". On the other hand, if you *do* understand the problem, by all means let us know what you think of the question at hand (whether the change referred to in the issue is going to break people's code or not). We don't need more speculation though; that's how we got here in the first place (my speculation that it's not going to be an issue vs. RDM's speculation that it's going to cause widespread havoc :-).
I hope you understand.
No, not really. Anyways, I guess I'll have to further dig down why is PEP-416 is really important to Python and why it was likewise rejected, supposing I confused the pep 416 and issue 14417 along the way.. :-) CHeers, Etienne

No, not really. Anyways, I guess I'll have to further dig down why is PEP-416 is really important to Python and why it was likewise rejected, supposing I confused the pep 416 and issue 14417 along the way.. :-)
The frozendict builtin type was rejected, but we are going to add types.MappingProxyType: see issue #14386. types.MappingProxyType(mydict.copy()) is very close to the frozendict builtin type. Victor

The frozendict builtin type was rejected, but we are going to add types.MappingProxyType: see issue #14386. types.MappingProxyType(mydict.copy()) is very close to the frozendict builtin type.
Victor
Thanks, Victor. :) Will this mean the new dict subclass for CPython will not expose dictproxy to favorize a new types.MappingProxyType type to emulate immutable-like types ? What could be then consequences for code still expecting a non-mutable dict() type ? Therefore I guess this ticket provides more than just speculating points to reconsider such aliased types in cpython. I also found this article quite useful: http://www.cs.toronto.edu/~tijmen/programming/immutableDictionaries.html Yet I might miss how this "new dict" type could potentially induce a RuntimeError unless in python 3.3 a new dict proxy alias is introduced to perform invariant operations in non thread-safe code. Regards, Etienne

On Sat, 31 Mar 2012 07:43:28 -0400, Etienne Robillard <animelovin@gmail.com> wrote:
Yet I might miss how this "new dict" type could potentially induce a RuntimeError unless in python 3.3 a new dict proxy alias is introduced to perform invariant operations in non thread-safe code.
Etienne, again: issue 14417 has *nothing* to do with immutable dicts. Please carefully read over issue 14205 in order to understand what we are talking about so that you can contribute to the discussion. --David
participants (4)
-
Etienne Robillard
-
Guido van Rossum
-
R. David Murray
-
Victor Stinner