[Zope] Re: External Methods, Proxy Roles, and Executable Security
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jens Vagelpohl wrote: > > On 22 Nov 2005, at 20:08, Dieter Maurer wrote: > >> You have lost the thread's start: >> >> George's problem has been that he could not move an object >> in an *EXTERNAL METHOD*, i.e. in trusted filesystem code. >> >> He would have the same problem in a filesystem product. >> >> The problem is that "CopySupport" performs a local security >> check (in "_verifyObjectPaste") independent from its caller >> (it does not matter whether the rename/move/copy was >> called from trusted or untrusted code). >> >> With appropriate proxy roles, an untrusted Python Script can >> perform some >> rename/move/copy that trusted code is unable to perform. >> >> I assume you can agree that this is a somewhat unsane situation... > > > Yes, that's very odd... thanks for reminding me of the thread's start! The actual problem here is a confusion of "authorization" with "containment constraints": the CopySupport code is using a single check to test both, which makes it impossible to do the Right Thing (TM): either the proxy roles should be taken into account, in which case the containment constraint may be violated, or they shouldn't, in which case a proxy-role-granted script cannot be used to perform a "controlled" paste which would otherwise not be authorized. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDg5LI+gerLs4ltQ4RAtblAJwNsXuSMgrSmuk5Jkx2dNvq5XcF+ACfVfli kWb4OErhWp0Zm95oGrNK+6o= =Thwe -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope3-dev] "zope.app.application.HTTPPublicationRequestFactory" interprets "text/xml" requests as XML-RPC (was: [Zope] Hard-coded "Content-type:text/xml" as xmlrpc in Zope (2.8.1))
--On 22. November 2005 20:37:16 +0100 Dieter Maurer <[EMAIL PROTECTED]> wrote: You should complain about this misfeature on "zope3-dev@zope.org". Definitely, there should not be a fixed (not configurable) association between "text/xml" requests and "XML-RPC" as "text/xml" can be interesting for the application and for SOAP. For Zope 3.2 publishers are pluggable and can be configure through ZCML. The registration is based on the request method and mime-type. -aj pgpJYm3fGyR5V.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] External Methods, Proxy Roles, and Executable Security
On 22 Nov 2005, at 20:08, Dieter Maurer wrote: You have lost the thread's start: George's problem has been that he could not move an object in an *EXTERNAL METHOD*, i.e. in trusted filesystem code. He would have the same problem in a filesystem product. The problem is that "CopySupport" performs a local security check (in "_verifyObjectPaste") independent from its caller (it does not matter whether the rename/move/copy was called from trusted or untrusted code). With appropriate proxy roles, an untrusted Python Script can perform some rename/move/copy that trusted code is unable to perform. I assume you can agree that this is a somewhat unsane situation... Yes, that's very odd... thanks for reminding me of the thread's start! jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
"zope.app.application.HTTPPublicationRequestFactory" interprets "text/xml" requests as XML-RPC (was: [Zope] Hard-coded "Content-type:text/xml" as xmlrpc in Zope (2.8.1))
John Ziniti wrote at 2005-11-21 15:04 -0500: > ... >Zope-2.8.1 now additionally has the zope.app.publication. >HTTPPublicationRequestFactory class, which also assumes >that "text/xml" means xmlrpc (in fact, it assumes that >anything that startswith('text/xml') is an xmlrpc call). "zope.app" is part of Zope 3. You should complain about this misfeature on "zope3-dev@zope.org". Definitely, there should not be a fixed (not configurable) association between "text/xml" requests and "XML-RPC" as "text/xml" can be interesting for the application and for SOAP. >Not fixing old code which acts in strange hard-coded ways is >something I understand, but adding new code that also >acts that way seems like it is getting further away >from "good" :) -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] External Methods, Proxy Roles, and Executable Security
Jens Vagelpohl wrote at 2005-11-20 19:01 +0100: > ... >IMHO proxy roles should be used extremely sparingly, if at all. They >are a last resort and I personally never use them. Matter of fact I >believe having to use them means the application design could use >some improvement... > >If something needs to be done with elevated privileges it should be >in filesystem product code or, if that is not feasible, in an >external method. At least that's my philosophy ;) You have lost the thread's start: George's problem has been that he could not move an object in an *EXTERNAL METHOD*, i.e. in trusted filesystem code. He would have the same problem in a filesystem product. The problem is that "CopySupport" performs a local security check (in "_verifyObjectPaste") independent from its caller (it does not matter whether the rename/move/copy was called from trusted or untrusted code). With appropriate proxy roles, an untrusted Python Script can perform some rename/move/copy that trusted code is unable to perform. I assume you can agree that this is a somewhat unsane situation... -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] cookie crumbler and error messages
paul hendrick wrote at 2005-11-21 14:44 +: >Hi, thanks for the reply. >I did what you asked and the error log produced these messages: > >Unauthorized: You are not authorized to access this >resource. Username and password are not correct. >Unauthorized: You are not allowed to access 'sql_select' in this context > >the sql_select error is because my .metadata file is denying requests to it >for users with a certain role. >no idea where to go from here i'm afraid There is another vital rule: whenever you see errors (more precisely "exception"s), you should look (and report) the associated traceback. It tells you where the exception occured. What we know so far: the request tried to access "sql_select" and did not have the required permission. The traceback will tell you where this happens and this may help us to understand why it happens. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] External Methods, Proxy Roles, and Executable Security
George Lee wrote at 2005-11-20 12:47 -0500: >Is there much buzz about this in CMF developer land? Apart from regular problem reports (usually in the Plone mailing list), there are few talks about proxy roles. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] DateTime mess
Jürgen Herrmann wrote at 2005-11-21 10:33 +0100: > ... difficult to understand timezone handling ... >once again sry, if i raised expectations on the fix of strftime. I am a bit astonished that you need to understand timezone handling in order to implement an improved "DateTime.strftime". The only thing "strftime" has to do with a timezone it to display it (when the format calls for it). For this, you simply ask the "DateTime" object for its timezone. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope-2.8.1, LocalFS, and the importance of _p_jar
I've encountered the issue described here: http://mail.zope.org/pipermail/zope/2005-August/161120.html on a recently upgraded Zope using LocalFS. I have tracked down the issue to the fact that the object that LocalFS "hands" to ZODB is a WrapperObject, and this object does not have an oid. This raises an AssertionError during the _commit method of ZODB.Connection. I have traced the code a little bit and I see that this block of code will be avoided for these objects if the objects do not appear in self._registered_objects, which I can achieve by making sure that the object has no _p_jar attribute. If I comment out the line in the LocalFS object where the wrapper object's _p_jar is set to the parent object's _p_jar, everything works fine, with no (apparent) problems. [ I tried also setting obj._p_oid = self._p_oid, but then Zope has pickling problems trying to pickle instances of the wrapper class ]. The problem I have with my "solution" is that I have no clue what _p_jar is. What is _p_jar used for within the Zope model? What are the implications of having an object with self._p_jar=None? What are the implications of a transient object (not stored in the ZODB but on the local filesystem), with self._p_jar=None? Thanks in advance for any information, John Ziniti ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: DateTime mess
On Nov 22, 2005, at 11:27 AM, Gabriel Genellina wrote: At Tuesday 22/11/2005 05:50, Jürgen Herrmann wrote: one more question (to the public!): do we REALLY need dates <1900 / >2036 ? using unix timestamps for storage and as the base for all conversions would make things a lot easier! Sure. What about birthdays of aged people? Long running forecasts? The first time I read this, I thought it said "long-running people", which would be funnier. ;-) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] unlinking stale socket?
Yes, so something must have killed the server and shut it down leading to the stale socket message. However I guess without further checking through the server logs I won't find out exactly why etc.On 11/22/05, J Cameron Cooper <[EMAIL PROTECTED] > wrote:michael nt milne wrote:> Ok, but Zope and Apache were serving nothing until I re-started Zope. > The server had died for some reasonIndeed. And that's what it tells you with the "unlinking stale socket":it was not shut down in an orderly manner previously.But that message says nothing about why. --jcc> On 11/22/05, *Chris McDonough* <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote: >> I think it probably was running after the first time you invoked it.> The message is only informative, meaning that zopectl died unexpectly> the last time it was run (without cleaning up after itself). It's > not a fatal error or at least hasn't been whenever I've seen it.>> On Nov 22, 2005, at 10:57 AM, michael nt milne wrote:>> > Yes, I noticed that the deamon wasn't running and so re-started it. > > It started up fine but that was the message I received. Just> > wondered what happened etc..> >> > On 11/22/05, Chris McDonough < [EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote: Note that> > Zope likely started. Did it? Did you try zopectl stop and> > zopectl start again? If so, did it work? > >> > - C> >> > On Nov 22, 2005, at 9:52 AM, michael nt milne wrote:> >> > > Hi> > >> > > My zopeinstance went down and I was getting an 'upstream server' > > > unknown message from apache. On restarting zope from ./zopectl this> > > was the message I got.> > >> > > unlinking stale socket> > > /home/zopeinstance/var/zopectl/sock,sleep/ > > > No handlers could be found for logger 'root'> > >> > > Does anyone have any idea on how to prevent this at all, or what> > > happened here? > > >> > > Thanks> > >> > > Michael--"Building Websites with Plone"http://plonebook.packtpub.com/ Enfold Systems, LLChttp://www.enfoldsystems.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Proxy setting for Zope and Products
On 22 Nov 2005, at 15:38, Renfer Serge (EDU) wrote: Hello all, I'm responsible of a server (Debian Sarge) which has been put behind a firewall! I am strugling with proxy problems. For instance, CMFSin doesn't seem to work (for syndication slots in Plone), and LDAPUserFolder cannot reach an external ldap server. On the system itself, I have set the http_proxy environment variable (in .bashrc), it works fine for apt-get, for example, but it seems it has no effect on Zope! Do you have any idea if there is a way to inform directly Zope and all its products about a proxy in a simple way, or only products that are proxy-aware can be set to work in such an environment? There is no such setting and this problem has nothing to do with Zope. This is *purely* a firewall issue that needs to be solved by the firewall administrator with input from you. I don't know what CMFSin is or does, but at least for the LDAPUserFolder you probably know what LDAP server and port you want to connect to so you need to tell the firewall admin to allow that access. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: DateTime mess
At Tuesday 22/11/2005 05:50, Jürgen Herrmann wrote: one more question (to the public!): do we REALLY need dates <1900 / >2036 ? using unix timestamps for storage and as the base for all conversions would make things a lot easier! Sure. What about birthdays of aged people? Long running forecasts? Gabriel Genellina Softlab SRL ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] unlinking stale socket?
Ok, but Zope and Apache were serving nothing until I re-started Zope. The server had died for some reason On 11/22/05, Chris McDonough <[EMAIL PROTECTED]> wrote: I think it probably was running after the first time you invoked it.The message is only informative, meaning that zopectl died unexpectly the last time it was run (without cleaning up after itself). It'snot a fatal error or at least hasn't been whenever I've seen it.On Nov 22, 2005, at 10:57 AM, michael nt milne wrote:> Yes, I noticed that the deamon wasn't running and so re-started it. > It started up fine but that was the message I received. Just> wondered what happened etc..>> On 11/22/05, Chris McDonough <[EMAIL PROTECTED]> wrote: Note that > Zope likely started. Did it? Did you try zopectl stop and> zopectl start again? If so, did it work?>> - C>> On Nov 22, 2005, at 9:52 AM, michael nt milne wrote:>> > Hi > >> > My zopeinstance went down and I was getting an 'upstream server'> > unknown message from apache. On restarting zope from ./zopectl this> > was the message I got.> > > > unlinking stale socket> > /home/zopeinstance/var/zopectl/sock,sleep/> > No handlers could be found for logger 'root'> >> > Does anyone have any idea on how to prevent this at all, or what > > happened here?> >> > Thanks> >> > Michael> > ___> > Zope maillist - Zope@zope.org > > http://mail.zope.org/mailman/listinfo/zope> > ** No cross posts or HTML encoding! **> > (Related lists -> > http://mail.zope.org/mailman/listinfo/zope-announce> > http://mail.zope.org/mailman/listinfo/zope-dev )>> ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] unlinking stale socket?
I think it probably was running after the first time you invoked it. The message is only informative, meaning that zopectl died unexpectly the last time it was run (without cleaning up after itself). It's not a fatal error or at least hasn't been whenever I've seen it. On Nov 22, 2005, at 10:57 AM, michael nt milne wrote: Yes, I noticed that the deamon wasn't running and so re-started it. It started up fine but that was the message I received. Just wondered what happened etc.. On 11/22/05, Chris McDonough <[EMAIL PROTECTED]> wrote: Note that Zope likely started. Did it? Did you try zopectl stop and zopectl start again? If so, did it work? - C On Nov 22, 2005, at 9:52 AM, michael nt milne wrote: > Hi > > My zopeinstance went down and I was getting an 'upstream server' > unknown message from apache. On restarting zope from ./zopectl this > was the message I got. > > unlinking stale socket > /home/zopeinstance/var/zopectl/sock,sleep/ > No handlers could be found for logger 'root' > > Does anyone have any idea on how to prevent this at all, or what > happened here? > > Thanks > > Michael > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - > http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] unlinking stale socket?
Yes, I noticed that the deamon wasn't running and so re-started it. It started up fine but that was the message I received. Just wondered what happened etc.. On 11/22/05, Chris McDonough <[EMAIL PROTECTED]> wrote: Note that Zope likely started. Did it? Did you try zopectl stop andzopectl start again? If so, did it work? - COn Nov 22, 2005, at 9:52 AM, michael nt milne wrote:> Hi>> My zopeinstance went down and I was getting an 'upstream server'> unknown message from apache. On restarting zope from ./zopectl this > was the message I got.>> unlinking stale socket> /home/zopeinstance/var/zopectl/sock,sleep/> No handlers could be found for logger 'root'>> Does anyone have any idea on how to prevent this at all, or what > happened here?>> Thanks>> Michael> ___> Zope maillist - Zope@zope.org> http://mail.zope.org/mailman/listinfo/zope> ** No cross posts or HTML encoding! **> (Related lists -> http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] unlinking stale socket?
Note that Zope likely started. Did it? Did you try zopectl stop and zopectl start again? If so, did it work? - C On Nov 22, 2005, at 9:52 AM, michael nt milne wrote: Hi My zopeinstance went down and I was getting an 'upstream server' unknown message from apache. On restarting zope from ./zopectl this was the message I got. unlinking stale socket /home/zopeinstance/var/zopectl/sock,sleep/ No handlers could be found for logger 'root' Does anyone have any idea on how to prevent this at all, or what happened here? Thanks Michael ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] unlinking stale socket?
Hi My zopeinstance went down and I was getting an 'upstream server' unknown message from apache. On restarting zope from ./zopectl this was the message I got. unlinking stale socket /home/zopeinstance/var/zopectl/sock,sleep/ No handlers could be found for logger 'root' Does anyone have any idea on how to prevent this at all, or what happened here? Thanks Michael ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Proxy setting for Zope and Products
Hello all, I'm responsible of a server (Debian Sarge) which has been put behind a firewall! I am strugling with proxy problems. For instance, CMFSin doesn't seem to work (for syndication slots in Plone), and LDAPUserFolder cannot reach an external ldap server. On the system itself, I have set the http_proxy environment variable (in .bashrc), it works fine for apt-get, for example, but it seems it has no effect on Zope! Do you have any idea if there is a way to inform directly Zope and all its products about a proxy in a simple way, or only products that are proxy-aware can be set to work in such an environment? Thanks in advance! serge ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: DateTime mess
[ Lennart Regebro wrote:] > On 11/22/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: >> i'll surely change the storage format, when rewriting it! > > So you plan on having some version marker, or so, which > tells which storage format is used? > > //Curious. basicall i thought about having a dateime instance as "storage" in the new implementation and test for it's existance on DateTime instances. something like that: dt = getattr(self, '_datetime', None) if dt is not None: #new, everything ok else: #migrate! rfc! regards, juergen herrmann ___ >> XLhost.de - eXperts in Linux hosting << Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: DateTime mess
On 11/22/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: > i'll surely change the storage format, when rewriting it! So you plan on having some version marker, or so, which tells which storage format is used? //Curious. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: DateTime mess
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jürgen Herrmann wrote: > [ Florent Guillaume wrote:] > >> >>Jürgen Herrmann wrote: >> >>>recently i came up here with the intention to fix DateTime#strftime(). >>>while trying this, i had to dig deeper and deeper into the >>>implementation >>>of DateTime and especially the timezone and daylight saving stuff. >>>to be honest, it's completely hacked together :( >>>DateTimeZone.py has one BIG dictionary in it, not a single line of >>>comments. values of this dict are nested lists, among other hackish >>>things (list like usage of a string, with \000 as separator). >>>the methods that use this dict also have no comments/docstrings at all. >>>obviously the guy(s) that originally wrote this, is/are hiding (i know >>>why :) so, there's nobody to ask either... >>> >>>sorry guys, i won't be able to completely fix this for now. i found >>>a way to monkey patch zope to make it work for my case (2 timezones >>>only). my plan is to completely reimplement DateTime, based on >>>python's datetime in my own freetime (maybe around xmas this year) >>>and give it back to the community. >>> >>>once again sry, if i raised expectations on the fix of strftime. >> >>Yes replacing DateTime is a laudable but difficult goal. >> >>One thing that could be done meanwhile is just refactor the unit test to >>be a base class that could then be used to test DateTime or to test >>another potential implementation. That would go a long way to help >>actually write a new implementation. >> >>Florent >> > > hi florent! > > actually that's the best thing to do! this way the implementer knows > what to do exactly :) > but be aware that some tests got modified to pass with current (broken) > behaviour! > > one more question (to the public!): > do we REALLY need dates <1900 / >2036 ? using unix timestamps for > storage and as the base for all conversions would make things a lot > easier! Yes, we do need them. The Unix timestamp epoch starts at 1970, BTW. Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDgwz0+gerLs4ltQ4RAt95AJ9yGr7egzS6Fb6/Tlq3d196CccA1gCgkZeO Zs+XUWMJ9QhG8G4XRTOUF0k= =GaZ6 -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: DateTime mess
[ Lennart Regebro wrote:] > On 11/22/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: >> do we REALLY need dates <1900 / >2036 ? > > Yes. > >> using unix timestamps for >> storage and as the base for all conversions would make things a lot >> easier! > > datetimes are picklable, so if you are going to change how they are > stored (which may not be a good idea for backwards compatible > reasons), you should use that. i'll surely change the storage format, when rewriting it! storing year, month, day, hour, minute, second, a unix timestamp and tzinfo is plain odd! so using a datetime instance for storage indeed seems the most obvious thing if we need dates <1900 / >2036. regards, juergen herrmann ___ >> XLhost.de - eXperts in Linux hosting << Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: DateTime mess
On 11/22/05, Jürgen Herrmann <[EMAIL PROTECTED]> wrote: > do we REALLY need dates <1900 / >2036 ? Yes. > using unix timestamps for > storage and as the base for all conversions would make things a lot > easier! datetimes are picklable, so if you are going to change how they are stored (which may not be a good idea for backwards compatible reasons), you should use that. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: DateTime mess
[ Florent Guillaume wrote:] > > > Jürgen Herrmann wrote: >> recently i came up here with the intention to fix DateTime#strftime(). >> while trying this, i had to dig deeper and deeper into the >> implementation >> of DateTime and especially the timezone and daylight saving stuff. >> to be honest, it's completely hacked together :( >> DateTimeZone.py has one BIG dictionary in it, not a single line of >> comments. values of this dict are nested lists, among other hackish >> things (list like usage of a string, with \000 as separator). >> the methods that use this dict also have no comments/docstrings at all. >> obviously the guy(s) that originally wrote this, is/are hiding (i know >> why :) so, there's nobody to ask either... >> >> sorry guys, i won't be able to completely fix this for now. i found >> a way to monkey patch zope to make it work for my case (2 timezones >> only). my plan is to completely reimplement DateTime, based on >> python's datetime in my own freetime (maybe around xmas this year) >> and give it back to the community. >> >> once again sry, if i raised expectations on the fix of strftime. > > Yes replacing DateTime is a laudable but difficult goal. > > One thing that could be done meanwhile is just refactor the unit test to > be a base class that could then be used to test DateTime or to test > another potential implementation. That would go a long way to help > actually write a new implementation. > > Florent > hi florent! actually that's the best thing to do! this way the implementer knows what to do exactly :) but be aware that some tests got modified to pass with current (broken) behaviour! one more question (to the public!): do we REALLY need dates <1900 / >2036 ? using unix timestamps for storage and as the base for all conversions would make things a lot easier! regards, juergen herrmann ___ >> XLhost.de - eXperts in Linux hosting << Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )