summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[3.8] bpo-27657: Fix urlparse() with numeric paths (GH-661) (#16839)"revert-16839-backport-5a88d50-3.8Senthil Kumaran2020-02-162-7/+25
| | | | This reverts commit 0f3187c1ce3b3ace60f6c1691dfa3d4e744f0384.
* [3.8] closes bpo-39630: Update pointers to string literals to be const char ↵Benjamin Peterson2020-02-133-4/+4
| | | | | | | | *. (GH-18511) (cherry picked from commit 7386a70746cf9aaf2d95db75d9201fb124f085df) Co-authored-by: Andy Lester <andy@petdance.com>
* closes bpo-39619 Fix os.chroot on HP-UX 11.31 (GH-18495)Miss Islington (bot)2020-02-133-1/+26
| | | | | | | | Setting `-D_XOPEN_SOURCE=700` on HP-UX causes system functions such as chroot to be undefined. This change stops `_XOPEN_SOURCE` begin set on HP-UX Co-authored-by: Benjamin Peterson <benjamin@python.org> (cherry picked from commit a9edf44a2de9b23a1690b36cdfeed7b41ab763bd) Co-authored-by: Ian Norton <inorton@gmail.com>
* bpo-39545: Document changes in the support of await in f-strings. (GH-18456)Miss Islington (bot)2020-02-132-0/+10
| | | | | | https://bugs.python.org/issue39545 (cherry picked from commit f632736023502816f2e6bd714d1b48c81aa2ccc1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.8] bpo-39606: allow closing async generators that are already closed ↵Miss Islington (bot)2020-02-133-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-18475) (GH-18501) The fix for [bpo-39386](https://bugs.python.org/issue39386) attempted to make it so you couldn't reuse a agen.aclose() coroutine object. It accidentally also prevented you from calling aclose() at all on an async generator that was already closed or exhausted. This commit fixes it so we're only blocking the actually illegal cases, while allowing the legal cases. The new tests failed before this patch. Also confirmed that this fixes the test failures we were seeing in Trio with Python dev builds: https://github.com/python-trio/trio/pull/1396 https://bugs.python.org/issue39606 (cherry picked from commit 925dc7fb1d0db85dc137afa4cd14211bf0d67414) Co-authored-by: Nathaniel J. Smith <njs@pobox.com> https://bugs.python.org/issue39606 Automerge-Triggered-By: @njsmith
* bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, ↵Steve Dower2020-02-1315-17/+314
| | | | | | `resource`, `shutil`, `signal`, `syslog` (GH-18407) Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* closes bpo-39621: Make buf arg to md5_compress be const. (GH-18497)Miss Islington (bot)2020-02-121-2/+2
| | | | | (cherry picked from commit 597ebed748d0b0c061f8c108bd98270d103286c1) Co-authored-by: Andy Lester <andy@petdance.com>
* bpo-39474: Fix AST pos for expressions like (a)(b), (a)[b] and (a).b. (GH-18477)Miss Islington (bot)2020-02-123-18/+47
| | | | | (cherry picked from commit 6e619c48b8e804ece9521453fc8da0640a04d5b1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-21016: pydoc and trace use sysconfig (GH-18476)Miss Islington (bot)2020-02-123-6/+9
| | | | | | | | | | | bpo-21016, bpo-1294959: The pydoc and trace modules now use the sysconfig module to get the path to the Python standard library, to support uncommon installation path like /usr/lib64/python3.9/ on Fedora. Co-Authored-By: Jan Matějek <jmatejek@suse.com> (cherry picked from commit 4fac7ed43ebf1771a8fe86fdfe7b9991f3be78cd) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-39219: Fix SyntaxError attributes in the tokenizer. (GH-17828)Miss Islington (bot)2020-02-123-5/+47
| | | | | | | * Always set the text attribute. * Correct the offset attribute for non-ascii sources. (cherry picked from commit 0cc6b5e559b8303b18fdd56c2befd900fe7b5e35) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-39605: Remove a cast that causes a warning. (GH-18473)Miss Islington (bot)2020-02-111-1/+1
| | | | | (cherry picked from commit 95905ce0f41fd42eb1ef60ddb83f057401c3d52f) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-39595: Improve zipfile.Path performance (GH-18406) (GH-18472)Miss Islington (bot)2020-02-117-68/+254
| | | | | | | | | | | | | | | | | | | | | | | * Improve zipfile.Path performance on zipfiles with a large number of entries. * 📜🤖 Added by blurb_it. * Add bpo to blurb * Sync with importlib_metadata 1.5 (6fe70ca) * Update blurb. * Remove compatibility code * Add stubs module, omitted from earlier commit Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit e5bd73632e77dc5ab0cab77e48e94ca5e354be8a) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* closes bpo-39605: Fix some casts to not cast away const. (GH-18453)Miss Islington (bot)2020-02-119-35/+35
| | | | | | | | | | | | | | | | | | gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either: Adding the const to the type cast, as in: - return _PyUnicode_FromUCS1((unsigned char*)s, size); + return _PyUnicode_FromUCS1((const unsigned char*)s, size); or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in: - PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno); + PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno); These changes will not change code, but they will make it much easier to check for errors in consts (cherry picked from commit e6be9b59a911626d6597fe148c32f0342bd2bd24) Co-authored-by: Andy Lester <andy@petdance.com>
* docs: macos - change "versiona" to "versions" (GH-18467) (GH-18469)Miss Islington (bot)2020-02-111-1/+1
| | | | | (cherry picked from commit 029e8401b7741cc0964b5f38d2c2264749dbff6b) Co-authored-by: @RandyMcMillan <randy.lee.mcmillan@gmail.com>
* bpo-39299: Add more tests for mimetypes and its cli. (GH-17949)Miss Islington (bot)2020-02-112-5/+85
| | | | | | | | | | * Add tests for case insensitive check of types and extensions as fallback. * Add tests for data url with no comma. * Add tests for read_mime_types. * Add tests for the mimetypes cli and refactor __main__ code to private function. * Restore mimetypes.knownfiles value at the end of the test. (cherry picked from commit d8efc1495194228c3a4cd472200275d6491d8e2d) Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
* Post 3.8.2rc1Łukasz Langa2020-02-111-1/+1
|
* Merge tag 'v3.8.2rc1' into 3.8Łukasz Langa2020-02-1162-165/+705
|\ | | | | | | Python 3.8.2rc1
| * Python 3.8.2rc1v3.8.2rc1Łukasz Langa2020-02-1062-165/+705
| |
* | bpo-38374: Remove weakref.ReferenceError from docs (GH-18452)Miss Islington (bot)2020-02-102-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | Reflecting changes to the code, removed weakref.ReferenceError from weakref.rst and exceptions.rst. Issue submitter provided evidence that the `weakref.ReferenceError` alias for `ReferenceError` was removed from the code in 2007. Working with @gvanrossum at PyCascades CPython sprint we looked at the code and confirmed that `weakref.ReferenceError` was no longer in `weakref.py`. Based on that analysis I removed references `weakref.ReferenceError` from the two documents where it was still being referenced: `weakref.rst` and `exceptions.rst`. https://bugs.python.org/issue38374 (cherry picked from commit 4eb9f4313cfaea6a9611221024a1c54f5662cc37) Co-authored-by: Roger Hurwitz <rogerhurwitz@gmail.com>
* | bpo-39600: Adjust code, add idlelib/NEWS item (GH-18449)Miss Islington (bot)2020-02-102-4/+4
| | | | | | | | | | | | Complete previous patch. (cherry picked from commit 96ce22706735779cf8cc46eaaa5ac61359364b5a) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* | bpo-39594: Fix typo in os.times documentation (GH-18443)Miss Islington (bot)2020-02-101-4/+2
| | | | | | | | | | | | | | | | There was an extra space in the url markup, causing the documentation not rendered properly. https://bugs.python.org/issue39594 (cherry picked from commit 37c55b2b49a3acb7c56c9f6a5062bc6e4e35bc1c) Co-authored-by: Roger Hurwitz <rogerhurwitz@gmail.com>
* | bpo-13826: Clarify Popen constructor example (GH-18438)Miss Islington (bot)2020-02-101-2/+8
| | | | | | | | | | | | | | | | | | Clarifies that the use of `shlex.split` is more instructive than normative, and provides a simpler example. https://bugs.python.org/issue13826 (cherry picked from commit 95d024d585bd3ed627437a2f0cbc783c8a014c8a) Co-authored-by: Tim D. Smith <github@tim-smith.us>
* | Improve grammar in the import system reference documentation (GH-18209)Miss Islington (bot)2020-02-101-1/+1
| | | | | | | | | | | | | | | | Replaced the period with a comma. Automerge-Triggered-By: @Mariatta (cherry picked from commit d47d0c8e9f2ca0f9f5d1bf0b35006a9a4d5ca684) Co-authored-by: Bonifacio de Oliveira <bonifacio.segundo@gmail.com>
* | bpo-39600, IDLE: Remove duplicated font names (GH-18430)Miss Islington (bot)2020-02-102-2/+4
| | | | | | | | | | | | In the font configuration window, remove duplicated font names. (cherry picked from commit ed335cf53b5d4bca9a08c9b83ba684ba17be0f10) Co-authored-by: Victor Stinner <vstinner@python.org>
* | Issue3950: Fix docs for default locale used by gettext to match ↵Miss Islington (bot)2020-02-101-2/+2
|/ | | | | | | | implementation (GH-18435) documentation for default locale directory Doc/library/gettext.rst changed to match gettext implementation line 63. (cherry picked from commit d68e0a8a165761604e820c8cb4f20abc735e717f) Co-authored-by: Carl <Carl-Ty@users.noreply.github.com>
* Grammar fix in tutorial (GH-18425) (GH-18426)Miss Islington (bot)2020-02-101-1/+1
| | | | | | (cherry picked from commit 3ed4d251587c36c3853daf42602eaad121b59bba) Co-authored-by: Don Kirkby <donkirkby@users.noreply.github.com>
* bpo-39128: Added happy_eyeballs_delay, interleave to function signature ↵Miss Islington (bot)2020-02-101-2/+3
| | | | | | | (GH-18315) (cherry picked from commit 5305cc9dbfe8a5a0ab666511f3ba7f026c8983f8) Co-authored-by: idomic <michael.ido@gmail.com>
* bpo-39590: make deque.__contains__ and deque.count hold strong references ↵Miss Islington (bot)2020-02-093-0/+17
| | | | | | | | | | (GH-18421) (GH-18423) (cherry picked from commit c6dedde160a9fce5d049e860f586ad8f93aec822) Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com> Co-authored-by: sweeneyde <36520290+sweeneyde@users.noreply.github.com>
* Doc: sys.__unraisablehook__ and bytearray.hex separators are new in 3.8 ↵Miss Islington (bot)2020-02-072-3/+15
| | | | | | | | | | | (GH-17884) Minor fix in documentation: - `sys.__unraisablehook__` is new in version 3.8 - Optional `sep` and `bytes_per_sep` parameters for `bytearray.hex` is also supported in Python 3.8 (just like `bytes.hex`) (cherry picked from commit 0edc2c7678266c39a7ceb2df885cb050f887e32b) Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* [3.8] bpo-39579: Fix Attribute end_col_offset to point at the current node ↵Lysandros Nikolaou2020-02-073-2/+12
| | | | | | | | | | | | | | | (GH-18405) (GH-18408) (cherry picked from commit d2e1098641f98594702ef29049c3c4a3f394786f) https://bugs.python.org/issue39579 Automerge-Triggered-By: @gvanrossum
* bpo-39534: Doc: Clarify return in finally (GH-18324)Miss Islington (bot)2020-02-061-9/+27
| | | | | (cherry picked from commit 446463f8dbce0556be8020914f37089b63bb8ab6) Co-authored-by: Julien Palard <julien@palard.fr>
* Fix MinGW library generation command (GH-17917)Miss Islington (bot)2020-02-061-1/+1
| | | | | | | | To print the exports to stdout, the gendef command requires the option "-". Without this option, no output is generated. (cherry picked from commit 2545fa87628b4caca519da8aeb0eeef368b9dc0d) Co-authored-by: Baljak <baljci@hotmail.com>
* bpo-39274: Ensure Fraction.__bool__() returns a bool (GH-18017)Miss Islington (bot)2020-02-063-1/+41
| | | | | | | | Some numerator types used (specifically NumPy) decides to not return a Python boolean for the "a != b" operation. Using the equivalent call to bool() guarantees a bool return also for such types. (cherry picked from commit 427c84f13f7719e6014a21bd1b81efdc02a046fb) Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* bpo-38149: Call sys.audit() only once per call for glob.glob(). (GH-18360)Miss Islington (bot)2020-02-062-1/+3
| | | | | (cherry picked from commit 54b4f14712b9350f11c983f1c8ac47a3716958a7) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-39505: delete the redundant '/' in $env:VIRTUAL_ENV (GH-18290) (GH-18359)Miss Islington (bot)2020-02-051-1/+0
| | | | | (cherry picked from commit 787b6d548c250f36df6d3f3179f60d754c8aa5e3) Co-authored-by: schwarzichet <15522755+schwarzichet@users.noreply.github.com>
* bpo-39185 Add the d[etailed] and q[uiet] verbosity levels for msbuild (GH-17791)Miss Islington (bot)2020-02-042-0/+5
| | | | | (cherry picked from commit 89ae20b30e4543f379ee647c965eb46200556496) Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
* bpo-39184: Add audit events to command execution functions in os and pty ↵Miss Islington (bot)2020-02-045-7/+56
| | | | | | | modules (GH-17824) (cherry picked from commit 95f60010219e142a436fae18e1695cbc45407afe) Co-authored-by: Saiyang Gou <gousaiyang@163.com>
* closes bpo-39510: Fix use-after-free in BufferedReader.readinto() (GH-18295)Miss Islington (bot)2020-02-043-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | When called on a closed object, readinto() segfaults on account of a write to a freed buffer: ==220553== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==220553== Access not within mapped region at address 0x2A ==220553== at 0x48408A0: memmove (vg_replace_strmem.c:1272) ==220553== by 0x58DB0C: _buffered_readinto_generic (bufferedio.c:972) ==220553== by 0x58DCBA: _io__Buffered_readinto_impl (bufferedio.c:1053) ==220553== by 0x58DCBA: _io__Buffered_readinto (bufferedio.c.h:253) Reproducer: reader = open ("/dev/zero", "rb") _void = reader.read (42) reader.close () reader.readinto (bytearray (42)) GH-GH-GH- BANG! The problem exists since 2012 when commit dc469454ec added code to free the read buffer on close(). Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com> (cherry picked from commit cb1c0746f277052e45a60d6c436a765e34722821) Co-authored-by: Philipp Gesang <phg@phi-gamma.net>
* bpo-37224: Improve test__xxsubinterpreters.DestroyTests (GH-18058)Miss Islington (bot)2020-02-041-1/+5
| | | | | | | | Adds an additional assertion check based on a race condition for `test__xxsubinterpreters.DestroyTests.test_still_running` discovered in the bpo issue. https://bugs.python.org/issue37224 (cherry picked from commit f03a8f8d5001963ad5b5b28dbd95497e9cc15596) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* Fixes in sorting descriptions (GH-18317)Miss Islington (bot)2020-02-032-9/+9
| | | | | | | | Improvements in listsort.txt and a comment in sortperf.py. Automerge-Triggered-By: @csabella (cherry picked from commit 24e5ad4689de9adc8e4a7d8c08fe400dcea668e6) Co-authored-by: Stefan Pochmann <stefan.pochmann@gmail.com>
* bpo-38558: Link to further docs from walrus operator mention in tutorial ↵Miss Islington (bot)2020-02-032-3/+6
| | | | | | | (GH-16973) (cherry picked from commit 5807efd4c396d5718325e21f5a14e324a77ff77c) Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
* fixes typos in http.client documentation (GH-18300)Miss Islington (bot)2020-02-031-2/+2
| | | | | (cherry picked from commit b94737a4af96b29bd4c025724f671e7bc0f6b6f1) Co-authored-by: James Corbett <james.h.corbett@gmail.com>
* bpo-39450 Stripped whitespace before parsing the docstring in ↵Miss Islington (bot)2020-02-033-1/+12
| | | | | | | TestCase.shortDescription (GH-18175) (#18323) (cherry picked from commit 032de7324e30c6b44ef272cea3be205a3d768759) Co-authored-by: Steve Cirelli <scirelli+git@gmail.com>
* [3.8] bpo-39492: Fix a reference cycle between reducer_override and a ↵Antoine Pitrou2020-02-023-4/+43
| | | | | | | | | | | Pickler instance (GH-18266) (#18316) https://bugs.python.org/issue39492 Automerge-Triggered-By: @pitrou (cherry picked from commit 0f2f35e) Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
* bpo-38792: Remove IDLE shell calltip before new prompt. (GH-17150)Miss Islington (bot)2020-01-305-3/+9
| | | | | | | | | Previously, a calltip might be left after SyntaxError, KeyboardInterrupt, or Shell Restart. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tal Einat <taleinat+github@gmail.com> (cherry picked from commit bfdeaa37b3df7466624c17f9450d2bd1c3d95edf) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-39502: Skip test_zipfile.test_add_file_after_2107() on AIX (GH-18282)Miss Islington (bot)2020-01-302-1/+8
| | | | | | | Skip test_zipfile.test_add_file_after_2107() if time.localtime() fails with OverflowError. It is the case on AIX 6.1 for example. (cherry picked from commit c232c9110cfefa0935cbf158e35e91746a8a9361) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.8] bpo-39401: Avoid unsafe DLL load on Windows 7 and earlier (GH-18231) ↵Steve Dower2020-01-292-2/+5
| | | | | | | | | (GH-18234) https://bugs.python.org/issue39401 Automerge-Triggered-By: @zooba
* bpo-39493: Fix definition of IO.closed in typing.py (GH-18265)Miss Islington (bot)2020-01-292-0/+2
| | | | | (cherry picked from commit 2e6569b6692298fcc9aae0df3eb3181adb2a5099) Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
* bpo-39485: fix corner-case in method-detection of mock (GH-18255)Miss Islington (bot)2020-01-292-5/+4
| | | | | | | | | | | | | | | | | | | | Replace check for whether something is a method in the mock module. The previous version fails on PyPy, because there no method wrappers exist (everything looks like a regular Python-defined function). Thus the isinstance(getattr(result, '__get__', None), MethodWrapperTypes) check returns True for any descriptor, not just methods. This condition could also return erroneously True in CPython for C-defined descriptors. Instead to decide whether something is a method, just check directly whether it's a function defined on the class. This passes all tests on CPython and fixes the bug on PyPy. (cherry picked from commit a327677905956ae0b239ff430a1346dfe265709e) Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
* bpo-39460: Fix test_zipfile.test_add_file_after_2107() (GH-18247)Miss Islington (bot)2020-01-291-0/+12
| | | | | | | | | | | XFS filesystem is limited to 32-bit timestamp, but the utimensat() syscall doesn't fail. Moreover, there is a VFS bug which returns a cached timestamp which is different than the value on disk. https://bugzilla.redhat.com/show_bug.cgi?id=1795576 https://bugs.python.org/issue39460GH-msg360952 (cherry picked from commit 3cb49b62e61208efcefbc04414e769fc173f205d) Co-authored-by: Victor Stinner <vstinner@python.org>