Commit Graph

99767 Commits

Author SHA1 Message Date
Victor Stinner c99d41f9c0 bpo-31234: fork_wait tests now join threads (#3139)
fork_wait.py tests now joins threads, to not leak running threads in
the background.
2017-08-18 23:12:26 +02:00
Stefan Krah d73a960c57 bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142) 2017-08-18 21:39:32 +02:00
Yaron de Leeuw 02f3b7d5ab bpo-31109: Convert zipimport to use Argument Clinic (GH-2990) 2017-08-18 11:41:13 -07:00
Brett Cannon a3110a0133 Fix a minor grammar issue in the logging cookbook (GH-3136) 2017-08-18 10:00:31 -07:00
Victor Stinner 92b1f90143 bpo-31231: Fix pythoninfo in Travis config (#3134)
bpo-31231, bpo-30871: Replace "./python -m test.pythoninfo" with
"make pythoninfo", since macOS uses ./python.exe.
2017-08-18 17:30:51 +02:00
Segev Finer 4d3851727f bpo-30121: Fix debug assert in subprocess on Windows (#1224)
* bpo-30121: Fix debug assert in subprocess on Windows

This is caused by closing HANDLEs using os.close which is for CRT file
descriptors and not for HANDLEs.

* bpo-30121: Suppress debug assertion in test_subprocess when ran directly
2017-08-18 15:18:13 +02:00
Sanyam Khurana a7c449b8c0 bpo-30721: Add missing '?' to new error message (GH-3131) 2017-08-18 22:18:14 +10:00
Stefan Krah f0202bb349 Issue #30923: Revert flag that is not recognized by an obsolete gcc version. (#3132) 2017-08-18 13:55:45 +02:00
Sanyam Khurana 5e2eb35bbe bpo-30721: Show correct syntax hint in Py3 when using Py2 redirection syntax (#2345) 2017-08-18 13:37:36 +03:00
Victor Stinner ad7eaed543 bpo-30871: pythoninfo: more sys, os, time data (#3130)
* bpo-30871: pythoninfo: more sys, os, time data

PythonInfo now converts types other than intger to string by default.

* fix typo
2017-08-18 12:08:47 +02:00
Victor Stinner a3a01a2fce bpo-30871: Add "make pythoninfo" (#3120) 2017-08-18 11:31:52 +02:00
Elmar Ritsch b9ff498793 Fix broken `Show Source` links on documentation pages (GH-3113)
The `Show Source` was broken because of a change made in sphinx 1.5.1
In Sphinx 1.4.9, the sourcename was "index.txt".
In Sphinx 1.5.1+, it is now "index.rst.txt"
2017-08-17 20:23:51 -07:00
syncosmic fe2b56ab92 bpo-31183: `dis` now handles coroutines & async generators (GH-3077)
Coroutines and async generators use a distinct attribute name for their
code objects, so this updates the `dis` module to correctly disassemble
objects with those attributes.

Due to the increase in the test module length, it also fixes some latent
defects in the tests related to how the displayed source line numbers
are extracted.

https://bugs.python.org/issue31230 is a follow-up issue suggesting we
may want to solve this a different way, by instead giving all these object
types a common `__code__` attribute, avoiding the need for special
casing in the `dis` module.
2017-08-18 12:29:21 +10:00
Cheryl Sabella 82aff62462 bpo-31001: IDLE: Add tests for configdialog highlight tab (#3123) 2017-08-17 20:39:00 -04:00
Victor Stinner f6ebd838f0 bpo-30871: pythoninfo: add expat and _decimal (#3121)
* bpo-30871: pythoninfo: add expat and _decimal

* Remove _decimal.__version__

The string is hardcoded, not really interesting.
2017-08-17 22:13:11 +02:00
Steve Dower f1ff2c4b61 Adds nuget symbols package for daily builds. (#3122) 2017-08-17 10:24:18 -07:00
Victor Stinner b907abc885 bpo-30871: Add test.pythoninfo (#3075)
* Add Lib/test/pythoninfo.py: script collecting various informations
  about Python to help debugging test failures.
* regrtest: remove sys.hash_info and sys.flags from header.
* Travis CI, Appveyor: run pythoninfo before tests
2017-08-17 16:40:51 +02:00
Victor Stinner 4a347ce426 bpo-31221: patchcheck ignores external libraries (#3109)
Tools/scripts/patchcheck.py now ignores changes in directories which
are copies of external libraries:

* Modules/_ctypes/libffi_msvc/
* Modules/_ctypes/libffi_osx/
* Modules/_decimal/libmpdec/
* Modules/expat/
* Modules/zlib/

Drop also support for Mercurial, since CPython migrated to Git.

Exclude also libmpdec

patchcheck: exclude also libffi_osx and libffi_msvc
2017-08-17 16:29:15 +02:00
Julien Palard b616b97299 Update the language selection in the docs language switch. (GH-3114)
Change the option for `Français` into `French` to be consistent with the other language selections that are already in English.
2017-08-17 07:24:02 -07:00
Adrian Wielgosik 7c17e2304b bpo-24700: Add a fast path for comparing array.array of equal type (#3009) 2017-08-17 14:46:06 +02:00
Antoine Pitrou ee84a60858 bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit (#3111)
* bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit

* Add NEWS blurb
2017-08-16 20:53:28 +02:00
Victor Stinner 17657bb945 bpo-31069, test_multiprocessing: Fix dangling process (#3103)
Fix a warning about dangling processes in test_rapid_restart() of
_test_multiprocessing: join the process.
2017-08-16 12:46:04 +02:00
Victor Stinner 7cc33998b8 bpo-30983: Revert changes which broke most buildbots (#3100)
* Revert "Add Bruno Penteado to ACKS (#3091)"

This reverts commit f978405b3f.

* Revert "bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (#2803)"

This reverts commit 2e0f4db114.
2017-08-16 11:02:05 +02:00
Terry Jan Reedy 7f066844a7 bpo-30928: Update idlelib/NEWS.txt to 2017-08-15. (#3098) 2017-08-15 19:15:04 -04:00
Cheryl Sabella e36d9f5568 bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (#3096)
The slightly modified tests continue to pass.  Patch by Cheryl Sabella.
2017-08-15 18:26:23 -04:00
Steve Dower 1f512b9a34 Add Windows team as a codeowner for Windows-specific files (#3089) 2017-08-15 10:21:34 -07:00
Oren Milman d83c23b2db fix grammr in error messages in overlapped.c (GH-3095) 2017-08-15 09:04:18 -07:00
Christian Heimes 7b40cb7293 bpo-30714: ALPN changes for OpenSSL 1.1.0f (#2305)
OpenSSL 1.1.0 to 1.1.0e aborted the handshake when server and client
could not agree on a protocol using ALPN. OpenSSL 1.1.0f changed that.
The most recent version now behaves like OpenSSL 1.0.2 again. The ALPN
callback can pretend to not been set.

See https://github.com/openssl/openssl/pull/3158 for more details

Signed-off-by: Christian Heimes <christian@python.org>
2017-08-15 10:33:43 +02:00
Cheryl Sabella 2f89646349 bpo-31002: IDLE: Add tests for configdialog keys tab (#2996)
Patch by Cheryl Sabella.
2017-08-14 21:21:43 -04:00
Łukasz Langa f978405b3f Add Bruno Penteado to ACKS (#3091) 2017-08-14 15:43:42 -07:00
Bruno "Polaco" Penteado 2e0f4db114 bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (#2803)
pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame.

Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly.

This patch fixes that. Tested locally on python3.6
2017-08-14 15:14:17 -07:00
Saurabh Chaturvedi 143be36629 bpo-31191: Improve grammar in threading.Barrier docs (GH-3080) 2017-08-14 11:54:53 -07:00
Nate Tangsurat 8204b90368 bpo-30824: Add mimetype for .json (#3048) 2017-08-14 14:39:45 -04:00
Коренберг Марк d4b93e21c2 bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() (#3000) (#3000) 2017-08-14 06:55:16 -07:00
Allen W. Smith, Ph.D 48d9823a0e bpo-5001, bpo-31169: Fix two uninformative asserts in multiprocessing/managers.py (#3078)
* Make error message more informative

Replace assertions in error-reporting code with more-informative version that doesn't cause confusion over where and what the error is.

* Additional clarification + get travis to check

* Change from SystemError to TypeError

As suggested in PR comment by @pitrou, changing from SystemError; TypeError appears appropriate.

* NEWS file installation; ACKS addition (will do my best to justify it by additional work)
2017-08-12 17:37:09 +02:00
Pär Björklund e664d7f89d bpo-30747: Attempt to fix atomic load/store (#2383)
_Py_atomic_* are currently not implemented as atomic operations
when building with MSVC. This patch attempts to implement parts
of the functionality required.
2017-08-12 11:19:30 +02:00
Daniel Himmelstein dadca480c5 Fix typo in 3.7 What's New (GH-3069)
Remove unneeded word `to`.
2017-08-10 18:45:12 -07:00
Victor Stinner 5659a72f48 bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065) 2017-08-11 01:23:22 +02:00
Victor Stinner 957d0e9b59 bpo-26762: _test_multiprocessing reports dangling (#3064)
_test_multiprocessing now marks the test as ENV_CHANGED on dangling
process or thread.
2017-08-10 17:36:50 +02:00
Victor Stinner b97d99cd7f regrtest: count also env changed as failures in progress (#3061) 2017-08-10 16:19:03 +02:00
Victor Stinner b501147980 Enhance support.reap_children() (#3036)
* reap_children() now sets environment_altered to True to detect bugs
  using python3 -m test --fail-env-changed
* Replace bare "except:" with "except OSError:" in reap_children()
* Write an unit test for reap_children() using a timeout of 60
  seconds
2017-08-10 16:01:47 +02:00
Victor Stinner aa8ec34ad5 bpo-31151: Add socketserver.ForkingMixIn.server_close() (#3057)
* Add socketserver.ForkingMixIn.server_close()

bpo-31151: socketserver.ForkingMixIn.server_close() now waits until
all child processes completed to prevent leaking zombie processes.

* Fix test on Windows which doesn't have ForkingMixIn
2017-08-10 15:28:16 +02:00
Victor Stinner 6c8c2943d9 bpo-31160: test_tempfile: Fix reap_children() warning (#3056)
TestRandomNameSequence.test_process_awareness() now calls
os.waitpid() to avoid leaking a zombie process.
2017-08-10 13:05:06 +02:00
Victor Stinner 7b7c6dcfff bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055)
The current test_child_terminated_in_stopped_state() function test
creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and
then crash (SIGSEGV). The problem is that calling os.waitpid() in the
parent process is not enough to close the process: the child process
remains alive and so the unit test leaks a child process in a
strange state. Closing the child process requires non-trivial code,
maybe platform specific.

Remove the functional test and replaces it with an unit test which
mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to
test the WIFSTOPPED() path.
2017-08-10 12:37:39 +02:00
Louie Lu 3b0f620c1a bpo-19903: IDLE: Calltips changed to use inspect.signature (#2822)
Idlelib.calltips.get_argspec now uses inspect.signature instead of inspect.getfullargspec, like help() does.  This improves the signature in the call tip in a few different cases, including builtins converted to provide a signature.  A message is added if the object is not callable, has an invalid signature, or if it has positional-only parameters.
Patch by Louie Lu.
2017-08-09 20:58:13 -04:00
Victor Stinner 3ca9f50f96 bpo-31160: test_builtin: don't check waitpid() status (#3050) 2017-08-09 23:08:22 +02:00
Victor Stinner da5e930187 bpo-31160: Fix test_random for zombie process (#3045)
TestModule.test_after_fork() now calls os.waitpid() to read the exit
status of the child process to avoid creating a zombie process.
2017-08-09 17:59:05 +02:00
Victor Stinner e3510d74aa bpo-31160: regrtest now reaps child processes (#3044)
Add a post_test_cleanup() function which currently only calls
support.reap_children().
2017-08-09 17:44:33 +02:00
Victor Stinner 4baca1b0f7 bpo-31160: Fix test_builtin for zombie process (#3043)
PtyTests.run_child() now calls os.waitpid() to read the exit status
of the child process to avoid creating zombie process and leaking
processes in the background.
2017-08-09 17:44:19 +02:00
Julien Palard 122081deef bpo-31159: fix language switch regex on unknown yet built languages. (#3039)
This fix a regex issue (a missing non-matching group around an 'or'
list) and the specific possible case where a translation is built but
not yet in known by the picker, but not explicitly listing possible
languages in the regex.
2017-08-09 17:01:15 +02:00