Commit Graph

35362 Commits

Author SHA1 Message Date
Zachary Ware d8b129f279 Closes #21151: Merge with 3.4 2014-07-03 11:03:46 -05:00
Zachary Ware ad4690fcca Issue #21151: Fixed a segfault in the winreg module.
When ``None`` was passed as a ``REG_BINARY`` value to SetValueEx,
PyMem_DEL was called on an uninitialized buffer.  Patch by John Ehresman.

(Also an incidental typo fix in a comment in test_winreg)
2014-07-03 10:58:06 -05:00
Berker Peksag f7eaa0c63c Issue #21755: Skip {Frozen,Source}_DeadlockAvoidanceTests tests when
Python is built without threads.
2014-07-03 06:25:10 +03:00
Raymond Hettinger 748ff8bfd1 merge 2014-07-03 00:31:54 +01:00
Raymond Hettinger 11cda47661 Fix guidance for subclassing collections.Set() 2014-07-03 00:31:30 +01:00
Victor Stinner b57d6a2fec (Merge 3.4) asyncio: sync with Tulip
* _UnixSubprocessTransport: fix file mode of stdin. Open stdin in write mode,
  not in read mode
* Examples: close the event loop at exit
* More reliable CoroWrapper.__del__. If the constructor is interrupted by
  KeyboardInterrupt or the coroutine objet is destroyed lately, some the
  _source_traceback attribute doesn't exist anymore.
* repr(Task): include also the future the task is waiting for
2014-07-03 00:59:28 +02:00
Victor Stinner 2dba23af71 asyncio: sync with Tulip
* _UnixSubprocessTransport: fix file mode of stdin. Open stdin in write mode,
  not in read mode
* Examples: close the event loop at exit
* More reliable CoroWrapper.__del__. If the constructor is interrupted by
  KeyboardInterrupt or the coroutine objet is destroyed lately, some the
  _source_traceback attribute doesn't exist anymore.
* repr(Task): include also the future the task is waiting for
2014-07-03 00:59:00 +02:00
Jason R. Coombs 7c45632f6d Normalize style per PEP-8 2014-07-02 08:36:19 -04:00
Berker Peksag 3e887222aa Issue #5800: headers parameter of wsgiref.headers.Headers is now optional.
Patch by Pablo Torres Navarrete and SilentGhost.
2014-07-02 08:37:22 +03:00
Terry Jan Reedy 5e456973a5 Merge with 3.4 2014-07-01 21:33:46 -04:00
Terry Jan Reedy 092b3cf671 More idlelib cleanup inspired by pyflakes. 2014-07-01 21:33:31 -04:00
Zachary Ware 509dab9ef6 Issue #18258: Fix test discovery for test_codecmaps_*. 2014-07-01 20:06:19 -05:00
Zachary Ware d9de794c23 Issue #18258: Fix test discovery for test_codecmaps_*. 2014-07-01 19:55:04 -05:00
Terry Jan Reedy 062bc1de19 Merge with 3.4 2014-07-01 18:52:53 -04:00
Terry Jan Reedy 44f09ebd0f Delete a few unused names suggested by pyflakes. 2014-07-01 18:52:37 -04:00
Victor Stinner 6a75bb0d83 (Merge 3.4) asyncio: Fix test_sleep_cancel(): call_later() mock has no self parameter 2014-07-01 12:39:26 +02:00
Victor Stinner 1690ed397a asyncio: Fix test_sleep_cancel(): call_later() mock has no self parameter 2014-07-01 12:38:51 +02:00
Terry Jan Reedy 3c8ae8447e Merge with 3.4 2014-06-30 23:52:32 -04:00
Terry Jan Reedy 8cefd08943 Issue #18592: Refactor 2 SearchDialogBase.create_(option/other)_buttons methods
to remove duplication and return info for tests.  Rewrite corresponding tests.
Test_create_option_buttons was not testing anything because of buggy
comparisons.  Use Python subscripting to get widget options.
2014-06-30 23:52:20 -04:00
Terry Jan Reedy 2e9e6c7644 Merge with 3.4 2014-06-30 20:00:16 -04:00
Terry Jan Reedy 525168bd74 Issue #18592: Add unittests for SearchDialogBase. Patch by Phil Webster. 2014-06-30 20:00:03 -04:00
Terry Jan Reedy c26c51a96e Merge with 3.4 2014-06-30 16:09:44 -04:00
Terry Jan Reedy f5ac57dc05 Issue #21882: In turtle demos, remove module scope gui and sys calls by
either deleting or moving to the module's main function.
2014-06-30 16:09:24 -04:00
Victor Stinner b1f9ed75bd (Merge 3.4) Issue #21163: BaseEventLoop.run_until_complete() and
test_utils.run_briefly() don't log the "destroy pending task" message anymore.
The log is redundant for run_until_complete() and useless in run_briefly().
2014-06-30 14:51:24 +02:00
Victor Stinner 98b6391fd4 Issue #21163: BaseEventLoop.run_until_complete() and test_utils.run_briefly()
don't log the "destroy pending task" message anymore. The log is redundant for
run_until_complete() and useless in run_briefly().
2014-06-30 14:51:04 +02:00
Victor Stinner 91dd20ba60 asyncio: sync with Tulip
- Sort imports
- Simplify/optimize iscoroutine(). Inline inspect.isgenerator(obj): replace it
  with isinstance(obj, types.GeneratorType)
- CoroWrapper: check at runtime if Python has the yield-from bug #21209.  If
  Python has the bug, check if CoroWrapper.send() was called by yield-from to
  decide if parameters must be unpacked or not.
- Fix "Task was destroyed but it is pending!" warning in
  test_task_source_traceback()
2014-06-30 14:39:47 +02:00
Victor Stinner b75380f333 asyncio: sync with Tulip
- Sort imports
- Simplify/optimize iscoroutine(). Inline inspect.isgenerator(obj): replace it
  with isinstance(obj, types.GeneratorType)
- CoroWrapper: check at runtime if Python has the yield-from bug #21209.  If
  Python has the bug, check if CoroWrapper.send() was called by yield-from to
  decide if parameters must be unpacked or not.
- Fix "Task was destroyed but it is pending!" warning in
  test_task_source_traceback()
2014-06-30 14:39:11 +02:00
Victor Stinner 9dd826b30b Issue #21645: asyncio: add a watchdog in test_read_all_from_pipe_reader() for
debug
2014-06-30 12:32:59 +02:00
Berker Peksag 977c8a354c Issue #14235: Merge from 3.4. 2014-06-30 04:05:54 +03:00
Berker Peksag 67ef591045 Issue #14235: Use importlib.reload() in test_cmd.test_coverage. 2014-06-30 04:04:52 +03:00
Antoine Pitrou de68722ca0 Issue #21679: Prevent extraneous fstat() calls during open(). Patch by Bohuslav Kabrda. 2014-06-29 20:07:28 -04:00
Alexander Belopolsky f026dae130 Fixes #10541: regrtest -T is broken
* makes test_trace tests restore the tracefunc after they run
 * write_results() in trace module will not terminate if lnotab
   cannot be found.
2014-06-29 17:44:05 -04:00
Berker Peksag 15c6ed5239 Issue #20753: Merge with 3.4. 2014-06-29 15:56:21 +03:00
Berker Peksag ad324f6bcc Issue #20753: Skip PasswordProtectedSiteTestCase when Python is built without threads. 2014-06-29 15:54:56 +03:00
Victor Stinner 6cdcf0d5ed (Merge 3.4) asyncio: sync with Tulip, add a new asyncio.coroutines module 2014-06-29 00:47:28 +02:00
Victor Stinner f951d28ac8 asyncio: sync with Tulip, add a new asyncio.coroutines module 2014-06-29 00:46:45 +02:00
Jesus Cea 41c8da95f4 MERGE: Closes #11279: test_posix and lack of "id -G" support - less noise required? (Solaris) 2014-06-28 18:39:51 +02:00
Jesus Cea 61f32cb5b8 Closes #11279: test_posix and lack of "id -G" support - less noise required? (Solaris) 2014-06-28 18:39:35 +02:00
Antoine Pitrou 8477f7af13 Issue #21863: cProfile now displays the module name of C extension functions, in addition to their own name. 2014-06-27 23:49:29 -04:00
Victor Stinner 0882e27e2a (Merge 3.4) asyncio: Fix two "Coroutine xxx was never yielded from" messages in
tests
2014-06-28 01:19:28 +02:00
Victor Stinner 09e7590801 asyncio: Fix two "Coroutine xxx was never yielded from" messages in tests 2014-06-28 01:19:11 +02:00
Victor Stinner 875dbedd28 (Merge 3.4) asyncio: Fix unit tests on Windows, escape filenames in regex 2014-06-28 00:14:28 +02:00
Victor Stinner b9a301a348 asyncio: Fix unit tests on Windows, escape filenames in regex 2014-06-28 00:12:02 +02:00
Victor Stinner a81088ae12 (Merge 3.4) Issue #11453: asyncore: emit a ResourceWarning when an unclosed
file_wrapper object is destroyed. The destructor now closes the file if needed.
The close() method can now be called twice: the second call does nothing.
2014-06-27 23:57:19 +02:00
Victor Stinner 4d4c69dc35 Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper
object is destroyed. The destructor now closes the file if needed. The close()
method can now be called twice: the second call does nothing.
2014-06-27 23:52:03 +02:00
Victor Stinner c3bc856f42 (Merge 3.4) Closes #21582: Cleanup test_asyncore. Patch written by diana.
- Use support.captured_stderr() where appropriate
- Removes some "from test.support import xxx" import and uses support.xxx
  instead.
2014-06-27 22:47:41 +02:00
Victor Stinner 252d40ef1e Closes #21582: Cleanup test_asyncore. Patch written by diana.
- Use support.captured_stderr() where appropriate
- Removes some "from test.support import xxx" import and uses support.xxx
  instead.
2014-06-27 22:44:40 +02:00
Victor Stinner eb39199f3d (Merge 3.4) asyncio, Tulip issue 137: In debug mode, save traceback where
Future, Task and Handle objects are created. Pass the traceback to
call_exception_handler() in the 'source_traceback' key.

The traceback is truncated to hide internal calls in asyncio, show only the
traceback from user code.

Add tests for the new source_traceback, and a test for the 'Future/Task
exception was never retrieved' log.
2014-06-27 13:55:28 +02:00
Victor Stinner 80f53aa9a0 asyncio, Tulip issue 137: In debug mode, save traceback where Future, Task and
Handle objects are created. Pass the traceback to call_exception_handler() in
the 'source_traceback' key.

The traceback is truncated to hide internal calls in asyncio, show only the
traceback from user code.

Add tests for the new source_traceback, and a test for the 'Future/Task
exception was never retrieved' log.
2014-06-27 13:52:20 +02:00
Victor Stinner fe4a979099 (Merge 3.4) asyncio, Tulip issue 137: In debug mode, add the traceback where
the coroutine object was created to the "coroutine ... was never yield from"
log
2014-06-27 12:29:30 +02:00
Victor Stinner bbd96c6f47 asyncio, Tulip issue 137: In debug mode, add the traceback where the coroutine
object was created to the "coroutine ... was never yield from" log
2014-06-27 12:28:41 +02:00
Victor Stinner 19b011109d (Merge 3.4) asyncio: Oops, restore a removed test 2014-06-27 12:24:14 +02:00
Victor Stinner c4cca45baf asyncio: Oops, restore a removed test 2014-06-27 12:23:41 +02:00
Ned Deily ddb1d82fe6 Issue #21875: Remove vestigial references to Classic Mac OS in os module docs. 2014-06-26 23:42:38 -07:00
Ned Deily 5c867018f0 Issue #21875: Remove vestigial references to Classic Mac OS in os module docs. 2014-06-26 23:40:06 -07:00
Zachary Ware c59a49ddda Issue #21829: Merge with 3.4 2014-06-26 15:22:16 -05:00
Zachary Ware 7180c793c4 Issue #21829: Fix running test_ctypes on Windows with -O or -OO 2014-06-26 15:20:44 -05:00
R David Murray 0c43ed8716 Merge #21476: Unwrap fp in BytesParser so the file isn't unexpectedly closed. 2014-06-26 13:33:05 -04:00
R David Murray c6772c4d59 #21476: Unwrap fp in BytesParser so the file isn't unexpectedly closed.
This makes the behavior match that of Parser.  Patch by Vajrasky Kok.
2014-06-26 13:31:43 -04:00
R David Murray 2f60820f4c #20295: Teach imghdr to recognize OpenEXR format images.
Patch by Martin Vignali, test by Claudiu Popa.
2014-06-26 12:27:57 -04:00
Terry Jan Reedy d6dd534924 Merge with 3.4 2014-06-26 01:41:06 -04:00
Terry Jan Reedy ede05736cf Issue #18592: For idlelib.SearchDialogBase, edit and add docstrings,
move two functions next to the functions that use them.
2014-06-26 01:40:51 -04:00
Victor Stinner 67825605c8 (Merge 3.4) asyncio: Handle error handler: enhance formatting of the callback 2014-06-26 01:36:47 +02:00
Victor Stinner 17b53f1301 asyncio: Handle error handler: enhance formatting of the callback 2014-06-26 01:35:45 +02:00
Victor Stinner f5434f73d7 (Merge 3.4) Issue #21163: Fix one more "Task was destroyed but it is pending!"
log in tests
2014-06-25 23:59:31 +02:00
Victor Stinner 72502c12a7 Issue #21163: Fix one more "Task was destroyed but it is pending!" log in tests 2014-06-25 23:57:50 +02:00
Victor Stinner 86ceffc3ef (Merge 3.4) asyncio: sync with Tulip
- Python issue 21163: Fix more "Task was destroyed but it is pending!" logs in
  tests
- Add test to check that run_until_complete() checks the loop of the future
2014-06-25 23:33:02 +02:00
Victor Stinner 7ba4061098 asyncio: sync with Tulip
- Python issue 21163: Fix more "Task was destroyed but it is pending!" logs in
  tests
- Add test to check that run_until_complete() checks the loop of the future
2014-06-25 23:32:25 +02:00
Victor Stinner 16b3c99141 (Merge 3.4) Issue #21163, asyncio: Fix some "Task was destroyed but it is
pending!" logs in tests
2014-06-25 23:12:58 +02:00
Victor Stinner 87f16f892c Issue #21163, asyncio: Fix some "Task was destroyed but it is pending!" logs in tests 2014-06-25 23:11:21 +02:00
Ned Deily ce38f24af8 Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite. 2014-06-25 13:42:22 -07:00
Ned Deily 04cdfa1147 Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite. 2014-06-25 13:36:14 -07:00
Victor Stinner 893df48682 (Merge 3.4) asyncio, Tulip issue 177: Rewite repr() of Future, Task, Handle and
TimerHandle

- Uniformize repr() output to format "<Class ...>"
- On Python 3.5+, repr(Task) uses the qualified name instead of the short name
  of the coroutine
2014-06-25 21:43:21 +02:00
Victor Stinner 975735f729 asyncio, Tulip issue 177: Rewite repr() of Future, Task, Handle and TimerHandle
- Uniformize repr() output to format "<Class ...>"
- On Python 3.5+, repr(Task) uses the qualified name instead of the short name
  of the coroutine
2014-06-25 21:41:58 +02:00
Serhiy Storchaka e5243cc713 Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
files closing.  Patch by Claudiu Popa.
2014-06-25 20:37:30 +03:00
Serhiy Storchaka 65c623de74 Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
files closing.  Patch by Claudiu Popa.
2014-06-25 20:35:31 +03:00
Senthil Kumaran fc0cad86c7 merge from 3.4
issue20753 - robotparser tests should not rely upon external resource when not required.

Specifically, it was relying a URL which gave HTTP 403 and used it to assert
it's methods, this changes undoes that and provides a local http server with
similar properties.

Patch contributed by Vajrasky Kok.
2014-06-25 02:58:53 -07:00
Senthil Kumaran 601d6ec693 issue20753 - robotparser tests should not rely upon external resource when not required.
Specifically, it was relying a URL which gave HTTP 403 and used it to assert
it's methods, this changes undoes that and provides a local http server with
similar properties.

Patch contributed by Vajrasky Kok.
2014-06-25 02:58:15 -07:00
Senthil Kumaran b057970f0d merge from 3.4
issue15588 - Correct the quopri module documentation. Mention the correct types
of the parameters on encodestring and decodestring.

Patch by Petri Lehtinen.
2014-06-25 01:13:19 -07:00
Senthil Kumaran 99597c4d12 Correct the quopri module documentation. Mention the correct types of the
parameters on encodestring and decodestring.

Patch by Petri Lehtinen.
2014-06-25 01:12:03 -07:00
Raymond Hettinger ee205dc7d8 merge 2014-06-24 21:39:27 -07:00
Raymond Hettinger 97d3555029 Issue #19145: Fix handling of negative values for a "times" keyword argument to itertools.repeat()>
(Patch contributed by Vajrasky Kok.)
2014-06-24 21:36:58 -07:00
Terry Jan Reedy 5827da3f9f Merge with 3.4 2014-06-24 22:21:56 -04:00
Terry Jan Reedy c5a72e6971 Issue #14117: Inprove help text and docstrings, some for clarity, some just to
fit in the default width of the text window (45 chars).
2014-06-24 22:21:41 -04:00
Raymond Hettinger f2bbb651a8 merge 2014-06-24 15:21:24 -07:00
Raymond Hettinger bc000509e8 Issue 21832: Require named tuple inputs to be exact strings 2014-06-24 15:20:55 -07:00
Victor Stinner 5c2f5ab465 (Merge 3.4) asyncio: repr(Task) now also contains the line number even if the
coroutine is done: use the first line number of the code object instead of the
current line number of the generator frame.

The name of the coroutine is not enough because many coroutines may have the
same name. It's a common case in asyncio tests for example.
2014-06-24 22:58:23 +02:00
Victor Stinner df29c4a83d asyncio: repr(Task) now also contains the line number even if the coroutine is
done: use the first line number of the code object instead of the current line
number of the generator frame.

The name of the coroutine is not enough because many coroutines may have the
same name. It's a common case in asyncio tests for example.
2014-06-24 22:57:14 +02:00
R David Murray 24a3c72638 merge: #20155: use fake HTTP method names so windows doesn't hang the tests. 2014-06-24 16:49:04 -04:00
R David Murray 14199f9392 #20155: use fake HTTP method names so windows doesn't hang the tests.
Windows was seeing the 'GET' generated by these tests as invalid and forcibly
closing the socket, causing the test to fail.

Patch by Jeff Allen.
2014-06-24 16:39:49 -04:00
Victor Stinner 777aa64eaa (Merge 3.4) asyncio: Log an error if a Task is destroyed while it is still pending 2014-06-24 22:38:31 +02:00
Victor Stinner a02f81ff17 asyncio: Log an error if a Task is destroyed while it is still pending 2014-06-24 22:37:53 +02:00
Yury Selivanov 42407abe24 inspect: Validate that __signature__ is None or an instance of Signature.
Closes #21801.
2014-06-23 10:23:50 -07:00
Yury Selivanov c0f964fd55 inspect: Validate that __signature__ is None or an instance of Signature.
Closes #21801.
2014-06-23 10:21:04 -07:00
Victor Stinner 289cae4f92 (Merge 3.4) asyncio: Fix BaseEventLoop._assert_is_current_event_loop():
get_event_loop() raises an exception if there is no current loop
2014-06-23 15:14:50 +02:00
Victor Stinner 751c7c0f2d asyncio: Fix BaseEventLoop._assert_is_current_event_loop(): get_event_loop()
raises an exception if there is no current loop
2014-06-23 15:14:13 +02:00
Raymond Hettinger ef85df168a merge 2014-06-22 19:47:55 -07:00
Raymond Hettinger 1c99bc84bd Issue #8343: Named group error msgs did not show the group name. 2014-06-22 19:47:22 -07:00
Victor Stinner 425aaa11d8 (Merge 3.4) asyncio, Tulip issue 171: BaseEventLoop.close() now raises an
exception if the event loop is running. You must first stop the event loop and
then wait until it stopped, before closing it.
2014-06-23 01:03:13 +02:00
Victor Stinner f328c7dc69 asyncio, Tulip issue 171: BaseEventLoop.close() now raises an exception if the
event loop is running. You must first stop the event loop and then wait until
it stopped, before closing it.
2014-06-23 01:02:37 +02:00
Victor Stinner 1217ab0e0f (Merge 3.4) asyncio, Tulip issue 172: only log selector timing in debug mode 2014-06-23 00:31:31 +02:00
Victor Stinner 1580fe3fce asyncio, Tulip issue 172: only log selector timing in debug mode 2014-06-23 00:31:08 +02:00
Victor Stinner dc8b54cdf2 (Merge 3.4) asyncio: Add an unit test to check that setting the
PYTHONASYNCIODEBUG env var enables debug mode of the event loop.
2014-06-23 00:21:09 +02:00
Victor Stinner c082ee692b asyncio: Add an unit test to check that setting the PYTHONASYNCIODEBUG env var
enables debug mode of the event loop.
2014-06-23 00:19:33 +02:00
Victor Stinner d42b49256f (Merge 3.4) asyncio: Enable the debug mode of event loops when the
PYTHONASYNCIODEBUG environment variable is set
2014-06-23 00:14:45 +02:00
Victor Stinner 7b7120e159 asyncio: Enable the debug mode of event loops when the PYTHONASYNCIODEBUG
environment variable is set
2014-06-23 00:12:14 +02:00
Victor Stinner 33d2e40d88 (Merge 3.4) asyncio: BaseEventLoop._assert_is_current_event_loop() now only
raises an exception if the current loop is not None.

Guido van Rossum wrote:

"The behavior that you can set the loop to None (and keep track of it
explicitly) is part of the spec, and this should still be supported even in
debug mode. The behavior that we raise an error if you are caught having
multiple active loops per thread is just a debugging heuristic, and it
shouldn't break code that follows the spec."
2014-06-23 00:04:00 +02:00
Victor Stinner d6de5d8455 asyncio: BaseEventLoop._assert_is_current_event_loop() now only raises an
exception if the current loop is not None.

Guido van Rossum wrote:

"The behavior that you can set the loop to None (and keep track of it
explicitly) is part of the spec, and this should still be supported even in
debug mode. The behavior that we raise an error if you are caught having
multiple active loops per thread is just a debugging heuristic, and it
shouldn't break code that follows the spec."
2014-06-23 00:03:43 +02:00
Benjamin Peterson a96fea03e8 add BufferedIOBase.readinto1 (closes #20578)
Patch by Nikolaus Rath.
2014-06-22 14:17:44 -07:00
Giampaolo Rodola' bc8197a287 merge heads 2014-06-22 12:44:05 +02:00
Giampaolo Rodola' 4f2eb81280 #6916: attempt to fix BB failure 2014-06-22 12:43:19 +02:00
Raymond Hettinger 47d1e2858e merge 2014-06-22 01:23:55 -07:00
Raymond Hettinger 6dec4eae53 Issue #21812: Trigger immediate transformation in turtle.shapetransform(). 2014-06-22 01:21:51 -07:00
Terry Jan Reedy 29ed8eec68 Merge with 3.4 2014-06-22 01:20:52 -04:00
Terry Jan Reedy f51531e257 Issue #21823: Catch turtle.Terminator exceptions in turtledemo.
Add note to demohelp.txt about doing so.
2014-06-22 01:18:54 -04:00
Raymond Hettinger bb91c1d019 Issue 21786: Clean-up test_pydoc taking taking advantage of diffing in unittest. 2014-06-21 12:08:22 -07:00
Raymond Hettinger 986efa074e merge 2014-06-21 11:59:46 -07:00
Raymond Hettinger fabefc3c5b Issue 21635: Fix caching in difflib.SequenceMatcher.get_matching_blocks(). 2014-06-21 11:57:36 -07:00
Giampaolo Rodola' 47177861dd merge heads 2014-06-21 13:59:25 +02:00
Giampaolo Rodola' bd0487694c #6916: raise a deprecation warning if using asynchat.fifo 2014-06-21 13:58:30 +02:00
Charles-François Natali ca7e5d3e1d Fix test_pydoc failure introduced by cddb17c4975e. Patch by Berker Peksag. 2014-06-20 23:00:22 +01:00
Charles-François Natali 8aa9e4268f Merge. 2014-06-20 22:59:32 +01:00
Charles-François Natali 57398c31c4 Fix test_pydoc failure introduced by 7aa72075d440. Patch by Berker Peksag. 2014-06-20 22:59:12 +01:00
Charles-François Natali 120bb115b6 Merge. 2014-06-20 22:50:48 +01:00
Charles-François Natali af4db37f2a Issue #21491: socketserver: Fix a race condition in child processes reaping. 2014-06-20 22:49:26 +01:00
Terry Jan Reedy d51a76f668 Merge with 3.4 2014-06-20 17:49:25 -04:00
Terry Jan Reedy 5d82895c5e Issue #21770: Call function instead of module. Patch by Claudiu Popa. 2014-06-20 17:49:10 -04:00
Charles-François Natali 6315ffa339 Merge. 2014-06-20 22:41:21 +01:00
Charles-François Natali 504f5c36ef Issue #21491: socketserver: Fix a race condition in child processes reaping. 2014-06-20 22:37:35 +01:00
Terry Jan Reedy af9eb9628d Issue #21768: fix NameError in test_pydescr. Patch by Claudiu Popa. 2014-06-20 15:16:35 -04:00
Terry Jan Reedy fe928de955 Issue #21768: fix type in test_pydoc, patch by Claudiu Popa. 2014-06-20 14:59:11 -04:00
Victor Stinner 0e6f52a211 asyncio, Tulip issue 105: in debug mode, log callbacks taking more than 100 ms
to be executed.
2014-06-20 17:34:15 +02:00
Victor Stinner 037fa45a9f (Merge 3.4) Tulip issue 83: document more asyncio functions in docstrings 2014-06-19 17:14:05 +02:00
Victor Stinner d143209d7f Tulip issue 83: document more asyncio functions in docstrings 2014-06-19 17:11:49 +02:00
Zachary Ware 63f277b694 Issue #21741: Add st_file_attributes to os.stat_result on Windows.
Patch by Ben Hoyt.
2014-06-19 09:46:37 -05:00
Victor Stinner 6ef1202eb9 (Merge 3.4) Closes #21595: asyncio.BaseSelectorEventLoop._read_from_self() now
reads all available bytes from the "self pipe", not only a single byte. This
change reduces the risk of having the pipe full and so getting the innocuous
"BlockingIOError: [Errno 11] Resource temporarily unavailable" message.
2014-06-19 12:59:32 +02:00
Victor Stinner 54c4b8e5c1 Closes #21595: asyncio.BaseSelectorEventLoop._read_from_self() now reads all
available bytes from the "self pipe", not only a single byte. This change
reduces the risk of having the pipe full and so getting the innocuous
"BlockingIOError: [Errno 11] Resource temporarily unavailable" message.
2014-06-19 12:59:15 +02:00
Antoine Pitrou 41dcf35c26 Issue #21722: The distutils "upload" command now exits with a non-zero return code when uploading fails.
Patch by Martin Dengler.
2014-06-18 23:09:11 -04:00
Antoine Pitrou 2e4d3b133a Issue #21722: The distutils "upload" command now exits with a non-zero return code when uploading fails.
Patch by Martin Dengler.
2014-06-18 23:07:46 -04:00
Ned Deily 205a55f5c6 Issue #3485: merge from 3.4 2014-06-18 13:10:44 -07:00
Ned Deily 845fd9aa44 Issue #3485: remove misleading comment 2014-06-18 13:09:40 -07:00
Victor Stinner f4a1ffd84b (Merge 3.4) asyncio: Fix pyflakes errors
- Add a missing import
- Remove an unused import
- Remove unused variables
2014-06-18 03:27:28 +02:00
Victor Stinner 64d750b36b asyncio: Fix pyflakes errors
- Add a missing import
- Remove an unused import
- Remove unused variables
2014-06-18 03:25:23 +02:00
Victor Stinner 2b8c7a7729 (Merge 3.4) asyncio: Refactor tests: add a base TestCase class 2014-06-18 01:37:31 +02:00
Victor Stinner c73701de72 asyncio: Refactor tests: add a base TestCase class 2014-06-18 01:36:32 +02:00
Victor Stinner 185ad2d447 (Merge 3.4) asyncio: Refactor test__run_once_logging() to not rely on the exact
number of calls to time.monotonic(). Use a "fast select" and a "slow select"
instead.
2014-06-18 01:22:31 +02:00
Victor Stinner d6f02fc649 asyncio: Refactor test__run_once_logging() to not rely on the exact number of
calls to time.monotonic(). Use a "fast select" and a "slow select" instead.
2014-06-18 01:22:15 +02:00
Victor Stinner c82a4d897f (Merge 3.4) asyncio: Set __qualname__ attribute of CoroWrapper in @coroutine
decorator on Python 3.5.

- Drop __slots__ optimization of CoroWrapper to be able to set the __qualname__
  attribute.
- Add tests on __name__, __qualname__ and __module__ of a coroutine function
  and coroutine object.
- Fix test_tasks when run in debug mode (PYTHONASYNCIODEBUG env var set) on
  Python 3.3 or 3.4
2014-06-18 01:15:27 +02:00
Victor Stinner 8d3e02ef5a asyncio: Set __qualname__ attribute of CoroWrapper in @coroutine decorator on
Python 3.5

- Drop __slots__ optimization of CoroWrapper to be able to set the __qualname__
  attribute.
- Add tests on __name__, __qualname__ and __module__ of a coroutine function
  and coroutine object.
- Fix test_tasks when run in debug mode (PYTHONASYNCIODEBUG env var set) on
  Python 3.3 or 3.4
2014-06-18 01:14:59 +02:00
Victor Stinner adc7bcb93a (Merge 3.4) Issue #21723: asyncio.Queue: support any type of number (ex: float)
for the maximum size. Patch written by Vajrasky Kok.
2014-06-17 23:37:35 +02:00
Victor Stinner 66dc6b0f53 Issue #21723: asyncio.Queue: support any type of number (ex: float) for the
maximum size. Patch written by Vajrasky Kok.
2014-06-17 23:36:21 +02:00
Terry Jan Reedy 1b1fe97e95 Merge with 3.4 2014-06-17 16:35:33 -04:00
Terry Jan Reedy 14fbe72777 Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar. 2014-06-17 16:35:20 -04:00
Benjamin Peterson 2ce54c2912 merge 3.4 2014-06-16 23:16:37 -07:00
Benjamin Peterson 9db281662d merge 3.3 2014-06-16 23:16:31 -07:00
Benjamin Peterson 0fd3972a3f merge 3.2 2014-06-16 23:16:06 -07:00
Benjamin Peterson 314dc126ce expect the correct platform-dependent linesep 2014-06-16 23:15:50 -07:00
Terry Jan Reedy 35a1fb1fba Merge with 3.4 2014-06-16 19:01:14 -04:00
Terry Jan Reedy 10b1c7cc8f Issue #21686: add unittest for idlelib.HyperParser. Original patch by Saimadhav
Heblikar. Correct a minor 3.x bug in HyperParser discovered by testing.
2014-06-16 19:01:01 -04:00
Victor Stinner 6f3551e15f (Merge 3.4) asyncio: Task.__repr__() now also handles CoroWrapper 2014-06-17 00:27:02 +02:00
Victor Stinner bc434e2052 asyncio: Task.__repr__() now also handles CoroWrapper 2014-06-17 00:26:36 +02:00
Victor Stinner 0f69e76204 (Merge 3.4) Issue #21773: Fix TestStdLib.test_pydoc() of test_enum. Patch
written by Claudiu Popa.

The print_diffs() function was not defined, using the assertEqual() is more
reliable.
2014-06-16 22:51:36 +02:00
Victor Stinner 4b0432d190 Issue #21773: Fix TestStdLib.test_pydoc() of test_enum. Patch written by
Claudiu Popa.

The print_diffs() function was not defined, using the assertEqual() is more
reliable.
2014-06-16 22:48:43 +02:00
Victor Stinner 11a584f9ec (Merge 3.4) Sync asyncio with Tulip: Fix test_tasks for Python 3.5
On Python 3.5, generator now gets their name from the function, no more from
the code. So we get the expected "notmuch" name instead of the generic "coro"
name.
2014-06-16 17:12:39 +02:00
Victor Stinner 4802c6ee55 Sync asyncio with Tulip: Fix test_tasks for Python 3.5
On Python 3.5, generator now gets their name from the function, no more from
the code. So we get the expected "notmuch" name instead of the generic "coro"
name.
2014-06-16 17:11:05 +02:00
Victor Stinner 7db27c8ed6 Issue #21205: Fix unit tests 2014-06-16 16:21:57 +02:00
Victor Stinner 40ee30181f Issue #21205: Add a new ``__qualname__`` attribute to generator, the qualified
name, and use it in the representation of a generator (``repr(gen)``). The
default name of the generator (``__name__`` attribute) is now get from the
function instead of the code. Use ``gen.gi_code.co_name`` to get the name of
the code.
2014-06-16 15:59:28 +02:00
Nick Coghlan 26171993fe Merge issue #21669 from 3.4 2014-06-16 19:49:12 +10:00
Nick Coghlan 5b1fdc1e37 Issue #21669: Special case print & exec syntax errors 2014-06-16 19:48:02 +10:00
Terry Jan Reedy 9bec397df9 Merge with 3.4 2014-06-16 02:40:39 -04:00
Terry Jan Reedy d0c1ea42f7 whitespace 2014-06-16 02:40:24 -04:00
Terry Jan Reedy 9b1df38d56 Merge with 3.4 2014-06-16 02:33:56 -04:00
Terry Jan Reedy 3e583307ab Issue #21686: idlelib/HyperParser.py - Update docstrings and comments and
replace \ line contiuation. Tested against nearly done test_hyperparser.py.
2014-06-16 02:33:35 -04:00
Benjamin Peterson 5b521fc9de merge 3.4 (#13779) 2014-06-15 20:52:02 -07:00
Benjamin Peterson e58e0c7f33 clarify when the list of subdirectories is read (closes #13779) 2014-06-15 20:51:12 -07:00
Gregory P. Smith 8ff4dfe857 fix a BytesWarning in my previous commit. 2014-06-15 20:17:23 -07:00
Gregory P. Smith 9204e09178 fix a BytesWarning in my previous commit. 2014-06-15 20:16:01 -07:00
Gregory P. Smith 1016a6100b Isolate the subprocess test_close_fds_when_max_fd_is_lowered test so
that the rlimit calls happens in a child process rather than the
TestCase process to attempt to fix the gentoo buildbot's "Too many
open files" error.
2014-06-15 17:52:26 -07:00
Gregory P. Smith 634aa68c2b Isolate the subprocess test_close_fds_when_max_fd_is_lowered test so
that the rlimit calls happens in a child process rather than the
TestCase process to attempt to fix the gentoo buildbot's "Too many
open files" error.
2014-06-15 17:51:04 -07:00
Raymond Hettinger f46933a42f merge 2014-06-15 14:50:39 -07:00
Raymond Hettinger 92a4055343 Issue #21774: Fix incorrect variable in xml.dom.minidom 2014-06-15 14:48:19 -07:00
Raymond Hettinger 354bffaec4 Update comment to reflect using the default parameter with min() and max(). 2014-06-15 14:40:18 -07:00
Raymond Hettinger badf5d839d Issue 19898: Add test for dequereviter_new.
(Patch contributed by Claudiu Popa.)
2014-06-14 20:41:22 -07:00
Benjamin Peterson ff180af057 merge 3.4 (#21766) 2014-06-14 18:41:31 -07:00
Benjamin Peterson a8c75fe31a merge 3.3 (#21766) 2014-06-14 18:41:13 -07:00
Benjamin Peterson 6cd1954c5c merge 3.2 (#21766) 2014-06-14 18:40:10 -07:00
Benjamin Peterson 73b8b1cdb8 url unquote the path before checking if it refers to a CGI script (closes #21766) 2014-06-14 18:36:29 -07:00
Raymond Hettinger 48f68d00b8 Factor common code into internal functions.
Clean-up names of static functions.
Use Py_RETURN_NONE macro.
Expose private functions needed to support merge().
Move C imports to the bottom of the Python file.
2014-06-14 16:43:35 -07:00
Vinay Sajip f8e9ba0fb9 Closes #21742: Merged fix from 3.4. 2014-06-14 10:23:20 +01:00
Vinay Sajip 0220048083 Issue #21742: Set stream to None after closing. 2014-06-14 10:22:05 +01:00
Raymond Hettinger b321e79123 Fix typo 2014-06-14 00:03:28 -07:00
Terry Jan Reedy cd41e89377 Merge with 3.4 2014-06-13 15:21:01 -04:00
Terry Jan Reedy a40e6b0c94 Issue #21730: Add no-thread skip in test_socket. Patch by Berker Peksag. 2014-06-13 15:20:45 -04:00
Zachary Ware b2df015b3d Issue #19493: Merge with 3.4 2014-06-13 13:48:03 -05:00
Zachary Ware 9422df0924 Issue #19493: Refactor ctypes test package.
Skipped tests are now marked as skipped, formerly commented-out or
renamed-so-it-doesn't-look-like-a-test tests are uncommented, properly named,
and unconditionally skipped, some tests that simply didn't run before
are now able to run, and a few are split into multiple methods instead of
skipping via 'return' in the middle of a method.  Also, a couple of unused
files are removed completely.
2014-06-13 13:44:39 -05:00
Terry Jan Reedy eba3633f34 Merge with 3.4 2014-06-13 14:23:57 -04:00
Terry Jan Reedy bc7c96b9ea Issue #20043: Add direct test for _thread. 2014-06-13 14:23:43 -04:00
Antoine Pitrou 9e82b17e9d Issue #21711: support for "site-python" directories has now been removed from the site module (it was deprecated in 3.4). 2014-06-12 19:41:30 -04:00
Vinay Sajip b6cf631f9c Issue #21709: Merged update from 3.4. 2014-06-12 23:38:16 +01:00
Vinay Sajip 194bcaf4dc Issue #21709: Improved implementation to cover the frozen module case. 2014-06-12 23:36:33 +01:00
Victor Stinner e7efff5bb8 (Merge 3.4) asyncio: Tulip issue 173: Enhance repr(Handle) and repr(Task)
repr(Handle) is shorter for function: "foo" instead of "<function foo at
0x...>". It now also includes the source of the callback, filename and line
number where it was defined, if available.

repr(Task) now also includes the current position in the code, filename and
line number, if available. If the coroutine (generator) is done, the line
number is omitted and "done" is added.
2014-06-12 18:39:42 +02:00
Victor Stinner 307bccc6ff asyncio: Tulip issue 173: Enhance repr(Handle) and repr(Task)
repr(Handle) is shorter for function: "foo" instead of "<function foo at
0x...>". It now also includes the source of the callback, filename and line
number where it was defined, if available.

repr(Task) now also includes the current position in the code, filename and
line number, if available. If the coroutine (generator) is done, the line
number is omitted and "done" is added.
2014-06-12 18:39:26 +02:00
Terry Jan Reedy 2d8d9d57b5 Merge with 3.4 2014-06-12 01:03:35 -04:00
Terry Jan Reedy f54432e2a1 Issue #12387: Add missing upper(lower)case versions of default Windows key
bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy.
2014-06-12 01:03:08 -04:00
R David Murray 130a566a13 Suppress a couple more DeprecationWarnings in the test suite. 2014-06-11 17:09:43 -04:00
R David Murray 475a476237 Eliminate DeprecationWarning in test_concurrent_futures. 2014-06-11 16:25:05 -04:00
R David Murray 1351ee704b #14758: Fix the fix (fix getaddrinfo in mock_socket)
I forgot to run all the affected tests when I fixed smtpd.
2014-06-11 16:10:10 -04:00
R David Murray 012a83ab26 #14758: Need to specify the desired socket type in the getaddrinfo call.
This worked by accident on Linux because the SOCK_STREAM was returned
first, but on the FreeBSD the SOCK_DGRAM is first in the list.
2014-06-11 15:17:50 -04:00
R David Murray 6ffface429 #19840: Add copy_function to shutil.move.
Patch by Claudiu Popa.
2014-06-11 14:40:13 -04:00
R David Murray 6fe56a329d #14758: add IPv6 support to smtpd.
Patch by Milan Oberkirch.
2014-06-11 13:48:58 -04:00
R David Murray 1144da5821 #19662: Eliminate warnings in other test modules that use smtpd.
Eventually these will want to convert to decode_data=False, I think.
2014-06-11 12:27:40 -04:00
R David Murray 554bcbf1b9 #19662: add decode_data to smtpd so you can get at DATA in bytes form.
Otherwise smtpd is restricted to 7bit clean data, since even if the
incoming data is actually utf-8, it will often break things to decode
it before parsing the message.

Patch by Maciej Szulik, with some adjustments (mostly the warning
support).
2014-06-11 11:18:08 -04:00
Vinay Sajip 99537627fd Closes #21709: Merged fix from 3.4. 2014-06-11 08:04:16 +01:00
Vinay Sajip 80f2262dcf Issue #21709: Remove references to __file__ when part of a frozen application. 2014-06-11 08:01:32 +01:00
Giampaolo Rodola' 915d14190e fix issue #17552: add socket.sendfile() method allowing to send a file over a socket by using high-performance os.sendfile() on UNIX. Patch by Giampaolo Rodola'· 2014-06-11 03:54:30 +02:00
Serhiy Storchaka b398d33c65 Issue #18039: dbm.dump.open() now always creates a new database when the
flag has the value 'n'.  Patch by Claudiu Popa.
2014-06-10 21:16:00 +03:00
Victor Stinner 791e5531c9 (Merge 3.4) Issue #21596: asyncio.wait(): mention that the sequence of futures
must not be empty.
2014-06-10 11:16:18 +02:00
Victor Stinner db74d982d4 Issue #21596: asyncio.wait(): mention that the sequence of futures must not
be empty.
2014-06-10 11:16:05 +02:00
Victor Stinner bb2fc5b2a5 Issue #21326: Add a new is_closed() method to asyncio.BaseEventLoop
Add BaseEventLoop._closed attribute and use it to check if the event loop was
closed or not, instead of checking different attributes in each subclass of
BaseEventLoop.

run_forever() and run_until_complete() methods now raise a RuntimeError('Event loop is
closed') exception if the event loop was closed.

BaseProactorEventLoop.close() now also cancels "accept futures".
2014-06-10 10:23:10 +02:00
Terry Jan Reedy eb5ba067c9 Merge with 3.4 2014-06-10 02:49:54 -04:00
Terry Jan Reedy 4762382d63 Issue #21695: Catch AttributeError created when user closes grep output window
while still being written to. With no console, this closed Idle.
Also add missing import and a few other changes.
2014-06-10 02:49:35 -04:00
Serhiy Storchaka 3a56117a60 Issue #21310: Fixed possible resource leak in failed open(). 2014-06-09 13:35:43 +03:00
Serhiy Storchaka f10063e3c3 Issue #21310: Fixed possible resource leak in failed open(). 2014-06-09 13:32:34 +03:00
Kushal Das 047f14c3c6 Closes #21256: Printout of keyword args in deterministic order in mock calls.
Printout of keyword args should be in deterministic order in
a mock function call. This will help to write better doctests.
2014-06-09 13:45:56 +05:30
Serhiy Storchaka 85e4235c0e Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods. 2014-06-09 09:15:42 +03:00
Serhiy Storchaka 8a8f7f9830 Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods. 2014-06-09 09:13:04 +03:00
Victor Stinner 350985da89 Issue #21515: Fix typo in a comment, thanks Arfrever for the report 2014-06-09 00:05:47 +02:00
Terry Jan Reedy 564562faab Merge with 3.4 whitespace 2014-06-08 14:57:42 -04:00
Terry Jan Reedy c6a66ccb06 whitespace 2014-06-08 14:57:24 -04:00
Terry Jan Reedy 6d4f8f0fea Merge heads. 2014-06-08 14:49:07 -04:00
Terry Jan Reedy ba229d9597 Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
Patch by Saimadhav Heblikar. (2 head merge)
2014-06-08 14:47:26 -04:00
Benjamin Peterson 4fb01ffe66 backout 0fb7789b5eeb for test breakage (#20578) 2014-06-07 23:18:12 -07:00
Benjamin Peterson eac219436c merge 3.4 (#11709) 2014-06-07 20:17:29 -07:00
Benjamin Peterson 159824ea2a make sure the builtin help function doesn't fail when sys.stdin is not a valid file (closes #11709)
Original patch by Amaury Forgeot d'Arc with a test by bdettmer.
2014-06-07 20:14:26 -07:00
Benjamin Peterson 10e847bbc7 add BufferedIOBase.readinto1 (closes #20578)
Patch by Nikolaus Rath.
2014-06-07 20:06:48 -07:00
Benjamin Peterson 9d19da701d merge 3.4 (#13223) 2014-06-07 16:47:15 -07:00
Benjamin Peterson ed1160b39c don't remove self from example code in the HTML output (closes #13223)
Patch by Víctor Terrón.
2014-06-07 16:44:00 -07:00
Benjamin Peterson edb07d28fb merge 3.4 (#21463) 2014-06-07 15:09:36 -07:00
Benjamin Peterson 3c2dca67ac in ftp cache pruning, avoid changing the size of a dict while iterating over it (closes #21463)
Patch by Skyler Leigh Amador.
2014-06-07 15:08:04 -07:00
Benjamin Peterson 3e439797ba merge 3.4 (#21642) 2014-06-07 12:39:51 -07:00
Benjamin Peterson c416162302 allow the keyword else immediately after (no space) an integer (closes #21642) 2014-06-07 12:36:39 -07:00
Terry Jan Reedy 7244d775db Merge with 3.4 2014-06-07 04:28:16 -04:00
Terry Jan Reedy 38ebdf528e Issue #21682: Replace EditorWindow with mock to eliminate memory leaks.
Patch by Saimadhav Heblikar.
2014-06-07 04:27:50 -04:00
Terry Jan Reedy f2d9526391 Merge with 3.4 2014-06-06 17:43:37 -04:00
Terry Jan Reedy 4a3f135c8d Issue #18910: test_textView - since all tests require 'gui', make root global.
Subclass TextViewer to add mock methods instead of monkey-patching it.
2014-06-06 17:43:19 -04:00
Victor Stinner d967fc9da2 Issue #21515: tempfile.TemporaryFile now uses os.O_TMPFILE flag is available 2014-06-05 14:27:45 +02:00
Victor Stinner 7088b99eb8 (Merge 3.4) Tulip issue 83, Python issue #21252: Fill some XXX docstrings in asyncio 2014-06-05 12:07:14 +02:00
Victor Stinner f9e49dd346 Tulip issue 83, Python issue #21252: Fill some XXX docstrings in asyncio 2014-06-05 12:06:44 +02:00
Vinay Sajip ae0767bb5b Closes #21663: Merged fix from 3.4. 2014-06-05 09:32:24 +01:00
Vinay Sajip 1a170a74f7 Issue #21663: Fixed error caused by trying to create an existing directory. 2014-06-05 09:31:20 +01:00