]> granicus.if.org Git - python/log
python
24 years agoencode(): Handle Latin-1 input characters better.
Fred Drake [Sat, 21 Apr 2001 06:01:53 +0000 (06:01 +0000)]
encode():  Handle Latin-1 input characters better.

24 years agoAdd support for <memberline/> (needs markup improvement!).
Fred Drake [Sat, 21 Apr 2001 06:00:51 +0000 (06:00 +0000)]
Add support for <memberline/> (needs markup improvement!).

Update <versionadded/> to recent addition of optional explanatory text;
make the explanation text take the same attribute name for both
<versionadded/> and <versionchanged/>.

24 years agoFix a number of minor markup errors.
Fred Drake [Sat, 21 Apr 2001 05:56:06 +0000 (05:56 +0000)]
Fix a number of minor markup errors.

24 years agoThe (fairly recent) \textasciicircum is not supported by LaTeX2HTML; add
Fred Drake [Sat, 21 Apr 2001 05:48:07 +0000 (05:48 +0000)]
The (fairly recent) \textasciicircum is not supported by LaTeX2HTML; add
support for it here.

24 years agoSF bug #417508: 'hypot' not found with Borland C++Build.
Tim Peters [Sat, 21 Apr 2001 03:20:47 +0000 (03:20 +0000)]
SF bug #417508: 'hypot' not found with Borland C++Build.

24 years agoSF but #417587: compiler warnings compiling 2.1.
Tim Peters [Sat, 21 Apr 2001 02:46:11 +0000 (02:46 +0000)]
SF but #417587: compiler warnings compiling 2.1.
Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.

24 years agoTeach Windows about new iterobject.c.
Tim Peters [Fri, 20 Apr 2001 21:21:28 +0000 (21:21 +0000)]
Teach Windows about new iterobject.c.

24 years agoAdding iterobject.[ch], which were accidentally not added. Sorry\!
Guido van Rossum [Fri, 20 Apr 2001 21:06:46 +0000 (21:06 +0000)]
Adding iterobject.[ch], which were accidentally not added.  Sorry\!

24 years agoIterators phase 1. This comprises:
Guido van Rossum [Fri, 20 Apr 2001 19:13:02 +0000 (19:13 +0000)]
Iterators phase 1.  This comprises:

new slot tp_iter in type object, plus new flag Py_TPFLAGS_HAVE_ITER
new C API PyObject_GetIter(), calls tp_iter
new builtin iter(), with two forms: iter(obj), and iter(function, sentinel)
new internal object types iterobject and calliterobject
new exception StopIteration
new opcodes for "for" loops, GET_ITER and FOR_ITER (also supported by dis.py)
new magic number for .pyc files
new special method for instances: __iter__() returns an iterator
iteration over dictionaries: "for x in dict" iterates over the keys
iteration over files: "for x in file" iterates over lines

TODO:

documentation
test suite
decide whether to use a different way to spell iter(function, sentinal)
decide whether "for key in dict" is a good idea
use iterators in map/filter/reduce, min/max, and elsewhere (in/not in?)
speed tuning (make next() a slot tp_next???)

24 years agodispatcher.__repr__() was unprepared to handle the address for a Unix
Jeremy Hylton [Fri, 20 Apr 2001 19:04:55 +0000 (19:04 +0000)]
dispatcher.__repr__() was unprepared to handle the address for a Unix
domain socket.  Fix that and make the error message for failures a
little more helpful by including the class name.

24 years agoOops. Removed dictiter_new decl that wasn't supposed to go in yet.
Guido van Rossum [Fri, 20 Apr 2001 16:52:06 +0000 (16:52 +0000)]
Oops.  Removed dictiter_new decl that wasn't supposed to go in yet.

24 years agoImplement, test and document "key in dict" and "key not in dict".
Guido van Rossum [Fri, 20 Apr 2001 16:50:40 +0000 (16:50 +0000)]
Implement, test and document "key in dict" and "key not in dict".

I know some people don't like this -- if it's really controversial,
I'll take it out again.  (If it's only Alex Martelli who doesn't like
it, that doesn't count as "real controversial" though. :-)

That's why this is a separate checkin from the iterators stuff I'm
about to check in next.

24 years agoCVS patch 416248: 2.1c1 unicodeobject: unused vrbl cleanup, from Mark Favas.
Tim Peters [Thu, 19 Apr 2001 21:55:14 +0000 (21:55 +0000)]
CVS patch 416248: 2.1c1 unicodeobject: unused vrbl cleanup, from Mark Favas.

24 years agoRevert previous checkin, which caused test_unicodedata to fail.
Jeremy Hylton [Thu, 19 Apr 2001 16:43:49 +0000 (16:43 +0000)]
Revert previous checkin, which caused test_unicodedata to fail.

24 years agoWeak*Dictionary: Added docstrings to the classes.
Fred Drake [Thu, 19 Apr 2001 16:26:06 +0000 (16:26 +0000)]
Weak*Dictionary:  Added docstrings to the classes.

Weak*Dictionary.update():  No longer create a temporary list to hold the
    things that will be stuffed into the underlying dictionary.  This had
    been done so that if any of the objects used as the weakly-held value
    was not weakly-referencable, no updates would take place (TypeError
    would be raised).  With this change, TypeError will still be raised
    but a partial update could occur.  This is more like other .update()
    implementations.

Thoughout, use of the name "ref" as a local variable has been removed.  The
original use of the name occurred when the function to create a weak
reference was called "new"; the overloaded use of the name could be
confusing for someone reading the code.  "ref" used as a variable name
has been replaced with "wr" (for 'weak reference').

24 years agoAdd versioning notes: many of the signatures changed to allow the time
Fred Drake [Thu, 19 Apr 2001 04:55:23 +0000 (04:55 +0000)]
Add versioning notes:  many of the signatures changed to allow the time
used to be omitted (meaning use the current time) as of Python 2.1.
Users who need cross-version portability need to know things like this.

24 years agoMove Windows stuff to 2.2, so CVS builds won't interfere with 2.1
Tim Peters [Wed, 18 Apr 2001 21:12:25 +0000 (21:12 +0000)]
Move Windows stuff to 2.2, so CVS builds won't interfere with 2.1
installations.

24 years agoCut-&-paste-o noted by Wolfgang Teschner: decompressobj() returns
Fred Drake [Wed, 18 Apr 2001 20:16:51 +0000 (20:16 +0000)]
Cut-&-paste-o noted by Wolfgang Teschner:  decompressobj() returns
*DE*compression objects, not compression objects!

24 years agoRemove BrowserControl module; this had been left in for Python 1.5.2
Fred Drake [Wed, 18 Apr 2001 18:43:34 +0000 (18:43 +0000)]
Remove BrowserControl module; this had been left in for Python 1.5.2
support.

24 years agoRemove legacy support for the BrowserControl module; the webbrowser
Fred Drake [Wed, 18 Apr 2001 18:42:48 +0000 (18:42 +0000)]
Remove legacy support for the BrowserControl module; the webbrowser
module has been included since Python 2.0, and that is the preferred
interface.

24 years agoSuggestion from Keith Briggs: refer to RE objects consistently instead of
Fred Drake [Wed, 18 Apr 2001 17:26:20 +0000 (17:26 +0000)]
Suggestion from Keith Briggs:  refer to RE objects consistently instead of
introducing a new term ("regex") without defining it.

24 years agoPatch #416953: Cache ASCII characters to speed up ASCII decoding.
Martin v. Löwis [Wed, 18 Apr 2001 12:49:15 +0000 (12:49 +0000)]
Patch #416953: Cache ASCII characters to speed up ASCII decoding.

24 years agoSync version number with the current CVS version.
Fred Drake [Wed, 18 Apr 2001 05:22:24 +0000 (05:22 +0000)]
Sync version number with the current CVS version.

(Note that the docs are also being maintained on the 2.1.1 maintenance
 branch, so users interested only in corrections and clarifications
 can get that.)

24 years agoAdd description of the "explanation" optional parameter added to the
Fred Drake [Wed, 18 Apr 2001 05:19:06 +0000 (05:19 +0000)]
Add description of the "explanation" optional parameter added to the
\versionadded macro.

Note: this should not be merged into the 2.1 maintenance branch.

24 years agoMake a number of small clarifications and correct a whole bunch of typos,
Fred Drake [Wed, 18 Apr 2001 05:12:47 +0000 (05:12 +0000)]
Make a number of small clarifications and correct a whole bunch of typos,
all reported by Bruce Smith.

24 years agoSync version number with the current CVS version.
Fred Drake [Wed, 18 Apr 2001 05:02:01 +0000 (05:02 +0000)]
Sync version number with the current CVS version.

(Note that the docs are also being maintained on the 2.1.1 maintenance
 branch, so users interested only in corrections and clarifications
 can get that.)

24 years agoBump the version number in more places
Guido van Rossum [Wed, 18 Apr 2001 04:37:57 +0000 (04:37 +0000)]
Bump the version number in more places

24 years agoChange the version to 2.2a0. This may look strange, but indicates
Guido van Rossum [Wed, 18 Apr 2001 04:31:01 +0000 (04:31 +0000)]
Change the version to 2.2a0.  This may look strange, but indicates
it's 2.2 before the first alpha release.

24 years agoupdate_yourself(): Removed unused local variable reported by
Barry Warsaw [Wed, 18 Apr 2001 03:53:29 +0000 (03:53 +0000)]
update_yourself(): Removed unused local variable reported by
PyChecker.

24 years ago__init__(): Removed unused local variable reported by PyChecker.
Barry Warsaw [Wed, 18 Apr 2001 03:52:54 +0000 (03:52 +0000)]
__init__(): Removed unused local variable reported by PyChecker.

24 years agoStripWidget.__init__(), update_yourself(): Removed some unused local
Barry Warsaw [Wed, 18 Apr 2001 03:51:55 +0000 (03:51 +0000)]
StripWidget.__init__(), update_yourself(): Removed some unused local
variables reported by PyChecker.

__togglegentype(): PyChecker accurately reported that the variable
__gentypevar was unused -- actually this whole method is currently
unused so comment it out.

24 years agoHelpwin.__init__(): Removed an unused local variable (via import)
Barry Warsaw [Wed, 18 Apr 2001 03:50:07 +0000 (03:50 +0000)]
Helpwin.__init__(): Removed an unused local variable (via import)
reported by PyChecker.

24 years agoBump the version to 1.1
Barry Warsaw [Wed, 18 Apr 2001 03:49:00 +0000 (03:49 +0000)]
Bump the version to 1.1

24 years agoThere have been a few new Python releases <wink> in the 2 years since
Barry Warsaw [Wed, 18 Apr 2001 03:48:41 +0000 (03:48 +0000)]
There have been a few new Python releases <wink> in the 2 years since
this tool was last touched!  Update some of the introductory material
and bump the version to 1.1.

24 years agoAdd note about the version in which GetoptError was added -- this can
Fred Drake [Wed, 18 Apr 2001 03:18:57 +0000 (03:18 +0000)]
Add note about the version in which GetoptError was added -- this can
bite people interested in 1.5.2 compatibility.

24 years agoAdded support for optional explanation parameter to the \versionadded
Fred Drake [Wed, 18 Apr 2001 03:11:04 +0000 (03:11 +0000)]
Added support for optional explanation parameter to the \versionadded
macro.

Refactored do_cmd_versionadded() and do_cmd_versionchanged() to do most
of the work in a helper function, with the do_cmd_*() wrappers just supplying
a portion of the replacement text.

24 years ago\versionadded: Add support for including an explanatory note along with
Fred Drake [Wed, 18 Apr 2001 03:08:54 +0000 (03:08 +0000)]
\versionadded:  Add support for including an explanatory note along with
    the versioning information, similar to \versionchanged.

24 years agoFix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton [Wed, 18 Apr 2001 01:20:21 +0000 (01:20 +0000)]
Fix compileall.py so that it fails on SyntaxErrors

The changes cause compilation failures in any file in the Python
installation lib directory to cause the install to fail.  It looks
like compileall.py intended to behave this way, but a change to
py_compile.py and a separate bug defeated it.

Fixes SF bug #412436

This change affects the test suite, which contains several files that
contain intentional errors.  The solution is to extend compileall.py
with the ability to skip compilation of selected files.

NB compileall.py is changed so that compile_dir() returns success only
if all recursive calls to compile_dir() also check success.

24 years agoFix compileall.py so that it fails on SyntaxErrors
Jeremy Hylton [Wed, 18 Apr 2001 01:19:28 +0000 (01:19 +0000)]
Fix compileall.py so that it fails on SyntaxErrors

The changes cause compilation failures in any file in the Python
installation lib directory to cause the install to fail.  It looks
like compileall.py intended to behave this way, but a change to
py_compile.py and a separate bug defeated it.

Fixes SF bug #412436

This change affects the test suite, which contains several files that
contain intentional errors.  The solution is to extend compileall.py
with the ability to skip compilation of selected files.

In the test suite, rename nocaret.py and test_future[3..7].py to start
with badsyntax_nocaret.py and badsyntax_future[3..7].py.  Update the
makefile to skip compilation of these files.  Update the tests to use
the name names for imports.

NB compileall.py is changed so that compile_dir() returns success only
if all recursive calls to compile_dir() also check success.

24 years agoUnused variable (caught by PyChecker) removed.
Eric S. Raymond [Tue, 17 Apr 2001 17:20:19 +0000 (17:20 +0000)]
Unused variable (caught by PyChecker) removed.

24 years agoThis commit was manufactured by cvs2svn to create tag 'release21'. v2.1
cvs2svn [Mon, 16 Apr 2001 18:46:45 +0000 (18:46 +0000)]
This commit was manufactured by cvs2svn to create tag 'release21'.

24 years agoNoted what's new in 2.1 (final).
Guido van Rossum [Mon, 16 Apr 2001 18:46:45 +0000 (18:46 +0000)]
Noted what's new in 2.1 (final).

Hopefully this is the last checkin for 2.1!

24 years agoFix three PyChecker-detected gotchas.
Jeremy Hylton [Mon, 16 Apr 2001 18:43:18 +0000 (18:43 +0000)]
Fix three PyChecker-detected gotchas.

Import OPT_ symbols from _symtable.
Define has_exec() and has_import_star().

24 years agoExport three optimization (fast locals) flags
Jeremy Hylton [Mon, 16 Apr 2001 18:42:13 +0000 (18:42 +0000)]
Export three optimization (fast locals) flags

24 years agoUpdate Windows installer & buildno for 2.1 final.
Tim Peters [Mon, 16 Apr 2001 18:20:30 +0000 (18:20 +0000)]
Update Windows installer & buildno for 2.1 final.

24 years agoIn walk(), don't die when os.lstat() raises os.error, e.g. because a
Guido van Rossum [Mon, 16 Apr 2001 18:12:04 +0000 (18:12 +0000)]
In walk(), don't die when os.lstat() raises os.error, e.g. because a
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!

24 years agoUpdate the version to 2.1final (again :-).
Guido van Rossum [Mon, 16 Apr 2001 17:51:43 +0000 (17:51 +0000)]
Update the version to 2.1final (again :-).

24 years agoAdd a test case for Weak*Dictionary.update() that would have caught a
Fred Drake [Mon, 16 Apr 2001 17:37:27 +0000 (17:37 +0000)]
Add a test case for Weak*Dictionary.update() that would have caught a
recently reported bug; also exposed some other bugs in the implementation.

24 years agoWeak*Dictionary.update(): Fix calls to [].append() to only have one
Fred Drake [Mon, 16 Apr 2001 17:34:48 +0000 (17:34 +0000)]
Weak*Dictionary.update():  Fix calls to [].append() to only have one
    parameter.

Weak*Dictionary.get():  Make the second parameter optional.

WeakKeyDictionary.has_key(), .keys():  Make these actually work!

24 years agoImplement Mark Favas's suggestion. There's a clear bug in _group():
Guido van Rossum [Mon, 16 Apr 2001 16:04:10 +0000 (16:04 +0000)]
Implement Mark Favas's suggestion.  There's a clear bug in _group():
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.

24 years agoUpdate document for the actual 2.1rc1
Andrew M. Kuchling [Mon, 16 Apr 2001 02:27:53 +0000 (02:27 +0000)]
Update document for the actual 2.1rc1

24 years agoThis commit was manufactured by cvs2svn to create tag 'r21c2'. v2.1c2
cvs2svn [Mon, 16 Apr 2001 02:07:08 +0000 (02:07 +0000)]
This commit was manufactured by cvs2svn to create tag 'r21c2'.

24 years agoThis is (hopefully) last checkin before releasing 2.1c2 -- get rid of
Guido van Rossum [Mon, 16 Apr 2001 02:07:08 +0000 (02:07 +0000)]
This is (hopefully) last checkin before releasing 2.1c2 -- get rid of
trailing whitespace.

24 years agoAdded news for 2.1c2.
Guido van Rossum [Mon, 16 Apr 2001 02:05:23 +0000 (02:05 +0000)]
Added news for 2.1c2.

Greatly updated news for 2.1c1 (!).

24 years agoUpdate Windows installer & build number to 2.1c2 release.
Tim Peters [Mon, 16 Apr 2001 01:44:08 +0000 (01:44 +0000)]
Update Windows installer & build number to 2.1c2 release.

24 years agoWe need another release candidate after so many "small" changes.
Guido van Rossum [Mon, 16 Apr 2001 00:33:29 +0000 (00:33 +0000)]
We need another release candidate after so many "small" changes.

DO NOT CHECK ANYTHHING IN FROM NOW ON WITHOUT ASKING ME.

24 years agoChange the test data to ask for class C from module __main__ rather
Guido van Rossum [Mon, 16 Apr 2001 00:28:21 +0000 (00:28 +0000)]
Change the test data to ask for class C from module __main__ rather
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".

24 years agoReverting Moshe's EGD patch *and* Martin's patch to make it work with
Guido van Rossum [Mon, 16 Apr 2001 00:21:33 +0000 (00:21 +0000)]
Reverting Moshe's EGD patch *and* Martin's patch to make it work with
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.

24 years agoTim pointed out a remaining vulnerability in popitem(): the
Guido van Rossum [Mon, 16 Apr 2001 00:02:32 +0000 (00:02 +0000)]
Tim pointed out a remaining vulnerability in popitem(): the
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?

24 years agoTentative fix for a problem that Tim discovered at the last moment,
Guido van Rossum [Sun, 15 Apr 2001 22:16:26 +0000 (22:16 +0000)]
Tentative fix for a problem that Tim discovered at the last moment,
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.

24 years agoSF bug reporters.
Guido van Rossum [Sun, 15 Apr 2001 20:48:27 +0000 (20:48 +0000)]
SF bug reporters.

24 years agoFix SF bug [ #416231 ] urllib.basejoin fails to apply some ../.
Guido van Rossum [Sun, 15 Apr 2001 20:47:33 +0000 (20:47 +0000)]
Fix SF bug [ #416231 ] urllib.basejoin fails to apply some ../.
Reported by Juan M. Bello Rivas.

24 years agoSRE: made "copyright" string static, to avoid potential linking
Fredrik Lundh [Sun, 15 Apr 2001 19:00:58 +0000 (19:00 +0000)]
SRE: made "copyright" string static, to avoid potential linking
conflicts.

24 years agoPatch by Mark Favas to ensure that the zlib we find is 1.1.3 or
Guido van Rossum [Sun, 15 Apr 2001 15:16:12 +0000 (15:16 +0000)]
Patch by Mark Favas to ensure that the zlib we find is 1.1.3 or
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.

24 years agoGet rid of the seek() method on the _Mailbox class. This was a
Guido van Rossum [Sun, 15 Apr 2001 13:32:27 +0000 (13:32 +0000)]
Get rid of the seek() method on the _Mailbox class.  This was a
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.

24 years agoIn order to make this test work on Windows, the test locale has to be
Guido van Rossum [Sun, 15 Apr 2001 13:15:56 +0000 (13:15 +0000)]
In order to make this test work on Windows, the test locale has to be
set to 'en' there -- Windows does not understand the 'en_US' locale.
The test succeeds there.

24 years agoFix typo (missing "req." prefix on error_302_dict) found by Neil
Guido van Rossum [Sun, 15 Apr 2001 13:08:01 +0000 (13:08 +0000)]
Fix typo (missing "req." prefix on error_302_dict) found by Neil
Norwitz's PyChecker.

24 years agoFix typo in exception name (UnimplementedError should be
Guido van Rossum [Sun, 15 Apr 2001 13:06:04 +0000 (13:06 +0000)]
Fix typo in exception name (UnimplementedError should be
NotImplementedError) found by Neil Norwitz's PyChecker.

24 years agoFix typo in exception name (SGMLParserError should be SGMLParseError)
Guido van Rossum [Sun, 15 Apr 2001 13:01:41 +0000 (13:01 +0000)]
Fix typo in exception name (SGMLParserError should be SGMLParseError)
found by Neil Norwitz's PyChecker.

24 years agoFix typo in attribute name (file should be filename) found by
Guido van Rossum [Sun, 15 Apr 2001 12:51:42 +0000 (12:51 +0000)]
Fix typo in attribute name (file should be filename) found by
Neil Norwitz's PyChecker.

24 years agoFix typo in attribute name (chunk_size should be chunksize) found by
Guido van Rossum [Sun, 15 Apr 2001 12:40:13 +0000 (12:40 +0000)]
Fix typo in attribute name (chunk_size should be chunksize) found by
Neil Norwitz's PyChecker.

24 years ago- Typo in message for TestCase.failIfEqual()
Steve Purcell [Sun, 15 Apr 2001 09:18:32 +0000 (09:18 +0000)]
- Typo in message for TestCase.failIfEqual()
- Removed unused variable 'opts' in TestProgram.__init__ (thanks to PyChecker)

24 years agoSet the SO_REUSEADDR socket option in the server thread -- this seems
Guido van Rossum [Sun, 15 Apr 2001 00:42:13 +0000 (00:42 +0000)]
Set the SO_REUSEADDR socket option in the server thread -- this seems
needed on some platforms (e.g. Solaris 8) when the test is run twice
in quick succession.

24 years agoBump version number and set date.
Fred Drake [Sat, 14 Apr 2001 18:36:03 +0000 (18:36 +0000)]
Bump version number and set date.

24 years agoRemove shared libraries as part of "make clean" rather than in "make
Guido van Rossum [Sat, 14 Apr 2001 17:57:07 +0000 (17:57 +0000)]
Remove shared libraries as part of "make clean" rather than in "make
clobber".  This is done so that after a "make clean", setup.py will
also recompile all extensions.

24 years agoMake one more private symbol static.
Guido van Rossum [Sat, 14 Apr 2001 17:55:41 +0000 (17:55 +0000)]
Make one more private symbol static.

24 years agoMake some private symbols static.
Guido van Rossum [Sat, 14 Apr 2001 17:55:09 +0000 (17:55 +0000)]
Make some private symbols static.

24 years agoMark Favas points out that there's an 'self.fp.flush()' call in the
Guido van Rossum [Sat, 14 Apr 2001 16:45:14 +0000 (16:45 +0000)]
Mark Favas points out that there's an 'self.fp.flush()' call in the
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.

24 years agoAnother ACK.
Guido van Rossum [Sat, 14 Apr 2001 16:17:31 +0000 (16:17 +0000)]
Another ACK.

24 years agoPete Shinners discovered that zipfile.ZipFile() is called with mode
Guido van Rossum [Sat, 14 Apr 2001 16:17:00 +0000 (16:17 +0000)]
Pete Shinners discovered that zipfile.ZipFile() is called with mode
argument "wb", while the only valid modes are "r", "w" or "a".  Fix
this by changing the mode to "w".

24 years agoShould resolve [ #416039 ] pstats browser crashes.
Eric S. Raymond [Sat, 14 Apr 2001 15:16:05 +0000 (15:16 +0000)]
Should resolve [ #416039 ] pstats browser crashes.

24 years agoAdd "import thread" at the top of the module; this prevents us from
Guido van Rossum [Sat, 14 Apr 2001 14:35:43 +0000 (14:35 +0000)]
Add "import thread" at the top of the module; this prevents us from
failing later when Python is compiled without threading but a failing
'threading' module can be imported due to an earlier (caught) attempt.

24 years agoAdd more general warning against the SGI optimizer.
Guido van Rossum [Sat, 14 Apr 2001 13:09:53 +0000 (13:09 +0000)]
Add more general warning against the SGI optimizer.

24 years agoIf the sunaudiodev module is available but we cannot find an audio
Fred Drake [Sat, 14 Apr 2001 03:10:12 +0000 (03:10 +0000)]
If the sunaudiodev module is available but we cannot find an audio
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.

24 years agoImport readline when possible to make the commaninterpreter UI nicer.
Eric S. Raymond [Sat, 14 Apr 2001 01:48:41 +0000 (01:48 +0000)]
Import readline when possible to make the commaninterpreter UI nicer.

24 years agoThis commit was manufactured by cvs2svn to create tag 'r21c1'. v2.1c1
cvs2svn [Fri, 13 Apr 2001 19:41:28 +0000 (19:41 +0000)]
This commit was manufactured by cvs2svn to create tag 'r21c1'.

24 years agoTim convinced me to augment the PSF license with a final clause just
Guido van Rossum [Fri, 13 Apr 2001 19:41:28 +0000 (19:41 +0000)]
Tim convinced me to augment the PSF license with a final clause just
like the one in the BeOpen license (and similar to the one in the CNRI
license, but with the "click-to-accept" part elided).

24 years agoClean up the unsightly mess around the readline header files. We now
Guido van Rossum [Fri, 13 Apr 2001 18:14:27 +0000 (18:14 +0000)]
Clean up the unsightly mess around the readline header files.  We now
always:

- #undef HAVE_CONFIG_H (because otherwise chardefs.h tries to include
  strings.h)

- #include readline.h and history.h

and we never declare any readline function prototypes ourselves.

This makes it compile with readline 4.2, albeit with a few warnings.
Some of the remaining warnings are about completion_matches(), which
is renamed to rl_completion_matches().

I've tested it with various other versions, from 2.0 up, and they all
seem to work (some with warnings) -- but only on Red Hat Linux 6.2.

Fixing the warnings for readline 4.2 would break compatibility with
3.0 (and maybe even earlier versions), and readline doesn't seem to
have a way to test for its version at compile time, so I'd rather
leave the warnings in than break compilation with older versions.

24 years agoAdd convenience targets that build all archive types for single formatting
Fred Drake [Fri, 13 Apr 2001 18:00:23 +0000 (18:00 +0000)]
Add convenience targets that build all archive types for single formatting
versions.

24 years agoMichael Hudson:
Fred Drake [Fri, 13 Apr 2001 17:55:02 +0000 (17:55 +0000)]
Michael Hudson:
Update docs for PyDict_Next() based on the most recent changes to the
dictionary code.

This closes SF patch #409864.

24 years agoI am TENTATIVELY checking in Martin von Loewis's patch for the SSL
Guido van Rossum [Fri, 13 Apr 2001 17:54:04 +0000 (17:54 +0000)]
I am TENTATIVELY checking in Martin von Loewis's patch for the SSL
problem reported by Neil Schemenauer on python-dev on 4/12/01, wth
subject "Problem with SSL and socketmodule on Debian Potato?".

It's tentative because Moshe objected, but Martin rebutted, and Moshe
seems unavailable for comments.

(Note that with OpenSSL 0.9.6a, I get a lot of compilation warnings
for socketmodule.c -- I'm assuming I can safely ignore these until 2.1
is released.)

24 years agosplit long line
Jeremy Hylton [Fri, 13 Apr 2001 17:50:20 +0000 (17:50 +0000)]
split long line

24 years agoFixup some platform annotations.
Fred Drake [Fri, 13 Apr 2001 17:37:00 +0000 (17:37 +0000)]
Fixup some platform annotations.

24 years agoWork around the conversion of ">>" and "<<" to guillemets. Reported by Ping.
Fred Drake [Fri, 13 Apr 2001 17:32:49 +0000 (17:32 +0000)]
Work around the conversion of ">>" and "<<" to guillemets.  Reported by Ping.

24 years agoWork around the conversion of ">>" and "<<" to guillemets. Reported by Ping.
Fred Drake [Fri, 13 Apr 2001 17:25:38 +0000 (17:25 +0000)]
Work around the conversion of ">>" and "<<" to guillemets.  Reported by Ping.

24 years agoAdded regression test for SF bug #415660 (failure to invalidate all
Fred Drake [Fri, 13 Apr 2001 17:18:15 +0000 (17:18 +0000)]
Added regression test for SF bug #415660 (failure to invalidate all
references to an object before calling registered callbacks).

Change last uses of verify() to self.assert_().

24 years agocleanup_helper(): Make sure we invalidate all reference objects
Fred Drake [Fri, 13 Apr 2001 17:15:47 +0000 (17:15 +0000)]
cleanup_helper():  Make sure we invalidate all reference objects
                   before calling any callbacks.  This is important
                   since the callback objects only look at themselves
                   to determine that they are invalide.  This change
                   avoids a segfault when callbacks use a different
                   reference to an object in the process of being
                   deallocated.

This fixes SF bug #415660.

24 years agoSlight adaptation of Michael Hudson's patch to test PyDict_Next()
Guido van Rossum [Fri, 13 Apr 2001 17:08:15 +0000 (17:08 +0000)]
Slight adaptation of Michael Hudson's patch to test PyDict_Next()
(with modification of existing dict elements!).

This is part of SF patch #409864: lazy fix for Pings bizarre scoping
crash.

The adaptation I made to Michael's patch was to change the error
handling to avoid masking other errors (moving the specific error
message to inside test_dict_inner()), and to insert a test for
dict==NULL at the start.

24 years agoFix typo in comment (the module is now called _testcapi, not _test).
Guido van Rossum [Fri, 13 Apr 2001 17:03:04 +0000 (17:03 +0000)]
Fix typo in comment (the module is now called _testcapi, not _test).

24 years agoChange error message raised when free variable is not yet bound. It
Jeremy Hylton [Fri, 13 Apr 2001 16:51:46 +0000 (16:51 +0000)]
Change error message raised when free variable is not yet bound.  It
now raises NameError instead of UnboundLocalError, because the var in
question is definitely not local.  (This affects test_scope.py)

Also update the recent fix by Ping using get_func_name().  Replace
tests of get_func_name() return value with call to get_func_desc() to
match all the other uses.