[issue25601] test_cpickle failure on the ware-gentoo-x86 builbot

2015-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Tests type: -> behavior versions: +Python 2.7 ___ Python tracker ___

[issue25601] test_cpickle failure on the ware-gentoo-x86 builbot

2015-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +alexandre.vassalotti, pitrou ___ Python tracker ___

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: Sorry for being obscure before, it was hard to pinpoint. I think I just figured it out! I had code like this in a subprocess: def worker(): while True: obj = self.queue.get() # do work with obj using asyncio http module def producer():

[issue25598] Fix memory_hex (#9951) for non-contiguous buffers

2015-11-11 Thread Stefan Krah
Changes by Stefan Krah : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-11 Thread R. David Murray
R. David Murray added the comment: Sure, why not. Having buildbots be green is good, and I doubt anyone is using mhlib any more even in python2. And if they are the chances this will break something seems extremely small. -- nosy: +r.david.murray

[issue25601] test_cpickle failure on the ware-gentoo-x86 buildbot

2015-11-11 Thread Zachary Ware
Zachary Ware added the comment: This also happened on my Windows buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%202.7/builds/195 That build is running again as build 196. -- ___ Python tracker

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The test now is passed. -- resolution: wont fix -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25599] asyncio.iscoroutinefunction returns unexpected results when presented with unittest.mock.Mock

2015-11-11 Thread Theron Luhn
Theron Luhn added the comment: For me, the context is a test I was writing that went something like this: >>> import asyncio >>> from unittest.mock import Mock >>> loop = asyncio.get_event_loop() >>> blocking_func = Mock() >>> loop.run_in_executor(None, blocking_func) Traceback (most recent

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: clarification, adding the fut.done() check, or monkey patching: orig_sock_connect_cb = asyncio.selector_events.BaseSelectorEventLoop._sock_connect_cb def _sock_connect_cb(self, fut, sock, address): if fut.done(): return return orig_sock_connect_cb(self,

[issue25601] test_cpickle failure on the ware-gentoo-x86 buildbot

2015-11-11 Thread Zachary Ware
Zachary Ware added the comment: I also have no idea how that happened, but seems to have been a fluke. Build 101 is fine, and nothing has changed on that box. -- ___ Python tracker

[issue25601] test_cpickle failure on the ware-gentoo-x86 buildbot

2015-11-11 Thread Zachary Ware
Zachary Ware added the comment: Build 196 on the Windows bot is fine. Could be a bizarre test ordering issue? Nothing else should have changed between builds 195 and 196 on the Windows bot. -- ___ Python tracker

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: Actually, I just realized I had fixed it locally by changing the callback to the following: 429 def _sock_connect_cb(self, fut, sock, address): 430 if fut.cancelled() or fut.done(): 431 return so a fix is still needed, and I also

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 37431d9abbcd by Serhiy Storchaka in branch '2.7': Issue #7759: Fixed the mhlib module on filesystems that doesn't support https://hg.python.org/cpython/rev/37431d9abbcd -- nosy: +python-dev ___ Python

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: I'm going to close this as I've found a work-around, if I find a better test-case I'll open a new bug. -- resolution: -> later status: open -> closed ___ Python tracker

[issue25601] test_cpickle failure on the ware-gentoo-x86 buildbot

2015-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: test_cpickle failure on the ware-gentoo-x86 builbot -> test_cpickle failure on the ware-gentoo-x86 buildbot ___ Python tracker

[issue25601] test_cpickle failure on the ware-gentoo-x86 builbot

2015-11-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%202.7/builds/100/steps/test/logs/stdio There are a lot of failures, all look as: == ERROR: test_simple_newobj

[issue25600] argparse, argument_default=argparse.SUPPRESS seems to have no effect

2015-11-11 Thread R. David Murray
R. David Murray added the comment: If you specify a default for an argument, that overrides the global default. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue25602] Add support for EVFILT_USER kqueue filter

2015-11-11 Thread Jakub Klama
New submission from Jakub Klama: It's useful for doing signaling between threads (especially I/O-bound threads). Related github pull request: https://github.com/python/cpython/pull/23 -- components: Library (Lib) files: 0001-Add-support-for-EVFILT_USER-kqueue-filter.patch keywords:

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not an expert on this terminology but don't you have that backwards? Assume we're using select() for a second. If you ask select() "is this FD ready" several times in a row without doing something to the FD it will answer yes every time once the FD is

[issue23883] __all__ lists are incomplete

2015-11-11 Thread Berker Peksag
Berker Peksag added the comment: I like Martin's support.expected_module_api() suggestion in msg247167. I still find passing self to a function just to use assertCountEqual a bit weird, but I can live with that. -- ___ Python tracker

[issue25603] spelling mistake - 26.1 typing

2015-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81cc0cea2323 by Zachary Ware in branch '3.5': Issue #25603: Add missing parenthesis. https://hg.python.org/cpython/rev/81cc0cea2323 New changeset 1af59662f6d5 by Zachary Ware in branch 'default': Closes #25603: Merge with 3.5

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: I don't believe this is a case of nonidempotent callbacks, unless you are referring to Future.set_result(), which by design can't be called twice. The callbacks are given an inconsistent opportunity to modify the poll set because of indeterminacy in the

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: Guido, Shouldn't this not be the case for level triggered polling? From looking at selectors it looks like these are always level triggered which means they should only event once. -- ___ Python tracker

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, but I don't like the idea of that patch. It feels like a hack that makes it less likely that the issue occurs, but I don't feel we should rely on the callbacks being called before checking the selector again. There may be other reasons (perhaps a

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: Attached server side of repro. -- Added file: http://bugs.python.org/file41017/Issue25593_repro_server.py ___ Python tracker

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: Just reproduced on Linux, Fedora Core 23. -- ___ Python tracker ___ ___

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: attaching my simplified testcase and logged an aiohttp bug: https://github.com/KeepSafe/aiohttp/issues/633 -- Added file: http://bugs.python.org/file41018/test_app.py ___ Python tracker

[issue24421] Race condition compiling Modules/_math.c

2015-11-11 Thread Mike Gilbert
Changes by Mike Gilbert : -- nosy: +floppymaster ___ Python tracker ___ ___

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: Attaching simplified test setup. It does take some doing to repro so the local async server is required to make it happen (for me). When I tried just pointing to python.org it would not repro in 100 iterations, but using a local dummy server repros 100%

[issue25603] spelling mistake - 26.1 typing

2015-11-11 Thread Matthias welp
New submission from Matthias welp: Almost at the end of the page, under Usage of Typing.NamedTuple(...), this code snippet occurs: `Employee = typing.NamedTuple('Employee', [('name', str), 'id', int)])`. Unfortunately, this has an error in its parenthesis. This can easily be fixed by adding

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: Nevermind, in the case of writeablity it won't matter either way. -- So in looking at tornado's ioloop they run the ready callbacks before calling poll(). So the callbacks can modify the poll set. -- ___ Python

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 10c3646b2d59 by Benjamin Peterson in branch '2.7': fix memory leak in _get_crl_dp (closes #25569) https://hg.python.org/cpython/rev/10c3646b2d59 New changeset aabe273b20ab by Benjamin Peterson in branch '3.4': fix memory leak in _get_crl_dp (closes

[issue25603] spelling mistake - 26.1 typing

2015-11-11 Thread Zachary Ware
Zachary Ware added the comment: Thanks for the report! -- nosy: +zach.ware versions: +Python 3.6 ___ Python tracker ___

[issue25530] ssl: OP_NO_SSLv3 should always be set unless a user specifically asks for it

2015-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset d80954d941c7 by Benjamin Peterson in branch '2.7': always set OP_NO_SSLv3 by default (closes #25530) https://hg.python.org/cpython/rev/d80954d941c7 New changeset 56f64ec9259f by Benjamin Peterson in branch '3.4': always set OP_NO_SSLv3 by default

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: I wonder if the bug is in aiohttp? The code you show is still too complex to debug for me. -- ___ Python tracker ___

[issue21748] glob.glob does not sort its results

2015-11-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: This code repros without aiohttp when pitted against the previously attached web server (again on OSX 10.11, mid-2012 MBPr). Admittedly this may seem very arbitrary but I have better reasons in my production code for stopping an IOLoop and starting it again

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: Justin's repro provides a clue: when the event loop is stopped before all callbacks have been processed, when the loop is restarted the I/O selector is asked again to do its work, and it will report all the same sockets as ready. So then the callback will be

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: I'm attaching a patch that runs `_ready` callbacks at the start of `_run_once`. The style and implications are ranging so I leave it to you at this point. -- keywords: +patch Added file:

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, the code you posted is still incomprehensible. E.g. I suppose your worker doesn't really have ``` obj = self.queue.get() ``` but rather something like ``` obj = yield from async_queue.get() ``` But in the end, even with that hypothesis, I can't explain

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: self.queue is not an async queue, as I stated above its a multiprocessing queue. This code is to multiplex a multiprocessing queue to a async queue. -- ___ Python tracker

[issue18689] add argument for formatter to logging.Handler and subclasses in logging module

2015-11-11 Thread Derek Wilson
Derek Wilson added the comment: > It's not an ideal world. Sorry, but I think this change is too invasive to > consider. Obviously its not ideal, which is why my suggestion doesn't require intelligent 3rd party libraries and is explicitly not invasive. As I said in my previous comment, using

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Justin Mayfield
Justin Mayfield added the comment: I believe I'm seeing this bug in a non-threaded and non-forked env. System: OSX 10.11.1 (15B42) Python 3.5.0 (from brew install) I'm using aiohttp to create several dozens of HTTP connections to the same server (an async tornado web server). Nothing

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2015-11-11 Thread Alexander Mohr
Alexander Mohr added the comment: Perhaps I'm doing something really stupid, but I was able to reproduce the two issues I'm having with the following sample script. If you leave the monkey patch disabled, you get the InvalidStateError, if you enable it, you get the ServerDisconnect errors

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is even simpler and more reliable patch. It works even if the subfolder is a symlink to the directory on the filesystem that doesn't support links counting for directories. -- Added file: http://bugs.python.org/file41011/mhlib_nlinks_3.patch

[issue25263] test_tkinter fails randomly on the buildbots "AMD64 Windows10" (3.4, 3.5, 3.x)

2015-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tests are fixed. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.4 ___ Python tracker

[issue23883] __all__ lists are incomplete

2015-11-11 Thread Jacek Kołodziej
Changes by Jacek Kołodziej : Added file: http://bugs.python.org/file41012/Issue23883_all.v6.patch ___ Python tracker ___

[issue23883] __all__ lists are incomplete

2015-11-11 Thread Jacek Kołodziej
Jacek Kołodziej added the comment: Serhiy, thank you for the review. I've made proposed changes (along with rebasing Issue23883_all patch; Issue23883_test_gettext.v3.patch still applies cleanly). -- Added file: http://bugs.python.org/file41013/Issue23883_support_check__all__.v6.patch