Commit Graph

102331 Commits

Author SHA1 Message Date
Miss Islington (bot) 9bb306d586
bpo-34977: Remove unused preprocessor definition (GH-11092)
(cherry picked from commit d5a6a389d4)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-12-10 21:14:57 -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
Miss Islington (bot) b3ffe47bcb
Fix numbered lists in stdtypes.rst. (GH-10989)
(cherry picked from commit de9e9b476e)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2018-12-10 12:51:32 -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
Miss Islington (bot) ef1fc0d031
bpo-31374: expat doesn't include <pyconfig.h> on Windows (GH-11079)
(cherry picked from commit b6ef6f69a9)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-10 07:25:31 -08:00
Miss Islington (bot) ea773eb1f9
bpo-35452: Make PySys_HasWarnOptions() never raising an exception. (GH-11075)
(cherry picked from commit dffccc6b59)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-10 04:37:09 -08:00
Miss Islington (bot) 1467a3ac12
bpo-31374: Include pyconfig.h earlier in expat (GH-11064)
Include <pyconfig.h> ealier in Modules/expat/xmltok.c to define
properly _POSIX_C_SOURCE. Python defines _POSIX_C_SOURCE as 200809L,
whereas <features.h> (included indirectly by <string.h>) defines
_POSIX_C_SOURCE as 199506L.
(cherry picked from commit cf247359d5)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-10 03:28:13 -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) fc79175f5e
bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. (GH-11063)
(cherry picked from commit 72ff7b4c00)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-10 02:26:36 -08:00
Miss Islington (bot) c83ec055a0
bpo-35433: Properly detect installed SDK versions (GH-11009)
(cherry picked from commit f46eccd0ff)

Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
2018-12-09 20:20:41 -08:00
Miss Islington (bot) 331bfa4f2c
bpo-22005: Document the reality of pickle compatibility. (GH-11054)
(cherry picked from commit e328753d91)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-12-09 11:48:35 -08: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
Julien Palard b6b77955f2 [3.7] Doc: Disable smartquotes for zh-tw, zh-cn, fr and ja translations (GH-9423) (GH-10344)
(cherry picked from commit c03bf0ae79)
2018-12-08 21:56:59 -08:00
Julien Palard 2db96ae744 [3.7] Doc: Bump sphinx. (GH-10676) (GH-10803) 2018-12-09 00:21:54 -05:00
Miss Islington (bot) 8b7d8ac09c
bpo-35441: Remove dead and buggy code related to PyList_SetItem(). (GH-11033)
In _localemodule.c and selectmodule.c, remove dead code that would
cause double decrefs if run.

In addition, replace PyList_SetItem() with PyList_SET_ITEM() in cases
where a new list is populated and there is no possibility of an error.

In addition, check if the list changed size in the loop in array_array_fromlist().
(cherry picked from commit 99d56b5356)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-12-08 06:34:49 -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
Miss Islington (bot) 72c71956ca
Add missing period in distutils.dep_util.newer_group doc (GH-11003)
(cherry picked from commit c9566b8c45)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2018-12-06 13:30:13 -08:00
Miss Islington (bot) f913d44eb7
Clarify expectedFailure in the unittest docs. (GH-10953)
(cherry picked from commit 91f259b478)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2018-12-06 13:16:03 -08:00
Miss Islington (bot) 6485aa6eb1
bpo-33023: Fix NotImplemented to NotImplementedError. (GH-10934)
(cherry picked from commit 42b1d6127b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-06 12:52:43 -08:00
Miss Islington (bot) 560fa4db17
bpo-35363: test_eintr uses print(flush=True) (GH-10990)
(cherry picked from commit 0644b33821)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-06 05:34:59 -08:00
Miss Islington (bot) b7c67c4d51
bpo-35424: test_multiprocessing: join 3 pools (GH-10986)
Join 3 pools in these tests:

* test.test_multiprocessing_spawn.WithProcessesTestPool.test_context
* test.test_multiprocessing_spawn.WithProcessesTestPool.test_traceback
(cherry picked from commit 388c8c208d)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-06 03:20:50 -08:00
Miss Islington (bot) f740818f3d
bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii character. (GH-10863)
(cherry picked from commit 3ffa8b9ba1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-12-06 01:58:24 -08:00
Terry Jan Reedy de8037db8c
[3.7] bpo-34162: Update idlelib NEWS to 2018-12-05 (GH-10964) (GH-10980)
Cherry-picked from 6ea9d54.
2018-12-06 03:25:40 -05:00
Miss Islington (bot) b1438c0d37
bpo-33709: test_ntpath and test_posixpath fail in Windows with ACP!=1252. (GH-7278)
(cherry picked from commit 8752dfbd1f)

Co-authored-by: native-api <ivan_pozdeev@mail.ru>
2018-12-05 23:22:17 -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
Mariatta c28317e4c2 [3.7] Fix typo in xml.dom.minidom documentation (GH-10956) (GH-10961)
Escape the \t and \n.
Follow up from https://github.com/python/cpython/pull/10814..
(cherry picked from commit 2d8f976cde)

Co-authored-by: E Kawashima <e-kwsm@users.noreply.github.com>
2018-12-05 16:24:44 -08:00
Miss Islington (bot) 0fc3b2fe01
bpo-35363: test_eintr runs eintr_tester.py in verbose mode (GH-10965)
Moreover, "python3 -m test test_eintr -v" now avoids redirecting
stdout/stderr to a pipe, the child process inherits stdout/stderr
from the parent.
(cherry picked from commit aa8ae904ad)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-05 15:35:43 -08:00
Miss Islington (bot) 022d7bc7cc
Fix typos in concurrent.Futures documentation (GH-10920)
Add a missing word `as` in `as well as an`.
Linkify `threading.Thread`.
(cherry picked from commit 40a61da40d)

Co-authored-by: Matt Wheeler <m@funkyhat.org>
2018-12-05 14:17:28 -08: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) 349d9910b2
Correct a couple of unbalanced parenthesis. (GH-10779)
(cherry picked from commit 55f41e45b4)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2018-12-05 12:15:54 -08:00
Miss Islington (bot) d2c7c1f768
Move __missing__ after __delitem__ in Data model. (GH-10923)
(cherry picked from commit 1ce853f377)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2018-12-05 12:11:16 -08:00
Miss Islington (bot) c7c4e938b9
bpo-34185: Fix test module collision in test_bdb when ran as script. (GH-8537)
When running test_bdb.py as a script, `import test_module` would be
importing the existing Lib/test/test_modules.py instead of the
tempcwd/test_module.py module which was dynamically created by
test_bdb.py itself.
(cherry picked from commit 54fd45505b)

Co-authored-by: Alex H <1884912+lajarre@users.noreply.github.com>
2018-12-05 11:54:42 -08:00
Miss Islington (bot) e2f376f284
bpo-34987: Fix a possible null pointer dereference in _pickle.c's save_reduce(). (GH-9886)
(cherry picked from commit 25d389789c)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-12-05 11:35:41 -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
Miss Islington (bot) 2d594f8578
bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)
(cherry picked from commit 2a893430c9)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-12-04 23:51:08 -08:00
Victor Stinner c93e3b05d5
bpo-35363, test_eintr: skip test_open() on macOS (GH-10896) (GH-10911)
(cherry picked from commit 4752e65250)
2018-12-05 03:03:28 +01:00
Miss Islington (bot) 74a80e1ed0
bpo-35411: Skip test_urllib2net FTP tests on Travis CI (GH-10907)
On Travis CI, FTP tests of test_urllib2net randomly fail with "425
Security: Bad IP connecting".

test.pythoninfo now also logs TRAVIS environment variable.
(cherry picked from commit c11b3b19a5)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-12-04 17:16:39 -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