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.
Brett Cannon [Tue, 23 Mar 2004 21:26:39 +0000 (21:26 +0000)]
Replace code in urllib for basejoin (undocumented) with urlparse.urljoin .
Test suites for urllib and urlparse run with each other's function to verify
correctness of replacement and both test suites pass.
Bumped urllib's __version__ attribute up a minor number.
Fred Drake [Tue, 23 Mar 2004 18:54:12 +0000 (18:54 +0000)]
- use recommended Python style in examples (no spaces around "=" for
keyword args)
- format multi-line calls to distutils.core.setup() consistently, and
in line with general practice (one keyword arg per line,
comma/newline after the last
- fix a few typos
Anthony Baxter [Mon, 22 Mar 2004 22:22:05 +0000 (22:22 +0000)]
Basic dependency checking. setup() has two new optional arguments
requires and provides. requires is a sequence of strings, of the
form 'packagename-version'. The dependency checking so far merely
does an '__import__(packagename)' and checks for packagename.__version__
You can also leave off the version, and any version of the package
will be installed.
There's a special case for the package 'python' - sys.version_info
is used, so
requires= ( 'python-2.3', )
just works.
Provides is of the same format as requires - but if it's not supplied,
a provides is generated by adding the version to each entry in packages,
or modules if packages isn't there.
Provides is currently only used in the PKG-INFO file. Shortly, PyPI
will grow the ability to accept these lines, and register will be
updated to send them.
There's a new command 'checkdep' command that runs these checks.
For this version, only greater-than-or-equal checking is done. We'll
add the ability to specify an optional operator later.
Tim Peters [Sun, 21 Mar 2004 23:38:41 +0000 (23:38 +0000)]
SF bug 847019 datetime.datetime initialization needs more strict checking
It's possible to create insane datetime objects by using the constructor
"backdoor" inserted for fast unpickling. Doing extensive range checking
would eliminate the backdoor's purpose (speed), but at least a little
checking can stop honest mistakes.
Armin Rigo [Sun, 21 Mar 2004 20:27:49 +0000 (20:27 +0000)]
This is the fastest I could get on Intel GCC. I kept the memset() in to clear
the newly created tuples, but tuples added in the freelist are now cleared in
tupledealloc already (which is very cheap, because we are already
Py_XDECREF'ing all elements anyway).
Python should have a standard Py_ZAP macro like ZAP in pystate.c.