summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-29882: Add an efficient popcount method for integers (#771)Niklas Fiekas2020-05-297-2/+135
| | | | | | | | | | | | | | | | | | | | | | | * bpo-29882: Add an efficient popcount method for integers * Update 'sign bit' and versionadded in docs * Add entry to whatsnew document * Doc: use positive example, mention population count * Minor cleanups of the core code * Move popcount_digit closer to where it's used * Use z instead of self after conversion * Add 'absolute value' and 'population count' to docstring * Fix clinic error about missing summary line * Ensure popcount_digit is portable with 64-bit ints Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* Further de-linting of zoneinfo module (#20499)Paul Ganssle2020-05-294-12/+5
| | | | | | | * Remove unused imports in zoneinfo * Remove unused variables in zoneinfo * Remove else after raise
* bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435)Mark Dickinson2020-05-293-0/+24
| | | | | | | | | | | * Fix failure of _Py_dg_dtoa to remove trailing zeros * Add regression test and news entry * Add explanation about why it's safe to strip trailing zeros * Make code safer, clean up comments, add change note at top of file * Nitpick: avoid implicit int-to-float conversion in tests
* Indicate that abs() method accept argument that implement __abs__(), just ↵Windson yang2020-05-291-3/+2
| | | | like call() method in the docs (GH-20509)
* bpo-39040: Fix parsing of email mime headers with whitespace between ↵Abhilash Raj2020-05-293-0/+30
| | | | | | | | | | | | | | | encoded-words. (gh-17620) * bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string. It is fairly common to find malformed mime headers (especially content-disposition headers) where the parameter values, instead of being encoded to RFC standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and then enclosing the whole thing in quotes. The processing of these malformed headers was incorrectly leaving the spaces between encoded words in the decoded text (whitespace between adjacent encoded words is supposed to be stripped on decoding). This changeset fixes the encoded word processing inside quoted strings (bare-quoted-string) to do correct RFC 2047 decoding by stripping that whitespace.
* bpo-40784: Fix sqlite3 deterministic test (GH-20448)Erlend Egeberg Aasland2020-05-281-9/+27
|
* bpo-30064: Properly skip unstable loop.sock_connect() racing test (GH-20494)Fantix King2020-05-281-20/+26
|
* Note the output ordering of combinatoric functions (GH-19732)Ruaridh Williamson2020-05-281-9/+9
|
* bpo-40474: Updated coverage.yml to better report coverage stats (#19851)lrjball2020-05-282-0/+4
| | | Currently modules which are imported early are misreported in coverage. A fix is documented in the devguide, but the fix wasn't being used in CI.
* bpo-40806: Clarify that itertools.product immediately consumes its inpt ↵Ramil Nugmanov2020-05-281-0/+3
| | | | (GH-20492)
* bpo-1294959: Try to clarify the meaning of platlibdir (GH-20332)Michał Górny2020-05-283-8/+8
| | | | | | | | Try to make the meaning of platlibdir clear. The previous wording could be misinterpreted to suggest that it will be used to find all shared libraries on the system, and not just Python extensions. Furthermore, it was unclear whether it affects third-party (site-packages) extensions or not. The new wording tries to make its dual purpose clear, and provide the additional example of extensions in site-packages.
* bpo-37878: PyThreadState_DeleteCurrent() was not removed (GH-20489)Victor Stinner2020-05-281-3/+2
| | | | | Update What's New in Python 3.9. PyThreadState_DeleteCurrent was not removed, but excluded from the limited C API.
* bpo-40777: Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time ↵Petr Viktorin2020-05-282-3/+12
| | | | | | | (GH-20493) Recent changes to _datetimemodule broke compilation on mingw; see the comments in this change for details. FWIW, @corona10: this issue is why `PyType_FromModuleAndSpec` & friends take the `bases` argument at run time.
* bpo-40755: Add missing multiset operations to Counter() (GH-20339)Raymond Hettinger2020-05-284-6/+206
|
* bpo-25920: Remove socket.getaddrinfo() lock on macOS (GH-20177)Victor Stinner2020-05-282-47/+9
| | | | | | | | | On macOS, socket.getaddrinfo() no longer uses an internal lock to prevent race conditions when calling getaddrinfo(). getaddrinfo is thread-safe is macOS 10.5, whereas Python 3.9 requires macOS 10.6 or newer. The lock was also used on FreeBSD older than 5.3, OpenBSD older than 201311 and NetBSD older than 4.
* bpo-40275: Fix test.support.threading_helper (GH-20488)Victor Stinner2020-05-281-6/+7
| | | | | | | * Add missing sys import * Get verbose and gc_collect() from test.support * Remove unused starttime variable. Issues spotted by pyflakes.
* bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482)Hai Shi2020-05-284-14/+10
| | | Replace test.support.TESTFN_ENCODING with sys.getfilesystemencoding().
* bpo-30064: Fix unstable asyncio "racing" socket tests (GH-20485)Victor Stinner2020-05-281-0/+4
| | | | | Skip new "racing" socket tests which fail randomly until someone fix them, to ease analysis of buildbot failures (skip tests which are known to be broken/unstable).
* Revert "Upgrade bundled versions of pip & setuptools (#16782)" (GH-20484)Victor Stinner2020-05-285-7/+6
| | | This reverts commit feb0846c3a28b05b4cfbc6ab34c764957f3eff55.
* bpo-40792: Make the result of PyNumber_Index() always having exact type int. ↵Serhiy Storchaka2020-05-2851-187/+187
| | | | | | | | | | | | (GH-20443) Previously, the result could have been an instance of a subclass of int. Also revert bpo-26202 and make attributes start, stop and step of the range object having exact type int. Add private function _PyNumber_Index() which preserves the old behavior of PyNumber_Index() for performance to use it in the conversion functions like PyLong_AsLong().
* Improve IO tutorial's "Old string formatting" section (GH-16251)Adorilson Bezerra2020-05-281-5/+5
| | | | | | * Use a more universal explanation of string interpolation rather than specifically referencing sprintf(), which depends on the reader having a C background. Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-39939: Fix removeprefix issue number in the What's New in Python 3.9 ↵Elazar Gershuni2020-05-281-1/+1
| | | | (GH-20473)
* bpo-40275: test.support imports subprocess lazily (GH-20471)Victor Stinner2020-05-271-3/+11
| | | | | | | | | | | test.support module now imports the platform and subprocess modules lazily to reduce the number of modules imported by "import test.support". With this change, the threading module is no longer imported indirectly by "import test.support". Use sys.version rather than platform.machine() to detect the Windows ARM32 buildbot.
* bpo-40275: test.support.check_impl_detail() uses sys.implementation (GH-20468)Victor Stinner2020-05-271-1/+1
| | | | | check_impl_detail() of test.support now uses sys.implementation.name, instead of platform.python_implementation().lower(). This change prepares test.support to import the platform module lazily.
* bpo-40795: ctypes calls unraisablehook with an exception (GH-20452)Victor Stinner2020-05-276-41/+79
| | | | | | If ctypes fails to convert the result of a callback or if a ctypes callback function raises an exception, sys.unraisablehook is now called with an exception set. Previously, the error was logged into stderr by PyErr_Print().
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-2746-428/+483
|
* Revert "bpo-32604: PEP 554 for use in test suite (GH-19985)" (#20465)Pablo Galindo2020-05-274-865/+0
| | | This reverts commit 9d17cbf33df7cfb67ca0f37f6463ba5c18676641.
* bpo-37129: Add os.RWF_APPEND flag for os.pwritev() (GH-20336)YoSTEALTH2020-05-274-6/+27
|
* Fix compiler warnings in _zoneinfo.c (GH-20342)Pablo Galindo2020-05-271-30/+26
| | | | | | | ``` D:\a\cpython\cpython\Modules\_zoneinfo.c(903,52): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data [D:\a\cpython\cpython\PCbuild\_zoneinfo.vcxproj] D:\a\cpython\cpython\Modules\_zoneinfo.c(904,44): warning C4267: '=': conversion from 'size_t' to 'unsigned int', possible loss of data [D:\a\cpython\cpython\PCbuild\_zoneinfo.vcxproj] D:\a\cpython\cpython\Modules\_zoneinfo.c(1772,31): warning C4244: '=': conversion from 'ssize_t' to 'uint8_t', possible loss of data [D:\a\cpython\cpython\PCbuild\_zoneinfo.vcxproj] ```
* bpo-40614: Respect feature version for f-string debug expressions (GH-20196)Shantanu2020-05-274-0/+17
| | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-40791: Use CRYPTO_memcmp() for compare_digest (#20456)Christian Heimes2020-05-277-37/+221
| | | | | | | | hashlib.compare_digest uses OpenSSL's CRYPTO_memcmp() function when OpenSSL is available. Note: The _operator module is a builtin module. I don't want to add libcrypto dependency to libpython. Therefore I duplicated the wrapper function and added a copy to _hashopenssl.c.
* bpo-30064: Fix asyncio loop.sock_* race condition issue (#20369)Fantix King2020-05-273-16/+157
|
* Refactor error handling code in Parser/pegen/pegen.c (GH-20440)Lysandros Nikolaou2020-05-271-3/+8
| | | | | | Set p->error_indicator in various places, where it's needed, but it's not done. Automerge-Triggered-By: @gvanrossum
* bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914)Sean Gillespie2020-05-273-0/+31
| | | | | | | | | | ctypes now raises an ArgumentError when a callback is invoked with more than 1024 arguments. The ctypes module allocates arguments on the stack in ctypes_callproc() using alloca(), which is problematic when large numbers of arguments are passed. Instead of a stack overflow, this commit raises an ArgumentError if more than 1024 parameters are passed.
* bpo-39573: Convert Py_REFCNT and Py_SIZE to functions (GH-20429)Victor Stinner2020-05-276-14/+44
| | | | | | | | | | | Convert Py_REFCNT() and Py_SIZE() macros to static inline functions. They cannot be used as l-value anymore: use Py_SET_REFCNT() and Py_SET_SIZE() to set an object reference count and size. Replace &Py_SIZE(self) with &((PyVarObject*)self)->ob_size in arraymodule.c. This change is backward incompatible on purpose, to prepare the C API for an opaque PyObject structure.
* bpo-37999: Fix outdated __int__ and nb_int references in comments (GH-20449)Mark Dickinson2020-05-272-38/+33
| | | | | | | | | * Fix outdated __int__ and nb_int references in comments * Also update C-API documentation * Add back missing 'method' word * Remove .. deprecated notices
* Upgrade bundled versions of pip & setuptools (#16782)Xavier Fernandez2020-05-275-6/+7
|
* Fix the link to ncurses patch download in macos installer build script ↵Oleg Höfling2020-05-271-1/+1
| | | | | | | (GH-20421) Reason: the link `ftp://invisible-island.net/ncurses//5.9/ncurses-5.9-20120616-patch.sh.bz2` is dead, which prevents `Mac/BuildScript/build-installer.py` from completing. Looks like the host of the FTP server was changed to `ftp.invisible-island.net`, thus this proposal. Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
* bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for ↵Pablo Galindo2020-05-2712-94/+87
| | | | | | | | | PyType_FromSpec types (reverts GH-19414) (GH-20264) Heap types now always visit the type in tp_traverse. See added docs for details. This reverts commit 0169d3003be3d072751dd14a5c84748ab63a249f. Automerge-Triggered-By: @encukou
* Fix lookahead of soft keywords in the PEG parser (GH-20436)Pablo Galindo2020-05-264-2/+31
| | | Automerge-Triggered-By: @gvanrossum
* bpo-40611: Adds MAP_POPULATE to the mmap module (GH-20061)Ethan Steinberg2020-05-263-1/+25
| | | | MAP_POPULATE constant has now been added to the list of exported mmap module flags.
* Add soft keywords (GH-20370)Guido van Rossum2020-05-264-4/+75
| | | | | | | These are like keywords but they only work in context; they are not reserved except when there is an exact match. This would enable things like match statements without reserving `match` (which would be bad for the `re.match()` function and probably lots of other places). Automerge-Triggered-By: @gvanrossum
* bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)Serhiy Storchaka2020-05-2687-2937/+226
| | | | Only __index__ should be used to make integer conversions lossless.
* bpo-40756: Default second argument of LoggerAdapter.__init__ to None (GH-20362)Arturo Escaip2020-05-262-1/+3
| | | | | | | | | | | | | | | | | | | | | The 'extra' argument is not always used by custom logger adapters. For example: ```python class IndentAdapter(logging.LoggerAdapter): def process(self, msg, kwargs): indent = kwargs.pop(indent, 1) return ' ' * indent + msg, kwargs ``` It is cleaner and friendlier to default the 'extra' argument to None instead of either forcing the subclasses of LoggerAdapter to pass a None value directly or to override the constructor. This change is backward compatible because existing calls to `LoggerAdapter.__init__` are already passing a value for the second argument. Automerge-Triggered-By: @vsajip
* bpo-39244: multiprocessing return default start method first on macOS (GH-18625)idomic2020-05-263-4/+9
|
* bpo-40737: Fix possible reference leak for sqlite3 initialization (GH-20323)Erlend Egeberg Aasland2020-05-262-8/+13
|
* bpo-40637: Fix test_pbkdf2_hmac_py for missing sha1 (#20422)Christian Heimes2020-05-261-9/+23
|
* bpo-39301: State that floor division is used for right shift operations ↵Zackery Spytz2020-05-261-4/+2
| | | | | | | (GH-20347) * bpo-39301: State that floor division is used for right shift operations * Remove "without overflow check"
* Remove duplicated words words (GH-20413)Serhiy Storchaka2020-05-266-6/+6
|
* bpo-40745: Fix typos in NewType docs (GH-20379)ziheng2020-05-261-2/+2
|