Raymond Hettinger
48f68d00b8
Factor common code into internal functions.
Clean-up names of static functions.
Use Py_RETURN_NONE macro.
Expose private functions needed to support merge().
Move C imports to the bottom of the Python file.
12 years ago
Serhiy Storchaka
76d3f14e01
PyErr_NormalizeException doesn't like being called with an exception set
(issues #21677 , #21310 ).
12 years ago
Serhiy Storchaka
f10063e3c3
Issue #21310 : Fixed possible resource leak in failed open().
12 years ago
Serhiy Storchaka
8a8f7f9830
Issue #21677 : Fixed chaining nonnormalized exceptions in io close() methods.
12 years ago
Benjamin Peterson
4fb01ffe66
backout 0fb7789b5eeb for test breakage ( #20578 )
12 years ago
Benjamin Peterson
10e847bbc7
add BufferedIOBase.readinto1 ( closes #20578 )
Patch by Nikolaus Rath.
12 years ago
Victor Stinner
ef7f140366
All modern compilers provide a offsetof() function
offsetof() is used directly in many other .c files without any issue.
12 years ago
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).
12 years ago
Victor Stinner
797bcb51d0
Issue #21639 : Fix name of _testcapi test functions
12 years ago
Ned Deily
b166191886
Issue #17095 : Fix Modules/Setup *shared* support.
Original patch by Thomas Wouters.
12 years ago
Gregory P. Smith
a26987a0a5
Fix the comment to not refer to the removed end_fd parameter.
12 years ago
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.
12 years ago
Serhiy Storchaka
79851d755b
Issue #21552 : Fixed possible integer overflow of too long string lengths in
the tkinter module on 64-bit platforms.
12 years ago
Serhiy Storchaka
9e7cbda1ef
Issue #3015 : _tkinter.create() now creates tkapp object with wantobject=1 by
default.
12 years ago
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.
12 years ago
Raymond Hettinger
62f4dad816
Issue 21137: Better repr for threading.Lock()
12 years ago
Antoine Pitrou
ded3c1b837
Cleanup other stats formatting code in gcmodule.c
12 years ago
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.
12 years ago
Charles-François Natali
644b8f52a8
Issue #21455 : Add a default backlog to socket.listen().
12 years ago
Serhiy Storchaka
2b00c4999d
Issue #21525 : Most Tkinter methods which accepted tuples now accept lists too.
12 years ago
Raymond Hettinger
507d997714
Add comment and make minor code clean-up to improve clarity.
12 years ago
Benjamin Peterson
5eb6b39210
support pep 3118 format strings for ctypes objects with nontrivial shapes ( closes #10744 )
Patch by Matti Picus.
12 years ago
Serhiy Storchaka
429b59ec69
Issue #20998 : Fixed re.fullmatch() of repeated single character pattern
with ignore case. Original patch by Matthew Barnett.
12 years ago
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.
12 years ago
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'").
12 years ago
Victor Stinner
a57dfd033c
Issue #21488 : Add support of keyword arguments for codecs.encode and codecs.decode
12 years ago
Victor Stinner
e1e04ad8aa
Backed out changeset 6ceedbd88b5f
12 years ago
Victor Stinner
b78c448f4b
Issue #21488 : Add support of keyword arguments for codecs.encode and codecs.decode
12 years ago
Benjamin Peterson
23a192d963
use logical rather than bit and
12 years ago
Raymond Hettinger
234fb2d503
Issue 21424: Apply the nlargest() optimizations to nsmallest() as well.
12 years ago
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.
12 years ago
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.
12 years ago
Antoine Pitrou
c644e7c39f
Issue #21396 : Fix TextIOWrapper(..., write_through=True) to not force a flush() on the underlying binary stream.
Patch by akira.
12 years ago
Tim Golden
0321cf2550
Issue18314 Allow unlink to remove junctions. Includes support for creating junctions. Patch by Kim Gräsman
12 years ago
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.
12 years ago
Raymond Hettinger
90e9338383
Neaten-up a bit add add missing size change check.
12 years ago
Raymond Hettinger
871620d951
Simplify and speedup the internals of the heapq module.
12 years ago
Raymond Hettinger
4b0b1accb5
Issue #21101 : Eliminate double hashing in the C code for collections.Counter().
12 years ago
Raymond Hettinger
c9926088dd
Issue 21375: Fix possible Py_ssizet overflow in heapq.
12 years ago
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).
12 years ago
Stefan Krah
6b7786bac2
Use $type instead of $cls in the signature specification.
12 years ago
Stefan Krah
5de1f82464
Issue #21407 : _decimal now supports function signatures.
12 years ago
Stefan Krah
8fb74a35da
Issue #21374 : Fix pickling of DecimalTuple.
12 years ago
Stefan Krah
f1d4e42195
Issue #21374 : Fix pickling of DecimalTuple.
12 years ago
Antoine Pitrou
26f82efe59
Issue #21321 : itertools.islice() now releases the reference to the source iterator when the slice is exhausted.
Patch by Anton Afanasyev.
12 years ago
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.
12 years ago
Antoine Pitrou
6999441d62
Issue #20355 : -W command line options now have higher priority than the PYTHONWARNINGS environment variable. Patch by Arfrever.
12 years ago
Tim Golden
fbf963c064
Backed out changeset: 17df50df62c7
12 years ago
Tim Golden
4675d798bf
Issue #18314 os.unlink will now remove junction points on Windows. Patch by Kim Gräsman.
12 years ago
Zachary Ware
420dc56014
Fix compiler warning on Windows
..\Modules\_testcapimodule.c(3320): warning C4098: 'matmulType_dealloc' : 'void' function returning a value
12 years ago