Commit Graph

41604 Commits

Author SHA1 Message Date
Serhiy Storchaka b580f4f2bf
[3.6] bpo-30416: Protect the optimizer during constant folding. (#4865)
It no longer spends much time doing complex calculations and no
longer consumes much memory for creating large constants that will
be dropped later.

This fixes also bpo-21074.
2017-12-15 14:12:14 +02:00
Serhiy Storchaka b82da9ebb2
[3.6] bpo-27169: The __debug__ constant is now optimized out at compile time. (GH-4880) (#4882)
This fixes also bpo-22091..
(cherry picked from commit 3325a6780c)
2017-12-15 13:26:26 +02:00
Victor Stinner 22097aaa77
bpo-32329: Fix sys.flags.hash_randomization (#4875)
sys.flags.hash_randomization is now properly set to 0 when hash
randomization is turned off by PYTHONHASHSEED=0.
2017-12-15 01:39:48 +01:00
Victor Stinner 4f37105277
pythoninfo: sync with master (#4844) 2017-12-14 15:41:06 +01:00
Andrew Svetlov 28453feaa8
[3.6] bpo-32297: Fix misspellings in Python source code comments (GH-4803) (#4864)
* [3.6] bpo-32297: Few misspellings found in Python source code comments. (GH-4803)

* Fix multiple typos in code comments

* Add spacing in comments (test_logging.py, test_math.py)

* Fix spaces at the beginning of comments in test_logging.py.

(cherry picked from commit 53f7a7c281)
2017-12-14 16:19:51 +02:00
Miss Islington (bot) 645fa19f15 bpo-32302: Fix distutils bdist_wininst for CRT v142 (GH-4851) (#4861)
CRT v142 is binary compatible with CRT v140.
(cherry picked from commit 9e7c136ad8)
2017-12-14 12:00:50 +01:00
Antoine Pitrou b6263ca313
[3.6] Test atexit shutdown mechanism in a subprocess (GH-4828) (#4829)
* Test atexit shutdown mechanism in a subprocess.
(cherry picked from commit fc5db95e00)
2017-12-13 11:53:59 +01:00
Miss Islington (bot) f4b814f9a2 Fix improper use of re.escape() in tests. (GH-4814) (#4816)
(cherry picked from commit b748e3b258)
2017-12-12 20:29:05 +02:00
Miss Islington (bot) eb2f222aae Fix implementation dependent assertion in test_plistlib. (GH-4813) (#4815)
It is failed with an advanced optimizer.
(cherry picked from commit 0e069a1597)
2017-12-12 19:53:02 +02:00
Miss Islington (bot) 78cd00b799 bpo-31942: Document optional support of start and stop attributes in Sequence.index method (GH-4277) (#4811)
(cherry picked from commit 5ce0a2a100)
2017-12-12 11:58:26 +01:00
Miss Islington (bot) ce5a3cd9b1 bpo-32255: Always quote a single empty field when write into a CSV file. (GH-4769) (#4810)
This allows to distinguish an empty row from a row consisting of a single empty field.
(cherry picked from commit 2001900b0c)
2017-12-12 12:56:40 +02:00
Miss Islington (bot) 82adaf5ffe Fix idlelib comment typos reported by Mike on pull request 4803. (GH-4807) (#4809)
(cherry picked from commit e570211406)
2017-12-11 23:29:34 -05:00
Miss Islington (bot) 0aa2a1d003 bpo-22671: Clarify and test default read method implementations (GH-4568) (#4796)
Original patch written by Martin Panter, enhanced by Sanyam Khurana.
(cherry picked from commit 1b74f9b77a)
2017-12-11 15:27:25 +01:00
Miss Islington (bot) f446b24415 Removed doubled 'bpo-'. (GH-4777) (#4780)
(cherry picked from commit f658641a05)
2017-12-10 05:38:38 -05:00
Miss Islington (bot) a04ca12e12 bpo-32208: update threading.Semaphore docs and add unit test (GH-4709) (#4750)
* fix issue32208: update threading.Semaphore docs and add unit test to validate correct behavior

* add test for blocking

* Update threading.rst

* semaphore: remove documentation validation tests and move 'return value' test to BaseSemaphore
(cherry picked from commit a0374dd34a)
2017-12-07 20:48:35 +02:00
Miss Islington (bot) 03031fbc7d bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link list' (GH-4696) (#4747)
(cherry picked from commit 961dbe0548)
2017-12-07 13:48:14 +01:00
Ned Deily ff69423492 Python 3.6.4rc1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAlomWJMACgkQLTR+pqpl
 Qh2zrg/+Pt0zn4IwkN/Kjd8K/anUMiNtLfhXalFXgYuyK0kkhkQD58Uh2jGD3zfq
 zrDT2dsFSmLMthIIrHade1kznnQ752+uIAL4Ohytk71vTo2Pjmfd38wWRtE8unHm
 8WKHDraR7mQa5HeALOAiwdKZvfMW17SqUiffhbBcz6dOY1sgnR8LfvsgM8BR/IQK
 oBm2Ywpl8tJ7BNRTmKG9HvxZURhV/6D5MGEJA1W7cQHS9RAdZ5zqlTbqB6K2tCl4
 o91DXAfKatCi9gBJfx3vPS+Cw557wPFkVcwRSUrgns3l0hrFS5n77uHoJpKlT2lx
 e0YYx/EilES2UpgtCqPswNpvNIs0wui83ZSJFvDy5OTPnDAImZ0v8iNc1c729bbD
 JsOPXNXv9mxtkrmbWEzuDJp0vI4VrjLbCiIOtLbbQD8n01FqgimoUPyPGpPr2Gwl
 8a7eUs5l3a1fr8S4urxn4W+aVxLo2txtP5j+zRtw0o1OPX1qnJ2ajOS9gr6Q0Oip
 1crR/Um7YIP8YqXqhq54YqYvVDjOg4/Y9F77fUNTiKRP4N8Ungl5GXv2yG8bJ5Fl
 lWDa7o+WWJIOPZMW9ItTexvZy/4oiGSShN/i0qeiBNLvA9kUby+POxCzk4ipPymP
 4DQPWU+e+OEvyILzBuRPyV+4buONMml1TUuQQPUJv+IkoeJ5OAo=
 =2R3W
 -----END PGP SIGNATURE-----

Merge tag 'v3.6.4rc1' into 3.6
2017-12-05 20:39:16 -05:00
Miss Islington (bot) 7a6f28f280 bpo-30928: update idlelib/NEWS.txt. (GH-4706) (#4707)
(cherry picked from commit 2c0c68d927)
2017-12-05 13:44:09 -05:00
Ned Deily de4c3f312c Update NEWS and pydoc topics. 2017-12-05 03:17:05 -05:00
Miss Islington (bot) d9cadc5f59 [3.6] bpo-31380: Skip test_httpservers test_undecodable_file on macOS. (GH-4720) (#4721)
The undecodable file name cannot be created on macOS APFS file systems.
(cherry picked from commit b3edde8dd4)
2017-12-05 00:03:29 -05:00
Miss Islington (bot) b0576278b2 [bpo-28556] Minor fixes for typing module (GH-4710) (#4713)
(cherry picked from commit 29bc193210)
2017-12-04 22:02:02 -05:00
Miss Islington (bot) 9da33c8212 bpo-32207: Improve tk event exception tracebacks in IDLE. (GH-4703) (#4705)
When tk event handling is driven by IDLE's run loop, a confusing
and distracting queue.EMPTY traceback context is no longer added
to tk event exception tracebacks.  The traceback is now the same
as when event handling is driven by user code.  Patch based on
a suggestion by Serhiy Storchaka.
(cherry picked from commit 1e2fcac497)
2017-12-04 17:02:32 -05:00
Miss Islington (bot) 6e687948b0 bpo-30928: Update idlelib/NEWS.txt to 2017 Dec 3. (GH-4701) (#4702)
Patches are in 3.7.0a3 even if this update is not.
(cherry picked from commit 21255fc393)
2017-12-04 15:23:18 -05:00
Miss Islington (bot) a87ba60fe5 bpo-27240 Rewrite the email header folding algorithm. (GH-3488) (#4693)
The original algorithm tried to delegate the folding to the tokens so
that those tokens whose folding rules differed could specify the
differences.  However, this resulted in a lot of duplicated code because
most of the rules were the same.

The new algorithm moves all folding logic into a set of functions
external to the token classes, but puts the information about which
tokens can be folded in which ways on the tokens...with the exception of
mime-parameters, which are a special case (which was not even
implemented in the old folder).

This algorithm can still probably be improved and hopefully simplified
somewhat.

Note that some of the test expectations are changed.  I believe the
changes are toward more desirable and consistent behavior: in general
when (re) folding a line the canonical version of the tokens is
generated, rather than preserving errors or extra whitespace.
(cherry picked from commit 85d5c18c9d)
2017-12-03 19:46:23 -05:00
Nick Coghlan c8f32aae0a
[3.6] bpo-32176: Set CO_NOFREE in the code object constructor (GH-4684)
Previously, CO_NOFREE was set in the compiler, which meant
it could end up being set incorrectly when code objects
were created directly. Setting it in the constructor based
on freevars and cellvars ensures it is always accurate,
regardless of how the code object is defined.

(cherry picked from commit 078f1814f1)
2017-12-03 23:32:54 +10:00
Victor Stinner e10c9de9d7
bpo-20891: Fix PyGILState_Ensure() (#4650) (#4655)
When PyGILState_Ensure() is called in a non-Python thread before
PyEval_InitThreads(), only call PyEval_InitThreads() after calling
PyThreadState_New() to fix a crash.

Add an unit test in test_embed.

Enhance also embedded tests, backport from master:

* Add test_pre_initialization_api()
* Set PYTHONIOENCODING environment variable in
  test_forced_io_encoding()

(cherry picked from commit b4d1e1f7c1)
2017-11-30 23:36:49 +01:00
Miss Islington (bot) 8cd31082fb bpo-32072: Fix issues with binary plists. (GH-4455) (#4654)
* Fixed saving bytearrays.
* Identical objects will be saved only once.
* Equal references will be load as identical objects.
* Added support for saving and loading recursive data structures.
(cherry picked from commit a897aeeef6)
2017-12-01 00:15:30 +02:00
Miss Islington (bot) c91bf742e5 bpo-28416: Break reference cycles in Pickler and Unpickler subclasses (GH-4080) (#4653)
with the persistent_id() and persistent_load() methods.
(cherry picked from commit 986375ebde)
2017-11-30 23:30:39 +02:00
Miss Islington (bot) 92a2c07b71 Skip test_socket.test_sha256() on linux < 4.5 (GH-4643) (#4645)
bpo-31705.
(cherry picked from commit 86afc1f2a7)
2017-11-30 14:43:43 +01:00
Victor Stinner 06be9daf6f
bpo-32030: Fix test_sys.test_getallocatedblocks() (#4637)
Skip the test if PYTHONMALLOC environment variable is set.
2017-11-29 23:51:41 +01:00
Barry Warsaw 23cc8c0f9e
[3.6] bpo-32107 - Backport bitmask check fix (GH-4576) (#4591)
Remove a flakey test and rewrite another one for readability.
2017-11-29 10:35:02 -05:00
Miss Islington (bot) b0df786258 bpo-32139: test_strftime does not anymore modify the locale (GH-4569) (#4635)
(cherry picked from commit cc55e78aca)
2017-11-29 16:18:22 +01:00
Miss Islington (bot) 957aef7c41 bpo-32164: Delete unused file idlelib/tabbedpages.py (GH-4628) (#4631)
(cherry picked from commit 041efd292e)
2017-11-29 01:07:21 -05:00
Miss Islington (bot) a8de696ddd bpo-30781: Remove unused imports in idlelib.configdialog. (GH-4627) (#4630)
(cherry picked from commit e8f7c78a86)
2017-11-28 22:46:32 -05:00
Miss Islington (bot) 38ecf57306 bpo-32100: Delete unneeded import in idlelib.pathbrowser. (GH-4626) (#4629)
(cherry picked from commit fd6f8c56b9)
2017-11-28 22:15:06 -05:00
Miss Islington (bot) 230ffeae0a bpo-32110: codecs.StreamReader.read(n) now returns not more than n (GH-4499) (#4622)
characters/bytes for non-negative n.  This makes it compatible with
read() methods of other file-like objects.
(cherry picked from commit 219c2de5ad)
2017-11-29 02:06:53 +02:00
Victor Stinner 6979fcdc91
bpo-32155: Bugfixes found by flake8 F841 warnings (#4619)
* turtledemo: wait until macOS osascript command completes to not
  create a zombie process
* Tools/scripts/treesync.py: declare 'default_answer' and
  'create_files' as globals to modify them with the command line
  arguments. Previously, -y, -n, -f and -a options had no effect.

flake8 warning: "F841 local variable 'p' is assigned to but never
used".
2017-11-28 23:04:12 +01:00
Miss Islington (bot) 4237939805 asyncio: Fix BaseSelectorEventLoopTests (GH-4595) (#4599)
Currently, two tests fail with PYTHONASYNCIODEBUG=1 (or using -X
dev).
(cherry picked from commit 92f9339a58)
2017-11-28 10:32:53 +01:00
Miss Islington (bot) f54e405200 asyncio: Remove unused Future._tb_logger attribute (GH-4596) (#4598)
It was only used on Python 3.3, now only Future._log_traceback is
used.
(cherry picked from commit c16bacec3c)
2017-11-28 10:32:28 +01:00
Victor Stinner d5c71b0c98
pythoninfo: add Py_DEBUG (#4198) (#4580)
(cherry picked from commit afd055a59f)
2017-11-27 10:44:53 +01:00
Miss Islington (bot) dde38b9cb3 bpo-32128: Skip test_nntplib.test_article_head_body() (GH-4552) (#4553)
The NNTP server currently has troubles with SSL, whereas we don't
have the control on this server. This test blocks all CIs, so disable
it until a fix can be found.
(cherry picked from commit 706cb3162e)
2017-11-25 03:02:47 +01:00
Berker Peksag 412f00b839
[3.6] bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539)
The previous behavior was to raise an exception

    NotImplementedError: result of type 0

when the value of the property is VT_EMPTY.

(cherry picked from commit 19fb134185)
2017-11-24 19:04:40 +03:00
Miss Islington (bot) bfa89b21e1 bpo-12382: Make OpenDatabase() raise better exception messages (GH-4528)
Previously, 'msilib.OpenDatabase()' function raised a
cryptical exception message when it couldn't open or
create an MSI file. For example:

    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    _msi.MSIError: unknown error 6e

(cherry picked from commit 4864a619dc)
2017-11-24 13:31:21 +03:00
Miss Islington (bot) ff847d1ac7 bpo-31325: Fix usage of namedtuple in RobotFileParser.parse() (GH-4529) (#4533)
(cherry picked from commit 3df02dbc8e)
2017-11-23 15:57:58 -08:00
Victor Stinner 70b2f87971
[3.6] bpo-31324: Optimize support._match_test() (#4523)
* bpo-31324: Optimize support._match_test() (#4421)

* Rename support._match_test() to support.match_test(): make it
  public
* Remove support.match_tests global variable. It is replaced with a
  new support.set_match_tests() function, so match_test() doesn't
  have to check each time if patterns were modified.
* Rewrite match_test(): use different code paths depending on the
  kind of patterns for best performances.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 803ddd8ce2)

* bpo-31324: Fix test.support.set_match_tests(None) (#4505)

(cherry picked from commit bb11c3c967)
2017-11-23 17:42:04 +01:00
Berker Peksag 4b3042900e
bpo-1102: View.Fetch() now returns None when it's exhausted (GH-4459)
(cherry picked from commit bdb8315c21)
2017-11-23 17:33:12 +03:00
Terry Jan Reedy ae3c5c7b9e
[3.6] bpo-32100: IDLE: Fix pathbrowser errors; improve tests. (GH-4484) (#4512)
Patch mostly by Cheryl Sabella.
(cherry picked from commit 20d48a44a5)
2017-11-22 20:05:35 -05:00
Miss Islington (bot) b071a5e838 bpo-30904: Removed duplicated Host: header. (GH-4465) (#4468)
(cherry picked from commit e96ba183c4)
2017-11-19 19:16:17 +00:00
Miss Islington (bot) 65dffe58dd bpo-30989: Sort in TimedRotatingFileHandler only when needed. (GH-2812) (GH-4466)
TimedRotatingFileHandler.getFilesToDelete() now sorts only when needed.
(cherry picked from commit afad147b59)
2017-11-19 18:43:49 +00:00
Victor Stinner 33217d2213
bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929) (#4416)
(cherry picked from commit 6e3d6b5dc2)
2017-11-16 03:53:45 -08:00