]> granicus.if.org Git - python/log
python
7 years agobpo-30891: Fix again importlib _find_and_load() (#2665)
Victor Stinner [Fri, 21 Jul 2017 11:00:46 +0000 (13:00 +0200)]
bpo-30891: Fix again importlib _find_and_load() (#2665)

Use sys.modules.get() in the "with _ModuleLockManager(name):" block
to protect the dictionary key with the module lock and use an atomic
get to prevent race condition.

Remove also _bootstrap._POPULATE since it was unused
(_bootstrap_external now has its own _POPULATE object), add a new
_SENTINEL object instead.

7 years agobpo-19896: Add typecodes 'q' and 'Q' to multiprocessing.sharedctypes (#2741)
Gareth Rees [Fri, 21 Jul 2017 10:35:33 +0000 (11:35 +0100)]
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.

7 years agobpo-30981: temporarity skip failing IDLE test class (#2798)
Terry Jan Reedy [Fri, 21 Jul 2017 07:47:01 +0000 (03:47 -0400)]
bpo-30981: temporarity skip failing IDLE test class (#2798)

7 years agobpo-30981: IDLE -- Add more configdialog font page tests. (#2794)
Terry Jan Reedy [Fri, 21 Jul 2017 06:20:46 +0000 (02:20 -0400)]
bpo-30981: IDLE -- Add more configdialog font page tests.  (#2794)

7 years agobpo-28523: IDLE: Use 'color' instead of 'colour'. (#2787)
Terry Jan Reedy [Fri, 21 Jul 2017 05:06:58 +0000 (01:06 -0400)]
bpo-28523: IDLE: Use 'color' instead of 'colour'. (#2787)

7 years agobpo-30964: Mention ensurepip in package installation docs (GH-2786)
Nicholas [Fri, 21 Jul 2017 03:51:54 +0000 (20:51 -0700)]
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.

7 years agobpo-30822: Fix testing of datetime module. (#2530) (#2783)
Utkarsh Upadhyay [Fri, 21 Jul 2017 00:14:54 +0000 (02:14 +0200)]
bpo-30822: Fix testing of datetime module. (#2530) (#2783)

Only C implementation was tested.

7 years agoFix typo in Turtle Docs: yingyang -> yinyang (GH-2770)
靳阳 [Thu, 20 Jul 2017 13:58:40 +0000 (21:58 +0800)]
Fix typo in Turtle Docs: yingyang -> yinyang (GH-2770)

7 years agobpo-30822: Exclude tzdata from regrtest --all (#2775)
Victor Stinner [Thu, 20 Jul 2017 13:46:32 +0000 (15:46 +0200)]
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.

7 years agoUpdate doc download files size estimates. (#2771)
Ned Deily [Thu, 20 Jul 2017 07:58:46 +0000 (03:58 -0400)]
Update doc download files size estimates. (#2771)

7 years ago bpo-30968: Fix test_get_font in IDLE's test_config. (#2769)
terryjreedy [Thu, 20 Jul 2017 00:45:36 +0000 (20:45 -0400)]
  bpo-30968: Fix test_get_font in IDLE's test_config.  (#2769)

7 years agobpo-29403: Fix mock's broken autospec behavior on method-bound builtin functions...
Aaron Gallagher [Thu, 20 Jul 2017 00:01:14 +0000 (17:01 -0700)]
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.

7 years agobpo-30917: IDLE: Fix mock_config deepcopy to read_string (#2754)
Louie Lu [Wed, 19 Jul 2017 23:27:06 +0000 (07:27 +0800)]
bpo-30917: IDLE: Fix mock_config deepcopy to read_string (#2754)

Patch by LouieLu.

7 years agoUse pythontest.net instead of debian.org in test_urllib2net (GH-2755)
Ammar Askar [Wed, 19 Jul 2017 02:27:24 +0000 (19:27 -0700)]
Use pythontest.net instead of debian.org in test_urllib2net (GH-2755)

7 years agobpo-30917: IDLE: Add config.IdleConf unittests (#2691)
Louie Lu [Tue, 18 Jul 2017 21:17:56 +0000 (05:17 +0800)]
bpo-30917: IDLE: Add config.IdleConf unittests (#2691)

Patch by Louie Lu.

7 years agobpo-30450: Fix logic for retrying nuget.exe download (#2744)
Steve Dower [Tue, 18 Jul 2017 17:31:51 +0000 (19:31 +0200)]
bpo-30450: Fix logic for retrying nuget.exe download (#2744)

Fix logic for retrying nuget.exe download with Python.
Add support for HOST_PYTHON variable.
Clear internal environment variables used in find_python.bat
Use HOST_PYTHON as the actual Python if it is recent enough.
Adds HOST_PYTHON variable to AppVeyor configuration

7 years agobpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747)
Xiang Zhang [Tue, 18 Jul 2017 16:33:29 +0000 (00:33 +0800)]
bpo-30961: Fix decrementing a borrowed reference in tracemalloc. (#2747)

7 years agobpo-30794: added kill() method to multiprocessing.Process (#2528)
Vitor Pereira [Tue, 18 Jul 2017 15:34:23 +0000 (16:34 +0100)]
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

7 years agobpo-30946: Remove obsolete fallback code in readline module (#2738)
Antoine Pitrou [Tue, 18 Jul 2017 15:05:03 +0000 (17:05 +0200)]
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

7 years agobpo-30450: Fall back to git.exe if no Python is found. (#2739)
Steve Dower [Mon, 17 Jul 2017 13:43:55 +0000 (15:43 +0200)]
bpo-30450: Fall back to git.exe if no Python is found. (#2739)

* bpo-30450: Fall back to git.exe if no Python is found.

* Also check whether git.exe is on PATH if it will be used.

7 years agobpo-30450: Adds alternate download approach for nuget.exe (#2737)
Steve Dower [Mon, 17 Jul 2017 12:55:28 +0000 (14:55 +0200)]
bpo-30450: Adds alternate download approach for nuget.exe (#2737)

* bpo-30450: Adds alternate download approach for nuget.exe

* Whitespace fix.

7 years agobpo-30808: Use _Py_atomic API for concurrency-sensitive signal state (#2417)
Antoine Pitrou [Mon, 17 Jul 2017 10:25:19 +0000 (12:25 +0200)]
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

7 years ago[bpo-30916] Pre-build OpenSSL and Tcl/Tk for Windows (#2688)
Steve Dower [Mon, 17 Jul 2017 09:15:48 +0000 (11:15 +0200)]
[bpo-30916] Pre-build OpenSSL and Tcl/Tk for Windows (#2688)

Updates ssl and tkinter projects to use pre-built externals

7 years agobpo-30936: Fix a reference leak in json when fail to sort keys. (#2712)
Serhiy Storchaka [Sun, 16 Jul 2017 04:29:16 +0000 (07:29 +0300)]
bpo-30936: Fix a reference leak in json when fail to sort keys. (#2712)

7 years agobpo-30934: Document coverage details for idlelib tests (#2711)
terryjreedy [Sun, 16 Jul 2017 04:07:36 +0000 (00:07 -0400)]
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.

7 years agobpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721)
Ned Deily [Sat, 15 Jul 2017 19:28:02 +0000 (15:28 -0400)]
bpo-30939: Avoid Sphinx deprecation warning in docs build. (#2721)

7 years agobpo-30836: fix test_c_locale_coercion on AIX (GH-2713)
Nick Coghlan [Sat, 15 Jul 2017 12:51:05 +0000 (22:51 +1000)]
bpo-30836: fix test_c_locale_coercion on AIX (GH-2713)

AIX uses iso8859-1 in the C locale, not ASCII

AIX doesn't currently provide any of the locale
coercion locales, but we leave locale coercion
enabled in case one gets added in the future.

7 years agoNull merge so github sees fork as synchronized with python (#2710)
terryjreedy [Sat, 15 Jul 2017 02:20:09 +0000 (22:20 -0400)]
Null merge so github sees fork as synchronized with python (#2710)

7 years agoDoc that 'sorted' args are keyword-only, fix 'reverse' default (#2706)
Łukasz Rogalski [Fri, 14 Jul 2017 19:23:39 +0000 (21:23 +0200)]
Doc that 'sorted' args are keyword-only, fix 'reverse' default (#2706)

7 years agoUpdate idlelib/NEWS.txt. (#2703)
terryjreedy [Fri, 14 Jul 2017 04:14:10 +0000 (00:14 -0400)]
Update idlelib/NEWS.txt. (#2703)

7 years agobpo-30913: IDLE: Document tk vars, attributes, and methods for ConfigDialog (#2697)
csabella [Fri, 14 Jul 2017 03:32:01 +0000 (23:32 -0400)]
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.

7 years agobpo-30870: IDLE: Add configdialog fontlist selection unittest (#2666)
Louie Lu [Fri, 14 Jul 2017 00:35:48 +0000 (08:35 +0800)]
bpo-30870: IDLE: Add configdialog fontlist selection unittest (#2666)

Initial patch by Louie Lu.

7 years agobpo-30731: python.manifest fix (#2328)
Segev Finer [Thu, 13 Jul 2017 19:34:42 +0000 (22:34 +0300)]
bpo-30731: python.manifest fix (#2328)

bpo-30731: python.manifest fix

7 years agobpo-30923: Suppress fall-through warnings in libmpdec. (#2698)
Stefan Krah [Thu, 13 Jul 2017 18:54:20 +0000 (20:54 +0200)]
bpo-30923: Suppress fall-through warnings in libmpdec. (#2698)

7 years agobpo-30911: Add tests for bad boolean arguments for accelerated json (#2690)
Serhiy Storchaka [Thu, 13 Jul 2017 07:14:11 +0000 (10:14 +0300)]
bpo-30911: Add tests for bad boolean arguments for accelerated json (#2690)

encoder and decoder.

7 years agobpo-30911: Fix a crash in json on platforms with unsigned char (#2684)
Segev Finer [Thu, 13 Jul 2017 05:52:08 +0000 (08:52 +0300)]
bpo-30911: Fix a crash in json on platforms with unsigned char (#2684)

when pass bad strict argument.

7 years agobpo-30466: Add brief explanation of classes to tutorial (GH-1804)
Trey Hunner [Thu, 13 Jul 2017 02:30:37 +0000 (19:30 -0700)]
bpo-30466: Add brief explanation of classes to tutorial (GH-1804)

7 years agoFix a spelling mistake and tweak tense of output for test.bisect (GH-2683)
Brett Cannon [Wed, 12 Jul 2017 19:04:25 +0000 (12:04 -0700)]
Fix a spelling mistake and tweak tense of output for test.bisect (GH-2683)

Changed "subbset" to "subset". Also made the sentences read like things were happening instead of stating what the code should do (in other words more descriptive than prescriptive).

7 years agobpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses....
Louie Lu [Wed, 12 Jul 2017 18:05:32 +0000 (02:05 +0800)]
bpo-30899: Add unittests, 100% coverage, for IDLE's two ConfigParser subclasses. (#2662)

Patch by Louie Lu.

7 years agobpo-30908: Fix dangling thread in test_os.TestSendfile (#2680)
Victor Stinner [Wed, 12 Jul 2017 14:05:43 +0000 (16:05 +0200)]
bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680)

tearDown() now clears explicitly the self.server variable to make
sure that the thread is completely cleared when tearDownClass()
checks if all threads have been cleaned up.

Fix the following warning:

$ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os
(...)
Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2)
(...)
Tests result: ENV CHANGED

7 years agobpo-30876: Relative import from unloaded package now reimports the package (#2639)
Serhiy Storchaka [Wed, 12 Jul 2017 03:50:03 +0000 (06:50 +0300)]
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.

7 years agobpo-30779: IDLE: fix changes.delete_section calls in configdialog (#2667)
csabella [Tue, 11 Jul 2017 23:09:44 +0000 (19:09 -0400)]
bpo-30779: IDLE: fix changes.delete_section calls in configdialog (#2667)

Also improve test of config.ConfigChanges.delete_section.
Original patch by Cheryl Sabella.

7 years agoAvoid _GNU_SOURCE redefined warning in xmlparse.c (#2670)
Segev Finer [Tue, 11 Jul 2017 19:47:03 +0000 (22:47 +0300)]
Avoid _GNU_SOURCE redefined warning in xmlparse.c (#2670)

7 years agobpo-30881: IDLE: add docstrings to browser.py (#2638)
csabella [Tue, 11 Jul 2017 06:34:01 +0000 (02:34 -0400)]
bpo-30881: IDLE: add docstrings to browser.py (#2638)

Patch by Cheryl Sabella.

7 years agobpo-30870: IDLE -- fix logic error in eae2537. (#2660)
terryjreedy [Tue, 11 Jul 2017 05:58:04 +0000 (01:58 -0400)]
bpo-30870: IDLE -- fix logic error in eae2537. (#2660)

7 years agobpo-22207: Add checks for possible integer overflows in unicodeobject.c. (#2623)
Serhiy Storchaka [Tue, 11 Jul 2017 03:55:25 +0000 (06:55 +0300)]
bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (#2623)

Based on patch by Victor Stinner.

7 years agobpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634)
Serhiy Storchaka [Tue, 11 Jul 2017 03:36:46 +0000 (06:36 +0300)]
bpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634)

called with bytes-like argument.

7 years agobpo-30891: Fix importlib _find_and_load() race condition (#2646)
Victor Stinner [Mon, 10 Jul 2017 20:52:32 +0000 (22:52 +0200)]
bpo-30891: Fix importlib _find_and_load() race condition (#2646)

* Rewrite importlib _get_module_lock(): it is now responsible to hold
  the imp lock directly.
* _find_and_load() now holds the module lock to check if name is in
  sys.modules to prevent a race condition

7 years agobpo-30892: Fix _elementtree module initialization (#2647)
Victor Stinner [Mon, 10 Jul 2017 20:28:02 +0000 (22:28 +0200)]
bpo-30892: Fix _elementtree module initialization (#2647)

Handle getattr(copy, 'deepcopy') error in _elementtree module
initialization.

7 years agobpo-30851: IDLE: Remove unused tk variables in configdialog. (#2626)
csabella [Mon, 10 Jul 2017 17:50:44 +0000 (13:50 -0400)]
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.

7 years agobpo-30866: Add _testcapi.stack_pointer() (#2601)
Victor Stinner [Mon, 10 Jul 2017 12:37:49 +0000 (14:37 +0200)]
bpo-30866: Add _testcapi.stack_pointer() (#2601)

7 years agobpo-30886: Fix multiprocessing.Queue.join_thread() (#2642)
Victor Stinner [Mon, 10 Jul 2017 10:45:21 +0000 (12:45 +0200)]
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)

7 years agoRemove _PyArg_NoStackKeywords(). (#2641)
Serhiy Storchaka [Mon, 10 Jul 2017 08:25:34 +0000 (11:25 +0300)]
Remove _PyArg_NoStackKeywords(). (#2641)

7 years agobpo-30870: IDLE: Change sample font when select by key-up/down (#2617)
Louie Lu [Sun, 9 Jul 2017 22:57:18 +0000 (06:57 +0800)]
bpo-30870: IDLE: Change sample font when select by key-up/down (#2617)

Patch by Louie Lu.

7 years agobpo-30878: Fix error message when keyword arguments are passed (#2635)
Sylvain [Sun, 9 Jul 2017 03:45:06 +0000 (05:45 +0200)]
bpo-30878: Fix error message when keyword arguments are passed (#2635)

to staticmethod() and classmethod().

7 years agobpo-29854: Skip history-size test on older readline (GH-2621)
Nir Soffer [Sat, 8 Jul 2017 14:34:27 +0000 (17:34 +0300)]
bpo-29854: Skip history-size test on older readline (GH-2621)

Turns out that history-size was added in readline 6.0. This explain why
this tests fail on FreeBSD when using readline 5.2. We skip now the
history size if readline does not support it.

See https://cnswww.cns.cwru.edu/php/chet/readline/CHANGES for
details.

7 years agobpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629)
terryjreedy [Sat, 8 Jul 2017 02:28:06 +0000 (22:28 -0400)]
bpo-8231: Call idlelib.IdleConf.GetUserCfgDir only once. (#2629)

7 years agobpo-30779: News (#2627)
terryjreedy [Sat, 8 Jul 2017 00:49:37 +0000 (20:49 -0400)]
bpo-30779: News (#2627)

7 years agobpo-30779: IDLE -- Factor ConfigChanges class from configdialog, put in config; test...
terryjreedy [Fri, 7 Jul 2017 20:00:57 +0000 (16:00 -0400)]
bpo-30779: IDLE -- Factor ConfigChanges class from configdialog, put in config; test. (#2612)

* In config, put dump test code in a function; run it and unittest in 'if __name__ == '__main__'.
* Add class config.ConfigChanges based on changes_class_v4.py on bpo issue.
* Add class test_config.ChangesTest, partly based on configdialog_tests_v1.py on bpo issue.
* Revise configdialog to use ConfigChanges, mostly as specified in tracker msg297804.
* Revise test_configdialog to match configdialog changes.  All tests pass in both files.
* Remove configdialog functions unused or moved to ConfigChanges.
Cheryl Sabella contributed parts of the patch.

7 years agobpo-29854: test_readline logs versions (#2619)
Victor Stinner [Fri, 7 Jul 2017 14:06:58 +0000 (16:06 +0200)]
bpo-29854: test_readline logs versions (#2619)

* test_readline logs the versions of libreadline when run in verbose
  mode
* Add also readline._READLINE_LIBRARY_VERSION

7 years agobpo-29854: Fix segfault in call_readline() (GH-728)
Nir Soffer [Fri, 7 Jul 2017 06:10:46 +0000 (09:10 +0300)]
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.

7 years agobpo-30780: Fix error in idlelib.test_idle.test_configdialog (#2606)
terryjreedy [Fri, 7 Jul 2017 02:19:13 +0000 (22:19 -0400)]
bpo-30780: Fix error in idlelib.test_idle.test_configdialog (#2606)

7 years agoMake test_shutil test_disk_usage not depend on the cwd fs (#2597)
Gregory P. Smith [Fri, 7 Jul 2017 00:11:27 +0000 (17:11 -0700)]
Make test_shutil test_disk_usage not depend on the cwd fs (#2597)

Make test_shutil test_disk_usage not depend on the current working directory's filesystem.

7 years agoFix case in .gitignore (GH-2607)
Segev Finer [Thu, 6 Jul 2017 20:43:37 +0000 (23:43 +0300)]
Fix case in .gitignore (GH-2607)

7 years agobpo-26506: hex() documentation: mention %x % int (GH-2525)
Manvisha Kodali [Thu, 6 Jul 2017 19:30:58 +0000 (22:30 +0300)]
bpo-26506: hex() documentation: mention %x % int (GH-2525)

7 years agobpo-30862: Updated Logger.setLevel documentation. (GH-2604)
Vinay Sajip [Thu, 6 Jul 2017 16:51:28 +0000 (17:51 +0100)]
bpo-30862: Updated Logger.setLevel documentation. (GH-2604)

7 years agobpo-30814: Fixed a race condition when import a submodule from a package. (#2580)
Serhiy Storchaka [Thu, 6 Jul 2017 05:09:03 +0000 (08:09 +0300)]
bpo-30814: Fixed a race condition when import a submodule from a package. (#2580)

7 years agoUpdate idlelib/NEWS.txt with merges upto 2017 Jul 5. (#2595)
terryjreedy [Wed, 5 Jul 2017 23:36:48 +0000 (19:36 -0400)]
Update idlelib/NEWS.txt with merges upto 2017 Jul 5. (#2595)

7 years agobpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (#2569)
Yury Selivanov [Wed, 5 Jul 2017 17:32:03 +0000 (13:32 -0400)]
bpo-30828: Fix out of bounds write in `asyncio.CFuture.remove_done_callback() (#2569)

7 years agoRevert "bpo-30822: Fix testing of datetime module." (#2588)
Victor Stinner [Wed, 5 Jul 2017 13:44:52 +0000 (15:44 +0200)]
Revert "bpo-30822: Fix testing of datetime module." (#2588)

* Revert "bpo-30854: Fix compile error when --without-threads (#2581)"

This reverts commit 0c3116309307ad2c7f8e2d2096612f4ab33cbb62.

* Revert "NEWS for 30777 (#2576)"

This reverts commit aaa917ff38f9869eeebe3bc9469bfee64089d826.

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

This reverts commit 2000150c569941584994ec4ec59171961209bec3.

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

This reverts commit 7eb5883ac59833bf63f0e1f7fb95671a1ac1ee08.

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

This reverts commit 67e1478dba6efe60b8e1890192014b8b06dd6bd9.

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

This reverts commit 378ebb6578b9d709f38b888d23874c0b18125249.

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

This reverts commit 3df9dec425b0254df1cdf41922fd8d6b08bf47e4.

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

This reverts commit 48350412b70c76fa51f488cfc736c80d59b5e8eb.

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

This reverts commit d3ed2877a798d07df75422afe136b4727e500c99.

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

This reverts commit 246ff3bd00f97658e567a7087645a6b76e056491.

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

This reverts commit 6969eaf4682beb01bc95eeb14f5ce6c01312e297.

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

This reverts commit aa0aa0492c5fffe750a26d2ab13737a1a6d7d63c.

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

This reverts commit 5e87592fd12e0b7c41edc11d4885ed7298d5063b.

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

This reverts commit 34b54873b51a1ebee2a3c57b7205537b4f33128d.

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

This reverts commit 98b6bc3bf72532b784a1c1fa76eaa6026a663e44.

7 years agobpo-30854: Fix compile error when --without-threads (#2581)
Masayuki Yamamoto [Wed, 5 Jul 2017 08:39:17 +0000 (17:39 +0900)]
bpo-30854: Fix compile error when --without-threads (#2581)

* bpo-30854: Fix compile error when --without-threads

* bpo-30854: fix news

7 years agoNEWS for 30777 (#2576)
terryjreedy [Wed, 5 Jul 2017 03:00:09 +0000 (23:00 -0400)]
NEWS for 30777 (#2576)

7 years agobpo-21624: IDLE -- minor htest fixes (#2575)
terryjreedy [Wed, 5 Jul 2017 02:41:12 +0000 (22:41 -0400)]
bpo-21624: IDLE -- minor htest fixes (#2575)

7 years agobpo-30777: IDLE: configdialog - add docstrings and improve comments (#2440)
csabella [Wed, 5 Jul 2017 01:30:58 +0000 (21:30 -0400)]
bpo-30777: IDLE: configdialog - add docstrings and improve comments (#2440)

Patch by Cheryl Sabella.

7 years agobpo-30319: socket.close() now ignores ECONNRESET (#2565)
Victor Stinner [Tue, 4 Jul 2017 14:20:06 +0000 (16:20 +0200)]
bpo-30319: socket.close() now ignores ECONNRESET (#2565)

socket.close() was modified in Python 3.6 to raise OSError on
failure: see bpo-26685.

7 years agobpo-30789: Use a single memory block for co_extra. (#2555)
Serhiy Storchaka [Tue, 4 Jul 2017 12:06:16 +0000 (15:06 +0300)]
bpo-30789: Use a single memory block for co_extra. (#2555)

* bpo-30789: Use a single memory block for co_extra.

* Address review comments.

7 years agobpo-30845: Enhance test_concurrent_futures cleanup (#2564)
Victor Stinner [Tue, 4 Jul 2017 11:14:04 +0000 (13:14 +0200)]
bpo-30845: Enhance test_concurrent_futures cleanup (#2564)

* bpo-30845: reap_children() now logs warnings

* bpo-30845: Enhance test_concurrent_futures cleanup

In setUp() and tearDown() methods of test_concurrent_futures tests,
make sure that tests don't leak threads nor processes. Clear
explicitly the reference to the executor to make it that it's
destroyed (to prevent "dangling threads" warning).

7 years agobpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480)
Antoine Pitrou [Tue, 4 Jul 2017 06:59:22 +0000 (08:59 +0200)]
bpo-29293: multiprocessing.Condition.notify() lacks parameter `n` (#2480)

* bpo-29293: multiprocessing.Condition.notify() lacks parameter `n`

* Add NEWS blurb

7 years agoRemove outdated FOX from GUI FAQ (GH-2538)
Berker Peksag [Tue, 4 Jul 2017 06:13:10 +0000 (09:13 +0300)]
Remove outdated FOX from GUI FAQ (GH-2538)

FXpy doesn't have a Python 3 port and it only
supports Python 2.2 and older versions.

Reported by Alex Walters on docs@p.o.

7 years agobpo-6691: Pyclbr now reports nested classes and functions. (#2503)
csabella [Tue, 4 Jul 2017 01:31:25 +0000 (21:31 -0400)]
bpo-6691: Pyclbr now reports nested classes and functions. (#2503)

 Original patch by Guilherme Polo.  Revisions by Cheryl Sabella.

7 years agobpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)
Serhiy Storchaka [Mon, 3 Jul 2017 18:20:15 +0000 (21:20 +0300)]
bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)

the bare METH_FASTCALL be used for functions with positional-only
parameters.

7 years agobpo-30832: Remove own implementation for thread-local storage (#2537)
Masayuki Yamamoto [Mon, 3 Jul 2017 11:34:38 +0000 (20:34 +0900)]
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

7 years agobpo-30764: Fix regrtest --fail-env-changed --forever (#2536)
Victor Stinner [Mon, 3 Jul 2017 09:15:58 +0000 (11:15 +0200)]
bpo-30764: Fix regrtest --fail-env-changed --forever (#2536)

--forever now stops if a fail changes the environment.

7 years agobpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (#2534)
Serhiy Storchaka [Sun, 2 Jul 2017 19:36:12 +0000 (22:36 +0300)]
bpo-30822: Deduplicate ZoneInfoTest classes in test_datetime. (#2534)

7 years agobpo-30822: Fix testing of datetime module. (#2530)
Utkarsh Upadhyay [Sun, 2 Jul 2017 12:46:04 +0000 (14:46 +0200)]
bpo-30822: Fix testing of datetime module. (#2530)

Only C implementation was tested.

7 years agobpo-30441: Fix bug when modifying os.environ while iterating over it (#2409)
Osvaldo Santana Neto [Sat, 1 Jul 2017 17:34:45 +0000 (14:34 -0300)]
bpo-30441: Fix bug when modifying os.environ while iterating over it (#2409)

7 years agobpo-30695: Add set_nomemory(start, stop) to _testcapi (GH-2406)
xdegaye [Sat, 1 Jul 2017 12:14:45 +0000 (14:14 +0200)]
bpo-30695: Add set_nomemory(start, stop) to _testcapi (GH-2406)

7 years agoAppVeyor: run tests with --fail-env-changed (#2522)
Victor Stinner [Fri, 30 Jun 2017 22:25:03 +0000 (00:25 +0200)]
AppVeyor: run tests with --fail-env-changed (#2522)

7 years agobpo-30804: fix macOS build with framework enabled. (#2516)
INADA Naoki [Fri, 30 Jun 2017 17:38:02 +0000 (02:38 +0900)]
bpo-30804: fix macOS build with framework enabled. (#2516)

7 years agobpo-30818: test_ftplib calls asyncore.close_all() (#2514)
Victor Stinner [Fri, 30 Jun 2017 15:36:57 +0000 (17:36 +0200)]
bpo-30818: test_ftplib calls asyncore.close_all() (#2514)

Always clear asyncore socket map using
asyncore.close_all(ignore_all=True) in tearDown() method.

This change should fix this warning:

Warning -- asyncore.socket_map was modified by test_ftplib
  Before: {}
  After:  {4: <test.test_ftplib.DummyTLS_FTPServer 127.0.0.1:0 at 0x805feccf0>}

7 years agotest_urllib2_localnet: clear server variable (#2510)
Victor Stinner [Fri, 30 Jun 2017 15:04:48 +0000 (17:04 +0200)]
test_urllib2_localnet: clear server variable (#2510)

Set the server attribute to None in cleanup to avoid dangling
threads.

7 years agobuildbot: pass --fail-env-changed to regrtest (#2509)
Victor Stinner [Fri, 30 Jun 2017 14:44:08 +0000 (16:44 +0200)]
buildbot: pass --fail-env-changed to regrtest (#2509)

Make tests fail if a test altered the environment.

7 years agobpo-30812: Fix test_warnings, restore _showwarnmsg (#2504)
Victor Stinner [Fri, 30 Jun 2017 10:58:46 +0000 (12:58 +0200)]
bpo-30812: Fix test_warnings, restore _showwarnmsg (#2504)

bpo-26568, bpo-30812: Fix test_showwarnmsg_missing(): restore the
attribute after removing it.

7 years agobpo-30813: Fix unittest when hunting refleaks (#2502)
Victor Stinner [Fri, 30 Jun 2017 10:52:52 +0000 (12:52 +0200)]
bpo-30813: Fix unittest when hunting refleaks (#2502)

bpo-11798, bpo-16662, bpo-16935, bpo-30813: Skip
test_discover_with_module_that_raises_SkipTest_on_import() and
test_discover_with_init_module_that_raises_SkipTest_on_import() of
test_unittest when hunting reference leaks using regrtest.

7 years agobpo-30280: Cleanup threads in ayncio tests (#2501)
Victor Stinner [Fri, 30 Jun 2017 09:12:33 +0000 (11:12 +0200)]
bpo-30280: Cleanup threads in ayncio tests (#2501)

* bpo-30280: asyncio now cleans up threads

asyncio base TestCase now uses threading_setup() and
threading_cleanup() of test.support to cleanup threads.

* asyncio: Fix TestBaseSelectorEventLoop cleanup

bpo-30280: TestBaseSelectorEventLoop of
test.test_asyncio.test_selector_events now correctly closes the event
loop: cleanup its executor to not leak threads.

Don't override the close() method of the event loop, only override
the_close_self_pipe() method.

7 years agothreading_cleanup() failure marks test as ENV_CHANGED (#2500)
Victor Stinner [Fri, 30 Jun 2017 08:59:52 +0000 (10:59 +0200)]
threading_cleanup() failure marks test as ENV_CHANGED (#2500)

If threading_cleanup() fails to cleanup threads, set a a new
support.environment_altered flag to true, flag uses by save_env which
is used by regrtest to check if a test altered the environment. At
the end, the test file fails with ENV_CHANGED instead of SUCCESS, to
report that it altered the environment.

7 years agobpo-30807: signal.setitimer() may disable the timer by mistake (#2493)
Antoine Pitrou [Fri, 30 Jun 2017 08:01:05 +0000 (10:01 +0200)]
bpo-30807: signal.setitimer() may disable the timer by mistake (#2493)

* bpo-30807: signal.setitimer() may disable the timer by mistake

* Add NEWS blurb

7 years agobpo-30495: IDLE: improve textview with docstrings, PEP8 names, more tests. (#2283)
csabella [Thu, 29 Jun 2017 22:42:17 +0000 (18:42 -0400)]
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.

7 years agobpo-30647: Check nl_langinfo(CODESET) in locale coercion (GH-2374)
Nick Coghlan [Thu, 29 Jun 2017 14:48:14 +0000 (00:48 +1000)]
bpo-30647: Check nl_langinfo(CODESET) in locale coercion (GH-2374)

- On some versions of FreeBSD, setting the "UTF-8" locale
  succeeds, but a subsequent "nl_langinfo(CODESET)" fails
- adding a check for this in the coercion logic means that
  coercion will happen on systems where this check succeeds,
  and will be skipped otherwise
- that way CPython should automatically adapt to changes in
  platform behaviour, rather than needing a new release to
  enable coercion at build time
- this also allows UTF-8 to be re-enabled as a coercion
  target, restoring the locale coercion behaviour on Mac OS X

7 years agobpo-30796: Fix failures in signal delivery stress test (#2488)
Antoine Pitrou [Thu, 29 Jun 2017 14:40:14 +0000 (16:40 +0200)]
bpo-30796: Fix failures in signal delivery stress test (#2488)

* bpo-30796: Fix failures in signal delivery stress test

setitimer() can have a poor minimum resolution on some machines,
this would make the test reach its deadline (and a stray signal
could then kill a subsequent test).

* Make sure to clear the itimer after the test