Commit graph

99169 commits

Author SHA1 Message Date
Miss Islington (bot)
3100b7e710
bpo-29710: Clarify documentation for Bitwise binary operation (GH-1691)
Mathematically, bitwise operations on integers behave as if there were an
infinite number of sign bits. Pragmatically, that gives the same answer as
using one extra sign bit for the bitwise logical operations.
(cherry picked from commit b4bc5cab82)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2018-07-28 09:52:31 -07: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
Miss Islington (bot)
30f295b85e
bpo-33921: Clarify how to bind to all interfaces using socket (GH-7877)
Clarify how to bind to all interfaces using socket
(cherry picked from commit 95dfb9c3ae)

Co-authored-by: johnthagen <johnthagen@users.noreply.github.com>
2018-07-28 05:27:27 -07:00
Andrés Delfino
0041d721a6 [3.6] bpo-5978: Document that profiling needs cmd/function to return (GH-8515)
<!-- issue-number: bpo-5978 -->
https://bugs.python.org/issue5978
<!-- /issue-number -->
(cherry picked from commit 937fb55d35)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-28 13:24:35 +01:00
Berker Peksag
9d85856044
bpo-30722: Fix NEWS entry (GH-8501) 2018-07-27 19:17:53 +03: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
INADA Naoki
777cdd94b9
bpo-34177: vsts: Avoid conflict with Homebrew Python (GH-8430)
/usr/local/lib/pythonX.Y is used by Homebrew's Python already.
(cherry picked from commit 3e7d18a54b)
2018-07-27 18:03:53 +09:00
Miss Islington (bot)
146ba436cc
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:42:44 -07: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
Miss Islington (bot)
cfadd1c242
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 10:40:32 -07:00
Miss Islington (bot)
a096cc6c3b 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:31:11 -07: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)
5b3643d1a5 bpo-33468: Add try-finally contextlib.contextmanager example (GH-7816) (GH-8426)
(cherry picked from commit bde782bb59)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2018-07-24 00:38:24 +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
Miss Islington (bot)
916bcc6fde
bpo-34166: Fix warnings in Tools/msgfmt.py. (GH-8367)
(cherry picked from commit a692efe473)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-07-21 00:24:41 -07: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
Zachary Ware
226f064551
[3.6] Enable GUI testing on Travis Linux builds via Xvfb (GH-7887)
(cherry picked from commit b12112b5ba)
2018-07-19 21:51:18 -05: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
Miss Islington (bot)
c774f76d21 Clarify ValueError's broad applicability (GH-8313) (GH-8317)
(cherry picked from commit feabae9617)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-07-17 13:24:27 -07:00
Serhiy Storchaka
cf30d5c5b8
bpo-24618: Add a check in the code constructor. (GH-8283) (GH-8311)
Check that the size of the varnames tuple is enough at least for all arguments.
(cherry picked from commit bd47384e07)
2018-07-17 10:33:55 +03: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)
f1ab9cac90 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 22:41:48 +03: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
Benjamin Peterson
8487ef61de
[3.6] bpo-34121: Fix detection of C11 atomic support on clang. (GH-8290)
(cherry picked from commit 15c7b2abdf)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-15 17:48:46 -07: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
Miss Islington (bot)
083a836937
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:54:18 -07: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)
3b06285d2b bpo-34080: Fix a memory leak in the compiler. (GH-8222) (GH-8257)
(cherry picked from commit 993030aac5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-12 00:05: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)
b3cc7ca250
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:52:27 -07:00
Miss Islington (bot)
def4b063f3
Fix documentation for input and output tutorial (GH-8231)
The ValueError message ends with a period.
(cherry picked from commit 9cffdbffc3)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2018-07-10 18:08:43 -07: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
Benjamin Peterson
a2aabad3b9
[3.6] prefix internal sqlite symbols with _pysqlite_ (GH-8215). (GH-8218)
(cherry picked from commit 7762e4d387)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 22:36:41 -07:00
Miss Islington (bot)
9a390b6989
delete some unused pysqlite forward declarations (GH-8211)
(cherry picked from commit d6d4432724)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 21:02:49 -07:00
Serhiy Storchaka
eeaae26ce5
[3.6] bpo-34066: Disabled interruption before SETUP_WITH and BEFORE_ASYNC_WITH. (GH-8159) (GH-8198)
This will prevent emitting a resource warning when the execution was
interrupted by Ctrl-C between calling open() and entering a 'with' block
in "with open()".
(cherry picked from commit 3f4d90d4d7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-09 19:02:25 +03: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)
336c715a82
Fix margin in sentinel and mock_open (GH-8188)
(cherry picked from commit f85af035c5)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-08 17:52:44 -07:00
Marcin Niemira
4041565348 bpo-34061: Document sqlite3.NotSupportedError (GH-8172)
(cherry picked from commit bc9aa813a3)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
2018-07-08 16:58:49 +03:00
Miss Islington (bot)
b7874c809c
bpo-33888: Use CPython instead of Python in the FAQ (GH-7767)
Make the change where discussing the CPython implementation of lists and dicts.
(cherry picked from commit 8d41278045)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-07 16:50:33 -07:00