Commit Graph

41550 Commits

Author SHA1 Message Date
Andrew Svetlov cc0961c517
[3.6] bpo-32015: Asyncio looping during simultaneously socket read/write an… (GH-4386) (#4393)
* bpo-32015: Asyncio cycling during simultaneously socket read/write and reconnection

* Tests fix

* Tests fix

* News add

* Add new unit tests.
(cherry picked from commit e1d62e0b7c)
2017-11-14 12:14:51 +02:00
xdegaye ad004f9b5a
[3.6] bpo-28759: Skip some tests on PermissionError raised by Android (GH-4350) (#4380)
(cherry picked from commit 92c2ca7633)
2017-11-12 18:18:36 +01:00
xdegaye ea5b545e38
[3.6] bpo-30696: Fix the REPL looping endlessly when no memory (GH-4160). (#4379)
(cherry picked from commit e0582a37c8)
2017-11-12 17:33:16 +01:00
Miss Islington (bot) 7997fa2e21 bpo-31999: Fix test_venv in case the zlib module is not available. (GH-4359) (#4360)
(cherry picked from commit 5e0df74b3b)
2017-11-10 12:56:59 +02:00
Miss Islington (bot) b9a40aca29 bpo-31222: Make (datetime|date|time).replace return subclass type in Pure Python (GH-4176) (#4356)
(cherry picked from commit 191e993365)
2017-11-09 16:52:05 -08:00
Miss Islington (bot) ac4f6d4448 bpo-31620: have asyncio/queues not leak memory when you've exceptions during waiting (GH-3813) (#4326)
(cherry picked from commit c62f0cb3b1)
2017-11-07 22:08:15 +03:00
Antoine Pitrou d8d218ffda
[3.6] bpo-31970: Reduce performance overhead of asyncio debug mode. (GH-4314) (#4322)
* bpo-31970: Reduce performance overhead of asyncio debug mode..
(cherry picked from commit 921e9432a1)
2017-11-07 17:50:48 +01:00
Miss Islington (bot) 518c6b9786 bpo-31960: Fix asyncio.Future documentation for thread (un)safety. (GH-4319) (#4320)
(cherry picked from commit 22b1128559)
2017-11-07 17:22:18 +01:00
Miss Islington (bot) a5dca7d173 Fix the sizeof test for dicts with shared keys. (GH-4311) (#4312)
By accident the size of the empty dict keys object matched the
size of values array.
(cherry picked from commit 39a156c505)
2017-11-07 15:59:33 +02:00
Miss Islington (bot) b0331c94c2 bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (GH-3958) (#4303)
(cherry picked from commit edb13ae48c)
2017-11-06 16:45:19 -08:00
Miss Islington (bot) 9684cf69e3 bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once (GH-3968) (#4301)
(cherry picked from commit e56ab746a9)
2017-11-06 16:44:23 -08:00
Terry Jan Reedy 646e4c8fcc
[3.6] Fix miscellaneous typos in idlelib (GH-4275) (#4291)
Manual partial backport of patch that fixed nearly 50 other files.
2017-11-05 20:30:06 -05:00
Miss Islington (bot) ec2b2dcdd6 bpo-9678: Fix determining the MAC address in the uuid module. (GH-4264) (#4269)
* Using ifconfig on NetBSD and OpenBSD.
* Using arp on Linux, FreeBSD, NetBSD and OpenBSD.

Based on patch by Takayuki Shimizukawa.
(cherry picked from commit ee1a9a2b78)
2017-11-04 10:11:20 +02:00
Miss Islington (bot) 8ce98543ef bpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4259)
(cherry picked from commit a7723d8b09)
2017-11-03 22:11:09 +02:00
Miss Islington (bot) a512493371 bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) (#4262)
All Blake2 params have to be encoded in little-endian byte order. For
the two multi-byte integer params, leaf_length and node_offset, that
means that assigning a native-endian integer to them appears to work on
little-endian platforms, but gives the wrong result on big-endian. The
current libb2 API doesn't make that very clear, and @sneves is working
on new API functions in the GH issue above. In the meantime, we can work
around the problem by explicitly assigning little-endian values to the
parameter block.

See https://github.com/BLAKE2/libb2/issues/12.
(cherry picked from commit dcfb0e3c04)
2017-11-03 20:55:54 +01:00
Antoine Pitrou b5f09acf0a
[3.6] bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed (GH-3247) (#4254)
* bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed

* Avoid mucking with process state in test.
Add a warning if the semaphore process died, as semaphores may then be leaked.

* Add NEWS entry
(cherry picked from commit cbe1756)
2017-11-03 14:58:37 +01:00
Antoine Pitrou 019c99f325
[3.6] bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary (GH-3246) (#4252)
* bpo-31308: If multiprocessing's forkserver dies, launch it again when necessary.

* Fix test on Windows

* Add NEWS entry

* Adopt a different approach: ignore SIGINT and SIGTERM, as in semaphore tracker.

* Fix comment

* Make sure the test doesn't muck with process state

* Also test previously-started processes

* Update 2017-08-30-17-59-36.bpo-31308.KbexyC.rst

* Avoid masking SIGTERM in forkserver.  It's not necessary and causes a race condition in test_many_processes..
(cherry picked from commit fc6b348b12)
2017-11-03 13:59:43 +01:00
Miss Islington (bot) 5fbe5e161c bpo-30806: Fix netrc.__repr__() format (GH-2491)
netrc file format doesn't support quotes and escapes.

See https://linux.die.net/man/5/netrc
(cherry picked from commit b24cd055ec)
2017-11-03 14:36:45 +09:00
Miss Islington (bot) aad7ac10af bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (GH-4220) (#4221)
(cherry picked from commit 4f469c0966)
2017-11-01 21:23:46 +02:00
Miss Islington (bot) 1f81ea85e8 bpo-15037: Add a workaround for getkey() in curses for ncurses 5.7 and earlier. (GH-3826) (#4218)
Skip a test for unget_wch()/get_wch() on OpenBSD since they are broken
in ncurses 5.7.
(cherry picked from commit 7e68790f3d)
2017-11-01 16:38:35 +02:00
Miss Islington (bot) 2be9a31213 bpo-31919: Fix building the curses module on OpenIndiana. (GH-4211) (#4215)
(cherry picked from commit 894ebd065e)
2017-11-01 15:11:12 +02:00
Miss Islington (bot) 89b84b026b Fix test_socket.test_create_connection() (GH-4206) (#4208)
bpo-31910: test_create_connection() now catchs also EADDRNOTAVAIL to
fix the test on Travis CI.
(cherry picked from commit 280c22a82a)
2017-11-01 06:07:25 -07:00
Miss Islington (bot) 6969d368c4 bpo-31897: Convert unexpected errors when read bogus binary plists into InvalidFileException. (GH-4171) (#4192)
(cherry picked from commit db91e0fe24)
2017-10-31 15:58:55 +02:00
Miss Islington (bot) 5db32085e7 bpo-31891: Fix building the curses module on NetBSD. (GH-4165) (#4189)
(cherry picked from commit baac01e629)
2017-10-31 14:33:09 +02:00
Victor Stinner 41efc402f1
bpo-31629: Add support.SaveSignals (#4183) (#4187)
test_curses now saves/restores signals. On FreeBSD, the curses module
sets handlers of some signals, but don't restore old handlers when
the module is deinitialized.

(cherry picked from commit 19f68301a1)
2017-10-31 03:45:01 -07:00
Pablo Galindo 690c36f2f1 [3.6] bpo-31852: Fix segfault caused by using the async soft keyword (GH-4122) 2017-10-30 17:46:34 -07:00
Serhiy Storchaka 9ea5a3a45b
[3.6] bpo-20047: Make bytearray methods partition() and rpartition() rejecting (GH-4158) (#4162)
separators that are not bytes-like objects..
(cherry picked from commit a2314283ff)
2017-10-29 12:24:45 +02:00
Miss Islington (bot) 8ed5644f78 bpo-31836: Test_code_module now passes with sys.ps1, ps2 set (GH-4070) (#4156)
(cherry picked from commit 5a4bbcd479)
2017-10-28 07:43:16 -04:00
Miss Islington (bot) eb5aa3624e IDLE -- Restrict shell prompt manipulaton to the shell. (GH-4143) (#4155)
Editor and output windows only see an empty last prompt line.
This simplifies the code and fixes a minor bug when newline is inserted.
Sys.ps1, if present, is read on Shell start-up, but is not set or changed.
(cherry picked from commit e86172d63a)
2017-10-27 21:39:37 -04:00
Miss Islington (bot) 6a2957de08 bpo-31860: Make the font sample in the IDLE font configuration dialog editable. (GH-4106) (#4154)
Changes persist while IDLE remains open
(cherry picked from commit ed6554c487)
2017-10-27 20:59:38 -04:00
Miss Islington (bot) bb78898224 bpo-31174: Improve the code of test_tools.test_unparse. (GH-4146) (#4148)
(cherry picked from commit 7351f9e5a9)
2017-10-27 16:17:36 +03:00
xdegaye 4b27d51222 [3.6] bpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327). (#4135)
(cherry picked from commit 56d1f5ca32)
2017-10-26 17:48:48 +02:00
Serhiy Storchaka d94ef8fe94 Fix trailing whitespaces in C and Python files. (#4131) 2017-10-26 17:00:13 +03:00
Serhiy Storchaka 2b5cbbb13c [3.6] bpo-21720: Restore the Python 2.7 logic in handling a fromlist. (GH-4118) (#4128)
BytesWarning no longer emitted when the fromlist argument of
__import__() or the __all__ attribute of the module contain bytes
instances..
(cherry picked from commit 41c56940c6)
2017-10-26 12:02:54 +03:00
Serhiy Storchaka f52dff611c bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. (#4111) 2017-10-24 23:11:42 +03:00
xdegaye d5d79545b7 [3.6] bpo-30817: Fix PyErr_PrintEx() when no memory (GH-2526). (#4107)
(cherry picked from commit 66caacf2f0)
2017-10-24 16:42:33 +02:00
Miss Islington (bot) d8f78a1fbc bpo-31174: Fix test_tools.test_unparse (GH-4102) (#4104)
test_unparse.DirectoryTestCase now stores the names sample to always
test the same files. It prevents false alarms when hunting reference
leaks.
(cherry picked from commit 8e482bea21)
2017-10-24 04:18:00 -07:00
Miss Islington (bot) d7604f5d06 bpo-31847: Fix commented out tests in test_syntax. (GH-4084) (#4095)
SyntaxError now is raised instead of SyntaxWarning.
(cherry picked from commit 3b66ebe772)
2017-10-24 01:08:03 +03:00
Miss Islington (bot) 6e45d7b90a bpo-31752: Fix possible crash in timedelta constructor called with custom integers. (GH-3947) (#4086)
Bad remainder in divmod() in intermediate calculations caused an assertion failure.
(cherry picked from commit 4ffd4653a7)
2017-10-23 18:20:13 +03:00
Miss Islington (bot) aaf6a3dbbd [3.6] bpo-30695: Add set_nomemory(start, stop) to _testcapi (GH-2406) (#4083)
(cherry picked from commit 85f643023f)
2017-10-23 15:05:46 +02:00
Miss Islington (bot) 251de30935 bpo-28286: Add tests for the mode argument of GzipFile. (GH-4074) (#4076)
(cherry picked from commit bcbdd2f8db)
2017-10-22 14:53:43 +03:00
Antoine Pitrou 34ef6da8f5 [3.6] bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed or None. (GH-4073). (#4075)
* bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed or None. (#4073)

(cherry picked from commit daeefd2e04)

* [3.6] bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed or None. (GH-4073).
(cherry picked from commit daeefd2e04)
2017-10-22 12:27:13 +02:00
Miss Islington (bot) 1e78ed6825 bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (GH-4058) (#4059)
and in codecs.escape_decode() when decode an escaped non-ascii byte.
(cherry picked from commit 56cb465cc9)
2017-10-20 17:41:29 +03:00
Miss Islington (bot) 9c23b173b8 bpo-31632: fix set_protocol() in _SSLProtocolTransport (GH-3817) (GH-3817) (#4052)
(cherry picked from commit ea2ef5d0ca)
2017-10-19 14:12:44 -04:00
Miss Islington (bot) 4d9a8f2299 bpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (GH-4044) (GH-4050)
This used to be the case on Python 2.  Commit
212b590e11 changed the implementation for Python
3, making the `log()` method of LogAdapter call `logger._log()` directly.  This
makes nested log adapters not execute their ``process()`` method.  This patch
fixes the issue.

Also, now proxying `name`, too, to make `repr()` work with nested log adapters.

New tests added.
(cherry picked from commit ce9e625445)
2017-10-19 11:11:49 -07:00
Miss Islington (bot) 537ed75291 [3.6] bpo-31457: Make the `LoggerAdapter.manager` property settable (GH-4042) (#4043)
Due to a bug in the initial fix, the setter was in fact creating a different
property.  This is now fixed.
(cherry picked from commit 0b6a118a45)
2017-10-18 18:02:59 -07:00
Miss Islington (bot) 7bbbc6afa4 Update TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. (GH-3998) (GH-4039)
The word "difference" from missing the sentence.
This clarifies that it compares the difference between the two objects.
(cherry picked from commit 032a6480e3)
2017-10-18 10:34:27 -07:00
Miss Islington (bot) 97abcabc19 [3.6] bpo-31334: Fix timeout in select.poll.poll() (GH-3277) (#4033)
Always pass -1, or INFTIM where defined, to the poll() system call when
a negative timeout is passed to the poll.poll([timeout]) method in the
select module. Various OSes throw an error with arbitrary negative
values.
(cherry picked from commit 6cfa927ceb)
2017-10-18 15:05:16 +03:00
Pablo Galindo 95602b368b [3.6] bpo-31786: Make functions in the select module blocking when timeout is a small negative value. (GH-4003). (#4022)
(cherry picked from commit 2c15b29aea)
2017-10-18 11:12:47 +03:00
Miss Islington (bot) 1781480254 bpo-31676: Fix test_imp.test_load_source() side effect (GH-3871) (GH-3988)
test_load_source() now replaces the current __name__ module with a
temporary module to prevent side effects.
(cherry picked from commit a505ecdc50)
2017-10-17 18:47:10 -07:00