Commit Graph

44641 Commits

Author SHA1 Message Date
Miss Islington (bot) 36fd7b6f01
bpo-36044: Avoid warnings in Windows PGO build and add lzma, bz2 and sqlite coverage (GH-14985)
https://bugs.python.org/issue36044

Automerge-Triggered-By: @zooba
(cherry picked from commit e1b9002472)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-07-28 18:20:02 -07:00
Miss Islington (bot) f96334c179 bpo-37697: Sync with importlib_metadata 0.19 (GH-14993) (GH-14995)
* bpo-37697: Sync with importlib_metadata 0.19

* Run make regen-importlib

* 📜🤖 Added by blurb_it.
(cherry picked from commit 049460da9c)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2019-07-28 15:45:46 -04:00
Miss Islington (bot) c94386d013
bpo-37692: Improve highlight config sample (GH-14983)
Use an example shell interaction in the sample and better labels for shell elements.
(cherry picked from commit b222955355)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-28 09:39:03 -07:00
Miss Islington (bot) 76821bab9c bpo-37691: Let math.dist() accept sequences and iterables for coordinates (GH-14975) (GH-14984)
(cherry picked from commit 6b5f1b496f)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-27 14:26:58 -07:00
Miss Islington (bot) 171019354a
bpo-37628: Fix IDLE config sample sizes (GH-14958)
The boxes for the font and highlight samples are now constrained by the overall config dialog size.  They gain scrollbars when the when a large font size makes the samples too large for the box.
(cherry picked from commit 3221a63c69)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-07-27 10:19:12 -07:00
Miss Islington (bot) f6ab188323
bpo-17535: Increase line number horizontal padding by 2 pixels (GH-14959)
(cherry picked from commit 46ebd4a6a2)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-26 20:46:52 -07:00
Miss Islington (bot) c503390126
bpo-37664: Update regex for ignoring cache warning on some buildbots (GH-14960)
(cherry picked from commit b1eb20e68e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-07-26 09:24:43 -07:00
Miss Islington (bot) 25cb4fd4fb
bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)
(cherry picked from commit 898318b53d)

Co-authored-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2019-07-25 09:18:20 -07:00
Miss Islington (bot) 69802f6163
closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942)
(cherry picked from commit 93e8aa62cf)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2019-07-24 17:00:39 -07:00
Miss Islington (bot) 0cdb21d6eb
bpo-37664: Update bundled pip to 19.2.1 and setuptools to 41.0.1 (GH-14934)
(cherry picked from commit 5380def826)

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2019-07-24 12:28:12 -07:00
Stefan Behnel bb697899aa
[3.8] bpo-37399: Correctly attach tail text to the last element/comment/pi (GH-14856) (GH-14936)
* bpo-37399: Correctly attach tail text to the last element/comment/pi, even when comments or pis are discarded.
Also fixes the insertion of PIs when "insert_pis=True" is configured for a TreeBuilder.
2019-07-24 20:46:01 +02:00
Miss Islington (bot) 9d54de1658
bpo-37667: Add regression test for regrtest. (GH-14929)
Verify that it appears to find roughly the right number of tests in the stdlib's testsuite.
(cherry picked from commit e95ac20103)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2019-07-23 23:30:27 -07:00
Miss Islington (bot) 9f77cfc37e
Only setup PGO tests when --pgo is enabled. (GH-14927)
(cherry picked from commit f0807ab24c)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2019-07-23 21:53:34 -07:00
Miss Islington (bot) fc63d5a361 bpo-29446: IDLE -- add explicit imports (GH-14919) (GH-14920)
Stop depending on tkinter import *.
(cherry picked from commit c6fd6c83b7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-23 16:23:43 -04:00
Miss Islington (bot) 1da6a313dd
bpo-17535: IDLE editor line numbers (GH-14030)
(cherry picked from commit 7123ea009b)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-23 06:04:13 -07:00
Jeroen Demeyer bf8e82f976 [3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782) 2019-07-23 12:39:51 +02:00
Miss Islington (bot) 5dab5e7d24
bpo-33610: validate non-negative integer inputs in IDLE's config (GH-14822)
(cherry picked from commit 1ebee37dde)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-23 03:18:41 -07:00
Miss Islington (bot) 2406672984
bpo-36044: Reduce number of unit tests run for PGO build (GH-14702)
Reduce the number of unit tests run for the PGO generation task.  This
speeds up the task by a factor of about 15x.  Running the full unit test
suite is slow.  This change may result in a slightly less optimized build
since not as many code branches will be executed.  If you are willing to
wait for the much slower build, the old behavior can be restored using
'./configure [..] PROFILE_TASK="-m test --pgo-extended"'.  We make no
guarantees as to which PGO task set produces a faster build.  Users who
care should run their own relevant benchmarks as results can depend on
the environment, workload, and compiler tool chain.
(cherry picked from commit 4e16a4a311)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2019-07-22 13:17:23 -07:00
Miss Islington (bot) 22fd679dc3 bpo-21478: Record calls to parent when autospecced objects are used as child with attach_mock (GH 14688) (GH-14902)
* Clear name and parent of mock in autospecced objects used with attach_mock

* Add NEWS entry

* Fix reversed order of comparison

* Test child and standalone function calls

* Use a helper function extracting mock to avoid code duplication and refactor tests.
(cherry picked from commit 7397cda997)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-07-22 08:59:00 +01:00
Kyle Stanley 24b5b360fa [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900)
(cherry picked from commit 96e12d5f4f)

Co-authored-by: Min ho Kim <minho42@gmail.com>
2019-07-21 22:48:45 -04:00
Miss Islington (bot) 9325f4091b
bpo-37627: Initialize IDLE Custom Run dialog with previous entries (GH-14870)
Repeat the command line arguments most recently entered before so the user can edit them.
(cherry picked from commit 35b87e6001)

Co-authored-by: Ngalim Siregar <ngalim.siregar@gmail.com>
2019-07-21 13:25:43 -07:00
Miss Islington (bot) a8cac5762c
Fix typo found by Min ho Kim (GH-14879)
(cherry picked from commit 8e3a7380ec)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-21 12:44:28 -07:00
Miss Islington (bot) e8b3a2e78a Minor whitespace, indentation, and quoting changes to improve internal consistency and appease linters (GH-14888) (GH-14889)
(cherry picked from commit 1c0e9bb94b)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-21 12:38:58 -07:00
Miss Islington (bot) c613c3319e bpo-36324: Make internal attributes for statistics.NormalDist() private. (GH-14871) (GH-14875) 2019-07-21 00:55:13 -07:00
Miss Islington (bot) e5bfd1ce9d bpo-36546: Clean-up comments (GH-14857) (#14859)
(cherry picked from commit eed5e9a956)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-07-19 02:17:53 -07:00
Miss Islington (bot) 86eb5daaf3 bpo-33610: IDLE's code-context always shows current context immediately (GH-14821) (#14846)
Eliminate delay of up to 100ms and accompanying visual artifact.
Fix bug of never showing context when hide and show.
(cherry picked from commit e0a1f8fb5c)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-18 16:47:26 -04:00
Miss Islington (bot) 652b667b13
bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (GH-14460)
A bug in MSVC UCRT version 17763.615 (which has been fixed in newer versions) is causing test failures in some strptime/strftime tests when the default code page is c65001. This change selectively skips the tests affected by this.
(cherry picked from commit 9cd39b16e2)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
2019-07-18 07:17:58 -07:00
Miss Islington (bot) 028f1d2479 bpo-36390: Gather IDLE Format menu functions into format.py (GH-14827) (GH-14829)
Add two indent spec methods from editor and Rstrip to existing file.
Tests are not added for indent methods because they need change
in lights of 3.x's prohibition on mixing tabs and spaces.
(cherry picked from commit 1b38922434)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-17 21:21:08 -04:00
Miss Islington (bot) 635743355d
Fix IndexError when parsing unexpectedly ending quoted-string. (GH-14813)
This exception was caused because the input ended unexpectedly with only one
single quote instead of a pair with some value inside it.
(cherry picked from commit 719a062bcb)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
2019-07-17 10:29:18 -07:00
Miss Islington (bot) 6816ca30af
bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794)
* bpo-37461: Fix infinite loop in parsing of specially crafted email headers.

Some crafted email header would cause the get_parameter method to run in an
infinite loop causing a DoS attack surface when parsing those headers. This
patch fixes that by making sure the DQUOTE character is handled to prevent
going into an infinite loop.
(cherry picked from commit a4a994bd3e)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
2019-07-17 10:13:54 -07:00
Miss Islington (bot) 1fc43a3faf bpo-36390: IDLE: Combine region formatting methods. (GH-12481) (GH-14811)
Rename paragraph.py to format.py and add region formatting methods
from editor.py.  Add tests for the latter.
(cherry picked from commit 82494aa6d9)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-07-17 10:45:20 -04:00
Miss Islington (bot) 6cf7c45cb5
bpo-37530: simplify, optimize and clean up IDLE code context (GH-14675)
* Only create CodeContext instances for "real" editors windows, but
  not e.g. shell or output windows.
* Remove configuration update Tk event fired every second, by having
  the editor window ask its code context widget to update when
  necessary, i.e. upon font or highlighting updates.
* When code context isn't being shown, avoid having a Tk event fired
  every 100ms to check whether the code context needs to be updated.
* Use the editor window's getlineno() method where applicable.
* Update font of the code context widget before the main text widget
(cherry picked from commit 7036e1de3a)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-17 01:44:55 -07:00
Miss Islington (bot) 178f09f8b7 bpo-27452: IDLE: Cleanup config.py code (GH-14577) (GH-14802)
(cherry picked from commit f8d4cc7dbb)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-07-16 17:19:10 -04:00
Miss Islington (bot) 6a2aec0ff5
Fix infinite loop in email folding logic (GH-12732)
As far as I can tell, this infinite loop would be triggered if:

1. The value being folded contains a single word (no spaces) longer than
   max_line_length
2. The max_line_length is shorter than the encoding's name + 9
   characters.

bpo-36564: https://bugs.python.org/issue36564
(cherry picked from commit f69d5c6198)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
2019-07-16 11:08:36 -07:00
Miss Islington (bot) cf9a63c6c7
bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778)
https://bugs.python.org/issue37593
(cherry picked from commit cd6e83b481)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-07-14 16:49:52 -07:00
Miss Islington (bot) 3958b7aae8
Clarify that plistlib's load and dump functions take a binary file object (GH-9825)
The documentation says that the fp parameter to plistlib.load "should be a
readable and binary file object" but the docstring only mentions that it
should be readable. Similarly, plistlib.dump's docstring only mentions
"writable". This commit clarifies that fp should also be binary.

https://docs.python.org/3/library/plistlib.htmlGH-plistlib.load
https://docs.python.org/3/library/plistlib.htmlGH-plistlib.dump
(cherry picked from commit 0d4f4352ef)

Co-authored-by: Collin Styles <collingstyles@gmail.com>
2019-07-14 02:25:43 -07:00
Miss Islington (bot) b1e4d1b603 bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316) (GH-14759)
The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing.

However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`).  Checking the argument for a leading `--` before rejecting it fixes this.

This was prompted by pytest-dev/pytestGH-5469, so a backport to at least 3.8 would be great 😄
And this is my first PR to CPython, so please let me know if I've missed anything!

https://bugs.python.org/issue26967
(cherry picked from commit dffca9e925)

Co-authored-by: Zac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
2019-07-14 07:59:56 +02:00
Miss Islington (bot) 143672cf02
bpo-37579: Improve equality behavior for pure Python datetime and time (GH-14726)
Returns NotImplemented for timedelta and time in __eq__ for different types in Python implementation, which matches the C implementation.

This also adds tests to enforce that these objects will fall back to the right hand side's __eq__ and/or __ne__ implementation.

bpo-37579
(cherry picked from commit e6b46aafad)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-07-13 06:59:37 -07:00
Miss Islington (bot) 36101c2c5d
closes bpo-37347: Fix refcount problem in sqlite3. (GH-14268)
(cherry picked from commit b9a0376b0d)

Co-authored-by: gescheit <gescheit@yandex-team.ru>
2019-07-12 20:33:53 -07:00
Miss Islington (bot) 3d58b78481
bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)
With the addition of shared memory into Python 3.8, we now have three tests failing on Solaris, namely `test_multiprocessing_fork`, `test_multiprocessing_forkserver` and `test_multiprocessing_spawn`. The reason seems to be incorrect name handling which results in two slashes being prepended.

https://bugs.python.org/issue37558
(cherry picked from commit 4737265622)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2019-07-11 11:38:37 -07:00
Miss Islington (bot) 242ad1f375 bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500)
(cherry picked from commit 9b5ce62cac)

Co-authored-by: Tal Einat <taleinat@gmail.com>
2019-07-11 17:55:05 +03:00
Miss Islington (bot) b82188d9ba bpo-26806: IDLE should run without docstrings (GH-14657) (GH-14677)
After fcf1d00, IDLE startup failed with python compiled without docstrings.
(cherry picked from commit 6aeb2fe606)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-07-09 14:59:19 -04:00
Miss Islington (bot) 68bd9c5691 bpo-18374: fix tests to check the correct thing about line numbers (GH-14659) (GH-14672)
(cherry picked from commit 430a9f44fe)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2019-07-09 14:28:56 +01:00
Miss Islington (bot) 4c403b8ca2
bpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670)
test_ssl.test_pha_required_nocert() now uses
support.catch_threading_exception() to ignore the expected SSLError
in ConnectionHandler of ThreadedEchoServer (it is only raised
sometimes on Windows).
(cherry picked from commit 73ea54620a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-09 05:55:08 -07:00
Miss Islington (bot) 58f2c7f424 bpo-37526: Add support.catch_threading_exception() (GH-14664) (GH-14666)
Context manager catching threading.Thread exception using
threading.excepthook.
(cherry picked from commit 91b4f7ab7f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-09 13:35:59 +02:00
Miss Islington (bot) c7be35c2ab
bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)
Nested BinOp instances (e.g. a+b+c) had a wrong col_offset for the
second BinOp (e.g. 2 instead of 0 in the example). Fix it by using the
correct st node to copy the line and col_offset from in ast.c.
(cherry picked from commit 110a47c4f4)

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
2019-07-08 14:41:34 -07:00
Miss Islington (bot) cdada40b23 bpo-37421: test_concurrent_futures stops ForkServer (GH-14643) (GH-14645)
test_concurrent_futures now explicitly stops the ForkServer instance
if it's running.
(cherry picked from commit e676244235)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-08 11:51:49 +02:00
Miss Islington (bot) 66905d1467 bpo-37520: Correct behavior for zipfile.Path.parent (GH-14638) (GH-14641)
* bpo-37520: Correct behavior for zipfile.Path.parent

* 📜🤖 Added by blurb_it.
(cherry picked from commit 38f44b4a4a)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2019-07-07 18:05:53 -04:00
Miss Islington (bot) d4af55391f
bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)
This is done to compensate for the extra stack frames added by
IDLE itself, which cause problems when setting the recursion limit
to low values.

This wraps sys.setrecursionlimit() and sys.getrecursionlimit()
as invisibly as possible.
(cherry picked from commit fcf1d003bf)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-07-06 05:54:17 -07:00
Miss Islington (bot) 229f6e85f8
bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)
multiprocessing tests now stop the ForkServer instance if it's
running: close the "alive" file descriptor to ask the server to stop
and then remove its UNIX address.
(cherry picked from commit 8fbeb14312)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-07-05 07:35:38 -07:00