bring description of optional and keyword args for DictReader and DictWriter
classes into line with the actual code. I didn't see any obvious examples
of latex formatting for *args and **kwds so I just guessed.
Bug #934635: Fix a bug where the configure script couldn't detect
getaddrinfo() properly if the KAME stack had SCTP support.
(Submitted by SUZUKI Shinsuke)
* Add unittests for iterators that report their length
* Document the differences between them
* Fix corner cases covered by the unittests
* Use Py_RETURN_NONE where possible for dictionaries
Small refactoring saving one function() and eliminating some indirection.
* Applied app1() to listappend().
* Inlined ins() into its one remaining caller.
Tim Peters [Sun, 11 Apr 2004 17:45:31 +0000 (17:45 +0000)]
The native bz2 tests worked fine for me under WinXP Pro + VC7.1, so
removed the comment saying they don't work, and changed the build step
to run them. If they're failing for someone else, please give details
about what failed.
Andrew MacIntyre [Sun, 11 Apr 2004 12:03:57 +0000 (12:03 +0000)]
Fixes for AF_UNIX support on OS/2:
- return the full size of the sockaddr_un structure, without which
bind() fails with EINVAL;
- set test_socketserver to use a socket name that meets the form
required by the underlying implementation;
- don't bother exercising the forking AF_UNIX tests on EMX - its
fork() can't handle the stress.
Refactor common code out of globaltrace_trackcallers() and
globaltrace_countfuncs() into file_module_function_of().
In that function use Michael Hudson's suggestion of gc.get_referrers() to
back up from the code object to a function, then to a class's dict and
finally to a class object if one exists.
Added --trackcalls command line arg to display crude caller/callee
relationships at program exit. Output is a bit prettier than that for
--listfuncs but won't parse as easily using downstream postprocessing tools.
* Improve readability and remove data dependencies by converting
pre-increment forms to post-increment forms. Post-incrementing
also eliminates the need for negative array indices for oparg fetches.
* In exception handling code, check for class based exceptions before
the older string based exceptions.
Tim Peters [Mon, 5 Apr 2004 19:36:21 +0000 (19:36 +0000)]
Since the fast_yield branch target was introduced, it appears that most
tests of "why" against WHY_YIELD became useless. This patch removes them,
but assert()s that why != WHY_YIELD everywhere such a test was removed.
The test suite ran fine under a debug build (i.e., the asserts never
triggered).
OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation that
the socket name must start with /socket32/. Unlike Unix systems, this
file never exists in the file system.
If a file is opened with an explicit buffer size >= 1, repeated
close() calls would attempt to free() the buffer already free()ed on
the first close(). [bug introduced with patch #788249]
Making sure that the buffer is free()ed in file object deallocation is
a belt-n-braces bit of insurance against a memory leak.
Fred Drake [Thu, 1 Apr 2004 07:40:35 +0000 (07:40 +0000)]
Fix support for the "prog" keyword to the OptionParser constructor, as well
as directly setting the .prog attribute (which should be supported based on
the class docstring).
Closes SF bug #850964.
Jeremy Hylton [Thu, 1 Apr 2004 02:45:22 +0000 (02:45 +0000)]
Bump the magic number to avoid sharing bytecode between 2.3 and 2.4.
Revise the long comment that explained details of the magic number
in gory detail.
[Bugfix candidate] Escape traceback type and value. There are probably additional cases where cgitb.py doesn't escape as paranoidly as it should (e.g. attribute names)
Guido van Rossum [Wed, 31 Mar 2004 18:53:29 +0000 (18:53 +0000)]
When /tmp has certain sticky bits set, newly created subdirectories
inherit those bits, causing the test_mkdtemp.test_mode() test to fail.
Remove those before comparing the actual mode to the expected mode.
Fred Drake [Wed, 31 Mar 2004 08:08:34 +0000 (08:08 +0000)]
add a heavy box around warning notices to make them really stand out in the
PDF and PostScript versions of the docs (the CSS already does this for HTML)
Skip Montanaro [Sat, 27 Mar 2004 18:23:11 +0000 (18:23 +0000)]
- add entry for complex number
- fix a couple typos
- refine definitions for "interpreted" and "coercion" based upon updates on
the python glossary wiki
David Ascher [Fri, 26 Mar 2004 15:10:25 +0000 (15:10 +0000)]
Fix test failure for test_tcl on OS/X and Windows if a
version of Tcl other than ActiveTcl is installed (ActiveTcl
included TclX, other Tcl distros didn't).
I'm removing the package loading test because it's hard to
come up with a package that is guaranteed to be in any Tcl installation.
Special-casing darwin and windows is ok since that leaves the
only Tk platform (X) which the test was trying to address.
Simple optimizations:
* pre-build a single identity function for the fixup function
* pre-build membership tests in dictionaries instead of in-line tuples
* assign len() to a local variable
* assign append() methods to a local variable
* use xrange() instead of range()
* replace "x<<1" with "x+x"
Fred Drake [Thu, 25 Mar 2004 16:51:12 +0000 (16:51 +0000)]
Note that reading from a socket may not always return all of the
remaining content of a stream when expected to do so.
Closes SF bug #725265. Should be backported to Python 2.3.x.
Fred Drake [Thu, 25 Mar 2004 16:39:46 +0000 (16:39 +0000)]
- make sure the methods minidom adds to the basic DOM are attributed
to Node objects in the index (closes SF bug #832251)
- fix a variety of markup nits
Someone should backport this patch to Python 2.3.x.
Fred Drake [Thu, 25 Mar 2004 14:25:28 +0000 (14:25 +0000)]
Remove note that PyErr_SetInterrupt() is obsolete; add comment about the
fact that it was marked obsolete but is still needed.
Closes SF bug #919299. Someone else should backport this to Python 2.3.