Commit graph

41901 commits

Author SHA1 Message Date
Miss Islington (bot)
9fcfb7b010
bpo-34120: fix IDLE freezing after closing dialogs (GH-8603)
Added missing .grab_release() calls to all places where we call .grab_set().
(cherry picked from commit 10ea9409ce)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-08-02 00:14:24 -07:00
Miss Islington (bot)
6f16ffc187 [3.6] bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532) (GH-8587) 2018-07-31 11:28:56 -04:00
Serhiy Storchaka
ada5d99306
[3.6] bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931) (GH-8584)
* Fix integer overflow in os.readv(), os.writev() and in os.sendfile()
  with headers or trailers arguments (on BSD-based OSes and MacOS).

* Fix sending the part of the file in os.sendfile() on MacOS.
  Using the trailers argument could cause sending more bytes from
  the input file than was specified.

Thanks Ned Deily for testing on 32-bit MacOS.
(cherry picked from commit 9d5727326a)
2018-07-31 12:58:58 +03:00
Miss Islington (bot)
8f6a7e100d bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464)
(cherry picked from commit 5473f061f5)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-07-29 10:02:16 +01:00
Miss Islington (bot)
f17e001746
bpo-33476: Fix _header_value_parser when address group is missing final ';' (GH-7484)
(cherry picked from commit 8fe9eed937)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2018-07-28 08:59:18 -07:00
Ammar Askar
6ea8a3a0eb [3.6] bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) (GH-8498)
On Windows, passing a negative value to local results in an OSError because localtime_s on Windows does not support negative timestamps. Unfortunately this means that fold detection for timestamps between 0 and max_fold_seconds will result in this OSError since we subtract max_fold_seconds from the timestamp to detect a fold. However, since we know there haven't been any folds in the interval [0, max_fold_seconds) in any timezone, we can hackily just forego fold detection for this time range on Windows..
(cherry picked from commit 96d1e69a12)

Co-authored-by: Ammar Askar <ammar_askar@hotmail.com>
2018-07-27 10:59:27 -04:00
Miss Islington (bot)
cecbe0ade8 bpo-32663 Make SMTPUTF8SimTests run (GH-5314) (#8470)
Enable and fix SMTPUTF8SimTests in test_smtplib.

The tests for SMTPUTF8SimTests in test_smtplib.py were not actually
being run because test_smtplib was still using the 'test_main' pattern,
and the class was never added to test_main.

Additionally, one of the tests needed to be moved to the non-UTF8 server
class because it relies on the server not being UTF-8 compatible (and it
had a bug in in).
(cherry picked from commit 48ed88a93b)

Co-authored-by: chason <chason@gmail.com>
2018-07-26 10:02:22 -04:00
Serhiy Storchaka
113f86e748
[3.6] bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) (GH-8436)
Now base64.Error is always raised instead of UnboundLocalError or
OverflowError.
(cherry picked from commit ac0b3c2f4d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 15:06:59 +03:00
Miss Islington (bot)
9b33ca0f4d [3.6] bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) (GH-8366)
(cherry picked from commit 06ca3f0c09)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 15:06:19 +03:00
Miss Islington (bot)
ec729d5407 bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8424)
(cherry picked from commit aba24ff360)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 01:41:48 +03:00
Miss Islington (bot)
1127849847
bpo-33336, imaplib: Legalize MOVE command (GH-6569)
imaplib now allows MOVE command in IMAP4.uid() (RFC 6851:
IMAP MOVE Extension) and potentially as a name of supported
method of IMAP4 object.
(cherry picked from commit caa331d492)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2018-07-23 06:17:25 -07:00
Miss Islington (bot)
1724c0c984
bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406)
When Python is installed on Windows, python -m test test_tools failed
because it tried to run Tools\scripts\2to3.py which requires an
argument. Skip this script. On other platforms or on Windows but when
run from source code (not installed), the script is called "2to3"
instead of "2to.py" and so was already skipped.

Modify also the unit test to unload all modules which have been
loaded by the test.
(cherry picked from commit 752d4b7531)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-23 05:34:20 -07:00
Miss Islington (bot)
e9e6495eed
bpo-940286: Fix pydoc to show cross refs correctly (GH-8390)
(cherry picked from commit d04f46c59f)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-07-22 23:51:28 -07:00
Serhiy Storchaka
0ff1746434
[3.6] bpo-34189: Add simple tests for new Tk widget options. (GH-8396) (GH-8399)
(cherry picked from commit e271ca78e3)
(cherry picked from commit c75c1e0e8a)
2018-07-22 22:14:45 +03:00
Miss Islington (bot)
9c136700aa bpo-34179: Make sure decimal context doesn't affect other tests. (GH-8376) (#8384)
(cherry picked from commit 938045f335)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
2018-07-21 20:38:49 +02:00
Terry Jan Reedy
917696242b
[3.6] bpo-34162: idlelib/NEWS.txt entries to 2018-7-20 (GH-8345) (GH-8348)
Cherry-picked from 2c5c0a3
2018-07-20 02:49:15 -04:00
Miss Islington (bot)
2fe1c6b386
bpo-32692: Fix test_threading.test_set_and_clear() (GH-8331)
Increase the timeout: give timeout x 4 instead of timeout x 2 to
threads to wait until the Event is set, but reduce the sleep from 500
ms to 250 ms. So the test should be more reliable and faster!
(cherry picked from commit 81950495ba)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-19 02:44:29 -07:00
Miss Islington (bot)
e13180bc4c bpo-34130: Fix test_signal.test_socket() (GH-8326) (GH-8330)
test_signal.test_socket(): On Windows, sometimes even if the C signal handler
succeed to write the signal number into the write end of the socketpair, the
test fails with a BlockingIOError on the non-blocking read.recv(1) because the
read end of the socketpair didn't receive the byte yet.

Fix the race condition on Windows by setting the read end as blocking.
(cherry picked from commit 99bb6df66a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-18 19:02:06 +02:00
Serhiy Storchaka
cc13016658
bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an exception set (GH-8282). (GH-8312)
(cherry picked from commit 28f07364f0)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-07-17 10:33:14 +03:00
Miss Islington (bot)
8b5d191386
bpo-33967: Fix wrong use of assertRaises (GH-8306)
(cherry picked from commit 56d8f57b83)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-07-16 22:38:28 -07:00
Miss Islington (bot)
336c9539a9 bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8295)
It was added in test_functools at 445f1b3.
(cherry picked from commit 9e9b2c32a3)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-07-16 11:26:49 +02:00
INADA Naoki
b2f8aa0c99
bpo-34087: Backport tests for int/float/complex (GH-8274)
Cherrypick tests from 16dfca4d82

While the regression is not in 3.6, it's worth to backport test cases
to 3.6 branch too.
2018-07-14 16:38:14 +09:00
Victor Stinner
8df4770e8d
bpo-33716, test_concurrent_futures: increase timeout (GH-7828) (GH-8264)
Increase the timeout from 1 min to 5 min.

Replace also time.time() with time.monotonic() for timeouts.

(cherry picked from commit 3ad8decd76)
2018-07-12 11:11:29 +02:00
Miss Islington (bot)
ec7562068f
bpo-23927: Make getargs.c skipitem() skipping 'w*'. (GH-8192)
(cherry picked from commit 504373c59b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-11 10:10:40 -07:00
Victor Stinner
d68cb9d62c
bpo-34092, test_logging: increase SMTPHandlerTest timeout (GH-8245) (GH-8249)
Change test_logging.SMTPHandlerTest timeout from 8 seconds to 1
minute. The test failed randomly on the slow x86 Gentoo Refleaks 3.7
buildbot.

(cherry picked from commit 31b50b8cbf)
2018-07-11 13:14:36 +02:00
Miss Islington (bot)
cb14eb7eed
bpo-34031: fix incorrect usage of self.fail in two tests (GH-8091)
Contributed by Bradley Laney.
(cherry picked from commit 6b490b5db4)

Co-authored-by: Bradley Laney <bradley.laney@gmail.com>
2018-07-10 03:13:06 -07:00
Miss Islington (bot)
6ceab46a60
bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184)
(cherry picked from commit 445f1b35ce)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2018-07-10 01:00:35 -07:00
Miss Islington (bot)
13d1025e43
Fixed several assertTrue() that were intended to be assertEqual(). (GH-8191)
Fixed also testing the "always" warning filter.
(cherry picked from commit b796e7dcdc)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-07-09 08:54:27 -07:00
Miss Islington (bot)
d73497ba52 bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193) (GH-8195)
(cherry picked from commit 2a9b8babf0)
(cherry picked from commit 7c43b80150)
2018-07-09 14:38:27 +03:00
Miss Islington (bot)
972458a424
bpo-34054: multiprocessing uses time.monotonic() (GH-8118)
The multiprocessing module now uses the monotonic clock
time.monotonic() instead of the system clock time.time() to implement
timeouts.
(cherry picked from commit c2368cbc83)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-06 05:14:33 -07:00
Ammar Askar
11c36a3e16 [3.6] bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891) (GH-8134)
Most of the change involves fixing up the test suite, which previously made
the assumption that there wouldn't be a new line if the input didn't end in
one.

Contributed by Ammar Askar.

(cherry picked from commit c4ef4896ea)
2018-07-06 13:22:25 +03:00
Miss Islington (bot)
e1adc65c53
Fix fuzz testing for marshal.loads(). (GH-8106)
(cherry picked from commit 09bb918a61)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-05 03:44:34 -07:00
Miss Islington (bot)
878c4fe40e
bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336)
(cherry picked from commit fc05e68d8f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-05 01:48:47 -07:00
Miss Islington (bot)
aea19a0530
bpo-32942: Fix environment dependent test_script_helper (GH-8034)
Result of function interpreter_requires_environment() depends on os.environ.
This was not covered by the tests, leading to fail when PYTHONHOME was set.
(cherry picked from commit a390cb6b6f)

Co-authored-by: Lorenz Mende <Lorenz.mende@gmail.com>
2018-07-04 03:46:15 -07:00
Miss Islington (bot)
ae23d8de8d
bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)
Fix test_forkserver_sigkill() of test_multiprocessing_forkserver:
give more time to the first child process to complete, double the
sleep in the parent process.

Reduce also the child process sleep from 1000 ms to 500 ms, to not change
the total duration of the test.
(cherry picked from commit 07888e1cce)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-04 03:15:13 -07:00
Miss Islington (bot)
d7a0ad7dd7
bpo-34010: Fix tarfile read performance regression (GH-8020)
During buffered read, use a list followed by join instead of extending a bytes object.
This is how it was done before but changed in commit b506dc32c1.
(cherry picked from commit 12a08c4760)

Co-authored-by: hajoscher <hajoscher@gmail.com>
2018-07-04 01:43:42 -07:00
Miss Islington (bot)
e1ebf51f76 bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918) (GH-8069)
PyErr_Print() will not return when the exception is a SystemExit, so
decref the __main__ module object in that case.
(cherry picked from commit d8cba5d16f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-07-03 22:17:46 +02:00
Miss Islington (bot)
dd5f43a023
bpo-34019: Fix wrong arguments for Opera Browser (GH-8047)
The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module.

* Correct the arguments passed to the Opera Browser when opening a new URL.
(cherry picked from commit 3cf1f154ed)

Co-authored-by: Bumsik Kim <k.bumsik@gmail.com>
2018-07-03 05:16:56 -07:00
Miss Islington (bot)
3bd9d3b934
bpo-33735: Fix test_multiprocessing random failure (GH-8059)
When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

* Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
  10 is enough to test at least one number per process
* Use chunksize=100 instead of chunksize=53 to mimick test_imap()
(cherry picked from commit 23401fb960)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-03 04:51:00 -07:00
Xtreak
b6c1989168 [3.6] bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008). (GH-8045)
(cherry picked from commit 087570af6d)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-07-02 10:35:52 +01:00
Tal Einat
db7ac30ef5
[3.6] bpo-32568: make select.epoll() and its docs consistent (GH-7840) (GH-8025)
* `flags` is indeed deprecated, but there is a validation on its value for
  backwards compatibility reasons.  This adds mention of this in the docs.
* The docs say that `sizehint` is deprecated and ignored, but it is still
  used when `epoll_create1()` is unavailable. This adds mention of this in
  the docs.
* `sizehint=-1` is acceptable again, and is replaced with `FD_SETSIZE-1`.
  This is needed to have a default value available at the Python level,
  since `FD_SETSIZE` is not exposed to Python. (see: bpo-31938)
* Reject `sizehint=0` since it is invalid to pass on to `epoll_create()`.

The relevant tests have also been updated.

(cherry picked from commit 0cdf5f4289)
2018-06-30 16:15:53 +03:00
Miss Islington (bot)
b2e88fcf63
bpo-33974: Fix passing special characters to ttk widgets. (GH-7986)
Fix passing lists and tuples of strings containing special characters
'"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
(cherry picked from commit 5bb5bbfca8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-06-29 23:43:22 -07:00
Zackery Spytz
d6a283b37b [3.6] bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918). (GH-8012)
(cherry picked from commit 23db935bcf)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-06-29 22:30:07 +03:00
Miss Islington (bot)
00e05242ae
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
The 'wikipedia' example is now 'rosette', describing what it draws.
The 'penrose' print output is reduced.  The 'tree' '1024'
output is eliminated.
(cherry picked from commit 891a1f86d4)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-06-28 22:32:16 -07:00
Miss Islington (bot)
c00144cd77
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)
(cherry picked from commit d904c238ca)

Co-authored-by: Yury Selivanov <yury@magic.io>
2018-06-28 19:22:39 -07:00
Miss Islington (bot)
404250ed65
bpo-33715: Fix multiprocessing test_wait_result() (GH-7971)
Increase timeouts from 10 seconds to 1 minute.
(cherry picked from commit 492572715a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-27 14:20:09 -07:00
Victor Stinner
1d06be8cc5
bpo-33913: Fix test_multiprocessing_main_handling (GH-7972) (GH-7976)
bpo-30339, bpo-33913:

* Increase timeout from 10 seconds to 1 minute in
  test_source_main_skipped_in_children source of
  test_multiprocessing_main_handling.
* Replace time.time() with time.monotonic().
* On timeout, include the duration in the error message.

(cherry picked from commit 64737e9ae2)
2018-06-27 23:14:53 +02:00
Miss Islington (bot)
a599323fc7
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
test_mymanager_context() now also accepts -SIGTERM as an expected
exitcode for the manager process. The process is killed with SIGTERM
if it takes longer than 1 second to stop.
(cherry picked from commit fbd7172325)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-27 09:45:01 -07:00
Miss Islington (bot)
acda5ea916 bpo-24567: Random subnormal.diff (GH-7954) (GH-7956)
Handle subnormal weights for choices()
(cherry picked from commit ddf7171911)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-06-27 02:37:17 -07:00
Miss Islington (bot)
6abf8c1717
bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)
Tolerate a different of 50 ms, instead of just 30 ms, in
test_timeout() of multiprocessing tests. This change should fix such
test failure on Windows:

FAIL: test_timeout (test.test_multiprocessing_spawn.WithProcessesTestQueue)
Traceback (most recent call last):
  File "lib\test\_test_multiprocessing.py", line 753, in test_timeout
    self.assertGreaterEqual(delta, 0.170)
AssertionError: 0.16138982772827148 not greater than or equal to 0.17
(cherry picked from commit f15f66d275)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-06-27 02:33:35 -07:00