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.
[Part of patch #909005] Repeating exception changed from 'raise socket.error, why' to just raise. Make use of connect_ex() raise socket.error with 2-tuple instead of just error code
Tim Peters [Sun, 21 Mar 2004 16:59:09 +0000 (16:59 +0000)]
recursive_isinstance(), recursive_issubclass(): New code here returned
NULL in case of error, but the functions are declared to return int.
MSVC 6 properly complains about that. Return -1 on error instead.