Re: [Zope-dev] Inhibit URL-traversal

2006-02-13 Thread Dario Lopez-Kästen

Thanks Chris and Florenat, I'll look into your suggestions too.

/dario

--
-- ---
Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech.
Lyrics applied to programming & application design:
"emancipate yourself from mental slavery" - redemption song, b. marley

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] PGStorage

2006-02-13 Thread Shane Hathaway
I'd like to announce the first release of PGStorage, a ZODB backend that 
persists to a PostgreSQL database and supports undo.  More info here:


  http://hathawaymix.org/Weblog/2006-02-11

Download it from here:

  http://hathawaymix.org/Software/PGStorage

Don't use it for production yet.  Let me know about your experiences 
with it.


Shane

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Python warnings behavior and stacklevel=2

2006-02-13 Thread Julien Anguenot
Florent Guillaume wrote:
> Julien Anguenot wrote:
>> Tim Peters wrote:
>>> [Julien Anguenot]
 I'm having some problems with the warnings module behavior.
 (Python-2.4.2 and Zope-2.9 trunk)

 [... traceback ... ]

- Line 71
   Module zLOG, line 140, in LOG
   Module warnings, line 61, in warn
   Module warnings, line 67, in warn_explicit
 TypeError: unsubscriptable object

> 
> I've had this too, and I believe it appears if you have a frame
> referencing a python script (or maybe an external method) in the stack.
> 

You'll get the error if you run the CPSDefaul tests against a Zope-2.9
branch, for instance.

J.

-- 
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM   : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66



signature.asc
Description: OpenPGP digital signature
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Python warnings behavior and stacklevel=2

2006-02-13 Thread Florent Guillaume

Julien Anguenot wrote:

Tim Peters wrote:

[Julien Anguenot]

I'm having some problems with the warnings module behavior.
(Python-2.4.2 and Zope-2.9 trunk)

[... traceback ... ]

   - Line 71
  Module zLOG, line 140, in LOG
  Module warnings, line 61, in warn
  Module warnings, line 67, in warn_explicit
TypeError: unsubscriptable object



I've had this too, and I believe it appears if you have a frame referencing 
a python script (or maybe an external method) in the stack.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: Inhibit URL-traversal

2006-02-13 Thread Florent Guillaume

Dario Lopez-Kästen wrote:

Greetings,

for a product I am writing, i need to experiment with inhibiting 
URL-traversal to the methods and subobjects of it. I still wnat the 
methods and objects to be available via direct call, for instance:


from a script or template:
container.my_product_instance.some_method(...)

but not

http://some/url/my_product_instance/some_method?...


In effect I am hiding that part of the zodb for external access-

Also, can such a behaviour be imposed on templates (they being methods 
really) and Script(Python)s?



Have your methods accept a REQUEST=None optional argument, and if it's not 
None then you were called through an URL. In that case you can redirect or 
raise a Unauthorized or NotFound or whatever.


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Z2 / Z3 publisher

2006-02-13 Thread Tarek Ziadé
Sidnei da Silva wrote:

>On Mon, Feb 13, 2006 at 12:44:44AM +0100, Tarek Ziadé wrote:
>| Hello,
>| 
>| I've hurd a bit ago that some people wanted to replace Zope 2 publisher
>| with Zope 3 one.
>| Is it still planned ?
>
>I've looked at it and opened a can of worms *wink*. OTOH, I've
>factored out parts of Zope 2 ZPublisher enough to implement
>IPublication. The next step from there is providing a compatible
>request and response objects.
>
>This branch has a couple hacks to start up twisted and adapt the Zope
>3 request/response to the expected Zope 2 ones. It does enough to
>render the quickstart page with Zope 3's-included twisted and the
>IPublication from Zope 2 but not much else.
>
>http://svn.zope.org/Zope/branches/publication-refactor/
>
>I think the refactoring into IPublication can be merged to trunk
>without problem, but the branch needs some cleaning before that.
>
>  
>
neat !
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope3-dev] Pluggins vs Application Definition

2006-02-13 Thread Stephan Richter
On Saturday 11 February 2006 16:50, Jim Fulton wrote:
> - Application developers need to build an application.  They will
>    generally want fairly tight control over what goes into the
>    application.  For them, it's valuable to say in an explicit
>    way what they want.
>
> - If the application is extensible, then application users
>    will want to be able to extend the application by adding
>    "pluggins".  If application users are not technically
>    sophisticated, or, more importantly, not technically interested,
>    they peobably would prefer to just drop something into a special
>    directory and be done with it.
>
> In summary, I think we need *both* approaches, as they serve different
> needs.

This is interesting. I agree with Philipp though that a simple install tool 
would be better than one magic location. I think the ZCML slugs are very cool 
and if we have a tool (as "make" does now) that does this one step, then we 
effectively have drop-in packages. BTW, I think that a tool is also better, 
because it would allow us to keep track of the installed packages and do 
dependency checking, package-db maintenance, etc. Just randomly thinking...

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Z2 / Z3 publisher

2006-02-13 Thread Sidnei da Silva
On Mon, Feb 13, 2006 at 12:44:44AM +0100, Tarek Ziadé wrote:
| Hello,
| 
| I've hurd a bit ago that some people wanted to replace Zope 2 publisher
| with Zope 3 one.
| Is it still planned ?

I've looked at it and opened a can of worms *wink*. OTOH, I've
factored out parts of Zope 2 ZPublisher enough to implement
IPublication. The next step from there is providing a compatible
request and response objects.

This branch has a couple hacks to start up twisted and adapt the Zope
3 request/response to the expected Zope 2 ones. It does enough to
render the quickstart page with Zope 3's-included twisted and the
IPublication from Zope 2 but not much else.

http://svn.zope.org/Zope/branches/publication-refactor/

I think the refactoring into IPublication can be merged to trunk
without problem, but the branch needs some cleaning before that.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Inhibit URL-traversal

2006-02-13 Thread Chris Withers

Dario Lopez-Kästen wrote:

from a script or template:
container.my_product_instance.some_method(...)

but not

http://some/url/my_product_instance/some_method?...


You could try looking at some kind of __bobo_traverse__ function or 
maybe __before_publisher_traverse__. I've probably mispelled the latter, 
but it might be what you're after, since it affects the publisher but 
not method access...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )