Re: [Zope-dev] Bugfix release?

2002-12-02 Thread Toby Dickenson
On Sunday 01 December 2002 3:36 pm, Brian Lloyd wrote:
   FYI I'd like to have a 2.6.1 beta out next week. Jeremy is still
   looking at a few ZODB bug reports - as soon as he's done we'll
   make the beta.
 
  Im not sure this is a good plan.
 
  Jeremy's sortKey changes look like they deserve a longer beta
  testing period
  than I would have thought the demand for a DateTime fix would allow.

 My understanding was that objects would not be required to implement
 sortKey (and wouldn't be adversely affected for not implementing it)
 unless they cared about the specific issue that it addresses. I'll
 verify this w/Jeremy tomorrow, but last I heard ordering should only
 actually be an issue for Connection objects - other objects that
 play with the transaction mgr will generally not be subject to the
 deadlock issue that the sorting is designed to prevent (the deadlock
 is due to connection interaction w/a storage server).

Yes, Jeremys changes should be entirely backwards compatible. I have commented 
on zodb-dev how well this has been handled. I am entirely confident that it 
can go into a 2.6.x fairly soon. However it is still a major change to a 
critical component, with some indications that things are not 100% right:

http://collector.zope.org/Zope/701
http://lists.zope.org/pipermail/zodb-dev/2002-November/003810.html

I am not normally shy of the bleeding edge, but I am still running the cvs 
dated 2002-11-11 in production. This one change makes me nervous.

A bug in the transaction manager would be really bad news. I would have 
thought it appropriate to resolve these problems and leave at least a few 
weeks of beta test before release.



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Collector 697 should be critical!!!

2002-12-02 Thread Maik Jablonski
Hi,

http://collector.zope.org/Zope/697

should be set to critical, because it results in loosing essential data.

Case: We store much of our Keywords etc. in multiple-selects. 
Everytime a user edits and saves such a multiple-select, all items with 
NON-Ascii-characters [german umlaute for example] won't be shown as 
selected cause of the bug. So the next Save Changes will loose all 
this items.

I don't know where's the best place to fix this issue, but it need to be 
fixed as soon as possible...

Cheers, Maik




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )


[Zope-dev] ZSyncher and xml-rpc via firewalls

2002-12-02 Thread Dylan Jay
I was needing to use ZSyncher via a proxy server in our firewall. I wrote a
new transport to do this that you might want to incorporate into ZSyncher.
Nice product btw. Very helpful for my setup. Any chance of getting it to
synch bidirectionally?

import urllib

class AuthProxyTransport(xmlrpclib.Transport):
'''Handles an HTTP transaction to an XML-RPC server via a http proxy and
using basic authentication [EMAIL PROTECTED] '''

def __init__(self, username=None, password=None):
self.username = username
self.password = password
self.verbose = None
self.has_ssl = 0
self.proxies = urllib.getproxies()


def request(self, host, handler, request_body, verbose=0):
# issue XML-RPC request

import httplib

# Override to use proxies
realhost = None
if self.proxies.has_key(http):
realhost = host
proxy = self.proxies[http]
urltype, proxyhost = urllib.splittype(proxy)
host, selector = urllib.splithost(proxyhost)

h = httplib.HTTP(host)

if realhost:
h.putrequest(POST, http://; + realhost + handler)
else:
h.putrequest(POST, handler)

# required by HTTP/1.1
if realhost:
h.putheader(Host, realhost)
else:
h.putheader(Host, host)

# required by XML-RPC
h.putheader(User-Agent, self.user_agent)
h.putheader(Content-Type, text/xml)
h.putheader(Content-Length, str(len(request_body)))

#Override to do authentication (should really use username and
password encoded in url like urllib)
if self.username is not None and self.password is not None:
h.putheader(AUTHORIZATION, Basic %s % string.replace(
encodestring(%s:%s % (self.username, self.password)),
\012, ))

h.endheaders()

if request_body:
h.send(request_body)

errcode, errmsg, headers = h.getreply()

if errcode != 200:
raise xmlrpclib.ProtocolError(
host + handler,
errcode, errmsg,
headers
)

return self.parse_response(h.getfile())





___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] What do I get from 'cvs co Zope'?

2002-12-02 Thread Stefan H. Holek
It appears that when I currently do 'cvs co Zope' I get a version that 
already requires Python 2.2.2. GvR's zdctl.py stuff uses lambdas in a way 
that Python 2.1 does not grok.

How can I get at a Python 2.1.3 post 2.6.0 checkout?

Thanks,
Stefan

--
Those who write software only for pay should go hurt some other field.
/Erik Naggum/

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: What do I get from 'cvs co Zope'?

2002-12-02 Thread Maik Jablonski
Stefan H. Holek wrote:

It appears that when I currently do 'cvs co Zope' I get a version that 
already requires Python 2.2.2. GvR's zdctl.py stuff uses lambdas in a 
way that Python 2.1 does not grok.

How can I get at a Python 2.1.3 post 2.6.0 checkout?

You have to specify the correct branch:

cvs -z7 -d :pserver:[EMAIL PROTECTED]:/cvs-repository checkout -r 
Zope-2_6-branch Zope

please read:

http://dev.zope.org/CVS/FrontPage

-mj




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] What do I get from 'cvs co Zope'?

2002-12-02 Thread Casey Duncan
Yes, cvs co Zope checks out the HEAD, which is 2.7 and requires python 2.2.x.

Try: co -r Zope-2_6-branch Zope

Which will give you the 2.6 maintenance branch.

hth,

-Casey

On Monday 02 December 2002 10:42 am, Stefan H. Holek wrote:
 It appears that when I currently do 'cvs co Zope' I get a version that 
 already requires Python 2.2.2. GvR's zdctl.py stuff uses lambdas in a way 
 that Python 2.1 does not grok.
 
 How can I get at a Python 2.1.3 post 2.6.0 checkout?
 
 Thanks,
 Stefan
 
 --
 Those who write software only for pay should go hurt some other field.
 /Erik Naggum/
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] wrapping unexistent objects

2002-12-02 Thread Maurizio Boriani

Hi all,
I've a little bit tricky problem:
How could I wrap a request of an inexistent object and handle request
in a transparent way using a defined method? I've searched about
 __before_publishing_traverse__ and __bobo_traverse__ but them are too few 
documented (or I didn't understand them).

Better explain:
I'd like to build a generic product which permit to call undefined 
function with parameters using dtml as any other python script but this
functions aren't define and will be handled by product.

Does anyone has some suggestion/Doc about this?

TIA,
baux


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Collector 697 should be critical!!!

2002-12-02 Thread Casey Duncan
If this is critical for you, then you will probably need to develop a patch 
for it in order for it to make it into 2.6.1; unless anyone else wants to 
volunteer. I don't feel comfortable enough with the unicode converters to do 
this.

-Casey

On Monday 02 December 2002 05:46 am, Maik Jablonski wrote:
 Hi,
 
 http://collector.zope.org/Zope/697
 
 should be set to critical, because it results in loosing essential data.
 
 Case: We store much of our Keywords etc. in multiple-selects. 
 Everytime a user edits and saves such a multiple-select, all items with 
 NON-Ascii-characters [german umlaute for example] won't be shown as 
 selected cause of the bug. So the next Save Changes will loose all 
 this items.
 
 I don't know where's the best place to fix this issue, but it need to be 
 fixed as soon as possible...
 
 Cheers, Maik
 
 
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: Collector 697 should be critical!!!

2002-12-02 Thread Maik Jablonski
Casey Duncan wrote:

If this is critical for you, then you will probably need to develop a patch 
for it in order for it to make it into 2.6.1; unless anyone else wants to 
volunteer. I don't feel comfortable enough with the unicode converters to do 
this.

For me it's critical, but maybe for others too who haven't even noticed 
the problem. They loose content everytime someone Save Changes on a 
PropertyTab with multiple-selects... That's why I'm thinking that this 
bug should be marked as critial.

I don't have much experience with the unicode-converters too... that's 
my problem for this issue...:-(

Abel Deuring told me a patch, which solves the problem in the meanwhile:

In OFS/dtml/properties.dtml I replaced

 select name=xyz:utf8:list multiple

with:

 select name=xyz:utf8:list:string multiple

It works for me, but I'm not sure, if this is a good approach on this 
problem (think of the integers as items for the multiple-select).

-mj




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] wrapping unexistent objects

2002-12-02 Thread Casey Duncan
If you want an object to be able to handle calls to undefined methods, you'll 
probably need to use a __getattr__ hook. They can be a little tricky to get 
right (you want to filter out names that start with _ or aq or else 
you'll be in trouble), and they don't have access to acquisition, but they 
will allow you to intercept calls to arbitrary names on an object.

__bobo_traverse__ and __before_publishing_traverse__ are hooks for URL 
traversal inside ZPublisher. They won't work for calls made inside DTML.

-Casey

On Monday 02 December 2002 11:00 am, Maurizio Boriani wrote:
 Hi all,
 I've a little bit tricky problem:
 How could I wrap a request of an inexistent object and handle request
 in a transparent way using a defined method? I've searched about
  __before_publishing_traverse__ and __bobo_traverse__ but them are too few 
 documented (or I didn't understand them).
 
 Better explain:
 I'd like to build a generic product which permit to call undefined 
 function with parameters using dtml as any other python script but this
 functions aren't define and will be handled by product.
 
 Does anyone has some suggestion/Doc about this?
 
 TIA,
 baux
 
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Re: Collector 697 should be critical!!!

2002-12-02 Thread Toby Dickenson
On Monday 02 December 2002 4:11 pm, Maik Jablonski wrote:

 I don't have much experience with the unicode-converters too... that's
 my problem for this issue...:-(

I had seen this bug on the list, but hant spotted that it was a 
unicode-related. I will try to take a look sometime this week.

 Abel Deuring told me a patch, which solves the problem in the meanwhile:

 In OFS/dtml/properties.dtml I replaced

   select name=xyz:utf8:list multiple

 with:

   select name=xyz:utf8:list:string multiple

 It works for me, but I'm not sure, if this is a good approach on this
 problem (think of the integers as items for the multiple-select).

I havent looked in detail yet, but my first impression is that this is a good 
approach.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] Re: wrapping unexistent objects

2002-12-02 Thread Maurizio Boriani
 Casey == Casey [EMAIL PROTECTED] writes:

 Casey If you want an object to be able to handle calls to undefined methods,
 Casey you'll=20 probably need to use a __getattr__ hook. They can be a 
 Casey little tricky to get20 right (you want to filter out names that start 
 Casey with _ or aq or else=20 you'll be in trouble), and they don't have
 Casey access to acquisition, but they=20
 Casey will allow you to intercept calls to arbitrary names on an object.

 Casey __bobo_traverse__ and __before_publishing_traverse__ are hooks for 
 Casey URL traversal inside ZPublisher. They won't work for calls made 
 Casey inside DTML.

Thanks very much! Have you also some docs to point me to? Or a dummy example?

Thanks anymore,
baux

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Re: Collector 697 should be critical!!!

2002-12-02 Thread abel deuring
Toby Dickenson wrote:
 
 On Monday 02 December 2002 4:11 pm, Maik Jablonski wrote:
 
  I don't have much experience with the unicode-converters too... that's
  my problem for this issue...:-(
 
 I had seen this bug on the list, but hant spotted that it was a
 unicode-related. I will try to take a look sometime this week.
 
  Abel Deuring told me a patch, which solves the problem in the meanwhile:
 
  In OFS/dtml/properties.dtml I replaced
 
select name=xyz:utf8:list multiple
 
  with:
 
select name=xyz:utf8:list:string multiple
 
  It works for me, but I'm not sure, if this is a good approach on this
  problem (think of the integers as items for the multiple-select).
 
 I havent looked in detail yet, but my first impression is that this is a good
 approach.

Well, I think that this is just a workaround, but not a bugfix ;)

Assume that ulines property is used to define the set of possible values
for a multiple selection property. In this case one would expect to get
a ustring vaule back.

And as Maik already mentioned, it is even possible to use something like
[1, 2, 3,4] as the possible values of the multiple selection . OK, this
case does not work very well with older version of Zope too, but I think
that this shows the general problem: Currently (including older Zope
versions), there absolutely no type conversion for multiple selections.

My idea of a proper fix is to add a method to the PropertyManager which
returns the type of the first element of the list of the allowed values.
As a very trivial and not very elegant approach (sorry, I don't much
time at present;):

def type_as_string(self, selectValues):
if type(selectValues[0]) == type(''):
return 'string'
elif type(selectValues[0]) == type(u''):
return 'ustring'
elif type(selectValues[0]) == type(0):
return 'int'
elif 

With this method available, the multiple selection part of
OFS/dtml/properties.dtml could be changed from:

  select name=dtml-var id:utf8:list multiple
  size=dtml-var _.min(7, _.len(_[select_variable])) 

to:

  select name=dtml-var id:utf8:list:dtml-var
type_as_string(selectValues) 
  multiple size=dtml-var _.min(7, _.len(_[select_variable]))

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Bugfix release?

2002-12-02 Thread R. David Murray
On Fri, 29 Nov 2002, Toby Dickenson wrote:
 On Wednesday 27 November 2002 5:50 pm, Brian Lloyd wrote:
  FYI I'd like to have a 2.6.1 beta out next week. Jeremy is still
  looking at a few ZODB bug reports - as soon as he's done we'll
  make the beta.

 Im not sure this is a good plan.

 Jeremy's sortKey changes look like they deserve a longer beta testing period
 than I would have thought the demand for a DateTime fix would allow.

This whole discussion makes it sound like a more automated release
process would be a very very helpful goal as far as supporting the
community-supported nature of zope.  If such a thing existed, we
could have easily followed ChrisW's suggestion and rolled a 2.6.1 release
with just the DateTime bug fixed.  It seems to me that is an
important capability to have, especially if we want to start doing
security fixes as dot releases instead of as hot fixes.

--RDM


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Zope 2.6.0 ZMI Problem for CJK(Collector 623) patch.

2002-12-02 Thread Heiichiro NAKAMURA

On Thu, 28 Nov 2002 18:25:26 +
Toby Dickenson [EMAIL PROTECTED] wrote:

 Feel free to do that if it works for you, but a patch for this approach will 
 not be accepted into the standard Zope.  See this bug report for an 
 explanation of why this contradict's Zope's current unicode approach:
 
 http://collector.zope.org/Zope/633


One question. I don't understand what do you mean Zope's current unicode approach
very well. Do you mean

http://www.zope.org/Members/htrd/howto/unicode-zdg-changes
http://www.zope.org/Members/htrd/howto/unicode

are the Zope's current unicode approach?


Regards,
---
Heiichiro NAKAMURA [EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Bugfix release?

2002-12-02 Thread Jeremy Hylton
 TD == Toby Dickenson [EMAIL PROTECTED] writes:

  TD A bug in the transaction manager would be really bad news. I
  TD would have thought it appropriate to resolve these problems and
  TD leave at least a few weeks of beta test before release.

I'm looking into the problem, as I reported on zodb-dev.  Recall that
we're talking about releasing Zope 2.6.1 beta 1 -- a beta maintenance
release.  I'm not sure how much testing Brian would like to see before
a final release of 2.6.1, but a few weeks seems like the right order
of magnitude.

Jeremy




___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )