Commit Graph

34076 Commits

Author SHA1 Message Date
Victor Stinner 128ee220e2 asyncio: Don't export BaseEventLoop, BaseSelectorEventLoop nor
BaseProactorEventLoop

Import them from submodules if you really need them.
2014-01-25 22:22:18 +01:00
Serhiy Storchaka c0b0bb6e01 Issue #20331: Fixed possible FD leaks in various modules:
http.server, imghdr, mailcap, mimetypes, xml.etree.
2014-01-25 19:43:56 +02:00
Serhiy Storchaka 91b0bc237c Issue #20331: Fixed possible FD leaks in various modules:
http.server, imghdr, mailcap, mimetypes, xml.etree.
2014-01-25 19:43:02 +02:00
Victor Stinner 8dffc456d7 Update asyncio from the Tulip project
Major changes:

- StreamReader.readexactly() now raises an IncompleteReadError if the
  end of stream is reached before we received enough bytes, instead of
  returning less bytes than requested.

- Unit tests use the main asyncio module instead of submodules like events

- _UnixWritePipeTransport now also supports character devices, as
  _UnixReadPipeTransport. Patch written by Jonathan Slenders.

- Export more symbols: BaseEventLoop, BaseProactorEventLoop,
  BaseSelectorEventLoop, Queue and Queue sublasses, Empty, Full
2014-01-25 15:32:06 +01:00
Victor Stinner 75a5ec88ff Fix asyncio tests: define resolution 2014-01-25 15:31:06 +01:00
Victor Stinner 6b0fa70547 test_selectors: remove unused imports 2014-01-25 15:04:22 +01:00
Victor Stinner f67255ab94 Issue #20311: asyncio: Add a granularity attribute to BaseEventLoop: maximum
between the resolution of the BaseEventLoop.time() method and the resolution of
the selector. The granuarility is used in the scheduler to round time and
deadline.
2014-01-25 15:01:33 +01:00
Victor Stinner 635fca9704 Issue #20311: selectors: Add a resolution attribute to BaseSelector. 2014-01-25 14:56:48 +01:00
Victor Stinner 2041859f27 Issue #20311: Revert e042ea77a152 and 7ce7295393c2, PollSelector.select() and
EpollSelector.select() round again the timeout towards zero
2014-01-25 14:43:45 +01:00
Victor Stinner 38c72bd199 (Merge 3.3) Issue #20311: Revert 033137c12d88 (02f9db3e684e),
select.epoll.poll() rounds again the timeout towards zero
2014-01-25 14:40:04 +01:00
Victor Stinner 933209689e Issue #20311: Revert 033137c12d88, select.epoll.poll() rounds again the timeout
towards zero
2014-01-25 14:37:50 +01:00
Serhiy Storchaka a7184e617a Fix typo. 2014-01-24 22:28:06 +02:00
Serhiy Storchaka 2d5a0928f1 Issue #20384: Fix the test_tarfile test on Windows.
On Windows os.open() error message doesn't contain file name.
2014-01-24 22:19:23 +02:00
Larry Hastings 5c66189e88 Issue #20189: Four additional builtin types (PyTypeObject,
PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type)
have been modified to provide introspection information for builtins.
Also: many additional Lib, test suite, and Argument Clinic fixes.
2014-01-24 06:17:25 -08:00
Nick Coghlan b3c0f4067d Merge removal of issue 20317 debugging code from 3.3 2014-01-24 23:07:16 +10:00
Nick Coghlan add94c9d82 Issue 20317: Remove debugging code from contextlib
- Alex J Burke noticed a debugging raise in the commit that
  fixed the original bug reported in issue 20317
- this showed that multiple iterations through the affected
  loop wasn't actually being tested
2014-01-24 23:05:45 +10:00
Victor Stinner 421e49b5c1 asyncio: wait_for() now cancels the future on timeout. Patch written by Gustavo
Carneiro.
2014-01-23 17:40:59 +01:00
Victor Stinner 183e347796 asyncio (Tulip issue 110): StreamReader.read() and StreamReader.readline() now
raise a RuntimeError, instead of using an assertion, if another coroutine is
already waiting for incoming data
2014-01-23 17:40:03 +01:00
Victor Stinner 8ce6e1100e Close #20365: Skip test_asyncio.test_events.test_read_pty_output() on Mac OS X
older than 10.9 (Maverick). kqueue doesn't support character devices (PTY) on
Mac OS X older than 10.9.
2014-01-23 17:26:06 +01:00
Serhiy Storchaka 418e80ba00 Fixed test_user_command on OpenSolaris where floats can have different string
representation in Tcl and Python.
2014-01-23 16:49:22 +02:00
Serhiy Storchaka bdf0cb52eb Fixed test_user_command on OpenSolaris where floats can have different string
representation in Tcl and Python.
2014-01-23 16:48:44 +02:00
Victor Stinner da94b9ebeb Issue #20311: add debug help in test_selectors 2014-01-23 15:07:26 +01:00
Victor Stinner 3eb45d3eae asyncio: Fix open_connection() documentation, writer is a StreamWriter 2014-01-23 10:20:18 +01:00
Serhiy Storchaka d869a0b132 Added test_user_command in test_tcl.
It tests the convertion Tcl values to Python values when Tcl calls a command
implemented on Python. Currently all values are passed as strings.
2014-01-23 09:49:42 +02:00
Serhiy Storchaka 4b730161fd Added test_user_command in test_tcl.
It tests the convertion Tcl values to Python values when Tcl calls a command
implemented on Python. Currently all values are passed as strings.
2014-01-23 09:44:05 +02:00
Terry Jan Reedy 8860443749 Merge with 3.3 2014-01-23 00:39:11 -05:00
Terry Jan Reedy 94338de49b Issue #17390: Add Python version to Idle editor window title bar.
Original patches by Edmond Burnett and Kent Johnson.
2014-01-23 00:36:46 -05:00
Nick Coghlan d58831e688 Merge #20317 from 3.3 2014-01-22 23:04:37 +10:00
Nick Coghlan 09761e7c9c Issue #20317: Don't create a reference loop in ExitStack 2014-01-22 22:24:46 +10:00
Victor Stinner 4a2dbeb0d3 asyncio: Cleanup logging in BaseEventLoop._run_once()
logger.log() is now responsible to format the timeout. It might be faster if
the log is disabled for DEBUG level, but it's also more readable and fix
an issue with Python 2.6 in the Trollius project.
2014-01-22 12:26:01 +01:00
Terry Jan Reedy 45726d3011 Merge with 3.3 2014-01-21 21:13:25 -05:00
Terry Jan Reedy 0e3b0e397e Issue #20818: Remove code from idlelib.CallTipWindow.showtip that is now
completely redundant. After 16638 patch, CallTips.get_argspec trims over-long
signature strings as well as docstring lines.
2014-01-21 21:12:24 -05:00
Terry Jan Reedy 3f440de7d3 Merge with 3.3 2014-01-21 20:45:38 -05:00
Terry Jan Reedy d5710f8b36 Issue #16638: Include up to 5 docstring header lines (before first blank) in
Idle calltips. This is needed for builtins, such bytes (which is why 5).
Based on patch by Serhiy Storchaka.
2014-01-21 20:45:17 -05:00
Florent Xicluna 45e124e26d Issue #17825: Cursor ^ is correctly positioned for SyntaxError and IndentationError. 2014-01-22 01:16:25 +01:00
Florent Xicluna 758fa5ea81 Issue #17825: Cursor ^ is correctly positioned for SyntaxError and IndentationError. 2014-01-22 01:11:43 +01:00
Stefan Krah b772f2e89d Issue #20246: Fix test failures on FreeBSD. Patch by Ryan Smith-Roberts. 2014-01-21 22:59:57 +01:00
Stefan Krah 6b2e5597e1 Issue #20246: Fix test failures on FreeBSD. Patch by Ryan Smith-Roberts. 2014-01-21 22:58:40 +01:00
Terry Jan Reedy 502d80f8b4 Merge with 3.3 2014-01-21 15:37:16 -05:00
Terry Jan Reedy 715476d8e3 Issue #16630: Make Idle calltips work even when __getattr__ raises.
Initial patch by Roger Serwy.
2014-01-21 15:36:51 -05:00
Serhiy Storchaka 2bd59daf58 Issue #2382: SyntaxError cursor "^" now is written at correct position in most
cases when multibyte characters are in line (before "^").  This still not
works correctly with wide East Asian characters.
2014-01-21 22:29:47 +02:00
Serhiy Storchaka 65fd0592fb Issue #2382: SyntaxError cursor "^" now is written at correct position in most
cases when multibyte characters are in line (before "^").  This still not
works correctly with wide East Asian characters.
2014-01-21 22:26:52 +02:00
Victor Stinner 567b26e882 Issue #20311: EpollSelector now also rounds the timeout towards zero, as
PollSelector.

This change is not really required in Python 3.4, since select.epoll.poll() now
rounds also correctly the timeout. But Guido van Rossum prefers to have exactly
the same selectors.py file in CPython and Tulip projects: "it's not harmful".
2014-01-21 21:00:47 +01:00
Victor Stinner 7067b5d927 selectors: add a comment to explain why and how poll timeout is rounded 2014-01-21 17:49:41 +01:00
Terry Jan Reedy 781a5441ae Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins.
Pending Clinic/inspect changes will probably require change to this file.
2014-01-21 03:10:01 -05:00
Terry Jan Reedy eed1661b47 Issue #16655: Explain why Idle's test_calltips has 'fragile' tests of builtins. 2014-01-21 03:07:51 -05:00
Terry Jan Reedy 83b8105c64 Merge with 3.3 2014-01-21 00:26:49 -05:00
Terry Jan Reedy 681ede8b0a Issue #20122: Idlelib: Move tests in CallTips.py to test_calltips.py. 2014-01-21 00:26:21 -05:00
Victor Stinner 240cae7d17 (Merge 3.3) Issue #20311: Try to fix the unit test, use time.monotonic()
instead of time.perf_counter()
2014-01-21 02:38:33 +01:00
Victor Stinner 39d798eb03 Issue #20311: Try to fix the unit test, use time.monotonic() instead of
time.perf_counter()

Move also the unit test at the end.
2014-01-21 02:37:41 +01:00
Victor Stinner 11da8e24ba Issue #20311: selector.PollSelector.select() now rounds the timeout away from
zero, instead of rounding towards zero. For example, a timeout of one
microsecond is now rounded to one millisecond, instead of being rounded to
zero.

Move also a test in test_epoll which was moved by my previous merge.
2014-01-21 01:48:28 +01:00
Victor Stinner 09354fd606 (Merge 3.3) Issue #20311: select.epoll.poll() now rounds the timeout away from
zero, instead of rounding towards zero. For example, a timeout of one
microsecond is now rounded to one millisecond, instead of being rounded to
zero.
2014-01-21 01:42:11 +01:00
Victor Stinner 665486e0e7 Issue #20311: select.epoll.poll() now rounds the timeout away from zero,
instead of rounding towards zero. For example, a timeout of one microsecond is
now rounded to one millisecond, instead of being rounded to zero.
2014-01-21 01:41:00 +01:00
Victor Stinner 22463aa947 Close #20275: Optimize BaseEventLoop._run_once()
Logger.log() is "slow", logger.isEnabledFor() is faster and the logger is
disabled in most cases. A microbenchmark executing 100,000 dummy tasks is 22%
faster with this change.
2014-01-20 23:56:40 +01:00
Serhiy Storchaka c46d1faa4a Issue #20262: Warnings are raised now when duplicate names are added in the
ZIP file or too long ZIP file comment is truncated.
2014-01-20 21:59:33 +02:00
Serhiy Storchaka 9b7a1a1af6 Issue #20262: Warnings are raised now when duplicate names are added in the
ZIP file or too long ZIP file comment is truncated.
2014-01-20 21:57:40 +02:00
Serhiy Storchaka ab0ac27d24 Issue #20315: Removed support for backward compatibility with early 2.x versions.
Removed backward compatibility alias curses.window.nooutrefresh which should
be removed in 2.3.
2014-01-20 21:35:06 +02:00
Serhiy Storchaka 7e52705ee3 Issue #20315: Removed support for backward compatibility with early 2.x versions. 2014-01-20 21:29:31 +02:00
Gregory P. Smith 5a6d4bf671 Fixes Issue #20165: The unittest module no longer considers tests marked with
@expectedFailure successful if they pass.
2014-01-20 01:11:18 -08:00
Gregory P. Smith b599c61179 Fix the unittest to run properly when the working directory has
additional bits set (such as the setgid or sticky bits).
2014-01-20 01:10:33 -08:00
Benjamin Peterson c28ab08887 merge 3.3 (#18574) 2014-01-18 21:51:11 -05:00
Benjamin Peterson 044242360d fix handling of 100-continue status code (closes #18574) 2014-01-18 21:50:18 -05:00
Stefan Krah 5de3278b23 Fix test failures (--without-doc-strings). 2014-01-18 23:18:39 +01:00
R David Murray bbf18bee3c Merge #19855: restore use of LC_ALL, not LC_MESSAGES 2014-01-18 15:02:00 -05:00
R David Murray 4295353568 #19855: restore use of LC_ALL, not LC_MESSAGES
I didn't realize LC_ALL was an override, and I should have.  I tried to
make a test, but it is not clear that the LC variables actually affect
the strings that uuid is using to parse the command output.
2014-01-18 14:56:10 -05:00
Serhiy Storchaka 5d83d1a814 Issue #20270: urllib.urlparse now supports empty ports. 2014-01-18 18:31:41 +02:00
Serhiy Storchaka ff97b08d00 Issue #20270: urllib.urlparse now supports empty ports. 2014-01-18 18:30:33 +02:00
Serhiy Storchaka 2d1f092469 Issue #20244: Fixed possible file leaks when unexpected error raised in
tarfile open functions.
2014-01-18 16:28:37 +02:00
Serhiy Storchaka e413cde95f Issue #20244: Fixed possible file leaks when unexpected error raised in
tarfile open functions.
2014-01-18 16:28:08 +02:00
Serhiy Storchaka aee0e63ed0 Issue #20243: TarFile no longer raise ReadError when opened in write mode. 2014-01-18 16:14:49 +02:00
Serhiy Storchaka c2d01423e0 Issue #20243: TarFile no longer raise ReadError when opened in write mode. 2014-01-18 16:14:10 +02:00
Serhiy Storchaka 7d68a1c921 Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't
write complete output on close.
2014-01-18 15:53:39 +02:00
Serhiy Storchaka 9fbec7ad5e Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't
write complete output on close.
2014-01-18 15:53:05 +02:00
Serhiy Storchaka ce644a09ac Issue #20245: The open functions in the tarfile module now correctly handle empty mode. 2014-01-18 15:37:21 +02:00
Serhiy Storchaka 53ad0cd284 Issue #20245: The open functions in the tarfile module now correctly handle empty mode. 2014-01-18 15:35:37 +02:00
Gregory P. Smith 4cfbac80bd sort os.listxattr results before comparing it to avoid depending on the ordering of the directory information in the underlying filesystem. 2014-01-17 12:01:40 -08:00
Gregory P. Smith 1093bf2c7f sort os.listxattr results before comparing it to avoid depending on the
ordering of the directory information in the underlying filesystem.
2014-01-17 12:01:22 -08:00
Larry Hastings 1abd708681 Issue #20226: Added tests for new features and regressions. 2014-01-16 14:15:03 -08:00
Larry Hastings 2a727916c5 Issue #20226: Major improvements to Argument Clinic.
* You may now specify an expression as the default value for a
  parameter!  Example: "sys.maxsize - 1".  This support is
  intentionally quite limited; you may only use values that
  can be represented as static C values.
* Removed "doc_default", simplified support for "c_default"
  and "py_default".  (I'm not sure we still even need
  "py_default", but I'm leaving it in for now in case a
  use presents itself.)
* Parameter lines support a trailing '\\' as a line
  continuation character, allowing you to break up long lines.
* The argument parsing code generated when supporting optional
  groups now uses PyTuple_GET_SIZE instead of PyTuple_GetSize,
  leading to a 850% speedup in parsing.  (Just kidding, this
  is an unmeasurable difference.)
* A bugfix for the recent regression where the generated
  prototype from pydoc for builtins would be littered with
  unreadable "=<object ...>"" default values for parameters
  that had no default value.
* Converted some asserts into proper failure messages.
* Many doc improvements and fixes.
2014-01-16 11:32:01 -08:00
Guido van Rossum e1f554490d asyncio: Reincarnate CoroWrapper's docstring as a comment. 2014-01-16 11:05:23 -08:00
Serhiy Storchaka 7f470d0f9c Issue #19936: Remove executable bits from C source files and several forgotten
test files.
2014-01-16 18:48:45 +02:00
Serhiy Storchaka 8f8ec92de8 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang lines in the unittestgui and checkpip scripts.
2014-01-16 17:33:23 +02:00
Serhiy Storchaka b992a0e102 Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them.  Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface.  Fixed
shebang line to use python3 executable in the unittestgui script.
2014-01-16 17:15:49 +02:00
Victor Stinner bac7793b5b asyncio: Fix CoroWrapper (fix my previous commit)
Add __name__ and __doc__ to __slots__
2014-01-16 01:55:29 +01:00
Victor Stinner 4d7a29c5de asyncio: Fix a typo in CoroWrapper
__slot__ => __slots__
2014-01-16 01:38:24 +01:00
Ronald Oussoren 6db6653bbc Issue #14455: Fix some issues with plistlib
* Negative integer support in binary plists was broken

* Better exception for invalid data

* Fix the versionadded/versionchanged markup in the documentation

* Add the interface cleanup to what's new for 3.4
2014-01-15 11:32:35 +01:00
Benjamin Peterson 60ea92883f merge 3.3 2014-01-14 00:29:03 -05:00
Benjamin Peterson bd1d12e61b add test for #20251 2014-01-14 00:27:42 -05:00
Benjamin Peterson c6b37e21f5 merge 3.3 (#20246) 2014-01-13 23:14:42 -05:00
Benjamin Peterson 5688222907 merge 3.2 (#20246) 2014-01-13 23:12:55 -05:00
Benjamin Peterson fbf648ebba complain when nbytes > buflen to fix possible buffer overflow (closes #20246) 2014-01-13 22:59:38 -05:00
Vinay Sajip 30e6a64e76 Closes #20242: Merged fix from 3.3. 2014-01-13 22:01:16 +00:00
Vinay Sajip 1fd1202072 Issue #20242: Fixed basicConfig() format strings for the alternative formatting styles. 2014-01-13 21:59:56 +00:00
Ned Deily 936dfae2e2 Issue #20229: Avoid plistlib deprecation warning in platform.mac_ver(). 2014-01-13 11:34:19 -08:00
R David Murray 44fcaae90d Merge #20206, #5803: more efficient algorithm that doesn't truncate output.
(No idea why test_tarfile is listed as changed...it isn't.)
2014-01-13 13:30:13 -05:00
R David Murray 2313e15578 #20206, #5803: more efficient algorithm that doesn't truncate output.
This fixes an edge case (20206) where if the input ended in a character
needing encoding but there was no newline on the string, the last byte
of the encoded character would be dropped.  The fix is to use a more
efficient algorithm, provided by Serhiy Storchaka (5803), that does not
have the bug.
2014-01-13 13:19:21 -05:00
Serhiy Storchaka f22fe0f507 Test the open of non-exitent tarfile in all modes. 2014-01-13 19:08:00 +02:00
Serhiy Storchaka 2a3d7d1af7 Test the open of non-exitent tarfile in all modes. 2014-01-13 19:07:33 +02:00
Serhiy Storchaka 676bf73793 Fixed typo. 2014-01-13 14:24:11 +02:00
Serhiy Storchaka 6cbc5f784f Fixed typo. 2014-01-13 14:23:18 +02:00
Senthil Kumaran 95be7ff911 merge from 3.3
Issue #19082: Working xmlrpc.server and xmlrpc.client examples. Both in modules and in documentation.
2014-01-12 16:07:59 -08:00
Senthil Kumaran 939e2db48d Issue #19082: Working xmlrpc.server and xmlrpc.client examples. Both in modules and in documentation. 2014-01-12 16:06:58 -08:00
Ethan Furman a70805e1fa Issue19995: fixed typo; switched from test.support.check_warnings to assertWarns 2014-01-12 08:42:35 -08:00
Serhiy Storchaka 61dab6e3fa Issue #20138: The wsgiref.application_uri() and wsgiref.request_uri()
functions now conform to PEP 3333 when handle non-ASCII URLs.
2014-01-12 12:09:38 +02:00
Serhiy Storchaka 0abbe8c090 Issue #20138: The wsgiref.application_uri() and wsgiref.request_uri()
functions now conform to PEP 3333 when handle non-ASCII URLs.
2014-01-12 12:08:11 +02:00
Ethan Furman f9bba9c67f Issue19995: issue deprecation warning for non-integer values to %c, %o, %x, %X 2014-01-11 23:20:58 -08:00
Senthil Kumaran d87346c0ce merge from 3.3
Issue #19092 - Raise a correct exception when cgi.FieldStorage is given an
invalid file-obj. Also use __bool__ to determine the bool of the FieldStorage
object.
2014-01-11 22:22:21 -08:00
Senthil Kumaran b4cbb92fbe Issue #19092 - Raise a correct exception when cgi.FieldStorage is given an
invalid file-obj. Also use __bool__ to determine the bool of the FieldStorage
object.
2014-01-11 22:20:16 -08:00
Serhiy Storchaka 07bc3726ec tkinter.Text.debug() now always returns 0/1.
Fixed a regression inroduced in issue #6157.
2014-01-11 13:15:39 +02:00
Serhiy Storchaka 2f26c224d7 tkinter.Text.debug() now always returns 0/1.
Fixed a regression inroduced in issue #6157.
2014-01-11 13:13:46 +02:00
Victor Stinner 5e42354263 Fix ResourceWarning in test_asyncio.test_windows_events:
close the write end of the socket pair
2014-01-11 00:16:50 +01:00
Victor Stinner 7de2646cdf Cleanup properly proactor event loop
* store the "self reading" future when the "self pipe" is closed (when the
  event loop is closed)
* store "accept" futures to cancel them when we stop serving
* close the "accept socket" if the "accept future" is cancelled

Fix many warnings which can be seen when unit tests are run in verbose mode.
2014-01-11 00:03:21 +01:00
Serhiy Storchaka c8935fe860 Try to fix some ttk tests. Error messages were changed in 8.6b3. 2014-01-11 00:10:56 +02:00
Serhiy Storchaka e0837a03ee Try to fix some ttk tests. Error messages were changed in 8.6b3. 2014-01-11 00:10:04 +02:00
Guido van Rossum 02757ea7e9 asyncio: Minimal pty support in UNIX read pipe, by Jonathan Slenders. 2014-01-10 13:30:04 -08:00
Guido van Rossum 4835f17c24 asyncio: Fix race in subprocess transport, by Victor Stinner. 2014-01-10 13:28:59 -08:00
Guido van Rossum efef9d3f25 asyncio: Tiny cleanup in streams.py. 2014-01-10 13:26:38 -08:00
Guido van Rossum 2407f3bb1b asyncio: Don't special-case GeneratorExit in Condition.wait(). 2014-01-10 13:25:38 -08:00
Serhiy Storchaka 50471db565 Issue #19804: The test_find_mac test in test_uuid is now skipped if the
ifconfig executable is not available.
2014-01-10 15:08:07 +02:00
Serhiy Storchaka cce440fab8 Issue #19804: The test_find_mac test in test_uuid is now skipped if the
ifconfig executable is not available.
2014-01-10 15:06:59 +02:00
Serhiy Storchaka 786ac7b27d Issue #19886: Use better estimated memory requirements for bigmem tests.
Incorrect requirements can cause memory swapping.
2014-01-10 13:39:27 +02:00
Serhiy Storchaka 4847e4e1f4 Issue #19886: Use better estimated memory requirements for bigmem tests.
Incorrect requirements can cause memory swapping.
2014-01-10 13:37:54 +02:00
Antoine Pitrou eb16804216 assertEquals is deprecated, use assertEqual instead. 2014-01-10 00:02:38 +01:00
Serhiy Storchaka 123e6d5b4b Issue #13107: argparse and optparse no longer raises an exception when output
a help on environment with too small COLUMNS.  Based on patch by
Elazar Gershuni.
2014-01-09 23:18:41 +02:00
Serhiy Storchaka f451112413 Issue #13107: argparse and optparse no longer raises an exception when output
a help on environment with too small COLUMNS.  Based on patch by
Elazar Gershuni.
2014-01-09 23:14:27 +02:00
Antoine Pitrou ba44860c11 Try to fix test_ssl failures on some buildbots 2014-01-09 21:30:17 +01:00
Antoine Pitrou 32c4915b23 Try to fix test_ssl failures on some buildbots 2014-01-09 21:28:48 +01:00
Antoine Pitrou 78ace81c93 Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly asked for. 2014-01-09 20:09:03 +01:00
Antoine Pitrou cd3d7cabef Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly asked for. 2014-01-09 20:02:20 +01:00
Serhiy Storchaka 5940b92909 Do not reset the line number because we already set file position to correct
value.

(fixes error in patch for issue #18960)
2014-01-09 20:13:52 +02:00
Serhiy Storchaka 1064a13bb0 Do not reset the line number because we already set file position to correct
value.

(fixes error in patch for issue #18960)
2014-01-09 20:12:49 +02:00
Benjamin Peterson a118c4fa79 merge 3.3 2014-01-09 11:12:31 -06:00
Benjamin Peterson 50b82c765f clear zip stat cache after each ref leak run 2014-01-09 11:10:30 -06:00
Serhiy Storchaka 7282ff6d5b Issue #18960: Fix bugs with Python source code encoding in the second line.
* The first line of Python script could be executed twice when the source
encoding (not equal to 'utf-8') was specified on the second line.

* Now the source encoding declaration on the second line isn't effective if
the first line contains anything except a comment.

* As a consequence, 'python -x' works now again with files with the source
encoding declarations specified on the second file, and can be used again
to make Python batch files on Windows.

* The tokenize module now ignore the source encoding declaration on the second
line if the first line contains anything except a comment.

* IDLE now ignores the source encoding declaration on the second line if the
first line contains anything except a comment.

* 2to3 and the findnocoding.py script now ignore the source encoding
declaration on the second line if the first line contains anything except
a comment.
2014-01-09 18:41:59 +02:00
Serhiy Storchaka 768c16ce02 Issue #18960: Fix bugs with Python source code encoding in the second line.
* The first line of Python script could be executed twice when the source
encoding (not equal to 'utf-8') was specified on the second line.

* Now the source encoding declaration on the second line isn't effective if
the first line contains anything except a comment.

* As a consequence, 'python -x' works now again with files with the source
encoding declarations specified on the second file, and can be used again
to make Python batch files on Windows.

* The tokenize module now ignore the source encoding declaration on the second
line if the first line contains anything except a comment.

* IDLE now ignores the source encoding declaration on the second line if the
first line contains anything except a comment.

* 2to3 and the findnocoding.py script now ignore the source encoding
declaration on the second line if the first line contains anything except
a comment.
2014-01-09 18:36:09 +02:00
Serhiy Storchaka 69fdbf9cb0 Issue #20078: Reading malformed zipfiles no longer hangs with 100% CPU
consumption.
2014-01-09 14:53:41 +02:00
Serhiy Storchaka 5ce3f10aee Issue #20078: Reading malformed zipfiles no longer hangs with 100% CPU
consumption.
2014-01-09 14:50:20 +02:00
Victor Stinner 6f17deb9bb (Merge 3.3) Issue #20113: Fix test_posix on OpenIndiana 2014-01-08 16:01:42 +01:00
Victor Stinner cd5ca6a564 Issue #20113: Fix test_posix on OpenIndiana 2014-01-08 16:01:31 +01:00
Victor Stinner 149e540adf (Merge 3.3) Issue #20113: os.readv() and os.writev() now raise an OSError
exception on error instead of returning -1.
2014-01-08 15:26:12 +01:00
Victor Stinner 57ddf78b6b Issue #20113: os.readv() and os.writev() now raise an OSError exception on
error instead of returning -1.
2014-01-08 15:21:28 +01:00
Eric Snow e4314e05d5 Issue 19713: Remove PEP 451-related code that should have been factored out.
This code was an artifact of issuing a DeprecationWarning for the lack
of loader.exec_module().  However, we have deferred such warnings to
later Python versions.
2014-01-07 23:29:19 -07:00
Gregory P. Smith 2e385e2592 Fixes issue #19081: When a zipimport .zip file in sys.path being imported from
is modified during the lifetime of the Python process after zipimport has
already cached the zip's table of contents we detect this and recover
rather than read bad data from the .zip (causing odd import errors).
2014-01-07 18:34:23 -08:00
Gregory P. Smith 2bcbc14117 Fixes Issue #19081: When a zipimport .zip file in sys.path being imported from
is modified during the lifetime of the Python process after zipimport has
already cached the zip's table of contents we detect this and recover
rather than read bad data from the .zip (causing odd import errors).
2014-01-07 18:30:07 -08:00
Guido van Rossum 6188bd498f Fix typo in asyncio/streams.py. 2014-01-07 17:03:26 -08:00
Brett Cannon 8d942296bb Issue #19719: Update various finder and loader ABCs such that their
old methods now provide implementations when PEP 451 APIs are present.

This should help with backwards-compatibility with code which has not
been updated to work with PEP 451.
2014-01-07 15:52:42 -05:00
Larry Hastings 16c5191ab3 Issue #20144: Argument Clinic now supports simple constants as parameter
default values.  inspect.Signature correspondingly supports them in
__text_signature__ fields for builtins.
2014-01-07 11:53:01 -08:00
Serhiy Storchaka 985b8dbe11 Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
* Misc.image_names(), Misc.image_types(), Wm.wm_colormapwindows(), and
  LabelFrame.panes() now always return a tuple.
* Fixed error of comparing str and int in tt.LabeledScale._adjust().
* ttk.Notebook.index() now always returns int.
* ttk.Notebook.tabs() now always returns a tuple.
* ttk.Entry.bbox() now always returns a tuple of ints.
* ttk.Entry.validate() now always correctly works.
* ttk.Combobox.current() now always returns int.
* ttk.Panedwindow.sashpos() now always returns int.
* ttk.Treeview.bbox() now always returns a tuple of ints.
* ttk.Treeview.get_children() now always returns a tuple.
* ttk.Treeview.exists() now always correctly works.
* ttk.Treeview.index() now always returns int.
* ttk.Treeview.tag_has() now always returns 0 or 1.
* And numerous other errors in methods which returns a tuple, list or dict.
* Fixed ttk tests for wantobjects is False.
2014-01-07 19:30:36 +02:00
Serhiy Storchaka a21acb5d95 Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
* Misc.image_names(), Misc.image_types(), Wm.wm_colormapwindows(), and
  LabelFrame.panes() now always return a tuple.
* Fixed error of comparing str and int in tt.LabeledScale._adjust().
* ttk.Notebook.index() now always returns int.
* ttk.Notebook.tabs() now always returns a tuple.
* ttk.Entry.bbox() now always returns a tuple of ints.
* ttk.Entry.validate() now always correctly works.
* ttk.Combobox.current() now always returns int.
* ttk.Panedwindow.sashpos() now always returns int.
* ttk.Treeview.bbox() now always returns a tuple of ints.
* ttk.Treeview.get_children() now always returns a tuple.
* ttk.Treeview.exists() now always correctly works.
* ttk.Treeview.index() now always returns int.
* ttk.Treeview.tag_has() now always returns 0 or 1.
* And numerous other errors in methods which returns a tuple, list or dict.
* Fixed ttk tests for wantobjects is False.
2014-01-07 19:27:42 +02:00
Victor Stinner cc26310e2e Issue #20162: test_hash_distribution() uses subTest() to mention the prefix in
the error message.
2014-01-07 14:40:51 +01:00
Eric Snow 1500d49c22 Issue 19713: Add PEP 451-related deprecations. 2014-01-06 20:49:04 -07:00
Eric Snow 02b9f9d6bb Remove more usage of APIs deprecated by PEP 451. 2014-01-06 20:42:59 -07:00
Eric Snow 3a62d14b24 Issue #19703: Update pydoc to use the new importer APIs. 2014-01-06 20:42:59 -07:00
Eric Snow 3192eac6cf Remove dead PEP 451 code. 2014-01-06 20:38:16 -07:00
Guido van Rossum 3845521b4b asyncio: Fix deadlock in readexactly(). Fixes issue #20154. 2014-01-06 16:09:18 -08:00
Larry Hastings b7f5dcadf2 Merge 3.4.0b2 release revisions back into mainline. 2014-01-06 07:24:19 -08:00
Ethan Furman df3ed242c0 Issue19995: %o, %x, %X now only accept ints 2014-01-05 06:50:30 -08:00
Larry Hastings a6c55232ab Bump version number for 3.4.0b2. 2014-01-05 04:40:25 -08:00
Larry Hastings bfd715ebd1 Regenerated pydoc/topics.py, and fix a "suspicious" doc error. 2014-01-05 04:35:56 -08:00
Eric Snow 5ea97506a2 Issue 20123: Disable a problematic test. 2014-01-04 23:04:27 -07:00
Eric Snow 0dddf4258a Issue 20123: try using a different builtin module in a pydoc test.
The test is failing on one of the stable FreeBSD buildbots.  It seems
unlikely that the gc module would not be available, so switching to
_imp may not fix the problem.
2014-01-04 21:56:07 -07:00
R David Murray 410d320703 whatsnew: XMLPullParser, plus some doc updates.
I was confused by the text saying that read_events "iterated", since it
actually returns an iterator (that's what a generator does) that the
caller must then iterate.  So I tidied up the language.  I'm not sure
what the sentence "Events provided in a previous call to read_events()
will not be yielded again." is trying to convey, so I didn't try to fix that.

Also fixed a couple more news items.
2014-01-04 23:52:50 -05:00
Eric Snow aed5b22ead Issue 20123: Fix pydoc.synopsis() for "binary" modules.
Also add missing tests to test_pydoc.
2014-01-04 20:38:11 -07:00
Eric Snow 37148b27ac Issue #19708: Update pkgutil to use the new importer APIs. 2014-01-04 15:09:53 -07:00
Eric Snow 335e14dd1a Issue #19713: Move away from using find_module/load_module. 2014-01-04 15:09:28 -07:00
Eric Snow d749c7ae68 Issue #19927: Add __eq__ to path-based loaders in importlib. 2014-01-04 15:06:49 -07:00
Martin v. Löwis 24e43308b7 * Issue #16113: Remove sha3 module again.
Patch by Christian Heimes, with modifications.
2014-01-03 14:05:06 +01:00
Eric Snow fbc785188d Issue #20097: Fix bad use of "self" in importlib's WindowsRegistryFinder. 2014-01-02 22:25:00 -07:00
Daniel Holth 9dee304205 Issue #18585: speed zipfile import by only generating zipfile._ZipDecryptor on demand 2014-01-02 23:17:21 -05:00
Victor Stinner daeffd2c08 audioop: adpcm2lin() and lin2adpcm() now raises a TypeError instead of a
SystemError if the state type is invalid.
2014-01-03 03:26:47 +01:00
Benjamin Peterson 3e6ab1715d avoid parameter name clash (closes #20108) 2014-01-02 12:24:08 -06:00
Victor Stinner 6f055e73df asyncio: make PY34 symbol private (rename it to _PY34) 2014-01-02 18:41:34 +01:00
Antoine Pitrou 1b02da95d2 Issue #20111: pathlib.Path.with_suffix() now sanity checks the given suffix. 2014-01-03 00:07:17 +01:00
Benjamin Peterson c22eaecd53 merge 3.3 (closes #20108) 2014-01-02 12:26:50 -06:00
Zachary Ware 393a94243f Issue #20101: Merge with 3.3 2014-01-02 09:43:09 -06:00
Zachary Ware 487aedb77c Issue #20101: Allow test_monotonic to pass on Windows machines on which
time.get_clock_info('monotonic').resolution == 0.015600099999999999

This is just a workaround pending a real resolution to #20101.
2014-01-02 09:41:10 -06:00
Donald Stufft f7f58f8db5 Update pip to the released 1.5 2014-01-02 09:33:35 -05:00
Victor Stinner 009771ee6b (Merge 3.3) Issue #18829: Add tests for the csv module for invalid characters
(delimiter, escapechar, quotechar)
2014-01-02 12:53:50 +01:00
Victor Stinner 6a31b0fa19 Issue #18829: Add tests for the csv module for invalid characters (delimiter,
escapechar, quotechar)
2014-01-02 12:53:13 +01:00
Antoine Pitrou b672888092 Issue #20055: Fix test_shutil under Windows with symlink privileges held.
Patch by Vajrasky Kok.
2014-01-01 02:51:58 +01:00
Antoine Pitrou 3f48ac98c0 Issue #20055: Fix test_shutil under Windows with symlink privileges held.
Patch by Vajrasky Kok.
2014-01-01 02:50:45 +01:00
Donald Stufft d9ddd3f9ba Update setuptools to 2.0.2 2013-12-31 06:52:47 -05:00
Donald Stufft 73777c48dd Update pip to 1.5rc4 2013-12-31 06:49:54 -05:00
Zachary Ware bfd488c51f Issue #19544, #6516: check ZLIB_SUPPORT, not zlib (which might not be bound) 2013-12-30 15:09:20 -06:00
Zachary Ware efa2e04033 Issue19619: skip zlib error test when zlib not available 2013-12-30 14:54:11 -06:00
Zachary Ware 2ee2c95595 Issue #19544, #6516: check ZLIB_SUPPORT, not zlib (which might not be bound) 2013-12-30 14:39:46 -06:00
Senthil Kumaran b6fac245b5 Backporing the fix from Issue #12692 2013-12-28 17:36:18 -08:00
Antoine Pitrou 3e86ba4e32 Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl module, rather than silently let them emit clear text data. 2013-12-28 17:26:33 +01:00
Antoine Pitrou b5c66f8645 Fix breakage in TestSuite.countTestCases() introduced by issue #11798. 2013-12-28 20:37:58 +01:00
Antoine Pitrou 156b3610b8 Issue #19918: Fix PurePath.relative_to() under Windows. 2013-12-28 19:49:04 +01:00
Guido van Rossum 68816ef058 Export asyncio.iscoroutine[function]. 2013-12-28 08:06:40 -10:00
Antoine Pitrou e6d2f159fc Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl module, rather than silently let them emit clear text data. 2013-12-28 17:30:51 +01:00
Antoine Pitrou c1764dd350 Issue #19648: implement empty tests in pickletester. Patch by Gennadiy Zlobin. 2013-12-28 16:57:37 +01:00
R David Murray ecff5e51a5 #18116: backport fix to 3.3 since real-world failure mode demonstrated.
In issue 20074 it was pointed out that getpass would fail with a traceback if
stdin was, for example /dev/null, which is a non-unlikely scenario.

Also backported the tests from issue 17484 as modified by issue 18116.

(What I really did was copy getpass.py and test_getpass.py from their
state on tip as of 17bd04fbf3d3).
2013-12-27 11:24:32 -05:00
Donald Stufft 1896dc5efd Update bundled pip to 1.5rc3 2013-12-27 02:07:49 -05:00
Serhiy Storchaka 8c4f57d1d5 Issue #20046: Locale alias table no longer contains entities which can be
calculated.  Generalized support of the euro modifier.
2013-12-27 00:56:53 +02:00
Serhiy Storchaka e190fac5f9 Issue #20027: Fixed locale aliases for devanagari locales. 2013-12-26 21:21:52 +02:00
Serhiy Storchaka 5eb01530b2 Issue #20027: Fixed locale aliases for devanagari locales. 2013-12-26 21:20:59 +02:00
Serhiy Storchaka 1b97ed5abc Issue #20067: Tkinter variables now work when wantobjects is false. 2013-12-26 20:06:43 +02:00
Serhiy Storchaka d97c01ff28 Issue #20067: Tkinter variables now work when wantobjects is false. 2013-12-26 20:06:05 +02:00
doko@ubuntu.com e575148cc2 - Issue #20070: Don't run test_urllib2net when network resources are not
enabled.
2013-12-26 17:37:11 +01:00
Zachary Ware bb4b7c12fa Issue #19938: Re-enabled test_bug_1333982 in test_dis, which had been
disabled since 3.0 due to the changes in listcomp handling.
2013-12-26 09:55:24 -06:00
Zachary Ware e80e806b3a Issue #19938: Re-enabled test_bug_1333982 in test_dis, which had been
disabled since 3.0 due to the changes in listcomp handling.
2013-12-26 09:53:49 -06:00
Serhiy Storchaka b5d55184e0 test_debug in test_tkinter/test_text no longer fails when wantobjects is false. 2013-12-25 17:36:20 +02:00
Serhiy Storchaka a1de906330 test_debug in test_tkinter/test_text no longer fails when wantobjects is false. 2013-12-25 17:35:24 +02:00
Serhiy Storchaka cb131948fe Issue #19320: test_tcl no longer fails when wantobjects is false. 2013-12-25 17:29:41 +02:00
Serhiy Storchaka cc4290bf91 Issue #19320: test_tcl no longer fails when wantobjects is false. 2013-12-25 17:29:01 +02:00
Serhiy Storchaka 81d2be9580 Issue #19020: Tkinter now uses splitlist() instead of split() in configure
methods.
2013-12-25 16:36:43 +02:00
Serhiy Storchaka 848972cac1 Issue #19020: Tkinter now uses splitlist() instead of split() in configure
methods.
2013-12-25 16:35:38 +02:00
Serhiy Storchaka a7a4b4916f Issue #20058: sys.stdin.readline() in IDLE now always returns only one line. 2013-12-25 14:27:16 +02:00
Serhiy Storchaka 0fd557647d Issue #20058: sys.stdin.readline() in IDLE now always returns only one line. 2013-12-25 14:24:35 +02:00
R David Murray 3edcc7832e #16832: s/integer/object/ in docs/docstring, and add whatsnew entry. 2013-12-24 16:13:32 -05:00
Nick Coghlan ae2ee96ad7 Issue #19744: improve ensurepip error when ssl is missing 2013-12-23 23:07:07 +10:00
Nick Coghlan f71cae0a93 Issue #19728: fix ensurepip name clash with submodule
Also added refactoring and added basic tests for the argument
parsing in both ensurepip._main and ensurepip._uninstall._main.
2013-12-23 18:20:34 +10:00
Nick Coghlan 23f597e462 Further increase tolerance for slow buildbots 2013-12-23 18:17:20 +10:00
Nick Coghlan ed9af52ff0 Issue #19734: ignore pip env vars in ensurepip._uninstall 2013-12-23 17:39:12 +10:00
Nick Coghlan 6256fcbc97 Close #19734: ignore pip env vars in ensurepip 2013-12-23 16:16:07 +10:00
Benjamin Peterson eaedaeccf2 update Barry's email (#19563) 2013-12-22 19:45:38 -06:00
Benjamin Peterson 8fb007f329 merge 3.3 (#19563) 2013-12-22 19:45:53 -06:00
Antoine Pitrou 5bf8c3477d Fix bootstrap issue by importing the cgi module lazily 2013-12-22 19:41:31 +01:00
Antoine Pitrou e62a40401d Fix bootstrap issue by importing the cgi module lazily 2013-12-22 19:37:17 +01:00
Antoine Pitrou 20d5adea6a Fix TypeError on "setup.py upload --show-response". 2013-12-22 18:14:56 +01:00
Antoine Pitrou 335a5128e5 Fix TypeError on "setup.py upload --show-response". 2013-12-22 18:13:51 +01:00
Antoine Pitrou e8d07a9885 Issue #12226: HTTPS is now used by default when connecting to PyPI. 2013-12-22 01:45:42 +01:00
Antoine Pitrou f60b7df9f8 Issue #12226: HTTPS is now used by default when connecting to PyPI. 2013-12-22 01:35:53 +01:00
Antoine Pitrou 23b8cd963d Fix urllib.request.build_opener mocking in test_distutils (should fix some random buildbot failures) 2013-12-22 00:44:28 +01:00
Antoine Pitrou 6783487757 Fix urllib.request.build_opener mocking in test_distutils (should fix some random buildbot failures) 2013-12-22 00:44:01 +01:00
Antoine Pitrou 29fd05f900 Issue #20045: Fix "setup.py register --list-classifiers". 2013-12-21 22:59:06 +01:00
Antoine Pitrou 716b7222e9 Issue #20045: Fix "setup.py register --list-classifiers". 2013-12-21 22:57:56 +01:00
Antoine Pitrou 492b9893e1 Fix DeprecationWarnings in test suite 2013-12-21 22:19:46 +01:00
Antoine Pitrou 2b7f69851d Issue #18879: When a method is looked up on a temporary file, avoid closing the file before the method is possibly called. 2013-12-21 22:16:19 +01:00
Antoine Pitrou 17c93260a6 Issue #18879: When a method is looked up on a temporary file, avoid closing the file before the method is possibly called. 2013-12-21 22:14:56 +01:00
Christian Heimes 266772abe9 merge 2013-12-21 16:19:57 +01:00
Christian Heimes af01f66817 Issue #16136: Remove VMS support and VMS-related code 2013-12-21 16:19:10 +01:00
Antoine Pitrou 712cb734bd Issue #20037: Avoid crashes when doing text I/O late at interpreter shutdown. 2013-12-21 15:51:54 +01:00
Christian Heimes 5255b86fba skip multiprocessing main handling test when Python is built without threads 2013-12-21 15:47:24 +01:00
Guido van Rossum 68600c73bf asyncio: Fix space in log message about poll time. 2013-12-20 20:37:41 -08:00
Donald Stufft 8b36dace41 Upgrade pip to 1.5rc2 and setuptools to 2.0.1 2013-12-20 19:03:18 -05:00
Victor Stinner e40c078627 Issue #19967: Defer the formating of the traceback in asyncio.Future destructor 2013-12-21 00:19:33 +01:00
Guido van Rossum ac97bf4fd9 asyncio: Export all abstract protocol and transport classes. Fixes issue #20029. 2013-12-20 14:16:21 -08:00
Zachary Ware bdce938af2 Update test.outstanding_bugs.py 2013-12-20 13:25:07 -06:00
Zachary Ware 32e57ef023 Update test.outstanding_bugs.py 2013-12-20 13:25:53 -06:00
Serhiy Storchaka 6e6ec50f82 Issue #20034: Updated alias mapping to most recent locale.alias file
from X.org distribution using makelocalealias.py.
2013-12-20 18:50:32 +02:00
Serhiy Storchaka 715233c3cd Issue #20034: Updated alias mapping to most recent locale.alias file
from X.org distribution using makelocalealias.py.
2013-12-20 18:23:26 +02:00
Nick Coghlan 05385292e9 Issue #19946: use public API for multiprocessing start methods
This should appease the OpenIndiana buildbot.

Also lengthened the worst case timeout to try to eliminate
the inconsistent failure on one of the Windows 7 buildbots.
2013-12-20 22:14:03 +10:00
Guido van Rossum 9ba75db3c5 asyncio: Clean up formatting. 2013-12-19 13:49:32 -08:00
Victor Stinner 4c3c699e62 Close #19967: Thanks to the PEP 442, asyncio.Future can use a destructor in
Python 3.4 to log "uncatched" exceptions, instead of the dedicated
_TracebackLogger class.
2013-12-19 22:42:40 +01:00
Guido van Rossum 994bf4332f Shorten lines. 2013-12-19 12:47:38 -08:00
Serhiy Storchaka bea3534efe Don't use sebTest() in tests for issue #5815. 2013-12-19 22:31:46 +02:00
Zachary Ware e36e8be2ee Issue #19683: Removed empty tests from test_minidom. Patch by Ajitesh Gupta. 2013-12-19 13:44:56 -06:00