[ZODB-Dev] AdaptableStorage - format of property files

Sergey Konozenko skonozenko@genuone.com
Thu, 13 Feb 2003 12:30:29 -0500


I thought it was easier before I looked at the code :-(

I think you're right. The mode attribute should be submitted to both
readData and writeData and it should be stored in the queue.

I'm not sure about pickle survival though. Anybody has a clue?

One way might be to separate the "remainder" section into .remainder file
and always
treat it as binary. This way, we probably can always treat .properties file
as a text one.

Sergey

-----Original Message-----
From: Shane Hathaway [mailto:shane@zope.com]
Sent: Thursday, February 13, 2003 11:41 AM
To: skonozenko@genuone.com
Cc: zodb-dev@zope.org
Subject: Re: [ZODB-Dev] AdaptableStorage - format of property files


Sergey Konozenko wrote:
> Some of my colleagues prefer Windows though.
>
> properties files are written in "binary" format - no LF to CR,LF
> translation.
> My guess is it's not that hard to change that. Would you like me to do it
> and send you a patch?
>
> I will lookup "open" invocations and add "t" mode to them.

I think FSConnection.writeData() needs to accept an optional "mode"
argument, which would cover most of the problem.  Metadata files will
also have to be written in text mode, but I'm not entirely sure that the
text-mode pickles will survive the translation.  What do you think?

Shane