summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Test that new_timezone can return the UTC singleton (gh-5318)Paul Ganssle2018-02-221-0/+24
|
* bpo-32556: nt._getfinalpathname, nt._getvolumepathname and nt._getdiskusage ↵Steve Dower2018-02-222-48/+72
| | | | now correctly convert from bytes. (GH-5761)
* bpo-32604: Swap threads only if the interpreter is different. (gh-5778)Eric Snow2018-02-201-8/+14
| | | The CPython runtime assumes that there is a one-to-one relationship (for a given interpreter) between PyThreadState and OS threads. Sending and receiving on a channel in the same interpreter was causing crashes because of this (specifically due to a check in PyThreadState_Swap()). The solution is to not switch threads if the interpreter is the same.
* closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)Alexey Izbyshev2018-02-201-1/+1
| | | | | | | | os.dup2() tests for dup3() system call availability at runtime, but doesn't remember the result across calls, repeating the test on each call with inheritable=False. Since the caller of os.dup2() is expected to hold the GIL, fix this by making the variable holding the test result static.
* bpo-31333: Re-implement ABCMeta in C (#5273)Ivan Levkivskyi2018-02-183-0/+985
| | | | This adds C versions of methods used by ABCMeta that improve performance of various ABC operations.
* bpo-32604: Clean up created subinterpreters before runtime finalization. ↵Eric Snow2018-02-171-21/+276
| | | | | | (gh-5709)
* Update comment in posixmodule.c (GH-5681)ngie-eign2018-02-141-1/+1
| | | | | A closing parentheses was missing. Signed-off-by: Ngie Cooper <yaneurabeya@gmail.com>
* bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)Oren Milman2018-02-134-13/+23
|
* bpo-32221: makeipaddr(): remove interface part + speedup (GH-5449) (#5449)Коренберг Марк2018-02-121-28/+31
|
* bpo-29248: Fix os.readlink() on Windows (GH-5577)SSE42018-02-121-3/+3
| | | | The PrintNameOffset field of the reparse data buffer was treated as a number of characters instead of bytes.
* Fix some warnings produced by different compilers. (#5593)Serhiy Storchaka2018-02-093-2/+14
|
* bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560)Alexey Izbyshev2018-02-061-4/+4
| | | | | | | Fix a rare but potential pre-exec child process deadlock in subprocess on POSIX systems when marking file descriptors inheritable on exec in the child process. This bug appears to have been introduced in 3.4 with the inheritable file descriptors support. This also changes Python/fileutils.c `set_inheritable` to use the "slow" two `fcntl` syscall path instead of the "fast" single `ioctl` syscall path when asked to be async signal safe (by way of being asked not to raise exceptions). `ioctl` is not a POSIX async-signal-safe approved function. ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
* bpo-32746: Fix multiple typos (GH-5144)Leo Arias2018-02-046-6/+6
| | | Fix typos found by codespell in docs, docstrings, and comments.
* bpo-32604: Fix memory leaks in the new _xxsubinterpreters module. (#5507)Eric Snow2018-02-031-268/+596
|
* Revert "bpo-31356: Add context manager to temporarily disable GC GH-5495Yury Selivanov2018-02-021-106/+0
| | | | | | | This reverts commit 72a0d218dcc94a3cc409a9ef32dfcd5a7bbcb43c. The reverted commit had a few issues so it was unanimously decided to undo it. See the bpo issue for details.
* bpo-32747: Remove trailing spaces in docstrings. (GH-5491)oldk2018-02-028-38/+38
|
* bpo-25988: Emit a warning when use or import ABCs from 'collections'. (#5460)Serhiy Storchaka2018-01-311-1/+5
|
* bpo-28914: Fix compilation of select on Android (#5447)Victor Stinner2018-01-301-0/+3
| | | | | EPOLL_CLOEXEC is not defined on Android. Co-Authored-By: Wataru Matsumoto <sxsns243@gmail.com>
* bpo-32681: Fix an uninitialized variable in the C implementation of os.dup2 ↵Stéphane Wirtel2018-01-301-1/+1
| | | | | (GH-5346) See https://bugs.python.org/issue32441 for where this was introduced.
* bpo-32604: NULL-terminate kwlist in channel_drop_interpreter(). (gh-5437)Eric Snow2018-01-301-1/+1
|
* bpo-32604: Expose the subinterpreters C-API in a "private" stdlib module. ↵Eric Snow2018-01-301-0/+2061
| | | | | (gh-1748) The module is primarily intended for internal use in the test suite. Building the module under Windows will come in a follow-up PR.
* bpo-28134: Auto-detect socket values from file descriptor (#1349)Christian Heimes2018-01-291-2/+69
| | | | | | | | | | | | | | | Fix socket(fileno=fd) by auto-detecting the socket's family, type, and proto from the file descriptor. The auto-detection can be overruled by passing in family, type, and proto explicitly. Without the fix, all socket except for TCP/IP over IPv4 are basically broken: >>> s = socket.create_connection(('www.python.org', 443)) >>> s <socket.socket fd=3, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('2003:58:bc4a:3b00:56ee:75ff:fe47:ca7b', 59730, 0, 0), raddr=('2a04:4e42:1b::223', 443, 0, 0)> >>> socket.socket(fileno=s.fileno()) <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('2003:58:bc4a:3b00::%2550471192', 59730, 0, 2550471192), raddr=('2a04:4e42:1b:0:700c:e70b:ff7f:0%2550471192', 443, 0, 2550471192)> Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31356: Add context manager to temporarily disable GC (GH-4224)Pablo Galindo2018-01-291-0/+106
|
* bpo-20104: Fix leaks and errors in new os.posix_spawn (GH-5418)Pablo Galindo2018-01-291-52/+66
| | | | | | | | | | * Fix memory leaks and error handling in posix spawn * Improve error handling when destroying the file_actions object * Py_DECREF the result of PySequence_Fast on error * Handle uninitialized pid * Use OSError if file actions fails to initialize * Move _file_actions to outer scope to avoid undefined behaviour * Remove HAVE_POSIX_SPAWN define in Modules/posixmodule.c * Unshadow exception and clean error message
* rename _imp initialization function to follow conventions (#5432)Benjamin Peterson2018-01-291-2/+2
| | | When the C imp module became _imp in 6f44d66bc491bad5b8d897a68da68e009e27829d, the initialization function should have been renamed from PyInit_imp to PyInit__imp.
* bpo-31429: Define TLS cipher suite on build time (#3532)Christian Heimes2018-01-291-1/+34
| | | | | | | | | | | | | Until now Python used a hard coded white list of default TLS cipher suites. The old approach has multiple downsides. OpenSSL's default selection was completely overruled. Python did neither benefit from new cipher suites (ChaCha20, TLS 1.3 suites) nor blacklisted cipher suites. For example we used to re-enable 3DES. Python now defaults to OpenSSL DEFAULT cipher suite selection and black lists all unwanted ciphers. Downstream vendors can override the default cipher list with --with-ssl-default-suites. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32705: Current Android does not have posix_spawn (#5413)Chih-Hsuan Yen2018-01-291-0/+7
|
* bpo-20104: Expose `posix_spawn` in the os module (GH-5109)Pablo Galindo2018-01-292-2/+254
| | | | | Add os.posix_spawn to wrap the low level POSIX API of the same name. Contributed by Pablo Galindo.
* bpo-32373: Add socket.getblocking() method. (#4926)Yury Selivanov2018-01-281-1/+48
|
* Revert "bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)" ↵Yury Selivanov2018-01-281-31/+28
| | | | | (#5394) This reverts commit 47c0b1f7d4115e6f15e6776c1f91d28e7d96fe0c.
* bpo-32228: Reset raw_pos after unwinding the raw stream (#4858)Nitish Chandra2018-01-281-4/+10
| | | Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size.
* bpo-32660: Solaris should support constants like termios' FIONREAD (#5328)jcea2018-01-281-0/+6
|
* bpo-32659: Solaris "stat" should support "st_fstype" (#5307)jcea2018-01-281-0/+17
| | | | | | * bpo-32659: Solaris "stat" should support "st_fstype" * Add 'versionadded'
* bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)Коренберг Марк2018-01-271-28/+31
|
* bpo-32622: Implement loop.sendfile() (#5271)Andrew Svetlov2018-01-271-0/+1
|
* bpo-32630: Use contextvars in decimal (GH-5278)Yury Selivanov2018-01-271-89/+31
|
* bpo-31368: Expose preadv and pwritev in the os module (#5239)Pablo Galindo2018-01-272-1/+313
|
* bpo-31399: Let OpenSSL verify hostname and IP address (#3462)Christian Heimes2018-01-271-32/+140
| | | | | | | | | | | | | | | bpo-31399: Let OpenSSL verify hostname and IP The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses. * Remove match_hostname calls * Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host() * Add documentation for OpenSSL 1.0.2 requirement * Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform. * Add hostname_checks_common_name Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32454: socket closefd (#5048)Christian Heimes2018-01-271-2/+29
| | | | | Add close(fd) function to the socket module Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32433: Optimized HMAC digest (#5023)Christian Heimes2018-01-272-3/+100
| | | | | | | The hmac module now has hmac.digest(), which provides an optimized HMAC digest for short messages. hmac.digest() is up to three times faster than hmac.HMAC().digest(). Signed-off-by: Christian Heimes <christian@python.org>
* Cleanup dangling reference in get_timezone_utc_capi (#5317)Paul Ganssle2018-01-251-0/+2
|
* bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code ↵Serhiy Storchaka2018-01-258-171/+94
| | | | | (GH-5222) Add two new private APIs: _PyObject_LookupAttr() and _PyObject_LookupAttrId()
* bpo-32652: Defer pymain_set_global_config() call (#5303)Victor Stinner2018-01-251-14/+12
| | | | | | In Py_Main(), don't call pymain_set_global_config() early: only call it when the whole configuration has been read. Add an unit test to prevent future regression.
* bpo-10381: Add timezone to datetime C API (#5032)Paul Ganssle2018-01-242-0/+90
| | | | | | | | | | | | | | | | | | * Add timezone to datetime C API * Add documentation for timezone C API macros * Add dedicated tests for datetime type check macros * Remove superfluous C API test * Drop support for TimeZoneType in datetime C API * Expose UTC singleton to the datetime C API * Update datetime C-API documentation to include links * Add reference count information for timezone constructors
* bpo-32248 - Implement `ResourceReader` and `get_resource_reader()` for ↵Barry Warsaw2018-01-242-1/+62
| | | | zipimport (#5248)
* bpo-32643: Drop support for a few private Task and Future APIs. (#5293)Yury Selivanov2018-01-242-182/+10
| | | | | | | | Specifically, it's not possible to subclass Task/Future classes and override the following methods: * Future._schedule_callbacks * Task._step * Task._wakeup
* bpo-32030: Add _PyCoreConfig.module_search_paths (#4954)Victor Stinner2018-01-241-174/+201
| | | | | | | | | | | _PyCoreConfig_Read() is now responsible to compute sys.path. So sys.path is now computed before calling _Py_InitializeCore(). Changes: * Add module_search_path, module_search_paths, executable, prefix, base_prefix, exec_prefix and base_exec_prefix to _PyCoreConfig. * _PyMainInterpreterConfig_Read() now only converts wchar_t** lists into a Python list, it doesn't compute sys.path anymore.
* bpo-28046: Remove MACHDEPPATH from Modules/Setup.dist (#5289)Victor Stinner2018-01-241-5/+1
| | | | | | Makefile $MACHDEPPATH uses $PLATDIR, but this variable was removed. So remove also $MACHDEPPATH. Remove also $EXTRAMACHDEPPATH.
* bpo-32296: Make get_running_loop() another 4-5x faster (#5277)Yury Selivanov2018-01-231-62/+102
|
* bpo-32436: Implement PEP 567 (#5027)Yury Selivanov2018-01-237-58/+287
|