summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435)Mark Dickinson2020-05-291-0/+2
| | | | | | | | | | | * 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
* bpo-39040: Fix parsing of email mime headers with whitespace between ↵Abhilash Raj2020-05-291-0/+2
| | | | | | | | | | | | | | | 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-1294959: Try to clarify the meaning of platlibdir (GH-20332)Michał Górny2020-05-281-1/+1
| | | | | | | | 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-40777: Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time ↵Petr Viktorin2020-05-281-0/+2
| | | | | | | (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-281-0/+2
|
* bpo-25920: Remove socket.getaddrinfo() lock on macOS (GH-20177)Victor Stinner2020-05-281-0/+7
| | | | | | | | | 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.
* Revert "Upgrade bundled versions of pip & setuptools (#16782)" (GH-20484)Victor Stinner2020-05-281-1/+0
| | | This reverts commit feb0846c3a28b05b4cfbc6ab34c764957f3eff55.
* bpo-40792: Make the result of PyNumber_Index() always having exact type int. ↵Serhiy Storchaka2020-05-283-0/+7
| | | | | | | | | | | | (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().
* bpo-40795: ctypes calls unraisablehook with an exception (GH-20452)Victor Stinner2020-05-271-0/+4
| | | | | | 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().
* Revert "bpo-32604: PEP 554 for use in test suite (GH-19985)" (#20465)Pablo Galindo2020-05-271-2/+0
| | | This reverts commit 9d17cbf33df7cfb67ca0f37f6463ba5c18676641.
* bpo-37129: Add os.RWF_APPEND flag for os.pwritev() (GH-20336)YoSTEALTH2020-05-271-0/+1
|
* bpo-40614: Respect feature version for f-string debug expressions (GH-20196)Shantanu2020-05-271-0/+1
| | | | 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-271-0/+2
| | | | | | | | 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-271-0/+1
|
* bpo-13097: ctypes: limit callback to 1024 arguments (GH-19914)Sean Gillespie2020-05-271-0/+1
| | | | | | | | | | 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-271-0/+5
| | | | | | | | | | | 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.
* Upgrade bundled versions of pip & setuptools (#16782)Xavier Fernandez2020-05-271-0/+1
|
* bpo-40217: Ensure Py_VISIT(Py_TYPE(self)) is always called for ↵Pablo Galindo2020-05-271-0/+4
| | | | | | | | | 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
* bpo-40611: Adds MAP_POPULATE to the mmap module (GH-20061)Ethan Steinberg2020-05-261-0/+1
| | | | MAP_POPULATE constant has now been added to the list of exported mmap module flags.
* bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)Serhiy Storchaka2020-05-261-0/+5
| | | | 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-261-0/+2
| | | | | | | | | | | | | | | | | | | | | 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-261-0/+2
|
* bpo-40737: Fix possible reference leak for sqlite3 initialization (GH-20323)Erlend Egeberg Aasland2020-05-261-0/+1
|
* Remove duplicated words words (GH-20413)Serhiy Storchaka2020-05-262-2/+2
|
* bpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399)Lysandros Nikolaou2020-05-261-0/+1
| | | | | | | | When a `SyntaxError` in the expression part of a fstring is found, the filename attribute of the `SyntaxError` is always `<fstring>`. With this commit, it gets changed to always have the name of the file the fstring resides in. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-23082: Better error message for PurePath.relative_to() from pathlib ↵Rotuna2020-05-251-0/+1
| | | | | (GH-19611) Co-authored-by: Sadhana Srinivasan <rotuna@Sadhanas-MBP.fritz.box>
* bpo-40750: Support -d flag in the new parser (GH-20340)Pablo Galindo2020-05-251-0/+1
|
* bpo-39573: Convert Py_TYPE() to a static inline function (GH-20290)Dong-hee Na2020-05-251-0/+2
|
* bpo-40671: Prepare _hashlib for PEP 489 (GH-20180)Christian Heimes2020-05-251-0/+1
|
* bpo-40695: Limit hashlib builtin hash fallback (GH-20259)Christian Heimes2020-05-251-0/+3
| | | | | | | :mod:`hashlib` no longer falls back to builtin hash implementations when OpenSSL provides a hash digest and the algorithm is blocked by security policy. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-35714: Reject null characters in struct format strings (GH-16928)Zackery Spytz2020-05-251-0/+2
| | | | struct.error is now raised if there is a null character in a struct format string.
* bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382)Rémi Lapeyre2020-05-241-0/+2
|
* bpo-40723: Make IDLE autocomplete test run without __main__.__file__ (GH-20311)Florian Dahlitz2020-05-241-0/+1
| | | | This was the only failure running unittest.main(test.test_idle) after imports.
* bpo-40552 Add 'users' variable in code sample (tutorial 4.2). (GH-19992)Antoine2020-05-231-0/+2
| | | | | | | * Add 'users' variable in code sample. * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-40679: Use the function's qualname in certain TypeErrors (GH-20236)Dennis Sweeney2020-05-221-0/+2
| | | | Patch by Dennis Sweeney.
* bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)Chris Jerdonek2020-05-221-0/+2
| | | | | | | | This updates _PyErr_ChainStackItem() to use _PyErr_SetObject() instead of _PyErr_ChainExceptions(). This prevents a hang in certain circumstances because _PyErr_SetObject() performs checks to prevent cycles in the exception context chain while _PyErr_ChainExceptions() doesn't.
* bpo-9216: hashlib usedforsecurity fixes (GH-20258)Christian Heimes2020-05-221-0/+3
| | | | | | | | | func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor ``_hashlib.new()``. test_hashlib and test_smtplib handle strict security policy better. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
* bpo-40630: Add tracemalloc.reset_peak (GH-20102)Huon Wilson2020-05-222-0/+3
| | | | | | | The reset_peak function sets the peak memory size to the current size, representing a resetting of that metric. This allows for recording the peak of specific sections of code, ignoring other code that may have had a higher peak (since the most recent `tracemalloc.start()` or tracemalloc.clear_traces()` call).
* bpo-40698: Improve distutils upload hash digests (GH-20260)Christian Heimes2020-05-201-0/+2
| | | | | | | - Fix upload test on systems that blocks MD5 - Add SHA2-256 and Blake2b-256 digests based on new Warehous and twine specs. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-34956: edit and format better NEWS item in 3.9.0b1 changelog (GH-20255)Ned Deily2020-05-201-6/+7
|
* bpo-39631: Adds NEWS entry (GH-20227)Steve Dower2020-05-191-0/+2
|
* bpo-32604: PEP 554 for use in test suite (GH-19985)Joannah Nanjekye2020-05-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PEP 554 for use in test suite * 📜🤖 Added by blurb_it. * Fix space * Add doc to doc tree * Move to modules doc tree * Fix suspicious doc errors * Fix test__all * Docs docs docs * Support isolated and fix wait * Fix white space * Remove undefined from __all__ * Fix recv and add exceptions * Remove unused exceptions, fix pep 8 formatting errors and fix _NOT_SET in recv_nowait() Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-40683: Add zoneinfo to LIBSUBDIRS (#20229)Paul Ganssle2020-05-191-0/+2
| | | | | Without this, only the _zoneinfo module is getting installed, not the zoneinfo module. I believe this was not noticed earlier because test.test_zoneinfo was also not being installed.
* bpo-40677: Define IO_REPARSE_TAG_APPEXECLINK explicitly (GH-20206)Minmin Gong2020-05-191-0/+1
| | | This allows building with older versions of the Windows SDK where the value is not defined.
* Consolidate 3.9.0b1 NEWS in the master branchŁukasz Langa2020-05-1996-173/+960
|
* bpo-32309: Implement asyncio.to_thread() (GH-20143)Kyle Stanley2020-05-191-0/+4
| | | | | Implements `asyncio.to_thread`, a coroutine for asynchronously running IO-bound functions in a separate thread without blocking the event loop. See the discussion starting from [here](https://github.com/python/cpython/pull/18410#issuecomment-628930973) in GH-18410 for context. Automerge-Triggered-By: @aeros
* bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c ↵Batuhan Taskaya2020-05-181-0/+2
| | | | (GH-20156)
* bpo-40662: Fixed ast.get_source_segment for ast nodes that have incomplete ↵Irit Katriel2020-05-181-0/+1
| | | | | location information (GH-20157) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40257: Revert changes to inspect.getdoc() (GH-20073)Serhiy Storchaka2020-05-181-0/+1
|
* bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h ↵Minmin Gong2020-05-181-0/+1
| | | | (GH-20137)