summaryrefslogtreecommitdiffstats
path: root/Lib/dumbdbm.py
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization.Tim Peters2007-01-301-1/+1
|
* [Bug #802128 continued] Modify mode depending on the process umask.Andrew M. Kuchling2006-12-221-0/+11
| | | | | | Is there really no other way to read the umask than to set it? Hope this works on Windows...
* [Bug #802128] Make the mode argument of dumbdbm actually work the way it'sAndrew M. Kuchling2006-12-221-3/+9
| | | | | | | described, and add a test for it. 2.5 bugfix candidate, maybe; arguably this patch changes the API of dumbdbm and shouldn't be added in a point-release.
* [Bug #1172763] dumbdbm uses eval() on lines, so it chokes if there's an ↵Andrew M. Kuchling2005-06-071-0/+1
| | | | extra \r on the end of a line; fixed by stripping off trailing whitespace.
* Give dumbdbm a sync() method which Shelve can call. Should solve someSkip Montanaro2003-07-141-0/+2
| | | | database corruption problems with Spambayes.
* Make close() identical to __del__() for a dumbdbm database. MakeTim Peters2003-07-131-5/+5
| | | | | | | closing idempotent (it used to raise a nuisance exception on the 2nd close attempt). Bugfix candidate? Probably, but arguable.
* Repaired typos in comments.Tim Peters2003-07-131-1/+1
|
* Fixed critical shutdown race in _Database._commit.Tim Peters2003-07-131-5/+19
| | | | | | | | Related to SF patch 723231 (which pointed out the problem, but didn't fix it, just shut up the warning msg -- which was pointing out a dead- serious bug!). Bugfix candidate.
* More comments about why not closing a dumddbm properly can be a disaster.Tim Peters2003-07-131-3/+7
|
* _commit(): Modernization.Tim Peters2003-07-121-2/+2
|
* There's a persistent rumor on the spambayes mailing list that dumbdbmTim Peters2003-07-121-28/+69
| | | | | | | | | | | | | | | | | databases are associated with corruption problems, so I studied this code carefully and ran some brutal stress tests. I didn't find any bugs, although it's unclear whether this code *intends* that __setitem__ can leave the directory file out of synch with the data file (so if a dumbdbm isn't properly closed, and the value of an existing key was ever replaced, corruption is almost certain, where "corruption" means the directory file is out of synch with the data file). Added many comments and generally modernized the code. Examples of the latter: we have better ways of reading a whole file line-by-line now; eval() now tolerates a trailing newline; the %r format code can be used to avoid explicit repr/backtick calls; and the code often broke tuples into their components when it was clearer and faster to just leave them as tuples.
* __setitem__: Use integer division for computing # of blocks.Tim Peters2003-07-111-2/+2
|
* SF 662923: iterator for dbm keysRaymond Hettinger2003-06-281-1/+2
| | | | | When shelve and the bsdbm where expanded to a full mapping interface, this module was missed.
* Fix comment, mode really is usedNeal Norwitz2003-03-011-1/+1
|
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-3/+3
|
* Patch 560023 adding docstrings. 2.2 Candidate (after verifying modules were ↵Raymond Hettinger2002-05-291-0/+12
| | | | not updated after 2.2).
* Whitespace normalization.Tim Peters2002-02-161-1/+1
|
* forward-patch from release21-maint branch:Anthony Baxter2001-12-211-0/+6
| | | | | | | | | | Make dumbdbm merely "dumb", rather than "terminally broken". Without this patch, it's almost impossible to use dumbdbm _without_ causing horrible datalossage. With this patch, dumbdbm passes my own horrible torture test, as well as the roundup test suite. dumbdbm really could do with a smidgin of a rewrite or two, but that's not suitable for the release21-maint branch.
* Honor the mode argument to dumbdbm.open(); there is not good reason not to,Fred Drake2001-12-071-6/+7
| | | | | especially since the documentation described it in detail. This partially closes SF bug #490098.
* SF patch #474590 -- RISC OS supportGuido van Rossum2001-10-241-7/+3
|
* The first batch of changes recommended by the fixdiv tool. These areGuido van Rossum2001-09-041-1/+1
| | | | | mostly changes of / operators into //. Once or twice I did more or less than recommended.
* Replace __import__ with import as.Martin v. Löwis2001-07-191-1/+1
|
* Added support for .__contains__(), .__iter__(), .iterkeys().Fred Drake2001-05-031-1/+8
|
* RISCOS changes by dschwertberger.Guido van Rossum2001-03-021-3/+7
|
* removed __all__ from several modulesSkip Montanaro2001-02-181-2/+0
|
* more __all__ updatesSkip Montanaro2001-01-201-0/+2
|
* Whitespace normalization.Tim Peters2001-01-141-107/+107
|
* Apply rstrip() to the lines read from _dirfile in _update(), so that aGuido van Rossum2000-12-111-1/+1
| | | | dumbdbm archive created on Windows can be read on Unix.
* Patch from Joe Eaton <jeaton@hostway.net> (SF#100741) to fix following problem:Andrew M. Kuchling2000-07-101-1/+0
| | | | | | | | There is a silly bug in the fall-back dumbdbm.py database package in the Python 1.5.2 standard distro. This bug causes any changes to an existing item to generate a new key, even when the key already exists. After many updates, the .dir file used by dumbdbm grows to a huge size, and can cause filesystem problems.
* Cast f.tell() result to int() in _addval(), so it works even onGuido van Rossum1999-04-271-1/+1
| | | | | platforms where tell() returns a long. (Perhaps tell() should be fixed too?) Reported by Greg Humphreys.
* export error == IOErrorGuido van Rossum1996-05-281-0/+2
|
* fix typo in _setval() return valueGuido van Rossum1996-01-251-1/+1
|
* Initial revisionGuido van Rossum1995-08-101-0/+143