Victor Stinner
4a7e0c858c
Issue #7774 : Set sys.executable to an empty string if argv[0] has been
...
set to an non existent program name and Python is unable to retrieve the real
program name.
Fix also sysconfig: if sys.executable is an empty string, use the current
working directory.
2010-03-11 12:34:39 +00:00
Victor Stinner
6664426d7c
Issue #3137 : Don't ignore errors at startup, especially a keyboard interrupt
...
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
2010-03-10 22:30:19 +00:00
Mark Dickinson
2db56878f6
Silence compiler warning.
2010-03-07 17:10:19 +00:00
Mark Dickinson
154b7ad07e
Issue #1530559 : When packing a non-integer with any integer conversion
...
code using struct.pack, attempt to convert to an integer first using
the argument's __int__ method (if present). Also raise a
DeprecationWarning for any such usage of __int__.
This fixes a regression from 2.6, where some (but not all) integer
conversion codes already used __int__.
2010-03-07 16:24:45 +00:00
Mark Dickinson
20d7f6e8f4
Remove the redundant #define: PY_STRUCT_FLOAT_COERCE
2010-03-05 14:50:22 +00:00
Mark Dickinson
1c0c78c61f
Fix incorrect stacklevel for DeprecationWarnings originating from the struct module.
...
Also clean up related tests in test_struct.
The stacklevel fix should be backported to 2.6 once that branch is unfrozen.
2010-03-05 14:36:20 +00:00
Gerhard Häring
3bbb67273a
Merged code from pysqlite 2.6.0.
2010-03-05 09:12:37 +00:00
Victor Stinner
7c924ec925
Issue #1054943 : Fix unicodedata.normalize('NFC', text) for the Public Review
...
Issue #29 .
PR #29 was released in february 2004!
2010-03-04 12:09:33 +00:00
Victor Stinner
56a5153e21
Issue #7494 : fix a crash in _lsprof (cProfile) after clearing the profiler,
...
reset also the pointer to the current pointer context.
2010-03-04 00:10:12 +00:00
Victor Stinner
71fb87e64c
Issue #7544 : Preallocate thread memory before creating the thread to avoid a
...
fatal error in low memory condition.
2010-03-03 23:20:25 +00:00
Victor Stinner
2379bb664a
Issue #3299 : fix curses.panel.new_panel() error handler, replace PyObject_DEL()
...
by Py_DECREF() to avoid a crash in pydebug mode.
Use po->wo==NULL to detect than the panel is in the lop list or not.
2010-03-03 21:53:41 +00:00
Victor Stinner
c951d56f9a
Issue #3299 : fix thread.allocate_lock() error handler, replace PyObject_Del()
...
by Py_DECREF() to fix a crash in pydebug mode.
2010-03-03 00:43:44 +00:00
Victor Stinner
3f75cc5cb5
Issue #2973 : Fix gcc warning on the 2nd argument of ASN1_item_d2i() and
...
method->d2i(): OpenSSL API changed in OpenSSL 0.9.6m. Patch written by Daniel
Black.
2010-03-02 22:44:42 +00:00
Benjamin Peterson
41162ebdad
remove CVS id
2010-03-01 23:25:13 +00:00
Florent Xicluna
e7901c5ebb
#7808 : Fix reference leaks in _bsddb and related tests.
2010-03-01 20:45:01 +00:00
Gregory P. Smith
6a65f85e79
Fixes issue #7999 : os.setreuid() and os.setregid() would refuse to accept
...
a -1 parameter on some platforms such as OS X.
2010-03-01 05:43:43 +00:00
Gregory P. Smith
4b862365c8
Fix for r78527. It left out updating forkpty.
2010-03-01 02:31:33 +00:00
Gregory P. Smith
9e5d1327f8
Issue #7242 : On Solaris 9 and earlier calling os.fork() from within a
...
thread could raise an incorrect RuntimeError about not holding the import
lock. The import lock is now reinitialized after fork.
2010-03-01 01:22:39 +00:00
Amaury Forgeot d'Arc
adfc80bd81
#4852 : Remove dead code in every thread implementation, unused for many years.
2010-02-23 23:19:39 +00:00
Georg Brandl
ea370a9edd
#6544 : fix refleak in kqueue, occurring in certain error conditions.
2010-02-23 21:48:57 +00:00
Thomas Heller
92bd059c67
ctypes CThunkObject was not registered correctly with the cycle
...
garbage collector, leading to possible leaks when using callback
functions.
2010-02-23 20:11:44 +00:00
Andrew M. Kuchling
4b81bc7fe6
#7706 : add include guards where they're missing; required for Windows CE
2010-02-22 23:12:00 +00:00
Andrew M. Kuchling
72aae73d47
Fix comment typo
2010-02-22 18:38:23 +00:00
Andrew M. Kuchling
38c123651c
#7597 : curses.use_env() can be called before initscr(). Noted by Kan-Ru Chen
2010-02-22 16:26:47 +00:00
Mark Dickinson
d5fdc069fa
Silence more 'comparison between signed and unsigned' warnings.
2010-02-14 13:40:30 +00:00
Ronald Oussoren
333fca9b3e
Add guard around the prototype for completion_matches to enable
...
compilition with libedit on OSX 10.5
2010-02-11 13:13:08 +00:00
Antoine Pitrou
d840e5174d
Issue #4772 : Raise a ValueError when an unknown Bluetooth protocol is
...
specified, rather than fall through to AF_PACKET (in the `socket` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified. Patch by Brian Curtin.
2010-02-04 20:20:18 +00:00
Antoine Pitrou
526e421b12
Issue #7385 : Fix a crash in `MemoryView_FromObject` when
...
`PyObject_GetBuffer` fails. Patch by Florent Xicluna.
2010-02-02 22:36:17 +00:00
Antoine Pitrou
f3fa074703
- Issue #6939 : Fix file I/O objects in the `io` module to keep the original
...
file position when calling `truncate()`. It would previously change the
file position to the given argument, which goes against the tradition of
ftruncate() and other truncation APIs. Patch by Pascal Chambon.
2010-01-31 22:26:04 +00:00
Benjamin Peterson
46bff79d1f
be robust against test being run over and over (such as -R)
2010-01-30 23:28:38 +00:00
Benjamin Peterson
a04ae012ce
move test outside WITH_THREAD section
2010-01-30 23:26:05 +00:00
Mark Dickinson
a36507c64c
Issue #7767 : Add new C-API function PyLong_AsLongLongAndOverflow, a
...
long long variant of PyLong_AsLongAndOverflow. Patch by Case Van
Horsen.
2010-01-30 10:08:33 +00:00
Mark Dickinson
36ecd676ea
Issue #7788 : Fix a crash produced by deleting a list slice with huge
...
step value. Patch by Marcin Bachry.
2010-01-29 17:11:39 +00:00
Matthias Klose
0d948ac90c
- Expat: Fix DoS via XML document with malformed UTF-8 sequences
...
(CVE_2009_3560).
2010-01-22 00:39:04 +00:00
Gregory P. Smith
6b3573009a
Do not compile stubs for the sha2 series hashes in the openssl hashlib
...
module when the openssl version is too old to support them. That
leads both compiled code bloat and to unittests attempting to test
implementations that don't exist for comparison purposes on such
platforms.
2010-01-19 08:19:03 +00:00
Ronald Oussoren
a55af9a9db
- Issue #7658 : Ensure that the new pythonw executable works on OSX 10.4
...
- Issue #7714 : Use ``gcc -dumpversion`` to detect the version of GCC on
MacOSX.
- Make configure look for util.h as well as libutil.h. The former
is the header file that on OSX contains the defition of openpty.
(Needed to compile for OSX 10.4 on OSX 10.6)
- Use the correct definition of CC to compile the pythonw executable
2010-01-17 16:25:57 +00:00
Antoine Pitrou
db983a7c38
Followup to #7703 : a2b_hqx() didn't follow the new buffer API (neither in trunk
...
nor in py3k). Patch by Florent Xicluna as well as additional tests.
2010-01-16 17:45:56 +00:00
Antoine Pitrou
c391ad007b
Issue #7701 : Fix crash in binascii.b2a_uu() in debug mode when given a
...
1-byte argument. Patch by Victor Stinner.
2010-01-15 00:18:00 +00:00
Antoine Pitrou
efdddd3370
Issue #3299 : Fix possible crash in the _sre module when given bad
...
argument values in debug mode. Patch by Victor Stinner.
2010-01-14 17:25:24 +00:00
Antoine Pitrou
fd3a60d5ef
Issue #7703 : Add support for the new buffer API to functions of the
...
binascii module. Backported from py3k by Florent Xicluna, with some
additional tests.
2010-01-14 16:27:09 +00:00
Antoine Pitrou
8c510e704e
Issue #7661 : Allow ctypes to be built from a non-ASCII directory path.
...
Patch by Florent Xicluna.
2010-01-13 11:47:49 +00:00
Alexandre Vassalotti
b646547bb4
Issue #2333 : Backport set and dict comprehensions syntax.
2010-01-11 22:36:12 +00:00
Alexandre Vassalotti
ee936a2130
Issue #2335 : Backport set literals syntax from Python 3.x.
2010-01-09 23:35:54 +00:00
Antoine Pitrou
8015725d4f
Issue #7092 : Remove py3k warning when importing cPickle. 2to3 handles
...
renaming of `cPickle` to `pickle`. The warning was annoying since there's
no alternative to cPickle if you care about performance. Patch by Florent
Xicluna.
2010-01-08 19:20:17 +00:00
Antoine Pitrou
0d423b870b
Issue #7455 : Fix possible crash in cPickle on invalid input. Patch by
...
Florent Xicluna.
2010-01-07 17:46:49 +00:00
Gregory P. Smith
3b18ff7e8b
remove an obsolete file that should've gone with r77252
2010-01-03 14:56:28 +00:00
Mark Dickinson
f132c16199
Make use of PyLong_AsLongAndOverflow in math_ldexp.
2010-01-03 12:03:03 +00:00
Gregory P. Smith
443ec6875f
Issue #3745 : Undo the requirement for new buffer API only objects to be passed
...
to hashlib functions in python 2.x. The module now uses the 's*' for argument
parsing which auto encodes unicode objects to the system default encoding for
us.
2010-01-02 22:28:48 +00:00
Mark Dickinson
d3e323215c
Refactor some longobject internals: PyLong_AsDouble and _PyLong_AsScaledDouble
...
(the latter renamed to _PyLong_Frexp) now use the same core code. The
exponent produced by _PyLong_Frexp now has type Py_ssize_t instead of the
previously used int, and no longer needs scaling by PyLong_SHIFT. This
frees the math module from having to know anything about the PyLong
implementation. This closes issue #5576 .
2010-01-02 14:45:40 +00:00
Georg Brandl
8cdc9bc901
More yearly updates.
2010-01-01 13:07:05 +00:00
Ezio Melotti
aac4df68d8
#7613 : missing ) in flmodule.c
2009-12-31 13:47:24 +00:00
Amaury Forgeot d'Arc
8645a5c81f
#7413 : Passing '\0' as the separator to datetime.datetime.isoformat()
...
used to drop the time part of the result.
2009-12-29 22:03:38 +00:00
Georg Brandl
fa1ffb69c4
#7595 : fix typo in argument default constant.
2009-12-29 21:09:17 +00:00
Georg Brandl
740cdc3a9f
#7033 : add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring.
2009-12-28 08:34:58 +00:00
Amaury Forgeot d'Arc
2401c03746
Fix a typo in comment
2009-12-27 20:06:44 +00:00
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
Antoine Pitrou
5e9f6676ea
Fix compilation error in debug mode.
2009-10-24 12:41:27 +00:00
Antoine Pitrou
f7820c1626
Manual py3k backport: [svn r74316] Issue #5449 : Fix io.BytesIO to not accept arbitrary keywords
2009-10-24 12:28:22 +00:00
Antoine Pitrou
fa94e80f3b
Manual py3k backport: [svn r74158] Issue #6218 : Make io.BytesIO and io.StringIO picklable.
2009-10-24 12:23:18 +00:00
Antoine Pitrou
f98a267be3
Manual py3k backport: [svn r74155] Issue #6242 : Fix deallocator of io.StringIO and io.BytesIO
2009-10-24 11:59:41 +00:00
Antoine Pitrou
efb60c0ceb
Issue #1722344 : threading._shutdown() is now called in Py_Finalize(), which
...
fixes the problem of some exceptions being thrown at shutdown when the
interpreter is killed. Patch by Adam Olsen.
2009-10-20 21:29:37 +00:00
Antoine Pitrou
119cdef9b4
Issue #5833 : Fix extra space character in readline completion with the
...
GNU readline library version 6.0.
2009-10-19 18:17:18 +00:00
Antoine Pitrou
5ba84910ae
Issue #7133 : SSL objects now support the new buffer API.
...
This fixes the test_ssl failure.
2009-10-19 17:59:07 +00:00
Georg Brandl
e363b1434d
Fix refleaks in _ctypes PyCSimpleType_New, which fixes the refleak seen in test___all__.
2009-10-17 08:57:43 +00:00
Neil Schemenauer
973f8b4ca6
Make cPickle.Unpickler.noload() handle dict subclasses. noload() is
...
an obscure, undocumentated feature so no test was added. Closes
issue #1101399 .
2009-10-14 19:33:31 +00:00
Mark Dickinson
3d830828de
Issue #7078 : _struct.__doc__ was being ignored. Import it into struct.
...
Also add description of '?' struct format character. Thanks Gabriel
Genellina for the patch.
2009-10-08 15:54:10 +00:00
Amaury Forgeot d'Arc
d0052d17b1
#1571184 : makeunicodedata.py now generates the functions _PyUnicode_ToNumeric,
...
_PyUnicode_IsLinebreak and _PyUnicode_IsWhitespace.
It now also parses the Unihan.txt for numeric values.
2009-10-06 19:56:32 +00:00
Amaury Forgeot d'Arc
3de4647022
Fix compilation warning on Windows, where size_t is 32bit but file offsets are 64bit.
2009-10-05 20:18:05 +00:00
Philip Jenvey
dbf3b258e7
#6990 : clear threading.local's key only after its thread state is removed:
...
fixes local subclasses leaving old state around after a ref cycle GC which
could be recycled by new locals
2009-09-29 04:32:44 +00:00
Mark Dickinson
b93fff0a57
Issue #3366 : Add gamma function to math module.
...
(lgamma, erf and erfc to follow).
2009-09-28 18:54:55 +00:00
Mark Dickinson
716a9ccd3d
Eliminate unnecessary get_wrapped_(u)long defines in struct module.
2009-09-27 16:39:28 +00:00
Andrew M. Kuchling
b49e53ee16
#6243 : fix segfault when keyname() returns a NULL pointer.
...
Bug noted by Trundle, patched by Trundle and Jerry Chen.
2009-09-25 22:23:54 +00:00
Kristján Valur Jónsson
2fcd03bb77
http://bugs.python.org/issue6971
...
Adding the SIO_KEEPALIVE_VALS command to socket.ioctl on windows
2009-09-25 15:19:51 +00:00
Brett Cannon
6ef9fd7c97
Fix whitespace.
2009-09-22 19:13:27 +00:00
Brett Cannon
4d94743c28
When range checking was added to time.strftime() a check was placed on tm_isdst
...
to make sure it fell within [-1, 1] just in case someone implementing
strftime() in libc was stupid enough to assume this. Turns out, though, some
OSs (e.g. zOS) are stupid enough to use values outside of this range for time
structs created by the system itself. So instead of throwing a ValueError,
tm_isdst is now normalized before being passed to strftime().
Fixes issue #6823 . Thanks Robert Shapiro for diagnosing the problem and
contributing an initial patch.
2009-09-22 00:29:48 +00:00
Antoine Pitrou
2a46658bee
Issue #6236 , #6348 : Fix various failures in the io module under AIX
...
and other platforms, when using a non-gcc compiler. Patch by egreen.
In addition, I made explicit the signedness of all bitfields in the
IO library.
2009-09-21 21:17:48 +00:00
Ronald Oussoren
16766d7cd6
Merge a newer version of libffi_osx, based on the
...
version of libffi in OSX 10.6.1.
This fixes issue6918
2009-09-20 18:54:16 +00:00
Ronald Oussoren
9f20d9d0ee
Issue 6877: this patch makes it possible to link the readline extension
...
to the libedit emulation of the readline API on OSX 10.5 or later.
This also adds a minimal testsuite for readline to check that the
history manipuation functions have the same interface with both
C libraries.
2009-09-20 14:18:15 +00:00
Thomas Heller
d25fb2ff1f
Remove unused variable and static function to fix compiler warnings.
2009-09-19 10:04:54 +00:00
Georg Brandl
ab849891ef
#6944 : the argument to PyArg_ParseTuple should be a tuple, otherwise a SystemError is set. Also clean up another usage of PyArg_ParseTuple.
2009-09-19 07:35:07 +00:00
Thomas Heller
6be522bfc2
Issue #4606 : Passing 'None' if ctypes argtype is set to POINTER(...)
...
does now always result in NULL.
2009-09-18 20:05:44 +00:00
Thomas Heller
7a352c0ed8
Issue #5042 : Structure sub-subclass does now initialize correctly with
...
base class positional arguments.
2009-09-18 18:55:17 +00:00
Mark Dickinson
4676048b43
Remove outdated include; this include was breaking OS X builds using
...
non-Apple gcc4.3 and gcc4.4 (because CoreFoundation/CoreFoundation.h
won't compile under non-Apple gcc).
2009-09-16 20:26:31 +00:00
Thomas Wouters
c4dcb3801e
Fix issue #1590864 , multiple threads and fork() can cause deadlocks, by
...
acquiring the import lock around fork() calls. This prevents other threads
from having that lock while the fork happens, and is the recommended way of
dealing with such issues. There are two other locks we care about, the GIL
and the Thread Local Storage lock. The GIL is obviously held when calling
Python functions like os.fork(), and the TLS lock is explicitly reallocated
instead, while also deleting now-orphaned TLS data.
This only fixes calls to os.fork(), not extension modules or embedding
programs calling C's fork() directly. Solving that requires a new set of API
functions, and possibly a rewrite of the Python/thread_*.c mess. Add a
warning explaining the problem to the documentation in the mean time.
This also changes behaviour a little on AIX. Before, AIX (but only AIX) was
getting the import lock reallocated, seemingly to avoid this very same
problem. This is not the right approach, because the import lock is a
re-entrant one, and reallocating would do the wrong thing when forking while
holding the import lock.
Will backport to 2.6, minus the tiny AIX behaviour change.
2009-09-16 19:55:54 +00:00
Benjamin Peterson
8246968b12
tabbify
2009-09-09 11:40:54 +00:00
Benjamin Peterson
7f6d0834f9
#6865 fix ref counting in initialization of pwd module
2009-09-08 23:04:22 +00:00
Thomas Heller
81809a42c1
Make ctypes compile again with older Python versions.
2009-09-08 19:24:36 +00:00
Amaury Forgeot d'Arc
fff896b309
#6750 : TextIOWrapped could duplicate output when several threads write to it.
...
this affect text files opened with io.open(), and the print() function of py3k
2009-08-29 18:14:40 +00:00
Gregory P. Smith
4e63d54b36
Add weakref support to the thread.lock type.
2009-08-20 09:39:38 +00:00
Brett Cannon
764465f315
Expat could crash if given the wrong kind of input by never stopping its
...
tokenizing step.
Thanks to Ivan Krstić for the patch.
2009-08-13 19:27:12 +00:00
Gregory P. Smith
c4ad0345cf
Fix issue1628205: Socket file objects returned by socket.socket.makefile() now
...
properly handles EINTR within the read, readline, write & flush methods.
The socket.sendall() method now properly handles interrupted system calls.
2009-08-13 18:54:50 +00:00
Gregory P. Smith
f466642c66
comment typo fix
2009-08-12 17:02:37 +00:00
Antoine Pitrou
20e1f932fa
Issue #6629 : Fix a data corruption issue in the new `io` package, which could
...
occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or
"wb+" mode) after having buffered a certain amount of data for reading. This
bug was not present in the pure Python implementation.
Yes, this is a serious issue.
2009-08-06 20:18:29 +00:00
Mark Dickinson
8d5a6522a9
Issue #6644 : Fix compile error on AIX.
2009-08-04 19:22:35 +00:00
Raymond Hettinger
8fdab95260
Issue 6637: defaultdict.copy() failed with an empty factory.
2009-08-04 19:08:05 +00:00
Mark Dickinson
fe67bd9168
Issue #6561 : '\d' regular expression should not match characters of
...
category [No]; only those of category [Nd]. (Backport of r74237
from py3k.)
2009-07-28 20:35:03 +00:00
Amaury Forgeot d'Arc
74b3016783
#6553 : crash in cPickle.load(), when given a StringIO with incomplete data.
...
Will backport to 2.6, 3.x already fixed a similar issue with issue4298.
2009-07-23 19:26:02 +00:00
Thomas Heller
d8431ae3bd
Revert rev 74134, as it does not completely fixx issue #6493 .
2009-07-21 19:04:02 +00:00
Thomas Heller
6adda9641d
Issue #6493 : Fix a ctypes problem setting bitfields more than 31 bits
...
wide.
2009-07-21 06:27:14 +00:00
Alexandre Vassalotti
0b5b8af435
Fix GCC warning about fprintf used without a string literal and
...
without format arguments.
2009-07-17 08:09:04 +00:00
Alexandre Vassalotti
6d78736177
Initialize variables in PyCurses_getsyx() to avoid compiler warnings.
2009-07-17 07:54:23 +00:00