[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 ___

Re: Question about math.pi is mutable

2015-11-11 Thread Marko Rauhamaa
Steven D'Aprano : > Since compile, eval and exec are Python built-ins, if it doesn't > include a byte-code compiler, it isn't Python. It's just a subset of > Python. compile() can be implemented trivially, or in any other manner. It simply needs to return a

[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():

Re: Using subprocess to capture a progress line

2015-11-11 Thread Chris Warrick
On 10 November 2015 at 23:47, Tim Johnson wrote: > Using python 2.7.6 on ubuntu 14.04 > The application in question is run with bash and gnome-terminal : > > I've written a command-line "wrapper" for youtube-dl, executing > youtube-dl as a subprocess. > >

[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

Re: Using subprocess to capture a progress line

2015-11-11 Thread Chris Warrick
On 11 November 2015 at 17:16, Tim Johnson wrote: >> (2) [don’t do it] do you need to intercept the lines? If you don’t set >> stderr= and stdout=, things will print just fine. > Got to try that before using the module, just for edification. At which point your initial code

new to python, help please !!

2015-11-11 Thread Anas Belemlih
i am a beginning programmer, i am trying to write a simple code to compare two character sets in 2 seperate files. ( 2 hash value files basically) idea is: open both files, measure the length of the loop on. if the length doesn't match, == files do not match if length matchs, loop while

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Marko Rauhamaa
Ulli Horlacher : > What is the best practise for a cross platform timeout handler? Here's the simplest answer: https://docs.python.org/3/library/threading.html#threading.Timer (Also available in Python 2.) Marko --

[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

Re: new to python, help please !!

2015-11-11 Thread Tim Chase
On 2015-11-11 08:34, Anas Belemlih wrote: > i am a beginning programmer, i am trying to write a simple code > to compare two character sets in 2 seperate files. ( 2 hash value > files basically) idea is: open both files, measure the length of > the loop on. > > if the length doesn't match, ==

[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

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Ulli Horlacher
Marko Rauhamaa wrote: > Ulli Horlacher : > > > What is the best practise for a cross platform timeout handler? > > Here's the simplest answer: > >https://docs.python.org/3/library/threading.html#threading.Timer > > (Also available in Python

Re: new to python, help please !!

2015-11-11 Thread Ben Finney
Anas Belemlih writes: > i am a beginning programmer, i am trying to write a simple code to > compare two character sets in 2 seperate files. ( 2 hash value files > basically) Welcome, and congratulations on arriving at Python for your programming! As a beginning

[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

Re: Python.exe is not a valid Win32 application error message

2015-11-11 Thread Michael Torrie
On 11/11/2015 10:21 AM, Quivis wrote: > On Tue, 10 Nov 2015 00:34:23 +, M. Kamisato wrote: > >> I am running python on Windows XP SP3 and download version 3.5xx. I got >> the above error message and could not run the program. >> I have downloaded Python version 2.7xx and it runs fine. >> Is

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Marko Rauhamaa
Ulli Horlacher : > Hmmm... not so simple for me. My test code: > > from time import * > import threading > import sys > > def hello(): > raise ValueError("hello!!!") > > t = threading.Timer(3.0,hello) > t.start() > try: > print "start" > sleep(5) > print

Re: new to python, help please !!

2015-11-11 Thread John Gordon
In <93aef8e5-3d6f-41f4-a625-cd3c20076...@googlegroups.com> Anas Belemlih writes: > i=0 > s1=line1[i] > s2=line2[i] > count = 0 > if number1 != number2: > print " hash table not the same size" > else: > while count < number1: > if s1 == s2: >

[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

cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Ulli Horlacher
I am rewriting a Perl program into Python (2.7). It must run on Linux and Windows. With Linux I have no problems, but Windows... :-( The current show stopper is signal.SIGALRM which is not available on Windows: File "fexit.py", line 674, in formdata_post

Python.exe is not a valid Win32 application error message

2015-11-11 Thread M. Kamisato via Python-list
I am running python on Windows XP SP3 and download version 3.5xx.  I got the above error message and could not run the program. I have downloaded Python version 2.7xx and it runs fine. Is there any way I can get version 3.5xx to run on my computer? Mel KamisatoBuena Park, CA --

Re: Python.exe is not a valid Win32 application error message

2015-11-11 Thread Michael Torrie
On 11/11/2015 06:13 AM, Chris Angelico wrote: > On Tue, Nov 10, 2015 at 11:34 AM, M. Kamisato via Python-list > wrote: >> I am running python on Windows XP SP3 and download version 3.5xx. I got the >> above error message and could not run the program. >> I have

[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

Re: Using subprocess to capture a progress line

2015-11-11 Thread Tim Johnson
* Chris Warrick [15 00:55]: > On 10 November 2015 at 23:47, Tim Johnson wrote: > > Using python 2.7.6 on ubuntu 14.04 <..> > There is no \n character at the end — which means that > p.stdout.readline() cannot return. In fact, if you printed repr() of

[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

Re: Question about math.pi is mutable

2015-11-11 Thread Steven D'Aprano
On Wed, 11 Nov 2015 07:30 pm, Marko Rauhamaa wrote: > Steven D'Aprano : > >> Since compile, eval and exec are Python built-ins, if it doesn't >> include a byte-code compiler, it isn't Python. It's just a subset of >> Python. > > compile() can be implemented

xlwings v0.5.0 ads support for Matplotlib in Excel

2015-11-11 Thread Felix Zumstein
I am pleased to announce the release of xlwings v0.5.0: Amongst other new features and bug fixes, this release allow to use Matplotlib in Excel in just 2 lines of code. Watch: https://twitter.com/ZoomerAnalytics/status/664159348822835200 Check the Release Notes for full details:

Re: Guide in Deskop Application Development in Python for newbies

2015-11-11 Thread Leonard Andrew Mesiera
Thank you sir @Chris Warrick for your great suggestion, even though I really got overwhelmed by the things that I need to study to get this project done. I'm really new to programming so I havent heard or even tried DJANGO, but on your suggestion, if thats what I need to get my project done, that

Re: Python.exe is not a valid Win32 application error message

2015-11-11 Thread Chris Angelico
On Tue, Nov 10, 2015 at 11:34 AM, M. Kamisato via Python-list wrote: > I am running python on Windows XP SP3 and download version 3.5xx. I got the > above error message and could not run the program. > I have downloaded Python version 2.7xx and it runs fine. > Is there

[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:

Re: Guide in Deskop Application Development in Python for newbies

2015-11-11 Thread Leonard Andrew Mesiera
Thank you sir @Chris Warrick for your great suggestion, even though I really got overwhelmed by the things that I need to study to get this project done. I'm really new to programming so I havent heard or even tried DJANGO, but on your suggestion, if thats what I need to get my project done, that

pytest-benchmark v3.0 released!

2015-11-11 Thread Ionel Cristian Mărieș
Hello, I've just released a new version of the pytest plugin for benchmarks. It integrates very well into your pytest suite and has loads of features and options. It works very well on all sorts of scenarios - check it out! Docs: http://pytest-benchmark.readthedocs.org/en/stable/ Repository and

[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

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Terry Reedy
On 11/11/2015 11:16 AM, Ulli Horlacher wrote: I am rewriting a Perl program into Python (2.7). I recommend using 3.4+ if you possibly can. It must run on Linux and Windows. With Linux I have no problems, but Windows... :-( The current show stopper is signal.SIGALRM which is not available on

Re: More tkinter Madness

2015-11-11 Thread Paul Rubin
Tim Daneliuk writes: > Some months ago, I put it on a couple of VPS servers (FreeBSD > and Linux) and BOOM, it doesn't run. I asked around here and got some > suggestions and then did some homework. I'd expect a VPS server to have no display--is it an X client

[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

Re: How to get 'od' run?

2015-11-11 Thread Michael Torrie
On 11/11/2015 08:21 PM, Michael Torrie wrote: > On 11/11/2015 08:04 PM, fl wrote: >> Hi, >> >> I am learning python. I see a previous post has such code: >> >> >> >> >> >>>>> data = '"binääridataa"\n'.encode('utf-8') >>>>> f = open('roska.txt', 'wb') >>>>> f.write(data) >>17 >>

[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

Re: More tkinter Madness

2015-11-11 Thread Chris Angelico
On Thu, Nov 12, 2015 at 12:52 PM, Tim Daneliuk wrote: > I am the author of twander (https://www.tundraware.com/Software/twander). > This code has run flawlessly for years on FreeBSD, Linux, MacOS and > Windows. Some months ago, I put it on a couple of VPS servers

[issue24421] Race condition compiling Modules/_math.c

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

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Marko Rauhamaa
Terry Reedy : > The cross-platform 3.4 asyncio module has some functions with > timeouts. Even that doesn't forcefully interrupt an obnoxious blocking function call like time.sleep(1) The original question claimed signal.alarm() would do the trick in Linux. However,

[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%

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Cameron Simpson
On 11Nov2015 16:16, Ulli Horlacher wrote: I am rewriting a Perl program into Python (2.7). It must run on Linux and Windows. With Linux I have no problems, but Windows... :-( The current show stopper is signal.SIGALRM which is not available on Windows: File

[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

Re: Python.exe is not a valid Win32 application error message

2015-11-11 Thread Steve Hayes
On Wed, 11 Nov 2015 08:39:21 -0500, Dennis Lee Bieber wrote: >On Tue, 10 Nov 2015 00:34:23 + (UTC), "M. Kamisato via Python-list" > declaimed the following: > >>I am running python on Windows XP SP3 and download version 3.5xx.  I got the

[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

More tkinter Madness

2015-11-11 Thread Tim Daneliuk
I am the author of twander (https://www.tundraware.com/Software/twander). This code has run flawlessly for years on FreeBSD, Linux, MacOS and Windows. Some months ago, I put it on a couple of VPS servers (FreeBSD and Linux) and BOOM, it doesn't run. I asked around here and got some suggestions

Re: new to python, help please !!

2015-11-11 Thread Steven D'Aprano
On Thursday 12 November 2015 04:48, Quivis wrote: > On Wed, 11 Nov 2015 08:34:30 -0800, Anas Belemlih wrote: > >> md5 > > If those are md5 values stored inside files, wouldn't it be easier to > just hash them? > > import hashlib > > m1 = hashlib.sha224(open('f1').read()).hexdigest() > m2 =

[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 ___

Re: How to get 'od' run?

2015-11-11 Thread Michael Torrie
On 11/11/2015 08:04 PM, fl wrote: > Hi, > > I am learning python. I see a previous post has such code: > > > > > >>>> data = '"binääridataa"\n'.encode('utf-8') >>>> f = open('roska.txt', 'wb') >>>> f.write(data) >17 >>>> f.close() > > The .encode methods produced a

Re: Python.exe is not a valid Win32 application error message

2015-11-11 Thread Steve Hayes
On Thu, 12 Nov 2015 00:13:29 +1100, Chris Angelico wrote: >On Tue, Nov 10, 2015 at 11:34 AM, M. Kamisato via Python-list > wrote: >> I am running python on Windows XP SP3 and download version 3.5xx. I got the >> above error message and could not run

Re: new to python, help please !!

2015-11-11 Thread Marko Rauhamaa
Steven D'Aprano : > On Thursday 12 November 2015 04:48, Quivis wrote: > >> On Wed, 11 Nov 2015 08:34:30 -0800, Anas Belemlih wrote: >> >>> md5 >> >> If those are md5 values stored inside files, wouldn't it be easier to >> just hash them? >> >> import

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Ulli Horlacher
Marko Rauhamaa wrote: > I'm thinking the only portable way is to run a watchdog process with > subprocess or multiprocessing. How can a subprocess interrupt a function in another process? For example: waiting for user input with a timeout. raw_input("Hit ENTER to continue or

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Chris Angelico
On Thu, Nov 12, 2015 at 5:43 PM, Christian Gollwitzer wrote: > My understanding of async is that it creates an event loop. In which case > the loop has no chance to run within a block of code that computes anything, > is that correct? This is correct. At its simplest,

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Christian Gollwitzer
Am 12.11.15 um 07:14 schrieb Marko Rauhamaa: Terry Reedy : The cross-platform 3.4 asyncio module has some functions with timeouts. Even that doesn't forcefully interrupt an obnoxious blocking function call like time.sleep(1) A blocking call - granted. But what

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Ulli Horlacher
Terry Reedy wrote: > On 11/11/2015 11:16 AM, Ulli Horlacher wrote: > > I am rewriting a Perl program into Python (2.7). > > I recommend using 3.4+ if you possibly can. It is not possible. The main target platform offers only python 2.7 -- Ullrich Horlacher

[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

How to get 'od' run?

2015-11-11 Thread fl
Hi, I am learning python. I see a previous post has such code: >>> data = '"binääridataa"\n'.encode('utf-8') >>> f = open('roska.txt', 'wb') >>> f.write(data) 17 >>> f.close() The .encode methods produced a bytestring, which Python likes to display as ASCII characters

[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

Re: Using subprocess to capture a progress line

2015-11-11 Thread Tim Johnson
* Chris Warrick [15 07:54]: > On 11 November 2015 at 17:16, Tim Johnson wrote: > >> (2) [don’t do it] do you need to intercept the lines? If you don’t set > >> stderr= and stdout=, things will print just fine. > > Got to try that before using the

[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

Re: using binary in python

2015-11-11 Thread Christian Gollwitzer
Am 10.11.15 um 22:29 schrieb kent nyberg: On Mon, Nov 09, 2015 at 10:20:25PM -0800, Larry Hudson via Python-list wrote: Your questions are somewhat difficult to answer because you misunderstand binary. The key is that EVERYTHING in a computer is binary. There are NO EXCEPTIONS, it's all

[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

Re: cross platform alternative for signal.SIGALRM?

2015-11-11 Thread Ulli Horlacher
Marko Rauhamaa wrote: > Correct. The timer callback function (hello) would be called in a > separate thread. An exception raised in one thread cannot be caught in > the main thread. In general, there is no way for a thread to interrupt a > sibling thread that is in a blocking

[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