summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-31033: Improve the traceback for cancelled asyncio tasks (GH-19951)Chris Jerdonek2020-05-1710-81/+291
| | | | | When an asyncio.Task is cancelled, the exception traceback now starts with where the task was first interrupted. Previously, the traceback only had "depth one."
* bpo-13601: Mention stderr's line buffering in What's New (GH-20168)Shantanu2020-05-171-0/+4
|
* bpo-40651: Improve LRU recipe in the OrderedDict documentation (GH-#20139)qudongfang2020-05-171-0/+2
|
* bpo-40665: Use Argument Clinic for the bisect module (GH-20163)Shantanu2020-05-173-131/+412
|
* bpo-40536: Add zoneinfo.available_timezones (GH-20158)Paul Ganssle2020-05-176-2/+230
| | | | | This was not specified in the PEP, but it will likely be a frequently requested feature if it's not included. This includes only the "canonical" zones, not a simple listing of every valid value of `key` that can be passed to `Zoneinfo`, because it seems likely that that's what people will want.
* bpo-39058: Preserve attribute order in argparse Namespace reprs. (GH-17621)Raymond Hettinger2020-05-173-2/+6
|
* bpo-39705 : sorted() tutorial example under looping techniques improved ↵Rahul Kumaresan2020-05-172-0/+17
| | | | (GH-18999)
* Doc: change 'Posix' for 'POSIX' (GH-20001)Mathieu Dupuy2020-05-173-6/+6
|
* Doc: move a dot outside double quotes (GH-20007)Mathieu Dupuy2020-05-171-1/+1
|
* bpo-37630: Fix spelling shake128 -> shake_128 (GH-20154)Christian Heimes2020-05-172-39/+39
|
* bpo-40645: Implement HMAC in C (GH-20129)Christian Heimes2020-05-174-89/+694
| | | | | | | | | The internal module ``_hashlib`` wraps and exposes OpenSSL's HMAC API. The new code will be used in Python 3.10 after the internal implementation details of the pure Python HMAC module are no longer part of the public API. The code is based on a patch by Petr Viktorin for RHEL and Python 3.6. Co-Authored-By: Petr Viktorin <encukou@gmail.com>
* bpo-39976: Add **other_popen_kwargs to subprocess docs (GH-20145)Zackery Spytz2020-05-171-4/+8
| | | | Patch by Zackery Spytz.
* bpo-35569: add Erlend to Misc/ACKS (GH-20146)Ned Deily2020-05-171-0/+1
|
* bpo-35569: Expose RFC 3542 IPv6 socket options on macOS (GH-19526)Erlend Egeberg Aasland2020-05-173-2/+38
|
* bpo-29587: Add another test for the gen.throw() fix. (GH-19859)Chris Jerdonek2020-05-161-0/+22
|
* bpo-40334: Improvements to error-handling code in the PEG parser (GH-20003)Lysandros Nikolaou2020-05-172-386/+669
| | | | | | | | The following improvements are implemented in this commit: - `p->error_indicator` is set, in case malloc or realloc fail. - Avoid memory leaks in the case that realloc fails. - Call `PyErr_NoMemory()` instead of `PyErr_Format()`, because it requires no memory. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-38870: Use subTest in test_unparse for better error reporting (GH-20141)Pablo Galindo2020-05-171-7/+11
|
* Use subTest in test_exceptions for better error reporting (GH-20140)Pablo Galindo2020-05-171-26/+29
|
* bpo-40645: Deprecated internal details of hmac.HMAC (GH-20132)Christian Heimes2020-05-174-23/+59
|
* bpo-38870: Implement round tripping support for typed AST in ast.unparse ↵Batuhan Taskaya2020-05-172-8/+56
| | | | (GH-17797)
* bpo-38870: Correctly handle empty docstrings in ast.unparse (GH-18768)Batuhan Taskaya2020-05-162-7/+21
| | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40165: Suppress stderr when checking if test_stty_match should be ↵Batuhan Taskaya2020-05-161-1/+5
| | | | skipped (GH-19325)
* bpo-40211: Clarify os.preadv and os.pwritev are supported on AIX 7.1+ (GH-19401)Batuhan Taskaya2020-05-161-2/+4
|
* bpo-39740: Early declare devpoll_methods to support old compilers (GH-19281)Batuhan Taskaya2020-05-161-0/+2
|
* bpo-38870: Don't put unnecessary parentheses on class declarations in ↵Batuhan Taskaya2020-05-162-2/+15
| | | | ast.parse (GH-20134)
* bpo-38870: Do not separate factor prefixes in ast.unparse (GH-20133)Batuhan Taskaya2020-05-162-4/+13
|
* bpo-37630: Use SHA3 and SHAKE XOF from OpenSSL (GH-16049)Christian Heimes2020-05-166-21/+845
| | | | | | | OpenSSL 1.1.1 comes with SHA3 and SHAKE builtin. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
* bpo-40503: Add documentation and what's new entry for zoneinfo (GH-20006)Paul Ganssle2020-05-164-1/+430
| | | | | | | | | This adds the documentation for the `zoneinfo` module added in PEP 615: https://www.python.org/dev/peps/pep-0615/ The implementation itself was GH-19909: https://github.com/python/cpython/pull/19909 bpo-40503: https://bugs.python.org/issue40503 Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-24416: Return named tuple from date.isocalendar() (GH-20113)Paul Ganssle2020-05-167-29/+297
| | | | | | | | | | | | | | | | | | | | | | | {date, datetime}.isocalendar() now return a private custom named tuple object IsoCalendarDate rather than a simple tuple. In order to leave IsocalendarDate as a private class and to improve what backwards compatibility is offered for pickling the result of a datetime.isocalendar() call, add a __reduce__ method to the named tuples that reduces them to plain tuples. (This is the part of this PR most likely to cause problems — if it causes major issues, switching to a strucseq or equivalent would be prudent). The pure python implementation of IsoCalendarDate uses positional-only arguments, since it is private and only constructed by position anyway; the equivalent change in the argument clinic on the C side would require us to move the forward declaration of the type above the clinic import for whatever reason, so it seems preferable to hold off on that for now. bpo-24416: https://bugs.python.org/issue24416 Original PR by Dong-hee Na with only minor alterations by Paul Ganssle. Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-39305: Update nntplib to merge nntplib.NNTP and nntplib._NNTPBase (GH-19817)Dong-hee Na2020-05-163-60/+56
|
* bpo-40275: lazy import modules in test.support (GH-20128)Hai Shi2020-05-161-4/+9
| | | Automerge-Triggered-By: @vstinner
* bpo-40192: Use thread_cputime for time.thread_time to improve resolution ↵Batuhan Taskaya2020-05-163-0/+40
| | | | | | | (GH-19381) On AIX, time.thread_time() is now implemented with thread_cputime() which has nanosecond resolution, rather than clock_gettime(CLOCK_THREAD_CPUTIME_ID) which has a resolution of 10 ms.
* bpo-40503: PEP 615: Tests and implementation for zoneinfo (GH-19909)Paul Ganssle2020-05-1627-2/+6383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial implementation of PEP 615, the zoneinfo module, ported from the standalone reference implementation (see https://www.python.org/dev/peps/pep-0615/#reference-implementation for a link, which has a more detailed commit history). This includes (hopefully) all functional elements described in the PEP, but documentation is found in a separate PR. This includes: 1. A pure python implementation of the ZoneInfo class 2. A C accelerated implementation of the ZoneInfo class 3. Tests with 100% branch coverage for the Python code (though C code coverage is less than 100%). 4. A compile-time configuration option on Linux (though not on Windows) Differences from the reference implementation: - The module is arranged slightly differently: the accelerated module is `_zoneinfo` rather than `zoneinfo._czoneinfo`, which also necessitates some changes in the test support function. (Suggested by Victor Stinner and Steve Dower.) - The tests are arranged slightly differently and do not include the property tests. The tests live at test/test_zoneinfo/test_zoneinfo.py rather than test/test_zoneinfo.py or test/test_zoneinfo/__init__.py because we may do some refactoring in the future that would likely require this separation anyway; we may: - include the property tests - automatically run all the tests against both pure Python and C, rather than manually constructing C and Python test classes (similar to the way this works with test_datetime.py, which generates C and Python test cases from datetimetester.py). - This includes a compile-time configuration option on Linux (though not on Windows); added with much help from Thomas Wouters. - Integration into the CPython build system is obviously different from building a standalone zoneinfo module wheel. - This includes configuration to install the tzdata package as part of CI, though only on the coverage jobs. Introducing a PyPI dependency as part of the CI build was controversial, and this is seen as less of a major change, since the coverage jobs already depend on pip and PyPI. Additional changes that were introduced as part of this PR, most / all of which were backported to the reference implementation: - Fixed reference and memory leaks With much debugging help from Pablo Galindo - Added smoke tests ensuring that the C and Python modules are built The import machinery can be somewhat fragile, and the "seamlessly falls back to pure Python" nature of this module makes it so that a problem building the C extension or a failure to import the pure Python version might easily go unnoticed. - Adjustments to zoneinfo.__dir__ Suggested by Petr Viktorin. - Slight refactorings as suggested by Steve Dower. - Removed unnecessary if check on std_abbr Discovered this because of a missing line in branch coverage.
* bpo-40457: Support OpenSSL without TLS 1.0/1.1 (GH-19862)Christian Heimes2020-05-153-38/+33
| | | | | | | | | | | OpenSSL can be build without support for TLS 1.0 and 1.1. The ssl module now correctly adheres to OPENSSL_NO_TLS1 and OPENSSL_NO_TLS1_1 flags. Also update multissltest to test with latest OpenSSL and LibreSSL releases. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
* bpo-39075: types.SimpleNamespace no longer sorts attributes in its repr ↵Zackery Spytz2020-05-154-7/+9
| | | | (GH-19430)
* bpo-31033: Add a msg argument to Future.cancel() and Task.cancel() (GH-19979)Chris Jerdonek2020-05-1510-73/+358
|
* Add Andrew York to ACKS for GH-19622. (GH-20105)Chris Jerdonek2020-05-151-0/+1
| | | | This updates ACKS for commit 003708bcf8f2c58d4b65f68318acf164d713e008 contributed by Andrew York.
* bpo-40637: Add option to disable builtin hashes (GH-20121)Christian Heimes2020-05-156-30/+158
| | | | | Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
* bpo-40445: Update compileall.compile_dir docs (GH-19806)Shantanu2020-05-151-1/+2
|
* bpo-40636: Clarify the zip built-in docstring. (GH-20118)Gregory P. Smith2020-05-152-6/+10
| | | | | | | | | | | | | | | | | | | | | Clarify the zip built-in docstring. This puts much simpler text up front along with an example. As it was, the zip built-in docstring was technically correct. But too technical for the reader who shouldn't _need_ to know about `__next__` and `StopIteration` as most people do not need to understand the internal implementation details of the iterator protocol in their daily life. This is a documentation only change, intended to be backported to 3.8; it is only tangentially related to PEP-618 which might offer new behavior options in the future. Wording based a bit more on enumerate per Brandt's suggestion. This gets rid of the legacy wording paragraph which seems too tied to implementation details of the iterator protocol which isn't relevant here. Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* bpo-40163: Fix multissltest download of old OpenSSL (GH-19329)Christian Heimes2020-05-152-11/+44
|
* bpo-40607: Reraise exception during task cancelation in asyncio.wait_for() ↵romasku2020-05-155-6/+66
| | | | | | | | | | | | | | | (GH-20054) Currently, if asyncio.wait_for() timeout expires, it cancels inner future and then always raises TimeoutError. In case those future is task, it can handle cancelation mannually, and those process can lead to some other exception. Current implementation silently loses thoses exception. To resolve this, wait_for will check was the cancelation successfull or not. In case there was exception, wait_for will reraise it. Co-authored-by: Roman Skurikhin <roman.skurikhin@cruxlab.com>
* bpo-40515: Require OPENSSL_THREADS (GH-19953)Christian Heimes2020-05-153-1/+12
| | | | | | | The ``ssl`` and ``hashlib`` modules now actively check that OpenSSL is build with thread support. Python 3.7.0 made thread support mandatory and no longer works safely with a no-thread builds. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-40479: Test with latest OpenSSL versions (GH-20108)Christian Heimes2020-05-152-3/+60
| | | | | | | | | | | | | * 1.0.2u (EOL) * 1.1.0l (EOL) * 1.1.1g * 3.0.0-alpha2 (disabled for now) Build the FIPS provider and create a FIPS configuration file for OpenSSL 3.0.0. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
* bpo-40479: Fix hashlib issue with OpenSSL 3.0.0 (GH-20107)Christian Heimes2020-05-153-8/+18
| | | | | | | | | | OpenSSL 3.0.0-alpha2 was released today. The FIPS_mode() function has been deprecated and removed. It no longer makes sense with the new provider and context system in OpenSSL 3.0.0. EVP_default_properties_is_fips_enabled() is good enough for our needs in unit tests. It's an internal API, too. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-40055: test_distutils leaves warnings filters unchanged (GH-20095)Victor Stinner2020-05-152-0/+9
| | | | | distutils.tests now saves/restores warnings filters to leave them unchanged. Importing tests imports docutils which imports pkg_resources which adds a warnings filter.
* Trivial typo fix in _tkinter.c (GH-19622)Andrew York2020-05-151-7/+7
| | | Change spelling of a #define in _tkinter.c from HAVE_LIBTOMMAMTH to HAVE_LIBTOMMATH, since this is used to keep track of tclTomMath.h, not tclTomMamth.h. No other file seems to refer to this variable.
* Fix typo in code comment in main_loop label. (GH-20068)Chris Jerdonek2020-05-141-1/+1
|
* bpo-40612: Fix SyntaxError edge cases in traceback formatting (GH-20072)Guido van Rossum2020-05-145-39/+94
| | | | | | | | | | | | | This fixes both the traceback.py module and the C code for formatting syntax errors (in Python/pythonrun.c). They now both consistently do the following: - Suppress caret if it points left of text - Allow caret pointing just past end of line - If caret points past end of line, clip to *just* past end of line The syntax error formatting code in traceback.py was mostly rewritten; small, subtle changes were applied to the C code in pythonrun.c. There's still a difference when the text contains embedded newlines. Neither handles these very well, and I don't think the case occurs in practice. Automerge-Triggered-By: @gvanrossum
* Update code comment re: location of struct _is. (GH-20067)Chris Jerdonek2020-05-141-1/+1
|