[Checkins] SVN: zope.security/trunk/ Make UUIDs rocks, as (not) discussed on zope-dev http://mail.zope.org/pipermail/zope-dev/2009-April/035724.html

Jim Fulton jim at zope.com
Fri Apr 10 09:23:21 EDT 2009


Sorry Brian.  I didn't notice your proposal last week. Some team  
members called my attention to it this morning when they saw your  
check in. As I pointed out on zope-dev, UUIDs aren't sufficiently  
immutable to be treated as rocks. Please revert this.

Jim


On Apr 10, 2009, at 5:35 AM, Brian Sutherland wrote:

> Log message for revision 99070:
>  Make UUIDs rocks, as (not) discussed on zope-dev http://mail.zope.org/pipermail/zope-dev/2009-April/035724.html
>
> Changed:
>  U   zope.security/trunk/CHANGES.txt
>  U   zope.security/trunk/src/zope/security/checker.py
>  U   zope.security/trunk/src/zope/security/tests/ 
> test_standard_checkers.py
>
> -=-
> Modified: zope.security/trunk/CHANGES.txt
> ===================================================================
> --- zope.security/trunk/CHANGES.txt	2009-04-10 01:02:24 UTC (rev  
> 99069)
> +++ zope.security/trunk/CHANGES.txt	2009-04-10 09:35:06 UTC (rev  
> 99070)
> @@ -5,7 +5,8 @@
> 3.6.4 (unreleased)
> ------------------
>
> -- None so far.
> +- Make uuid.UUID a rock, they are immutable and in the python  
> standad library
> +  from python 2.5.
>
> 3.6.3 (2009-03-23)
> ------------------
>
> Modified: zope.security/trunk/src/zope/security/checker.py
> ===================================================================
> --- zope.security/trunk/src/zope/security/checker.py	2009-04-10  
> 01:02:24 UTC (rev 99069)
> +++ zope.security/trunk/src/zope/security/checker.py	2009-04-10  
> 09:35:06 UTC (rev 99070)
> @@ -624,6 +624,13 @@
>     type(pytz.UTC): NoProxy,
> })
>
> +try:
> +    # NOTE: remove try/except when we depend on python2.5 and up.  
> uuid in standard library from python 2.5.
> +    from uuid import UUID
> +    BasicTypes[UUID] = NoProxy
> +except ImportError:
> +    pass
> +
> # Available for tests. Located here so it can be kept in sync with  
> BasicTypes.
> BasicTypes_examples = {
>     object: object(),
>
> Modified: zope.security/trunk/src/zope/security/tests/ 
> test_standard_checkers.py
> ===================================================================
> --- zope.security/trunk/src/zope/security/tests/ 
> test_standard_checkers.py	2009-04-10 01:02:24 UTC (rev 99069)
> +++ zope.security/trunk/src/zope/security/tests/ 
> test_standard_checkers.py	2009-04-10 09:35:06 UTC (rev 99070)
> @@ -424,6 +424,14 @@
>>>> from pytz import UTC
>>>> int(type(ProxyFactory(  UTC )) is type(UTC))
>     1
> +
> +    >>> try:
> +    ...     # NOTE: remove try/except when we depend on python 2.5  
> and greater (uuid in standard library)
> +    ...     from uuid import UUID
> +    ...      
> int(type(ProxyFactory(  UUID('12345678123456781234567812345678') ))  
> is UUID)
> +    ... except ImportError:
> +    ...     1
> +    1
>     """
>
> def test_iter_of_sequences():
>
> _______________________________________________
> Checkins mailing list
> Checkins at zope.org
> http://mail.zope.org/mailman/listinfo/checkins

--
Jim Fulton
Zope Corporation




More information about the Checkins mailing list