[Checkins] SVN: zope.publisher/trunk/ Added some BBB code tosetDefaultSkin to allow IBrowserRequest's to continue to workwithout configuring any special adapter for IDefaultSkin.Lot's of code inside Zope2 relying on using the requestobject without ton

Roger Ineichen dev at projekt01.ch
Sun Apr 26 18:30:43 EDT 2009


Hi Hanno

> Betreff: [Checkins] SVN: zope.publisher/trunk/ Added some BBB 
> code tosetDefaultSkin to allow IBrowserRequest's to continue 
> to workwithout configuring any special adapter for 
> IDefaultSkin.Lot's of code inside Zope2 relying on using the 
> requestobject without tons


> Log message for revision 99518:
>   Added some BBB code to setDefaultSkin to allow 
> IBrowserRequest's to continue to work without configuring any 
> special adapter for IDefaultSkin. Lot's of code inside Zope2 
> relying on using the request object without tons of CA setup

I don't comment this.

but,
You broke my hole refactoring. My refactoring was making it
possible to use IDefaultBrowserLayer less IBrowserRequest.

Your changes apply now to every IBrowserRequest an 
IDefaultBrowserLayer where explicit was no default
layer configured for. This is bad because and makes
the previous refactoring obsolate.

Can you revert this changes?


Regards
Roger Ineichen
_____________________________
END OF MESSAGE

> Changed:
>   U   zope.publisher/trunk/CHANGES.txt
>   U   zope.publisher/trunk/src/zope/publisher/skinnable.py
> 
> -=-
> Modified: zope.publisher/trunk/CHANGES.txt 
> ===================================================================
> --- zope.publisher/trunk/CHANGES.txt	2009-04-26 14:17:03 UTC 
> (rev 99517)
> +++ zope.publisher/trunk/CHANGES.txt	2009-04-26 14:29:37 UTC 
> (rev 99518)
> @@ -4,6 +4,9 @@
>  3.6.4 (unreleased)
>  ------------------
>  
> +- Added some BBB code to setDefaultSkin to allow 
> IBrowserRequest's to 
> +continue
> +  to work without configuring any special adapter for IDefaultSkin.
> +
>  - Move `getDefaultSkin` to the skinnable module next to the 
> `setDefaultSkin`
>    method, leaving a BBB import in place. Mark 
> `IDefaultBrowserLayer` as a
>    `IBrowserSkinType` in code instead of relying on the ZCML 
> to be loaded.
> 
> Modified: zope.publisher/trunk/src/zope/publisher/skinnable.py
> ===================================================================
> --- zope.publisher/trunk/src/zope/publisher/skinnable.py	
> 2009-04-26 14:17:03 UTC (rev 99517)
> +++ zope.publisher/trunk/src/zope/publisher/skinnable.py	
> 2009-04-26 14:29:37 UTC (rev 99518)
> @@ -51,6 +51,11 @@
>          # find a named ``default`` adapter providing 
> IDefaultSkin as fallback
>          skin = adapters.lookup((zope.interface.providedBy(request),),
>              interfaces.IDefaultSkin, 'default')
> +        if skin is None:
> +            # Let's be nice and continue to work for 
> IBrowserRequest's
> +            # without relying on adapter registrations
> +            if 
> interfaces.browser.IBrowserRequest.providedBy(request):
> +                skin = getDefaultSkin
>      if skin is not None:
>          try:
>              # the default fallback skin is registered as a 
> named adapter
> 
> _______________________________________________
> Checkins mailing list
> Checkins at zope.org
> http://mail.zope.org/mailman/listinfo/checkins
> 



More information about the Checkins mailing list