]> granicus.if.org Git - python/log
python
17 years agoremove a repeated occurance of a hardcoded berkeleydb library version number
Gregory P. Smith [Sun, 3 Feb 2008 08:01:46 +0000 (08:01 +0000)]
remove a repeated occurance of a hardcoded berkeleydb library version number

17 years agoMerge this fix from the pybsddb tree:
Gregory P. Smith [Sun, 3 Feb 2008 07:20:53 +0000 (07:20 +0000)]
Merge this fix from the pybsddb tree:
r293 | jcea | 2008-01-31 01:08:19 -0800 (Thu, 31 Jan 2008) | 4 lines

Solved memory leak when using cursors with
databases without environment.

17 years agoThe wrapper function is supposed to be for spawnvpe() so that's
Andrew MacIntyre [Sun, 3 Feb 2008 07:07:31 +0000 (07:07 +0000)]
The wrapper function is supposed to be for spawnvpe() so that's
what we should call [this wrapper only available on OS/2].

Backport candidate to 2.5.

17 years agoRename module definition file to reflect v2.6.
Andrew MacIntyre [Sun, 3 Feb 2008 07:01:11 +0000 (07:01 +0000)]
Rename module definition file to reflect v2.6.

17 years agoUpdate OS/2 EMX build bits for 2.6.
Andrew MacIntyre [Sun, 3 Feb 2008 06:58:06 +0000 (06:58 +0000)]
Update OS/2 EMX build bits for 2.6.

17 years agoUse context manager for a lock.
Brett Cannon [Sun, 3 Feb 2008 02:43:01 +0000 (02:43 +0000)]
Use context manager for a lock.

17 years agoRemove extra tick marks and add a missing closing parenthesis.
Brett Cannon [Sun, 3 Feb 2008 02:34:14 +0000 (02:34 +0000)]
Remove extra tick marks and add a missing closing parenthesis.

17 years agoDirectories from CPPFLAGS and LDFLAGS were being added in the reverse order for
Brett Cannon [Sun, 3 Feb 2008 02:08:45 +0000 (02:08 +0000)]
Directories from CPPFLAGS and LDFLAGS were being added in the reverse order for
searches as to how they were listed in the environment variable.

17 years agoFix a minor typo.
Brett Cannon [Sun, 3 Feb 2008 02:07:55 +0000 (02:07 +0000)]
Fix a minor typo.

17 years agoWait for a delay before reaping children -- this should fix the
Georg Brandl [Sun, 3 Feb 2008 00:04:50 +0000 (00:04 +0000)]
Wait for a delay before reaping children -- this should fix the
test_socketserver failures on several platforms.

17 years agoFix a conversion mistake that caused test_queue to fail intermittently.
Georg Brandl [Sat, 2 Feb 2008 23:59:21 +0000 (23:59 +0000)]
Fix a conversion mistake that caused test_queue to fail intermittently.

17 years agoSplit the refleak mail body into two parts, the first being those failing
Skip Montanaro [Sat, 2 Feb 2008 19:11:57 +0000 (19:11 +0000)]
Split the refleak mail body into two parts, the first being those failing
tests which are deemed more important issues, the second those which are
known to have difficult to solve problems and are generally expected to
leak.  Hopefully this doesn't break the script...

17 years agoUpdate the leaky tests (ie, ignore these tests if they report leaks). This version...
Neal Norwitz [Sat, 2 Feb 2008 18:52:51 +0000 (18:52 +0000)]
Update the leaky tests (ie, ignore these tests if they report leaks).  This version has been running for a while.

17 years agoMake the Rational constructor accept '3.' and '.2' as well as '3.2'.
Mark Dickinson [Sat, 2 Feb 2008 17:16:13 +0000 (17:16 +0000)]
Make the Rational constructor accept '3.' and '.2' as well as '3.2'.

17 years agoRewrite test_cprofile as unittest (and rename the file to be consistent
Georg Brandl [Sat, 2 Feb 2008 11:46:07 +0000 (11:46 +0000)]
Rewrite test_cprofile as unittest (and rename the file to be consistent
with all other test files). Written for GHOP by Benjamin Peterson.

17 years agoRewrite test_queue as unittest. Written for GHOP by Ian Seyer.
Georg Brandl [Sat, 2 Feb 2008 11:39:29 +0000 (11:39 +0000)]
Rewrite test_queue as unittest. Written for GHOP by Ian Seyer.

17 years agoAdd GHOP contributor.
Georg Brandl [Sat, 2 Feb 2008 11:05:34 +0000 (11:05 +0000)]
Add GHOP contributor.

17 years agoRewrite test_socketserver as unittest, written for GHOP by Benjamin Petersen.
Georg Brandl [Sat, 2 Feb 2008 11:05:00 +0000 (11:05 +0000)]
Rewrite test_socketserver as unittest, written for GHOP by Benjamin Petersen.

17 years agoAdd email example how to send a multipart message.
Georg Brandl [Sat, 2 Feb 2008 10:49:58 +0000 (10:49 +0000)]
Add email example how to send a multipart message.
Written for GHOP by Martin Matejek.

17 years agoRewrite test_funcattrs as unittest, written for GHOP by Jeff Wheeler.
Georg Brandl [Sat, 2 Feb 2008 10:18:15 +0000 (10:18 +0000)]
Rewrite test_funcattrs as unittest, written for GHOP by Jeff Wheeler.

17 years agoRewrite test_descr as unittest, written for GHOP by Jeff Wheeler.
Georg Brandl [Sat, 2 Feb 2008 10:12:36 +0000 (10:12 +0000)]
Rewrite test_descr as unittest, written for GHOP by Jeff Wheeler.

17 years agoAmendments to the urllib2 docs, written for GHOP by Thomas Lamb.
Georg Brandl [Sat, 2 Feb 2008 09:56:20 +0000 (09:56 +0000)]
Amendments to the urllib2 docs, written for GHOP by Thomas Lamb.

17 years agoNeaten-up a bit.
Raymond Hettinger [Sat, 2 Feb 2008 05:24:44 +0000 (05:24 +0000)]
Neaten-up a bit.

17 years agoSimpler solution to handling non-IEEE 754 environments.
Raymond Hettinger [Sat, 2 Feb 2008 05:11:40 +0000 (05:11 +0000)]
Simpler solution to handling non-IEEE 754 environments.

17 years agoAdd protection from weirdness while scaling the mantissa to an integer.
Raymond Hettinger [Fri, 1 Feb 2008 23:45:44 +0000 (23:45 +0000)]
Add protection from weirdness while scaling the mantissa to an integer.

17 years agoFix int/long typecase. Add check for non-binary floating point.
Raymond Hettinger [Fri, 1 Feb 2008 23:12:19 +0000 (23:12 +0000)]
Fix int/long typecase.  Add check for non-binary floating point.

17 years agoBump distutils version number to match Python version.
Marc-André Lemburg [Fri, 1 Feb 2008 22:58:17 +0000 (22:58 +0000)]
Bump distutils version number to match Python version.

17 years agoTest round-trip on float.as_integer_ratio() and float.__truediv__().
Raymond Hettinger [Fri, 1 Feb 2008 22:42:59 +0000 (22:42 +0000)]
Test round-trip on float.as_integer_ratio() and float.__truediv__().

17 years agolabs() takes a long for an input.
Raymond Hettinger [Fri, 1 Feb 2008 22:22:50 +0000 (22:22 +0000)]
labs() takes a long for an input.

17 years agoInteger ratio should return ints instead of longs whereever possible.
Raymond Hettinger [Fri, 1 Feb 2008 22:15:52 +0000 (22:15 +0000)]
Integer ratio should return ints instead of longs whereever possible.

17 years agoIssue #1996: float.as_integer_ratio() should return fraction in lowest terms.
Raymond Hettinger [Fri, 1 Feb 2008 21:30:23 +0000 (21:30 +0000)]
Issue #1996: float.as_integer_ratio() should return fraction in lowest terms.

17 years agoUpdate for latest sphinx latex writer.
Georg Brandl [Fri, 1 Feb 2008 20:45:33 +0000 (20:45 +0000)]
Update for latest sphinx latex writer.

17 years agoWording nit.
Georg Brandl [Fri, 1 Feb 2008 19:24:01 +0000 (19:24 +0000)]
Wording nit.

17 years agoMore int -> pid_t.
Christian Heimes [Fri, 1 Feb 2008 18:49:26 +0000 (18:49 +0000)]
More int -> pid_t.

17 years agoRename batch file.
Georg Brandl [Fri, 1 Feb 2008 18:08:09 +0000 (18:08 +0000)]
Rename batch file.

17 years agoAdd link checker builder, written for GHOP by Thomas Lamb.
Georg Brandl [Fri, 1 Feb 2008 15:50:15 +0000 (15:50 +0000)]
Add link checker builder, written for GHOP by Thomas Lamb.

17 years agoUpdate IPv6 RFC number.
Georg Brandl [Fri, 1 Feb 2008 11:59:08 +0000 (11:59 +0000)]
Update IPv6 RFC number.

17 years agoFix refleak
Neal Norwitz [Fri, 1 Feb 2008 07:22:59 +0000 (07:22 +0000)]
Fix refleak

17 years agoRoll back r60248. It's useful to encourage users not to change Rational
Jeffrey Yasskin [Fri, 1 Feb 2008 07:05:46 +0000 (07:05 +0000)]
Roll back r60248. It's useful to encourage users not to change Rational
instances.

17 years agoMove __builtins__.trunc() to math.trunc() per
Jeffrey Yasskin [Fri, 1 Feb 2008 06:22:46 +0000 (06:22 +0000)]
Move __builtins__.trunc() to math.trunc() per
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue
1965.

17 years agoFixed bug #1983: Return from fork() is pid_t, not int
Christian Heimes [Thu, 31 Jan 2008 23:08:23 +0000 (23:08 +0000)]
Fixed bug #1983: Return from fork() is pid_t, not int

17 years agoIssue #1678380. Fix a bug that identifies 0j and -0j when they appear
Mark Dickinson [Thu, 31 Jan 2008 22:17:37 +0000 (22:17 +0000)]
Issue #1678380.  Fix a bug that identifies 0j and -0j when they appear
in the same code unit. The fix is essentially the same as the fix for a
previous bug identifying 0. and -0.

17 years agoMinor wordsmithing on docstring
Raymond Hettinger [Thu, 31 Jan 2008 22:07:16 +0000 (22:07 +0000)]
Minor wordsmithing on docstring

17 years agoRemove unused to-be-magic methods from Rational per issue 1968. Do not port
Jeffrey Yasskin [Thu, 31 Jan 2008 17:45:59 +0000 (17:45 +0000)]
Remove unused to-be-magic methods from Rational per issue 1968. Do not port
this patch to py3k.

17 years agoAdded more documentation on how mixed-mode arithmetic should be implemented. I
Jeffrey Yasskin [Thu, 31 Jan 2008 07:44:11 +0000 (07:44 +0000)]
Added more documentation on how mixed-mode arithmetic should be implemented. I
also noticed and fixed a bug in Rational's forward operators (they were
claiming all instances of numbers.Rational instead of just the concrete types).

17 years agoMissing return
Raymond Hettinger [Thu, 31 Jan 2008 01:42:11 +0000 (01:42 +0000)]
Missing return

17 years agoFix defect in __ixor__ which would get the wrong
Raymond Hettinger [Thu, 31 Jan 2008 01:38:15 +0000 (01:38 +0000)]
Fix defect in __ixor__ which would get the wrong
answer if the input iterable had a duplicate element
(two calls to toggle() reverse each other).  Borrow
the correct code from sets.py.

17 years agoBug #1234: Fixed semaphore errors on AIX 5.2
Christian Heimes [Wed, 30 Jan 2008 22:54:18 +0000 (22:54 +0000)]
Bug #1234: Fixed semaphore errors on AIX 5.2

17 years agoUpdate itertool recipes
Raymond Hettinger [Wed, 30 Jan 2008 22:17:31 +0000 (22:17 +0000)]
Update itertool recipes

17 years agoThe previous change was causing a segfault after multiple calls to Py_Initialize...
Christian Heimes [Wed, 30 Jan 2008 18:58:29 +0000 (18:58 +0000)]
The previous change was causing a segfault after multiple calls to Py_Initialize() and Py_Finalize().

17 years agoFixed some references leaks in sys.
Christian Heimes [Wed, 30 Jan 2008 17:21:22 +0000 (17:21 +0000)]
Fixed some references leaks in sys.

17 years agoRemoved unused var
Christian Heimes [Wed, 30 Jan 2008 11:46:00 +0000 (11:46 +0000)]
Removed unused var

17 years agoPatch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak detection...
Christian Heimes [Wed, 30 Jan 2008 11:32:37 +0000 (11:32 +0000)]
Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and linebreak detection. The speedup is about 25% for split() (571 / 457 usec) and 35% (175 / 127 usec )for splitlines()

17 years agoDemonstrate new except/as syntax.
Raymond Hettinger [Wed, 30 Jan 2008 00:51:58 +0000 (00:51 +0000)]
Demonstrate new except/as syntax.

17 years agoMutableSets support a remove() method.
Raymond Hettinger [Wed, 30 Jan 2008 00:08:31 +0000 (00:08 +0000)]
MutableSets support a remove() method.

17 years agoAdd isdisjoint() to the Set/MutableSet ABCs.
Raymond Hettinger [Wed, 30 Jan 2008 00:01:07 +0000 (00:01 +0000)]
Add isdisjoint() to the Set/MutableSet ABCs.

17 years agoCallMethod is faster with a NULL third-argument than with an empty format string.
Raymond Hettinger [Tue, 29 Jan 2008 19:52:09 +0000 (19:52 +0000)]
CallMethod is faster with a NULL third-argument than with an empty format string.

17 years agoIgnore .pyc and .pyo files.
Brett Cannon [Tue, 29 Jan 2008 04:20:56 +0000 (04:20 +0000)]
Ignore .pyc and .pyo files.

17 years agoUpdate Vim syntax highlighting to specify what revision was used to generate
Brett Cannon [Tue, 29 Jan 2008 04:18:04 +0000 (04:18 +0000)]
Update Vim syntax highlighting to specify what revision was used to generate
the file.

17 years agoFix the reindent rule to use $(BUILDPYTHON).
Brett Cannon [Tue, 29 Jan 2008 04:13:07 +0000 (04:13 +0000)]
Fix the reindent rule to use $(BUILDPYTHON).

17 years agoDisable use of BerkeleyDB 4.6.x to see what the odd platform buildbots
Gregory P. Smith [Mon, 28 Jan 2008 23:21:00 +0000 (23:21 +0000)]
Disable use of BerkeleyDB 4.6.x to see what the odd platform buildbots
think.  In particular, neal norwitz has traced an Ubuntu sparc64 crash
to the Lib/test/bsddb/test_basics.py test when opening a db with DB_THREAD.

17 years agoRemoved unnecessary conditional (spotted by Neal Norwitz).
Raymond Hettinger [Mon, 28 Jan 2008 21:51:25 +0000 (21:51 +0000)]
Removed unnecessary conditional (spotted by Neal Norwitz).

17 years agoFactor-out common code with a new macro
Raymond Hettinger [Mon, 28 Jan 2008 21:48:07 +0000 (21:48 +0000)]
Factor-out common code with a new macro

17 years agoFactor-out common code with a new macro
Raymond Hettinger [Mon, 28 Jan 2008 21:47:42 +0000 (21:47 +0000)]
Factor-out common code with a new macro

17 years agoLet marshal built-up sets and frozensets one element at a time (without creating...
Raymond Hettinger [Mon, 28 Jan 2008 21:34:30 +0000 (21:34 +0000)]
Let marshal built-up sets and frozensets one element at a time (without creating an intermediate tuple).

17 years agoMake PySet_Add() work with frozensets.
Raymond Hettinger [Mon, 28 Jan 2008 20:34:33 +0000 (20:34 +0000)]
Make PySet_Add() work with frozensets.
Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
Also, PyFrozenSet_New() is now guaranteed to produce a distinct new frozenset.

17 years agoRevert rev. 59925, it breaks comtypes (I need to further examine this).
Thomas Heller [Mon, 28 Jan 2008 08:44:13 +0000 (08:44 +0000)]
Revert rev. 59925, it breaks comtypes (I need to further examine this).

17 years agostatic PyObject* variables should use PyString_InternFromString() instead of PyObject...
Christian Heimes [Mon, 28 Jan 2008 02:07:53 +0000 (02:07 +0000)]
static PyObject* variables should use PyString_InternFromString() instead of PyObject_FromString() to store a python string in a function level static var.

17 years agoAdded clear cache methods to clear the internal type lookup cache for ref leak test...
Christian Heimes [Sun, 27 Jan 2008 23:34:59 +0000 (23:34 +0000)]
Added clear cache methods to clear the internal type lookup cache for ref leak test runs.

17 years agoMoved Rational._binary_float_to_ratio() to float.as_integer_ratio() because
Jeffrey Yasskin [Sun, 27 Jan 2008 23:08:46 +0000 (23:08 +0000)]
Moved Rational._binary_float_to_ratio() to float.as_integer_ratio() because
it's useful outside of rational numbers.

This is my first C code that had to do anything significant. Please be more
careful when looking over it.

17 years agoAdd refcounting extension to build config.
Georg Brandl [Sun, 27 Jan 2008 20:25:12 +0000 (20:25 +0000)]
Add refcounting extension to build config.

17 years agosocket.error doesn't have a headers attribute like ProtocolError.
Neal Norwitz [Sun, 27 Jan 2008 20:03:13 +0000 (20:03 +0000)]
socket.error doesn't have a headers attribute like ProtocolError.
Handle that situation where we catch socket.errors.

17 years agoChange isbasestring function as discussed on the cvs list a while ago
Christian Heimes [Sun, 27 Jan 2008 19:01:45 +0000 (19:01 +0000)]
Change isbasestring function as discussed on the cvs list a while ago

17 years agoTry to handle socket.errors properly in is_unavailable
Neal Norwitz [Sun, 27 Jan 2008 18:19:04 +0000 (18:19 +0000)]
Try to handle socket.errors properly in is_unavailable

17 years agoRemove effectless expression statement.
Georg Brandl [Sun, 27 Jan 2008 18:14:43 +0000 (18:14 +0000)]
Remove effectless expression statement.

17 years agoUpdate the comment and remove the close. If we close we can't flush anymore.
Neal Norwitz [Sun, 27 Jan 2008 18:09:48 +0000 (18:09 +0000)]
Update the comment and remove the close.  If we close we can't flush anymore.
We might still need to close after the for loop if flushing 6! times still
doesn't cause the signal/exception.

17 years agoPrint periodic "still working" messages since this suite is slow.
Neal Norwitz [Sun, 27 Jan 2008 17:13:07 +0000 (17:13 +0000)]
Print periodic "still working" messages since this suite is slow.

17 years agoReduce buffer size since we do not need 1k
Neal Norwitz [Sun, 27 Jan 2008 17:12:15 +0000 (17:12 +0000)]
Reduce buffer size since we do not need 1k

17 years agoCatch socket errors that are often the cause of transient failures.
Neal Norwitz [Sun, 27 Jan 2008 17:11:11 +0000 (17:11 +0000)]
Catch socket errors that are often the cause of transient failures.
Many of these exceptions are due to resource unavailable, so the
existing code should be able to handle many more spurious errors.

17 years agoRetry connection in case it fails to reduce flakiness
Neal Norwitz [Sun, 27 Jan 2008 17:10:58 +0000 (17:10 +0000)]
Retry connection in case it fails to reduce flakiness

17 years agoAdd a tiny sleep and additional flush to force the file to really be synced.
Neal Norwitz [Sun, 27 Jan 2008 17:10:50 +0000 (17:10 +0000)]
Add a tiny sleep and additional flush to force the file to really be synced.

17 years agoUpdate to newer version of ffi. Fixes crashes and test failures of longdouble
Neal Norwitz [Sun, 27 Jan 2008 17:10:43 +0000 (17:10 +0000)]
Update to newer version of ffi.  Fixes crashes and test failures of longdouble

17 years agoInitialize variable to prevent warning on some platform/config.
Neal Norwitz [Sun, 27 Jan 2008 17:10:35 +0000 (17:10 +0000)]
Initialize variable to prevent warning on some platform/config.

17 years agoAdd assertion that we do not blow out newl
Neal Norwitz [Sun, 27 Jan 2008 17:10:29 +0000 (17:10 +0000)]
Add assertion that we do not blow out newl

17 years agoWhitespace cleanup
Neal Norwitz [Sun, 27 Jan 2008 17:10:14 +0000 (17:10 +0000)]
Whitespace cleanup

17 years agoRemoved an unnecessary and confusing paragraph from the namedtuple docs.
Raymond Hettinger [Sun, 27 Jan 2008 10:47:55 +0000 (10:47 +0000)]
Removed an unnecessary and confusing paragraph from the namedtuple docs.

17 years agoDocstring nit
Raymond Hettinger [Sun, 27 Jan 2008 10:13:57 +0000 (10:13 +0000)]
Docstring nit

17 years agoAdd stdarg include for va_list to get this to compile on cygwin
Neal Norwitz [Sun, 27 Jan 2008 07:41:33 +0000 (07:41 +0000)]
Add stdarg include for va_list to get this to compile on cygwin

17 years agoUse int for the sign rather than a char. char can be signed or unsigned.
Neal Norwitz [Sun, 27 Jan 2008 07:37:38 +0000 (07:37 +0000)]
Use int for the sign rather than a char.  char can be signed or unsigned.
It's system dependent.  This might fix the problem with test_rfind failing.

17 years agoMostly reformat. Also set an error and return NULL if neither MS_WINDOWS
Neal Norwitz [Sun, 27 Jan 2008 07:36:03 +0000 (07:36 +0000)]
Mostly reformat.  Also set an error and return NULL if neither MS_WINDOWS
nor UNIX is defined.  This may have caused problems on cygwin.

17 years agoMake rational.gcd() public and allow Rational to take decimal strings, per
Jeffrey Yasskin [Sun, 27 Jan 2008 05:40:35 +0000 (05:40 +0000)]
Make rational.gcd() public and allow Rational to take decimal strings, per
Raymond's advice.

17 years agoTry to prevent this test from being flaky. We might need a sleep in here
Neal Norwitz [Sun, 27 Jan 2008 05:02:34 +0000 (05:02 +0000)]
Try to prevent this test from being flaky.  We might need a sleep in here
which isn't as bad as it sounds.  The close() *should* raise an exception,
so if it didn't we should give more time to sync and really raise it.

Will backport.

17 years agoEliminate the sleeps that assume the server will start in .5 seconds.
Neal Norwitz [Sun, 27 Jan 2008 01:44:05 +0000 (01:44 +0000)]
Eliminate the sleeps that assume the server will start in .5 seconds.
This should make the test less flaky.  It also speeds up the test
by about 75% on my box (20+ seconds -> ~4 seconds).

17 years agoConsistently use tempfile.tempdir for the db_home directory.
Neal Norwitz [Sat, 26 Jan 2008 23:14:17 +0000 (23:14 +0000)]
Consistently use tempfile.tempdir for the db_home directory.

17 years agoOn some systems (e.g., Ubuntu on hppa) the flush()
Neal Norwitz [Sat, 26 Jan 2008 23:13:46 +0000 (23:13 +0000)]
On some systems (e.g., Ubuntu on hppa) the flush()
doesn't cause the exception, but the close() does.

Will backport.

17 years agoReduce the race condition by signalling when the server is ready
Neal Norwitz [Sat, 26 Jan 2008 21:21:59 +0000 (21:21 +0000)]
Reduce the race condition by signalling when the server is ready
and not trying to connect before.

17 years agoAlways try to remove the test file even if close raises an exception
Neal Norwitz [Sat, 26 Jan 2008 21:02:45 +0000 (21:02 +0000)]
Always try to remove the test file even if close raises an exception

17 years agoCleanup the code a bit. test_rfind is failing on PPC and PPC64 buildbots,
Neal Norwitz [Sat, 26 Jan 2008 20:24:36 +0000 (20:24 +0000)]
Cleanup the code a bit.  test_rfind is failing on PPC and PPC64 buildbots,
this might fix the problem.

17 years agoUpdate docs for new callpack params added in r60188
Gregory P. Smith [Sat, 26 Jan 2008 18:51:05 +0000 (18:51 +0000)]
Update docs for new callpack params added in r60188

17 years agoUnit test fix from Giampaolo Rodola, #1938
Christian Heimes [Sat, 26 Jan 2008 16:43:35 +0000 (16:43 +0000)]
Unit test fix from Giampaolo Rodola, #1938