Commit Graph

101794 Commits

Author SHA1 Message Date
Miss Islington (bot) 21ed29ac29
bpo-12743: Delete comment from marshal.rst (GH-8457)
Also, update the list of exceptions that may raised by PyMarshal_*
functions. We usually don't document exceptions raised by a
function, but in this case most of them were already documented
in C API and standard library documentation.
(cherry picked from commit defcffdf86)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-07-26 21:40:37 -07:00
Steve Dower 3cc505e950
bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. (GH-8464) 2018-07-26 17:17:02 +01:00
Miss Islington (bot) 89352b08aa bpo-32663 Make SMTPUTF8SimTests run (GH-5314) (#8471)
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 09:58:16 -04:00
Miss Islington (bot) 973649342c bpo-29097: Forego fold detection on windows for low timestamp values (GH-2385) (GH-8466)
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-25 16:34:09 -04:00
Miss Islington (bot) ec02c58f5a bpo-28677: Improve phrasing of when instance attribute is referenced (GH-6208)
(cherry picked from commit c0f0a7669c)

Co-authored-by: Aaron Ang <aaronang@users.noreply.github.com>
2018-07-25 20:52:18 +03:00
Miss Islington (bot) 6f7fd963a0 Fix site module documentation. (GH-8441)
The script will exit with the number 0 (zero), instead of the letter O.
(cherry picked from commit 95d34c2a37)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
2018-07-24 10:30:33 -07:00
Miss Islington (bot) 23a3297ff1 [3.7] bpo-34136: Make test_do_not_recreate_annotations more reliable. (GH-8364) (GH-8365)
(cherry picked from commit 06ca3f0c09)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 15:05:57 +03:00
Miss Islington (bot) 0b27169183 bpo-34164: Fix handling of incorrect padding in base64.b32decode(). (GH-8351) (GH-8435)
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 13:53:39 +03:00
Miss Islington (bot) 220afffb68 bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8423)
(cherry picked from commit aba24ff360)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 01:41:26 +03:00
Miss Islington (bot) 519fc551d7 bpo-34183: Fix running Lib/test/test_contextlib_async.py as a script. (GH-8381) (GH-8422)
(cherry picked from commit db8e3a1e44)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-24 01:02:00 +03:00
Miss Islington (bot) 25b87d3567 bpo-34190: Fix reference leak in call_function() (GH-8413) (GH-8418)
(cherry picked from commit 147d95511f)

Co-authored-by: jdemeyer <jdemeyer@cage.ugent.be>
2018-07-23 23:45:26 +02:00
Miss Islington (bot) 4e166ffd29 bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8425)
(cherry picked from commit bde782bb59)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2018-07-24 00:38:18 +03:00
Miss Islington (bot) 635338248f bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) (GH-8421)
(cherry picked from commit 3fe5cccb08)
2018-07-24 00:25:11 +03:00
Miss Islington (bot) 96bba049f4 bpo-33336, imaplib: Legalize MOVE command (GH-6569) (GH-8409)
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 15:54:46 +02:00
Miss Islington (bot) ba1810e1ec bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406) (GH-8407)
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 14:39:11 +02:00
Miss Islington (bot) 05a72f15f7 bpo-21446: Update reload fixer to use importlib (GH-8391)
(cherry picked from commit 7a3056fa7d)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-07-23 11:11:22 +03:00
Miss Islington (bot) 14f58f0ff8 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-23 09:51:54 +03:00
Serhiy Storchaka c7b91d95d8
[3.7] bpo-34189: Add simple tests for new Tk widget options. (GH-8396) (GH-8398)
(cherry picked from commit e271ca78e3)
(cherry picked from commit c75c1e0e8a)
2018-07-22 22:14:15 +03:00
Miss Islington (bot) 81f85d09f4 bpo-34181: Fix running Lib/test/test_typing.py as a script. (GH-8380) (GH-8385)
(cherry picked from commit 961360923e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-22 13:41:41 +03:00
Miss Islington (bot) 7cf7541aa4 Fix versionchanged indentation in popitem documentation (GH-8387)
(cherry picked from commit cb9c299a55)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-21 16:04:54 -07:00
Miss Islington (bot) 92ce6a64af bpo-34179: Make sure decimal context doesn't affect other tests. (GH-8376) (#8383)
(cherry picked from commit 938045f335)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
2018-07-21 20:38:19 +02:00
Miss Islington (bot) 7638eb892a bpo-34126: Fix crashes while profiling invalid calls. (GH-8300) (GH-8371)
(cherry picked from commit 56868f940e)

Co-authored-by: jdemeyer <jdemeyer@cage.ugent.be>
2018-07-21 19:58:35 +03:00
Xtreak 25326dea8b [3.7] bpo-34166: Fix warnings in Tools/msgfmt.py. (GH-8367) (GH-8369)
(cherry picked from commit a692efe473)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-07-21 10:25:03 +03:00
Miss Islington (bot) a7a6eac966 bpo-33723: Fix test_time.test_process_time() (GH-8358) (GH-8362)
The test failed on my laptop because the busy loop took 15.9 ms
whereas the test expects at least 20 ms. Modify test_process_time()
as test_thread_time() has been modified recently: only require 15 ms
instead of 20 ms.
(cherry picked from commit e78dace8dc)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-21 03:52:44 +02:00
Miss Islington (bot) 03ec4df67d bpo-34008: Allow to call Py_Main() after Py_Initialize() (GH-8043) (GH-8352)
Py_Main() can again be called after Py_Initialize(), as in Python
3.6. The new configuration is ignored, except of
_PyMainInterpreterConfig.argv which is used to update sys.argv.
(cherry picked from commit fb47bca9ee)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-21 02:16:22 +02:00
Miss Islington (bot) 49abd307d2 bpo-34161: Remove extra parentheses in output formatting tutorial (GH-8350)
The parentheses were incorrect.
(cherry picked from commit cb5f3fdb9d)

Co-authored-by: Aaqa Ishtyaq <aaqaishtyaq@gmail.com>
2018-07-20 13:38:06 -07:00
Terry Jan Reedy 97c079c19a
bpo-34162: idlelib/NEWS.txt entries to 2018-7-20 (GH-8345) (GH-8347)
Cherry-picked from 2c5c0a3
2018-07-20 02:48:17 -04:00
Zachary Ware cede1e19bd
[3.7] Enable GUI testing on Travis Linux builds via Xvfb (GH-7887)
(cherry picked from commit b12112b5ba)
2018-07-19 21:50:52 -05:00
Miss Islington (bot) 339e0c1296
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:27:42 -07:00
Victor Stinner 296e572092
[3.7] bpo-34130: Fix 2 race conditions in test_signal (GH-8329)
* bpo-34130: Fix test_signal.test_socket() (GH-8326)

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)

* bpo-34130: Fix test_signal.test_warn_on_full_buffer() (GH-8327)

On Windows, sometimes test_signal.test_warn_on_full_buffer() fails to
fill the socketpair buffer. In that case, the C signal handler
succeed to write into the socket, it doesn't log the expected send
error, and so the test fail.

On Windows, the test now uses a timeout of 50 ms to fill the
socketpair buffer to fix this race condition.

Other changes:

* Begin with large chunk size to fill the buffer to speed up the
  test.
* Add error messages to assertion errors to more easily identify
  which assertion failed.
* Don't set the read end of the socketpair as non-blocking.

(cherry picked from commit 686b4b5ff2)
2018-07-18 18:49:27 +02:00
Miss Islington (bot) 68833dcbd4 Clarify ValueError's broad applicability (GH-8313) (GH-8315)
(cherry picked from commit feabae9617)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-07-17 13:22:50 -07:00
Miss Islington (bot) 6020d98bea
bpo-34068: _io__IOBase_close_impl could call _PyObject_SetAttrId with an exception set (GH-8282)
(cherry picked from commit 28f07364f0)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-07-17 00:09:32 -07:00
Miss Islington (bot) 892df9d15a
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:18:56 -07:00
Miss Islington (bot) bfa8a358e2 bpo-34123: Fix missed documentation update for dict.popitem(). (GH-8292) (GH#8307) 2018-07-16 19:08:13 -07:00
Miss Islington (bot) 43c2fabb2f bpo-34124: Fix markup of message_from_binary_file() signature (GH-8297)
(cherry picked from commit c9265c1534)

Co-authored-by: Jon Ribbens <jribbens@gmail.com>
2018-07-16 21:43:41 +03:00
Miss Islington (bot) 0a820a2030 bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8296)
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:40:11 +02:00
Miss Islington (bot) bbddd667a9 bpo-33911: Fixed deprecation warning in xmlrpc.server (GH-7847) (GH-8294)
Replace deprecated inspect.getfullargspec() with inspect.signature().
(cherry picked from commit 35c0809158)

Co-authored-by: Nicolas Noé <nicolas@niconoe.org>
2018-07-16 11:02:23 +02:00
Miss Islington (bot) 5594f1dfbe
bpo-24618: Add a check in the code constructor. (GH-8283)
Check that the size of the varnames tuple is enough at least for all arguments.
(cherry picked from commit bd47384e07)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-16 00:09:44 -07:00
Miss Islington (bot) 3fc12f0e2a
bpo-34121: Fix detection of C11 atomic support on clang. (GH-8288)
(cherry picked from commit 15c7b2abdf)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-15 17:44:11 -07:00
Miss Islington (bot) c721472fb8
bpo-34087: Fix buffer overflow in int(s) and similar functions (GH-8274)
`_PyUnicode_TransformDecimalAndSpaceToASCII()` missed trailing NUL char.
It caused buffer overflow in `_Py_string_to_number_with_underscores()`.

This bug is introduced in 9b6c60cb.
(cherry picked from commit 16dfca4d82)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
2018-07-13 20:58:12 -07:00
Miss Islington (bot) cf21d0031d bpo-34108: Fix double carriage return in 2to3 on Windows (GH-8271) (#8275)
* Add test capturing failure.
* Honor newlines as present in the original file.
(cherry picked from commit cafaf0447b)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2018-07-13 15:24:19 -04:00
Miss Islington (bot) 08c1da7103
bpo-4260: Document that ctypes.xFUNCTYPE are decorators (GH-7924)
(cherry picked from commit 379e9d639a)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-13 06:35:31 -07:00
Miss Islington (bot) 4ada0cff53
bpo-33723: Fix test_time.test_thread_time() (GH-8267)
The test failed on AMD64 Debian root 3.x buildbot because the busy
loop of 100 ms only increased time.thread_time() by 19.9 ms which is
smaller than 20 ms. Modify the test to tolerate a delta of at least
15 ms instead of 20 ms.
(cherry picked from commit d6345def68)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-12 07:05:43 -07:00
Miss Islington (bot) b89776fb1b
bpo-33716, test_concurrent_futures: increase timeout (GH-7828)
Increase the timeout from 1 min to 5 min.

Replace also time.time() with time.monotonic() for timeouts.
(cherry picked from commit 3ad8decd76)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2018-07-12 02:05:49 -07:00
Miss Islington (bot) 9beed0c36f
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
(cherry picked from commit 993030aac5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-11 14:54:29 -07:00
Miss Islington (bot) 48d2aeb009
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 09:56:05 -07:00
Miss Islington (bot) 020f5ab717
bpo-33648: Remove PY_WARN_ON_C_LOCALE (GH-7114)
This code does not appear to be used anywhere in the python code base.
The use was removed in eb81795d7d.
(cherry picked from commit b91a3a0d61)

Co-authored-by: Eitan Adler <grimreaper@users.noreply.github.com>
2018-07-11 07:48:42 -07:00
Miss Islington (bot) 0a1db32949 bpo-34092, test_logging: increase SMTPHandlerTest timeout (GH-8245) (GH-8247)
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)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-07-11 15:56:45 +02:00
Miss Islington (bot) 151820e7a0
bpo-34083: Update dict order in Functional HOWTO (GH-8230)
(cherry picked from commit 5e5bbbec46)

Co-authored-by: Stig Johan Berggren <stigjb@gmail.com>
2018-07-11 04:21:52 -07:00
Miss Islington (bot) 6b1b6e4385
Doc: Point to Simple statements section instead of PEP (GH-8238)
(cherry picked from commit 33aefad342)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-11 03:32:31 -07:00