[Zope-dev] New-style classes and ClassSecurityInfo, fixed already?

2004-01-04 Thread Mike C. Fletcher
   http://zope.org/Collectors/Zope/1055

Is a bug report I filed a while ago for a fairly trivial breakage of the 
ClassSecurityInfo class due to the use of assignment to the class 
dictionary during the apply method.  I'm wondering, is this fixed now on 
CVS head?  I've been using a work-around module sub-class for Zope 2.7 
work w/ new-style classes, but I can't imagine that's something that 
would be wanted as a solution.  The ClassSecurityInfo.apply method is 
changed to use setattr instead of dict['x'] = y.

The InitializeClass function also needs to have the same transformation 
applied to it.

If desired I can pull the CVS tree and produce a diff if the problem 
isn't already solved.

Have fun,
Mike
___
 Mike C. Fletcher
 Designer, VR Plumber, Coder
 http://members.rogers.com/mcfletch/


___
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] New-style classes and ClassSecurityInfo, fixed already?

2004-01-04 Thread Leonardo Rochael Almeida

On Mon, 2004-01-05 at 00:06, Mike C. Fletcher wrote:
 http://zope.org/Collectors/Zope/1055
 
 Is a bug report I filed a while ago for a fairly trivial breakage of the 
 ClassSecurityInfo class due to the use of assignment to the class 
 dictionary during the apply method. [...]
 
 The InitializeClass function also needs to have the same transformation 
 applied to it.
 
 If desired I can pull the CVS tree and produce a diff if the problem 
 isn't already solved.

If you do that, and attach the patch to the bug report, people with CVS
access will have even less excuses not to fix it :-)


___
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] FileStorage instance has no attribute '_serial'

2004-01-04 Thread Jeff Kowalczyk
I'm not sure whether the collector issue 1164 I posted is simply a 
missing configuration step on my part. At any rate, I'm still unable to
start the current checkout of Zope HEAD. The only edit I make to
/var/zope/etc/zope.conf is 'effective-user zuser', and the problem below
also occurs if I then bin/runzope as root.

Can anyone tell me if I'm missing something, or is this a bug?

Thanks.

[EMAIL PROTECTED] Zope]$ ./configure
[EMAIL PROTECTED] Zope]$ make
[EMAIL PROTECTED] Zope]$ make install
[EMAIL PROTECTED] var]# /opt/Zope-2.8/bin/mkzopeinstance.py
[EMAIL PROTECTED] Zope]# chown -R zuser /var/zope/var
[EMAIL PROTECTED] Zope]# chgrp -R zuser /var/zope/var
[EMAIL PROTECTED] Zope]$ /var/zope/bin/runzope
--
2004-01-04T23:06:08 INFO(0) ZServer HTTP server started at Sun Jan  4 23:06:08 2004
Hostname: localhost.localdomain
Port: 8080
--
2004-01-04T23:06:08 INFO(0) ZServer FTP server started at Sun Jan  4 23:06:08 2004
Hostname: laptop
Port: 8021
--
2004-01-04T23:06:10 DEBUG(-200) FileStorage create storage 
/var/zope/var/Data.fsTraceback (most recent call last):
  File /opt/Zope-2.8/lib/python/Zope/Startup/run.py, line 49, in ?
run()
  File /opt/Zope-2.8/lib/python/Zope/Startup/run.py, line 19, in run
start_zope(opts.configroot)
  File /opt/Zope-2.8/lib/python/Zope/Startup/__init__.py, line 50, in start_zope
starter.startZope()
  File /opt/Zope-2.8/lib/python/Zope/Startup/__init__.py, line 218, in startZope
Zope.startup()
  File /opt/Zope-2.8/lib/python/Zope/__init__.py, line 46, in startup
_startup()
  File /opt/Zope-2.8/lib/python/Zope/App/startup.py, line 54, in startup
DB = configuration.dbtab.getDatabase('/', is_root=1)
  File /opt/Zope-2.8/lib/python/DBTab/DBTab.py, line 96, in getDatabase
db = self._createDatabase(name, is_root)
  File /opt/Zope-2.8/lib/python/DBTab/DBTab.py, line 113, in _createDatabase
db = factory.open()
  File /opt/Zope-2.8/lib/python/Zope/Startup/datatypes.py, line 172, in open
DB = self.createDB()
  File /opt/Zope-2.8/lib/python/Zope/Startup/datatypes.py, line 169, in createDB
return ZODBDatabase.open(self)
  File /opt/Zope-2.8/lib/python/ZODB/config.py, line 101, in open
version_cache_size=section.version_cache_size)
  File /opt/Zope-2.8/lib/python/ZODB/DB.py, line 98, in __init__
storage.store('\0\0\0\0\0\0\0\0', None, file.getvalue(), '', t)
  File /opt/Zope-2.8/lib/python/ZODB/FileStorage.py, line 791, in store
newserial=self._serial
AttributeError: FileStorage instance has no attribute '_serial'

[EMAIL PROTECTED] var]$ ls -l /var/zope/var
total 24
-rw-rw-r--1 zuser   zuser 4 Jan  4 23:06 Data.fs
-rw-rw-r--1 zuser   zuser   103 Jan  4 23:06 Data.fs.index
-rw-rw-r--1 zuser   zuser 5 Jan  4 23:06 Data.fs.lock
-rw-rw-r--1 zuser   zuser 0 Jan  4 23:06 Data.fs.tmp
-rw-r--r--1 zuser   zuser   299 Jan  4 23:01 README.txt
-rw-rw-r--1 zuser   zuser 4 Jan  4 23:06 Z2.lock
-rw-rw-r--1 zuser   zuser 4 Jan  4 23:06 Z2.pid




___
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] 2.7 dies when downloading file

2004-01-04 Thread robert
Hi there,
I would be gratefull if somebody could help with the following:

calling the following piece of code lets Zope die.

security.declareProtected(CMFCorePermissions.View, 'index_html')
def index_html(self, RESPONSE):
 Produce a PDF for issue
RESPONSE.setHeader('content-type', self.content_type())
RESPONSE.setHeader('content-length', str(self.get_size()))
RESPONSE.setHeader('content-disposition', 'attachment;filename=i%s' % 
self.getFilename())
RESPONSE.write(self.getFile())


it produces the following traceback


  File /home/zope/Zope-2.7-head/lib/python/Zope/Startup/run.py, line 49, 
in ?
run()
  File /home/zope/Zope-2.7-head/lib/python/Zope/Startup/run.py, line 19, in 
run
start_zope(opts.configroot)
  File /home/zope/Zope-2.7-head/lib/python/Zope/Startup/__init__.py, line 
66, in start_zope
Lifetime.loop()
  File /home/zope/Zope-2.7-head/lib/python/Lifetime.py, line 43, in loop
lifetime_loop()
  File /home/zope/Zope-2.7-head/lib/python/Lifetime.py, line 53, in 
lifetime_loop
asyncore.poll(timeout, map)
  File /usr/lib/python2.3/asyncore.py, line 125, in poll
write(obj)
  File /usr/lib/python2.3/asyncore.py, line 81, in write
obj.handle_error()
  File /home/zope/Zope-2.7-head/lib/python/ZServer/medusa/http_server.py, 
line 440, in handle_error
asynchat.async_chat.handle_error (self)
  File /usr/lib/python2.3/asyncore.py, line 420, in handle_error
self.close()
  File /home/zope/Zope-2.7-head/lib/python/ZServer/HTTPServer.py, line 342, 
in close
p.more() # free up resources held by producer
AttributeError: more


___
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 )