[Python-Dev] Accepting PEP 415 (alternative implementation strategy for PEP 409's "raise exc from None" syntax)

2012-05-14 Thread Nick Coghlan
As the subject line says, as Guido's delegate, I'm accepting
Benjamin's PEP 415 with the current reference implementation. This PEP
changes the implementation of the new "raise exc from None" syntax to
eliminate the use of Ellipsis as a "not set" sentinel value in favour
of a separate "__suppress_context__" attribute on exceptions. This new
flag defaults to False, but is implicitly set to True whenever a value
is assigned to __cause__ (regardless of whether that happens via
direct assignment , the new syntax or the C API).

The question of how the builtin and standard library exception display
routines should handle the cause where both __cause__ and __context__
are set and __suppress_context__ has been explicitly set to False will
be decided independently of the PEP acceptance (see
http://bugs.python.org/issue14805).

Regards,
Nick.

-- 
Nick Coghlan   |   [email protected]   |   Brisbane, Australia
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Accepting PEP 415 (alternative implementation strategy for PEP 409's "raise exc from None" syntax)

2012-05-14 Thread Barry Warsaw
On May 14, 2012, at 10:04 PM, Nick Coghlan wrote:

>As the subject line says, as Guido's delegate, I'm accepting
>Benjamin's PEP 415 with the current reference implementation.

I'm glad to see this PEP get accepted.  I have just minor quibbles :).

Can you or Benjamin improve the title of the PEP?  It's already difficult
enough to keep the mappings of PEP numbers to subjects in your head, even for
the subset of PEPs you track.  Having a PEP title that refers to *another* PEP
number just makes things too confusing.  How about:

"Suppressing exception context via BaseException attribute"  ?

I also understand that PEP 415 is an elaboration of PEP 409, not a complete
replacement, however it seems wrong that PEP 409 does not even reference PEP
415.

Thus, while not a perfect solution, I suggest PEP 409 get a Superseded-By
header that points to 415.  415 should get a Replaces header that points to
409.  Then PEP 415 should get a section describing how the bulk of 409 is
still valid, except for blah blah blah.  (IOW, include the still valid parts
of PEP 409 by reference.)

Cheers,
-Barry
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] cpython: Issue #14532: Add a secure_compare() helper to the hmac module, to mitigate

2012-05-14 Thread Antoine Pitrou
On Sun, 13 May 2012 19:53:27 +0200
charles-francois.natali  wrote:
>  
> +This module also provides the following helper function:
> +
> +.. function:: secure_compare(a, b)
[...]

You need a versionadded tag.

Regards

Antoine.


___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Accepting PEP 415 (alternative implementation strategy for PEP 409's "raise exc from None" syntax)

2012-05-14 Thread Nick Coghlan
On Tue, May 15, 2012 at 12:20 AM, Barry Warsaw  wrote:
> On May 14, 2012, at 10:04 PM, Nick Coghlan wrote:
>
>>As the subject line says, as Guido's delegate, I'm accepting
>>Benjamin's PEP 415 with the current reference implementation.
>
> I'm glad to see this PEP get accepted.  I have just minor quibbles :).
>
> Can you or Benjamin improve the title of the PEP?  It's already difficult
> enough to keep the mappings of PEP numbers to subjects in your head, even for
> the subset of PEPs you track.  Having a PEP title that refers to *another* PEP
> number just makes things too confusing.  How about:
>
> "Suppressing exception context via BaseException attribute"  ?
>
> I also understand that PEP 415 is an elaboration of PEP 409, not a complete
> replacement, however it seems wrong that PEP 409 does not even reference PEP
> 415.
>
> Thus, while not a perfect solution, I suggest PEP 409 get a Superseded-By
> header that points to 415.  415 should get a Replaces header that points to
> 409.  Then PEP 415 should get a section describing how the bulk of 409 is
> still valid, except for blah blah blah.  (IOW, include the still valid parts
> of PEP 409 by reference.)

Helping others follow the bouncing ball in the historical record makes
sense to me - I'll make these tweaks this evening.

Cheers,
Nick.

-- 
Nick Coghlan   |   [email protected]   |   Brisbane, Australia
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Accepting PEP 415 (alternative implementation strategy for PEP 409's "raise exc from None" syntax)

2012-05-14 Thread Benjamin Peterson
2012/5/14 Nick Coghlan :
> On Tue, May 15, 2012 at 12:20 AM, Barry Warsaw  wrote:
>> On May 14, 2012, at 10:04 PM, Nick Coghlan wrote:
>>
>>>As the subject line says, as Guido's delegate, I'm accepting
>>>Benjamin's PEP 415 with the current reference implementation.
>>
>> I'm glad to see this PEP get accepted.  I have just minor quibbles :).
>>
>> Can you or Benjamin improve the title of the PEP?  It's already difficult
>> enough to keep the mappings of PEP numbers to subjects in your head, even for
>> the subset of PEPs you track.  Having a PEP title that refers to *another* 
>> PEP
>> number just makes things too confusing.  How about:
>>
>> "Suppressing exception context via BaseException attribute"  ?
>>
>> I also understand that PEP 415 is an elaboration of PEP 409, not a complete
>> replacement, however it seems wrong that PEP 409 does not even reference PEP
>> 415.
>>
>> Thus, while not a perfect solution, I suggest PEP 409 get a Superseded-By
>> header that points to 415.  415 should get a Replaces header that points to
>> 409.  Then PEP 415 should get a section describing how the bulk of 409 is
>> still valid, except for blah blah blah.  (IOW, include the still valid parts
>> of PEP 409 by reference.)
>
> Helping others follow the bouncing ball in the historical record makes
> sense to me - I'll make these tweaks this evening.

+1 indeed.


-- 
Regards,
Benjamin
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com