Commit Graph

99675 Commits

Author SHA1 Message Date
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
Terry Jan Reedy 5d0f30aae5 bpo-30853: IDLE - touch-up configdialog.VarTrace and tests. (#2936)
Add clear method for tests.  Adjust tests to use global instance.
Remove unneeded ConfigDialog method.
2017-07-28 17:00:02 -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
Yuval Langer 6fcb69dad5 Fix trivial typo in multiprocessing documentation (GH-2930) 2017-07-28 10:39:35 -07:00
Victor Stinner 28ce07ae9e bpo-31066: Fix test_httpservers.test_last_modified() (#2933)
Write the temporary file on disk and then get its modification time.
2017-07-28 18:15:02 +02:00
Victor Stinner cc42c121eb bpo-31067: test_subprocess calls reap_children() (#2931)
test_subprocess now also calls reap_children() in tearDown(), not
only on setUp().
2017-07-28 18:00:22 +02:00
Utkarsh Upadhyay 8e45318b0d bpo-30302: Update WhatsNew and documentation. (#2929)
* Update 'Porting to .37' section.

* Fix a minor example in the doc.
2017-07-28 14:42:56 +02:00
INADA Naoki ba9ddb7eea bpo-29585: fix test fail on macOS Framework build (GH-2928) 2017-07-28 21:28:19 +09:00
Ned Deily c22bd58d93 bpo-28095: Re-enable temporarily disabled part of test_startup_imports on macOS (#2927)
The changes for bpo-29585 eliminate the extra imports on macOS that caused
the original test failure.

This reverts commit 8a2150aae6.
2017-07-28 03:02:10 -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
Victor Stinner 12953ffe12 bpo-31044: Skip test_posix.test_makedev() on FreeBSD (#2915)
There is a bug in FreeBSD CURRENT with 64-bit dev_t. Skip the test if
dev_t is larger than 32-bit, until the bug is fixed in FreeBSD
CURRENT.
2017-07-27 16:55:54 +02:00
Serhiy Storchaka d5ed47dea2 bpo-30814, bpo-30876: Add new import test files to projects. (#2851) 2017-07-27 12:24:36 +03:00
Victor Stinner fd46561167 bpo-31028: Fix test_pydoc when run directly (#2864)
* bpo-31028: Fix test_pydoc when run directly

Fix get_pydoc_link() of test_pydoc to fix "./python
Lib/test/test_pydoc.py": get the absolute path to __file__ to prevent
relative directories.

* Use realpath() instead of abspath()
2017-07-27 11:21:26 +02:00
Segev Finer a80e985c49 bpo-9566: Change HANDLE argument parsing to unsigned in msvcrtmodule.c (#2904) 2017-07-26 20:15:18 -07: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
csabella 45bf723c6c bpo-30853: IDLE: Factor a VarTrace class from configdialog.ConfigDialog. (#2872)
The new class manages pairs of tk Variables and trace callbacks.
It is completely covered by new tests.
2017-07-26 19:09:58 -04:00
Segev Finer 5cff637979 bpo-9566: Fixed _ssl module warnings (#2495)
* bpo-9566: Fixed some _ssl warnings

* bpo-9566: _ssl: Fixup the fixes and also fix the remainings warnings

* Add a comment about the downcast
2017-07-26 15:19:17 -07:00
Segev Finer 679b566622 bpo-9566: Fix some Windows x64 compiler warnings (#2492)
* bpo-9566: Silence liblzma warnings

* bpo-9566: Silence tcl warnings

* bpo-9566: Silence tk warnings

* bpo-9566: Silence tix warnings

* bpo-9566: Fix some library warnings

* bpo-9566: Fix msvcrtmodule.c warnings

* bpo-9566: Silence _bz2 warnings

* bpo-9566: Fixed some _ssl warnings

* bpo-9566: Fix _msi warnings

* bpo-9566: Silence _ctypes warnings

* Revert "bpo-9566: Fixed some _ssl warnings"

This reverts commit a639001c94.

* bpo-9566: Also consider NULL as a possible error in HANDLE_return_converter

* bpo-9566: whitespace fixes
2017-07-26 15:17:57 -07:00
Steve Dower f0851910eb Fix build batch files (#2750)
* Enable building MSI, zip and nuget packages when Py_OutDir is set.

* Restore the --build option, which got reverted at some point.

* Ensure output directory is created.

* Enables BuildForDaily and DailyBuildVersion options for nuget package.
2017-07-26 09:09:01 -07:00
Segev Finer e7bc7aac3d bpo-9566: Fix a warning in Python/getargs.c (#2890) 2017-07-26 08:58:25 -07:00
INADA Naoki 067931dd95 bpo-30188: fix TypeError in test_nntplib (GH-2892)
fixes regression of 5b4feb7
2017-07-26 23:43:22 +09:00
Utkarsh Upadhyay ede9084476 bpo-31043: fixed test_datetime run twice. (GH-2891) 2017-07-26 19:46:17 +09:00
Victor Stinner 2db64823c2 bpo-31019: Fix multiprocessing.Process.is_alive() (#2875)
multiprocessing.Process.is_alive() now removes the process from the
_children set if the process completed.

The change prevents leaking "dangling" processes.
2017-07-26 02:32:42 +02:00
lf 627d2c8e8d Add the link to asyncio source code in the docs (GH-2373) 2017-07-25 16:03:51 -07:00
Utkarsh Upadhyay cc5a65cd90 bpo-30302 Make timedelta.__repr__ more informative. (#1493) 2017-07-25 23:51:33 +02:00
Victor Stinner 830080913c bpo-31034: Reliable signal handler for test_asyncio (#2867)
* bpo-31034: Reliable signal handler for test_asyncio

Don't rely on the current SIGHUP signal handler, make sure that it's
set to the "default" signal handler: SIG_DFL.

* Add comments
2017-07-25 19:19:09 +02:00
Victor Stinner 302bbbe9ba bpo-31009: Fix support.fd_count() on Windows (#2862)
* bpo-31009: Fix support.fd_count() on Windows

On Windows, test.support.fd_count() now calls
msvcrt.CrtSetReportMode() to not kill the process nor log any error
on stderr on os.dup(fd) if the file descriptor is invalid.

* Fix for release mode
2017-07-25 17:45:53 +02:00
Stéphane Wirtel 90addd6d1c bpo-31029: test_tokenize Add missing import unittest (#2865) 2017-07-25 16:33:53 +03:00
Stéphane Wirtel ccfdb60af7 Fix a small typo in a comment (#2863) 2017-07-25 14:32:08 +02:00
Segev Finer 39243779f4 bpo-31018: Switch to #pragma pack from __declspec(align) (#2848) 2017-07-25 10:47:43 +02:00
Victor Stinner b4c52966c8 bpo-26762: test_multiprocessing close more queues (#2855)
* Close explicitly queues to make sure that we don't leave dangling
  threads
* test_queue_in_process(): remove unused queue
* test_access() joins also the process to fix a random warning
2017-07-25 02:40:55 +02:00
Victor Stinner ffb49408f0 test_multiprocessing detects dangling per test case (#2841)
bpo-26762: test_multiprocessing now detects dangling processes and
threads per test case classes:

* setUpClass()/tearDownClass() of mixin classes now check if
  multiprocessing.process._dangling or threading._dangling was
  modified to detect "dangling" processses and threads.
* ManagerMixin.tearDownClass() now also emits a warning if it still
  has more than one active child process after 5 seconds.
* tearDownModule() now checks for dangling processes and threads
  before sleep 500 ms. And it now only sleeps if there is a least one
  dangling process or thread.
2017-07-25 01:55:54 +02:00
Victor Stinner d7e64d9934 test_multiprocessing: Fix dangling process/thread (#2850)
bpo-26762: Fix more dangling processes and threads in
test_multiprocessing:

* Queue: call close() followed by join_thread()
* Process: call join() or self.addCleanup(p.join)
2017-07-25 00:33:56 +02:00
waxmoon d439d3e291 Minor typo in curses.rst (#2763)
I found a tiny typo in the curses how-to: changed 'Thy' to 'The' on line 68.
2017-07-24 18:03:07 -04:00
Nir Soffer c648a93ae3 bpo-30980: Fix double close in asyncore.file_wrapper (#2789)
* bpo-30980: Fix close test to fail

test_close_twice was not considering the fact that file_wrapper is
duping the file descriptor. Closing the original descriptor left the
duped one open, hiding the fact that close protection is not effective.

* bpo-30980: Fix double close protection

Invalidated self.fd before closing, handling correctly the case when
os.close raises.

* bpo-30980: Fix fd leak introduced in the fixed test
2017-07-24 23:18:06 +02:00
Victor Stinner 5b4feb7e86 bpo-30188: test_nntplib catch also ssl.SSLEOFError (#2843)
Catch also ssl.SSLEOFError in NetworkedNNTPTests setUpClass().
EOFError was already catched.
2017-07-24 17:41:02 +02:00
Victor Stinner 06634950c5 bpo-26762: Avoid daemon process in _test_multiprocessing (#2842)
test_level() of _test_multiprocessing._TestLogging now uses regular
processes rather than daemon processes to prevent zombi processes
(to not "leak" processes).
2017-07-24 13:02:20 +02:00
Ned Deily b364d9f9c6 More Mac installer fixes for git-based workflow (#2839) 2017-07-24 04:58:43 -04: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
Eli Boyarski 26248ef58d bpo-30456: Clarify example for duplicates in second argument of isinstance (GH-1699) 2017-07-24 03:39:07 +03:00
Ned Deily 4c7532e96d Mac installer build now needs venv for docs build (#2828) 2017-07-23 16:39:54 -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
Terry Jan Reedy 616ecf18f3 bpo-30981: IDLE: Augment one configdialog font page test (#2810)
Remove broken test of bold_toggle and test it along with its command, set_samples.
This has been incorporated into 3.6 backport PR-2796.
2017-07-22 00:36:13 -04:00
Antoine Pitrou ff92ff5366 Fix test failure without ctypes (#2802) 2017-07-21 13:24:05 +02:00
Victor Stinner e72b1359f8 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.
2017-07-21 13:00:46 +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 7c5798ebfa bpo-30981: temporarity skip failing IDLE test class (#2798) 2017-07-21 03:47:01 -04:00