Commit Graph

20345 Commits

Author SHA1 Message Date
Cheryl Sabella 998f4966bf bpo-30617: IDLE: docstrings and unittest for outwin.py (#2046)
Move some data and functions from the class to module level. Patch by Cheryl Sabella.
2017-08-27 18:06:00 -04:00
Terry Jan Reedy 3457f42896 bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (#3220) 2017-08-27 16:39:41 -04:00
Cheryl Sabella 7028e5986f bpo-30781: IDLE - use ttk widgets in configdialog (#2654)
Patch by Cheryl Sabella.
2017-08-26 14:26:02 -04:00
Oren Milman a5b4ea15b6 bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (#3201) 2017-08-25 21:14:54 +03:00
Gregory P. Smith 8621bb5d93 bpo-22536: Set the filename in FileNotFoundError. (#3194)
Have the subprocess module set the filename in the FileNotFoundError
exception raised on POSIX systems when the executable or cwd are missing.
2017-08-24 14:58:25 -07:00
Oren Milman de50360ac2 bpo-29741: Update some methods in the _pyio module to also accept integer types. Patch by Oren Milman. (#560) 2017-08-24 11:33:42 -07:00
INADA Naoki a6296d34a4 bpo-31095: fix potential crash during GC (GH-2974) 2017-08-24 14:55:17 +09:00
Martijn Pieters 772d809a63 bpo-31161: only check for parens error for SyntaxError (#3082)
Subclasses such as IndentError and TabError should not have this message
applied.
2017-08-22 13:16:23 -07:00
Victor Stinner bc61315377 bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178)
* bpo-31249: Fix ref cycle in ThreadPoolExecutor

concurrent.futures: WorkItem.run() used by ThreadPoolExecutor now
breaks a reference cycle between an exception object and the WorkItem
object. ThreadPoolExecutor.shutdown() now also clears its threads
set.

* shutdown() now only clears threads if wait is true.

* Revert changes on shutdown()
2017-08-22 16:50:42 +02:00
Łukasz Langa 5fe59f8e3a bpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (#3153)
PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on
non-debug shared builds.  This breaks the ability to use py-bt, py-up, and
a few other Python-specific gdb integrations.

This patch fixes the problem by only looking for _PyEval_EvalFrameDefault
frames.

test_gdb passes on both a debug and a non-debug build.

Original patch by Bruno "Polaco" Penteado.
2017-08-21 16:40:29 -07:00
Łukasz Langa ea57923e89 bpo-23835: [docs] configparser converts defaults to strings (#3176)
Title says all.
2017-08-21 16:23:38 -07:00
Victor Stinner 4cab2cd0c0 bpo-31238: pydoc ServerThread.stop() now joins itself (#3151)
* bpo-31238: pydoc ServerThread.stop() now joins itself

ServerThread.stop() now joins itself to wait until
DocServer.serve_until_quit() completes and then explicitly sets
its docserver attribute to None to break a reference cycle.

* Add NEWS.d entry
2017-08-21 23:24:40 +02:00
Victor Stinner 84524454d0 bpo-31247: xmlrpc.server: break reference cycle (#3166)
xmlrpc.server now explicitly breaks reference cycles when using
sys.exc_info() in code handling exceptions.
2017-08-21 18:12:58 +02:00
Cheryl Sabella a32e40561a bpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3141)
This is the first half of a patch similar to the one for for bpo-31205.  It is being split into 2 PRs to avoid what happened with PR-3096 -- an incomprehensible diff that could not be cleanly backported to 3.6.  This half copies several methods of ConfigDialog and turns them into a new class.
2017-08-18 18:34:55 -04:00
Victor Stinner 93d0cb58b4 bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106)
* bpo-30947: Update libexpat from 2.2.1 to 2.2.3

* Add NEWS entry

* Add new loadlibrary.c

* expat_external.h: restore include "pyexpatns.h"

* PCbuild: add expat/loadlibrary.c

* Define XML_POOR_ENTROPY to compile expat
2017-08-18 23:43:54 +02:00
Yaron de Leeuw 02f3b7d5ab bpo-31109: Convert zipimport to use Argument Clinic (GH-2990) 2017-08-18 11:41:13 -07: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
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
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 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
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
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
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
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
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
Jeffrey Rackauckas b811d664de bpo-31072: Add filter to zipapp (#3021)
bpo-31072: Add a filter argument to zipapp.create_archive (GH-3021)

* Add an include_file argument to allow callers to decide which files to include
* Document the new argument
2017-08-09 14:37:17 +01:00
Serhiy Storchaka 9b0d1d647e bpo-31070: Fix a race condition in importlib _get_module_lock(). (#3033) 2017-08-09 14:29:12 +03:00
Victor Stinner cd7e9c1b67 ttk: fix LabeledScale and OptionMenu destroy() method (#3025)
bpo-31135: Call the parent destroy() method even if the used
attribute doesn't exist.

The LabeledScale.destroy() method now also explicitly clears label
and scale attributes to help the garbage collector to destroy all
widgets.
2017-08-08 19:41:21 +02:00
Terry Jan Reedy 733d0f63c5 bpo-31130: IDLE -- stop leaks in test_configdialog. (#3016)
Initial patch by Victor Stinner.
2017-08-07 14:22:44 -04:00
Łukasz Langa 8238ef0467 Add author of the fix for #30841 to ACKS. (#3001) 2017-08-04 11:21:37 -07:00
Shane Harvey c4c9866064 bpo-31107: Fix copyreg mangled slot names calculation. (#2989) 2017-08-04 11:45:00 +03:00
Serhiy Storchaka 5075416b8f bpo-30978: str.format_map() now passes key lookup exceptions through. (#2790)
Previously any exception was replaced with a KeyError exception.
2017-08-03 11:45:23 +03:00
Serhiy Storchaka 25e4f779d7 bpo-31071: Avoid masking original TypeError in call with * unpacking (#2957)
when other arguments are passed.
2017-08-03 11:37:15 +03:00
Ville Skyttä 49b2734bf1 Spelling fixes (#2902) 2017-08-03 09:00:59 +03:00
Preston Landers 6ea56d2ebc bpo-31080: Allowed logging.config.fileConfig() to accept both args and kwargs. (GH-2979) 2017-08-02 21:44:28 +01:00
Alexander Mohr de34cbe9cd bpo-31061: fix crash in asyncio speedup module (GH-2966) 2017-08-02 15:31:07 +09:00
Łukasz Langa 47320a652e Document Path.is_mount(), update Misc/ACKS and Misc/NEWS (#2980) 2017-08-01 16:47:50 -07:00
csabella 6f446bee4f bpo-31083: IDLE: Describe the Page classes in configdialog (#2965)
Add template as comment. Update existing classes to match outline.
Initial patch by Cheryl Sabella.
2017-08-01 00:24:07 -04:00
Alexander Belopolsky 018d353c1c Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets. (#2896)
* Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets.

* bpo-5288: Implemented %z formatting of sub-minute offsets.

* bpo-5288: Removed mentions of the whole minute limitation on TZ offsets.

* bpo-5288: Removed one more mention of the whole minute limitation.

Thanks @csabella!

* Fix a formatting error in the docs

* Addressed review comments.

Thanks, @haypo.
2017-07-31 10:26:50 -04:00
csabella a568e52733 bpo-25684: ttk.OptionMenu radiobuttons weren't unique (#2276)
between instances of OptionMenu.
2017-07-31 12:30:09 +03:00
csabella e8eb17b2c1 bpo-31050: IDLE: Factor GenPage class from ConfigDialog (#2952)
The slightly modified tests for the General tab continue to pass.
Patch by Cheryl Sabella.
2017-07-30 18:39:17 -04:00
csabella 9397e2a87e bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (#2905)
The slightly modified tests continue to pass. The General test
broken by the switch to Notebook is fixed.
Patch mostly by Cheryl Sabella.
2017-07-30 13:34:25 -04:00
Vinay Sajip 2543f50033 bpo-30522: Implemented a method to allow setting a logging.StreamHander's stream. (GH-2921) 2017-07-30 10:41:45 +01:00
Peter Thomassen caa1280d1e bpo-30803: clarify truth value testing documentation (#2508)
Initial patch by Peter Thomassen.
2017-07-29 15:18:13 -04:00
Terry Jan Reedy b331f80b47 bpo-30781: IDLE - Use ttk Notebook in ConfigDialog (#2938)
The notebook looks a bit better.  It will work better with separate page classes. Traversal of widgets by Tab works better.  Switching tabs with keys becomes possible.  The font sample box works better at large font sizes.

One of the two simulated click tests no longer works.  This will be investigated while fixing a bug with the widget itself.
2017-07-29 00:49:39 -04:00
csabella 5b59154c0d bpo-30853: IDLE: Convert font and general vars to use VarTrace (#2914)
Instance tracers manages pairs consisting of a tk variable and a
callback function.  When tracing is turned on, setting the variable
calls the function.  Test coverage for the new class is 100%.
2017-07-28 14:40:59 -04:00
Terry Jan Reedy b1660800f4 bpo-31060: IDLE: Finish regrouping ConfigDialog methods (#2908)
Finish resorting the 72 ConfigDialog methods into 7 groups that represent the dialog, action buttons, and font, highlight, keys, general, and extension pages.  This will help with continuing to add tests and improve the pages. It will enable splitting ConfigDialog into 6 or 7 more comprehensible classes.
2017-07-27 18:28:01 -04:00
Terry Jan Reedy 2bc8f0e686 bpo-31003: IDLE - Add more tests for General tab (#2859)
* In configdialog: Document causal pathways in create_page_general.
Move related functions to follow this. Simplify some attribute names.
* In test_configdialog: Add tests for load and helplist functions.
Coverage for the general tab is now complete, and 63% overall.
2017-07-26 20:54:40 -04:00
Utkarsh Upadhyay cc5a65cd90 bpo-30302 Make timedelta.__repr__ more informative. (#1493) 2017-07-25 23:51:33 +02:00
Terry Jan Reedy 77e97ca9ff bpo-30993: IDLE - Improve configdialog font page and tests. (#2831)
In configdialog: Document causal pathways in create_font_tab docstring.  Simplify some attribute names. Move set_samples calls to var_changed_font (idea from Cheryl Sabella).  Move related functions to positions after the create widgets function.

In test_configdialog: Fix test_font_set so not order dependent.  Fix renamed test_indent_scale so it tests the widget.  Adjust tests for movement of set_samples call.  Add tests for load functions.  Put all font tests in one class and tab indent tests in another.  Except for two lines, these tests completely cover the related functions.
2017-07-24 00:18:25 -04:00
Terry Jan Reedy 07ba305a4c bpo-30993: IDLE - Improve configdialog font page and tests. (#2818)
* Document causal event pathways in docstring.
* Simplify some attribute names.
* Rename test_bold_toggle_set_samples to make test_font_set fail.
* Fix test_font_set so not order dependent.
* Fix renamed test_indent_scale so it tests the widget.
2017-07-23 12:20:08 -04:00
Antoine Pitrou 3051f0b78e bpo-30919: shared memory allocation performance regression in multiprocessing (#2708)
* Fix #30919: shared memory allocation performance regression in multiprocessing

* Change strategy for Arena directory choice

* Add blurb
2017-07-23 13:05:26 +02:00
Dong-hee Na 2b1e6e9696 bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) 2017-07-22 19:20:22 +02:00
Antoine Pitrou 896145d9d2 bpo-26732: fix too many fds in processes started with the "forkserver" method (#2813)
* bpo-26732: fix too many fds in processes started with the "forkserver" method

A child process would inherit as many fds as the number of still-running children.

* Add blurb and test comment
2017-07-22 13:22:54 +02:00
Gareth Rees 3913bad495 bpo-19896: Add typecodes 'q' and 'Q' to multiprocessing.sharedctypes (#2741)
* bpo-19896: Add typcodes 'q' and 'Q' to multiprocessing.sharedctypes. Patch by Antony Lee.

* Add NEWS entry.

* Slightly tweak NEWS entry

Make it clear this is more of a fix rather than a new feature.
2017-07-21 12:35:33 +02:00
Terry Jan Reedy d0969d6924 bpo-30981: IDLE -- Add more configdialog font page tests. (#2794) 2017-07-21 02:20:46 -04:00
Terry Jan Reedy a54a8f188a bpo-28523: IDLE: Use 'color' instead of 'colour'. (#2787) 2017-07-21 01:06:58 -04:00
Nicholas b3527bfefd bpo-30964: Mention ensurepip in package installation docs (GH-2786)
Adds a new 'Pip not installed' section that covers
running `ensurepip` manually, and also references
the relevant section of the Python Packaging User
Guide.
2017-07-21 13:51:54 +10:00
Utkarsh Upadhyay 287c5594ed bpo-30822: Fix testing of datetime module. (#2530) (#2783)
Only C implementation was tested.
2017-07-21 02:14:54 +02:00
Victor Stinner 5b392bbaeb bpo-30822: Exclude tzdata from regrtest --all (#2775)
When running the test suite using --use=all / -u all, exclude tzdata
since it makes test_datetime too slow (15-20 min on some buildbots)
which then times out on some buildbots.

-u tzdata must now be enabled explicitly, -u tzdata or -u all,tzdata,
to run all test_datetime tests.

Fix also regrtest command line parser to allow passing -u
extralargefile to run test_zipfile64.

Travis CI: remove -tzdata. Replace -u all,-tzdata,-cpu with -u all,-cpu since tzdata is now excluded from -u all.
2017-07-20 15:46:32 +02:00
Aaron Gallagher 856cbcc12f bpo-29403: Fix mock's broken autospec behavior on method-bound builtin functions (GH-3)
Cython will, in the right circumstances, offer a MethodType instance
where im_func is a builtin function. Any instance of MethodType is
automatically assumed to be a Python-defined function (more
specifically, a function that has an inspectable signature), but
_set_signature was still conservative in its assumptions. As a result
_set_signature would return early with None instead of a mock since
the im_func had no inspectable signature. This causes problems
deeper inside mock, as _set_signature is assumed to _always_
return a mock, and nothing checked its return value.

In similar corner cases, autospec will simply not check the spec of the
function, so _set_signature is amended to now return early with the
original, not-wrapped mock object.

Patch by Aaron Gallagher.
2017-07-20 03:01:14 +03:00
Louie Lu f776eb0f0e bpo-30917: IDLE: Add config.IdleConf unittests (#2691)
Patch by Louie Lu.
2017-07-18 17:17:56 -04:00
Xiang Zhang 4ed5ad79ec bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747) 2017-07-19 00:33:29 +08:00
Vitor Pereira ba75af7130 bpo-30794: added kill() method to multiprocessing.Process (#2528)
* bpo-30794: added kill() method to multiprocessing.Process

* Added entries to documentation and NEWS

* Refactored test_terminate and test_kill

* Fix SIGTERM and SIGKILL being used on Windows for the tests

* Added "versionadded" marker to the documentation

* Fix trailing whitespace in doc
2017-07-18 17:34:23 +02:00
Antoine Pitrou f474c5a3f3 bpo-30946: Remove obsolete fallback code in readline module (#2738)
* Remove obsolete fallback code in readline module

* Add NEWS

* Remove obsolete include

* Fix macro on Windows
2017-07-18 17:05:03 +02:00
Antoine Pitrou 2c8a5e4c96 bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state (#2417)
* Improve signal delivery

Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.

* Remove unused function

* Improve comments

* Use _Py_atomic API for concurrency-sensitive signal state

* Add blurb
2017-07-17 12:25:19 +02:00
Steve Dower 68d663cf85 [bpo-30916] Pre-build OpenSSL and Tcl/Tk for Windows (#2688)
Updates ssl and tkinter projects to use pre-built externals
2017-07-17 11:15:48 +02:00
terryjreedy 95bebb7264 bpo-30934: Document coverage details for idlelib tests (#2711)
* Add section to idlelib/idle-test/README.txt.
* Include check that branches are taken both ways.
* Exclude IDLE-specific code that does not run during unit tests.
2017-07-16 00:07:36 -04:00
csabella 36329a4dd8 bpo-30913: IDLE: Document tk vars, attributes, and methods for ConfigDialog (#2697)
The will help writing dialog improvements and splitting the class into multiple classes.
Original patch by Cheryl Sabella.
2017-07-13 23:32:01 -04:00
Segev Finer c40ad03bf2 bpo-30731: python.manifest fix (#2328)
bpo-30731: python.manifest fix
2017-07-13 21:34:42 +02:00
Louie Lu 50c9435c9b bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses. (#2662)
Patch by Louie Lu.
2017-07-12 14:05:32 -04:00
Serhiy Storchaka 8a9cd20edc bpo-30876: Relative import from unloaded package now reimports the package (#2639)
instead of failing with SystemError.

Relative import from non-package now fails with ImportError rather than
SystemError.
2017-07-12 06:50:03 +03:00
csabella ba352270b7 bpo-30881: IDLE: add docstrings to browser.py (#2638)
Patch by Cheryl Sabella.
2017-07-11 02:34:01 -04:00
Serhiy Storchaka 1180e5a518 bpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634)
called with bytes-like argument.
2017-07-11 06:36:46 +03:00
csabella aa8d0a2469 bpo-30851: IDLE: Remove unused tk variables in configdialog. (#2626)
One is a duplicate, one is set but cannot be altered by users.
Patch by Cheryl Sabella.
2017-07-10 13:50:44 -04:00
Victor Stinner 3b69d911c5 bpo-30886: Fix multiprocessing.Queue.join_thread() (#2642)
multiprocessing.Queue.join_thread() now waits until the thread
completes, even if the thread was started by the same process which
created the queue.

Fix the following warning which occurs randomly when running
test_handle_called_with_mp_queue of test_logging.QueueListenerTest:

Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1)
2017-07-10 12:45:21 +02:00
Louie Lu bb2bae84d6 bpo-30870: IDLE: Change sample font when select by key-up/down (#2617)
Patch by Louie Lu.
2017-07-09 18:57:18 -04:00
terryjreedy 223c7e70e4 bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629) 2017-07-07 22:28:06 -04:00
terryjreedy 24f2e19d68 bpo-30779: News (#2627) 2017-07-07 20:49:37 -04:00
Nir Soffer fae8f4a9cb bpo-29854: Fix segfault in call_readline() (GH-728)
If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.

It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.

This issue affects only GNU readline. When using libedit emulation
system history size option does not work.
2017-07-07 09:10:46 +03:00
Serhiy Storchaka b4baacee1a bpo-30814: Fixed a race condition when import a submodule from a package. (#2580) 2017-07-06 08:09:03 +03:00
Yury Selivanov 833a3b0d37 bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (#2569) 2017-07-05 13:32:03 -04:00
Victor Stinner 8207c17486 Revert "bpo-30822: Fix testing of datetime module." (#2588)
* Revert "bpo-30854: Fix compile error when --without-threads (#2581)"

This reverts commit 0c31163093.

* Revert "NEWS for 30777 (#2576)"

This reverts commit aaa917ff38.

* Revert "bpo-21624: IDLE -- minor htest fixes (#2575)"

This reverts commit 2000150c56.

* Revert "bpo-30777: IDLE: configdialog - add docstrings and improve comments (#2440)"

This reverts commit 7eb5883ac5.

* Revert "bpo-30319: socket.close() now ignores ECONNRESET (#2565)"

This reverts commit 67e1478dba.

* Revert "bpo-30789: Use a single memory block for co_extra. (#2555)"

This reverts commit 378ebb6578.

* Revert "bpo-30845: Enhance test_concurrent_futures cleanup (#2564)"

This reverts commit 3df9dec425.

* Revert "bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480)"

This reverts commit 48350412b7.

* Revert "Remove outdated FOX from GUI FAQ (GH-2538)"

This reverts commit d3ed2877a7.

* Revert "bpo-6691: Pyclbr now reports nested classes and functions. (#2503)"

This reverts commit 246ff3bd00.

* Revert "bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)"

This reverts commit 6969eaf468.

* Revert "bpo-30832: Remove own implementation for thread-local storage (#2537)"

This reverts commit aa0aa0492c.

* Revert "bpo-30764: Fix regrtest --fail-env-changed --forever (#2536)"

This reverts commit 5e87592fd1.

* Revert "bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (#2534)"

This reverts commit 34b54873b5.

* Revert "bpo-30822: Fix testing of datetime module. (#2530)"

This reverts commit 98b6bc3bf7.
2017-07-05 15:44:52 +02:00
Masayuki Yamamoto 0c31163093 bpo-30854: Fix compile error when --without-threads (#2581)
* bpo-30854: Fix compile error when --without-threads

* bpo-30854: fix news
2017-07-05 10:39:17 +02:00
terryjreedy aaa917ff38 NEWS for 30777 (#2576) 2017-07-04 23:00:09 -04:00
Victor Stinner 67e1478dba bpo-30319: socket.close() now ignores ECONNRESET (#2565)
socket.close() was modified in Python 3.6 to raise OSError on
failure: see bpo-26685.
2017-07-04 16:20:06 +02:00
Antoine Pitrou 48350412b7 bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480)
* bpo-29293: multiprocessing.Condition.notify() lacks parameter `n`

* Add NEWS blurb
2017-07-04 08:59:22 +02:00
Masayuki Yamamoto aa0aa0492c bpo-30832: Remove own implementation for thread-local storage (#2537)
* bpo-30832: Remove own implementation for thread-local storage

CPython has provided the own implementation for thread-local storage
(TLS) on Python/thread.c, it's used in the case which a platform has
not supplied native TLS.  However, currently all supported platforms
(NT and pthreads) have provided native TLS and defined the
Py_HAVE_NATIVE_TLS macro with unconditional in any case.

* bpo-30832: replace NT with Windows

* bpo-30832: change to directive chain

* bpo-30832: remove comemnt which making no sense
2017-07-03 13:34:38 +02:00
Utkarsh Upadhyay 98b6bc3bf7 bpo-30822: Fix testing of datetime module. (#2530)
Only C implementation was tested.
2017-07-02 15:46:04 +03:00
Osvaldo Santana Neto 8a8d28501f bpo-30441: Fix bug when modifying os.environ while iterating over it (#2409) 2017-07-01 20:34:45 +03:00
xdegaye 85f643023f bpo-30695: Add set_nomemory(start, stop) to _testcapi (GH-2406) 2017-07-01 14:14:45 +02:00
Antoine Pitrou 729780a810 bpo-30807: signal.setitimer() may disable the timer by mistake (#2493)
* bpo-30807: signal.setitimer() may disable the timer by mistake

* Add NEWS blurb
2017-06-30 10:01:05 +02:00
csabella 42bc8beadd bpo-30495: IDLE: improve textview with docstrings, PEP8 names, more tests. (#2283)
Split TextViewer class into ViewWindow, ViewFrame, and TextFrame classes so that instances
of the latter two can be placed with other widgets within a multiframe window.
Patch by Cheryl Sabella.
2017-06-29 18:42:17 -04:00
Antoine Pitrou c08177a1cc bpo-30703: Improve signal delivery (#2415)
* Improve signal delivery

Avoid using Py_AddPendingCall from signal handler, to avoid calling signal-unsafe functions.

* Remove unused function

* Improve comments

* Add stress test

* Adapt for --without-threads

* Add second stress test

* Add NEWS blurb

* Address comments @haypo
2017-06-28 23:29:29 +02:00
Segev Finer 9f3bdcb643 bpo-23451: Fix socket deprecation warnings in socketmodule.c (#2318)
* bpo-23451: Fix WSASocket and WSADuplicateSocket deprecation warnings

* bpo-23451: Add backwards compatibility note about socket share/fromshare

* bpo-23451: Fixed `WSAAddressToString`/`WSAStringToAddress` deprecation warnings

* bpo-23451: Use `inet_pton`/`inet_ntop` instead of `WSAAddressToString`/`WSAStringToAddress`

* bpo-23451: Move `HAVE_INET_PTON` from _socket.vcxproj to pyconfig.h

* bpo-23451: Add SUPPRESS_DEPRECATED_CALL to socketmodule.c

* bpo-23451: Add a NEWS.d entry

* bpo-23451: Corrected NEWS.d entry
2017-06-28 13:51:00 -07:00
Steve (Gadget) Barnes 5b8f972e09 bpo-30362 : Add list options to launcher. (#1578)
* bpo-30362 Add list options to launcher.

* bpo-30362 Add list options to help message.

* To avoid possible later conflict with python replaced flags with --launcher-list and --launcher-list-paths

* bpo-30362 Changed flag to -0 as suggested on review.

* bpo-30362: Modified to default to not path for -0, -0p to dispaly path and append * to default

* bpo-30362: Modified to display list on required version not found.

* bpo-30362 add --list and --list-paths added back in following review by paul.moore

* bpo-30362 Cleaner handing of -0 & -0p by not calling exit directly per review by @zooba

* bpo-30362: Tidy up and add news & what's new

Removed commented out line of code in PC/launcher.c.
Added the results of using blurb to add details of bpo-30362 & bpo-30291.
Updated Doc/whatsnew/3.7.rst to add a Windows only section covering both tickets.

* bpo-30362 Resolve conflict in Doc/whatsnew/3.7.rst

* bpo-30362:Address Whitespace Issue in Doc\whatsnew\3.7.rst

* Shorten NEWS message for bpo-30362

* Shorten NEWS item for bpo-30291
2017-06-28 12:14:52 -07:00
INADA Naoki a8f8d5b4bd bpo-29585: optimize site.py startup time (GH-136)
Avoid importing `sysconfig` from `site` by copying minimum code.
Python startup is 5% faster on Linux and 30% faster on macOS
2017-06-29 00:31:53 +09:00
wohlganger fae2c3538e bpo-30723: IDLE -- Enhance parenmatch; add style, flash, and help (#2306)
* Add 'parens' style to highlight both opener and closer.
* Make 'default' style, which is not default, a synonym for 'opener'.
* Make time-delay work the same with all styles.
* Add help for config dialog extensions tab, including parenmatch.
* Add new tests. 
Original patch by Charles Wohlganger.
2017-06-27 22:36:23 -04:00
Serhiy Storchaka e613e6add5 bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (#2285)
Raise a ValueError if the second argument is NULL and the wchar_t\*
string contains null characters.
2017-06-27 16:03:14 +03:00
csabella 65474b9d7a bpo-30674: IDLE: add docstrings to grep.py (#2213)
Patch by Cheryl Sabella
2017-06-27 02:41:08 -04:00
terryjreedy 44913e584b bpo-21519: IDLE basic custom key entry better detects duplicates. (#2428) 2017-06-27 01:23:55 -04:00
Serhiy Storchaka 213ce12adf bpo-29910: IDLE no longer deletes a character after commenting out a region (#825)
This happened because shortcut has a class binding and 'break' was not returned.
Fix other potential conflicts between IDLE and default key bindings.

* Add news item

* Update NEWS
2017-06-27 00:02:32 -04:00
Eric N. Vander Weele a7874c73c0 bpo-30769: Fix reference leak introduced in 77703942c5 (#2416)
New error condition paths were introduced, which did not decrement
`key2` and `val2` objects.  Therefore, decrement references before
jumping to the error label.

Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
2017-06-27 03:35:20 +02:00
csabella bac7d3363b bpo-30728: IDLE: Refactor configdialog to PEP8 names (#2307)
Also, change '*' in the tkinter import to an explicit list of names.
Patch by Cheryl Sabella.
2017-06-26 17:46:26 -04:00
Joel Hillacre b350c22ebc bpo-30532: Fix whitespace folding in certain cases
Leading whitespace was incorrectly dropped during folding of certain lines in the _header_value_parser's folding algorithm.  This makes the whitespace handling code consistent.
2017-06-26 17:41:35 -04:00
Antoine Pitrou f84ac420c2 bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to (#2403)
* bpo-30765: Avoid blocking when PyThread_acquire_lock() is asked not to lock

This is especially important if PyThread_acquire_lock() is called reentrantly
(for example from a signal handler).

* Update 2017-06-26-14-29-50.bpo-30765.Q5iBmf.rst

* Avoid core logic when taking the mutex failed
2017-06-26 20:41:07 +02:00
csabella 8c78aa70c8 bpo-6739: IDLE: Check for valid keybinding in config_keys (#2377)
Verify user-entered key sequences by trying to bind them with tk.
Add tests for all 3 validation functions.
Original patch by G Polo.  Tests added by Cheryl Sabella.
2017-06-26 00:55:48 -04:00
Serhiy Storchaka 77703942c5 bpo-30746: Prohibited the '=' character in environment variable names (#2382)
in `os.putenv()` and `os.spawn*()`.
2017-06-25 07:33:01 +03:00
Antoine Pitrou 13e96cc596 Fix bpo-30596: Add close() method to multiprocessing.Process (#2010)
* Fix bpo-30596: Add close() method to multiprocessing.Process

* Raise ValueError if close() is called before the Process is finished running

* Add docs

* Add NEWS blurb
2017-06-24 19:22:23 +02:00
Serhiy Storchaka 48fbe52ac7 bpo-30664: The description of a unittest subtest now preserves the (#2265)
order of keyword arguments of TestCase.subTest().
2017-06-23 21:47:39 +03:00
Alexandru Ardelean c38e32a100 bpo-30645: don't append to an inner loop path in imp.load_package() (GH-2268)
Bug didn't manifest itself when importing a module with source as .py files are always the first on the search path. The issue only showed up in bytecode-only packages where the calculated file path would be ``__init__.py/__init__.pyc``.

Patch by Alexandru Ardelean.
2017-06-23 10:35:03 -07:00
Serhiy Storchaka d174d24a5d bpo-30730: Prevent environment variables injection in subprocess on Windows. (#2325)
Prevent passing other invalid environment variables and command arguments.
2017-06-23 19:39:27 +03:00
Victor Stinner f87b85f808 bpo-21071: struct.Struct.format type is now str (#845) 2017-06-23 15:11:12 +02:00
Benjamin Peterson 279a96206f bpo-30736: upgrade to Unicode 10.0 (#2344)
Straightforward. While we're at it, though, strip trailing whitespace from generated tables.
2017-06-22 22:31:08 -07:00
larryhastings ea007984d3 Add "Misc/NEWS.d" directory tree for "blurb". (GH-2316)
Add "Misc/NEWS.d" directory tree for "blurb".

CPython workflow is changing!  We're going to start using "blurb"
to manage Misc/NEWS entries:
    https://github.com/python/core-workflow
(This will be a big win for release managers, honest.)

This checkin simply populates the "Misc/NEWS.d" subdirectory tree
so that people can start putting their news entries in there.
No other changes (yet).
2017-06-22 10:29:02 -07:00
Gregory P. Smith a3d91b43c2 bpo-29212: Fix the ugly repr() ThreadPoolExecutor thread name. (#2315)
bpo-29212: Fix the ugly ThreadPoolExecutor thread name.

Fixes the newly introduced ugly default thread name for concurrent.futures
thread.ThreadPoolExecutor threads.  They'll now resemble the old <=3.5
threading default Thread-x names by being named ThreadPoolExecutor-y_n.
2017-06-21 23:41:13 -07:00
Dino Viehland f3cffd2b78 bpo-30604: clean up co_extra support (#2144)
bpo-30604: port fix from 3.6 dropping binary compatibility tweaks
2017-06-21 17:44:36 -04:00
Dong-hee Na dcc8ce44c7 bpo-30616: Functional API of enum allows to create empty enums. (#2304)
* bpo-30616: Functional API of enum allows to create empty enums.

* Update NEWS

move addition to avoid conflict
2017-06-21 09:52:32 -07:00
Victor Stinner 5ff7132313 bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300)
New file: Modules/expat/siphash.h.
2017-06-21 14:39:22 +02:00
Serhiy Storchaka 26cb4657bc bpo-29755: Fixed the lgettext() family of functions in the gettext module. (#2266)
They now always return bytes.

Updated the gettext documentation.
2017-06-20 17:13:29 +03:00
Victor Stinner 8457706ee3 bpo-30500: Fix the NEWS entry (#2293)
splithost() expects an URL starting with "//" not with "http://".
2017-06-20 16:09:22 +02:00
Sanyam Khurana 3a7f03584a bpo-30597: Show expected input in custom 'print' error message. (#2009) 2017-06-20 16:31:32 +03:00
postmasters 90e01e50ef urllib: Simplify splithost by calling into urlparse. (#1849)
The current regex based splitting produces a wrong result. For example::

  http://abc#@def

Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
2017-06-20 15:02:44 +02:00
Motoki Naruse 5cc7ac24da bpo-30629: Add Motoki Naruse to Misc/ACKS (#2284) 2017-06-20 04:10:12 -04:00
Steve Dower 40a23e8899 bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat (#2252)
* Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat
Also fixes bdist_wininst.vcxproj to use correct version in generated name.
2017-06-19 10:34:25 -07:00
Ned Deily 6a98a04e21 bpo-30038: add Misc/NEWS entry. (#2258) 2017-06-16 23:34:32 -04:00
Ned Deily ceb817dcfe bpo-23894: add Misc/NEWS entry. (#2256) 2017-06-16 22:43:31 -04:00
ericvsmith 11e97f2f80 bpo-30682: Removed a too-strict assertion that failed for certain f-strings. (#2232)
This caused a segfault on eval("f'\\\n'") and eval("f'\\\r'") in debug build.
2017-06-16 13:19:32 +03:00
terryjreedy faa63d1e84 Add IDLE items to NEWS and idlelib/NEWS.txt (#2239) 2017-06-16 01:54:57 -04:00
Zachary Ware cb8c0485ab bpo-30450: Add NEWS and whatsnew (GH-2236) 2017-06-15 22:34:59 -05:00
Xiang Zhang 116dd5eba6 bpo-30176: Add missing curses cell attributes constants (GH-1302) 2017-06-15 20:20:07 -07:00
Victor Stinner 23ec4b57e1 bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164)
* bpo-29591: Upgrade Modules/expat to libexpat 2.2

* bpo-29591: Restore Python changes on expat

* bpo-29591: Remove expat config of unsupported platforms

Remove the configuration (Modules/expat/*config.h) of unsupported
platforms:

* Amiga
* MacOS Classic on PPC32
* Open Watcom

* bpo-29591: Remove useless XML_HAS_SET_HASH_SALT

The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became
useless since our local expat copy was upgrade to expat 2.1 (it's now
expat 2.2.0).
2017-06-15 00:54:36 +02:00
Milan Oberkirch 8c3f05e9f0 bpo-30436: Raise ModuleNotFoundError for importlib.util.find_spec() when parent isn't a package (GH-1899)
Previously AttributeError was raised, but that's not very reflective of the fact that the requested module can't be found since the specified parent isn't actually a package.
2017-06-14 14:34:50 -07:00
Sanyam Khurana b9c3da5c89 bpo-24744: Raises error in pkgutil.walk_packages if path is str (#1926)
bpo-24744: Raise error in pkgutil.walk_packages if path is str

Previously an empty result list was accidentallly returned, since the
code iterated over the string as if it were the expected list of paths,
and of course found nothing.
2017-06-13 13:11:14 -04:00
Antoine Pitrou 1eb6c0074d bpo-24484: Avoid race condition in multiprocessing cleanup (#2159)
* bpo-24484: Avoid race condition in multiprocessing cleanup

The finalizer registry can be mutated while inspected by multiprocessing
at process exit.

* Use test.support.start_threads()

* Add Misc/NEWS
2017-06-13 17:10:39 +02:00
Antoine Pietri a77a35d70b bpo-30177: add NEWS entry (#2135) 2017-06-12 12:40:13 -04:00
Antoine Pitrou dfd5f34634 Fix bpo-30589: improve Process.exitcode with forkserver (#1989)
* Fix bpo-30589: improve Process.exitcode with forkserver

When the child is killed, Process.exitcode should return -signum, not 255.

* Add Misc/NEWS
2017-06-12 15:28:19 +02:00
mircea-cosbuc b459f74826 [email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595)
If max_line_length=None is specified while using the Compat32 policy,
it is no longer ignored.
2017-06-11 23:43:41 -07:00
Serhiy Storchaka 3fd54d4a7e bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (#2034)
The traceback no longer displayed for SystemExit raised in a callback registered by atexit.
2017-06-12 08:25:04 +03:00
Yury Selivanov 09663de203 Revert "bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (#409)" (#2111)
This reverts commit a608d2d5a7.
2017-06-11 16:46:35 +02:00
Yury Selivanov 7ce1c6fb57 bpo-30508: Don't log exceptions if Task/Future "cancel()" method called (#2050) 2017-06-11 13:49:18 +00:00
Serhiy Storchaka 36ff451eba bpo-30501: Make the compiler producing optimized code for condition expressions. (#1851) 2017-06-11 14:50:22 +03:00
Serhiy Storchaka 1efbf92e90 bpo-11822: Improve disassembly to show embedded code objects. (#1844)
The depth argument limits recursion.
2017-06-11 14:09:39 +03:00
Nick Coghlan 6ea4186de3 bpo-28180: Implementation for PEP 538 (#659)
- new PYTHONCOERCECLOCALE config setting
- coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
- always uses C.UTF-8 on Android
- uses `surrogateescape` on stdin and stdout in the coercion
  target locales
- configure option to disable locale coercion at build time
- configure option to disable C locale warning at build time
2017-06-11 13:16:15 +10:00
terryjreedy c94c41ce73 Add IDLE NEWS items for 3.7 (#2090) 2017-06-10 20:34:38 -04:00