Commit Graph

184 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
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 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
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) 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
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) 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) 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
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) 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) 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
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) 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
Serhiy Storchaka fcc832a4fa [3.6] bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). (GH-3864). (#3873)
(cherry picked from commit 929b40a601)
2017-10-03 22:39:37 +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
Ned Deily e925c4f299 Python 3.6.3
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCgAGBQJZ0yZmAAoJEC00fqaqZUId+AkP/jmhnWRFOx8pljdbhUDqMpAh
 WKtlafbAM4p9YDW1y0uB5Shb0vYoETbtwl+1bPh95ybyypFHoFUWBM3WmM3vofLp
 WOASXQkVflW+aj7iuR8xa/SPGgyYahdxGAsZ50z7gRUHTn0BUj1OOdbvDSncxaRN
 7O+Klv4lG3sIOhq9r/q2jqCYymehDuDioUETJkh1BAbk03lXd9j7xLsTaaJnXPxB
 hGc65KxmI0ZL18yvj348O+QgKR97UgmwsebhmCsikRAi5BL1aIH+B8OjMcHeAB2b
 Z0qhXZrdI2uPFiqTxAHQllR71h5T9Df9K8JQMNd/dPxZsxpn+JzddrqU6LfKCHIL
 gLX/uMUOGOcPD33vm7X3Nr1dvZnb6hxpoInhkaqI22L2MxkBKAbNFzdkbN+Qx3Z2
 mjccmKBlEYSbJQHcAc+QFMhouOzNFTp4zsaY62bHuBQnHvuJhll0/uw2VLhy8qTw
 hz9LHJYKjAkMhjsKc8Ac0g6iwKcvmalzPLzXdDMjAn0vVY6A4UMbf1EeT4i8WP9Z
 pnm3dDqTv0Rr1kyjl3v/i2nNFmrMwb07yrvXjI1sf2AuOFUzu0z6ORePex+V774z
 S3x1Bq4OP1MclEVWkJkFbl/MN5lUQsSi6+wxeN+/VnEe9+qDAUAzxYNbEYCGgwFa
 MDXdYCwMBkuprbbThNmV
 =r7O9
 -----END PGP SIGNATURE-----

Merge v3.6.3 into 3.6 branch
2017-10-03 04:42:24 -04:00
Ned Deily 33bd6fdf3f Update NEWS blurbs for 3.6.3 final 2017-10-03 01:36:12 -04:00
Ned Deily fa8421dbb4 Improve/fix some Misc/NEWS entries 2017-10-03 01:26:32 -04:00
Ned Deily 22b131305a Add NEWS entries for 3.6.3 final cherrypicks. 2017-10-03 01:07:42 -04: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
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) 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) 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
Miss Islington (bot) ec3d34c5b2 [3.6] bpo-31536: Avoid wholesale rebuild after `make regen-all` (GH-3678) (#3797)
bpo-31536: Avoid wholesale rebuild after `make regen-all`
2017-09-28 13:21:32 +02:00
Serhiy Storchaka befc956acf [3.6] bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__() method. (GH-3596) (#3794)
(cherry picked from commit d780b2d588)
2017-09-28 12:17:51 +03:00
Benjamin Peterson 68b131d5b6 [3.6] closes bpo-22140: Prevent double substitution of prefix in python-config.sh (GH-3769) (#3793)
Fix the logic in python-config.sh to avoid attempting to substitute
prefix in a variable that might have already been subject to
substitution. This e.g. happened if @exec_prefix@ was defined as
"${prefix}" (which is the default of the configure script) -- in which
case the exec_prefix_build variable was initialized with
already-subtituted prefix, and then another round of substitution was
performed which might have resulted in duplicate prefix.

To avoid that, rename the variables so that the variables matching
likely configure names (prefix, exec_prefix) retain their original
values and a '_real' suffix is used for the real values of prefix.

Furthermore, replace the unnecessary prefix and exec_prefix
substitutions with direct prefix_real references since the sed
always replaced the whole string anyway by design.
(cherry picked from commit 14086cfc5e)
2017-09-27 20:27:41 -07:00
Miss Islington (bot) 084f80b82c [3.6] bpo-31588: Validate return value of __prepare__() methods (GH-3790)
Class execution requires that __prepare__() methods return
a proper execution namespace. Check for that immediately
after calling __prepare__(), rather than passing it through
to the code execution machinery and potentially triggering
SystemError (in debug builds) or a cryptic TypeError
(in release builds).

Patch by Oren Milman.
(cherry picked from commit 5837d0418f)
2017-09-28 02:21:33 +10:00
Serhiy Storchaka 02c3cdcef8 [3.6] bpo-25532: Protect against infinite loops in inspect.unwrap() (GH-1717) (#3778)
Some objects (like test mocks) auto-generate new objects on
attribute access, which can lead to an infinite loop in
inspect.unwrap().

Ensuring references are retained to otherwise temporary objects
and capping the size of the memo dict turns this case into a
conventional exception instead..
(cherry picked from commit f9169ce6b4)
2017-09-27 09:34:44 +03:00
Miss Islington (bot) 7c24e99c99 [3.6] bpo-31505: Fix an assertion failure in json, in case _json.make_encoder() received a bad encoder() argument. (GH-3643) (#3777)
(cherry picked from commit 2b382dd612)
2017-09-27 08:21:47 +03:00
Serhiy Storchaka 90fe25a051 [3.6] bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. (GH-3219) (#3775)
(cherry picked from commit 91fb0afe18)
2017-09-27 07:38:03 +03:00
Miss Islington (bot) bdb215b18a [3.6] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3774)
(cherry picked from commit 30b61b51e0)
2017-09-27 07:37:37 +03:00
Serhiy Storchaka f0db2dfda7 [3.6] bpo-31492: Fix assertion failures in case of a module with a bad __name__ attribute. (GH-3620). (#3773)
(cherry picked from commit 6db7033192)
2017-09-27 07:33:00 +03:00
Miss Islington (bot) 69b2dc8637 [3.6] bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (GH-1557) (#3770)
(cherry picked from commit c740e4fe8a)
2017-09-26 22:20:22 +03:00
Miss Islington (bot) a6bddb8e43 [3.6] bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (GH-3254) (#3743)
(cherry picked from commit 57c2561c8c)
2017-09-25 11:49:08 +03:00
Miss Islington (bot) d38caf68bb [3.6] bpo-30085: Improve documentation for operator (GH-1171) (#3736)
The dunderless functions are preferred; dunder are retained for back compatilibity.
Patch by Sanket Dasgupta.
(cherry picked from commit 5b9299d8c7)
2017-09-24 17:13:15 -04:00