[Zope] Should I switch to Python 1.5.2?

Ron Bickers rbickers@logicetc.com
Sat, 10 Feb 2001 12:00:10 -0500


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
> Dieter Maurer
> Sent: Saturday, February 10, 2001 8:41 AM
> To: Kyler B. Laird
> Cc: zope@zope.org
> Subject: Re: [Zope] Should I switch to Python 1.5.2?

>  > I've been using Python 2.0 with Zope 2.3.0.
>  > It generally works well, but lately I've
>  > run into problems using string.split() and
>  > now I notice that httplib encounters a
>  > similar ("loop over non-sequence") problem.
> I suggest, we flesh out these problems.
>
> Tracebacks are a must for this task.

With the following Python Script:

    import string
    foo = string.split('this is a test', ' ')

--------

The traceback follows.  Further probing shows that 'fromlist' in
__careful_import__() is a _ReadGuard object when this error occurs (instead
of None, as I believe is expected).  That's about as far as I can go with
it, though.

Traceback (innermost last):
  File /usr/local/zope-2.3.0/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
  File /usr/local/zope-2.3.0/lib/python/ZPublisher/Publish.py, line 187, in
publish
  File /usr/local/zope-2.3.0/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
    (Object: LockableItem)
  File /usr/local/zope-2.3.0/lib/python/ZPublisher/Publish.py, line 171, in
publish
  File /usr/local/zope-2.3.0/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: importTest)
  File /usr/local/zope-2.3.0/lib/python/ZPublisher/Publish.py, line 112, in
call_object
    (Object: importTest)
  File /usr/local/zope-2.3.0/lib/python/Shared/DC/Scripts/Bindings.py, line
324, in __call__
    (Object: importTest)
  File /usr/local/zope-2.3.0/lib/python/Shared/DC/Scripts/Bindings.py, line
353, in _bindAndExec
    (Object: importTest)
  File
/usr/local/zope-2.3.0/lib/python/Products/PythonScripts/PythonScript.py,
line 337, in _exec
    (Object: importTest)
    (Info: ({'script': <PythonScript instance at 8e25398>, 'context':
<Folder instance at 8cf1e28>, 'container': <Folder instance at
8cf1e28>, 'traverse_subpath': []}, (), {}, None))
  File Script (Python), line 2, in importTest
  File /usr/local/zope-2.3.0/lib/python/Products/PythonScripts/Guarded.py,
line 219, in __careful_import__
TypeError: (see above)

---------

I also determined that the following Python Script works fine:

    import string
    foo = [] + string.split('this is a test', ' ')

_______________________

Ron Bickers
Logic Etc, Inc.
rbickers@logicetc.com