Commit Graph

41524 Commits

Author SHA1 Message Date
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
Miss Islington (bot) 98e0f26f2e [3.6] bpo-30928: Update idlelib/NEWS.txt to 2017 Oct 17. (GH-4025) (#4028)
(cherry picked from commit 27288de085)
2017-10-17 19:53:12 -04:00
Miss Islington (bot) ecacbb4f22 [3.6] bpo-13802: Use non-Latin characters in IDLE's Font settings sample. (GH-3960) (#4027)
Even if one selects a font that defines a limited subset of the unicode
Basic Multilingual Plane, tcl/tk will use other fonts that define a
character. The expanded example give users of non-Latin characters
a better idea of what they might see in the IDLE shell and editors.

To make room for the expanded sample, frames on the Font tab are
re-arranged. The Font/Tabs help explains a bit about the additions.
(cherry picked from commit e2e42274ee)
2017-10-17 19:51:48 -04:00
Miss Islington (bot) 2712247ec9 [3.6] bpo-28603: Fix formatting tracebacks for unhashable exceptions (GH-4014) (#4024)
(cherry picked from commit de86073a76)
2017-10-18 01:14:19 +03:00
Miss Islington (bot) 06949585d2 [3.6] bpo-31792: Restore os.environ in test_buffer when import numpy. (GH-4007) (#4009)
(cherry picked from commit 676db4bbf2)
2017-10-16 11:21:30 +03:00
Terry Jan Reedy 0fee56c863 [3.6] bpo-25588: Document autotest in idle_test/README.txt. (GH-4000) (#4001)
Follow-up to Victor's patch that enabled autotest to run in IDLE's Shell.
(cherry picked from commit 620f70e)
2017-10-14 23:16:57 -04:00
INADA Naoki 7060380d57 bpo-31672: Fix string.Template accidentally matched non-ASCII identifiers (GH-3872)
Pattern `[a-z]` with `IGNORECASE` flag can match to some non-ASCII characters.

Straightforward solution for this is using `IGNORECASE | ASCII` flag.
But users may subclass `Template` and override only `idpattern`. So we want to
avoid changing `Template.flags`.

So this commit uses local flag `-i` for `idpattern` and change `[a-z]` to `[a-zA-Z]`.
(cherry picked from commit b22273ec5d)
2017-10-14 14:21:59 +09:00
Miss Islington (bot) 6234e90683 [3.6] bpo-25588: Fix regrtest when run inside IDLE (GH-3962) (#3987)
When regrtest in run inside IDLE, sys.stdout and sys.stderr are not
TextIOWrapper objects and have no file descriptor associated:
sys.stderr.fileno() raises io.UnsupportedOperation.

Disable faulthandler and don't replace sys.stdout in that case.
(cherry picked from commit ccef823939)
2017-10-13 13:42:27 -07:00
Miss Islington (bot) c923da188b [3.6] bpo-30058: Fixed buffer overflow in select.kqueue.control(). (GH-1095) (#3973)
(cherry picked from commit de07210077)
2017-10-12 23:20:44 +03:00
Miss Islington (bot) 205dd4e14d [3.6] bpo-31567: add or fix decorator markup in docs (GH-3959) (GH-3966)
(cherry picked from commit 0e61e67a57)
2017-10-12 12:33:05 -04:00
Miss Islington (bot) a8ac71d15f [3.6] bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text and Element.tail (GH-3924) (#3945)
(cherry picked from commit 39ecb9c71b)
2017-10-11 00:51:28 +03:00
Serhiy Storchaka 6f059ab80a [3.6] bpo-31642: Restore blocking "from" import by setting None in sys.modules. (GH-3834). (#3923)
(cherry picked from commit f07e2b64df)
2017-10-08 12:51:55 +03:00
Miss Islington (bot) d13a4e5067 [3.6] bpo-31724: Skip test_xmlrpc_net (GH-3922)
With the upgrade of buildbot.python.org from Buildbot 0.8.x to 0.9.x,
the xmlrpc interface has been removed.  This test is now skipped until
it can be rewritten to query a suitable substitute.

(cherry picked from commit 73ffd3f203)
2017-10-08 01:52:07 -05:00
Miss Islington (bot) cae6e4775b [3.6] bpo-31655: Validate keyword names in SimpleNamespace constructor. (GH-3909) (#3920)
(cherry picked from commit 79ba471488)
2017-10-07 23:52:57 +03:00
Rohit Balasubramanian 93c0885dc8 bpo-31507 Add docstring to parseaddr function in email.utils.parseaddr (GH-3647) (GH-3733)
(cherry picked from commit 9e7b9b21fe)
2017-10-06 22:27:36 -07:00
Miss Islington (bot) fae0512e58 [3.6] bpo-31178: Mock os.waitpid() in test_subprocess (GH-3896) (#3897)
Fix test_exception_errpipe_bad_data() and
test_exception_errpipe_normal() of test_subprocess: mock os.waitpid()
to avoid calling the real os.waitpid(0, 0) which is an unexpected
side effect of the test.
(cherry picked from commit 11045c9d8a)
2017-10-05 07:10:59 -07:00
Miss Islington (bot) a65b2420f6 [3.6] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (#3874)
when pass a string larger than 2 GiB.

Decrease memory requirements for Tcl's bigmem tests.
(cherry picked from commit 27c623c845)
2017-10-03 23:50:46 +03:00
Miss Islington (bot) b5a630f3dd [3.6] bpo-31619: Fixed a ValueError when convert a string with large number of underscores (GH-3827) (#3863)
to integer with binary base.
(cherry picked from commit 85c0b8941f)
2017-10-03 15:38:46 +03:00
Miss Islington (bot) ac6245a31f [3.6] bpo-31516: current_thread() should not return a dummy thread at shutdown (GH-3673) (#3856)
bpo-31516: current_thread() should not return a dummy thread at shutdown
(cherry picked from commit 1023dbbcb7)
2017-10-02 17:20:01 +02:00
Miss Islington (bot) 66fb5ef3bb [3.6] bpo-31158: Fix nondeterministic read in test_pty (GH-3808) (GH-3852)
(cherry picked from commit e6f62f69f0)
2017-10-02 02:57:56 -07:00
Terry Jan Reedy c041816045 [3.6] IDLE: make filetypes a tuple constant. (GH-3847) (#3848)
Save a bit of code, plus non-tuples get converted anyway to tuples by tkinter for the tk call.
(cherry picked from commit 5961e7c156)
2017-10-01 19:37:19 -04:00
Terry Jan Reedy c8198c9232 [3.6] bpo-31460: Simplify the API of IDLE's Module Browser. (GH-3842) (#3843)
Passing a widget instead of an flist with a root widget opens the option of
creating a browser frame that is only part of a window. Passing a full file
name instead of pieces assumed to come from a .py file opens the possibility
of browsing python files that do not end in .py.
(cherry picked from commit d6bb65f)
2017-09-30 20:32:29 -04:00
Terry Jan Reedy 40c54d5e1a [3.6] bpo-31649: Make IDLE's _htest, _utest parameters keyword-only. (GH-3839) (#3841)
(cherry picked from commit bfebfd8)
2017-09-30 18:45:53 -04:00
Miss Islington (bot) d9c21a45fd [3.6] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) (#3837)
(cherry picked from commit f4ea642cb6)
2017-09-30 22:52:00 +03:00
Miss Islington (bot) a4dfe1c9ea [3.6] bpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata.normalize(). (GH-3767) (#3836)
(cherry picked from commit 7dc46d8cf5)
2017-09-30 22:51:37 +03:00
Miss Islington (bot) 9ef28b6ad3 [3.6] bpo-31641: Allow arbitrary iterables in `concurrent.futures.as_completed()` (GH-3830) (#3831)
This was possible before.  GH-1560 introduced a regression after 3.6.2 got
released where only sequences were accepted now.  This commit addresses this
problem.
(cherry picked from commit 574562c5dd)
2017-09-29 15:07:01 -07:00
Miss Islington (bot) a5610e0746 [3.6] bpo-25351: avoid activate failure on strict shells (GH-3804) (#3820)
(cherry picked from commit 90f1d98959)
2017-09-29 05:34:43 -07:00