summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* bpo-32503: Avoid creating too small frames in pickles. (#5127)Serhiy Storchaka2018-01-201-9/+9
|
* bpo-32598: Use autoconf to detect usable OpenSSL (#5242)Christian Heimes2018-01-201-0/+7
| | | | | | | | | | | | | | Add https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html to auto-detect compiler flags, linker flags and libraries to compile OpenSSL extensions. The M4 macro uses pkg-config and falls back to manual detection. Add autoconf magic to detect usable X509_VERIFY_PARAM_set1_host() and related functions. Refactor setup.py to use new config vars to compile _ssl and _hashlib modules. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-9566: Fix size_t=>int downcast warnings (#5230)Victor Stinner2018-01-182-7/+7
| | | | * Use wider types (int => Py_ssize_t) to avoid integer overflows. * Fix gc.get_freeze_count(): use Py_ssize_t type rather than int, since gc_list_size() returns a Py_ssize_t.
* bpo-32226: Fix memory leak in generic_alias_dealloc() (#5212)Victor Stinner2018-01-171-0/+1
|
* bpo-32403: Faster date and datetime constructors (#4993)Paul Ganssle2018-01-161-45/+75
| | | | | | | | | | | | | | * Add tests for date subclass alternate constructors * Switch over alternate date constructors to fast path * Switch datetime constructors to fastpath, fix bpo-32404 * Add fast path for datetime in date subclass constructor * Set fold in constructor in datetime.combine * Add news entries.
* bpo-31572: Get rid of PyObject_HasAttr() and _PyObject_HasAttrId() in the ↵Serhiy Storchaka2018-01-165-63/+105
| | | | _io module. (#3726)
* bpo-32544: Speed up hasattr() and getattr() (GH-5173)INADA Naoki2018-01-161-2/+4
| | | | | AttributeError was raised always when attribute is not found. This commit skip raising AttributeError when `tp_getattro` is `PyObject_GenericGetAttr`. It makes hasattr() and getattr() about 4x faster when attribute is not found.
* bpo-14976: Reentrant simple queue (#3346)Antoine Pitrou2018-01-152-0/+618
| | | | Add a queue.SimpleQueue class, an unbounded FIFO queue with a reentrant C implementation of put().
* bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174)Victor Stinner2018-01-151-8/+29
| | | | | | | | * Add _Py_GetLocaleconvNumeric() function: decode decimal_point and thousands_sep fields of localeconv() from the LC_NUMERIC encoding, rather than decoding from the LC_CTYPE encoding. * Modify locale.localeconv() and "n" formatter of str.format() (for int, float and complex to use _Py_GetLocaleconvNumeric() internally.
* bpo-29240: Fix locale encodings in UTF-8 Mode (#5170)Victor Stinner2018-01-155-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Modify locale.localeconv(), time.tzname, os.strerror() and other functions to ignore the UTF-8 Mode: always use the current locale encoding. Changes: * Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx(). On decoding or encoding error, they return the position of the error and an error message which are used to raise Unicode errors in PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale(). * Replace _Py_DecodeCurrentLocale() with _Py_DecodeLocaleEx(). * PyUnicode_DecodeLocale() now uses _Py_DecodeLocaleEx() for all cases, especially for the strict error handler. * Add _Py_DecodeUTF8Ex(): return more information on decoding error and supports the strict error handler. * Rename _Py_EncodeUTF8_surrogateescape() to _Py_EncodeUTF8Ex(). * Replace _Py_EncodeCurrentLocale() with _Py_EncodeLocaleEx(). * Ignore the UTF-8 mode to encode/decode localeconv(), strerror() and time zone name. * Remove PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and PyUnicode_EncodeLocale() now ignore the UTF-8 mode: always use the "current" locale. * Remove _PyUnicode_DecodeCurrentLocale(), _PyUnicode_DecodeCurrentLocaleAndSize() and _PyUnicode_EncodeCurrentLocale().
* bpo-31993: Do not use memoryview when pickle large strings. (#5154)Serhiy Storchaka2018-01-121-2/+3
| | | | | | PyMemoryView_FromMemory() created a memoryview referring to the internal data of the string. When the string is destroyed the memoryview become referring to a freed memory.
* bpo-31993: Do not create frames for large bytes and str objects (#5114)Serhiy Storchaka2018-01-111-94/+86
| | | | | | | when serialize into memory buffer with C pickle implementations. This optimization already is performed when serialize into memory with Python pickle implementations or into a file with both implementations.
* bpo-29240: Ignore UTF-8 Mode in time module (#5148)Victor Stinner2018-01-112-8/+7
| | | | | | time.strftime() must use the current LC_CTYPE encoding, not UTF-8 if the UTF-8 mode is enabled. Add _PyUnicode_DecodeCurrentLocale() function.
* bpo-29240: readline now ignores the UTF-8 Mode (#5145)Victor Stinner2018-01-101-2/+3
| | | | | | | | | | | | Add new fuctions ignoring the UTF-8 mode: * _Py_DecodeCurrentLocale() * _Py_EncodeCurrentLocale() * _PyUnicode_DecodeCurrentLocaleAndSize() * _PyUnicode_EncodeCurrentLocale() Modify the readline module to use these functions. Re-enable test_readline.test_nonascii().
* bpo-32493: Not only AIX, but FreeBSD has uuid_create support (#5089)David Carlier2018-01-091-4/+1
| | | Allow building the _uuid extension module on FreeBSD and OpenBSD.
* bpo-32282: Remove unnecessary check for `VersionHelpers.h` in ↵Max Bélanger2018-01-071-10/+0
| | | | `socketmodule.c` on Windows
* bpo-31993: Do not allocate large temporary buffers in pickle dump. (#4353)Olivier Grisel2018-01-061-24/+114
| | | | | | | | | | | | | | | | | The picklers do no longer allocate temporary memory when dumping large bytes and str objects into a file object. Instead the data is directly streamed into the underlying file object. Previously the C implementation would buffer all content and issue a single call to file.write() at the end of the dump. With protocol 4 this behavior has changed to issue one call to file.write() per frame. The Python pickler with protocol 4 now dumps each frame content as a memoryview to an IOBytes instance that is never reused and the memoryview is no longer released after the call to write. This makes it possible for the file object to delay access to the memoryview of previous frames without forcing any additional memory copy as was already possible with the C pickler.
* bpo-29137: Remove fpectl module (#4789)Nathaniel J. Smith2018-01-063-468/+0
| | | | | This module has never been enabled by default, never worked correctly on x86-64, and caused ABI problems that caused C extension compatibility. See bpo-29137 for details/discussion.
* bpo-32390: Fix compilation failure on AIX after f_fsid was added to ↵Michael Felt2018-01-051-0/+6
| | | | os.statvfs() (#4972)
* bpo-32226: Make __class_getitem__ an automatic class method. (#5098)Serhiy Storchaka2018-01-041-6/+2
|
* bpo-32308: Replace empty matches adjacent to a previous non-empty match in ↵Serhiy Storchaka2018-01-041-2/+2
| | | | re.sub(). (#4846)
* closes bpo-32460: ensure all non-static globals have initializers (#5061)Benjamin Peterson2017-12-316-48/+47
|
* bpo-32399: Starting with AIX6.1 there is support in libc.a for uuid ↵Michael Felt2017-12-301-6/+17
| | | | | | | | | | | | (RFC4122) (#4974) Starting with AIX6.1 there is support in libc.a for uuid (RFC4122) This patch provides the changes needed for this integration with the OS. On AIX the base function is uuid_create() rather than uuid_generate_time() The AIX uuid_t typedef is more aligned to the UUID field based definition while the Linux typedef that is more aligned with UUID bytes (or perhaps UUID bytes_le) definitions.
* Fix typo (#5049)Andrew Svetlov2017-12-301-1/+1
|
* return the new file descriptor from os.dup2 (closes bpo-32441) (#5041)Benjamin Peterson2017-12-292-19/+35
|
* bpo-31721: Allow Future._log_traceback to only be set to False (#5009)Yury Selivanov2017-12-251-0/+5
|
* bpo-32422: Reduce lru_cache memory usage (GH-5008)INADA Naoki2017-12-251-26/+6
|
* bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)Yury Selivanov2017-12-252-11/+60
|
* bpo-32402: io: Add missing NULL check. (GH-4971)INADA Naoki2017-12-241-0/+6
| | | | | _PyUnicode_FromId() may return NULL. Reported by coverity scan: CID 1426868, 1426867.
* bpo-32415: Fix "error is already set" (#4999)Yury Selivanov2017-12-231-0/+1
|