Commit Graph

98416 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
Berker Peksag 0f1973d06e
bpo-31065: Add doc about Popen.poll returning None. (GH-3169)
(cherry picked from commit 006617ff7d)
2017-10-29 07:06:48 +03: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
Miss Islington (bot) 37d1d967ee bpo-31053: Remove redundant 'venv' argument in venv example (GH-2907)
(cherry picked from commit d609b0c24e)
2017-10-27 07:47:00 +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
Miss Islington (bot) 614ea48986 bpo-30937: Make usage of newline='' consistent in csv docs (GH-2730)
(cherry picked from commit 275d2d9c46)
2017-10-26 11:38:14 +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) a5f9d24c17 bpo-30722: Make redemo work with Python 3.6+ (GH-2311)
(cherry picked from commit 62adc55aff)
2017-10-23 20:40:36 +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
Serhiy Storchaka 77af0a3bca [3.6] bpo-31572: Get rid of using _PyObject_HasAttrId() in pickle. (GH-3729). (#4081)
(cherry picked from commit 04e36af9b8)
2017-10-23 15:00:41 +03: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
Miss Islington (bot) be4e9cc769 [3.6] bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functions (GH-4026) (#4032)
Fix timeout rounding in time.sleep(), threading.Lock.acquire() and
socket.socket.settimeout() to round correctly negative timeouts between -1.0 and
0.0. The functions now block waiting for events as expected. Previously, the
call was incorrectly non-blocking.
(cherry picked from commit 59af94fa61)
2017-10-18 12:09:57 +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) 858ea4354f [3.6] bpo-31799: Make module.__spec__ more discoverable (GH-4010) (#4021)
bpo-31799: Make module.__spec__ more discoverable
(cherry picked from commit 191e313820)
2017-10-17 15:59:21 -04: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
Miss Islington (bot) cfc604722f [3.6] completly -> completely (GH-3999) (closes bpo-31788) (#4008)
(cherry picked from commit 1295e11d39)
2017-10-15 12:48:50 -07:00
Miss Islington (bot) e881302b70 [3.6] bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993)
(cherry picked from commit 1b9e76ed3a)
2017-10-15 10:37:07 +03:00
Miss Islington (bot) 59b5c139d2 [3.6] bpo-31780: Fix incorrect error message for ',x', ',b', ',o' specs (GH-4002) (#4004)
Patch by Pablo.
(cherry picked from commit 28773ca7a7)
2017-10-15 00:01:28 -04: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
Serhiy Storchaka 69ed5b61e7 [3.6] bpo-31714: Improved regular expression documentation. (GH-3907). (#3994)
(cherry picked from commit cd195e2a7a)
2017-10-14 12:17:14 +03: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) fdf151bbfb [3.6] Improve test suite customization example (GH-3967)
Reported by John Gamboa on docs@p.o at
https://mail.python.org/pipermail/docs/2017-June/031942.html

(cherry picked from commit 9255104499)
2017-10-13 06:54:32 +03:00
Ned Deily 86f37b5225 Exclude non-default VENVDIR in Doc builds (#3974) (#3975) 2017-10-12 16:21:17 -04: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
Ned Deily f8d42ea0e4 bpo-31766: restore 3.5 to docs version switchers (#3970) 2017-10-12 14:19:07 -04: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
Berker Peksag 5f908005ce bpo-28647: Update -u documentation (GH-3954)
* stdout and stderr are always opened in text mode
* and they are line-buffered

Initial patch by Gareth Rees.
2017-10-11 17:09:57 +03:00
Miss Islington (bot) 764969a4b9 [3.6] bpo-28157: Improvements for the time module documentation (GH-928)
* Separated functions and constants descriptions in sections.
* Added a note about the limitations of timezone constants.
* Removed redundant lists from the module docstring.

(cherry picked from commit 703ff381ff)
2017-10-11 16:50:21 +03:00
Miss Islington (bot) 10eb14e2c5 bpo-31537: Update readline documentation example. (GH-3925) (GH-3948)
Change the code example from using `get_history_length` to `get_current_history_length`.
(cherry picked from commit eeb5ffd54e)
2017-10-10 15:03:14 -07:00