Benjamin Peterson
4fb01ffe66
backout 0fb7789b5eeb for test breakage ( #20578 )
2014-06-07 23:18:12 -07:00
Benjamin Peterson
10e847bbc7
add BufferedIOBase.readinto1 ( closes #20578 )
...
Patch by Nikolaus Rath.
2014-06-07 20:06:48 -07:00
Victor Stinner
ef7f140366
All modern compilers provide a offsetof() function
...
offsetof() is used directly in many other .c files without any issue.
2014-06-03 18:45:05 +02:00
Victor Stinner
d8f0d922d5
Issue #21233 : Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" to
...
make sure that the code using it will be adapted for the new "calloc" field
(instead of crashing).
2014-06-02 21:57:10 +02:00
Victor Stinner
aa0e7afa43
Issue #21639 : Fix a division by zero in tracemalloc on calloc(0, 0). The
...
regression was introduced recently with the introduction of the new "calloc"
functions (PyMem_RawCalloc, PyMem_Calloc, PyObject_Calloc).
Add also a unit test to check for the non-regression.
2014-06-02 21:40:22 +02:00
Victor Stinner
38d65dff7c
(Merge 3.4) Issue #21639 : Fix name of _testcapi test functions
2014-06-02 21:29:28 +02:00
Victor Stinner
797bcb51d0
Issue #21639 : Fix name of _testcapi test functions
2014-06-02 21:29:07 +02:00
Ned Deily
8f794eef9b
Issue #17095 : Fix Modules/Setup *shared* support.
...
Original patch by Thomas Wouters.
2014-06-02 01:15:32 -07:00
Ned Deily
b166191886
Issue #17095 : Fix Modules/Setup *shared* support.
...
Original patch by Thomas Wouters.
2014-06-02 01:05:29 -07:00
Gregory P. Smith
45f31d1492
merge the end_fd comment fix and explicit wait() for the child.
2014-06-01 13:47:34 -07:00
Gregory P. Smith
a26987a0a5
Fix the comment to not refer to the removed end_fd parameter.
2014-06-01 13:46:36 -07:00
Gregory P. Smith
3fe9e8d5a5
Don't restrict ourselves to a "max" fd when closing fds before exec()
...
when we have a way to get an actual list of all open fds from the OS.
Fixes issue #21618 : The subprocess module would ignore fds that were
inherited by the calling process and already higher than POSIX resource
limits would otherwise allow. On systems with a functioning /proc/self/fd
or /dev/fd interface the max is now ignored and all fds are closed.
2014-06-01 13:22:12 -07:00
Gregory P. Smith
d4dcb70287
Don't restrict ourselves to a "max" fd when closing fds before exec()
...
when we have a way to get an actual list of all open fds from the OS.
Fixes issue #21618 : The subprocess module would ignore fds that were
inherited by the calling process and already higher than POSIX resource
limits would otherwise allow. On systems with a functioning /proc/self/fd
or /dev/fd interface the max is now ignored and all fds are closed.
2014-06-01 13:18:28 -07:00
Serhiy Storchaka
1753d2255e
Issue #21552 : Fixed possible integer overflow of too long string lengths in
...
the tkinter module on 64-bit platforms.
2014-05-30 14:25:22 +03:00
Serhiy Storchaka
79851d755b
Issue #21552 : Fixed possible integer overflow of too long string lengths in
...
the tkinter module on 64-bit platforms.
2014-05-30 14:24:03 +03:00
Serhiy Storchaka
9e7cbda1ef
Issue #3015 : _tkinter.create() now creates tkapp object with wantobject=1 by
...
default.
2014-05-28 16:57:55 +03:00
Serhiy Storchaka
3fc6d80fb1
Issue #10203 : sqlite3.Row now truly supports sequence protocol. In particulr
...
it supports reverse() and negative indices. Original patch by Claudiu Popa.
2014-05-28 13:00:59 +03:00
Serhiy Storchaka
47a981337a
Issue #10203 : sqlite3.Row now truly supports sequence protocol. In particulr
...
it supports reverse() and negative indices. Original patch by Claudiu Popa.
2014-05-28 12:58:34 +03:00
Raymond Hettinger
62f4dad816
Issue 21137: Better repr for threading.Lock()
2014-05-25 18:22:35 -07:00
Antoine Pitrou
ded3c1b837
Cleanup other stats formatting code in gcmodule.c
2014-05-24 19:24:40 +02:00
Antoine Pitrou
40f6b121c5
Issue #21555 : simplify code in gcmodule.c by using the pytime.h functions instead of trying to call time.time() via the C API.
...
Patch by Geoffrey Spear.
2014-05-24 19:21:53 +02:00
Charles-François Natali
644b8f52a8
Issue #21455 : Add a default backlog to socket.listen().
2014-05-22 19:45:39 +01:00
Serhiy Storchaka
2b00c4999d
Issue #21525 : Most Tkinter methods which accepted tuples now accept lists too.
2014-05-21 17:12:21 +03:00
Raymond Hettinger
507d997714
Add comment and make minor code clean-up to improve clarity.
2014-05-18 21:32:40 +01:00
Benjamin Peterson
da89123bd6
merge 3.4 ( #10744 )
2014-05-17 15:07:34 -07:00
Benjamin Peterson
5eb6b39210
support pep 3118 format strings for ctypes objects with nontrivial shapes ( closes #10744 )
...
Patch by Matti Picus.
2014-05-17 14:59:12 -07:00
Serhiy Storchaka
2e03a0a8a7
Issue #20998 : Fixed re.fullmatch() of repeated single character pattern
...
with ignore case. Original patch by Matthew Barnett.
2014-05-14 21:51:37 +03:00
Serhiy Storchaka
429b59ec69
Issue #20998 : Fixed re.fullmatch() of repeated single character pattern
...
with ignore case. Original patch by Matthew Barnett.
2014-05-14 21:48:17 +03:00
Victor Stinner
45e8e2f218
Issue #21490 : Add new C macros: Py_ABS() and Py_STRINGIFY()
...
Keep _Py_STRINGIZE() in PC/pyconfig.h to not introduce a dependency between
pyconfig.h and pymacros.h.
2014-05-14 17:24:35 +02:00
Victor Stinner
79b49ab553
(Merge 3.4) Issue #21497 : faulthandler functions now raise a better error if
...
sys.stderr is None: RuntimeError("sys.stderr is None") instead of
AttributeError("'NoneType' object has no attribute 'fileno'").
2014-05-14 17:16:58 +02:00
Victor Stinner
e2d66903e8
Issue #21497 : faulthandler functions now raise a better error if sys.stderr is
...
None: RuntimeError("sys.stderr is None") instead of AttributeError("'NoneType'
object has no attribute 'fileno'").
2014-05-14 17:15:50 +02:00
Victor Stinner
a57dfd033c
Issue #21488 : Add support of keyword arguments for codecs.encode and codecs.decode
2014-05-14 17:13:14 +02:00
Victor Stinner
e1e04ad8aa
Backed out changeset 6ceedbd88b5f
2014-05-14 17:12:27 +02:00
Victor Stinner
b78c448f4b
Issue #21488 : Add support of keyword arguments for codecs.encode and codecs.decode
2014-05-14 17:10:45 +02:00
Benjamin Peterson
89aea5075e
merge 3.4
2014-05-11 16:17:34 -07:00
Benjamin Peterson
23a192d963
use logical rather than bit and
2014-05-11 16:17:02 -07:00
Raymond Hettinger
234fb2d503
Issue 21424: Apply the nlargest() optimizations to nsmallest() as well.
2014-05-11 14:21:23 -07:00
Raymond Hettinger
277842eff1
Issue #21424 : Optimize heaqp.nlargest() to make fewer tuple comparisons.
...
Consolidates the logic for nlargest() into a single function so that
decoration tuples (elem,order) or (key, order, elem) only need to
be formed when a new element is added to the heap. Formerly, a tuple
was created for every element regardless of whether it was added to
the heap.
The change reduces the number of tuples created, the number of ordering
integers created, and total number of tuple comparisons.
2014-05-11 01:55:46 -07:00
Tim Peters
983c1065fe
Merge from 3.4.
...
Issue #21435 : Segfault in gc with cyclic trash
Changed the iteration logic in finalize_garbage() to tolerate objects vanishing
from the list as a side effect of executing a finalizer.
2014-05-08 17:43:25 -05:00
Tim Peters
5fbc7b12f7
Issue #21435 : Segfault in gc with cyclic trash
...
Changed the iteration logic in finalize_garbage() to tolerate objects vanishing
from the list as a side effect of executing a finalizer.
2014-05-08 17:42:19 -05:00
Antoine Pitrou
38ca5a7b6d
Issue #21396 : Fix TextIOWrapper(..., write_through=True) to not force a flush() on the underlying binary stream.
...
Patch by akira.
2014-05-09 00:31:32 +02:00
Antoine Pitrou
c644e7c39f
Issue #21396 : Fix TextIOWrapper(..., write_through=True) to not force a flush() on the underlying binary stream.
...
Patch by akira.
2014-05-09 00:24:50 +02:00
Tim Golden
0321cf2550
Issue18314 Allow unlink to remove junctions. Includes support for creating junctions. Patch by Kim Gräsman
2014-05-05 19:46:17 +01:00
Larry Hastings
f19a400714
Issue #21088 : Merge from 3.4.
2014-05-04 04:45:57 -07:00
Larry Hastings
9147a9697a
Issue #21088 : Bugfix for curses.window.addch() regression in 3.4.0.
...
In porting to Argument Clinic, the first two arguments were reversed.
2014-05-04 04:41:18 -07:00
Raymond Hettinger
90e9338383
Neaten-up a bit add add missing size change check.
2014-05-03 18:45:54 -07:00
Raymond Hettinger
871620d951
Simplify and speedup the internals of the heapq module.
2014-05-03 18:36:48 -07:00
Raymond Hettinger
4b0b1accb5
Issue #21101 : Eliminate double hashing in the C code for collections.Counter().
2014-05-03 16:41:19 -07:00
Raymond Hettinger
1b5eebcfa3
merge
2014-05-03 15:26:17 -07:00
Raymond Hettinger
c9926088dd
Issue 21375: Fix possible Py_ssizet overflow in heapq.
2014-05-03 15:22:07 -07:00
Victor Stinner
db067af12a
Issue #21233 : Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),
...
PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) and bytearray(int) are now
using ``calloc()`` instead of ``malloc()`` for large objects which is faster
and use less memory (until the bytearray buffer is filled with data).
2014-05-02 22:31:14 +02:00
Stefan Krah
6b7786bac2
Use $type instead of $cls in the signature specification.
2014-05-02 14:34:11 +02:00
Stefan Krah
5de1f82464
Issue #21407 : _decimal now supports function signatures.
2014-05-01 15:53:42 +02:00
Stefan Krah
8fb74a35da
Issue #21374 : Fix pickling of DecimalTuple.
2014-04-29 18:24:50 +02:00
Stefan Krah
f1d4e42195
Issue #21374 : Fix pickling of DecimalTuple.
2014-04-29 18:23:35 +02:00
Antoine Pitrou
32497f89bb
Issue #21321 : itertools.islice() now releases the reference to the source iterator when the slice is exhausted.
...
Patch by Anton Afanasyev.
2014-04-29 12:14:47 +02:00
Antoine Pitrou
26f82efe59
Issue #21321 : itertools.islice() now releases the reference to the source iterator when the slice is exhausted.
...
Patch by Anton Afanasyev.
2014-04-29 12:13:46 +02:00
Antoine Pitrou
b8503896ad
Issue #21057 : TextIOWrapper now allows the underlying binary stream's read() or read1() method to return an arbitrary bytes-like object (such as a memoryview).
...
Patch by Nikolaus Rath.
2014-04-29 10:14:02 +02:00
Antoine Pitrou
6999441d62
Issue #20355 : -W command line options now have higher priority than the PYTHONWARNINGS environment variable. Patch by Arfrever.
2014-04-29 00:56:08 +02:00
Tim Golden
fbf963c064
Backed out changeset: 17df50df62c7
2014-04-27 18:35:36 +01:00
Tim Golden
4675d798bf
Issue #18314 os.unlink will now remove junction points on Windows. Patch by Kim Gräsman.
2014-04-27 18:00:10 +01:00
Zachary Ware
420dc56014
Fix compiler warning on Windows
...
..\Modules\_testcapimodule.c(3320): warning C4098: 'matmulType_dealloc' : 'void' function returning a value
2014-04-23 13:51:27 -05:00
Raymond Hettinger
5402315626
Add implementation notes
2014-04-23 00:58:48 -07:00
doko@ubuntu.com
4a173bc4ed
Fixes for KFreeBSD and the Hurd:
...
- Issue #21274 : Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
- Issue #21276 : posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
- Issue #21275 : Fix a socket test on KFreeBSD.
2014-04-17 19:47:16 +02:00
Andrew Kuchling
764662020b
#15840 : make docs consistent by saying operations on closed files raise ValueError.
...
Patch by Caelyn McAulay.
Neither Caelyn nor I could find any cases in 2.7 or 3.4/5 where an
operation on a closed stream raised IOError; generally the C
implementations have a macro to check for the stream being closed, and
these macros all raised ValueError. If we find any, a new bug should
be opened.
2014-04-15 21:11:36 -04:00
doko@ubuntu.com
dc282134ee
- Merge 3.4
2014-04-17 19:49:00 +02:00
Andrew Kuchling
42a17fa4fd
Merge from 3.4
2014-04-15 21:21:56 -04:00
Gregory P. Smith
b396a2ab49
Add conditional code for android's lack of definition of SYS_getdent64.
...
Fixes issue20307. No Misc/NEWS entry because frankly this is an
esoteric platform for anyone to be figuring out how to cross compile
CPython for.
2014-04-14 13:31:55 -07:00
Gregory P. Smith
efeb9da4ae
Add conditional code for android's lack of definition of SYS_getdent64.
...
Fixes issue20307. No Misc/NEWS entry because frankly this is an
esoteric platform for anyone to be figuring out how to cross compile
CPython for.
2014-04-14 13:31:21 -07:00
Benjamin Peterson
f33201b6db
merge 3.4
2014-04-14 11:48:29 -04:00
Benjamin Peterson
70d92a96ab
merge 3.3
2014-04-14 11:48:21 -04:00
Benjamin Peterson
9beee049b0
merge 3.2
2014-04-14 11:46:51 -04:00
Benjamin Peterson
6ef2b36afa
disallow a negative idx parameter
2014-04-14 11:45:21 -04:00
Benjamin Peterson
79f3ef6336
merge 3.4
2014-04-13 22:32:12 -04:00
Benjamin Peterson
584f5cbf16
merge 3.3
2014-04-13 22:31:42 -04:00
Benjamin Peterson
156285c35f
merge 3.2
2014-04-13 22:28:16 -04:00
Benjamin Peterson
99b5afab74
in scan_once, prevent the reading of arbitrary memory when passed a negative index
...
Bug reported by Guido Vranken.
2014-04-13 22:10:38 -04:00
Mark Dickinson
5990d2864c
Issue #20539 : Improve math.factorial error messages and types for large inputs.
...
- Better message for the OverflowError in large positive inputs.
- Changed exception type from OverflowError to ValueError for large negative inputs.
2014-04-10 09:29:39 -04:00
Benjamin Peterson
d51374ed78
PEP 465: a dedicated infix operator for matrix multiplication ( closes #21176 )
2014-04-09 23:55:56 -04:00
Victor Stinner
d006af1899
Issue #21076 : the C signal module has been renamed to _signal
2014-04-04 16:30:04 +02:00
Brett Cannon
815a6f38a6
merge along w/ fix for issue #2107 (commit c9239171e429)
2014-04-04 10:20:28 -04:00
Giampaolo Rodola'
e09fb7198a
fix #21076 : turn signal module constants into enums
2014-04-04 15:34:17 +02:00
Ned Deily
090eb1fd18
Issue #6676 : merge from 3.4
2014-03-27 16:44:06 -07:00
Ned Deily
e7d532fbc9
Issue #6676 : Ensure a meaningful exception is raised when attempting
...
to parse more than one XML document per pyexpat xmlparser instance.
(Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with
suggested wording by David Gutteridge)
2014-03-27 16:39:58 -07:00
Victor Stinner
e3fb80fb76
(Merge 3.4) Issue #21036 : Fix typo in macro name
...
_PY_HASHTABLE_ENTRY_DATA => _Py_HASHTABLE_ENTRY_DATA
2014-03-24 22:36:01 +01:00
Victor Stinner
d9a7352348
Issue #21036 : Fix typo in macro name
...
_PY_HASHTABLE_ENTRY_DATA => _Py_HASHTABLE_ENTRY_DATA
2014-03-24 22:34:34 +01:00
Antoine Pitrou
39b7fce82d
Issue #21015 : SSL contexts will now automatically select an elliptic curve for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to "prime256v1".
...
(should also fix a buildbot failure introduced by #20995 )
2014-03-22 18:14:57 +01:00
Antoine Pitrou
0bebbc33fa
Issue #21015 : SSL contexts will now automatically select an elliptic curve for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to "prime256v1".
...
(should also fix a buildbot failure introduced by #20995 )
2014-03-22 18:13:50 +01:00
Vinay Sajip
a17d678098
Issue #10141 , Issue 20065: Merged from 3.4.
2014-03-21 11:45:27 +00:00
Vinay Sajip
ed6783f315
Issue #10141 , Issue 20065: Changed #if to take CAN_RAW into account.
2014-03-21 11:44:32 +00:00
Benjamin Peterson
ee6bdc07d6
remove the ability of datetime.time to be considered false ( closes #13936 )
2014-03-20 18:00:35 -05:00
Vinay Sajip
9f9f0e23a1
Merged from 3.4.
2014-03-20 12:43:50 +00:00
Vinay Sajip
ecfc98c67b
Issue #10141 : updated new usages of AF_CAN to be in #ifdef AF_CAN rather than #ifdef HAVE_LINUX_CAN_H to allow compilation on older Linuxes.
2014-03-20 12:42:42 +00:00
Victor Stinner
5782e25dfe
(Merge 3.4) Issue #12328 , #20978 : Add _winapi.WAIT_ABANDONED_0 symbol, needed
...
by multiprocessing.connection
2014-03-20 09:27:11 +01:00
Victor Stinner
373f0a925b
Isuse #12328 , #20978 : Add _winapi.WAIT_ABANDONED_0 symbol, needed by
...
multiprocessing.connection
2014-03-20 09:26:55 +01:00
Victor Stinner
b2bef62e91
Issue #19977 : Fix test_capi when LC_CTYPE locale is POSIX
2014-03-18 02:38:12 +01:00
Benjamin Peterson
fca286601b
merge 3.3 ( #20946 )
2014-03-16 11:30:54 -05:00
Benjamin Peterson
fda33559dc
fix ctypes test alignment assumptions ( closes #20946 )
...
Patch by Andreas Schwab.
2014-03-16 10:07:26 +01:00
Benjamin Peterson
466eaaa5d1
merge 3.3
2014-03-15 11:50:14 -05:00
Benjamin Peterson
c77e7a4f23
only define zero constant when it is used
2014-03-15 11:50:00 -05:00
Benjamin Peterson
ce68c19ee7
remove unused zero constants
2014-03-15 11:49:49 -05:00
Serhiy Storchaka
ccdf352370
Issue #20283 : RE pattern methods now accept the string keyword parameters
...
as documented. The pattern and source keyword parameters are left as
deprecated aliases.
2014-03-06 11:28:32 +02:00
Kristján Valur Jónsson
25dded041f
Make the various iterators' "setstate" sliently and consistently clip the
...
index. This avoids the possibility of setting an iterator to an invalid
state.
2014-03-05 13:47:57 +00:00
Serhiy Storchaka
a537eb45fd
Issue #20283 : RE pattern methods now accept the string keyword parameters
...
as documented. The pattern and source keyword parameters are left as
deprecated aliases.
2014-03-06 11:36:15 +02:00
Kristján Valur Jónsson
c5cc5011ac
Make the various iterators' "setstate" sliently and consistently clip the
...
index. This avoids the possibility of setting an iterator to an invalid
state.
2014-03-05 15:23:07 +00:00
Georg Brandl
2fc8f773e1
Issue #20404 : reject non-text encodings early in TextIOWrapper.
2014-03-02 09:18:31 +01:00
Victor Stinner
1ac42614e3
Issue #19748 : On AIX, time.mktime() now raises an OverflowError for year
...
outsize range [1902; 2037].
2014-02-21 09:27:17 +01:00
Victor Stinner
329e492570
Issue #20656 : Restore explicit downcast in select_select().
...
Cast from time_t (64 bit) to long (32 bit). It should fix a compiler warning.
2014-02-18 09:30:33 +01:00
Victor Stinner
5a8e5796f1
Close #20656 : Fix select.select() on OpenBSD 64-bit
2014-02-18 01:35:40 +01:00
Victor Stinner
3c1b379ebd
Issue #20320 : select.select() and select.kqueue.control() now round the timeout
...
aways from zero, instead of rounding towards zero.
It should make test_asyncio more reliable, especially test_timeout_rounding() test.
2014-02-17 00:02:43 +01:00
Benjamin Peterson
ec91cd6040
merge backout for #20621
2014-02-16 14:17:28 -05:00
Benjamin Peterson
eb43736de2
backout 2807a5f011e4 for causing #20621
2014-02-16 14:12:57 -05:00
Benjamin Peterson
c20b4d872d
backout d28242a636c7 so I can backout 2807a5f011e4
2014-02-16 14:11:56 -05:00
Andrew Kuchling
c77974e033
Merge from 3.3
2014-02-16 12:18:17 -05:00
Andrew Kuchling
3137885c36
#12211 : remove paragraph about NaNs
2014-02-16 12:09:35 -05:00
Andrew Kuchling
87a113b807
Merge from 3.3
2014-02-16 11:15:13 -05:00
Andrew Kuchling
8cb1ec3274
#12211 : clarify math.copysign() documentation and docstring
2014-02-16 11:11:25 -05:00
Serhiy Storchaka
5bdfc51950
Issue #17671 : Fixed a crash when use non-initialized io.BufferedRWPair.
...
Based on patch by Stephen Tu.
2014-02-12 10:55:07 +02:00
Serhiy Storchaka
61e2493b83
Issue #17671 : Fixed a crash when use non-initialized io.BufferedRWPair.
...
Based on patch by Stephen Tu.
2014-02-12 10:52:35 +02:00
Benjamin Peterson
e18e787e70
merge 3.3 ( #20594 )
2014-02-11 10:19:12 -05:00
Benjamin Peterson
932bba33f2
avoid name clash with posix_close ( closes #20594 )
2014-02-11 10:16:16 -05:00
Larry Hastings
b082731fbb
Issue #20517 : Functions in the os module that accept two filenames
...
now register both filenames in the exception on failure.
This required adding new C API functions allowing OSError exceptions
to reference two filenames instead of one.
2014-02-09 22:05:19 -08:00
Serhiy Storchaka
dfe98a102e
Issue #20437 : Fixed 22 potential bugs when deleting objects references.
2014-02-09 13:46:20 +02:00
Serhiy Storchaka
505ff755d7
Issue #20437 : Fixed 21 potential bugs when deleting objects references.
2014-02-09 13:33:53 +02:00
Larry Hastings
2623c8c23c
Issue #20530 : Argument Clinic's signature format has been revised again.
...
The new syntax is highly human readable while still preventing false
positives. The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
2014-02-08 22:15:29 -08:00
Charles-François Natali
b4062e8f8a
Issue #20065 : socketmodule: Fix build error when AF_CAN is defined without the
...
proper CAN headers.
2014-02-08 22:54:11 +01:00
Charles-François Natali
4025ac7549
Issue #20065 : socketmodule: Fix build error when AF_CAN is defined without the
...
proper CAN headers.
2014-02-08 22:54:48 +01:00
Ned Deily
93db29b5c1
Issue #20374 : merge
2014-02-05 17:03:42 -08:00
Ned Deily
22d415cf19
Issue #20374 : delete spurious empty line
2014-02-05 17:02:29 -08:00
Ned Deily
4b104abdc9
Issue #20374 : merge
2014-02-05 16:55:20 -08:00
Ned Deily
7b9ddea80b
Issue #20374 : Avoid compiler warnings when compiling readline with libedit.
2014-02-05 16:53:10 -08:00
Serhiy Storchaka
54c1391ba9
Issue #20489 : Explicitly qualified expressions for default values in methods.
2014-02-05 13:34:01 +02:00
Christian Heimes
25ff287dd7
Issue #20515 : Fix NULL pointer dereference introduced by issue #20368
...
CID 1167595
2014-02-05 00:29:48 +01:00
Christian Heimes
d33491ea76
Issue #20515 : Fix NULL pointer dereference introduced by issue #20368
...
CID 1167595
2014-02-05 00:29:17 +01:00
Benjamin Peterson
e9e8907647
merge 3.3 ( #19186 )
2014-02-04 10:12:18 -05:00
Benjamin Peterson
091d017ab1
restore namespacing of pyexpat symbols ( closes #19186 )
2014-02-04 10:10:55 -05:00
Nick Coghlan
a9b15241c6
Close #20404 : blacklist non-text encodings in io.TextIOWrapper
...
- io.TextIOWrapper (and hence the open() builtin) now use the
internal codec marking system added for issue #19619
- also tweaked the C code to only look up the encoding once,
rather than multiple times
- the existing output type checks remain in place to deal with
unmarked third party codecs.
2014-02-04 22:11:18 +10:00
Martin v. Löwis
ca7b04644c
Issue #17162 : Add PyType_GetSlot.
2014-02-04 09:33:05 +01:00
Serhiy Storchaka
ce591c2868
Issue #20368 : The null character now correctly passed from Tcl to Python.
...
Improved error handling in variables-related commands.
2014-02-03 21:25:56 +02:00
Serhiy Storchaka
1317e14468
Issue #20368 : The null character now correctly passed from Tcl to Python.
...
Improved error handling in variables-related commands.
2014-02-03 21:24:07 +02:00
Benjamin Peterson
f045de4fc2
remove code which does nothing but cause refleaks
2014-02-03 09:35:08 -05:00
Larry Hastings
7726ac9163
#Issue 20456: Several improvements and bugfixes for Argument Clinic,
...
including correctly generating code for Clinic blocks inside C
preprocessor conditional blocks.
2014-01-31 22:03:12 -08:00
Victor Stinner
dd382ef8ec
Issue #20354 : Fix alignment issue in the tracemalloc module on 64-bit
...
platforms. Bug seen on 64-bit Linux when using "make profile-opt".
Only align the "frame_t" structure on 32-bit when Visual Studio is used. Before
the alignment to 32-bit was applied to the whole file any compiler supporting
"#pragma pack(4)" which includes GCC.
2014-02-01 03:43:58 +01:00
Brett Cannon
1088d98899
The function name for cmath.isinf in PyArg_ParseTuple() was wrong.
2014-01-31 12:04:36 -05:00
Larry Hastings
4205065f9b
Issue #20390 : Removing detritus from Argument Clinic "file preset" name change.
2014-01-31 05:59:48 -08:00
Victor Stinner
dcd9740ad2
Issue #20452 : select and selectors round (again) timeout away from zero for
...
poll and epoll
Improve also debug info to analyze the issue
2014-01-31 12:12:53 +01:00
Victor Stinner
91445fbeb0
overlapped.c: Fix usage of the union
...
* read_buffer can only be used for TYPE_READ and TYPE_ACCEPT types
* write_buffer can only be used for TYPE_WRITE type
2014-01-30 19:06:44 +01:00
Larry Hastings
581ee3618c
Issue #20326 : Argument Clinic now uses a simple, unique signature to
...
annotate text signatures in docstrings, resulting in fewer false
positives. "self" parameters are also explicitly marked, allowing
inspect.Signature() to authoritatively detect (and skip) said parameters.
Issue #20326 : Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
2014-01-28 05:00:08 -08:00
Serhiy Storchaka
3c1f0f1b42
Issue #20395 : Extract generated clinic code in Modules/_pickle.c to separate file.
2014-01-27 10:34:22 +02:00
Christian Heimes
c4ab9a4f1d
Issue #20394 : Attempt to silence CID 1164423: Division or modulo by zero in audioop_ratecv_impl()
...
Serhiy and I had the same idea so it's most likely right. ;)
2014-01-27 01:12:00 +01:00
Christian Heimes
936e2f36ad
Issue #20193 : Fix commit r6f217456b9ba by including clinic/zlibmodule.c.h instead
...
of zlibmodule.clinic.c
2014-01-27 01:06:57 +01:00
Christian Heimes
27ea78b352
silence compiler warning that 's' may be used uninitialized in the load function.
2014-01-27 01:03:53 +01:00
Serhiy Storchaka
2c5ddbe030
Issue #20193 : The zlib module now uses Argument Clinic.
2014-01-27 00:03:31 +02:00
Benjamin Peterson
b62deac9a3
cleanup after custom buffer converter
2014-01-26 10:41:58 -05:00
Benjamin Peterson
08673c57f0
fix refleak on error
2014-01-26 10:24:24 -05:00
Larry Hastings
f0537e8d1c
Issue #20390 : Final fix, for generating NoPositional/NoKeyword for __init__ calls.
2014-01-25 22:01:12 -08:00
Larry Hastings
f256c22f34
Fix for catestrophic errors in previous checkin (Argument Clinic rollup patch).
2014-01-25 21:30:37 -08:00
Larry Hastings
c20472640c
Issue #20390 : Small fixes and improvements for Argument Clinic.
2014-01-25 20:43:29 -08:00
Victor Stinner
38c72bd199
(Merge 3.3) Issue #20311 : Revert 033137c12d88 (02f9db3e684e),
...
select.epoll.poll() rounds again the timeout towards zero
2014-01-25 14:40:04 +01:00
Victor Stinner
933209689e
Issue #20311 : Revert 033137c12d88, select.epoll.poll() rounds again the timeout
...
towards zero
2014-01-25 14:37:50 +01:00
Serhiy Storchaka
98c779e8da
Issue #20193 : The _lzma module now uses Argument Clinic.
...
LZMACompressor.__init__ is left not converted.
2014-01-25 14:02:29 +02:00
Serhiy Storchaka
1bc4bb2af1
Issue #20193 : The _bz2 module now uses Argument Clinic.
2014-01-25 12:07:57 +02:00
Serhiy Storchaka
8d00d73249
Issue #20133 : The audioop module now uses Argument Clinic.
2014-01-25 11:57:59 +02:00
Serhiy Storchaka
12785617c8
Fixed converting errors in the binascii module (issue20151).
...
a2b_qp() now accepts keyword arguments.
All "ascii" parameters is renamed to "data" for consistancy with a2b_qp().
2014-01-25 11:49:49 +02:00
Serhiy Storchaka
3ffd913d66
Issue #20151 : The binascii module now uses Argument Clinic.
2014-01-25 11:21:23 +02:00
Benjamin Peterson
c3bf14d1eb
merge 3.3 ( #20374 )
2014-01-24 11:44:40 -05:00
Benjamin Peterson
f0b463ad84
new plan: just remove typecasts ( closes #20374 )
2014-01-24 11:44:16 -05:00
Larry Hastings
5c66189e88
Issue #20189 : Four additional builtin types (PyTypeObject,
...
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Benjamin Peterson
8f81c3cf3f
merge 3.3 ( #20374 )
2014-01-24 00:33:25 -05:00
Benjamin Peterson
5f6bf55965
use new readline function types ( closes #20374 )
2014-01-24 00:32:12 -05:00
Serhiy Storchaka
fe5fff6305
Issue #19936 : Restored executable bits for several libffi files.
...
These files have shebangs and executable bits in the libffi distribution.
2014-01-23 16:23:50 +02:00
Serhiy Storchaka
744135d7bb
Issue #19936 : Restored executable bits for several libffi files.
...
These files have shebangs and executable bits in the libffi distribution.
2014-01-23 16:22:55 +02:00
Larry Hastings
462582651c
Two minor Argument Clinic bugfixes: use the name of the class in the
...
docstring for __new__ and __init__, and always use "goto exit" instead of
returning "NULL" for failure to parse (as _new__ and __init__ return ints).
2014-01-22 03:05:49 -08:00
Victor Stinner
09354fd606
(Merge 3.3) Issue #20311 : select.epoll.poll() now rounds the timeout away from
...
zero, instead of rounding towards zero. For example, a timeout of one
microsecond is now rounded to one millisecond, instead of being rounded to
zero.
2014-01-21 01:42:11 +01:00
Victor Stinner
665486e0e7
Issue #20311 : select.epoll.poll() now rounds the timeout away from zero,
...
instead of rounding towards zero. For example, a timeout of one microsecond is
now rounded to one millisecond, instead of being rounded to zero.
2014-01-21 01:41:00 +01:00
Serhiy Storchaka
ab0ac27d24
Issue #20315 : Removed support for backward compatibility with early 2.x versions.
...
Removed backward compatibility alias curses.window.nooutrefresh which should
be removed in 2.3.
2014-01-20 21:35:06 +02:00
Serhiy Storchaka
7e52705ee3
Issue #20315 : Removed support for backward compatibility with early 2.x versions.
2014-01-20 21:29:31 +02:00
Larry Hastings
b7ccb20423
Issue #20294 : Argument Clinic now supports argument parsing for __new__ and
...
__init__ functions.
2014-01-18 23:50:21 -08:00
Benjamin Peterson
dc3cce077d
merge 3.3 ( #17811 )
2014-01-18 22:57:05 -05:00
Benjamin Peterson
e83ed43281
improve description of buffers argument for readv/writev ( closes #17811 )
...
Patch by Nikolaus Rath.
2014-01-18 22:54:59 -05:00
Larry Hastings
bebf73511a
Issue #20287 : Argument Clinic's output is now configurable, allowing
...
delaying its output or even redirecting it to a separate file.
2014-01-17 17:47:17 -08:00
Gregory P. Smith
83fed26953
avoid a compiler warning about assigning const char * to char *.
2014-01-17 12:09:05 -08:00
Gregory P. Smith
f34890937b
avoid a compiler warning about assigning const char * to char *.
2014-01-17 12:08:49 -08:00
Larry Hastings
2a727916c5
Issue #20226 : Major improvements to Argument Clinic.
...
* You may now specify an expression as the default value for a
parameter! Example: "sys.maxsize - 1". This support is
intentionally quite limited; you may only use values that
can be represented as static C values.
* Removed "doc_default", simplified support for "c_default"
and "py_default". (I'm not sure we still even need
"py_default", but I'm leaving it in for now in case a
use presents itself.)
* Parameter lines support a trailing '\\' as a line
continuation character, allowing you to break up long lines.
* The argument parsing code generated when supporting optional
groups now uses PyTuple_GET_SIZE instead of PyTuple_GetSize,
leading to a 850% speedup in parsing. (Just kidding, this
is an unmeasurable difference.)
* A bugfix for the recent regression where the generated
prototype from pydoc for builtins would be littered with
unreadable "=<object ...>"" default values for parameters
that had no default value.
* Converted some asserts into proper failure messages.
* Many doc improvements and fixes.
2014-01-16 11:32:01 -08:00
Serhiy Storchaka
18cc3da508
Issue #19936 : Remove executable bits from C source files and several forgotten
...
test files.
2014-01-16 18:50:53 +02:00
Serhiy Storchaka
7f470d0f9c
Issue #19936 : Remove executable bits from C source files and several forgotten
...
test files.
2014-01-16 18:48:45 +02:00
Serhiy Storchaka
8f8ec92de8
Issue #19936 : Added executable bits or shebang lines to Python scripts which
...
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface. Fixed
shebang lines in the unittestgui and checkpip scripts.
2014-01-16 17:33:23 +02:00
Serhiy Storchaka
b992a0e102
Issue #19936 : Added executable bits or shebang lines to Python scripts which
...
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface. Fixed
shebang line to use python3 executable in the unittestgui script.
2014-01-16 17:15:49 +02:00
Stefan Krah
7936c81d51
Merge from 3.3.
2014-01-16 14:43:22 +01:00
Stefan Krah
16540408f4
Issue #19936 : Disable shebang lines in order to prevent using a random
...
system python.
2014-01-16 14:33:27 +01:00
Antoine Pitrou
f5207e617b
Clinic-ize the crypt module. Derby!
2014-01-14 21:00:27 +01:00
Benjamin Peterson
901acb4d89
merge 3.3 ( #20251 )
2014-01-14 00:22:50 -05:00
Benjamin Peterson
a677d7628b
remove overly strict assertion ( closes #20251 )
2014-01-14 00:21:49 -05:00
Benjamin Peterson
e19d9d1467
merge 3.3 ( #20250 )
2014-01-13 23:56:30 -05:00
Benjamin Peterson
9cb33b7d03
correct defaultdict signature in docstring ( closes #20250 )
...
Patch from Andrew Barnert.
2014-01-13 23:56:05 -05:00
Benjamin Peterson
c6b37e21f5
merge 3.3 ( #20246 )
2014-01-13 23:14:42 -05:00
Benjamin Peterson
5688222907
merge 3.2 ( #20246 )
2014-01-13 23:12:55 -05:00
Benjamin Peterson
fbf648ebba
complain when nbytes > buflen to fix possible buffer overflow ( closes #20246 )
2014-01-13 22:59:38 -05:00
Benjamin Peterson
a51791aa94
fix refleak in the error case
2014-01-13 09:20:53 -05:00
Larry Hastings
8666e65206
Issue #20228 : Argument Clinic now has special support for class special
...
methods.
2014-01-12 14:12:59 -08:00
Larry Hastings
4a55fc5a9d
Issue #20214 : Fixed a number of small issues and documentation errors in
...
Argument Clinic (see issue for details).
2014-01-12 11:09:57 -08:00
Benjamin Peterson
463753831c
fix build when SCHED_SPORADIC is defined ( closes #20217 )
2014-01-10 09:22:40 -06:00
Antoine Pitrou
78ace81c93
Issue #20207 : Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly asked for.
2014-01-09 20:09:03 +01:00
Antoine Pitrou
2f7c31678a
Remove conditional: it is useless at this point (OpenSSL headers are not yet included)
2014-01-09 20:07:41 +01:00
Antoine Pitrou
cd3d7cabef
Issue #20207 : Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly asked for.
2014-01-09 20:02:20 +01:00
Benjamin Peterson
766e10c4a8
merge 3.3
2014-01-09 09:36:23 -06:00
Benjamin Peterson
21e7d4cd5e
fix zipimport ref leak
2014-01-09 09:36:10 -06:00
Victor Stinner
149e540adf
(Merge 3.3) Issue #20113 : os.readv() and os.writev() now raise an OSError
...
exception on error instead of returning -1.
2014-01-08 15:26:12 +01:00
Victor Stinner
57ddf78b6b
Issue #20113 : os.readv() and os.writev() now raise an OSError exception on
...
error instead of returning -1.
2014-01-08 15:21:28 +01:00
Gregory P. Smith
2e385e2592
Fixes issue #19081 : When a zipimport .zip file in sys.path being imported from
...
is modified during the lifetime of the Python process after zipimport has
already cached the zip's table of contents we detect this and recover
rather than read bad data from the .zip (causing odd import errors).
2014-01-07 18:34:23 -08:00
Gregory P. Smith
2bcbc14117
Fixes Issue #19081 : When a zipimport .zip file in sys.path being imported from
...
is modified during the lifetime of the Python process after zipimport has
already cached the zip's table of contents we detect this and recover
rather than read bad data from the .zip (causing odd import errors).
2014-01-07 18:30:07 -08:00
Larry Hastings
df7c22b25b
Issue #19723 : Missed one conversion to the new Argument Clinic syntax.
2014-01-07 14:25:26 -08:00
Brett Cannon
b05cbe61b3
Issue #12837 : Silence a Clang compiler warning on OS X.
...
Now makes CPython build without warnings on OS X under Clang with
-Wno-unused-value -Wno-empty-body -Qunused-arguments
-Wno-deprecated-declarations.
Thanks to David Watson for taking an initial stab at a solution.
2014-01-07 17:01:01 -05:00
Larry Hastings
61272b77b0
Issue #19273 : The marker comments Argument Clinic uses have been changed
...
to improve readability.
2014-01-07 12:41:53 -08:00
Larry Hastings
77561cccb2
Issue #20141 : Improved Argument Clinic's support for the PyArg_Parse "O!"
...
format unit.
2014-01-07 12:13:13 -08:00
Larry Hastings
16c5191ab3
Issue #20144 : Argument Clinic now supports simple constants as parameter
...
default values. inspect.Signature correspondingly supports them in
__text_signature__ fields for builtins.
2014-01-07 11:53:01 -08:00
Larry Hastings
3f144c2ad7
Issue #20142 : Py_buffer variables generated by Argument Clinic are now
...
initialized with a default value.
2014-01-06 10:34:00 -08:00
Stefan Krah
0455c3fd28
Whitespace.
2014-01-04 13:03:48 +01:00
Larry Hastings
78cf85c669
Issue #19659 : Added documentation for Argument Clinic.
2014-01-04 12:44:57 -08:00
Larry Hastings
3cceb38486
Issue #19976 : Argument Clinic METH_NOARGS functions now always
...
take two parameters.
2014-01-04 11:09:09 -08:00
Stefan Krah
41adc26708
Merge from 3.3.
2014-01-04 13:06:59 +01:00
Martin v. Löwis
24e43308b7
* Issue #16113 : Remove sha3 module again.
...
Patch by Christian Heimes, with modifications.
2014-01-03 14:05:06 +01:00
Victor Stinner
5c86733c8a
Issue #18294 : Fix uint_converter() in zlibmodule.c, fix the "> UINT_MAX" check
2014-01-03 12:26:12 +01:00
Victor Stinner
daeffd2c08
audioop: adpcm2lin() and lin2adpcm() now raises a TypeError instead of a
...
SystemError if the state type is invalid.
2014-01-03 03:26:47 +01:00
Victor Stinner
e8794526db
threading.RLock._acquire_restore() now raises a TypeError instead of a
...
SystemError when it is not called with 2 arguments
2014-01-02 12:47:24 +01:00
Victor Stinner
f4c68db162
(Merge 3.3) parser: fix usage of Py_BuildValue() to build a parser error
...
Fix typo: "os" format => "Os"
2014-01-02 11:50:10 +01:00
Victor Stinner
5f8d485982
parser: fix usage of Py_BuildValue() to build a parser error
...
Fix typo: "os" format => "Os"
2014-01-02 11:49:27 +01:00
R David Murray
0e814634e5
whatsnew for gc.get_stats, plus doc tweaks.
...
Clarified the "At the moment" wording, and added the get_stats entry in the
module summary that Serhiy noted was missing at the end of issue 16351.
Given that pydoc lists all the function docstrings, I'm not sure that module
summary section is actually needed; but, it is probably better to address that
when the module is converted to use Argument Clinic. In the meantime we
should keep the list complete.
2013-12-26 15:11:28 -05:00
Christian Heimes
266772abe9
merge
2013-12-21 16:19:57 +01:00
Christian Heimes
af01f66817
Issue #16136 : Remove VMS support and VMS-related code
2013-12-21 16:19:10 +01:00
Antoine Pitrou
712cb734bd
Issue #20037 : Avoid crashes when doing text I/O late at interpreter shutdown.
2013-12-21 15:51:54 +01:00
Victor Stinner
36e96b8716
(Merge 3.3) Issue #20025 : ssl.RAND_bytes() and ssl.RAND_pseudo_bytes() now
...
raise a ValueError if num is negative (instead of raising a SystemError).
2013-12-19 16:47:25 +01:00
Victor Stinner
1e81a399a2
Issue #20025 : ssl.RAND_bytes() and ssl.RAND_pseudo_bytes() now raise a
...
ValueError if num is negative (instead of raising a SystemError).
2013-12-19 16:47:04 +01:00
Victor Stinner
08263f10f8
(Merge 3.3) Issue #20026 : Fix the sqlite module to handle correctly invalid
...
isolation level (wrong type).
2013-12-19 16:39:00 +01:00
Victor Stinner
cb1f74ec40
Issue #20026 : Fix the sqlite module to handle correctly invalid isolation level
...
(wrong type).
2013-12-19 16:38:03 +01:00
Serhiy Storchaka
cf58fb5e29
Issue #18829 : csv.Dialect() now checks type for delimiter, escapechar and
...
quotechar fields. Original patch by Vajrasky Kok.
2013-12-19 16:28:04 +02:00
Serhiy Storchaka
cac23a50ee
Issue #18829 : csv.Dialect() now checks type for delimiter, escapechar and
...
quotechar fields. Original patch by Vajrasky Kok.
2013-12-19 16:27:18 +02:00
Victor Stinner
f326665fe7
Fix os.listdir(): _Py_dup() already raises an exception on error, no need to
...
raise a new exception
2013-12-19 13:24:49 +01:00
Gregory P. Smith
b1792d9503
remove trailing spaces.
2013-12-18 11:27:05 -08:00
Serhiy Storchaka
85c2497950
Issue #16404 : Add checks for return value of PyLong_FromLong() in
...
sys.getwindowsversion() and ossaudiodev.setparameters().
Reported by Ned Batchelder.
2013-12-17 15:12:46 +02:00
Serhiy Storchaka
48d761e2b4
Issue #16404 : Add checks for return value of PyLong_FromLong() in
...
sys.getwindowsversion() and ossaudiodev.setparameters().
Reported by Ned Batchelder.
2013-12-17 15:11:24 +02:00
Victor Stinner
711e27cd50
tracemalloc: fix usage of strtol(), value can be LONG_MIN or LONG_MAX on ERANGE
2013-12-16 23:06:19 +01:00
Victor Stinner
4d8c29cd57
tracemalloc: only use unsigned types to compute hash
...
Commit to simplify the backport to python 2.7 and to make the code more
consistent.
2013-12-16 23:05:13 +01:00
Stefan Krah
ae01a8bcdf
Merge from 3.3.
2013-12-15 20:52:08 +01:00
Stefan Krah
1f1ec12db9
Issue #19986 : Avoid an incorrect warning of older gcc versions.
2013-12-15 20:45:08 +01:00
Serhiy Storchaka
03241e8017
Issue #17919 : Fixed integer overflow in the eventmask parameter.
2013-12-14 19:18:39 +02:00
Serhiy Storchaka
5da107ac72
Issue #17919 : Fixed integer overflow in the eventmask parameter.
2013-12-14 19:12:02 +02:00
Stefan Krah
f483b0f3a9
Issue #19972 : Add rarely used freefunc. This fixes a leak if sys.exit()
...
is used in a program.
2013-12-14 13:43:10 +01:00
Stefan Krah
7ab9f72519
Merge from 3.3.
2013-12-14 12:58:59 +01:00
Stefan Krah
01e5f800b4
Fix C++ header usage. This __STDC_LIMIT_MACROS scheme can still be subverted
...
by including stdint.h before mpdecimal.h. In that case the only option left
is to compile with -D_STDC_LIMIT_MACROS.
2013-12-14 12:58:09 +01:00