Commit Graph

18973 Commits

Author SHA1 Message Date
Georg Brandl b3ac84322f #16040: fix unlimited read from connection in nntplib. 2014-10-12 08:50:11 +02:00
Georg Brandl 4480d30b8b ref #19855: skip uuid test_find_mac on non-Posix as in later branches 2014-10-01 22:31:04 +02:00
Georg Brandl 51c116223e Issue #19855: uuid.getnode() on Unix now looks on the PATH for the
executables used to find the mac address, with /sbin and /usr/sbin as
fallbacks.

Issue #11508: Fixed uuid.getnode() and uuid.uuid1() on environment with
virtual interface.  Original patch by Kent Frazier.

Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.

Issue #16102: Make uuid._netbios_getnode() work again on Python 3.
2014-09-30 19:34:19 +02:00
Georg Brandl 3bc35672a2 Backport b533cc11d114 to fix intermittent test_urllibnet failures. 2014-09-30 17:30:18 +02:00
Benjamin Peterson bbd0a323ae clear BufferedRWPair weakrefs on deallocation (closes #22517) 2014-09-29 22:46:57 -04:00
Senthil Kumaran 8b7e161ac3 backport context argument of urlopen (#22366) for pep 476 2014-09-19 15:23:30 +08:00
Antoine Pitrou cc23154d02 Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff bytes on a 32-bit platform. 2014-11-02 18:40:09 +01:00
Ezio Melotti 8b23f5cc7a #22751: fix test___all__ warning about modified environment in the tests. Patch by Michael Cetrulo. 2014-11-02 19:08:35 +02:00
Ned Deily 91f01e175a Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
When running tests in subprocesses with the regrtest -j option, a bug
in Cocoa Tk can result in a Tcl segfault.  Avoid the problem by forcing
Tk to fully initialize as an OS X gui process before destroying the
Tcl instance and creating another. (Original patch by Serhiy Storchaka)
2014-11-01 19:29:22 -07:00
Berker Peksag 8083cd6c3b Issue #22665: Add missing get_terminal_size and SameFileError to shutil.__all__. 2014-11-01 11:04:06 +02:00
Serhiy Storchaka b1847e7541 Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:37:50 +02:00
Serhiy Storchaka d9b8dc272a Merge heads 2014-10-31 00:57:57 +02:00
Serhiy Storchaka 4659cc0756 Issue #22410: Module level functions in the re module now cache compiled
locale-dependent regular expressions taking into account the locale.
2014-10-31 00:53:49 +02:00
Antoine Pitrou 2b2852b1b4 Issue #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now return False when the underlying stat call raises NotADirectoryError. 2014-10-30 23:14:03 +01:00
Zachary Ware 2acbae8016 Issue #22173: Update lib2to3 tests to use unittest test discovery. 2014-10-29 12:24:59 -05:00
Berker Peksag 8b63d3af9f Issue #22596: support.transient_internet() now also catches
ConnectionRefusedError exceptions wrapped by urllib.error.URLError.

This change should fix sporadic failures in test_urllib2net.
2014-10-25 05:42:30 +03:00
Berker Peksag f23530f569 Issue #22186: Fix typos in Lib/.
Patch by Févry Thibault.
2014-10-19 18:04:38 +03:00
Terry Jan Reedy dd09efdd53 Issue #20155: Fix non-buildbot test failure on Windows. Patch by Claudiu Popa,
revised by R. David Murray.
2014-10-18 17:10:09 -04:00
R David Murray 7570cbdc6b #9351: set_defaults on subparser is no longer ignored if set on parent.
Before, if a default was set on the parent parser, any default for that
variable set via set_defaults on a subparser would be ignored.  Now
the subparser set_defaults is honored.

Patch by Jyrki Pullianinen.
2014-10-17 19:55:11 -04:00
R David Murray 685b3495e1 #21991: make headerregistry params property MappingProxyType.
It is unlikely anyone is using the fact that the dictionary returned
by the 'params' attribute was previously writable, but even if someone
is the API is provisional so this kind of change is acceptable (and
needed, to get the API "right" before it becomes official).

Patch by Stéphane Wirtel.
2014-10-17 19:30:13 -04:00
Antoine Pitrou d696732025 Issue #22653: Fix an assertion failure in debug mode when doing a reentrant dict insertion in debug mode. 2014-10-18 00:35:00 +02:00
Zachary Ware be16d68071 Fix test_ctypes failure on OpenIndiana buildbot where _ctypes is not built 2014-10-17 14:24:14 -05:00
Zachary Ware baf45c590c Issue #16000: Convert test_curses to use unittest 2014-10-17 13:59:18 -05:00
Benjamin Peterson 3f9f612b7d merge 3.3 (#22643) 2014-10-15 13:40:01 -04:00
Benjamin Peterson 1cbb3fe775 merge 3.3 (#22643) 2014-10-15 11:48:41 -04:00
Antoine Pitrou fd39a89e0e Issue #22641: In asyncio, the default SSL context for client connections is now created using ssl.create_default_context(), for stronger security. 2014-10-15 16:58:21 +02:00
Ethan Furman 7184bac544 Issue20386: SocketType is again socket.socket; the IntEnum SOCK constants are SocketKind 2014-10-14 18:56:53 -07:00
Victor Stinner f67f460242 Issue #18643: asyncio.windows_utils now reuse socket.socketpair() on Windows if
available

Since Python 3.5, socket.socketpair() is now also available on Windows.

Make csock blocking before calling the accept() method, and fix also a typo in
an error message.
2014-10-14 22:56:25 +02:00
Ethan Furman 0ae550bdde Issue22506: added methods on base Enum class now show up in dir of Enum subclass (3.4) 2014-10-14 08:58:32 -07:00
Charles-François Natali 0f4f048fa5 Issue #22435: Fix a file descriptor leak when SocketServer bind fails. 2014-10-13 19:19:26 +01:00
R David Murray 7567865867 #20815: small readability improvements in ipaddress tests.
Patch by Michel Albert.  We don't normally do patches that just tweak
whitespace, but ipaddress is relatively new and the package maintainers
approved the patch.
2014-10-12 15:17:22 -04:00
R David Murray 90f7afda61 #11973: add test for previously fixed kevent signed/unsigned bug.
Patch by David Naylor.
2014-10-12 12:39:46 -04:00
Victor Stinner c8bd53f815 Issue #22601: run_forever() now consumes BaseException of the temporary task
If the coroutine raised a BaseException, consume the exception to not log a
warning. The caller doesn't have access to the local task.
2014-10-11 14:30:18 +02:00
Antoine Pitrou 9086f9260f Issue #22604: Fix assertion error in debug mode when dividing a complex number by (nan+0j). 2014-10-10 23:49:32 +02:00
Petri Lehtinen 3894b2a24f Issue #11694: Raise ConversionError in xdrlib as documented 2014-10-10 21:21:52 +03:00
Victor Stinner 866c4e2188 test_venv: use support.rmtree() instead of shutil.rmtree() to fix sporadic
failures on Windows
2014-10-10 14:23:00 +02:00
Berker Peksag b77983d2bd Issue #21456: Skip two tests in test_urllib2net.py if _ssl module not present.
Patch by Remi Pointel.
2014-10-10 14:34:16 +03:00
Antoine Pitrou 0ddbf4795f Issue #22462: Fix pyexpat's creation of a dummy frame to make it appear in exception tracebacks.
Initial patch by Mark Shannon.
2014-10-08 20:00:09 +02:00
Antoine Pitrou 1bf974dc6e Closes #21173: Fix len() on a WeakKeyDictionary when .clear() was called with an iterator alive. 2014-10-05 20:02:28 +02:00
Victor Stinner bed04a77ee cleanup test_posix 2014-10-05 17:37:59 +02:00
Victor Stinner 047b7ae566 Issue #22390: Remove files created by tests 2014-10-05 17:37:41 +02:00
Victor Stinner 8f437aac06 Issue #22290: Fix error handling in the _posixsubprocess module.
* Don't call the garbage collector with an exception set: it causes an
  assertion to fail in debug mode.
* Enhance also error handling if allocating an array for the executable list
  failed.
* Add an unit test for 4 different errors in the _posixsubprocess module.
2014-10-05 17:25:19 +02:00
Benjamin Peterson 91244e01bb separate cert loading tests into Windows and non-Windows cases 2014-10-03 18:17:15 -04:00
Benjamin Peterson 5915b0f924 also use openssl envvars to find certs on windows (closes #22449)
Patch by Christian Heimes and Alex Gaynor.
2014-10-03 17:27:05 -04:00
R David Murray 32562d7da3 #12780: update inspect test skipIf for PEP 3147.
The test needs to be skipped if unicodedata is either part of the
main binary (a repackaging of cpython on Windows?) or has python
source (pypy?).  PEP 3147 makes __file__ point to the .py source,
so we need to change the extension check from looking for the
old .pyc/.pyo to just looking for .py.

Note that this skip should never trigger on CPython itself, so
one could argue it should be dropped instead.  But since it exists,
why risk breaking someone else's python.
2014-10-03 11:15:38 -04:00
R David Murray b48cb29ac4 #8473: Add tests that doctest uses universal newlines in testfile.
Python3 does not have the bug covered by the issue.
2014-10-02 22:42:42 -04:00
Serhiy Storchaka 4601df58e7 Issue #20079: Fixed tests. 2014-10-02 11:36:12 +03:00
Victor Stinner 5083828d65 faulthandler: test_gil_released() now uses _sigsegv() instead of _read_null(),
because _read_null() cannot be used on AIX. On AIX, reading from NULL is
allowed: the first page of memory is a mapped read-only on AIX.
2014-09-30 13:54:14 +02:00
Benjamin Peterson c44eb73473 merge 3.3 (#22517) 2014-09-29 22:48:51 -04:00
Benjamin Peterson c31f12d196 check that exception messages are not empty (#22379)
Patch by Yongzhi Pan.
2014-09-28 12:56:42 -04:00
Serhiy Storchaka ca534ab495 Issue #9850: Fixed macpath.join() for empty first component. Patch by
Oleg Oshmyan.
2014-09-27 18:53:23 +03:00
Yury Selivanov d5a8f5807f asyncio.test_tasks: Fix test_env_var_debug to use correct asyncio module 2014-09-25 19:12:10 -04:00
Yury Selivanov 592ada9b4b asyncio: Improve canceled timer handles cleanup. Closes issue #22448.
Patch by Joshua Moore-Oliva.
2014-09-25 12:07:56 -04:00
Victor Stinner 29001c8319 test_faulthandler: fix typo 2014-09-25 00:38:48 +02:00
Berker Peksag f8c111d4d7 Issue #16056: Rename test method in test_statistics to avoid conflict. 2014-09-24 15:03:25 +03:00
Serhiy Storchaka 5e193ac0bd Issue #22427: TemporaryDirectory no longer attempts to clean up twice when
used in the with statement in generator.
2014-09-24 13:26:25 +03:00
Serhiy Storchaka cd9032d45b Fixed bytes literals in tests. 2014-09-23 23:04:21 +03:00
Serhiy Storchaka 46a34924e4 Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
directory attributes.
2014-09-23 22:40:23 +03:00
Serhiy Storchaka 026a399bf9 Fixed test_large_file_exception. Ported tests for large count of files
to AbstractTestZip64InSmallFiles.
2014-09-23 22:27:34 +03:00
Serhiy Storchaka cfbb394488 Issue #21866: ZipFile.close() no longer writes ZIP64 central directory
records if allowZip64 is false.
2014-09-23 21:34:24 +03:00
Serhiy Storchaka 44dae8bde3 Issue #22423: Fixed debugging output of the GROUPREF_EXISTS opcode in the re
module.
2014-09-21 22:47:55 +03:00
Serhiy Storchaka 1a5426dbaf Merge heads 2014-09-21 22:25:25 +03:00
Antoine Pitrou afe8d0646c Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line buffering, rather than block buffering. 2014-09-21 21:10:56 +02:00
Serhiy Storchaka 52005c2e13 Issue #22423: Unhandled exception in thread no longer causes unhandled
AttributeError when sys.stderr is None.
2014-09-21 22:08:13 +03:00
R David Murray 8a97896a76 #21091: make is_attachment a method.
Since EmailMessage is a provisional API we can fix API bugs in a
maintenance release, but I used a trick suggested by Serhiy to
maintain backward compatibility with 3.4.0/1.
2014-09-20 18:05:28 -04:00
R David Murray 97dfad7856 #21079: is_attachment now looks only at the value, ignoring parameters. 2014-09-20 17:44:53 -04:00
Berker Peksag 96756b6a27 Issue #22247: Add NNTPError to nntplib.__all__. 2014-09-20 08:53:05 +03:00
Antoine Pitrou cb0a006fd1 Issue #4180: The warnings registries are now reset when the filters are modified. 2014-09-18 02:40:46 +02:00
Victor Stinner 1b38bc65dd asyncio, Tulip issue 206: In debug mode, keep the callback in the
representation of Handle and TimerHandle after cancel().
2014-09-17 23:24:13 +02:00
Senthil Kumaran 86c9e1877c Merge from 3.3
Issue #22419: Limit the length of incoming HTTP request in wsgiref server to 65536 bytes.
2014-09-17 16:31:47 +08:00
Senthil Kumaran e025b52db0 Issue #22419: Limit the length of incoming HTTP request in wsgiref server to 65536 bytes. 2014-09-17 16:29:29 +08:00
Senthil Kumaran aa72b1b448 Merge from 3.3
Issue #22421 - Secure pydoc server run. Bind it to localhost instead of all interfaces.
2014-09-17 13:19:01 +08:00
Senthil Kumaran 2a42a0bff3 Issue #22421 - Secure pydoc server run. Bind it to localhost instead of all interfaces. 2014-09-17 13:17:58 +08:00
Antoine Pitrou bc2c4c9990 Replace bad ftp URLs in test_urllib2net 2014-09-17 00:39:21 +02:00
Antoine Pitrou 637e4544af Lax cookie parsing in http.cookies could be a security issue when combined
with non-standard cookie handling in some Web browsers.

Reported by Sergey Bobrov.
2014-09-17 00:25:57 +02:00
Antoine Pitrou 7d0b8f95e7 Lax cookie parsing in http.cookies could be a security issue when combined
with non-standard cookie handling in some Web browsers.

Reported by Sergey Bobrov.
2014-09-17 00:23:55 +02:00
Nick Coghlan 8fad1676a2 Issue #22166: clear codec caches in test_codecs 2014-09-15 23:50:44 +12:00
Serhiy Storchaka b85a97600a Restored re pickling test. 2014-09-15 11:33:19 +03:00
Serhiy Storchaka d9cf65f00e Use more appropriate asserts in re tests. 2014-09-14 16:20:20 +03:00
Serhiy Storchaka a25875cfd0 Fixed re tests incorrectly ported from 2.x to 3.x. 2014-09-14 15:56:27 +03:00
Vinay Sajip d1d4fbff63 Issue #22386: fixed regression. 2014-09-11 23:06:09 +01:00
Serhiy Storchaka abf68ce164 Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
empty string or tuple argument.

On some platforms Tcl memory allocator returns NULL when allocating zero-sized
block of memory.
2014-09-11 10:57:13 +03:00
Serhiy Storchaka 8f0a1d0f28 Issue #22226: Added private function _splitdict() in the Tkinter module.
First letter no longer is stripped from the "status" key in
the result of Treeview.heading().
2014-09-06 22:47:58 +03:00
Serhiy Storchaka f54c350160 Issue #19524: Fixed resource leak in the HTTP connection when an invalid
response is received.  Patch by Martin Panter.
2014-09-06 21:41:39 +03:00
Serhiy Storchaka 607cb9cf99 Issue #22221: Add tests for compile() with source encoding cookie. 2014-09-05 11:00:56 +03:00
Victor Stinner 88b215e20f Issue #21440: test_zipfile: replace last direct calls to os.remove() with
support.unlink()
2014-09-04 00:51:09 +02:00
Victor Stinner 57004c696a Issue #21440: Backport changeset 4ebf97299b18 to branch 3.4, use
support.rmtree() and support.unlink() in test_zipfile & test_tarfile
2014-09-04 00:49:01 +02:00
Victor Stinner 19c899c1b1 Issue #20957: test_smtpnet now uses support.transient_internet() to call
check_ssl_verifiy(), so only test_connect_using_sslcontext_verified() is
skipped if smtp.gmail.com cannot be joined, not the whole file.
2014-09-04 00:35:43 +02:00
Victor Stinner 2bb8a08159 Issue #22332: test_multiprocessing_main_handling is now skipped if sem_open
implementation is broken (ex: skipped on FreeBSD 6.4).
2014-09-03 23:48:08 +02:00
Victor Stinner 6ab728612d Issue #22331: Skip test_interrupted_write_text() on FreeBSD older than 8.0 2014-09-03 23:32:28 +02:00
Berker Peksag a42ad6bf84 Remove unused imports. 2014-09-01 12:33:12 +03:00
Berker Peksag a7614d08bf Issue #19447: Suppress output of py_compile.compile(). 2014-09-01 12:29:53 +03:00
Victor Stinner d5aeccf976 asyncio, Tulip issue 205: Fix a race condition in BaseSelectorEventLoop.sock_connect()
There is a race condition in create_connection() used with wait_for() to have a
timeout. sock_connect() registers the file descriptor of the socket to be
notified of write event (if connect() raises BlockingIOError). When
create_connection() is cancelled with a TimeoutError, sock_connect() coroutine
gets the exception, but it doesn't unregister the file descriptor for write
event. create_connection() gets the TimeoutError and closes the socket.

If you call again create_connection(), the new socket will likely gets the same
file descriptor, which is still registered in the selector. When sock_connect()
calls add_writer(), it tries to modify the entry instead of creating a new one.

This issue was originally reported in the Trollius project, but the bug comes
from Tulip in fact (Trollius is based on Tulip):
https://bitbucket.org/enovance/trollius/issue/15/after-timeouterror-on-wait_for

This change fixes the race condition. It also makes sock_connect() more
reliable (and portable) is sock.connect() raises an InterruptedError.
2014-08-31 15:07:57 +02:00
R David Murray 0cff49fcf9 #22215: have the smtplib 'quit' command reset the state.
Without this reset, starttls would fail if a connect/starttls was done after a
quit, because smtplib assumed the existing value of emspt_features was
accurate, but it gets reset when starttls completes (and the new value does
not contain the starttls capability, since tls is already started at that
point).  (There may be additional places where this lack of reset was an
issue as well.)

Patch by Milan Oberkirch.
2014-08-30 16:51:59 -04:00
Victor Stinner 59e0802301 asyncio, Tulip issue 201: Fix a race condition in wait_for()
Don't raise a TimeoutError if we reached the timeout and the future completed
in the same iteration of the event loop. A side effect of the bug is that
Queue.get() looses items.
2014-08-28 11:19:25 +02:00
Stefan Krah 298131a448 Issue #22090: Fix '%' formatting for infinities and NaNs. 2014-08-26 20:46:49 +02:00
Victor Stinner 52bb949fd3 asyncio, tulip issue 203: Add _FlowControlMixin.get_write_buffer_limits() method 2014-08-26 00:22:28 +02:00
Victor Stinner b261475a48 asyncio: sync with Tulip
* PipeServer.close() now cancels the "accept pipe" future which cancels the
  overlapped operation.
* Fix _SelectorTransport.__repr__() if the transport was closed
* Fix debug log in BaseEventLoop.create_connection(): get the socket object
  from the transport because SSL transport closes the old socket and creates a
  new SSL socket object. Remove also the _SelectorSslTransport._rawsock
  attribute: it contained the closed socket (not very useful) and it was not
  used.
* Issue #22063: socket operations (sock_recv, sock_sendall, sock_connect,
  sock_accept) of the proactor event loop don't raise an exception in debug
  mode if the socket are in blocking mode. Overlapped operations also work on
  blocking sockets.
* Fix unit tests in debug mode: mock a non-blocking socket for socket
  operations which now raise an exception if the socket is blocking.
* _fatal_error() method of _UnixReadPipeTransport and _UnixWritePipeTransport
  now log all exceptions in debug mode
* Don't log expected errors in unit tests
* Tulip issue 200: _WaitHandleFuture._unregister_wait() now catchs and logs
  exceptions.
* Tulip issue 200: Log errors in debug mode instead of simply ignoring them.
2014-08-25 23:20:52 +02:00
Benjamin Peterson 8e16351545 allow test to work on implementations not using ref-counting (closes #22265) 2014-08-24 18:07:28 -05:00
Benjamin Peterson 18bb702182 fix some test_weakref tests to not rely on ref-counting (closes #22267) 2014-08-24 18:02:15 -05:00
Serhiy Storchaka 549c1972f2 Issue #22034: Got rid of misleading error message for bytearray arguments in
posixpath.join().
2014-08-24 12:18:09 +03:00
Serhiy Storchaka d00aff2f62 Issue #22236: Tkinter tests now don't reuse default root window. New root
window is created for every test class.

Fixed Tkinter images copying operations in NoDefaultRoot mode.

Tcl command names generated for "after" callbacks now contains a name of
original function.
2014-08-24 09:07:47 +03:00
Berker Peksag 0242f79051 Issue #19447: Use importlib.util.cache_from_source() instead of ``bad_coding + 'c'``.
Thanks to Arfrever Frehtes Taifersar Arahesis.
2014-08-22 20:52:15 +03:00
Berker Peksag 31f8a677a4 Issue #19447: Add a test case to py_compile.compile() to make sure
it don't raise an exception if doraise is False.

Patch by Bohuslav "Slavek" Kabrda.
2014-08-22 20:17:32 +03:00
Brett Cannon 14ad5319d9 Issue #22191: Fix warnings.__all__.
Thanks to Jon Poler for the patch.
2014-08-22 10:44:47 -04:00
Senthil Kumaran a969ae2e11 Fix issue22245 - Fix urllib2_localnet test.
Do not aggresively close wfile in the do_GET method in the BasicAuthHandler.
2014-08-22 16:26:21 +05:30
Senthil Kumaran 783737625d Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull. 2014-08-20 07:53:58 +05:30
Serhiy Storchaka 996c3deafe Fixed typo. 2014-08-19 18:20:23 +03:00
Serhiy Storchaka 76b47655ff Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows. 2014-08-19 17:11:20 +03:00
Serhiy Storchaka d6ec309c36 Clean up test_user_command. 2014-08-18 17:47:29 +03:00
Serhiy Storchaka d9e9528818 Issue #22165: Fixed test_undecodable_filename on Mac OS. 2014-08-17 16:57:39 +03:00
Serhiy Storchaka a64ce5d744 Issue #22165: Fixed test_undecodable_filename on non-UTF-8 locales. 2014-08-17 12:20:02 +03:00
Serhiy Storchaka cb5bc408ad Issue #22165: SimpleHTTPRequestHandler now supports undecodable file names. 2014-08-17 08:22:11 +03:00
Senthil Kumaran 402df0975c backout changeset 3435c5865cfc due to buildbot failures. Ref #8797 2014-08-16 22:52:37 +05:30
Victor Stinner 7869a4e03a Closes #22188: test_gdb now runs gdb with -nx: "Do not execute commands from
any .gdbinit initialization files".
2014-08-16 14:38:02 +02:00
Victor Stinner 8e7966b00e Closes #22205: sys._debugmallocstats is a cpython specific feature, so
test_debugmallocstats should be marked as such. Patch written by Martin
Matusiak.
2014-08-16 14:11:01 +02:00
Senthil Kumaran b2e3a939bf Fix Issue #8797: Raise HTTPError on failed Basic Authentication immediately. Initial patch by Sam Bull. 2014-08-16 14:17:38 +05:30
Berker Peksag 143fe05da1 Issue #21445: Pass exception messages correctly to assertTrue in
the FileCompareTestCase.test_matching test.

Patch by Steven Barker.
2014-08-14 08:34:32 +03:00
Serhiy Storchaka cd3aacf525 Issue #20729: Restored the use of lazy iterkeys()/itervalues()/iteritems()
in the mailbox module.  This is partial rollback of changeset f340cb045bf9.
2014-08-13 09:35:21 +03:00
Raymond Hettinger 4d58897fdb Issue 22184: Early detection and reporting of missing lru_cache parameters 2014-08-12 12:44:52 -07:00
Serhiy Storchaka 4d83192ea0 Decreased memory requirements of new tests added in issue21448. 2014-08-12 20:22:48 +03:00
Serhiy Storchaka 320a1c0ff7 Issue #21448: Fixed FeedParser feed() to avoid O(N**2) behavior when parsing long line.
Original patch by Raymond Hettinger.
2014-08-12 13:59:11 +03:00
Antoine Pitrou c04d468333 Issue #20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier de Gaye. 2014-08-11 21:40:38 -04:00
Victor Stinner 6d201685e4 Close #22175: Improve test_faulthandler readability with dedent.
Patch written by Xavier de Gaye.
2014-08-10 19:50:08 +02:00
Zachary Ware 5a794c16d9 Issue #22060: Clean up/simplify test_ctypes, use test discovery 2014-08-08 13:32:16 -05:00
Serhiy Storchaka 41ad77c697 Issue #20056: Fixed deprecation warning about bytes path in test_shutil on
Windows.  Path by Vajrasky Kok.
2014-08-07 19:38:37 +03:00
Ezio Melotti 12b7f48216 #11955: show the list of args in case of error in test_argparse. 2014-08-05 02:24:03 +03:00
Zachary Ware 69fb6a41c5 Issue #22104: Don't hold a reference to the loaded TestSuite in runtest_inner 2014-08-04 11:15:10 -05:00
Ezio Melotti d577480197 #20977: fix undefined name in the email module. Patch by Rose Ames. 2014-08-04 17:16:49 +03:00
Serhiy Storchaka 74596a887a Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
In particular this allows to initialize images from binary data.
2014-07-30 18:33:13 +03:00
Serhiy Storchaka 95a9e0bf8c Issue #21951: Temporary skip crashing test_user_command on AIX. 2014-07-30 10:59:46 +03:00
Victor Stinner 9c9f1f10d3 Close #22063: socket operations (socket,recv, sock_sendall, sock_connect,
sock_accept) now raise an exception in debug mode if sockets are in blocking
mode.
2014-07-29 23:08:17 +02:00
Victor Stinner f2ed889027 asyncio: Use the new os.set_blocking() function of Python 3.5 if available 2014-07-29 23:08:00 +02:00
Victor Stinner 313a980904 asyncio: sync with Tulip
* _WaitHandleFuture.cancel() now notify IocpProactor through the overlapped
  object that the wait was cancelled.
* Optimize IocpProactor.wait_for_handle() gets the result if the wait is
  signaled immediatly.
* Enhance representation of Future and Future subclasses

  - Add "created at filename:lineno" in the representation
  - Add Future._repr_info() method which can be more easily overriden than
    Future.__repr__(). It should now be more easy to enhance Future
    representation without having to modify each subclass. For example,
    _OverlappedFuture and _WaitHandleFuture get the new "created at" information.
  - Use reprlib to format Future result, and function arguments when formatting a
    callback, to limit the length of the representation.

* Fix repr(_WaitHandleFuture)
* _WaitHandleFuture and _OverlappedFuture: hide frames of internal calls in the
  source traceback.
* Cleanup ProactorIocp._poll(): set the timeout to 0 after the first call to
  GetQueuedCompletionStatus()
* test_locks: close the temporary event loop and check the condition lock
* Remove workaround in test_futures, no more needed
2014-07-29 12:58:23 +02:00
Victor Stinner c61c170b41 Issue #18174: Fix leak of file descriptor in test_tempfile 2014-07-29 01:13:39 +02:00
Victor Stinner 623138c163 Issue #11453, #18174: Fix leak of file descriptor in test_asyncore 2014-07-29 01:01:09 +02:00
Victor Stinner 0970657f01 Fix sporadic failure of test_pep277 on Windows: use support.rmtree() instead of
deltree().
2014-07-29 00:40:50 +02:00
Victor Stinner 7611964b2c Fix test_bytes when sys.stdin is None, for example on Windows when using
pythonw.exe instead of python.exe
2014-07-28 22:07:07 +02:00
Antoine Pitrou d2e9fdfbde Issue #22074: Fix Lib/test/make_ssl_certs.py 2014-07-26 11:15:52 -04:00
Andrew Svetlov f21fcd09c5 Accept optional lock object in Condition ctor (tulip issue #198) 2014-07-26 17:54:34 +03:00
Victor Stinner e254e53c83 Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
on closed socket. repr(socket.socket) already works fine.
2014-07-26 14:36:55 +02:00
Raymond Hettinger 5a2146a2fd Issue #22044: Fixed premature DECREF in call_tzinfo_method. 2014-07-25 14:59:48 -07:00
Charles-François Natali e396c363cb Merge. 2014-07-25 18:45:02 +01:00
Charles-François Natali 65708cf510 Issue #19875: Fix random test_getsockaddrarg() failure. 2014-07-25 18:44:30 +01:00
Victor Stinner 2955a0bf06 asyncio, test_subprocess: relax timings for slow builbots 2014-07-25 14:05:07 +02:00
Victor Stinner fea6a100dc asyncio: sync with Tulip
Improve stability of the proactor event loop, especially operations on
overlapped objects:

* Tulip issue 195: Don't call UnregisterWait() twice if a _WaitHandleFuture is
  cancelled twice to fix a crash.
* IocpProactor.close(): cancel futures to cancel overlapped operations, instead
  of cancelling directly overlapped operations. Future objects may not call
  ov.cancel() if the future was cancelled or if the overlapped was already
  cancelled. The cancel() method of the future may also catch exceptions. Log
  also errors on cancellation.
* tests: rename "f" to "fut"
* Add a __repr__() method to IocpProactor
* Add a destructor to IocpProactor which closes it
* _OverlappedFuture.cancel() doesn't cancel the overlapped anymore if it is
  done: if it is already cancelled or completed. Log also an error if the
  cancellation failed.
* Add the address of the overlapped object in repr(_OverlappedFuture)
* _OverlappedFuture truncates the source traceback to hide the call to the
  parent constructor (useless in debug).
2014-07-25 00:54:53 +02:00
Victor Stinner 45cff66cf6 Issue #16133: The asynchat.async_chat.handle_read() method now ignores
BlockingIOError exceptions. Initial patch written by Xavier de Gaye.

Document also in asyncore documentation that recv() may raise BlockingIOError.
2014-07-24 18:49:36 +02:00
Victor Stinner a3c80ce8b7 Issue #19884: readline: Disable the meta modifier key if stdout is not a
terminal to not write the ANSI sequence "\033[1034h" into stdout. This sequence
is used on some terminal (ex: TERM=xterm-256color") to enable support of 8 bit
characters.
2014-07-24 12:23:56 +02:00
Victor Stinner cdb2c601db test_gettext: use support.rmtree() instead of shutil.rmtree() 2014-07-24 12:07:45 +02:00
Victor Stinner 0e243612f8 asyncio tests: relax timings for slow buildbots 2014-07-24 12:04:22 +02:00