Commit Graph

8948 Commits

Author SHA1 Message Date
Andrew MacIntyre 69e18c9344 OS/2 has support for spawnvp() and spawnvpe() in the C libraries supplied
with major C compilers (VACPP, EMX+gcc and [Open]Watcom).

Also tidy up the export of spawn*() symbols in the os module to match what
is found/implemented.
2004-04-04 07:11:43 +00:00
Andrew MacIntyre 4e10ed3b86 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.
2004-04-04 07:01:35 +00:00
Fred Drake 456d3258d6 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.
2004-04-01 07:40:35 +00:00
Andrew M. Kuchling b67c94318e [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) 2004-03-31 20:17:56 +00:00
Guido van Rossum 59db96f2a3 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.
2004-03-31 18:53:29 +00:00
Tim Peters 116d83ce71 SF bug 924242: socket._fileobject._getclosed() returns wrong value
The .closed property always returned the wrong result.

Bugfix candidate!
2004-03-28 02:20:45 +00:00
Raymond Hettinger d732c95eb0 Revert 1.51 booleans so that sre will still run on old pythons. 2004-03-27 09:24:36 +00:00
Raymond Hettinger 968c56a626 Simple Optimizations:
* Factor constant expressions out of loops.
* Presize a list being grown to a known length.
2004-03-26 23:24:00 +00:00
Raymond Hettinger 29e383754e Remove unnecessary test. (Thanks Skip) 2004-03-26 20:16:39 +00:00
David Ascher 1c5701d36c 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.
2004-03-26 15:10:25 +00:00
Armin Rigo 01ab279056 Marshal clean-up (SF patch #873224) 2004-03-26 15:09:27 +00:00
Raymond Hettinger 01c9f8c35f 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"
2004-03-26 11:16:55 +00:00
Fred Drake 4b49823edd make sure the default manifest generation includes files identified as
scripts
closes SF bug 796042
2004-03-25 22:04:52 +00:00
Marc-André Lemburg 91e83e209d Added more Windows version names (thanks to Thomas Heller).
Fixed bug in platform() cache (thanks to Brett Cannon).

(Restored Python 1.5.2 compatibility.)
2004-03-25 18:35:12 +00:00
Brett Cannon 9001cde559 Fix last patch to be backwards-compatible with Python 1.5.2 .
Bumped version micro number.
2004-03-25 18:32:11 +00:00
Brett Cannon 21beb4c2ce Fixed a caching bug in platform.platform() where the argument of 'terse' was
not taken into consideration when caching value.
2004-03-25 16:55:12 +00:00
Martin v. Löwis 1c0f1f97fb Defer compilation of regular expressions until first use. 2004-03-25 14:58:19 +00:00
Martin v. Löwis bc503d1e90 Use True/False instead of 0/1 for character classes. 2004-03-25 13:50:59 +00:00
Phillip J. Eby 91a968af76 Ensure super() lookup of descriptor from classmethod works (SF #743627) 2004-03-25 02:19:34 +00:00
Piers Lauder f167dc3380 fix name in setacl method doc string 2004-03-25 00:12:21 +00:00
Nicholas Bastin c69ebe8d50 Enable the profiling of C functions (builtins and extensions) 2004-03-24 21:57:10 +00:00
Martin v. Löwis a1dde13389 Add test case for unicode(somestring, "idna"). 2004-03-24 16:48:24 +00:00
Brett Cannon aaeffaf01e Replace sequential split/join calls on strings with a single replace call.
Thanks Andrew Gaul.
2004-03-23 23:50:17 +00:00
Martin v. Löwis 708b4dacf4 Convert input to a string object. Fixes #909230.
Backported 2.3.
2004-03-23 23:40:36 +00:00
Brett Cannon 69200fa85b 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.
2004-03-23 21:26:39 +00:00
Guido van Rossum 48713e8798 Add runctx to __all__. 2004-03-23 19:19:21 +00:00
Nicholas Bastin 824b1b2da8 Added command line options for profile.py - one for stats output file
and one for sort order when using stdout.  Uses optparse.
2004-03-23 18:44:39 +00:00
Anthony Baxter 05f842bae2 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.
2004-03-22 22:22:05 +00:00
Martin v. Löwis a3837a0d63 Patch #911176: Move test function into __main__ 2004-03-22 21:49:47 +00:00
Nicholas Bastin 1eb4bfc657 Added global runctx function to profile to fix SF Bug #716587 2004-03-22 20:12:56 +00:00
Armin Rigo 706933821c The fix in ceval.c 2.386 allows iteration-by-iteration line tracing even in
single-line loops.
2004-03-22 19:30:39 +00:00
Nicholas Bastin ee6c9b8613 Fix (really) for tight loop line events 2004-03-22 19:23:46 +00:00
Nicholas Bastin fa7bec7e83 Test for tight loop line event fix, SF bug #765624 2004-03-22 19:21:47 +00:00
Nicholas Bastin aea9459cb1 Test for lack of implicit return line event 2004-03-22 18:30:42 +00:00
Anthony Baxter 39a0f04421 New parser. Next up, making the current parser use this parser 2004-03-22 00:33:28 +00:00
Tim Peters 3f60629242 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.

Bugfix candidate.
2004-03-21 23:38:41 +00:00
Brett Cannon 8d9b60f102 Change parse_qsl() to accept control-name's with no equal sign (e.g., "name")
when keep_blank_values is true.
2004-03-21 22:16:15 +00:00
Nicholas Bastin 668034173b Normalized files in test_unicode_file to eliminate failure on OSX 2004-03-21 20:55:47 +00:00
Andrew M. Kuchling 67867eaf8c [Part of patch #909005] Added map parameter for file_dispatcher and dispatcher_with_send 2004-03-21 20:03:18 +00:00
Andrew M. Kuchling 174bdbc999 [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 2004-03-21 19:58:28 +00:00
Andrew M. Kuchling 419af88b34 [Part of patch #909005] Remove Mac code for writable 2004-03-21 19:52:01 +00:00
Andrew M. Kuchling 0ebbbe30f1 [Part of patch #909005] Set initial poll flags 2004-03-21 19:50:09 +00:00
Andrew M. Kuchling 68522b1895 [Part of patch #909005] Use True/False 2004-03-21 19:46:16 +00:00
Andrew M. Kuchling 56d7913bae [Patch #900071] Be case-insensitive when removing 'usage:' string 2004-03-21 19:28:48 +00:00
Andrew M. Kuchling 9303777f22 [Part of patch #909005] Handle POLLPRI flag, and various errors cases. Fixes bug #887279 2004-03-21 19:26:00 +00:00
Tim Peters 6602520473 SF bug 917108: warnings.py does not define _test().
Removed the entire __name__ == '__main__' block.
2004-03-21 17:06:20 +00:00
Martin v. Löwis 433fa69c40 Patch #853488: Add hlist entry_configure and entry_cget methods. 2004-03-21 15:26:44 +00:00
Neil Schemenauer 4848557924 Remove unused instance attributes. 2004-03-21 15:18:50 +00:00
Brett Cannon 46cf4fc249 Back out last patch that removed an entry from sys.path if it was not an
existent path.  Pointed out by jvr that entries could be non-file items for
custom importers.
2004-03-21 14:06:49 +00:00
Brett Cannon c82208eecb Deal with case of when locale time values has characters that can be mistaken
for regex syntax.
Fixes bug #883604 .
2004-03-20 23:09:40 +00:00