[XML-SIG] [ pyxml-Bugs-418315 ] ODS problems in Python 2.0

noreply@sourceforge.net noreply@sourceforge.net
Mon, 23 Apr 2001 11:36:25 -0700


Bugs item #418315, was updated on 2001-04-23 11:36
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=418315&group_id=6473

Category: 4Suite
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Mike Olson (mikeolson)
Assigned to: Nobody/Anonymous (nobody)
Summary: ODS problems in Python 2.0

Initial Comment:
Email from alexander smishlajev


hello all!

i have run into some problems with 4Suite-0.10.2:

- the long long datatype formatter in Oracle and
Postgres
adapters:

Constants.Types.SIGNED_LONG_LONG:lambda
x:str(long(x))[:-1]

does not work on python 2.0: str() in v2.0 does not
append 'L'
suffix, so the last digit gets trimmed.  replacing
str() with
repr() makes types_test.py pass ok.

- i think that there is a bug in
Lib/DbmDatabase.CreateDatabase():
the DATABASE_DIR is joined twice.  the following patch
fixes the
problem:

--- DbmDatabase.py.orig Mon Feb 19 02:31:18 2001
+++ DbmDatabase.py      Tue Feb 20 21:15:46 2001
@@ -179,7 +179,7 @@
 
     dir_util._path_created = {}
     dir_util.mkpath(dbpath)
-    return Database(dbpath)
+    return Database(dbName)
 
 def DropDatabase(dbName):
     CheckVersion()

- DbmDatabase assumes that each table is stored in file
with the
same name.  in most cases, this is true because default
anydbm
backend module is dbhash, which works both on posix and
windows
platforms.  but dbm and dumbdbm databases create a pair
of files
having additional extensions.  IMHO whichdb module may
be used
instead of os.path.exists() to see if the database
exists, but
there still remain problems with GetAllDatabaseNames()
method.

- there is a problem that seems to be a bug in win32
dbhash: if
key+value length exceeds 400 characters, the database
may become
broken.  posix system (FreeBSD 4.2) is not affected. 
the
following interactive session demonstrates this:

Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit
(Intel)] on
win32
Type "copyright", "credits" or "license" for more
information.
>>> import anydbm
>>> db =anydbm.open('test.db', 'c')
>>> db['2'] ='*' *1000
>>> db['2'] ='*'
>>> db.keys()
['22']
>>>

best wishes,
alex.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=106473&aid=418315&group_id=6473