Commit Graph

21431 Commits

Author SHA1 Message Date
Victor Stinner d5a6adf628
[3.7] bpo-34323: Enhance IocpProactor.close() log (GH-11565)
* IocpProactor: prevent modification if closed (GH-11494)

* _wait_for_handle(), _register() and _unregister() methods of
  IocpProactor now raise an exception if closed
* Add "closed" to IocpProactor.__repr__()
* Simplify IocpProactor.close()

(cherry picked from commit 9b07681c09)

* bpo-34323: Enhance IocpProactor.close() log (GH-11555)

IocpProactor.close() now uses time to decide when to log: wait 1
second before the first log, then log every second. Log also the
number of seconds since close() was called.

(cherry picked from commit b1e45739d8)

* bpo-34323: Enhance IocpProactor.close() log again (GH-11563)

Add repr(self) to the log to display the number of pending overlapped
in the log.

(cherry picked from commit b91140fdb1)
2019-01-15 13:05:28 +01:00
Miss Islington (bot) 26122de1a8
bpo-35066: _dateime.datetime.strftime copies trailing '%' (GH-10692)
Previously, calling the strftime() method on a datetime object with a
trailing '%' in the format string would result in an exception. However,
this only occured when the datetime C module was being used; the python
implementation did not match this behavior. Datetime is now PEP-399
compliant, and will not throw an exception on a trailing '%'.
(cherry picked from commit 454b3d4ea2)

Co-authored-by: MichaelSaah <mike.saah@gmail.com>
2019-01-14 02:41:33 -08:00
Miss Islington (bot) 47bd777022
bpo-35196: Optimize Squeezer's write() interception (GH-10454)
The new functionality of Squeezer.reload() is also tested, along with some general
re-working of the tests in test_squeezer.py.
(cherry picked from commit 39a33e9927)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-01-13 08:43:08 -08:00
Miss Islington (bot) cbc7c2c791
bpo-35552: Fix reading past the end in PyUnicode_FromFormat() and PyBytes_FromFormat(). (GH-11276)
Format characters "%s" and "%V" in PyUnicode_FromFormat() and "%s" in PyBytes_FromFormat()
no longer read memory past the limit if precision is specified.
(cherry picked from commit d586ccb04f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-01-12 00:52:55 -08:00
Miss Islington (bot) d39c192559
bpo-33817: Fix _PyBytes_Resize() for empty bytes object. (GH-11516)
Add also tests for PyUnicode_FromFormat() and PyBytes_FromFormat()
with empty result.
(cherry picked from commit 44cc4822bb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-01-11 23:40:09 -08:00
Miss Islington (bot) 059997d78e
bpo-32710: Fix _overlapped.Overlapped memory leaks (GH-11489)
Fix memory leaks in asyncio ProactorEventLoop on overlapped operation
failures.

Changes:

* Implement the tp_traverse slot in the _overlapped.Overlapped type
  to help to break reference cycles and identify referrers in the
  garbage collector.
* Always clear overlapped on failure: not only set type to
  TYPE_NOT_STARTED, but release also resources.
(cherry picked from commit 5485085b32)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-01-11 06:01:50 -08:00
Miss Islington (bot) b9cd38f928
bpo-32146: Add documentation about frozen executables on Unix (GH-5850)
(cherry picked from commit bab4bbb4c9)

Co-authored-by: Bo Bayles <bbayles@gmail.com>
2019-01-10 10:13:21 -08:00
Miss Islington (bot) 6f76ef8159
bpo-35641: Move IDLE blurb to IDLE directory (GH-11479)
(cherry picked from commit ee65594367)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-01-09 07:49:38 -08:00
Miss Islington (bot) 53cf5f084b
bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639)
(cherry picked from commit cbb1645993)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2019-01-09 05:56:40 -08:00
Miss Islington (bot) 88ad48bc98
bpo-32710: Fix leak in Overlapped_WSASend() (GH-11469)
Fix a memory leak in asyncio in the ProactorEventLoop when ReadFile()
or WSASend() overlapped operation fail immediately: release the
internal buffer.
(cherry picked from commit a234e14839)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-01-08 05:40:50 -08:00
Miss Islington (bot) 69f64b67e4
bpo-35596: Use unchecked PYCs for the embeddable distro to avoid zipimport restrictions (GH-11465)
Also adds extra steps to the CI build for Windows on Azure Pipelines to validate that the various layouts at least execute.
(cherry picked from commit 872bd2b57c)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2019-01-08 02:56:14 -08:00
Miss Islington (bot) 88bd26a72e
bpo-35682: Fix _ProactorBasePipeTransport._force_close() (GH-11462)
bpo-32622, bpo-35682: Fix asyncio.ProactorEventLoop.sendfile(): don't
attempt to set the result of an internal future if it's already done.

Fix asyncio _ProactorBasePipeTransport._force_close(): don't set the
result of _empty_waiter if it's already done.
(cherry picked from commit 80fda712c8)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-01-07 18:15:25 -08:00
Miss Islington (bot) 9a413faa87
bpo-35560: Remove assertion from format(float, "n") (GH-11288)
Fix an assertion error in format() in debug build for floating point
formatting with "n" format, zero padding and small width. Release build is
not impacted. Patch by Karthikeyan Singaravelan.
(cherry picked from commit 3f7983a25a)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-01-07 07:26:20 -08:00
Miss Islington (bot) be37dbff1c
bpo-35660: Fix imports in idlelib.window (GH-11434)
* bpo-35660: IDLE: Remove * import from window.py

* sys was being imported through the *, so also added an import sys.

* Update 2019-01-04-19-14-29.bpo-35660.hMxI7N.rst

Anyone who wants details can check the issue, where I added the point about the sys import bug.
(cherry picked from commit 11303dd603)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-01-06 13:13:30 -08:00
Miss Islington (bot) 3c83cb7eed
bpo-35641: IDLE - format calltip properly when no docstring (GH-11415)
(cherry picked from commit ab54b9a130)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-01-03 01:44:47 -08:00
Miss Islington (bot) b364caa399
bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)
(cherry picked from commit aff0adabf3)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-01-02 19:22:10 -08:00
Miss Islington (bot) 6d04bc9a2e
closes bpo-35643: Fix a SyntaxWarning: invalid escape sequence in Modules/_sha3/cleanup.py (GH-11411)
(cherry picked from commit d466c43e55)

Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-01-02 11:58:58 -08:00
Miss Islington (bot) a5955b0895
closes bpo-35623: Fix integer overflow when sorting large lists (GH-11380)
There is already a `Py_ssize_t i` defined at function scope that is used
for similar loops. By removing the local `int i` declaration that `i` is
used, which has the appropriate type.
(cherry picked from commit f8b534477a)

Co-authored-by: sth <sth.dev@tejp.de>
2019-01-01 18:25:23 -08:00
Miss Islington (bot) 74e4648377
bpo-35598: IDLE - Globalize some config_key objects (GH-11392)
Move translate_key() and constant tuples to module level.
Inline the remnant one-line function.
(cherry picked from commit b4ea8bb080)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-31 12:19:53 -08:00
Gregory P. Smith efcf08d8ca
[3.7] bpo-35214: Annotate posix calls for clang MSan. (GH-11389) (GH-11391)
It doesn't know the details of a few less common libc functions..

(cherry picked from commit 1d300ce1d8)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2018-12-30 22:14:33 -08:00
Miss Islington (bot) 5d2e4b1ff2
bpo-35214: Skip test_io tests that'd cause a huge malloc under msan (GH-11385)
* skip test_constructor under msan.

* fix the others as well.

* reuse existing related news entry.

* typo fix
(cherry picked from commit e5796c42c6)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-12-30 20:39:28 -08:00
Miss Islington (bot) d82344378a
bpo-35550: Fix incorrect Solaris define guards (GH-11275)
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.

Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_systemGH-Solaris

https://bugs.python.org/issue35550
(cherry picked from commit 6f9bc72c79)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2018-12-30 18:39:00 -08:00
Miss Islington (bot) a144feeb7e bpo-28503: Use crypt_r() when available instead of crypt() (GH-11373) (GH-11376)
Use crypt_r() when available instead of crypt() in the crypt module.

As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer.
(cherry picked from commit 387512c7ec)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2018-12-30 17:59:52 -08:00
Miss Islington (bot) 01b9664740 bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375) (GH-11378)
Add Clang Memory Sanitizer build instrumentation to work around
false positives from the socket and time modules as well as skipping
a couple test_faulthandler tests.
(cherry picked from commit b474e6774d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-12-30 17:59:19 -08:00
Miss Islington (bot) d2694d4768
bpo-35598: IDLE: Switch config_key dialog to ttk widgets (GH-11365)
(cherry picked from commit 4bd79c38ef)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-30 12:30:09 -08:00
Miss Islington (bot) 34aadec448
bpo-35598: IDLE: Increase test coverage for config_key.py (GH-11360)
(cherry picked from commit b0a6196ffd)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-29 20:39:27 -08:00
Miss Islington (bot) 95dc4577c3
bpo-34055: Revert deletion of line in IDLE's PyShell (GH-11346)
The attribute is still used in other modules.
(cherry picked from commit 4bc246786f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-12-28 17:19:32 -08:00
Miss Islington (bot) b716c716b5
bpo-28097: IDLE - Add Previous/Next History to Shell menu (GH-11325)
(cherry picked from commit c0381aaea4)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-28 12:29:44 -08:00
Miss Islington (bot) 098bb249e9
bpo-35591: IDLE Find Selection now works when selection not found (GH-11339)
(cherry picked from commit c465682718)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-12-28 02:31:34 -08:00
Miss Islington (bot) 4c7f34f73d
bpo-35598: IDLE: Update config_key.py with PEP8 names (GH-11330)
A few other changes make the code easier to follow.
(cherry picked from commit 55698cc395)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-27 20:08:03 -08:00
Miss Islington (bot) bbf695441a
bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple times. (GH-11329)
https://bugs.python.org/issue35596
(cherry picked from commit 59c2aa25ff)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-12-27 17:04:07 -08:00
Miss Islington (bot) 705b599803 Speed-up building enums by value, e.g. http.HTTPStatus(200) (GH-11318) (GH-11324)
bpo-35585: Speed up enum by-value lookup
(cherry picked from commit 34ae04f74d)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-12-26 22:48:55 +02:00
Miss Islington (bot) 0e0cc553ab
bpo-35208: Fix IDLE Squeezer line counting (GH-10449)
(cherry picked from commit 44a79cc5b3)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-12-24 04:21:11 -08:00
Ned Deily bb8b5314dc Merge release engineering branch '372final' into 3.7 2018-12-24 04:25:49 -05:00
Ned Deily 6c261c4415 Python 3.7.2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEDZbfTUEQ5cQ/v7F/LTR+pqplQh0FAlwgAIkACgkQLTR+pqpl
 Qh3IyhAAlS5rZLfk0KrBG01T7a/i/JJ8QILcy5bbfFeQ46xRUHk3yPtp05oMd1u/
 zjcmD4UxExe2/dJGtmXfp86ZfzmvhlAfifzF0OV0G0cbXKnEtwHML1cPT/1mbyG3
 GcKnk1dO7OUR9IMw0KlYZpEfUHNPHKd/HrByJ7Tmd0FJxe8YExIBiyFWZFNds9cV
 cRo8bPfl/AawMN/K1ushwpyl1H0x3Qg+4huC4GRdrN6yLd/hnRFAUVNtft5trChy
 rNRRyk+Z1DPJZydu1mCpFip5bzSIdYQH1W/73gnBRMfG81NPgmkt9zLk0L3UB/gk
 24S2ChASdNKNSOBUiu/7J7RuSN05kIj4g2XH65gdKY+6u6nezfj3qvWMVrKkNa97
 lGOKc5KIjMaGRWGto0tsvSClM4FmtC5LDSnpGFA2e+7RzZJFj5Svy8E9jiUfbyLC
 yECdP21WIInHWWxWG3DD6ksVsyg197uoFm66eshrgnRlRQLzptrKe2WoTDkk6eTy
 VFJd638aLTxSKphfZI7SCiAU1Fm2Q8vUcTVKTY+cnd918aBsB2eEtLW8dzlFMzow
 JK+jjzqZQf1VjasTrPbiNrtt/7KxxzVcJbCu8OYRXUvjWf5gREYCAWT15sWpNuEH
 TCsgkCThQMdaFgqoCNYuzPkSx7k7c0zsaqVSHDCTvgHfrTJDLPU=
 =NTON
 -----END PGP SIGNATURE-----

Merge tag 'v3.7.2' into 3.7
2018-12-24 04:24:38 -05:00
Ned Deily 986a9ab09d Revert "bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)"
This reverts commit 3b9a0186c4.

Due to regressions found with using Tk 8.6.9.1, the python.org macOS
installers for 3.6.8 and 3.7.2 are shipping with Tcl/Tk 8.6.8 as used
in previous releases.
2018-12-24 02:04:44 -05:00
Miss Islington (bot) 00a48d57df bpo-34764: improve docs example of iter() with sentinel value (GH-11222) (#11301)
(cherry picked from commit d378b1f8ed)

Co-authored-by: Chris Rands <c_rands100@hotmail.com>
2018-12-23 21:19:57 -08:00
Miss Islington (bot) d4f7616da3 bpo-35555: IDLE: Gray out Code Context menu item on non-editors (GH-11282) (GH-11300)
The Code Context menu item only works on Editor windows so disable it for others.
(cherry picked from commit 8874f511e7)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-23 17:14:59 -05:00
Ned Deily 9a3ffc0492 3.7.2final 2018-12-23 16:37:36 -05:00
Miss Islington (bot) ffc106c596 bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620)
(cherry picked from commit 3e8f962e63)

Co-authored-by: Arthur Neufeld <aneufeld@seinesoftware.ca>
2018-12-23 15:46:57 -05:00
Myles Borins 25ee15a15c [3.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10977)
(cherry picked from commit 0854b92cd2)
2018-12-23 15:46:40 -05:00
Victor Stinner f14087a4a9 bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) (GH-11264)
When compiling 3rd party C extensions, the linker flags used by the
compiler for the interpreter and the stdlib modules, will get
leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS
and PY_LDFLAGS_NODIST are introduced to keep those flags separated.

(cherry picked from commit cf10a750f4)
2018-12-23 15:45:10 -05:00
Miss Islington (bot) 7e4e4bd2b8 bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11179)
"make profile-opt" no longer replaces CFLAGS_NODIST with CFLAGS. It
now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST,
existing CFLAGS_NODIST flags are kept.
(cherry picked from commit 640ed520dd)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-23 15:39:06 -05:00
Miss Islington (bot) 48a206978c
bpo-22703: IDLE: Improve Code Context and Zoom Height menu labels (GH-11214)
The Code Context menu label now toggles between Show/Hide Code Context.
 The Zoom Height menu now toggles between Zoom/Restore Height.
 Zoom Height has moved from the Window menu to the Options menu.

https://bugs.python.org/issue22703
(cherry picked from commit c1b4b0f616)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-21 22:41:50 -08:00
Miss Islington (bot) d1e7175887
bpo-35259: Limit `Py_FinalizeEx()` to `Py_LIMITED_API >= 0x03060000`. (GH-10620)
(cherry picked from commit 3e8f962e63)

Co-authored-by: Arthur Neufeld <aneufeld@seinesoftware.ca>
2018-12-20 13:39:35 -08:00
Myles Borins c7b7a43cd8 [3.7] bpo-31715 Add mimetype for extension .mjs (GH-3908) (GH-10977)
(cherry picked from commit 0854b92cd2)
2018-12-20 15:26:02 -05:00
Victor Stinner 0198f52ea2
bpo-35257: Avoid leaking LTO linker flags into distutils (GH-10900) (GH-11264)
When compiling 3rd party C extensions, the linker flags used by the
compiler for the interpreter and the stdlib modules, will get
leaked into distutils. In order to avoid that, the PY_CORE_LDFLAGS
and PY_LDFLAGS_NODIST are introduced to keep those flags separated.

(cherry picked from commit cf10a750f4)
2018-12-20 16:03:01 +01:00
Miss Islington (bot) 3f93383127
bpo-35521: IDLE: Add code context section to docs (GH-11205)
Also add some internal cross-references.
(cherry picked from commit 01421bec1e)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-12-19 21:59:22 -08:00
Miss Islington (bot) a11d44056e
bpo-35497: add versionadded tag for EPOLLEXCLUSIVE (GH-11162)
(cherry picked from commit 92330c0b6d)

Co-authored-by: Manjusaka <lizheao940510@gmail.com>
2018-12-19 04:05:48 -08:00
Miss Islington (bot) c74e7c48ba bpo-35424: Fix test_multiprocessing_main_handling (GH-11223) (GH-11227)
Fix test_multiprocessing_main_handling: use multiprocessing.Pool with
a context manager and then explicitly join the pool.
(cherry picked from commit 6cdce3ddef)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-19 00:43:27 +01:00
Miss Islington (bot) 729fc5d2ac
bpo-31731: Fix test_io.check_interrupted_write() (GH-11225)
Fix a race condition in check_interrupted_write() of test_io:
create directly the thread with SIGALRM signal blocked,
rather than blocking the signal later from the thread. Previously, it
was possible that the thread gets the signal before the signal is
blocked.
(cherry picked from commit 05c9d31eb6)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-18 15:10:47 -08:00
Miss Islington (bot) 60c919b58b
bpo-35502: Fix reference leaks in ElementTree.TreeBuilder. (GH-11170)
(cherry picked from commit d2a75c6783)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-18 13:40:23 -08:00
Miss Islington (bot) 6e96fb44f1
bpo-10496: distutils check_environ() handles getpwuid() error (GH-10931)
check_environ() of distutils.utils now catchs KeyError on calling
pwd.getpwuid(): don't create the HOME environment variable in this
case.
(cherry picked from commit 17d0c0595e)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-18 07:34:54 -08:00
Miss Islington (bot) 05dfa0cc96
bpo-35519: Rename test.bisect to test.bisect_cmd (GH-11200)
Rename test.bisect module to test.bisect_cmd to avoid conflict with
bisect module when running directly a test like
"./python Lib/test/test_xmlrpc.py".
(cherry picked from commit 1dd035954b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-17 13:24:52 -08:00
Miss Islington (bot) cb272843f2
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175)
(cherry picked from commit 842acaab13)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-12-17 07:10:20 -08:00
Miss Islington (bot) 9ade4cbc0f
bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)
TextTestRunner of unittest.runner now uses time.perf_counter() rather
than time.time() to measure the execution time of a test: time.time()
can go backwards, whereas time.perf_counter() is monotonic.

Similar change made in libregrtest, pprint and random.
(cherry picked from commit 8db5b54463)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-17 02:49:22 -08:00
Miss Islington (bot) be69ff232d
bpo-35513: Replace time.time() with time.monotonic() in tests (GH-11182)
Replace time.time() with time.monotonic() in tests to measure time
delta.

test_zipfile64: display progress every minute (60 secs) rather than
every 5 minutes (5*60 seconds).
(cherry picked from commit 2cf4c202ff)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-17 01:03:04 -08:00
Miss Islington (bot) 2d91a1325f bpo-35412: Add testcase to test_future4 (GH-11131) (GH-11183)
Add testcase to test_future4: check unicode literal.
(cherry picked from commit 502fe19b10)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-17 09:34:06 +01:00
Miss Islington (bot) 9a4758550d bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11179)
"make profile-opt" no longer replaces CFLAGS_NODIST with CFLAGS. It
now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST,
existing CFLAGS_NODIST flags are kept.
(cherry picked from commit 640ed520dd)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-16 23:24:04 +01:00
Miss Islington (bot) 77824ef6e5 bpo-35402: Update Windows build to use Tcl and Tk 8.6.9 (GH-11146)
(cherry picked from commit f8e9bd568a)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-12-14 09:49:10 -08:00
Miss Islington (bot) 5f252e1ebc
bpo-34279: regrtest consider that skipped tests are ran (GH-11132)
bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.
(cherry picked from commit 3a8f4fef4a)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-14 04:26:58 -08:00
Serhiy Storchaka 922b2a0d0d
[3.7] bpo-31446: Copy command line that should be passed to CreateProcessW(). (GH-11141). (GH-11149)
(cherry picked from commit 7b36016a15)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
2018-12-14 11:18:13 +02:00
Miss Islington (bot) f27f0d2be4 Add test for double patching instance methods (GH11126)
(cherry picked from commit 5a718e918d)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2018-12-12 09:00:44 +00:00
Miss Islington (bot) 6a12931c9c bpo-17185: Add __signature__ to mock that can be used by inspect for signature (GH11125)
* Fix partial and partial method signatures in mock

* Add more calls

* Add NEWS entry

* Use assertEquals and fix markup in NEWS

* Refactor branching and add markup reference for functools

* Revert partial object related changes and fix pr comments
(cherry picked from commit f7fa62ef44)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-12-12 08:58:36 +00:00
Ned Deily 75a402a217 3.7.2rc1 2018-12-11 16:46:13 -05:00
Ned Deily 9383969788 Minor edits to NEWS entries 2018-12-11 16:28:00 -05:00
Serhiy Storchaka 3cae16d2e9
bpo-35444: Fix error handling when fail to look up builtin "getattr". (GH-11047) (GH-11107)
(cherry picked from commit bb86bf4c4e)
2018-12-11 10:51:27 +02:00
Miss Islington (bot) 3b9a0186c4
bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101)
(cherry picked from commit 7cf3d8e251)

Co-authored-by: Ned Deily <nad@python.org>
2018-12-10 22:28:49 -08:00
Miss Islington (bot) c37923ece7
bpo-35401: Update macOS installer to OpenSSL 1.1.0j (GH-11094)
https://bugs.python.org/issue35401
(cherry picked from commit 3ec982640f)

Co-authored-by: Ned Deily <nad@python.org>
2018-12-10 21:43:17 -08:00
Miss Islington (bot) d1fb21209b
bpo-35401: Update Windows build to OpenSSL 1.1.0j (GH-11088)
(cherry picked from commit 4824385fec)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-12-10 20:16:46 -08:00
Steve Dower 0e4ad88ff8
bpo-34977: Add Windows App Store package (GH-11027)
Also adds the PC/layout script for generating layouts on Windows.
2018-12-10 19:58:52 -08:00
Steve Dower b264c60985
[3.7] bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029) 2018-12-10 08:11:34 -08:00
Victor Stinner 1a7b62d557
bpo-35050: AF_ALG length check off-by-one error (GH-10058) (GH-11069)
The length check for AF_ALG salg_name and salg_type had a off-by-one
error. The code assumed that both values are not necessarily NULL
terminated. However the Kernel code for alg_bind() ensures that the last
byte of both strings are NULL terminated.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 2eb6ad8578)
2018-12-10 12:13:01 +01:00
Victor Stinner c3cc75134d
bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061) (GH-11066)
Fix xml.dom.minidom cloneNode() on a document with an entity: pass
the correct arguments to the user data handler of an entity (fix an
old copy/paste mistake).

Bug spotted and fix proposed by Charalampos Stratakis, initial
reproducer written by Petr Viktorin.

Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
Co-Authored-By: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 8e04186889)
2018-12-10 11:56:48 +01:00
Miss Islington (bot) d4bcf13e06
bpo-33725: skip test_multiprocessing_fork on macOS (GH-11043)
(cherry picked from commit ac218bc5db)

Co-authored-by: Ned Deily <nad@python.org>
2018-12-08 23:06:53 -08:00
Miss Islington (bot) ee2c5a8e2d bpo-35330: Don't call the wrapped object if `side_effect` is set (GH11035)
* tests: Further validate `wraps` functionality in `unittest.mock.Mock`

Add more tests to validate how `wraps` interacts with other features of
mocks.

* Don't call the wrapped object if `side_effect` is set

When a object is wrapped using `Mock(wraps=...)`, if an user sets a
`side_effect` in one of their methods, return the value of `side_effect`
and don't call the original object.

* Refactor what to be called on `mock_call`

When a `Mock` is called, it should return looking up in the following
order: `side_effect`, `return_value`, `wraps`. If any of the first two
return `mock.DEFAULT`, lookup in the next option.

It makes no sense to check for `wraps` returning default, as it is
supposed to be the original implementation and there is nothing to
fallback to.
(cherry picked from commit f05df0a4b6)

Co-authored-by: Mario Corchero <mariocj89@gmail.com>
2018-12-08 11:47:01 +00:00
Victor Stinner 783b794a5e
Revert "[3.7] bpo-34977: Add Windows App Store package (GH-10245)" (GH-11021)
This reverts commit 2532091493.
2018-12-07 14:31:40 +01:00
Serhiy Storchaka 0d5730e643
[3.7] bpo-22005: Fixed unpickling instances of datetime classes pickled by Python 2. (GH-11017) (GH-11022)
encoding='latin1' should be used for successful decoding.
(cherry picked from commit 8452ca15f4)
2018-12-07 14:56:02 +02:00
Zackery Spytz 602d307ac5 bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) (GH-11020)
(cherry picked from commit 4c49da0cb7)
2018-12-07 14:17:43 +02:00
Miss Islington (bot) 2db190bb35
bpo-34864: warn if "Prefer tabs when opening documents" set to "Always" (GH-10464)
* bpo-34864: warn if "Prefer tabs when opening documents" set to "Always"

* add NEWS entry

* address code review comments

* address second code review comments

* Add entry for idlelib/NEWS.txt.
(cherry picked from commit 9ebe8794f0)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2018-12-06 22:51:10 -08:00
Steve Dower 2532091493
[3.7] bpo-34977: Add Windows App Store package (GH-10245) 2018-12-06 21:09:53 -08:00
Victor Stinner 3c6b0d967e
[3.7] Revert "bpo-34172: multiprocessing.Pool leaks resources after being deleted (GH-8450) (GH-9676)" (#10968)
This reverts commit 97f998a4df.
2018-12-06 01:49:05 +01:00
Miss Islington (bot) 3451078190
bpo-35310: Clear select() lists before returning upon EINTR (GH-10877)
select() calls are retried on EINTR (per PEP 475).  However, if a
timeout was provided and the deadline has passed after running the
signal handlers, rlist, wlist and xlist should be cleared since select(2)
left them unmodified.
(cherry picked from commit 7f52415a6d)

Co-authored-by: Oran Avraham <252748+oranav@users.noreply.github.com>
2018-12-05 13:31:07 -08:00
Serhiy Storchaka ac8b47c8b4
bpo-34604: Use %R because of invisible characters or trailing whitespaces. (GH-9165). (GH-10947)
(cherry picked from commit 34c7f0c04e)

Co-authored-by: William Grzybowski <wg@FreeBSD.org>
2018-12-05 23:23:06 +02:00
Serhiy Storchaka 1de91a0032
bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113). (GH-10946)
(cherry picked from commit 5b25f1d031)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-12-05 23:09:56 +02:00
Miss Islington (bot) 53bed18d93
bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419)
(cherry picked from commit 67a93b3a0b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-05 12:29:31 -08:00
Miss Islington (bot) 983d1ab0e6
bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)
* posixpath.expanduser() now returns the input path unchanged if
  the HOME environment variable is not set and pwd.getpwuid() raises
  KeyError (the current user identifier doesn't exist in the password
  database).
* Add test_no_home_directory() to test_site.
(cherry picked from commit f2f4555d82)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-05 08:07:57 -08:00
Victor Stinner b02774f421
bpo-35296: make install now installs the internal API (GH-10665) (GH-10897)
* bpo-35296: make install now installs the internal API (GH-10665)

make install now also installs the internal API: Include/internal/*.h
header files.

(cherry picked from commit f653fd4d95)

* Windows installer now also install Include/internal/

The Windows installer (MSI) now also install header files of the
Include/internal/ subdirectory.
2018-12-04 21:28:28 +01:00
Miss Islington (bot) 0091f349cd bpo-29564: warnings suggests to enable tracemalloc (GH-10486) (GH-10509)
The warnings module now suggests to enable tracemalloc if the source
is specified, tracemalloc module is available, but tracemalloc is not
tracing memory allocations.
(cherry picked from commit 2c07c493d2)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-04 21:25:57 +01:00
Miss Islington (bot) 1751423686
bpo-35351: Pass link time optimization flags to CFLAGS_NODIST (GH-10797)
When using link time optimizations, the -flto flag is passed to
BASECFLAGS, which makes it propagate to distutils. Those flags
should be reserved for the interpreter and the stdlib extension
modules only, thus moving those flags to CFLAGS_NODIST.
(cherry picked from commit f92c7aa1ae)

Co-authored-by: stratakis <cstratak@redhat.com>
2018-12-04 07:06:16 -08:00
Miss Islington (bot) 12735c1413 bpo-35357: Add _mock_ prefix to name/parent/from_kall attributes of _Call/_MagicProxy. (GH-10873) (#10887)
Fix minor typo in test function name.
(cherry picked from commit e63e617ebb)

Co-authored-by: Andrew Dunai <andunai@gmail.com>
2018-12-04 09:34:34 +00:00
Miss Islington (bot) e8f9e4785c bpo-35226: Fix equality for nested unittest.mock.call objects. (GH-10555)
Also refactor the call recording imolementation and add some notes
about its limitations.
(cherry picked from commit 8ca0fa9d2f)

Co-authored-by: Chris Withers <chris@withers.org>
2018-12-03 21:54:44 +00:00
Miss Islington (bot) fe91e9ba08 [3.7] bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867) (GH-10872)
* bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867)
(cherry picked from commit 3bc0ebab17)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-12-03 23:11:41 +02:00
Miss Islington (bot) bdeb56cd21
bpo-35372: Fix the code page decoder for input > 2 GiB. (GH-10848)
(cherry picked from commit 4013c17911)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-03 01:09:11 -08:00
Miss Islington (bot) 6cb0486ce8
bpo-35341: Add generic version of OrderedDict to typing (GH-10850)
(cherry picked from commit 68b56d02ef)

Co-authored-by: Ismo Toijala <ismo.toijala@gmail.com>
2018-12-02 08:14:44 -08:00
Miss Islington (bot) 265b41996a
bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844)
(cherry picked from commit 32bc11c33c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-01 04:52:04 -08:00
Miss Islington (bot) 422c1658b7
bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302)
(cherry picked from commit edeca92c84)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
2018-12-01 02:24:47 -08:00
Victor Stinner 38bed786a2
[3.7] bpo-35352: test_asyncio uses the certificate set from the test directory (GH-10826) (GH-10834)
* bpo-35352: test_asyncio uses the certificate set from the test directory (GH-10826)

Modify asyncio tests to utilize the certificates from the test directory
instead of its own set, as they are the same and with each update they had
to be updated as well.

(cherry picked from commit b062ba77b6)

* bpo-35352: Cleanup test_asyncio/utils.py (GH-10831)

'here' variable is no longer needed.

(cherry picked from commit 7212148c95)
2018-11-30 20:44:27 +01:00
Miss Islington (bot) b1355352d1
bpo-33015: Fix UB in pthread PyThread_start_new_thread (GH-6008)
Fix an undefined behaviour in the pthread implementation of
PyThread_start_new_thread(): add a function wrapper to always return
NULL.

Add pythread_callback struct and pythread_wrapper() to thread_pthread.h.
(cherry picked from commit 9eea6eaf23)

Co-authored-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
2018-11-30 07:32:12 -08:00
Victor Stinner df738d56fe
bpo-35336: Fix PYTHONCOERCECLOCALE=1 (GH-10806) (GH-10813)
Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the C
locale if the LC_CTYPE locale is "C".

(cherry picked from commit 55e498058f)
2018-11-30 12:19:48 +01:00