Commit graph

7783 commits

Author SHA1 Message Date
Jason R. Coombs
8ec784c2df Issue #7171: Update syntax to replace MAX in favor of Py_MAX (matching implementation for Unix). 2013-11-10 13:43:22 -05:00
Atsuo Ishimoto
da0fc14d46 Issue #7171: Add Windows implementation of `inet_ntop and inet_pton` to socket module. 2012-07-16 15:16:54 +09:00
Stefan Krah
f35b0274f9 Move PyErr_NoMemory() closer to the failure. 2013-11-08 18:05:02 +01:00
Stefan Krah
5ec6be9b50 Change style to match the surrounding code (no early returns). 2013-11-08 17:48:58 +01:00
Victor Stinner
70e11acdbd Issue #19437: Fix datetime_subtract(), handle new_delta() failure 2013-11-08 00:50:58 +01:00
Victor Stinner
aa5bbfaa77 Issue #19437: Fix _io._IOBase.close(), handle _PyObject_SetAttrId() failure 2013-11-08 00:29:41 +01:00
Victor Stinner
50abf2294e Issue #19437: Fix fsconvert_strdup(), raise a MemoryError on PyMem_Malloc()
failure
2013-11-07 23:56:10 +01:00
Victor Stinner
bd303c165b Issue #19512, #19515: remove shared identifiers, move identifiers where they
are used.

Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
2013-11-07 23:07:29 +01:00
Martin v. Löwis
e75fc14813 Issue #19514: Deduplicate some _Py_IDENTIFIER declarations.
Patch by Andrei Dorian Duma.
2013-11-07 18:46:53 +01:00
R David Murray
589327ea7a Merge #18985: Improve fcntl documentation. 2013-11-07 10:51:41 -05:00
R David Murray
d5a2f0b3a1 #18985: Improve fcntl documentation.
Original patch by Vajrasky Kok, further improved (I hope) by me.
2013-11-07 10:51:07 -05:00
Victor Stinner
53e9ec48e5 Issue #19512: Use the new _PyId_builtins identifier 2013-11-07 00:43:05 +01:00
Victor Stinner
e7f516cbb8 Issue #19512: _count_elements() of _collections reuses PyId_get identifier
instead of literal "get" string
2013-11-06 23:52:55 +01:00
Victor Stinner
d9d0419a9f Issue #19512: fileio_init() reuses PyId_name identifier instead of "name"
literal string
2013-11-06 23:50:10 +01:00
Victor Stinner
090543736f Issue #19512: add some common identifiers to only create common strings once,
instead of creating temporary Unicode string objects

Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
2013-11-06 22:41:44 +01:00
Victor Stinner
bb52020d44 Issue #19512: pickle now uses an identifier to only create the Unicode string
"modules" once
2013-11-06 22:40:41 +01:00
Christian Heimes
6853108ccd Issue #18582: fix memory leak in pbkdf2 code 2013-11-06 17:25:17 +01:00
Victor Stinner
357f5155dc Issue #19437: Fix _threading.RLock constructor (rlock_new), call
Py_DECREF(self) if PyThread_allocate_lock() failed instead of calling directly
type->tp_free(self), to keep the chained list of objects consistent when Python
is compiled in debug mode

fails, don't consume the row (restore it) and fail immediatly (don't call
pysqlite_step())
2013-11-05 15:10:19 +01:00
Victor Stinner
85a12a8beb Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, when the row factory
fails, don't consume the row (restore it) and fail immediatly (don't call
pysqlite_step())
2013-11-05 14:50:30 +01:00
Victor Stinner
b3e1ef1ce0 Issue #19437: Fix pysqlite_connection_call() of sqlite3, return NULL when
PyList_Append() fails
2013-11-05 14:46:13 +01:00
Victor Stinner
dd4b299df1 Issue #19437: Fix pysqlite_cursor_iternext() of sqlite3, handle
_pysqlite_fetch_one_row() failure
2013-11-05 14:30:11 +01:00
R David Murray
bd90d09dd0 #18678: Correct names of spwd struct members.
The old names (sp_nam and sp_pwd) are kept for backward compatibility.  Since
this is a long standing bug that hasn't caused any real-world problems, I'm
not backporting it.  However, it is worth fixing because the corrected names
match the documentation, and more importantly now match the C struct, just
like the other struct members.

Patch by Vajrasky Kok.
2013-11-03 19:54:05 -05:00
R David Murray
c3f57e4a35 Merge #19411: Clarify that b2a_hex/hexlify returns a bytes object. 2013-11-03 13:22:17 -05:00
R David Murray
5fdb64b5a0 #19411: Clarify that b2a_hex/hexlify returns a bytes object.
Initial patch by Vajrasky Kok.
2013-11-03 13:21:38 -05:00
Brett Cannon
2be28a6984 Silence a compiler warning about an unused function 2013-11-01 10:25:13 -04:00
Tim Golden
6374120750 Issue #19418 Fix some warnings on Win64 2013-10-31 17:38:24 +00:00
Victor Stinner
a9eb38f02a Issue #19437: Fix newPySSLSocket(), handle PyWeakref_NewRef() failure 2013-10-31 16:35:38 +01:00
Victor Stinner
e75996a77c Issue #19437: Fix PyCFuncPtrType constructor, handle
_ctypes_alloc_format_string() failure
2013-10-31 16:34:08 +01:00
Victor Stinner
a215002453 Issue #19437: Fix PyCArrayType constructor, raise MemoryError on PyMem_Malloc()
failure
2013-10-31 16:33:05 +01:00
Victor Stinner
ba9be477b0 Issue #19437: Fix fill_and_set_sslerror() of _ssl, handle Py_BuildValue()
failure

Don't call PyObject_CallObject() with NULL parameters and an exception set.
2013-10-31 15:00:24 +01:00
Victor Stinner
2ae57e3cf8 Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an
exception set
2013-10-31 13:39:23 +01:00
Victor Stinner
b43ad1d569 cleanup _Unpickler_SkipConsumed(): remove 1 level of indentation 2013-10-31 13:38:42 +01:00
Tim Golden
fa6ab0fa5b Issue #19418 Fix some warnings on Win64 2013-10-31 10:25:47 +00:00
Guido van Rossum
90fb914b4b asyncio: Make the IOCP proactor support "waitable" handles (Richard Oudkerk). 2013-10-30 14:44:05 -07:00
Victor Stinner
7613542a27 Issue #19437: Fix select.epoll.poll(), fix code handling PyMem_New() error
The bug was introduced with the select.epoll module! So it's 5 years old :-)
2013-10-30 19:57:52 +01:00
Victor Stinner
f0a7bac201 Issue #19437: Fix os.statvfs(), handle errors 2013-10-30 18:55:24 +01:00
Christian Heimes
dc6b933d23 merge 2013-10-29 21:16:58 +01:00
Christian Heimes
ee0bac66b2 Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding
It is causing trouble like e.g. hanging processes.
2013-10-29 21:11:55 +01:00
Christian Heimes
fb6b44e830 Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding
It is causing trouble like e.g. hanging processes.
2013-10-29 20:50:01 +01:00
Victor Stinner
34f7383d7a Issue #19437: Fix dec_format() of the _decimal module, handle dec_strdup()
failure (memory allocation failure): raise a MemoryError exception
2013-10-29 20:33:14 +01:00
Victor Stinner
f866f97ca8 Issue #19433: test_capi: check signness of some C types 2013-10-29 19:59:31 +01:00
Victor Stinner
01076554b7 Issue #19433: test_capi: add tests on the size of some C types 2013-10-29 19:39:52 +01:00
Victor Stinner
f38a5c28e0 Cleanup locale.localeconv(): move Py_DECREF() closer to the error 2013-10-29 19:28:20 +01:00
Victor Stinner
1ce3f840be Issue #19437: Fix convert_op_cmp() of decimal.Decimal rich comparator, handle
PyObject_IsInstance() failure
2013-10-29 19:26:11 +01:00
Victor Stinner
6decccdafe Issue #19437: Fix Array_subscript() of ctypes, handle Array_item() failure 2013-10-29 16:05:14 +01:00
Christian Heimes
db816d6546 Issue #19420: Fix reference leak in module initalization code of _hashopenssl.c 2013-10-29 12:14:55 +01:00
Victor Stinner
dd371b92c4 Issue #18408: Fix PyCStructUnionType_update_stgdict(), handle
_ctypes_alloc_format_string() failure
2013-10-29 03:50:45 +01:00
Victor Stinner
68f6adca6d Issue #18408: Fix _ctypes_alloc_format_string(), raise MemoryError on memory
allocation failure
2013-10-29 03:50:21 +01:00
Victor Stinner
cc024d1820 Issue #18408: Fix iobase_readline(), handle PyByteArray_Resize() failure 2013-10-29 02:23:46 +01:00
Victor Stinner
af8b7e8233 Issue #18408: Fix zipimport, handle PyUnicode_Substring() and get_subname() failures 2013-10-29 01:46:24 +01:00