Commit Graph

102974 Commits

Author SHA1 Message Date
Beomsoo Kim b912f9342e bpo-35511: Trivial docs updates for profile and resource library modules. (GH-11124)
polish documentation for profile and resource modules
2018-12-16 21:34:08 +02:00
Victor Stinner 640ed520dd
bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164)
"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.
2018-12-16 18:00:42 +01:00
mkkot f5107dfd42 bpo-35450: reflect in docs that venv module is not always creating a … (GH-11144)
…copy of python binary





https://bugs.python.org/issue35450
2018-12-14 12:28:52 -08:00
Steve Dower f8e9bd568a
bpo-35402: Update Windows build to use Tcl and Tk 8.6.9 (GH-11146) 2018-12-14 09:13:15 -08:00
Victor Stinner d7538dd5e3
bpo-35471: Remove the macpath module (GH-11129)
Python 2.4 dropped MacOS 9 support. The macpath module was deprecated
in Python 3.7. This change removes it.
2018-12-14 13:37:26 +01:00
Victor Stinner 4aa917c5fe
bpo-35346: Cleanup platform.architecture() (GH-11130)
struct.calcsize('P') now always works.
2018-12-14 13:14:10 +01:00
Victor Stinner 3a8f4fef4a
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.
2018-12-14 13:06:50 +01:00
Victor Stinner 7acd50ad8b
bpo-35491: Enhance multiprocessing.BaseProcess.__repr__() (GH-11138)
* Add the pid and parent pid to multiprocessing.BaseProcess.__repr__().
* Add negative sign (ex: "-SIGTERM") to exitcode (process killed
  by a signal)
* Only call _popen.poll() once.

Example:
  <ForkProcess(ForkPoolWorker-1, started daemon)>
becomes:
  <ForkProcess name='ForkPoolWorker-1' pid=12449 parent=12448 started daemon>

Example:
  <ForkProcess(ForkPoolWorker-1, stopped[SIGTERM] daemon)>
becomes:
  <ForkProcess name='ForkPoolWorker-1' pid=12960 parent=12959 stopped exitcode=-SIGTERM daemon>
2018-12-14 12:58:52 +01:00
Jules Lasne (jlasne) cb0f5e29e3 Fixed missing colun in library/sys.po (GH-11153)
# Fixed missing colun in library/sys.po


[bpo-35492](https://bugs.python.org/issue35492): Fixed missing colun in library/sys.po
2018-12-14 03:28:44 -08:00
Victor Stinner 2b417fba25
Add multiprocessing.Pool.__repr__() (GH-11137)
* Add multiprocessing.Pool.__repr__() to ease debug
* RUN, CLOSE and TERMINATE constants values are now strings rather
  than integer to ease debug
2018-12-14 11:13:18 +01:00
Serhiy Storchaka afb3e71a17
bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. (GH-11150) 2018-12-14 11:19:51 +02:00
Vladimir Matveev 7b36016a15 bpo-31446: Copy command line that should be passed to CreateProcessW(). (GH-11141) 2018-12-14 10:30:51 +02:00
Victor Stinner 08c2ba0717
bpo-35477: multiprocessing.Pool.__enter__() fails if called twice (GH-11134)
multiprocessing.Pool.__enter__() now fails if the pool is not
running: "with pool:" fails if used more than once.
2018-12-13 02:15:30 +01:00
Victor Stinner 502fe19b10
bpo-35412: Add testcase to test_future4 (GH-11131)
Add testcase to test_future4: check unicode literal.
2018-12-12 18:38:34 +01:00
Victor Stinner b0e0877629
bpo-35346: Drop Mac OS 9 support from platform (GH-10959)
Drop Mac OS 9 and Rhapsody support from the platform module:

* Rhapsody: last release in 2000
* Mac OS 9: last release in 2001
2018-12-12 17:48:08 +01:00
Xiang Zhang 4fb0b8bc25
bpo-33106: change dbm key deletion error for readonly file from KeyError to dbm.error (#6295) 2018-12-12 20:46:55 +08:00
Anthony Sottile 5a718e918d Add test for double patching instance methods (#11085) 2018-12-12 07:56:35 +00:00
Xtreak f7fa62ef44 bpo-17185: Add __signature__ to mock that can be used by inspect for signature (GH11048)
* 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
2018-12-12 07:54:54 +00:00
Andrew Svetlov 5344501ad1
bpo-35394: Add empty slots to abstract asyncio protocols (#10889)
* bpo-35394: Add empty slots to abstract asyncio protocols

* Add missing test file
2018-12-11 19:07:05 +02:00
Serhiy Storchaka 7211d306d4
Remove an unused variable after bpo-35444. (GH-11117) 2018-12-11 15:14:12 +02:00
Pablo Galindo 2ab2afd387
bpo-35426: Eliminate race condition in test_interprocess_signal (GH-11087)
The test only except SIGUSR1Exception inside wait_signal(), but the signal can be sent during subprocess_send_signal() call.
2018-12-11 11:32:12 +00:00
Pablo Galindo a932d0b496
bpo-35412: Skip test_multiprocessing_fork and test_multiprocessing_forkserver on Windows (GH-11086)
Forkserver and fork are not available on Windows and therefore these test must be skipped.
2018-12-11 11:31:16 +00:00
Victor Stinner dc525f4315
bpo-35458: Fix test_shutil.test_disk_usage() (GH-11111)
The following test fails if a different process creates or removes
a file on the same disk partition between the two lines:

    usage = shutil.disk_usage(os.path.dirname(__file__))
    self.assertEqual(usage, shutil.disk_usage(__file__))

Only test that disk_usage() succeed on a filename, but don't check
the result. Add also tests on the fields type (must be int).
2018-12-11 12:05:21 +01:00
Serhiy Storchaka 8905fcc85a
bpo-35454: Fix miscellaneous minor issues in error handling. (#11077)
* bpo-35454: Fix miscellaneous minor issues in error handling.

* Fix a null pointer dereference.
2018-12-11 08:38:03 +02:00
Serhiy Storchaka bb86bf4c4e
bpo-35444: Unify and optimize the helper for getting a builtin object. (GH-11047)
This speeds up pickling of some iterators.

This fixes also error handling in pickling methods when fail to
look up builtin "getattr".
2018-12-11 08:28:18 +02:00
Ned Deily 7cf3d8e251
bpo-35402: Update macOS installer to use Tcl 8.6.9 / Tk 8.6.9.1 (GH-11101) 2018-12-11 01:06:57 -05:00
Ned Deily 3ec982640f bpo-35401: Update macOS installer to OpenSSL 1.1.0j (GH-11094)
https://bugs.python.org/issue35401
2018-12-10 21:24:06 -08:00
Steve Dower d5a6a389d4
bpo-34977: Remove unused preprocessor definition (GH-11092) 2018-12-10 20:56:09 -08:00
Steve Dower 4824385fec
bpo-35401: Update Windows build to OpenSSL 1.1.0j (GH-11088) 2018-12-10 19:52:36 -08:00
Steve Dower 0cd6391fd8
bpo-34977: Add Windows App Store package (GH-11027)
Also adds the PC/layout script for generating layouts on Windows.
2018-12-10 18:52:57 -08:00
Steve Dower 1c3de541e6
bpo-34977: Use venv redirector instead of original python.exe on Windows (GH-11029) 2018-12-10 08:11:21 -08:00
Victor Stinner b6ef6f69a9
bpo-31374: expat doesn't include <pyconfig.h> on Windows (GH-11079) 2018-12-10 16:06:18 +01:00
Serhiy Storchaka fc662ac332
bpo-32788: Better error handling in sqlite3. (GH-3723)
Propagate unexpected errors (like MemoryError and KeyboardInterrupt) to user.
2018-12-10 16:06:08 +02:00
Serhiy Storchaka dffccc6b59
bpo-35452: Make PySys_HasWarnOptions() never raising an exception. (GH-11075) 2018-12-10 13:50:22 +02:00
Victor Stinner cf247359d5
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.
2018-12-10 11:30:21 +01:00
Christian Heimes 2eb6ad8578 bpo-35050: AF_ALG length check off-by-one error (GH-10058)
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>
2018-12-10 11:22:37 +01:00
Victor Stinner 8e04186889
bpo-35052: Fix handler on xml.dom.minidom.cloneNode() (GH-11061)
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>
2018-12-10 11:12:53 +01:00
Serhiy Storchaka 6fef0f1a81
bpo-35445: Do not ignore memory errors when create posix.environ. (GH-11049) 2018-12-10 12:10:56 +02:00
Serhiy Storchaka 72ff7b4c00
bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. (GH-11063) 2018-12-10 12:08:54 +02:00
Jeremy Kloth f46eccd0ff bpo-35433: Properly detect installed SDK versions (GH-11009) 2018-12-09 19:59:32 -08:00
Serhiy Storchaka e448f9c99e
Remove a duplicate descriptor in gdbm. (GH-11053) 2018-12-09 22:15:29 +02:00
Gregory P. Smith e328753d91
bpo-22005: Document the reality of pickle compatibility. (GH-11054) 2018-12-09 11:42:58 -08:00
jdemeyer 25648d05ac bpo-34245: install Python shared library with more standard 0755 mode (GH-8492) 2018-12-09 02:46:50 -05:00
Andre Delfino de9e9b476e Fix numbered lists in stdtypes.rst. (GH-10989) 2018-12-09 09:00:20 +02:00
Ned Deily ac218bc5db
bpo-33725: skip test_multiprocessing_fork on macOS (GH-11043) 2018-12-09 01:50:15 -05:00
Zackery Spytz 99d56b5356 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().
2018-12-08 16:16:55 +02:00
Mario Corchero f05df0a4b6 bpo-35330: Don't call the wrapped object if `side_effect` is set (GH10973)
* 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.
2018-12-08 11:25:02 +00:00
Anirudha Bose 3cf74384b5 bpo-33747: Avoid mutating the global sys.modules dict in unittest.mock tests (GH-8520) 2018-12-07 15:30:42 -08:00
Victor Stinner 028f0ef4f3
bpo-9566: Fix compiler warnings in peephole.c (GH-10652) 2018-12-07 17:54:18 +01:00
Serhiy Storchaka 1133a8c0ef
bpo-22005: Fix condition for unpickling a date object. (GH-11025) 2018-12-07 16:48:21 +02:00