Re: [ZODB-Dev] Re: BTrees strangeness (was [Zope-dev] Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-03-04 Thread John Belmonte
Chris McDonough wrote:
On Wed, 2004-03-03 at 22:20, Casey Duncan wrote:

   for key in list(self._data.keys(None, max_ts)):
   assert(key = max_ts)
   STRICT and _assert(self._data.has_key(key))
   for v in self._data[key].values():
   to_notify.append(v)
   del self._data[key]
Maybe you could use items() and two loops instead;

to_rm = []
for key, val in self._data.items(None, max_ts):
   for v in val.values():
   to_notify.append(v)
   to_rm.append(key)
for key in to_rm:
   try:
   del self._data[key]
   except Keyerror:
  pass # Somebody else deleted it first
I don't think that could raise a KeyError...


Well, the real bit of magic there is the try.. except KeyError: pass
stanza.  Believe me, I'm tempted to stick that in, but this is the kind
of voodoo that got me in to a lot of trouble in the older version of
this code (there was reams upon reams of voodoo in the old code), so I'd
really rather just figure out why the code is failing in the first
place.  I'd just rather not mask the problem until I understand the
cause.  That may never happen, of course, but a man can dream.
If I'm following this thread correctly, isn't the code failing because 
the BTree is corrupted (that is, BTrees.check.check chokes)?  If that's 
the case then you're certainly right to avoid masking the problem.

-John

--
http:// if  ile.org/
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: [ZODB-Dev] Re: BTrees strangeness (was [Zope-dev] Zope 2.X BIG Session problems - blocker - our site dies - need help of experience Zope developer, please)

2004-03-04 Thread Chris McDonough
On Wed, 2004-03-03 at 22:53, John Belmonte wrote:
 If I'm following this thread correctly, isn't the code failing because 
 the BTree is corrupted (that is, BTrees.check.check chokes)?  If that's 
 the case then you're certainly right to avoid masking the problem.

We don't know that it's corrupted for sure yet because the problem has
not yet made itself repeatable in isolation, and has only appeared in
one production setup (Alex's).  Hopefully Alex will instrument his code
to do the check when it chokes and we'll know more then.  I've also
asked him to change out the storage that's being used to hold this data
to a FileStorage.  I have some fear about the current storage code that
he is using to store this data (TemporaryStorage), as it is not
typically tested via unit tests for simultaneous access and does some
hairy inplace garbage collection that other storages don't do.

- C



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: [ZODB-Dev] Re: BTrees strangeness (was [Zope-dev] Zope 2.X BIGSession problems - blocker - our site dies - need help of experienceZope developer, please)

2004-03-04 Thread Tim Peters
[Chris McDonough]
 ...
 I'd really rather just figure out why the code is failing in the
 first place.  I'd just rather not mask the problem until I understand
 the cause.  That may never happen, of course, but a man can dream.

I definitely want to know it if there's still a way remaining to provoke
conflict resolution into creating insane BTrees, although I only care if
it's a most-recent version of ZODB (3.1.5, 3.2.1, or HEAD) (earlier versions
have known, relevant bugs that have been fixed).

BTrees appear sensitive to tiny timing holes just because they're
complicated data structures and are involved in conflict resolution a lot.
But apart from the bugs in the BTree implmentation fixed a lng time ago,
no other corruption bug we've squashed since then actually had anything to
do with BTrees -- they were general timing holes that could corrupt anything
at all involved in conflict resolution (generally hard-to-provoke failure of
invalidation to keep caches consistent).


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Execution context

2004-03-04 Thread Garito



Hi all

Finally I solve my problem with Tres Seaver's help (THANK YOU)

I overridethe __bobo_traverse__ 
with:

def __bobo_traverse__(self, Request, 
Name):import sysif 
sys._getframe(1).f_code.co_name == "traverse":return 
getattr(self, Name)else:return 
self.Propiedad(Name)

self.Propiedad is the fuction than neutralices (I 
call these mechanism Neutralization) the content of my object

When You executes ZMI 
sys._getframe(1).f_code_co_name returns traverse

Thanks again Tres 
Seaver!
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] server for new protocol?

2004-03-04 Thread Dario Lopez-Kästen
Nikolay Kim wrote:

it'll be open source.

source in attach.

it not very usefull without additional products that must actually
handle emails. 

now i'm working on mail storage products.

very cool product Nikolay.

re mail storage: have you looked at ZMailIn?

http://www.zope.org/Members/NIP/ZMailIn

/dario

--
-- ---
Dario Lopez-Kästen, IT Systems  Services Chalmers University of Tech.
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] server for new protocol?

2004-03-04 Thread Nikolay Kim
 very cool product Nikolay.
 
 re mail storage: have you looked at ZMailIn?
 
 http://www.zope.org/Members/NIP/ZMailIn
no i don't see it.

but i have developed one. now i have upload speed 8 messages per second.

i'll release smtpservice product next week.




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Serving big files thru zope?

2004-03-04 Thread Kapil Thangavelu
you could play with
http://puggy.symonds.net/~srp/stuff/mod_auth_remote/

and have apache auth off zope.

cheers,

-kapil

On Mon, 2004-03-01 at 11:06, Sandor Palfy wrote:
  I am also wondering about the security aspects of bypassing Zope to 
  serve files - acess to some of the files we need to serve is 
  restricted 
  to particular users with particular permissions, and I cannot clearly 
  see how this would be possible to accomplish without Zope's security 
  machinery.
 
 Same situation here. Is there any way to provide authentication
 information for Apache from Zope (which works at least with cookie based
 auth)? 
 
 Regards,
 Sandor
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 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 maillist  -  [EMAIL PROTECTED]
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] CMF dogbowl dog tired ???

2004-03-04 Thread Alan Milligan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I see not much has been happening on cmf.zope.org for some time - the
content is still to be merged with zope.org
Even more worrying, the collector also shows no movement.  I raised 2
one-line fixes (bugs 196, 197) on Oct 19 2003 - they are still pending
along with 89 others.
How about looking at this stuff - or giving us CVS access.

Cheer, Alan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.3.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
Comment:
iD8DBQFARyo+CfroLk4EZpkRAlkWAKCJYhic9OnL/9gSKUA+48BF1dOe/gCcDbI6
Ni0me/OyQh5Ydy2Ao6J2JEA=
=xK5V
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Interfaces in Zope 2.5, 2.7, and 3.x

2004-03-04 Thread Martijn Faassen
Jim Fulton wrote:

Martijn's suggestion was to use an alternate name for the 
__implements__ attribute.  I suppost I could do that -- call mine
 __narya_interfaces__, but that sounds ugly.  In particular, I
don't really want my interfaces module to actually *conflict* with
Zope's.


As I mentioned on the zope3-dev list, you want to use the facade
Interface from (Packages3/Interface) in Zope 2.7. This is a bit of a
pain to set up. The facade will be a standard part of Zope 2.8.
As a note so Terry also sees; I couldn't get this to work.

Setting it up using the zope.conf 'path' setting in Zope 2.7 to include 
this on the Python path fails, as Zope actually imports the old (non 
facade) interface package before it gets to do configuration. This means 
the facade never is imported, as the next imports will re-use the cached 
  initial import.

So I moved on to removing Zope 2's Interface package and replacing it 
with the facade Interface. For some reason I couldn't get this to start 
either. Perhaps I was fiddling with the paths wrong, but I couldn't get 
Zope 2.7 to start.

I've since gone back to my own hack using a different __implements__ 
attribute. Since Zope 3 interfaces use the 'implements()' directive 
anyway, this hack only breaks backwards compatibility to Z3 interfaces 
that *do* use __implements__ (this is deprecated however), and could 
break ZODB portability in case of persistent interfaces (there are 
currently pretty uncommon and I don't need them at the moment).

Perhaps Terry did get this to work; if so I'm curious to find out how.

Regards,

Martijn

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Re: Custom class: cut,copy,rename?

2004-03-04 Thread Ian Beatty
On 2004-03-02 2:15 PM, Ian Beatty is reputed to have said:

 Here's what I have now: a hierarchy of five custom
 classes, pretty close to identical for now. All five subclass ObjectManager,
 CatalogAware, PropertyManager, and SimpleItem in that order. The top one
 (A) may be added to any old Zope folder; B may only be added to A; C to B;
 D to C; and E to D. Standard Zope Images may be added to E.
 
 I can now freely rename A, C, D, and any images within an instance of E. I
 *cannot* rename B or E; when I try, I get The object term_0 does not
 support this operation ('term_0' is an instance of B)

On 2004-03-02 9:55 AM, Chris Withers is reputed to have said:

 I suspect the way you're trying to ensure only certain types of object can go
 in certain containers is to blame here...

Aah, finally, I figured it out. So simple. You were right, Chris.

For the problem classes, B and E, the meta_type value defined in the class
definition wasn't exactly the same as the type name specified in the
container class' all_meta_types' field.

*Sigh* And I thought that value in all_meta_types was simply to provide the
visual label in the combo box.

Thanks for the help, folks. I definitely needed it.

Cheers,

..Ian

-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
Dr. Ian Beatty   [EMAIL PROTECTED]
Physics Education Research Group  voice: 413.545.9483
Department of Physics   fax: 413.545.4884
Univ. of Massachusetts  AIM: (available upon request)
Amherst, MA 01003-4525 USA   http://umperg.physics.umass.edu/
-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] TCPWatch or other such tool

2004-03-04 Thread Bjorn Stabell
Title: Message



Has 
anyone gotten TCPWatch to work recently? Using Python2.1/2.2/2.3 I 
get:
Unhandled 
exception in thread started by function window_loop at 
0x402877d4Traceback (most recent call last): File 
"/zope/opt/bin/tcpwatch.py", line 656, in window_loop 
app.mainloop() File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 965, 
in mainloop self.tk.mainloop(n)RuntimeError: Calling 
Tcl from different appartment


Are 
there any other good, free TCPWatch-like tools that allow you to snoop on HTTP 
requests.

Regards,
-- 

Bjorn
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] DTML

2004-03-04 Thread Christian Theune
On Tue, 2004-03-02 at 18:24, Fábio Bruno wrote:
 Dear Sir or Madamme
 We are working with zope at school, it was proppoused to us to do an 
 imobiliary site and we like to know who we can do a for cicle or repeat to 
 search in our document whow many houses where added.
 Your's faithfully,
 Fábio  Bruno

Hi,

please notice that this list if for discussion of the development _of_
the zope application server. not for using it.

First, consider using Zope Page Templates instead of DTML. There is a
good tutorial in the Zope 2.7 release that you can leverage which tells
you about tal:repeat.

There is also a site from brasil that tells about zope: www.tchezope.org
where you will get support from a community in your native language.

Regards,
Christian

-- 
Christian Theune, gocept gmbh  co. kg
http://www.gocept.com - [EMAIL PROTECTED]
fon: 03496 3099112 fax: 03496 3099118 mobile: 0179 7808366


signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] TCPWatch or other such tool

2004-03-04 Thread Christian Theune
On Wed, 2004-02-25 at 05:53, Bjorn Stabell wrote:
 Has anyone gotten TCPWatch to work recently?  Using Python2.1/2.2/2.3
 I get:
  
 Unhandled exception in thread started by function window_loop at
 0x402877d4
 Traceback (most recent call last):
   File /zope/opt/bin/tcpwatch.py, line 656, in window_loop
 app.mainloop()
   File /usr/lib/python2.3/lib-tk/Tkinter.py, line 965, in mainloop
 self.tk.mainloop(n)
 RuntimeError: Calling Tcl from different appartment
  
  
 Are there any other good, free TCPWatch-like tools that allow you to
 snoop on HTTP requests.

This is a problem with python-tk most probably a problem in your
distribution (I had that a lot with debian).

You can also call tcpwatch with the -s commandline parameter to suppress
the GUI and get a CLI. Another option is enabling logging to write
requests and responses to files.

Regards,
Christian

-- 
Christian Theune, gocept gmbh  co. kg
http://www.gocept.com - [EMAIL PROTECTED]
fon: 03496 3099112 fax: 03496 3099118 mobile: 0179 7808366


signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] TCPWatch or other such tool

2004-03-04 Thread Shane Hathaway
Bjorn Stabell wrote:
Has anyone gotten TCPWatch to work recently?  Using Python2.1/2.2/2.3 I get:
 
Unhandled exception in thread started by function window_loop at 
0x402877d4
Traceback (most recent call last):
  File /zope/opt/bin/tcpwatch.py, line 656, in window_loop
app.mainloop()
  File /usr/lib/python2.3/lib-tk/Tkinter.py, line 965, in mainloop
self.tk.mainloop(n)
RuntimeError: Calling Tcl from different appartment
Other people have reported this, but I can't reproduce it.  I've been 
using tcpwatch on Python versions 2.1 through 2.3 without a hiccup.  Are 
you using Linux?  If so, what distribution?

As a workaround, you can use -s to dump to stdout.

Are there any other good, free TCPWatch-like tools that allow you to 
snoop on HTTP requests.
There is ethereal, though it's a lower level tool.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] DTML

2004-03-04 Thread Fábio Bruno
Dear Sir or Madamme
We are working with zope at school, it was proppoused to us to do an 
imobiliary site and we like to know who we can do a for cicle or repeat to 
search in our document whow many houses where added.
Your's faithfully,
   Fábio  Bruno

_
MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] help

2004-03-04 Thread Vandana Bajaj
I am not able to access zope management interface through mozilla.Could any one guide me why is it happening so.Can i use _javascript_ within Zope Page Templates to embed logic

Thank you in advanceVandana
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Folderish object's __call__ fails

2004-03-04 Thread Dirksen
Hi,

I'm developing a product, which extends ObjectManager. Meanwhile, I'd like it to behave
like a script object, similar to DTML method. So I define a __call__ method. But it 
never
gets run if called from the browser. If I change the base class to SimpleItem, it 
works.
How can I make __call__ works for folderish object?

cheers
Dirksen

__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Custom class: cut,copy,rename?

2004-03-04 Thread Kapil Thangavelu
On Mon, 2004-03-01 at 13:59, Ian Beatty wrote:
 Greetings.
 
 I've created a package in Python with some basic classes. They work in the
 ZMI, except for the fact that the ZMI paste and rename functionality fails
 with the message The object xxx does not support this operation.
 
 I've dug into the source code for standard types ('OFS.Folder',
 'OFS.SimpleItem', etc.) and discovered some tantalizing bits (such as
 'manage_renameObject' in 'OFS.CopySupport'), but I can't figure out how to
 put it together to make my classes renameable and pasteable. I'm rather
 surprised that behavior doesn't come automatically when inheriting from the
 standard base classes.
 
 One of my folderish classes subclasses the following bases:
 
 OFS.ObjectManager.ObjectManager
 Products.ZCatalog.CatalogPathAwareness.CatalogAware
 OFS.PropertyManager.PropertyManager
 OFS.SimpleItem.SimpleItem
 
 Am I not inheriting from the proper set of base classes? Is there an easier
 way? According to the ZDG (2.4 edition, vs. my Zope 2.7),
 OFS.SimpleItem.Item (subclassed by OFS.SimpleItem.SimpleItem) is supposed to
 provide cut-and-paste functionality. So, how might I be breaking it?
 

as i recall the default copy paste behavior is a bit arcane in that the
verify tries to assert the object is indeed a registered meta_type (ie
reg. in initialize) so that it can verify permissions, see cmfcore
folder code for an example of making a custom container which works
around this (basically just override _verifyObjectPaste), or just
register the objects.

cheers,

-kapil


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Folderish object's __call__ fails

2004-03-04 Thread Casey Duncan
On Thu, 4 Mar 2004 13:03:20 -0800 (PST)
Dirksen [EMAIL PROTECTED] wrote:

 Hi,
 
 I'm developing a product, which extends ObjectManager. Meanwhile, I'd
 like it to behave like a script object, similar to DTML method. So I
 define a __call__ method. But it never gets run if called from the
 browser. If I change the base class to SimpleItem, it works. How can I
 make __call__ works for folderish object?

Try adding a class attribute index_html and set it to None. This is what
the CMF does to get __call__ invoked.

It's what we affectionately call a dead chicken, a sacrafice to the
Zope gods...

hth,

-Casey


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Schizophrenic ObjectManager?

2004-03-04 Thread Ian Beatty
Greetings.

I'd like to create a type in a Python-based product that's kind of like two
folders fused together. What I mean by that is I've got a folderish object
type -- let's call it 'F' -- that inherits from ObjectManager. I've set it
up so that it can contain objects of type 'A' and nothing else, by using the
all_meta_types property. So far so good.

Now, I want to have it also contain objects of type 'B', but displayed and
managed through a separate tab in the ZMI. If I click on the Contents tab
of an instance of F, I get the list of contained A-type objects, with cut,
copy, paste, delete, etc. If I click on another tab named, say,
OtherStuff, I want to see exactly the same kind of contents-list
management page, but for contained B-type objects.

I'm thinking that I might try having F contain an instance of ObjectManager
as a property, and delegate all B-managing functionality to that. Management
of A would be handled through F's inherited ObjectManager behavior. What
concerns me is that the encapsulated second ObjectManager wouldn't have a
container in the usual way, and that could seriously mess up acquisition.

Another possibility is to maintain only one collection, but to create the
illusion of two separate collections by having two copies of the contents
('manage_main') page, each modified to display only one kind of child.

Any thoughts, oh masters of Zope Zen?

Cheers,

..Ian

-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --
Dr. Ian Beatty   [EMAIL PROTECTED]
Physics Education Research Group  voice: 413.545.9483
Department of Physics   fax: 413.545.4884
Univ. of Massachusetts  AIM: (available upon request)
Amherst, MA 01003-4525 USA   http://umperg.physics.umass.edu/
-- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- -- --- --



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Paul Winkler
I used to be able to browse to an image's tag method 
and see its output in my browser.  This worked in zope 2.6.1 
and apparently stopped working in 2.6.2.  Anybody know why?  
I don't see ANY changes to Image.py between 2.6.1 and 2.6.2.

In 2.6.2, 2.6.4, and 2.7.0 I get the missing docstring error:

The object at http://localhost:8080/foo.jpg/tag 
has an empty or missing docstring. Objects must have a docstring 
to be published.

Well, that's a bald-faced lie... Image.tag has a nice long docstring!
What the heck? Is this maybe a side-effect of a security fix 
somewhere else?

It's very inconvenient, I used this technique to embed zope images
in JSP's and all those pages are now broken. 
Any clue would be appreciated.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's SUBORDINATE FROM IDAHO!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Sidnei da Silva
On Thu, Mar 04, 2004 at 04:38:46PM -0500, Paul Winkler wrote:
| It's very inconvenient, I used this technique to embed zope images
| in JSP's and all those pages are now broken. 
| Any clue would be appreciated.

Wild guess: does the Image class have a docstring?

-- 
Sidnei da Silva [EMAIL PROTECTED]
http://awkly.org - dreamcatching :: making your dreams come true
http://plone.org/about/team#dreamcatcher

Don't hit the keys so hard, it hurts.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Chris McDonough
On Thu, 2004-03-04 at 16:38, Paul Winkler wrote:
 In 2.6.2, 2.6.4, and 2.7.0 I get the missing docstring error:
 
 The object at http://localhost:8080/foo.jpg/tag
 has an empty or missing docstring. Objects must have a docstring 
 to be published.

I have seen this message being raised in many places falsely, at least
in Zope 2.7.0+.  I haven't found the cause.  It doesn't mean what it
says it means in these cases, but it does always seem to mean that your
security is fucked up somehow and what you're trying to do isn't
allowed.

- C



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Paul Winkler
On Thu, Mar 04, 2004 at 07:12:32PM -0300, Sidnei da Silva wrote:
 On Thu, Mar 04, 2004 at 04:38:46PM -0500, Paul Winkler wrote:
 | It's very inconvenient, I used this technique to embed zope images
 | in JSP's and all those pages are now broken. 
 | Any clue would be appreciated.
 
 Wild guess: does the Image class have a docstring?

That was indeed a wild guess ;-)
Of course it does.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's INDUSTRIALIST BIMBO!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Paul Winkler
On Thu, Mar 04, 2004 at 05:14:37PM -0500, Chris McDonough wrote:
 On Thu, 2004-03-04 at 16:38, Paul Winkler wrote:
  In 2.6.2, 2.6.4, and 2.7.0 I get the missing docstring error:
  
  The object at http://localhost:8080/foo.jpg/tag
  has an empty or missing docstring. Objects must have a docstring 
  to be published.
 
 I have seen this message being raised in many places falsely, at least
 in Zope 2.7.0+.  I haven't found the cause.  It doesn't mean what it
 says it means in these cases, but it does always seem to mean that your
 security is fucked up somehow and what you're trying to do isn't
 allowed.

I don't see how *my* security, per se, could be fscked up in this case...
I get the error even logged in as Manager, and even if the
image has all permissions for anonymous.

time for a pdb session...
so far all I've found is that, indeed, app.some_folder.some_image.tag
has no docstring! Bizarre because I can see it in the sources.
It appears that the error means something pretty close to what it
says it means :-P
More digging to follow ...

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's IMPENDING WIGGED-TOMATO!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Sidnei da Silva
| That was indeed a wild guess ;-)
| Of course it does.

Are you using Plone? Maybe it's monkey patching Image.tag.

-- 
Sidnei da Silva [EMAIL PROTECTED]
http://awkly.org - dreamcatching :: making your dreams come true
http://plone.org/about/team#dreamcatcher

1: No code table for op: ++post

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Schizophrenic ObjectManager?

2004-03-04 Thread Max M
Ian Beatty wrote:

Another possibility is to maintain only one collection, but to create the
illusion of two separate collections by having two copies of the contents
('manage_main') page, each modified to display only one kind of child.


Two different views on the same model, like this, is bussiness as usual.

regards Max M

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Paul Winkler
On Thu, Mar 04, 2004 at 06:10:18PM -0500, Paul Winkler wrote:
 On Thu, Mar 04, 2004 at 05:14:37PM -0500, Chris McDonough wrote:
  On Thu, 2004-03-04 at 16:38, Paul Winkler wrote:
   In 2.6.2, 2.6.4, and 2.7.0 I get the missing docstring error:
   
   The object at http://localhost:8080/foo.jpg/tag
   has an empty or missing docstring. Objects must have a docstring 
   to be published.

(snip)

Forget all the preceding... I found the real culprit.
Somebody in Plone monkey-patched OFS.Image.tag
and didn't provide a docstring :-P
Fix should be in the next Plone 2.0 RC or final.

BAD MONKEY! NO BANANA!
- slinkP on #zope, 3/04/04

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Paul Winkler
On Thu, Mar 04, 2004 at 08:43:35PM -0300, Sidnei da Silva wrote:
 | That was indeed a wild guess ;-)
 | Of course it does.
 
 Are you using Plone? Maybe it's monkey patching Image.tag.

You were lurking on #zope weren't you ;-)

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's INSANE KING NAZI!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Marc Lindahl
If you're using Plone, it monkeypatches Image.tag().  Caused me to add 
an Image.pil_tag() monkeypatch to my monkeypatch ImageTag_CorePatch :)

On Thursday, March 4, 2004, at 04:38  PM, Paul Winkler wrote:

I used to be able to browse to an image's tag method
and see its output in my browser.  This worked in zope 2.6.1
and apparently stopped working in 2.6.2.  Anybody know why?
I don't see ANY changes to Image.py between 2.6.1 and 2.6.2.
In 2.6.2, 2.6.4, and 2.7.0 I get the missing docstring error:

The object at http://localhost:8080/foo.jpg/tag
has an empty or missing docstring. Objects must have a docstring
to be published.
Well, that's a bald-faced lie... Image.tag has a nice long docstring!
What the heck? Is this maybe a side-effect of a security fix
somewhere else?
It's very inconvenient, I used this technique to embed zope images
in JSP's and all those pages are now broken.
Any clue would be appreciated.
--

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's SUBORDINATE FROM IDAHO!
(random hero from isometric.spaceninja.com)
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Andy McKay
Marc Lindahl wrote:
If you're using Plone, it monkeypatches Image.tag().  Caused me to add 
an Image.pil_tag() monkeypatch to my monkeypatch ImageTag_CorePatch :)
Oh I wish we could get that into Zope so it actually puts out an image 
tag *by default* without a border. Sigh.
--
  Andy McKay
  ClearWind Consulting
  http://www.clearwind.ca

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Marc Lindahl
I changed ImageTag_CorePatch to also do the border=0 default patch.

On Thursday, March 4, 2004, at 08:26  PM, Andy McKay wrote:

Marc Lindahl wrote:
If you're using Plone, it monkeypatches Image.tag().  Caused me to 
add an Image.pil_tag() monkeypatch to my monkeypatch 
ImageTag_CorePatch :)
Oh I wish we could get that into Zope so it actually puts out an image 
tag *by default* without a border. Sigh.
--
  Andy McKay
  ClearWind Consulting
  http://www.clearwind.ca

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 maillist  -  [EMAIL PROTECTED]
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] TCPWatch or other such tool

2004-03-04 Thread Bjorn Stabell
Shane wrote:
[...]
 Other people have reported this, but I can't reproduce it.  I've been 
 using tcpwatch on Python versions 2.1 through 2.3 without a 
 hiccup.  Are you using Linux?  If so, what distribution?
 
 As a workaround, you can use -s to dump to stdout.

Thanks.  I was running it on Debian, so it's most likely a python-tk
problem as also reported by Christian Theune.  When I ran it under
Windows it worked fine.

I'll report it as a Debian bug.

Bye,
-- 
Bjorn

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Paul Winkler
On Thu, Mar 04, 2004 at 05:26:59PM -0800, Andy McKay wrote:
 Marc Lindahl wrote:
 If you're using Plone, it monkeypatches Image.tag().  Caused me to add 
 an Image.pil_tag() monkeypatch to my monkeypatch ImageTag_CorePatch :)
 
 Oh I wish we could get that into Zope so it actually puts out an image 
 tag *by default* without a border. Sigh.

Eh? I'm not sure what you want. No border attribute,
or border=0?
From OFS.Image.tag in zope 2.7.0:

if not 'border' in [ x.lower() for x in  args.keys()]:
result = '%s border=0' % result

... that's been in there for about 3 years!
If you want to force no border attribute, you can pass it
a false value.

Plone does the opposite - the monkeypatch causes there to be
no border attribute unless you ask for one.
So you leave it out and then you wrap your image in an a
tag and every freakin' browser puts a border around it. Blah.
I prefer Zope's default to Plone's.

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's INTER PUERILE NAMETAG FARMER!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Andy McKay
Paul Winkler wrote:
Eh? I'm not sure what you want. No border attribute,
or border=0?
[snip]
If you want to force no border attribute, you can pass it
a false value.
No border attribute at all.

In Zope you have to specify you dont want a border you have to call 
tal:image replace=python: here.some_jpg.tag(border=0). What we want 
to do in Plone is this: tal:image replace=here/some_jpg.

Much easier, more readable and probably faster.

Plone does the opposite - the monkeypatch causes there to be
no border attribute unless you ask for one.
Right because the border attribute is not standards compliant, and is 
deprecated. So this way if you don't want to meet standards, great go fo 
it, but otherwise you'll get the right tag.

For more information on that, ask the Plone UI guys they were the ones 
who asked me to do this somehow. Borders should only be done in CSS.

So you leave it out and then you wrap your image in an a
tag and every freakin' browser puts a border around it. Blah.
I prefer Zope's default to Plone's.
That's what CSS is for and that's why it will probably never go into the 
core - let's break everyone's images folks...
--
  Andy McKay
  ClearWind Consulting
  http://www.clearwind.ca

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Paul Winkler
On Thu, Mar 04, 2004 at 07:25:02PM -0800, Andy McKay wrote:
 Right because the border attribute is not standards compliant, and is 
 deprecated. So this way if you don't want to meet standards, great go fo 
 it, but otherwise you'll get the right tag.

Oh ok, I didn't know that about it being deprecated. Figures.

 That's what CSS is for and that's why it will probably never go into the 
 core - let's break everyone's images folks...

yeah, it might be an unpopular change. I dunno.
Anything that forces me to use better style is OK with me ;-)

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's MULTI-HOPPING MOUSE GEORGE!
(random hero from isometric.spaceninja.com)

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Image.tag() no longer publishable?

2004-03-04 Thread Marc Lindahl
On Thursday, March 4, 2004, at 10:14  PM, Paul Winkler wrote:

From OFS.Image.tag in zope 2.7.0:
if not 'border' in [ x.lower() for x in  args.keys()]:
result = '%s border=0' % result
... that's been in there for about 3 years!
If you want to force no border attribute, you can pass it
a false value.

That's similar to mine:

if not 'border' in map(string.lower, args.keys()):
result = '%s border=0' % result
...but yeah, CSS is better



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Interfaces in Zope 2.5, 2.7, and 3.x

2004-03-04 Thread Tres Seaver
Martijn Faassen wrote:
Jim Fulton wrote:

Martijn's suggestion was to use an alternate name for the 
__implements__ attribute.  I suppost I could do that -- call mine
 __narya_interfaces__, but that sounds ugly.  In particular, I
don't really want my interfaces module to actually *conflict* with
Zope's.
As I mentioned on the zope3-dev list, you want to use the facade
Interface from (Packages3/Interface) in Zope 2.7. This is a bit of a
pain to set up. The facade will be a standard part of Zope 2.8.
As a note so Terry also sees; I couldn't get this to work.

Setting it up using the zope.conf 'path' setting in Zope 2.7 to include 
this on the Python path fails, as Zope actually imports the old (non 
facade) interface package before it gets to do configuration. This means 
the facade never is imported, as the next imports will re-use the cached 
  initial import.
Here is an excerpt from the 'runzope' I use for FrankenZope sites 
(that is our affectionate name for that Interface package):

  #!/bin/sh
  python=/opt/zc/bin/python2.3
  zope_home=/opt/zc/lib/zope2.7
  zodb3_home=/opt/zc/lib/zodb3.2
  zope3_home=/opt/zc/lib/zope3
  instance=/var/zc/appserver
  transylvania=/opt/zc/lib/frankenzope  # contains Interface!
  # N.B.:  $instance/lib/python contains a symlink to $transylvania
  PYTHONPATH=$instance/lib/python:$zodb3_home:$zope_home:zope3_home
  export PYTHONPATH
  config_file=/opt/zc/etc/zope.conf
  zope_run=$zope_home/Zope/Startup/run.py
  exec $python $zope_run -C $config_file $@

Note that I abandoned earlier versions which just tried to force 
$transylvania into the head of $PYTHONPATH.  I don't recall now *why* 
that didn't work;  it could have been unrelated pilot error.  I can 
verify that with this setup, the shambling hulk *does* arise from the 
charging table.

Tres.
--
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  Zope Dealers   http://www.zope.com
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )