Commit Graph

101715 Commits

Author SHA1 Message Date
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
Miss Islington (bot) bcea15a611 Dataclasses: Fix example on 30.6.8, add method should receive a list rather than an integer. (GH-8038) (GH-8237)
Change example function to append rather than add lists.
(cherry picked from commit da5e9476bb)

Co-authored-by: Tom Faulkner <tomfaulkner@gmail.com>
2018-07-11 06:11:11 -04:00
Miss Islington (bot) c87b1aabbd
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 17:51:03 -07:00
Miss Islington (bot) 5cca6f9fbe
bpo-34009: Expand on platform support changes (GH-8022)
Many users won't realise the implications the OpenSSL 1.0.2
minimum version requirement has when it comes to Ubuntu
14.04 and Debian 8, so expand on that in the platform support
section.

Also explicitly note the non-ASCII-based locale requirement for
full Unicode text handling support on non-Windows systems.
(cherry picked from commit 5fe7c98a54)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2018-07-10 06:24:06 -07:00
Miss Islington (bot) 125371d2c6
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:08:43 -07:00
Miss Islington (bot) df9f633f94
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 00:48:57 -07:00
Miss Islington (bot) c3bdea4c6c
prefix internal sqlite symbols with _pysqlite_ (GH-8215)
(cherry picked from commit 7762e4d387)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 21:48:02 -07:00
Miss Islington (bot) ba10da1373
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:29 -07:00
Miss Islington (bot) 8d6b6d1f1d
Move Code_of_Conduct.rst to the root level. (GH-8209)
Follow up from https://github.com/python/peps/pull/712GH-issuecomment-403591108:

"people using the repo without using GitHub still ought to be reminded of the COC" - GvR
(cherry picked from commit 3ed919290e)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
2018-07-09 14:50:29 -07:00
Miss Islington (bot) 22fb674fa4
bpo-24459: Document missing env variables in python.man (GH-4142)
Initial patch by Joshua Jay Herman.
(cherry picked from commit 9863de0355)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-07-09 12:37:23 -07:00
Miss Islington (bot) 6f4fbf8ea4
bpo-22689: Copy the result of getenv() in sys_breakpointhook(). (GH-8194)
(cherry picked from commit f60bf0e168)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-09 12:06:02 -07:00
Miss Islington (bot) 958a25ea9f
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:47:14 -07:00
Miss Islington (bot) 1b6e217304
bpo-34067: Include a more easily understood example for nullcontext (GH-8158)
Include a more easily understood example for nullcontext
(cherry picked from commit c287545d62)

Co-authored-by: Daniel Porteous <danielporteous1@gmail.com>
2018-07-09 07:11:42 -07:00
Miss Islington (bot) 80a5f04592
bpo-28626: rearrange discussion of output formatting to encourage f-strings (GH-6036)
The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings.

This doesn't drop all of the old material, but it does rearrange the topics into a more modern order: f-strings first, discussing formatting specifiers a bit; then calling .format(); finally manual formatting with .ljust().
(cherry picked from commit ced350b195)

Co-authored-by: Andrew Kuchling <amk@amk.ca>
2018-07-09 06:52:48 -07:00
Miss Islington (bot) f5197ddfd0
bpo-34066: Disabled interruption before SETUP_WITH and BEFORE_ASYNC_WITH. (GH-8159)
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 06:31:03 -07:00
Serhiy Storchaka 7c43b80150
[3.7] bpo-26544: Fixed implementation of platform.libc_ver(). (GH-7684). (GH-8193)
(cherry picked from commit 2a9b8babf0)
2018-07-09 12:55:35 +03:00
Miss Islington (bot) 79c6b35b35
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:48:02 -07:00
Marcin Niemira 0b63759651 bpo-34061: Document sqlite3.NotSupportedError (GH-8172)
(cherry picked from commit bc9aa813a3)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
2018-07-08 16:59:48 +03:00
Miss Islington (bot) a410f9f614
bpo-31014: Fix the webbrowser module. (GH-7267)
webbrowser._synthesize() called webbrowser.register() with
outdated signature.

Co-Authored-By: John Still <john@jmsdvl.com>
(cherry picked from commit 25b804a9c2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-07-08 01:09:21 -07:00
Miss Islington (bot) 21fe81c1fe
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:42:33 -07:00
Miss Islington (bot) a912305512
closes bpo-34050: Fix link in SSL docs (GH-8173)
(cherry picked from commit 9c5ba09748)

Co-authored-by: Marcin Niemira <marcin@niemira.net>
2018-07-07 15:47:35 -07:00
Miss Islington (bot) 6d16a91200
Make PySimpleQueueType static. (GH-8175)
(cherry picked from commit 9b50a7f29b)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-07 15:42:28 -07:00
Miss Islington (bot) 80c188f3ef
bpo-33702: Add some missing links in production lists and do a little polish (GH-7259)
(cherry picked from commit caccca78e4)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-07 14:09:09 -07:00
Miss Islington (bot) e5b47ea585
bpo-33804: Document that the argument for io.TextIOBase.read() is optional (GH-7510)
(cherry picked from commit b6bb77c2b8)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-07 13:39:03 -07:00
Miss Islington (bot) c5e4c76eaa
Fix moduleauthor/sectionauthor directives in Enum (GH-8117)
(cherry picked from commit 2d748389dc)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-07 12:32:08 -07:00
Miss Islington (bot) c8b18d3192
Add missing closing parentheses (GH-8144)
(cherry picked from commit 03dd0e794e)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
2018-07-07 12:19:55 -07:00
Miss Islington (bot) c34e4e987b
Make various internal _testbuffer symbols static. (GH-8160)
(cherry picked from commit 6cfe45a5c3)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-07 11:37:54 -07:00
Dong-hee Na 75f2eb5eca [3.7] bpo-34065: Improve the markup of logging.basicConfig() arguments (GH-8153). (GH-8156)
(cherry picked from commit 2800dcf656)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2018-07-07 19:12:11 +03:00
Miss Islington (bot) e019f98dc2
Fix typo in TypeVar docstring (GH-8142)
"can be used do declare" → "can be used to declare"
(cherry picked from commit 86bfed372b)

Co-authored-by: João D. Ferreira <jotomicron@gmail.com>
2018-07-07 09:05:36 -07:00
Miss Islington (bot) 8e4c8513f7
Make two PyModuleDef_Slot symbols static in _testmultiphase. (GH-8147)
(cherry picked from commit cb4bae72c9)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-06 21:25:22 -07:00