You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(8) |
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(16) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(3) |
Mar
(4) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(6) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: alexander s. <a1...@us...> - 2007-02-25 05:32:58
|
Update of /cvsroot/dbfpy/htdocs In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv16965 Added Files: python-powered-w-125x40.png Log Message: "Python Powered" logo padded with transparency to match the width of sf.net logo --- NEW FILE: python-powered-w-125x40.png --- (This appears to be a binary file; contents omitted.) |
From: alexander s. <a1...@us...> - 2007-02-25 05:31:45
|
Update of /cvsroot/dbfpy/htdocs In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv16567 Added Files: python-powered-w-100x40.png Log Message: new "Python Powered" logo from python.org --- NEW FILE: python-powered-w-100x40.png --- (This appears to be a binary file; contents omitted.) |
From: alexander s. <a1...@us...> - 2007-02-25 05:31:21
|
Update of /cvsroot/dbfpy/htdocs In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv16541 Added Files: PythonPowered.gif Log Message: old "Python Powered" logo --- NEW FILE: PythonPowered.gif --- (This appears to be a binary file; contents omitted.) |
From: alexander s. <a1...@us...> - 2007-02-25 05:30:57
|
Update of /cvsroot/dbfpy/htdocs In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv16177 Added Files: py.ico Log Message: link icon --- NEW FILE: py.ico --- (This appears to be a binary file; contents omitted.) |
From: alexander s. <a1...@us...> - 2007-02-11 10:09:16
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv1955 Modified Files: setup.py Log Message: change maintainer email from dbfpy-devel to dbfpy-users Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** setup.py 11 Feb 2007 09:39:41 -0000 1.10 --- setup.py 11 Feb 2007 10:09:13 -0000 1.11 *************** *** 24,28 **** license="public domain", author="Jeff Kunce", ! maintainer_email="dbf...@li...", packages=["dbfpy"], long_description=DESCRIPTION, --- 24,28 ---- license="public domain", author="Jeff Kunce", ! maintainer_email="dbf...@li...", packages=["dbfpy"], long_description=DESCRIPTION, |
From: alexander s. <a1...@us...> - 2007-02-11 09:39:44
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv23788 Modified Files: setup.py Log Message: version 2.2.0 Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** setup.py 1 Dec 2006 11:47:51 -0000 1.9 --- setup.py 11 Feb 2007 09:39:41 -0000 1.10 *************** *** 19,23 **** def run(): setup(name="dbfpy", ! version="2.1.0", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", --- 19,23 ---- def run(): setup(name="dbfpy", ! version="2.2.0", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", |
From: alexander s. <a1...@us...> - 2007-02-11 09:39:10
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv23678 Modified Files: CHANGES Log Message: release version 2.2.0 Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CHANGES 1 Dec 2006 11:48:59 -0000 1.11 --- CHANGES 11 Feb 2007 09:39:07 -0000 1.12 *************** *** 1,2 **** --- 1,19 ---- + Version 2.2.0 (11-feb-2007) + --------------------------- + + Features: + - date fields are allowed to contain values stored with leading spaces + instead of leading zeroes. + - dbf.header returns field definition objects if accessed as a list + or as a dictionary. + - added raw data access methods: DbfRecord.rawFromStream(), + DbfFieldDef.rawFromRecord(). + - added conversion error handling: if ignoreErrors=True is passed + with Dbf constructor arguments, then failing field value conversions + will not raise errors but instead will return special object + INVALID_VALUE which is equal to None, empty string and zero. + .ignoreErrors property of the Dbf instances may be toggled also + after instance initialization. + Version 2.1.0 (01-dec-2006) --------------------------- |
From: alexander s. <a1...@us...> - 2007-02-11 09:23:16
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv18022 Modified Files: dbf.py Log Message: export INVALID_VALUE; Dbf: added .ignoreErrors, .INVALID_VALUE Index: dbf.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/dbf.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dbf.py 4 Jul 2006 08:09:13 -0000 1.6 --- dbf.py 11 Feb 2007 09:23:13 -0000 1.7 *************** *** 39,42 **** --- 39,44 ---- """ """History (most recent first): + 11-feb-2007 [als] export INVALID_VALUE; + Dbf: added .ignoreErrors, .INVALID_VALUE 04-jul-2006 [als] added export declaration 20-dec-2005 [yc] removed fromStream and newDbf methods: *************** *** 44,50 **** added class fields pointing to the header and record classes. ! 17-dec-2005 [yc] splitted to several modules; reimplemented 13-dec-2005 [yc] adapted to the changes of the `strutil` module. ! 13-sep-2002 [als] suppot FoxPro Timestamp datatype 15-nov-1999 [jjk] documentation updates, add demo 24-aug-1998 [jjk] add some encodeValue methods (not tested), other tweaks --- 46,52 ---- added class fields pointing to the header and record classes. ! 17-dec-2005 [yc] split to several modules; reimplemented 13-dec-2005 [yc] adapted to the changes of the `strutil` module. ! 13-sep-2002 [als] support FoxPro Timestamp datatype 15-nov-1999 [jjk] documentation updates, add demo 24-aug-1998 [jjk] add some encodeValue methods (not tested), other tweaks *************** *** 63,66 **** --- 65,69 ---- import header import record + from utils import INVALID_VALUE class Dbf(object): *************** *** 79,90 **** """ ! __slots__ = "name", "header", "stream", "_changed", "_new" HeaderClass = header.DbfHeader RecordClass = record.DbfRecord ## initialization and creation helpers ! def __init__(self, f, readOnly=False, new=False): """Initialize instance. --- 82,95 ---- """ ! __slots__ = ("name", "header", "stream", ! "_changed", "_new", "_ignore_errors") HeaderClass = header.DbfHeader RecordClass = record.DbfRecord + INVALID_VALUE = INVALID_VALUE ## initialization and creation helpers ! def __init__(self, f, readOnly=False, new=False, ignoreErrors=False): """Initialize instance. *************** *** 104,107 **** --- 109,115 ---- is None, new empty header will be used with the all fields set by default. + ignoreErrors: + if set, failing field value conversion will return + ``INVALID_VALUE`` instead of raising conversion error. """ *************** *** 126,129 **** --- 134,138 ---- # or instantiated using stream self.header = self.HeaderClass.fromStream(self.stream) + self.ignoreErrors = ignoreErrors self._new = bool(new) self._changed = False *************** *** 138,141 **** --- 147,163 ---- changed = property(lambda self: self._changed or self.header.changed) + def ignoreErrors(self, value): + """Update `ignoreErrors` flag on the header object and self""" + self.header.ignoreErrors = self._ignore_errors = bool(value) + ignoreErrors = property( + lambda self: self._ignore_errors, + ignoreErrors, + doc="""Error processing mode for DBF field value conversion + + if set, failing field value conversion will return + ``INVALID_VALUE`` instead of raising conversion error. + + """) + ## protected methods |
From: alexander s. <a1...@us...> - 2007-02-11 09:21:31
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv17311 Modified Files: header.py Log Message: added .ignoreErrors Index: header.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/header.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** header.py 10 Feb 2007 19:45:15 -0000 1.4 --- header.py 11 Feb 2007 09:21:28 -0000 1.5 *************** *** 7,10 **** --- 7,11 ---- """ """History (most recent first): + 11-feb-2007 [als] added .ignoreErrors 10-feb-2007 [als] added __getitem__: return field definitions by field name or field number (zero-based) *************** *** 49,58 **** __slots__ = ("signature", "fields", "lastUpdate", "recordLength", ! "recordCount", "headerLength", "changed") ## instance construction and initialization methods ! def __init__(self, fields=None, headerLength=0, recordLength=0, recordCount=0, ! signature=0x03, lastUpdate=None ): """Initialize instance. --- 50,59 ---- __slots__ = ("signature", "fields", "lastUpdate", "recordLength", ! "recordCount", "headerLength", "changed", "_ignore_errors") ## instance construction and initialization methods ! def __init__(self, fields=None, headerLength=0, recordLength=0, ! recordCount=0, signature=0x03, lastUpdate=None, ignoreErrors=False, ): """Initialize instance. *************** *** 76,79 **** --- 77,82 ---- a sequence (assuming (yyyy, mm, dd, ...)) or an object having callable ``ticks`` field. + ignoreErrors: + error processing mode for DBF fields (boolean) """ *************** *** 87,90 **** --- 90,94 ---- self.headerLength = headerLength self.recordCount = recordCount + self.ignoreErrors = ignoreErrors # XXX: I'm not sure this is safe to # initialize `self.changed` in this way *************** *** 126,129 **** --- 130,148 ---- day = property(lambda self: self.lastUpdate.day) + def ignoreErrors(self, value): + """Update `ignoreErrors` flag on self and all fields""" + self._ignore_errors = value = bool(value) + for _field in self.fields: + _field.ignoreErrors = value + ignoreErrors = property( + lambda self: self._ignore_errors, + ignoreErrors, + doc="""Error processing mode for DBF field value conversion + + if set, failing field value conversion will return + ``INVALID_VALUE`` instead of raising conversion error. + + """) + ## object representation *************** *** 167,171 **** (_name, _type, _len, _dec) = (tuple(_def) + (None,) * 4)[:4] _cls = fields.lookupFor(_type) ! _obj = _cls(_name, _len, _dec) _recordLength += _obj.length _defs.append(_obj) --- 186,191 ---- (_name, _type, _len, _dec) = (tuple(_def) + (None,) * 4)[:4] _cls = fields.lookupFor(_type) ! _obj = _cls(_name, _len, _dec, ! ignoreErrors=self._ignore_errors) _recordLength += _obj.length _defs.append(_obj) |
From: alexander s. <a1...@us...> - 2007-02-11 09:08:26
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv12619 Modified Files: fields.py Log Message: handle value conversion errors Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** fields.py 10 Feb 2007 19:36:52 -0000 1.9 --- fields.py 11 Feb 2007 09:08:11 -0000 1.10 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 11-feb-2007 [als] handle value conversion errors 10-feb-2007 [als] DbfFieldDef: added .rawFromRecord() 01-dec-2006 [als] Timestamp columns use None for empty values *************** *** 51,55 **** """ ! __slots__ = "name", "length", "decimalCount", "start", "end" # length of the field, None in case of variable-length field, --- 52,57 ---- """ ! __slots__ = ("name", "length", "decimalCount", ! "start", "end", "ignoreErrors") # length of the field, None in case of variable-length field, *************** *** 67,71 **** def __init__(self, name, length=None, decimalCount=None, ! start=None, stop=None ): """Initialize instance.""" --- 69,73 ---- def __init__(self, name, length=None, decimalCount=None, ! start=None, stop=None, ignoreErrors=False, ): """Initialize instance.""" *************** *** 91,94 **** --- 93,97 ---- self.length = length self.decimalCount = decimalCount + self.ignoreErrors = ignoreErrors self.start = start self.end = stop *************** *** 100,104 **** return hash(self.name) ! def fromString(cls, string, start): """Decode dbf field definition from the string data. --- 103,107 ---- return hash(self.name) ! def fromString(cls, string, start, ignoreErrors=False): """Decode dbf field definition from the string data. *************** *** 109,117 **** start: position in the database file. """ assert len(string) == 32 _length = ord(string[16]) return cls(utils.unzfill(string)[:11], _length, ord(string[17]), ! start, start + _length) fromString = classmethod(fromString) --- 112,123 ---- start: position in the database file. + ignoreErrors: + initial error processing mode for the new field (boolean) + """ assert len(string) == 32 _length = ord(string[16]) return cls(utils.unzfill(string)[:11], _length, ord(string[17]), ! start, start + _length, ignoreErrors=ignoreErrors) fromString = classmethod(fromString) *************** *** 157,169 **** def decodeFromRecord(self, record): """Return decoded field value from the record string.""" ! return self.decodeValue(self.rawFromRecord(record)) def decodeValue(self, value): """Return decoded value from string value. ! This method shouldn't be used publicaly. It's called from the `decodeFromRecord` method. ! This is an abstract method and it must be overriden in child classes. """ raise NotImplementedError --- 163,181 ---- def decodeFromRecord(self, record): """Return decoded field value from the record string.""" ! try: ! return self.decodeValue(self.rawFromRecord(record)) ! except: ! if self.ignoreErrors: ! return utils.INVALID_VALUE ! else: ! raise def decodeValue(self, value): """Return decoded value from string value. ! This method shouldn't be used publicly. It's called from the `decodeFromRecord` method. ! This is an abstract method and it must be overridden in child classes. """ raise NotImplementedError |
From: alexander s. <a1...@us...> - 2007-02-11 09:05:53
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv11570 Modified Files: record.py Log Message: __repr__: added special case for invalid field values Index: record.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/record.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** record.py 10 Feb 2007 19:48:49 -0000 1.6 --- record.py 11 Feb 2007 09:05:49 -0000 1.7 *************** *** 3,6 **** --- 3,7 ---- """ """History (most recent first): + 11-feb-2007 [als] __repr__: added special case for invalid field values 10-feb-2007 [als] added .rawFromStream() 30-oct-2006 [als] fix record length in .fromStream() *************** *** 18,21 **** --- 19,24 ---- from itertools import izip + import utils + class DbfRecord(object): """DBF record. *************** *** 145,149 **** _rv = [] for _fld in self.dbf.fieldNames: ! _rv.append(_template % (_fld, self[_fld], type(self[_fld]))) return "\n".join(_rv) --- 148,157 ---- _rv = [] for _fld in self.dbf.fieldNames: ! _val = self[_fld] ! if _val is utils.INVALID_VALUE: ! _rv.append(_template % ! (_fld, "None", "value cannot be decoded")) ! else: ! _rv.append(_template % (_fld, _val, type(_val))) return "\n".join(_rv) |
From: alexander s. <a1...@us...> - 2007-02-11 08:57:38
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv8683 Modified Files: utils.py Log Message: added INVALID_VALUE Index: utils.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/utils.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** utils.py 10 Feb 2007 19:00:37 -0000 1.3 --- utils.py 11 Feb 2007 08:57:17 -0000 1.4 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 11-feb-2007 [als] added INVALID_VALUE 10-feb-2007 [als] allow date strings padded with spaces instead of zeroes 20-dec-2005 [yc] handle long objects in getDate/getDateTime *************** *** 125,127 **** --- 126,170 ---- + class _InvalidValue(object): + + """Value returned from DBF records when field validation fails + + The value is not equal to anything except for itself + and equal to all empty values: None, 0, empty string etc. + In other words, invalid value is equal to None and not equal + to None at the same time. + + This value yields zero upon explicit conversion to a number type, + empty string for string types, and False for boolean. + + """ + + def __eq__(self, other): + return not other + + def __ne__(self, other): + return not (other is self) + + def __nonzero__(self): + return False + + def __int__(self): + return 0 + __long__ = __int__ + + def __float__(self): + return 0.0 + + def __str__(self): + return "" + + def __unicode__(self): + return u"" + + def __repr__(self): + return "<INVALID>" + + # invalid value is a constant singleton + INVALID_VALUE = _InvalidValue() + # vim: set et sts=4 sw=4 : |
From: alexander s. <a1...@us...> - 2007-02-10 19:48:56
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv4343 Modified Files: record.py Log Message: added .rawFromStream() Index: record.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/record.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** record.py 30 Oct 2006 03:06:17 -0000 1.5 --- record.py 10 Feb 2007 19:48:49 -0000 1.6 *************** *** 3,6 **** --- 3,7 ---- """ """History (most recent first): + 10-feb-2007 [als] added .rawFromStream() 30-oct-2006 [als] fix record length in .fromStream() 04-jul-2006 [als] added export declaration *************** *** 81,95 **** self.index * self.dbf.header.recordLength) ! def fromStream(cls, dbf, index): ! """Return a record read from the stream. Arguments: dbf: ! A `Dbf.Dbf` instance new record should belong to. index: Index of the record in the records' container. This argument can't be None in this call. ! Return value is an instance of the current class. """ --- 82,96 ---- self.index * self.dbf.header.recordLength) ! def rawFromStream(cls, dbf, index): ! """Return raw record contents read from the stream. Arguments: dbf: ! A `Dbf.Dbf` instance containing the record. index: Index of the record in the records' container. This argument can't be None in this call. ! Return value is a string containing record data in DBF format. """ *************** *** 99,104 **** dbf.stream.seek(dbf.header.headerLength + index * dbf.header.recordLength) ! return cls.fromString(dbf, ! dbf.stream.read(dbf.header.recordLength), index) fromStream = classmethod(fromStream) --- 100,120 ---- dbf.stream.seek(dbf.header.headerLength + index * dbf.header.recordLength) ! return dbf.stream.read(dbf.header.recordLength) ! rawFromStream = classmethod(rawFromStream) ! ! def fromStream(cls, dbf, index): ! """Return a record read from the stream. ! ! Arguments: ! dbf: ! A `Dbf.Dbf` instance new record should belong to. ! index: ! Index of the record in the records' container. ! This argument can't be None in this call. ! ! Return value is an instance of the current class. ! ! """ ! return cls.fromString(dbf, cls.rawFromStream(dbf, index), index) fromStream = classmethod(fromStream) |
From: alexander s. <a1...@us...> - 2007-02-10 19:45:18
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv2927 Modified Files: header.py Log Message: added __getitem__: return field definitions by field name or field number (zero-based) Index: header.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/header.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** header.py 4 Jul 2006 08:10:53 -0000 1.3 --- header.py 10 Feb 2007 19:45:15 -0000 1.4 *************** *** 7,10 **** --- 7,12 ---- """ """History (most recent first): + 10-feb-2007 [als] added __getitem__: return field definitions + by field name or field number (zero-based) 04-jul-2006 [als] added export declaration 15-dec-2005 [yc] created *************** *** 222,224 **** --- 224,239 ---- self.lastUpdate = datetime.date.today() + def __getitem__(self, item): + """Return a field definition by numeric index or name string""" + if isinstance(item, basestring): + _name = item.upper() + for _field in self.fields: + if _field.name == _name: + return _field + else: + raise KeyError(item) + else: + # item must be field index + return self.fields[item] + # vim: et sts=4 sw=4 : |
From: alexander s. <a1...@us...> - 2007-02-10 19:37:00
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv31837 Modified Files: fields.py Log Message: DbfFieldDef: added .rawFromRecord() Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** fields.py 1 Dec 2006 11:44:11 -0000 1.8 --- fields.py 10 Feb 2007 19:36:52 -0000 1.9 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 10-feb-2007 [als] DbfFieldDef: added .rawFromRecord() 01-dec-2006 [als] Timestamp columns use None for empty values 31-oct-2006 [als] support field types 'F' (float), 'I' (integer) *************** *** 150,156 **** return (self.name, self.typeCode, self.length, self.decimalCount) def decodeFromRecord(self, record): """Return decoded field value from the record string.""" ! return self.decodeValue(record[self.start:self.end]) def decodeValue(self, value): --- 151,161 ---- return (self.name, self.typeCode, self.length, self.decimalCount) + def rawFromRecord(self, record): + """Return a "raw" field value from the record string.""" + return record[self.start:self.end] + def decodeFromRecord(self, record): """Return decoded field value from the record string.""" ! return self.decodeValue(self.rawFromRecord(record)) def decodeValue(self, value): |
From: alexander s. <a1...@us...> - 2007-02-10 19:00:47
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv18855 Modified Files: utils.py Log Message: allow date strings padded with spaces instead of zeroes Index: utils.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/utils.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** utils.py 20 Dec 2005 21:19:23 -0000 1.2 --- utils.py 10 Feb 2007 19:00:37 -0000 1.3 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 10-feb-2007 [als] allow date strings padded with spaces instead of zeroes 20-dec-2005 [yc] handle long objects in getDate/getDateTime 16-dec-2005 [yc] created from ``strutil`` module. *************** *** 63,66 **** --- 64,68 ---- return datetime.date.fromtimestamp(date) if isinstance(date, basestring): + date = date.replace(" ", "0") if len(date) == 6: # yymmdd |
From: alexander s. <a1...@us...> - 2006-12-01 11:49:02
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv20581 Modified Files: CHANGES Log Message: Fix processing of empty Timestamp values; release version 2.1.0 Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** CHANGES 31 Oct 2006 18:05:22 -0000 1.10 --- CHANGES 1 Dec 2006 11:48:59 -0000 1.11 *************** *** 1,3 **** ! Version 2.1.0 (??-???-????) --------------------------- --- 1,3 ---- ! Version 2.1.0 (01-dec-2006) --------------------------- *************** *** 5,8 **** --- 5,10 ---- - support field types 'F' (float), 'I' (integer) and 'Y' (currency) + Fix processing of empty Timestamp values + Version 2.0.3 (30-oct-2006) --------------------------- |
From: alexander s. <a1...@us...> - 2006-12-01 11:47:55
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv20213 Modified Files: setup.py Log Message: version 2.1.0; fill "Platform" field in PKG-INFO Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** setup.py 30 Oct 2006 04:31:55 -0000 1.8 --- setup.py 1 Dec 2006 11:47:51 -0000 1.9 *************** *** 19,23 **** def run(): setup(name="dbfpy", ! version="2.0.3", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", --- 19,23 ---- def run(): setup(name="dbfpy", ! version="2.1.0", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", *************** *** 29,32 **** --- 29,33 ---- download_url= "http://sourceforge.net/project/showfiles.php?group_id=140566", + platforms=["OS Independent"], classifiers=[ "Development Status :: 5 - Production/Stable", |
From: alexander s. <a1...@us...> - 2006-12-01 11:44:17
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv19103 Modified Files: fields.py Log Message: Timestamp columns use None for empty values Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** fields.py 31 Oct 2006 18:01:17 -0000 1.7 --- fields.py 1 Dec 2006 11:44:11 -0000 1.8 *************** *** 5,8 **** --- 5,9 ---- """ """History (most recent first): + 01-dec-2006 [als] Timestamp columns use None for empty values 31-oct-2006 [als] support field types 'F' (float), 'I' (integer) and 'Y' (currency); *************** *** 375,387 **** # LE byteorder _jdn, _msecs = struct.unpack("<2I", value) ! return datetime.datetime.fromordinal(_jdn - self.JDN_GDN_DIFF) + \ ! datetime.timedelta(0, _msecs / 1000.0) def encodeValue(self, value): """Return a string-encoded ``value``.""" ! value = utils.getDateTime(value) ! # LE byteorder ! _rv = struct.pack("<2I", value.toordinal() + self.JDN_GDN_DIFF, ! (value.hour * 3600 + value.minute * 60 + value.second) * 1000) assert len(_rv) == self.length return _rv --- 376,396 ---- # LE byteorder _jdn, _msecs = struct.unpack("<2I", value) ! if _jdn >= 1: ! _rv = datetime.datetime.fromordinal(_jdn - self.JDN_GDN_DIFF) ! _rv += datetime.timedelta(0, _msecs / 1000.0) ! else: ! # empty date ! _rv = None ! return _rv def encodeValue(self, value): """Return a string-encoded ``value``.""" ! if value: ! value = utils.getDateTime(value) ! # LE byteorder ! _rv = struct.pack("<2I", value.toordinal() + self.JDN_GDN_DIFF, ! (value.hour * 3600 + value.minute * 60 + value.second) * 1000) ! else: ! _rv = "\0" * self.length assert len(_rv) == self.length return _rv |
From: alexander s. <a1...@us...> - 2006-10-31 18:05:27
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv25462 Modified Files: CHANGES Log Message: - support field types 'F' (float), 'I' (integer) and 'Y' (currency) Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** CHANGES 30 Oct 2006 03:15:53 -0000 1.9 --- CHANGES 31 Oct 2006 18:05:22 -0000 1.10 *************** *** 1,2 **** --- 1,8 ---- + Version 2.1.0 (??-???-????) + --------------------------- + + Features: + - support field types 'F' (float), 'I' (integer) and 'Y' (currency) + Version 2.0.3 (30-oct-2006) --------------------------- |
From: alexander s. <a1...@us...> - 2006-10-31 18:01:31
|
Update of /cvsroot/dbfpy/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv24030 Modified Files: fields.py Log Message: support field types 'F' (float), 'I' (integer) and 'Y' (currency); automate export and registration of field classes Index: fields.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/dbfpy/fields.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** fields.py 12 Oct 2006 05:28:57 -0000 1.6 --- fields.py 31 Oct 2006 18:01:17 -0000 1.7 *************** *** 5,8 **** --- 5,11 ---- """ """History (most recent first): + 31-oct-2006 [als] support field types 'F' (float), 'I' (integer) + and 'Y' (currency); + automate export and registration of field classes 04-jul-2006 [als] added export declaration 10-mar-2006 [als] decode empty values for Date and Logical fields; *************** *** 18,25 **** __date__ = "$Date$"[7:-2] ! __all__ = ["DbfCharacterFieldDef", "DbfNumericFieldDef", ! "DbfLogicalFieldDef", "DbfMemoFieldDef", "DbfDateFieldDef", ! "DbfDateTimeFieldDef", "lookupFor", ! ] import datetime --- 21,25 ---- __date__ = "$Date$"[7:-2] ! __all__ = ["lookupFor",] # field classes added at the end of the module import datetime *************** *** 235,238 **** --- 235,272 ---- return _rv + class DbfFloatFieldDef(DbfNumericFieldDef): + """Definition of the float field - same as numeric.""" + + typeCode = "F" + + class DbfIntegerFieldDef(DbfFieldDef): + """Definition of the integer field.""" + + typeCode = "I" + length = 4 + defaultValue = 0 + + def decodeValue(self, value): + """Return an integer number decoded from ``value``.""" + return struct.unpack("<i", value)[0] + + def encodeValue(self, value): + """Return string containing encoded ``value``.""" + return struct.pack("<i", int(value)) + + class DbfCurrencyFieldDef(DbfFieldDef): + """Definition of the currency field.""" + + typeCode = "Y" + length = 8 + defaultValue = 0.0 + + def decodeValue(self, value): + """Return float number decoded from ``value``.""" + return struct.unpack("<q", value)[0] / 10000. + + def encodeValue(self, value): + """Return string containing encoded ``value``.""" + return struct.pack("<q", round(value * 10000)) class DbfLogicalFieldDef(DbfFieldDef): *************** *** 389,398 **** ## register generic types ! for _cls in ( ! DbfCharacterFieldDef, DbfNumericFieldDef, DbfMemoFieldDef, ! DbfLogicalFieldDef, DbfDateFieldDef, DbfDateTimeFieldDef, ! ): ! registerField(_cls) ! del _cls # vim: et sts=4 sw=4 : --- 423,432 ---- ## register generic types ! for (_name, _val) in globals().items(): ! if isinstance(_val, type) and issubclass(_val, DbfFieldDef) \ ! and (_name != "DbfFieldDef"): ! __all__.append(_name) ! registerField(_val) ! del _name, _val # vim: et sts=4 sw=4 : |
From: alexander s. <a1...@us...> - 2006-10-30 05:27:48
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv29775 Modified Files: .cvsignore Log Message: ignore .pypirc Index: .cvsignore =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 3 Nov 2005 15:00:22 -0000 1.2 --- .cvsignore 30 Oct 2006 05:27:42 -0000 1.3 *************** *** 7,8 **** --- 7,9 ---- dist MANIFEST + .pypirc |
From: alexander s. <a1...@us...> - 2006-10-30 04:32:08
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv10067 Modified Files: setup.py Log Message: added full metadata for registration at python cheese shop Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** setup.py 30 Oct 2006 03:16:22 -0000 1.7 --- setup.py 30 Oct 2006 04:31:55 -0000 1.8 *************** *** 3,6 **** --- 3,20 ---- from distutils.core import setup + DESCRIPTION = """\ + dbfpy is a python-only module for reading and writing DBF-files. + It was created by Jeff Kunce and then modified by Hans Fiby + and Yaroslav Samchuk. + + dbfpy can read and write simple DBF-files. The `DBF-format + <http://www.clicketyclick.dk/databases/xbase/format/>`_ + was developed about 30 years ago and was used by a number + of simple database applications (dBase, Foxpro, Clipper, ...). + The basic datatypes numbers, short text, and dates are available. + Many different extensions have been used; dbfpy can read and write + only simple DBF-files. + """ + def run(): setup(name="dbfpy", *************** *** 10,14 **** --- 24,41 ---- license="public domain", author="Jeff Kunce", + maintainer_email="dbf...@li...", packages=["dbfpy"], + long_description=DESCRIPTION, + download_url= + "http://sourceforge.net/project/showfiles.php?group_id=140566", + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: Public Domain", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Topic :: Database", + "Topic :: Software Development :: Libraries :: Python Modules", + ], ) |
From: alexander s. <a1...@us...> - 2006-10-30 03:16:26
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv16354 Modified Files: setup.py Log Message: release 2.0.3 Index: setup.py =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/setup.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** setup.py 7 Jul 2006 18:15:26 -0000 1.6 --- setup.py 30 Oct 2006 03:16:22 -0000 1.7 *************** *** 5,9 **** def run(): setup(name="dbfpy", ! version="2.0.2", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", --- 5,9 ---- def run(): setup(name="dbfpy", ! version="2.0.3", description="Access .DBF (dBase) files from python", url="http://dbfpy.sourceforge.net/", |
From: alexander s. <a1...@us...> - 2006-10-30 03:16:03
|
Update of /cvsroot/dbfpy/dbfpy In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv15997 Modified Files: CHANGES Log Message: wrong record length when reading from file object (sf bug 1586619); release 2.0.3 Index: CHANGES =================================================================== RCS file: /cvsroot/dbfpy/dbfpy/CHANGES,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CHANGES 12 Oct 2006 05:29:35 -0000 1.8 --- CHANGES 30 Oct 2006 03:15:53 -0000 1.9 *************** *** 1,7 **** ! Version 2.0.3 (??-???-????) --------------------------- Fixes: - compatibility fix for Python versions prior to 2.4 (sf bug 1574526) Version 2.0.2 (08-jul-2006) --- 1,8 ---- ! Version 2.0.3 (30-oct-2006) --------------------------- Fixes: - compatibility fix for Python versions prior to 2.4 (sf bug 1574526) + - wrong record length when reading from file object (sf bug 1586619) Version 2.0.2 (08-jul-2006) |