Commit Graph

5085 Commits

Author SHA1 Message Date
Gregory P. Smith 9f12d468f4 Fix possible integer overflow in lchown and fchown functions. For issue1747858. 2009-12-23 09:31:11 +00:00
Mark Dickinson 1730fdc130 Inverse hyperbolic trigonometric functions should call m_log1p, not log1p. 2009-12-21 15:40:33 +00:00
Mark Dickinson 12748b003c Issue #7518: Move substitute definitions of C99 math functions from
pymath.c to Modules/_math.c.
2009-12-21 15:22:00 +00:00
Mark Dickinson bd335bfce7 Additional edge-case tests for test_long_and_overflow. 2009-12-21 12:15:48 +00:00
Mark Dickinson ed02b3f342 Fix reference counts for test_long_and_overflow. 2009-12-21 11:31:54 +00:00
Mark Dickinson e31d300664 Issue #7528: Backport PyLong_AsLongAndOverflow from py3k to trunk.
Thanks Case Van Horsen for the patch.
2009-12-21 11:21:25 +00:00
Mark Dickinson b5e348b305 Add missing tests for PyArg_Parse* with format 'h' 2009-12-20 15:57:56 +00:00
Mark Dickinson 5698977186 math.factorial depends on PyLong_AsLong correctly converting floats; rewrite
it to do the conversion explicitly instead.  See issue #7550.
2009-12-20 13:58:18 +00:00
Antoine Pitrou e812d29b52 Issue #7545: improve documentation of the `buffering` argument in io.open(). 2009-12-19 21:01:10 +00:00
Mark Dickinson 5ff37ae14b Issue #3366: Add error function and complementary error function to
math module.
2009-12-19 11:07:23 +00:00
Mark Dickinson 9cae178f21 Issue #3366: Add expm1 function to math module. Thanks Eric Smith for
testing on Windows.
2009-12-16 20:13:40 +00:00
Benjamin Peterson 001e4a6c07 add a test of loading the datetime capi 2009-12-13 21:27:53 +00:00
Benjamin Peterson aef189939e remove unused variable 2009-12-13 19:27:02 +00:00
Benjamin Peterson ddd392cbb9 accept None as the same as having passed no argument in file types #7349
This is for consistency with imitation file objects like StringIO and BytesIO.

This commit also adds a few tests, where they were lacking for concerned
methods.
2009-12-13 19:19:07 +00:00
Mark Dickinson 9be87bc992 Issue #3366: Add lgamma function to math module. 2009-12-11 17:29:33 +00:00
Raymond Hettinger a5fd24e97d Add a reverse() method to collections.deque(). 2009-12-10 06:42:54 +00:00
Raymond Hettinger 0b3263b073 Fix variants of deque.extend: d.extend(d) d+=d d.extendleft(d) 2009-12-10 06:00:33 +00:00
Antoine Pitrou 187177fc55 Issue #6986: Fix crash in the JSON C accelerator when called with the
wrong parameter types.  Patch by Victor Stinner.
2009-12-08 15:40:51 +00:00
Antoine Pitrou 30b3b35cba Issue #7333: The `posix` module gains an `initgroups()` function providing
access to the initgroups(3) C library call on Unix systems which implement
it.  Patch by Jean-Paul Calderone.
2009-12-02 20:37:54 +00:00
Amaury Forgeot d'Arc d728871ee1 #7419: Fix a crash on Windows in locale.setlocale() when the category
is outside the allowed range.
2009-12-01 21:51:04 +00:00
Raymond Hettinger 9b4197ba53 Handle step values other than one. 2009-11-30 21:13:52 +00:00
Raymond Hettinger e09f45a2e3 Issue 7410: deepcopy of itertools.count resets the count 2009-11-30 19:44:40 +00:00
Mark Dickinson 5afa6d4dcf Issue #7272, continued: don't re-use existing HAVE_BROKEN_POSIX_SEMAPHORES
to indicate that semaphores aren't available;  define a new variable
POSIX_SEMAPHORES_NOT_ENABLED instead.
2009-11-28 10:44:20 +00:00
Martin v. Löwis 50ea4565bd Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}. 2009-11-27 13:56:01 +00:00
Antoine Pitrou bcfaf8007d Issue #5788: `datetime.timedelta` objects get a new `total_seconds()` method returning
the total number of seconds in the duration.  Patch by Brian Quinlan.
2009-11-25 22:59:36 +00:00
Mark Dickinson 889d96455a Issue #7228: Fix format mismatch when printing something of type off_t.
(Should silence some compiler warnings.)
2009-11-24 20:51:48 +00:00
Alexandre Vassalotti 8b2d713d32 Issue 7128: Removed reference to the non-existent copyreg module.
The reference to copyreg was a unnoticed leftover from the compatibility
support for the grand renaming of the standard library in Python 3. The
compatibility support was reverted in r63493, but not completely as this
patch shows.

Based on a patch by Amaury Forgeot d'Arc.
2009-11-24 17:53:23 +00:00
Mark Dickinson c4920e86ef Issue #7272: Add configure test to detect whether sem_open works
properly, and use this to skip test_multiprocessing on platforms
where sem_open raises a signal.  This should fix some FreeBSD buildbot
failures for test_multiprocessing.
2009-11-20 19:30:22 +00:00
Raymond Hettinger 9eac119ba8 Fix docstrings for itertools combinatoric functions. 2009-11-19 01:22:04 +00:00
Mark Dickinson 82864d1ab1 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
PyFormat_FromStringV and PyErr_Format.
2009-11-15 16:18:58 +00:00
Antoine Pitrou 323b9da16d Issue #7211: Allow 64-bit values for the `ident` and `data` fields of kevent
objects on 64-bit systems.  Patch by Michael Broghton.

I will revert this checkin if it causes problems on our BSD buildbots.
2009-11-04 19:25:14 +00:00
Georg Brandl efc285880c #7259: show correct equivalent for operator.i* operations in docstring; fix minor issues in operator docs. 2009-11-04 07:38:12 +00:00
Raymond Hettinger fa7dadd339 Fix exception handling in itertools.izip_longest(). 2009-11-01 20:45:16 +00:00
Antoine Pitrou e50efaad9f Buffered I/O: optimize lock taking in the common non-contended case. 2009-11-01 11:58:22 +00:00
Gregory P. Smith b2b92ea7bc Define TCSASOFT if the flag exists. 2009-10-31 21:23:39 +00:00
Antoine Pitrou 2c970a2ba2 Remove official documentation entry for thread._count() and make the
docstring more descriptive instead.
2009-10-30 22:19:09 +00:00
Antoine Pitrou 59c44f36e0 Issue #7222: Make thread "reaping" more reliable so that reference
leak-chasing test runs give sensible results. The previous method of
reaping threads could return successfully while some Thread objects were
still referenced. This also introduces a new private function:
:func:hread._count().
2009-10-30 17:07:08 +00:00
Georg Brandl a8f8bed203 Use a single style for all the docstrings in the math module. 2009-10-29 20:54:03 +00:00
Georg Brandl 40777e6606 Use the correct function name in docstring. 2009-10-29 20:38:32 +00:00
Mark Dickinson 3ddb52717f Roll back ill-considered attempts to fix printf specifier mismatch for off_t.
The sensible solution seems to be to implement %lld for PyString_FromFormat(V)
and PyErr_Format.  See issue #7228.
2009-10-29 09:46:04 +00:00
Eric Smith 129c97df02 Issue 7117: Replace PyOS_ascii_strtod with PyOS_string_to_double in _json.c as part of short float repr. Change made after consulting with Bob Ippolito. This completes the removal of calls to PyOS_ascii_strtod. 2009-10-28 08:44:37 +00:00
Mark Dickinson e8486931b6 Fix format specifier for MSVC 2009-10-28 07:47:32 +00:00
Mark Dickinson 791181b0ff Replace long long with PY_LONG_LONG 2009-10-28 07:23:49 +00:00
Mark Dickinson bf1039d98c Silence gcc warnings when trying to print an off_t using "lld", on platforms
where off_t has type long (e.g., 64-bit Linux).
2009-10-27 21:48:20 +00:00
Antoine Pitrou dd62966a5f Issue #7205: Fix a possible deadlock when using a BZ2File object from several threads at once. 2009-10-27 17:41:58 +00:00
Eric Smith b53e1a6ed3 Issue 7117: Replace PyOS_ascii_strtod with PyOS_string_to_double in stropmodule as part of short float repr. 2009-10-27 12:12:44 +00:00
Eric Smith 97be1ca1d9 Issue 7117: Replace PyOS_ascii_strtod with PyOS_string_to_double in cPickle as part of short float repr. 2009-10-27 11:32:11 +00:00
Mark Dickinson e052b64def Use correct conversion specifier and length modifier when printing an
integer of type off_t.  Also, don't assume that long long is available.
2009-10-26 19:59:23 +00:00
Antoine Pitrou d9ff74e51d Some platforms have rl_completion_append_character but not rl_completion_suppress_append.
Reported by Mark D.
2009-10-26 19:16:46 +00:00
Eric Smith b05d3be2f1 Continue removing _PyOS_double_to_string, as mentioned in issue 7117. 2009-10-26 15:06:39 +00:00