Petri Lehtinen
5445a8cb41
Replace tabs with spaces in posixmodule.c
2012-10-23 16:29:59 +03:00
Nadeem Vawda
78a59a6a57
Merge #14398 : Fix size truncation and overflow bugs in bz2 module.
2012-10-21 21:19:11 +02:00
Nadeem Vawda
18b7fcc7a6
Merge #14398 : Fix size truncation and overflow bugs in bz2 module.
2012-10-21 21:16:58 +02:00
Nadeem Vawda
5f8f0d6777
Issue #14398 : Fix size truncation and overflow bugs in bz2 module.
2012-10-21 21:13:27 +02:00
Antoine Pitrou
06eecead03
Issue #12034 : Fix bogus caching of result in check_GetFinalPathNameByHandle.
...
Patch by Atsuo Ishimoto.
2012-10-21 16:33:33 +02:00
Christian Heimes
743e0cd6b5
Issue #16166 : Add PY_LITTLE_ENDIAN and PY_BIG_ENDIAN macros and unified
...
endianess detection and handling.
2012-10-17 23:52:17 +02:00
Andrew Svetlov
d0ad0b3ae2
Reformat _tkinter code to follow PEP7
2012-10-16 22:50:34 +03:00
Christian Heimes
7707f6fd32
Issue #16234 : Modify sha3's block_size method to return NotImplemented.
...
This makes the sha3 types unusable from the hmac module. HMAC-SHA3 hasn't been specified yet.
2012-10-14 22:16:27 +02:00
Andrew Svetlov
11dc6c311d
Issue #15721 : make _tkinter module pep384 compatible.
2012-10-14 16:54:35 +03:00
Christian Heimes
1f476504fe
Update comment: SPARC requires proper alignment
2012-10-14 14:36:09 +02:00
Christian Heimes
12e6a53b99
get 64bit platforms without uint64 right again
2012-10-14 04:17:50 +02:00
Christian Heimes
784fde7cb4
Force 32bit Keccak implementation on SPARC. It look like the Solaris CC compiler doesn't like the address alignment.
2012-10-14 02:52:01 +02:00
Christian Heimes
ba3e4a0bc0
Keccak: fromBytesToWord() and fromWordToBytes() are required on 64bit big endian platforms
2012-10-14 00:59:29 +02:00
Gregory P. Smith
70e0007f55
Fixes Issue #16114 : The subprocess module no longer provides a
...
misleading error message stating that args[0] did not exist when
either the cwd or executable keyword arguments specified a path that
did not exist.
2012-10-10 03:53:16 -07:00
Gregory P. Smith
a10ddb8a55
Fixes Issue #16114 : The subprocess module no longer provides a
...
misleading error message stating that args[0] did not exist when
either the cwd or executable keyword arguments specified a path that
did not exist.
2012-10-10 03:44:47 -07:00
Gregory P. Smith
5591b02a4c
Fixes Issue #16114 : The subprocess module no longer provides a
...
misleading error message stating that args[0] did not exist when
either the cwd or executable keyword arguments specified a path that
did not exist.
It now keeps track of if the child got as far as preexec and reports it if
not back to the parent via a special "noexec" error message value in
the error pipe so that the cwd can be blamed for a failed chdir
instead of the exec of the executable being blamed instead.
The executable is also always reported accurately when exec fails.
Unittests enhanced to cover these cases.
2012-10-10 03:34:47 -07:00
Christian Heimes
8836eefb1e
brg_endian.h is back again
2012-10-07 23:38:44 +02:00
Christian Heimes
d8463e9cfd
merge
2012-10-07 22:45:14 +02:00
Christian Heimes
dbc573ff29
re-add brg_endian.h to debug issue in big endian SPARC machine
2012-10-07 22:44:41 +02:00
Richard Oudkerk
8fb9f4cf7b
Get rid of circular import and eliminate unprefixed exported symbols
...
from _multiprocessing.
2012-10-07 18:08:47 +01:00
Andrew Svetlov
09c61bef2d
Remove unused functions from _tkinter.
2012-10-07 13:39:00 +03:00
Andrew Svetlov
885dc287d3
Utilize PyModule_Add{IntConstant,StringConstant,Object} in _tkinter.
2012-10-07 12:30:51 +03:00
Andrew Svetlov
9dc5bdddc0
Utilize Py_RETURN_NONE in _tkinter module.
2012-10-07 12:08:38 +03:00
Mark Dickinson
ff9c54aca2
Issue #16096 : Merge fixes from 3.3.
2012-10-06 18:05:14 +01:00
Mark Dickinson
c04ddff290
Issue #16096 : Fix several occurrences of potential signed integer overflow. Thanks Serhiy Storchaka.
2012-10-06 18:04:49 +01:00
Christian Heimes
2649105cdd
remove #warning from sha3module.c
2012-10-06 15:44:29 +02:00
Christian Heimes
c018f57186
fix possible memory leak, dealloc newobj
2012-10-06 15:09:06 +02:00
Armin Ronacher
aa9a79d279
Issue #16148 : implemented PEP 424
2012-10-06 14:03:24 +02:00
Christian Heimes
4a0270d82b
Issue #16113 : integrade SHA-3 (Keccak) patch from http://hg.python.org/sandbox/cheimes
2012-10-06 02:23:36 +02:00
Jesus Cea
6efe9dff14
Issue #14446 : Remove deprecated tkinter functions: Delete an unused function to avoid a warning
2012-10-05 04:02:41 +02:00
Jesus Cea
bf0f34421c
Issue #14446 : Remove deprecated tkinter functions: Delete an unused function to avoid a warning
2012-10-05 03:57:56 +02:00
Jesus Cea
14c81aba50
#16135 : Removal of OS/2 support (Modules/*)
2012-10-05 02:11:36 +02:00
Jesus Cea
ab70e2ab32
#16135 : Removal of OS/2 support (posixmodule y platform dependent files)
2012-10-05 01:48:08 +02:00
Andrew Svetlov
456b2b8777
Issue #14446 : Remove deprecated tkinter functions
...
Thanks to Michael Driscoll
2012-10-04 22:10:09 +03:00
Antoine Pitrou
997adb5819
Issue #16089 : Allow ElementTree.TreeBuilder to work again with a non-Element element_factory (fixes a regression in SimpleTAL).
2012-10-04 19:54:53 +02:00
Antoine Pitrou
ee329318db
Issue #16089 : Allow ElementTree.TreeBuilder to work again with a non-Element element_factory (fixes a regression in SimpleTAL).
2012-10-04 19:53:29 +02:00
Jesus Cea
d96c1fb6ed
MERGE: Closes #16126 : PyErr_Format format mismatch in _testcapimodule.c
2012-10-04 16:07:03 +02:00
Jesus Cea
6e1d2b6e78
Closes #16126 : PyErr_Format format mismatch in _testcapimodule.c
2012-10-04 16:06:30 +02:00
Jesus Cea
dc469454ec
Closes #15488 : Closed files keep their buffer alive
2012-10-04 12:37:56 +02:00
Jesus Cea
cf45325b61
Closes #15897 : zipimport.c doesn't check return value of fseek(). Typo
2012-10-03 03:16:42 +02:00
Jesus Cea
42db4157a9
MERGE: Closes #15897 : zipimport.c doesn't check return value of fseek()
2012-10-03 03:03:04 +02:00
Jesus Cea
fb22f542d2
MERGE: Closes #15897 : zipimport.c doesn't check return value of fseek()
2012-10-03 03:00:37 +02:00
Jesus Cea
09bf7a799d
Closes #15897 : zipimport.c doesn't check return value of fseek()
2012-10-03 02:13:05 +02:00
Alexander Belopolsky
cf77454908
Issue #9650 : List commonly used format codes in time.strftime and time.strptime docsttings.
2012-10-02 18:39:16 -04:00
Antoine Pitrou
5f62aaaa9e
Sanitize and modernize some of the _elementtree code (see issue #16089 ).
2012-10-01 23:41:51 +02:00
Antoine Pitrou
c194884983
Sanitize and modernize some of the _elementtree code (see issue #16089 ).
2012-10-01 23:40:37 +02:00
Stefan Krah
a0346e56ac
Support gcc's -ansi flag: use "__asm__" instead of "asm".
2012-09-30 17:31:04 +02:00
Stefan Krah
e59aa8c94d
Revert 29506c7db353 (build output should be accurate).
2012-09-30 17:20:47 +02:00
Christian Heimes
5c9a5895d4
merge
2012-09-30 15:51:39 +02:00
Christian Heimes
72c9946718
Change libmpdec to use ANSI code in strict ansi mode as inline asm isn't supported in ANSI C
2012-09-30 15:49:56 +02:00
Stefan Krah
16dd5245ac
Merge 3.3.
2012-09-30 17:35:57 +02:00
Stefan Krah
e65676b194
Merge 3.3.
2012-09-30 17:21:49 +02:00
Christian Heimes
c7d9bde2ff
Change libmpdec to use ANSI code in strict ansi mode as inline asm isn't supported in ANSI C
2012-09-30 15:50:20 +02:00
Stefan Krah
2118a01ef9
Merge 3.3.
2012-09-30 09:25:34 +02:00
Stefan Krah
9a3f05e60f
Make it clear that the pi function is modified for benchmarking purposes.
2012-09-30 09:24:41 +02:00
Benjamin Peterson
b8350f1c7d
upgrade to UCD 6.2
2012-09-29 13:47:39 -04:00
Stefan Krah
6b6a1df996
Restore the benchmark order to avoid waiting for decimal.py if just the
...
prec=9 test is used.
2012-09-25 17:07:55 +02:00
Brett Cannon
6cf50c5b1d
Fix whitespace.
2012-09-25 10:26:15 -04:00
Brett Cannon
63092fe0ea
Fix whitespace.
2012-09-25 10:25:41 -04:00
Brett Cannon
d266c4451f
Make the decimal bench file run under Python 2.7.
2012-09-25 10:23:47 -04:00
Senthil Kumaran
49d130227b
merge 3.2: Issue #16013 : Fix CSV Reader parsing issue with ending quote characters. Patch by Serhiy Storchaka.
2012-09-25 02:37:20 -07:00
Senthil Kumaran
67b7b98a47
Issue #16013 : Fix CSV Reader parsing issue with ending quote characters. Patch by Serhiy Storchaka.
2012-09-25 02:30:27 -07:00
Christian Heimes
22340be15e
Issue #16012 : Fix a regression in pyexpat. The parser's UseForeignDTD()
...
method doesn't require an argument again.
2012-09-24 13:27:28 +02:00
Christian Heimes
e26d3af7ee
Issue #16012 : Fix a regression in pyexpat. The parser's UseForeignDTD()
...
method doesn't require an argument again.
2012-09-24 13:17:08 +02:00
Christian Heimes
3b9493b53c
Use C-style comments for C89 / ANSI C compatibility
2012-09-23 16:11:15 +02:00
Stefan Krah
91ceeceea7
Use C-style comments (required for the AIX build slave).
2012-09-23 15:51:16 +02:00
Stefan Krah
7e6523fbd7
Use C-style comments.
2012-09-23 15:46:09 +02:00
Victor Stinner
a3ff101e6a
Issue #5969 : faulthandler module: rename dump_tracebacks_later() to
...
dump_traceback_later() and cancel_dump_tracebacks_later() to
cancel_dump_traceback_later().
2012-09-23 11:06:21 +02:00
Alexander Belopolsky
57caede470
Issue #15973 : fixed 3.2 backport.
2012-09-20 17:23:46 -04:00
Alexander Belopolsky
9b9ed867bc
merged 3.2
2012-09-20 16:42:34 -04:00
Alexander Belopolsky
3ec153681e
Issue #15973 : Fixed segmentation fault on timezone comparison to other types.
2012-09-20 16:39:33 -04:00
Antoine Pitrou
ca8aa4acf6
Issue #15144 : Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t.
...
Patch by Serhiy Storchaka.
2012-09-20 20:56:47 +02:00
Christian Heimes
1c47222a25
merge
2012-09-20 12:43:24 +02:00
Christian Heimes
5cb31c9277
Issue #15977 : Fix memory leak in Modules/_ssl.c when the function _set_npn_protocols() is called multiple times
2012-09-20 12:42:54 +02:00
Trent Nelson
9a46105a89
#15965 : Explicitly cast AT_FDCWD as (int).
...
Required on Solaris 10 (which defines AT_FDCWD as 0xffd19553),
harmless on other platforms.
2012-09-18 21:50:06 -04:00
Ezio Melotti
6d10b4d591
#15796 : merge with 3.2.
2012-09-18 07:21:18 +03:00
Ezio Melotti
16d2b47837
#15796 : Fix \n in readline docstring. Patch by Serhiy Storchaka.
2012-09-18 07:20:18 +03:00
Antoine Pitrou
9d20e0edd9
Issue #15926 : Fix crash after multiple reinitializations of the interpreter.
2012-09-12 18:01:36 +02:00
Benjamin Peterson
6f3e5e48d3
remove useless and defined initialization ( closes #15921 )
2012-09-11 12:05:05 -04:00
Jesus Cea
b7a2800831
MERGE: Closes #15793 : Stack corruption in ssl.RAND_egd()
2012-09-11 02:08:48 +02:00
Jesus Cea
c8754a13e6
Closes #15793 : Stack corruption in ssl.RAND_egd()
2012-09-11 02:00:58 +02:00
Jesus Cea
67bd81b867
MERGE: #15676 : mmap: add empty file check prior to offset check <- Previous patch was incomplete (fix 2)
2012-09-10 22:58:35 +02:00
Jesus Cea
e8db356cf1
#15676 : mmap: add empty file check prior to offset check <- Previous patch was incomplete (fix 2)
2012-09-10 22:58:07 +02:00
Jesus Cea
4886d5b338
#15676 : mmap: add empty file check prior to offset check <- Previous patch was incomplete
2012-09-10 22:50:21 +02:00
Jesus Cea
1f2799bef4
#15676 : mmap: add empty file check prior to offset check <- Previous patch was incomplete
2012-09-10 22:49:50 +02:00
Stefan Krah
76e12179c5
Issue #15882 : Change _decimal to accept any coefficient tuple when
...
constructing infinities. This is done for backwards compatibility
with decimal.py: Infinity coefficients are undefined in _decimal
(in accordance with the specification).
2012-09-10 19:34:58 +02:00
Christian Heimes
f47d79fec1
Fixed reference leak in error branch of _bufferedreader_read_all(). The variable data can contain a bytes object but it wasn't cleaned up when PyList_New() failed. CID 715364
2012-09-10 17:46:09 +02:00
Christian Heimes
89ff3c7f20
Fixed out-of-bounce write to rawmode buffer. The fixed size buffer wasn't enlarged for the new 'x' flag. The buffer may contain the 5 flags xrwa+ and the \0 byte
2012-09-10 03:50:48 +02:00
Christian Heimes
1b5c76a283
Fixed two memory leaks in make_filename() in zipimport.c. The allocated buffer wasn't cleaned up in two error cases. CID 486832
2012-09-10 02:00:34 +02:00
Christian Heimes
15b6885fe0
Make sure that *really* no more than sizeof(ifr.ifr_name) chars are strcpy-ed to ifr.ifr_name and that the string is *always* NUL terminated. New code shouldn't use strcpy(), too. CID 719692
2012-09-10 01:25:50 +02:00
Jesus Cea
1b3f3b0316
Closes #15676 : mmap: add empty file check prior to offset check
2012-09-10 01:23:05 +02:00
Jesus Cea
941bfcc537
Closes #15676 : mmap: add empty file check prior to offset check
2012-09-10 00:27:55 +02:00
Stefan Krah
ea94ba45fa
Merge 3.2.
2012-09-08 11:19:27 +02:00
Stefan Krah
96efdd422c
Issue #15868 : Fix refleak in bytesio.c (Coverity #715365 ).
2012-09-08 11:12:33 +02:00
Ross Lagerwall
2dabaf63cf
Issue #15876 : Fix a refleak in the curses module
...
The refleak occurred when assigning to window.encoding.
2012-09-07 08:34:23 +02:00
Stefan Krah
527a2400fb
_testbuffer.c: In all current use cases of cmp_structure() dest->format and
...
src->format are either both NULL or both non-NULL. However, it is safer to
generalize the function. Found by Coverity.
2012-09-06 09:42:29 +02:00
Antoine Pitrou
11946fbe80
Issue #15841 : The readable(), writable() and seekable() methods of BytesIO
...
and StringIO objects now raise ValueError when the object has been closed.
Patch by Alessandro Moura.
2012-09-05 20:13:48 +02:00
Antoine Pitrou
1d857453b7
Issue #15841 : The readable(), writable() and seekable() methods of BytesIO
...
and StringIO objects now raise ValueError when the object has been closed.
Patch by Alessandro Moura.
2012-09-05 20:11:49 +02:00
Victor Stinner
9f16e44a47
Close #14223 : Fix window.addch(curses.ACS_HLINE)
...
Fix window.addch() of the curses module for special characters like
curses.ACS_HLINE: the Python function addch(int) and addch(bytes) is now
calling the C function waddch()/mvwaddch() (as it was done in Python 3.2),
instead of wadd_wch()/mvwadd_wch(). The Python function addch(str) is still
calling the C function wadd_wch()/mvwadd_wch() if the Python curses is linked
to libncursesw.
2012-09-01 15:00:34 +02:00
Victor Stinner
1d39cde50c
Issue #15785 : Modify window.get_wch() API of the curses module: return a
...
character for most keys, and an integer for special keys, instead of always
returning an integer. So it is now possible to distinguish special keys like
keypad keys.
2012-08-29 01:40:57 +02:00
Ronald Oussoren
cb460b920f
Fix issue 13370: Ensure that ctypes works on Mac OS X when Python is
...
compiled using the clang compiler
(merge from 3.2)
2012-08-25 11:24:00 +02:00
Ronald Oussoren
25437565f9
Fix issue 13370: Ensure that ctypes works on Mac OS X when Python is compiled using the clang compiler
2012-08-25 11:19:14 +02:00
Mark Dickinson
fc33d4ce0a
Issue #15544 : Fix Decimal.__float__ to work with payload-carrying NaNs.
2012-08-24 18:53:10 +01:00
Ross Lagerwall
a4b070102a
Merge with 3.2
2012-08-24 13:32:14 +02:00
Ross Lagerwall
f2b34b8b96
Issue 15777: Fix a refleak in _posixsubprocess.
...
It was exposed by 03c98d05b140 and dbbf3ccf72e8.
2012-08-24 13:25:59 +02:00
Stefan Krah
66e63170d9
Issue #15770 : Check invalid arguments in test function. Patch by Victor Stinner.
2012-08-23 15:53:45 +02:00
Stefan Krah
f21587e3a8
mpd_qpowmod(): calculate result with zero-exponent for compatibility with
...
decimal.py. The hack to remove the ideal exponent is no longer required.
2012-08-23 15:05:29 +02:00
Stefan Krah
17183a2972
Use zero bottom margin.
2012-08-22 19:28:12 +02:00
Stefan Krah
ad5b43995e
In the 32-bit build, dec_hash() raised InvalidOperation if the operand
...
had a coefficient with MAX_PREC=425000000 digits and a negative exponent.
Increasing the context limits above the official values fixes the issue
and is safe (in this case!).
2012-08-22 19:11:50 +02:00
Stefan Krah
2fd502f6a1
1) Use _mpd_basedivmod() regardless of the length of the dividend. This is
...
required for a corner case in dec_hash() in the following commit and also
usually faster. dec_hash() needs some extra precision above MPD_MAX_PREC,
and _mpd_base_ndivmod() is not audited for that.
2) Use _mpd_basemul() if the length of the smaller operand is less than
or equal to 256. While this is technically an optimization, it is
required for *testing* corner cases in dec_hash() in reasonable time.
2012-08-22 18:54:37 +02:00
Ronald Oussoren
9bd9cd3fb9
Fix for issue 15716: interpreter could crash when PYTHONEXECUTABLE was set on Mac OS X.
...
This is due to an off-by-one error: the allocated buffer didn't have room for a NUL
character at the end of the mbstowcs result.
(merge with 3.2)
2012-08-22 14:40:35 +02:00
Ronald Oussoren
eb61f8b3a7
Fix for issue 15716: interpreter could crash when PYTHONEXECUTABLE was set on Mac OS X.
...
This is due to an off-by-one error: the allocated buffer didn't have room for a NUL
character at the end of the mbstowcs result.
2012-08-22 14:24:14 +02:00
Richard Oudkerk
6733927761
Fix typo in error handling for WaitForMultipleObjects()
2012-08-21 14:54:22 +01:00
Stefan Krah
c0c03be53e
Merge 3.2.
2012-08-20 14:42:59 +02:00
Stefan Krah
db579d7b25
Issue #15738 : Fix a missing NULL check in subprocess_fork_exec().
2012-08-20 14:36:47 +02:00
Stefan Krah
000fde9651
Closes #15737 : Fix potential NULL dereference in zipimport.c.
2012-08-20 14:14:49 +02:00
Mark Dickinson
35fa864840
Issue #15477 : Merge fix from 3.2
2012-08-18 12:26:15 +01:00
Mark Dickinson
05d79e9abf
Issue #15477 : Add workaround for log1p(-0.0) on platforms where it's broken.
2012-08-18 12:24:30 +01:00
Antoine Pitrou
721738fbee
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
...
Patch by Serhiy Storchaka.
2012-08-15 23:20:39 +02:00
Antoine Pitrou
6f430e4963
Issue #15604 : Update uses of PyObject_IsTrue() to check for and handle errors correctly.
...
Patch by Serhiy Storchaka.
2012-08-15 23:18:25 +02:00
Andrew Svetlov
c53eb9dfe2
Merge 3.2 to default
2012-08-14 18:42:10 +03:00
Matthias Klose
d182a6c77e
Modules/socketmodule.c: netdb_lock: define static.
2012-08-14 17:29:04 +02:00
Meador Inge
80dd1af4e0
Issue #15424 : Add a __sizeof__ implementation for array objects.
...
Patch by Ludwig Hähne.
2012-08-10 23:21:39 -05:00
Meador Inge
03b4d5072a
Issue #15424 : Add a __sizeof__ implementation for array objects.
...
Patch by Ludwig Hähne.
2012-08-10 22:35:45 -05:00
Victor Stinner
3cc635dabb
faulthandler: fix the handler of user signals
...
Restore the errno before calling the previous signal handler, and not after.
2012-08-09 02:43:41 +02:00
Larry Hastings
22701e86d0
Issue #15589 : Ensure double-alignment for brute-force capi argument parser test
...
that occasionally uses doubles.
2012-08-08 14:52:22 -07:00
Victor Stinner
62bb394729
Close #13072 : Restore code before the PEP 393 for the array module
...
'u' format of the array module uses again Py_UNICODE type for backward
compatibility with Python 3.2.
The only change from Python 3.2 is that PyUnicode_AsUnicode() result is now
checked for NULL value.
2012-08-06 00:46:05 +02:00
Antoine Pitrou
848698727f
Issue #12655 : Instead of requiring a custom type, os.sched_getaffinity and
...
os.sched_setaffinity now use regular sets of integers to represent the
CPUs a process is restricted to.
2012-08-04 16:16:35 +02:00
Victor Stinner
d1f9352bd4
(Merge 3.2) open() / TextIOWrapper doc: make it explicit than newline='\n'
...
doesn't translate newlines on output.
2012-08-04 01:22:07 +02:00
Victor Stinner
401e17d0f0
open() / TextIOWrapper doc: make it explicit than newline='\n' doesn't
...
translate newlines on output.
2012-08-04 01:18:56 +02:00
Antoine Pitrou
3c25dfbf13
Make TextIOWrapper's documentation clearer by copying the newline argument's description from open().
2012-08-04 00:56:19 +02:00
Antoine Pitrou
0c1c0d42dc
Make TextIOWrapper's documentation clearer by copying the newline argument's description from open().
2012-08-04 00:55:38 +02:00
Jesus Cea
1659b75189
MERGE: Closes #15469 : Correct __sizeof__ support for deque
2012-08-03 14:52:12 +02:00
Jesus Cea
16e2fca47e
Closes #15469 : Correct __sizeof__ support for deque
2012-08-03 14:49:42 +02:00
Jesus Cea
88ca04e6a8
MERGE: Closes #15512 : Correct __sizeof__ support for parser
2012-08-03 14:29:26 +02:00
Jesus Cea
e9c5318967
Closes #15512 : Correct __sizeof__ support for parser
2012-08-03 14:28:37 +02:00
Jesus Cea
5323173dee
Closes #15514 : Correct __sizeof__ support for cpu_set
2012-08-03 14:18:11 +02:00
Antoine Pitrou
77821b68a7
Issue #15538 : Fix compilation of the getnameinfo() / getaddrinfo() emulation code.
...
Patch by Philipp Hagemeister.
2012-08-02 20:39:10 +02:00
Antoine Pitrou
a9a53c7dc0
Issue #15538 : Fix compilation of the getnameinfo() / getaddrinfo() emulation code.
...
Patch by Philipp Hagemeister.
2012-08-02 20:37:12 +02:00
Victor Stinner
98a387b65f
Fix the user signal handler of faulthandler
...
Don't exit the tstate is NULL to restore the errno and chain the signal handler
if needed.
2012-08-01 19:36:36 +02:00
Antoine Pitrou
57911f6c1a
Issue #15489 : Add a __sizeof__ implementation for BytesIO objects.
...
Patch by Serhiy Storchaka.
2012-07-30 00:01:44 +02:00
Antoine Pitrou
8f328d0c1d
Issue #15489 : Add a __sizeof__ implementation for BytesIO objects.
...
Patch by Serhiy Storchaka.
2012-07-30 00:01:06 +02:00
Antoine Pitrou
a264384fe6
Issue #15487 : Add a __sizeof__ implementation for buffered I/O objects.
...
Patch by Serhiy Storchaka.
2012-07-29 19:04:57 +02:00
Antoine Pitrou
10f0c50a0b
Issue #15487 : Add a __sizeof__ implementation for buffered I/O objects.
...
Patch by Serhiy Storchaka.
2012-07-29 19:02:46 +02:00
Meador Inge
bb9b1c165d
Issue #15402 : Simplify Struct.__sizeof__ and make tests more precise.
2012-07-28 22:32:50 -05:00
Meador Inge
90bc2dbcce
Issue #15402 : Simplify Struct.__sizeof__ and make tests more precise.
2012-07-28 22:16:39 -05:00
Martin v. Löwis
ee365ac254
Issue #15431 : Declare PyImport_FrozenModules conditionally on Unix only.
2012-07-28 21:55:20 +02:00
Martin v. Löwis
96d97ec9c0
Issue #15431 : Add _freeze_importlib project to regenerate importlib.h on Windows.
...
Patch by Kristján Valur Jónsson.
2012-07-28 20:46:52 +02:00
Stefan Krah
b9e36b97f2
Add unused parameter to a couple of METH_NOARGS functions. The previous
...
form is used in many places in the source tree, but was found to be incorrect
in a recent tracker discussion.
2012-07-28 13:53:47 +02:00
Stefan Krah
7d12d9df13
Issue #12834 : Fix PyBuffer_ToContiguous() for non-contiguous arrays.
2012-07-28 12:25:55 +02:00
Antoine Pitrou
f3923e9dd7
Issue #15413 : os.times() had disappeared under Windows.
2012-07-24 21:23:53 +02:00
Meador Inge
9f65899d19
Issue #15402 : Add a __sizeof__ method to struct.Struct.
...
Initial patch by Serhiy Storchaka.
2012-07-23 10:22:36 -05:00
Meador Inge
b14d8c9bcf
Issue #15402 : Add a __sizeof__ method to struct.Struct.
...
Initial patch by Serhiy Storchaka.
2012-07-23 10:01:29 -05:00
Andrew Svetlov
80823d7ed7
#15094 : fix incorrectly placed #endif in _tkinter.c.
...
Patch by Serhiy Storchaka.
2012-07-22 13:56:54 +03:00
Eli Bendersky
7b31b1a2a4
Raise ImportError if pyexpat's version is incompatible
2012-07-21 20:32:39 +03:00
Eli Bendersky
ef391ac982
Raise ImportError if pyexpat's version is incompatible
2012-07-21 20:28:46 +03:00
Stefan Krah
26a1c7a905
Fix Visual Studio warning.
2012-07-20 12:34:18 +02:00
Jesus Cea
024abca053
MERGE: Closes #15395 : memory leaks in selectmodule.c
2012-07-19 21:32:07 +02:00
Jesus Cea
62a5c3216d
Closes #15395 : memory leaks in selectmodule.c
2012-07-19 21:31:26 +02:00
Jesus Cea
3cd346ae33
MERGE: Closes #15396 : memory leak in tkinter
2012-07-19 21:18:45 +02:00
Jesus Cea
ef86d12979
Closes #15396 : memory leak in tkinter
2012-07-19 21:18:07 +02:00
Meador Inge
7506dab2e8
Issue #6493 : Fix handling of c_uint32 bitfields with width of 32 on Windows.
2012-07-19 00:14:35 -05:00
Meador Inge
60c2266afe
Issue #6493 : Fix handling of c_uint32 bitfields with width of 32 on Windows.
2012-07-19 00:01:22 -05:00
Vinay Sajip
90db661b43
Closes #15307 : symlinks now work on OS X with framework Python builds. Patch by Ronald Oussoren.
2012-07-17 17:33:46 +01:00
Eli Bendersky
b48ff7fdda
Merge for #14988
2012-07-17 14:25:14 +03:00
Eli Bendersky
66099b0cdc
ISsue #14988 : restore Python 2's behavior of raising ImportError when unable to load pyexpat, instead of a SystemError/RuntimeError
2012-07-17 14:20:38 +03:00
Gregory P. Smith
7c6309c6af
Update the embedded copy of the expat XML parser to 2.1.0. It brings
...
with it a vareity of bug fixes, both security and behavior. See
http://www.libexpat.org/ for the list.
NOTE: I already backported the expat hash randomization fix in March.
Fixes issue #14340 .
2012-07-14 14:12:35 -07:00
Stefan Krah
e574402bd6
Issue #7652 : Clean up _mpd_qinvroot() and mark it LIBMPDEC_ONLY. Use the
...
algorithm from decimal.py for mpd_qsqrt().
2012-07-12 21:17:59 +02:00
Florent Xicluna
109d57358e
Issue #13248 : io: Remove obsolete argument "max_buffer_size" of BufferedWriter and BufferedRWPair.
2012-07-07 17:03:22 +02:00
Antoine Pitrou
7d7f40c613
Issue #15247 : FileIO now raises an error when given a file descriptor pointing to a directory.
2012-07-06 18:52:58 +02:00
Antoine Pitrou
9235b254dc
Issue #15247 : FileIO now raises an error when given a file descriptor pointing to a directory.
2012-07-06 18:48:24 +02:00
Richard Oudkerk
2240ac1eae
Issue #15261 : Stop os.stat(fd) crashing on Windows when fd not open.
2012-07-06 12:05:32 +01:00
Senthil Kumaran
f28fbabc7f
Fix issue # 15033 - Return the proper exitcode for failure when modules are invoked using -m switch. Patch contributed by Jeff Knupp
2012-07-04 19:33:45 -07:00
Senthil Kumaran
f01a337950
Fix issue # 15033 - Return the proper exitcode for failure when modules are invoked using -m switch. Patch contributed by Jeff Knupp
2012-07-04 19:28:16 -07:00
Stefan Krah
d57caf36bd
Remove ISSUES.txt.
2012-07-01 12:24:20 +02:00
doko@ubuntu.com
d4ea23f200
- Issue #15194 : check in the missing m4/ax_append_flag.m4 file.
...
Regenerate aclocalm4 and configure.
2012-07-01 01:08:20 +02:00
doko@ubuntu.com
49a7da30aa
- Issue #15194 : check in the missing m4/ax_check_compile_flag.m4 file.
...
Regenerate aclocalm4 and configure.
2012-07-01 00:37:47 +02:00
doko@ubuntu.com
cc5addd3b6
- Issue #14330 : Don't derive the include and library search dirs
...
from GCC for native builds
2012-07-01 00:23:51 +02:00
doko@ubuntu.com
b14168d64a
null merge
2012-06-30 22:36:12 +02:00
doko@ubuntu.com
36f98051af
- Regenerate the libffi configure file
2012-06-30 22:35:52 +02:00
Stefan Krah
5431e30853
After 79d2eb29c755 it is no longer necessary to zero the output array:
...
None of the _mpd_shortadd() or _mpd_shortmul() functions read uninitialized
values. Previously zeroing was required since _mpd_real_size() was called
on the output array.
2012-06-30 21:57:49 +02:00
Stefan Krah
c35a8e5c98
Proactive reliability fix for broken FPUs: The base conversion functions
...
use log10() to calculate the size of the output array. The current code
has been tested on x86/amd64 (and to a lesser extent on qemu-mips qemu-sparc)
and produces sufficiently large values for all inputs tested so far (coefficient
sizes of 10**18 - 1 are hard to test exhaustively).
The new code does not rely on the correctness of log10() and resizes
the output arrays if the allocated space is insufficient.
2012-06-30 18:05:33 +02:00
Antoine Pitrou
802d669044
Issue #5067 : improve some json error messages.
...
Patch by Serhiy Storchaka.
2012-06-29 01:59:54 +02:00
Antoine Pitrou
2d24e94bbe
Issue #5067 : improve some json error messages.
...
Patch by Serhiy Storchaka.
2012-06-29 01:58:26 +02:00
Victor Stinner
591c1cca32
Remove dead code
...
os.urandom() has now one unique implementation, posix_urandom() which
calls _PyOS_URandom(). _PyOS_URandom() uses RAND_pseudo_bytes() on VMS.
2012-06-28 01:45:48 +02:00
Matthias Klose
c02be613cc
- whitespace-normalize libffi file
2012-06-26 17:59:32 +02:00
doko@ubuntu.com
2a918768f1
- Issue #15194 : Update libffi to the 3.0.11 release.
2012-06-26 17:56:44 +02:00
Georg Brandl
969288e488
Use ValueError, not RuntimeError for a utime flag combination illegal on some systems.
2012-06-26 09:25:44 +02:00
Brett Cannon
0b1b9ce494
If main() is called and an argument cannot be decoded, make sure to
...
free the copy of the command-line.
Found using Clang's static analyzer.
2012-06-25 16:25:28 -04:00
Antoine Pitrou
0ab5cf9b46
Issue #15181 : importlib bytecode is unsigned and shouldn't have negative numbers.
...
This fixes a compiler warning with suncc.
2012-06-25 17:32:43 +02:00
Stefan Krah
1edab78859
Update test script to Visual Studio 2010.
2012-06-25 14:41:37 +02:00
Larry Hastings
fdaea06d3c
Issue #15176 : Clarified behavior, documentation, and implementation
...
of os.listdir().
2012-06-25 04:42:23 -07:00
Larry Hastings
48986d68c2
Minor grammar refinement for hmac.compare_digest().
2012-06-25 00:59:34 -07:00
Georg Brandl
db99dd0605
Small wording update from Larry.
2012-06-24 16:15:46 +02:00
Georg Brandl
a1bc35f07f
Improve hmac.compare_digest() docstring and documentation, courtesy of Larry H.
2012-06-24 16:07:33 +02:00
Stefan Krah
39e810eb6c
Make the benchmark more fair for _decimal/decimal.py by setting context.prec
...
only once (float obviously doesn't set any context at all).
2012-06-24 14:10:49 +02:00
Georg Brandl
f78755968a
Whitespace cleanup.
2012-06-24 13:58:31 +02:00
Georg Brandl
9dcbfc353d
Remove unused variable.
2012-06-24 13:55:35 +02:00
Georg Brandl
93b7d7e4b9
Fix a refleak in c82451eeb595.
2012-06-24 13:54:51 +02:00
Christian Heimes
6cea65555c
Issue #15061 : Re-implemented hmac.compare_digest() in C
2012-06-24 13:48:32 +02:00
Larry Hastings
605a62ddb1
Issue #15118 : Change return value of os.uname() and os.times() from
...
plain tuples to immutable iterable objects with named attributes
(structseq objects).
2012-06-24 04:33:36 -07:00
Georg Brandl
306336bcda
Closes #15161 : add support for giving path as a fd for truncate() and pathconf().
2012-06-24 12:55:33 +02:00
Stefan Krah
78f075636c
Speed up _decimal by another 10-15% by caching the thread local context
...
that was last accessed. In the pi benchmark (64-bit platform, prec=9),
_decimal is now only 1.5x slower than float.
2012-06-24 12:20:03 +02:00
Larry Hastings
d60cd4295c
Issue #14815 : Bugfix: the PyLong fed into the seed generator must be unsigned.
2012-06-24 02:52:21 -07:00
Larry Hastings
49c15d4a5f
Issue #14815 : Use Py_ssize_t instead of long for the object hash, to
...
preserve all 64 bits of hash on Win64.
2012-06-24 01:54:21 -07:00
Gregory P. Smith
990a5feba7
Fixes issue #12268 : File readline, readlines and read() or readall() methods
...
no longer lose data when an underlying read system call is interrupted.
IOError is no longer raised due to a read system call returning EINTR
from within these methods.
2012-06-24 00:23:47 -07:00
Gregory P. Smith
5135992164
Fixes issue #12268 : File readline, readlines and read() or readall() methods
...
no longer lose data when an underlying read system call is interrupted.
IOError is no longer raised due to a read system call returning EINTR
from within these methods.
2012-06-23 23:55:39 -07:00
Larry Hastings
b698d8e7e9
Issue #15154 : Add "dir_fd" parameter to os.rmdir, remove "rmdir"
...
parameter from os.remove / os.unlink.
Patch written by Georg Brandl. (I'm really looking forward to George
getting commit privileges so I don't have to keep doing checkins on his
behalf.)
2012-06-23 16:55:07 -07:00
Antoine Pitrou
766a16efe7
Fix test_re failure under Windows.
2012-06-23 14:17:39 +02:00
Georg Brandl
5bb7aa986e
Try to fix shutil.which() tests on Windows by fixing a typo introduced in 27f9c26fdd8b in posix_access().
2012-06-23 12:48:40 +02:00
Charles-François Natali
f8f5237b2f
Remove useless test (flowinfo is unsigned).
2012-06-23 10:26:54 +02:00
Charles-François Natali
9b0c006eb0
Remove useless test (flowinfo is unsigned).
2012-06-23 10:17:05 +02:00
Larry Hastings
dbbc0c8bb3
Issue #14626 : Fix buildbot issue on OpenIndiana 3.x machines. (Hopefully.)
2012-06-22 19:50:21 -07:00
Larry Hastings
67cbf7bff9
Issue #14626 : Fix buildbot issue on x86 Tiger 3.x.
2012-06-22 17:06:48 -07:00
Larry Hastings
9cf065cfdc
Issue #14626 : Large refactoring of functions / parameters in the os module.
...
Many functions now support "dir_fd" and "follow_symlinks" parameters;
some also support accepting an open file descriptor in place of of a path
string. Added os.support_* collections as LBYL helpers. Removed many
functions only previously seen in 3.3 alpha releases (often starting with
"f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka;
implemented by Larry Hastings.
2012-06-22 16:30:09 -07:00
Stefan Krah
3077ab8237
Whitespace.
2012-06-23 00:31:04 +02:00
Alexander Belopolsky
93c9cd07b6
Issue #9527 : tm_gmtoff has 'correct' sign.
2012-06-22 16:04:19 -04:00
Antoine Pitrou
5f6213be2d
Merge
2012-06-22 21:13:34 +02:00
Antoine Pitrou
f7338f65fb
Add forgotten files for #14837 .
2012-06-22 21:12:59 +02:00
Antoine Pitrou
3b36fb1f53
Issue #14837 : SSL errors now have `library` and `reason` attributes describing precisely what happened and in which OpenSSL submodule.
...
The str() of a SSLError is also enhanced accordingly.
NOTE: this commit creates a reference leak. The leak seems tied to the
use of PyType_FromSpec() to create the SSLError type. The leak is on the
type object when it is instantiated:
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
35
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
36
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
37
2012-06-22 21:11:52 +02:00
Kristjan Valur Jonsson
69cf913ba1
Issue #15124 : Optimize _thread.LockType deletion and acquisition when
...
not contested, similar to what _thread.RLock already has.
2012-06-22 18:40:02 +00:00
Alexander Belopolsky
878054e97b
Fixed compiler warnings in datetime_astimezone()
2012-06-22 14:11:58 -04:00
Alexander Belopolsky
31227ca514
Issue #9527 : Fixes for platforms without tm_zone
2012-06-22 13:23:21 -04:00
Jesus Cea
9436361e4c
Closes #10142 : Support for SEEK_HOLE/SEEK_DATA
2012-06-22 18:32:07 +02:00
Alexander Belopolsky
fdc860f310
Issue #9527 : datetime.astimezone() method will now supply a class
...
timezone instance corresponding to the system local timezone when
called with no arguments.
2012-06-22 12:23:23 -04:00
Larry Hastings
8f904daee9
Issue #14769 : test_capi now has SkipitemTest, which cleverly checks
...
for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
function skipitem() for all possible "format units".
2012-06-22 03:56:29 -07:00
Hynek Schlawack
7f59fd7c7c
Simplify code in fileio_init
...
If an identical code line is in both at the end of if and else, it can as well
stand after the block. :) The code is from 464cf523485e, I didn't see it before
checking the commits in the web interface of course.
2012-06-22 09:32:22 +02:00
Nadeem Vawda
2180c97a00
Document the rest of zlib.compressobj()'s arguments.
...
Original patch by Jim Jewett; see issue 14684.
2012-06-22 01:40:49 +02:00
Nadeem Vawda
cf5e1d82e3
Tidy up comments from dd4f7d5c51c7 (zlib compression dictionary support).
2012-06-22 00:35:57 +02:00
Nadeem Vawda
a425c3d5a2
Make lzma.{encode,decode}_filter_properties private.
...
These functions were originally added to support LZMA compression in the zipfile
module, and are not of interest for the majority of users.
They can be made public in 3.4 if there is user interest, but in the meanwhile,
I've opted to present a smaller, simpler API for the module's initial release.
2012-06-21 23:36:48 +02:00
Hynek Schlawack
69168354c2
#10053 : Don't close FDs when FileIO.__init__ fails
...
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:58:31 +02:00
Hynek Schlawack
9ed8b4e4ca
#10053 : Don't close FDs when FileIO.__init__ fails
...
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:20:25 +02:00
doko@ubuntu.com
c2b4673ffe
md5_{init,process,done}: make static
2012-06-21 17:26:06 +02:00
doko@ubuntu.com
1e5be8cfb5
sha1_{init,process,done}: make static
2012-06-21 17:05:50 +02:00
doko@ubuntu.com
1e3398a50c
... and fix the name of the sha1 file name.
2012-06-21 16:22:15 +02:00
doko@ubuntu.com
dca7303ff5
Fix name of the sha1 extension.
2012-06-21 16:00:52 +02:00
doko@ubuntu.com
0684a9d146
Remove references to removed md5.h and md5.c files.
2012-06-21 12:13:35 +02:00
Nadeem Vawda
fd8a838d58
Issue #14684 : Add support for predefined compression dictionaries to the zlib module.
...
Original patch by Sam Rushing.
2012-06-21 02:13:12 +02:00
Stefan Krah
50b0a365ba
Fix comment.
2012-06-20 23:38:51 +02:00
Stefan Krah
22385011ed
Many cleanups of redundant code in mpd_qrem_near():
...
1) _mpd_qdivmod() uses the context precision only in two places, and
the new code should be exactly equivalent to the previous code.
2) Remove misleading comment.
3) The quotient *is* an integer with exponent 0, so calling mpd_qtrunc()
is pointless.
4) Replace two instances of identical code by a single one.
5) Use _mpd_cmp_abs() instead of mpd_cmp_total_mag(): the operands
are not special.
6) Don't clear MPD_Rounded in the status (with the current code it should
not be set within the function).
2012-06-20 23:34:58 +02:00
Antoine Pitrou
e67f48ce5e
Issue #14928 : Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h.
2012-06-19 22:29:35 +02:00
Stefan Krah
9c1feb88f3
Add comments to the power functions, in particular to _mpd_qpow_real().
2012-06-18 19:57:23 +02:00
Martin v. Löwis
bce166681c
Issue #14055 : Add __sizeof__ support to _elementtree.
2012-06-17 10:41:22 +02:00
Stefan Krah
c62bd13cb2
1) State the relative errors of the power functions for integer exponents.
...
2) _mpd_qpow_mpd(): Abort the loop for all specials, not only infinity.
3) _mpd_qpow_mpd(): Make the function more general and distinguish between
zero clamping and folding down the exponent. The latter case is currently
handled by setting context->clamp to 0 before calling the function.
4) _mpd_qpow_int(): Add one to the work precision in case of a negative
exponent. This is to get the same relative error (0.1 * 10**-prec)
for both positive and negative exponents. The previous relative
error for negative exponents was (0.2 * 10**-prec).
Both errors are _before_ the final rounding to the context precision.
2012-06-16 19:45:35 +02:00
Alexander Belopolsky
0831382d69
Issue #15006 : Allow equality comparison between naive and aware time
...
or datetime objects.
2012-06-15 20:19:47 -04:00
Eli Bendersky
113da64259
Fix windows compilation problems caused by previous commit.
2012-06-15 07:52:49 +03:00
Eli Bendersky
64d11e60f2
Replace the iter/itertext methods of Element in _elementtree with true C implementations, instead of the bootstrapped Python code. In addition to being cleaner (removing the last remains of the bootstrapping code in _elementtree), this gives a 10x performance boost for iter() on large documents.
...
Also reorganized the tests a bit to be more robust.
2012-06-15 07:42:50 +03:00
Martin v. Löwis
bc07cb883e
Issue #14936 : curses_panel was converted to PEP 3121 and PEP 384 API.
...
Patch by Robin Schreiber.
2012-06-14 16:01:23 +02:00
Martin v. Löwis
c838ec1f82
Issue #14936 : curses_panel was converted to PEP 3121 API.
...
Patch by Robin Schreiber.
2012-06-14 16:00:24 +02:00
Alexander Belopolsky
c142bba2a7
Issue #1667546 : On platforms supporting tm_zone and tm_gmtoff fields
...
in struct tm, time.struct_time objects returned by time.gmtime(),
time.localtime() and time.strptime() functions now have tm_zone and
tm_gmtoff attributes. Original patch by Paul Boddie.
2012-06-13 22:15:26 -04:00