- 16 Apr, 2001 15 commits
-
-
Tim Peters authored
-
Guido van Rossum authored
file was deleted by a previous call to the visitor function. This used to be the behavior in 1.5.2 and before, but a patch to avoid making two stat() calls accidentally broke this in 2.0. Moshe, this would be a good one for 2.0.1 too!
-
Guido van Rossum authored
-
Fred Drake authored
recently reported bug; also exposed some other bugs in the implementation.
-
Fred Drake authored
parameter. Weak*Dictionary.get(): Make the second parameter optional. WeakKeyDictionary.has_key(), .keys(): Make these actually work!
-
Guido van Rossum authored
its first return statement returns a single value while its caller always expects it to return a tuple of two items. Fix this by returning (s, 0) instead. This won't make the locale test on Irix succeed, but now it will fail because of a bug in the platform's en_US locale rather than because of a bug in the locale module.
-
Andrew M. Kuchling authored
-
cvs2svn authored
-
Guido van Rossum authored
trailing whitespace.
-
Guido van Rossum authored
Greatly updated news for 2.1c1 (!).
-
Tim Peters authored
-
Guido van Rossum authored
DO NOT CHECK ANYTHHING IN FROM NOW ON WITHOUT ASKING ME.
-
Guido van Rossum authored
than from module pickletester. Using the latter turned out to cause the test to break when invoked as "import test.test_pickle" or "import test.autotest".
-
Guido van Rossum authored
OpenSSL versions beore 0.9.5. This just is too experimental to be worth it, especially since the user would have to do some severe hacking of the Modules/Setup file to even enable the EGD code, and without the EGD code it would always spit out a warning on some systems -- even when socket.ssl() is not used. Fixing that properly is not my job; the EGD patch is clearly not so important that it should hold up the 2.1 release.
-
Guido van Rossum authored
PyTuple_New() could *conceivably* clear the dict, so move the test for an empty dict after the tuple allocation. It means that we waste time allocating and deallocating a 2-tuple when the dict is empty, but who cares. It also means that when the dict is empty *and* there's no memory to allocate a 2-tuple, we raise MemoryError, not KeyError -- but that may actually a good idea: if there's no room for a lousy 2-tuple, what are the chances that there's room for a KeyError instance?
-
- 15 Apr, 2001 14 commits
-
-
Guido van Rossum authored
and reported to python-dev: because we were calling dict_resize() in PyDict_Next(), and because GC's dict_traverse() uses PyDict_Next(), and because PyTuple_New() can cause GC, and because dict_items() calls PyTuple_New(), it was possible for dict_items() to have the dict resized right under its nose. The solution is convoluted, and touches several places: keys(), values(), items(), popitem(), PyDict_Next(), and PyDict_SetItem(). There are two parts to it. First, we no longer call dict_resize() in PyDict_Next(), which seems to solve the immediate problem. But then PyDict_SetItem() must have a different policy about when *it* calls dict_resize(), because we want to guarantee (e.g. for an algorithm that Jeremy uses in the compiler) that you can loop over a dict using PyDict_Next() and make changes to the dict as long as those changes are only value replacements for existing keys using PyDict_SetItem(). This is done by resizing *after* the insertion instead of before, and by remembering the size before we insert the item, and if the size is still the same, we don't bother to even check if we might need to resize. An additional detail is that if the dict starts out empty, we must still resize it before the insertion. That was the first part. :-) The second part is to make keys(), values(), items(), and popitem() safe against side effects on the dict caused by allocations, under the assumption that if the GC can cause arbitrary Python code to run, it can cause other threads to run, and it's not inconceivable that our dict could be resized -- it would be insane to write code that relies on this, but not all code is sane. Now, I have this nagging feeling that the loops in lookdict probably are blissfully assuming that doing a simple key comparison does not change the dict's size. This is not necessarily true (the keys could be class instances after all). But that's a battle for another day.
-
Guido van Rossum authored
-
Guido van Rossum authored
Reported by Juan M. Bello Rivas.
-
Fredrik Lundh authored
conflicts.
-
Guido van Rossum authored
later. This assumes that zlib.h has a line of the form #define ZLIB_VERSION "1.1.3" This solves the problem where a zlib installation is found but it is an older version -- this would break the build, while a better solution is to simply ignore that zlib installation.
-
Guido van Rossum authored
cut-and-paste copy of the seek() method on the _Subfile class, but it didn't make one bit of sense: it sets self.pos, which is not used in this class or its subclasses, and it uses self.start and self.stop, which aren't defined on this class or its subclasses. This is purely my own fault -- I added this in rev 1.4 and apparently never tried to use it. Since it's not documented, and of very questionable use given that there's no tell(), I'm ripping it out. This resolves SF bug 416199 by Andrew Dalke: mailbox.py seek problems.
-
Guido van Rossum authored
set to 'en' there -- Windows does not understand the 'en_US' locale. The test succeeds there.
-
Guido van Rossum authored
Norwitz's PyChecker.
-
Guido van Rossum authored
NotImplementedError) found by Neil Norwitz's PyChecker.
-
Guido van Rossum authored
found by Neil Norwitz's PyChecker.
-
Guido van Rossum authored
Neil Norwitz's PyChecker.
-
Guido van Rossum authored
Neil Norwitz's PyChecker.
-
Steve Purcell authored
- Removed unused variable 'opts' in TestProgram.__init__ (thanks to PyChecker)
-
Guido van Rossum authored
needed on some platforms (e.g. Solaris 8) when the test is run twice in quick succession.
-
- 14 Apr, 2001 11 commits
-
-
Fred Drake authored
-
Guido van Rossum authored
clobber". This is done so that after a "make clean", setup.py will also recompile all extensions.
-
Guido van Rossum authored
-
Guido van Rossum authored
-
Guido van Rossum authored
ZipFile.close() method that should be part of the preceding 'if' block. On some platforms (Mark noticed this on FreeBSD 4.2) doing a flush() on a file open for reading is not allowed.
-
Guido van Rossum authored
-
Guido van Rossum authored
argument "wb", while the only valid modes are "r", "w" or "a". Fix this by changing the mode to "w".
-
Eric S. Raymond authored
-
Guido van Rossum authored
failing later when Python is compiled without threading but a failing 'threading' module can be imported due to an earlier (caught) attempt.
-
Guido van Rossum authored
-
Fred Drake authored
device to use, skip this test instead of allowing an error to occur when we attempt to play sound on the absent device. Verified by Mark Favas.
-