summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-29781: Fix SSLObject.version before handshake (#3364)Christian Heimes2017-09-061-0/+4
| | | | | | SSLObject.version() now correctly returns None when handshake over BIO has not been performed yet. Signed-off-by: Christian Heimes <christian@python.org>
* Revert "bpo-30860: Consolidate stateful runtime globals." (#3379)Eric Snow2017-09-065-105/+227
| | | Windows buildbots started failing due to include-related errors.
* bpo-30860: Consolidate stateful runtime globals. (#2594)Eric Snow2017-09-065-227/+105
| | | | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py).
* _pickle: Fix whichmodule() (#3358)Victor Stinner2017-09-051-1/+1
| | | | | | _PyUnicode_FromId() can return NULL: replace Py_INCREF() with Py_XINCREF(). Fix coverity report: CID 1417269.
* bpo-31343: Include sys/sysmacros.h (#3318)Christian Heimes2017-09-051-0/+5
| | | | | | Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C libray plans to remove the functions from sys/types.h. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-30102: Call OPENSSL_add_all_algorithms_noconf (#3112)Christian Heimes2017-09-052-2/+9
| | | | | | | | The ssl and hashlib modules now call OPENSSL_add_all_algorithms_noconf() on OpenSSL < 1.1.0. The function detects CPU features and enables optimizations on some CPU architectures such as POWER8. Patch is based on research from Gustavo Serra Scalet. Signed-off-by: Christian Heimes <christian@python.org>
* Revert "bpo-17852: Maintain a list of BufferedWriter objects. Flush them on ↵Neil Schemenauer2017-09-053-49/+1
| | | | | exit. (#1908)" (#3337) This reverts commit e38d12ed34870c140016bef1e0ff10c8c3d3f213.
* bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. ↵Neil Schemenauer2017-09-053-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#1908) * Maintain a list of BufferedWriter objects. Flush them on exit. In Python 3, the buffer and the underlying file object are separate and so the order in which objects are finalized matters. This is unlike Python 2 where the file and buffer were a single object and finalization was done for both at the same time. In Python 3, if the file is finalized and closed before the buffer then the data in the buffer is lost. This change adds a doubly linked list of open file buffers. An atexit hook ensures they are flushed before proceeding with interpreter shutdown. This is addition does not remove the need to properly close files as there are other reasons why buffered data could get lost during finalization. Initial patch by Armin Rigo. * Use weakref.WeakSet instead of WeakKeyDictionary. * Simplify buffered double-linked list types. * In _flush_all_writers(), suppress errors from flush(). * Remove NEWS entry, use blurb.
* bpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315)Victor Stinner2017-09-0419-57/+567
| | | | | | | | | * bpo-31170: Update libexpat from 2.2.3 to 2.2.4 Fix copying of partial characters for UTF-8 input (libexpat bug 115): https://github.com/libexpat/libexpat/issues/115 * Add NEWS entry.
* bpo-28411: Remove "modules" field from Py_InterpreterState. (#1638)Eric Snow2017-09-042-18/+4
| | | sys.modules is the one true source.
* remove IRIX support (closes bpo-31341) (#3310)Benjamin Peterson2017-09-043-29/+3
| | | See PEP 11.
* Code clean-up. Remove unnecessary pre-increment before the loop starts. (#3312)Raymond Hettinger2017-09-041-17/+10
|
* Regen Moduls/clinic/_ssl.c.h (GH-3320)Zachary Ware2017-09-041-3/+3
| | | Broken in GH-2079
* bpo-30502: Fix handling of long oids in ssl. (#2909)Serhiy Storchaka2017-09-041-43/+47
|
* bpo-30622: Change NPN detection: (#2079)Melvyn Sopacua2017-09-042-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change NPN detection: Version breakdown, support disabled (pre-patch/post-patch): - pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False - 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False - 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and OPENSSL_NO_NEXTPROTONEG will be defined -> True/False Version breakdown support enabled (pre-patch/post-patch): - pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False - 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will be defined and OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True - 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True * Refine NPN guard: - If NPN is disabled, but ALPN is available we need our callback - Make clinic's ssl behave the same way This created a working ssl module for me, with NPN disabled and ALPN enabled for OpenSSL 1.1.0f. Concerns to address: The initial commit for NPN support into OpenSSL [1], had the OPENSSL_NPN_* variables defined inside the OPENSSL_NO_NEXTPROTONEG guard. The question is if that ever made it into a release. This would need an ugly hack, something like: #if defined(OPENSSL_NO_NEXTPROTONEG) && \ !defined(OPENSSL_NPN_NEGOTIATED) # define OPENSSL_NPN_UNSUPPORTED 0 # define OPENSSL_NPN_NEGOTIATED 1 # define OPENSSL_NPN_NO_OVERLAP 2 #endif [1] https://github.com/openssl/openssl/commit/68b33cc5c7
* Add missing _sha3 module to Setup.dist (#2395)Segev Finer2017-09-041-0/+1
|
* bpo-31185: Fixed miscellaneous errors in asyncio speedup module. (#3076)Serhiy Storchaka2017-09-032-211/+210
|
* bpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934)Christopher Wilcox2017-08-301-3/+16
| | | | | | | | * Fixes #30581 by adding a path to use newer GetMaximumProcessorCount API on Windows calls to os.cpu_count() * Add NEWS.d entry for bpo-30581, os.cpu_count on Windows. * Tweak NEWS entry
* bpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() ↵Oren Milman2017-08-291-1/+2
| | | | | (#3226) if pathname.replace('/', '\\') returns non-string.
* bpo-31243: Fixed PyArg_ParseTuple failure checks. (#3171)Oren Milman2017-08-292-21/+43
|
* bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (#31)Pauli Virtanen2017-08-281-2/+67
| | | | | | | | | | | | | | | Ctypes currently produces wrong pep3118 type codes for several types. E.g. memoryview(ctypes.c_long()).format gives "<l" on 64-bit platforms, but it should be "<q" instead for sizeof(c_long) == 8 The problem is that the '<>' endian specification in the struct syntax also turns on the "standard size" mode, which makes type characters have a platform-independent meaning, which does not match with the codes used internally in ctypes. The struct module format syntax also does not allow specifying native-size non-native-endian items. This commit adds a converter function that maps the internal ctypes codes to appropriate struct module standard-size codes in the pep3118 format strings. The tests are modified to check for this.
* bpo-30987 - Support for ISO-TP protocol in SocketCAN (#2956)Pier-Yves Lessard2017-08-281-5/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added support for CAN_ISOTP protocol * Added unit tests for CAN ISOTP * Updated documentation for ISO-TP protocol * Removed trailing whitespace in documentation * Added blurb NEWS.d file * updated Misc/ACKS * Fixed broken unit test that was using isotp const outside of skippable section * Removed dependecy over third party project * Added implementation for getsockname + unit tests * Missing newline at end of ACKS file * Accidentally inserted a type in ACKS file * Followed tiran changes review #1 recommendations * Added spaces after comma
* bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (#3201)Oren Milman2017-08-251-0/+7
|
* bpo-31275: Small refactoring to silence a fall-through warning. (#3206)Stefan Krah2017-08-251-8/+2
|
* bpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal ↵Oren Milman2017-08-241-3/+20
| | | | tuples (leftovers) (#3198)
* bpo-31095: fix potential crash during GC (GH-2974)INADA Naoki2017-08-247-4/+24
|
* bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ↵Stefan Krah2017-08-211-1/+1
| | | | (#3157)
* bpo-28261: Fixed err msgs where PyArg_ParseTuple is used to parse normal ↵Oren Milman2017-08-206-19/+62
| | | | tuples. (#3119)
* bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106)Victor Stinner2017-08-187-100/+718
| | | | | | | | | | | | | | * bpo-30947: Update libexpat from 2.2.1 to 2.2.3 * Add NEWS entry * Add new loadlibrary.c * expat_external.h: restore include "pyexpatns.h" * PCbuild: add expat/loadlibrary.c * Define XML_POOR_ENTROPY to compile expat
* bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142)Stefan Krah2017-08-181-0/+6
|
* bpo-31109: Convert zipimport to use Argument Clinic (GH-2990)Yaron de Leeuw2017-08-182-160/+464
|
* bpo-24700: Add a fast path for comparing array.array of equal type (#3009)Adrian Wielgosik2017-08-171-15/+66
|
* fix grammr in error messages in overlapped.c (GH-3095)Oren Milman2017-08-151-2/+2
|
* bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() ↵Коренберг Марк2017-08-141-10/+20
| | | | (#3000) (#3000)
* bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055)Victor Stinner2017-08-101-0/+22
| | | | | | | | | | | | | The current test_child_terminated_in_stopped_state() function test creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and then crash (SIGSEGV). The problem is that calling os.waitpid() in the parent process is not enough to close the process: the child process remains alive and so the unit test leaks a child process in a strange state. Closing the child process requires non-trivial code, maybe platform specific. Remove the functional test and replaces it with an unit test which mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to test the WIFSTOPPED() path.
* Spelling fixes (#2902)Ville Skyttä2017-08-033-3/+3
|
* bpo-31061: fix crash in asyncio speedup module (GH-2966)Alexander Mohr2017-08-021-0/+4
|
* Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets. (#2896)Alexander Belopolsky2017-07-311-27/+30
| | | | | | | | | | | | | | | | | | * Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets. * bpo-5288: Implemented %z formatting of sub-minute offsets. * bpo-5288: Removed mentions of the whole minute limitation on TZ offsets. * bpo-5288: Removed one more mention of the whole minute limitation. Thanks @csabella! * Fix a formatting error in the docs * Addressed review comments. Thanks, @haypo.
* bpo-9566: Fixed _ssl module warnings (#2495)Segev Finer2017-07-261-6/+13
| | | | | | | | * bpo-9566: Fixed some _ssl warnings * bpo-9566: _ssl: Fixup the fixes and also fix the remainings warnings * Add a comment about the downcast
* bpo-9566: Fix some Windows x64 compiler warnings (#2492)Segev Finer2017-07-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-9566: Silence liblzma warnings * bpo-9566: Silence tcl warnings * bpo-9566: Silence tk warnings * bpo-9566: Silence tix warnings * bpo-9566: Fix some library warnings * bpo-9566: Fix msvcrtmodule.c warnings * bpo-9566: Silence _bz2 warnings * bpo-9566: Fixed some _ssl warnings * bpo-9566: Fix _msi warnings * bpo-9566: Silence _ctypes warnings * Revert "bpo-9566: Fixed some _ssl warnings" This reverts commit a639001c949ba53338a9ee047d2ec1efd2505e6f. * bpo-9566: Also consider NULL as a possible error in HANDLE_return_converter * bpo-9566: whitespace fixes
* bpo-30302 Make timedelta.__repr__ more informative. (#1493)Utkarsh Upadhyay2017-07-251-15/+44
|
* bpo-31018: Switch to #pragma pack from __declspec(align) (#2848)Segev Finer2017-07-251-1/+4
|
* bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747)Xiang Zhang2017-07-181-2/+1
|
* bpo-30946: Remove obsolete fallback code in readline module (#2738)Antoine Pitrou2017-07-181-46/+1
| | | | | | | | | | * Remove obsolete fallback code in readline module * Add NEWS * Remove obsolete include * Fix macro on Windows
* bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state (#2417)Antoine Pitrou2017-07-171-18/+20
| | | | | | | | | | | | | | * Improve signal delivery Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions. * Remove unused function * Improve comments * Use _Py_atomic API for concurrency-sensitive signal state * Add blurb
* [bpo-30916] Pre-build OpenSSL and Tcl/Tk for Windows (#2688)Steve Dower2017-07-171-1/+37
| | | Updates ssl and tkinter projects to use pre-built externals
* bpo-30936: Fix a reference leak in json when fail to sort keys. (#2712)Serhiy Storchaka2017-07-161-1/+3
|
* bpo-30911: Fix a crash in json on platforms with unsigned char (#2684)Segev Finer2017-07-131-1/+1
| | | when pass bad strict argument.
* Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2670)Segev Finer2017-07-111-1/+1
|
* bpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634)Serhiy Storchaka2017-07-111-3/+5
| | | | called with bytes-like argument.