[Zope-dev] Unicode encoding/decoding

2003-10-07 Thread Bjorn Stabell
How does Zope handle Unicode encoding/decoding of non-UTF8 encodings?

I see encoding/decoding functions popping up in products (e.g.,
Archetypes), but I thought Zope already had this covered?

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 )


[Zope-dev] Re: catalogObject changes (Zope-2_6-branch)

2003-10-07 Thread Yuppie
Hi!

Chris McDonough wrote:
Option 1:
 Add an update_metadata flag to the catalogObject method with a default 
 of True on all branches.

Option 2:
 Do nothing, but add the updateMetadata method to the ZCatalog  
 interface.

Option 1 would only take effect when 2.6.3 was released (if ever) and
2.7 final would have the new flag.  Because since the behavior change
has already been released in 2.6.2, it might be better to do option 2
and fix the places in CMF/SilvaMetadata that specify indexes, leaving it
the way it is.
I agree backwards compatibilty is broken anyway. Whatever the solution 
is, products using the idxs argument for metadata changes have to be 
changed to work with 2.6.2.

Regarding migration, I agree option 2 would be better.

Regarding the interface, I still prefer option 1 or even option 1 *and* 
2. The fact that

  zcat.catalog_object(obj)

does update metadata while

  zcat.catalog_object(obj, idxs=zcat.indexes())

doesn't, isn't intuitive at all. At least this difference has to be 
mentioned in the interface definition.

Just my 2 cents. I can live with both options.

Cheers,
Yuppie


___
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: CVS File 0.9 bugs

2003-10-07 Thread Craeg K Strong
Thanks for your note.

Yes, version 0.9 went out with some silly bugs, and I haven't had time 
to fix them.
However, we now have a customer funding some Zope-related work, so I
imagine I will have time to work on CVSFile again within 3-6 weeks.

CVSFile will be supported until it gets replaced by another Zope add-on
that will add CVS functionality to the Adaptable Persistence Engine (APE).
We will be looking into that for our customer as well.  APE is the wave
of the future, it will ultimately replace ExternalFile (the current 
underpinnings
of CVSFile), ExtFile, LocalFS, and lots of other related products.

As far as migrating from a Zope site developed the traditional way, you have
to decide what is worth versioning and what is not.  For example, in 
what format
is your content?  Is it in XML?  HTML?  Is it mixed in with your formatting
directives inside your ZPTs? Or perhaps is it all in DTML documents?

We used versioning for anything meeting any of the following criteria
- multiple developers might work on it simultaneously
- content that needs to be reused
- anything changing rapidly that might need to be reverted or needs an 
audit trail

Under that definition, quite a few zope objects should be versioned, all but
the most trivial ones, really.
One option is to have a folder full of versioned CVSFiles in a tree, 
parallel
to your real site.  Your real site then merely navigates in via 
aquisition and retrieves its
content from objects within the versioned area.   That way, you have *two*
hierarchies.  One is for the site.  One matches the file system and CVS.

I found this arrangement a little easier to handle, because I could 
refresh the
entire CVSFile hierarchy in a batch and watch my website update :-)
See the latest CVSFile batch oriented functionality for more details.

Hope this helps,

--Craeg

PS, I cc'd the zope-dev mailing list, as I feel the conversation might 
be helpful to others...

Guido Notari wrote:

Dear Sirs,
we're examining your CVS File Zope product, and we feel it has the
potential to be hugely useful to the serious Zope developer.
I am eager to give it a serious try, and integrate it in one of our
projects.
I had difficulties with it, though, and found some little bugs, you may be
already aware of.
Actually, I'm having problems with the CVS Management tag of a CVS File
instance: as it goes, the page template file (cvs.pt) names the called
methods with incorrect spelling. Among the others, I found
manage_updateFile instead of manage_UpdateFile, and manage_commitFile
instead of manage_CommitFile.
There are probably others...
In the light of these little bugs, considering that Revision 0.9.0 was
released a few month ago (May 2003), I cannot refrain from asking:
Is CVS File supported anymore? Why such obvious bugs got unnoticed?
(possibly by bud luck and page templates been rushed in place?)
I would really like to hear from you, I don't really want to lose the
opportunity to test the product, if indeed is usable.
And, speaking of doubts... It's not really obvious to me how to migrate
_into_ a CVS an existing Zope site, developed in the traditional way.
Have you got any standard method you're adopting to make such a move?
Perhaps some kind of dump product?
Best regards
Guido Notari
--
__/__/   Link I.T. spa   Tel  +39 0332 250111
__/__/   Servizi Integrati Avanzati  Fax  +39 0332 250199
 via Cairoli, 5 - 21100 Varese   http://www.linkgroup.it/
 

--
Craeg K Strong, General Partner
Ariel Partners LLC
http://www.arielpartners.com
voice 781-647-2425
fax   781-647-9690
NOTICE: This message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any review,
retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than
the intended recipient is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies -- including electronic copies -- of the original message.


___
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: catalogObject changes (Zope-2_6-branch)

2003-10-07 Thread Casey Duncan
This is broken in 2.6.2 and I would consider it a bug in that release. I would 
support an improved api such as:

catalog_object(obj, idxs=[], metadata=1)

The way it is currently breaks at least one of my applications as well 
(ironically, this was an application the Chris was also working on).

I am happy to make the change if we agree it is the right thing.

-Casey
 

On Tuesday 07 October 2003 07:13 am, Yuppie wrote:
 Hi!
 
 
 Chris McDonough wrote:
  Option 1:
   Add an update_metadata flag to the catalogObject method with a default 
   of True on all branches.
  
  Option 2:
   Do nothing, but add the updateMetadata method to the ZCatalog  
   interface.
  
  Option 1 would only take effect when 2.6.3 was released (if ever) and
  2.7 final would have the new flag.  Because since the behavior change
  has already been released in 2.6.2, it might be better to do option 2
  and fix the places in CMF/SilvaMetadata that specify indexes, leaving it
  the way it is.
 
 I agree backwards compatibilty is broken anyway. Whatever the solution 
 is, products using the idxs argument for metadata changes have to be 
 changed to work with 2.6.2.
 
 Regarding migration, I agree option 2 would be better.
 
 Regarding the interface, I still prefer option 1 or even option 1 *and* 
 2. The fact that
 
zcat.catalog_object(obj)
 
 does update metadata while
 
zcat.catalog_object(obj, idxs=zcat.indexes())
 
 doesn't, isn't intuitive at all. At least this difference has to be 
 mentioned in the interface definition.
 
 Just my 2 cents. I can live with both options.
 
 
 Cheers,
   Yuppie
 
 
 
 ___
 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] Re: catalogObject changes (Zope-2_6-branch)

2003-10-07 Thread Casey Duncan
On Tuesday 07 October 2003 10:41 am, Yuppie wrote:
 Hi!
 
 
 Casey Duncan wrote:
  This is broken in 2.6.2 and I would consider it a bug in that release. I 
would 
  support an improved api such as:
  
  catalog_object(obj, idxs=[], metadata=1)
 
 I'm sure you mean catalog_object(obj, uid, idxs=[], metadata=1) if we 
 are talking about the ZCatalog interface.

No I figured while we were at it, we'd break compatibilty for a completely 
different reason ;^)

Seriously, I meant what you said...

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


Re: [Zope-dev] Re: catalogObject changes (Zope-2_6-branch)

2003-10-07 Thread Leonardo Rochael Almeida
On Tue, 2003-10-07 at 10:52, Casey Duncan wrote:
 This is broken in 2.6.2 and I would consider it a bug in that release. I would 
 support an improved api such as:
 
 catalog_object(obj, idxs=[], metadata=1)
 
 The way it is currently breaks at least one of my applications as well 
 (ironically, this was an application the Chris was also working on).
 
 I am happy to make the change if we agree it is the right thing.

+1

Changing the behaviour of existing APIs in a backward incompatible way
is a Bad Thing (TM). IMHO, The only acceptable exception is if the API
had different behaviour from the documentation to begin with (i.e. the
API was broken).

And I suggest rushing up a 2.6.3 (even if just a beta or rc) to
discourage people from migrating to 2.6.2.

Cheers, Leo

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
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: catalogObject changes (Zope-2_6-branch)

2003-10-07 Thread Casey Duncan
On Tuesday 07 October 2003 12:08 pm, Chris McDonough wrote:
 On Tue, 2003-10-07 at 09:52, Casey Duncan wrote:
  This is broken in 2.6.2 and I would consider it a bug in that release. I 
would 
  support an improved api such as:
  
  catalog_object(obj, idxs=[], metadata=1)
  
  The way it is currently breaks at least one of my applications as well 
  (ironically, this was an application the Chris was also working on).
 
 FWIW, those changes have been in there for two months on the 2.6
 branch.  This includes 2.6.2b3, b4, b5, and b6.  The breakage couldn't
 have been *that* bad. ;-)

I guess that means I should start using releases ;^)

Nah

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


Re: [Zope-dev] Re: catalogObject changes (Zope-2_6-branch)

2003-10-07 Thread Chris McDonough
On Tue, 2003-10-07 at 09:52, Casey Duncan wrote:
 This is broken in 2.6.2 and I would consider it a bug in that release. I would 
 support an improved api such as:
 
 catalog_object(obj, idxs=[], metadata=1)
 
 The way it is currently breaks at least one of my applications as well 
 (ironically, this was an application the Chris was also working on).

FWIW, those changes have been in there for two months on the 2.6
branch.  This includes 2.6.2b3, b4, b5, and b6.  The breakage couldn't
have been *that* bad. ;-)

- 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] Re: catalogObject changes (Zope-2_6-branch)

2003-10-07 Thread Chris McDonough
OK, I checked in changes on the 2.6, 2.7, and HEAD branches that add an
update_metadata keyword argument to Catalog's catalogObject and
ZCatalog's catalog_object.  The argument defaults to true.  I also added
some tests, and made sure that the reindexIndex method of ZCatalog took
advantage of this feature.

- C


On Tue, 2003-10-07 at 12:08, Chris McDonough wrote:
 On Tue, 2003-10-07 at 09:52, Casey Duncan wrote:
  This is broken in 2.6.2 and I would consider it a bug in that release. I would 
  support an improved api such as:
  
  catalog_object(obj, idxs=[], metadata=1)
  
  The way it is currently breaks at least one of my applications as well 
  (ironically, this was an application the Chris was also working on).
 
 FWIW, those changes have been in there for two months on the 2.6
 branch.  This includes 2.6.2b3, b4, b5, and b6.  The breakage couldn't
 have been *that* bad. ;-)
 
 - 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 )


___
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: catalogObject changes (Zope-2_6-branch)

2003-10-07 Thread Leonardo Rochael Almeida
On Tue, 2003-10-07 at 16:57, Chris McDonough wrote: 
 OK, I checked in changes on the 2.6, 2.7, and HEAD branches that add an
 update_metadata keyword argument to Catalog's catalogObject and
 ZCatalog's catalog_object.  The argument defaults to true.  I also added
 some tests, and made sure that the reindexIndex method of ZCatalog took
 advantage of this feature.

Cool! Can we get some form of 2.6.3 beta out to encourage people not to
migrate to 2.6.2?

Cheers, Leo

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