[issue45930] Lambda function bug

2021-11-29 Thread Valery Lovchikov
New submission from Valery Lovchikov : Python 3.9.7 (default, Sep 10 2021, 14:59:43) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> f=[lambda x: y**x for y in [2,3]] >>> f[0](2) 9 >

asyncio with mapreduce flavor and without flooding the event loop

2014-08-03 Thread Valery Khamenya
and unmanaged! It would be cool to find asyncio gurus interested in this very natural goal. Your help and ideas would be very much appreciated. best regards -- Valery -- https://mail.python.org/mailman/listinfo/python-list

Re: Anything better than asyncio.as_completed() and asyncio.wait() to manage execution of large amount of tasks?

2014-07-20 Thread Valery Khamenya
(tasks, *, loop=None, max_workers=5, timeout=None): loop = loop if loop is not None else asyncio.get_event_loop() workers = [] pending = set() done = asyncio.Queue(maxsize=max_workers, loop=loop) # Valery: respect the loop parameter exhausted = False timeout_handle = None

Anything better than asyncio.as_completed() and asyncio.wait() to manage execution of large amount of tasks?

2014-07-15 Thread Valery Khamenya
them all at once, but to instantiate and to address them one by one as the running tasks are completed. best regards -- Valery -- https://mail.python.org/mailman/listinfo/python-list

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2011-10-09 Thread Valery Khamenya
Valery Khamenya khame...@gmail.com added the comment: Amaury, I followed your advice. All relevant changes of 3.2 are backported via the patch attached. P.S. now I can install Twisted using pypy too. pypy setup.py install works fine for me. -- keywords: +patch status: pending - open

[issue13131] FD leak in urllib2

2011-10-08 Thread Valery Khamenya
New submission from Valery Khamenya khame...@gmail.com: Explanation from dablitz's comment at https://bugs.pypy.org/issue867 : quote urllib2 in the stdlib leaks fd's if an exception is raised while opening a connection. The issue occurs due to a socket being opened then an exception being

[issue13131] FD leak in urllib2

2011-10-08 Thread Valery Khamenya
Valery Khamenya khame...@gmail.com added the comment: by the way, timeout parameter should be set to 0.2 as for my 13Mbit ADSL line. With 0.002 it is not reproducible for my environment -- ___ Python tracker rep...@bugs.python.org http

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2011-10-08 Thread Valery Khamenya
New submission from Valery Khamenya khame...@gmail.com: The attached file reproduces 3 types of FD leaks and leads to the error like: IOError: [Errno 24] Too many open files: '/tmp/1019' For example if executed with pypy. -- components: IO, Library (Lib) files: zipfiletest.py messages

[issue13131] FD leak in urllib2

2011-10-08 Thread Valery Khamenya
Valery Khamenya khame...@gmail.com added the comment: the problem seems to be fixed with the patch attached. Thanks go to fijal@freenode -- keywords: +patch Added file: http://bugs.python.org/file23348/urllib2.patch ___ Python tracker rep

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2011-10-08 Thread Valery Khamenya
Valery Khamenya khame...@gmail.com added the comment: I can't reproduce this problem in either 2.7.2 or 3.3.0a0. You probably mean CPython implementation of Python. No, I didn't mean this implementation. Do you mean that this problem is only reproducible when the attached script is run

[issue12955] urllib2.build_opener().open() is not friendly to with ... as:

2011-09-16 Thread Valery Khamenya
Valery Khamenya khame...@gmail.com added the comment: Terry, Senthil, thanks, for replying to this ticket. OK, to the question: 1. @Terry, here is the full example as for CPython 2.7 I am talking about and the output: # from urllib2 import Request, build_opener request

[issue12955] urllib.request example should use with ... as:

2011-09-16 Thread Valery Khamenya
Valery Khamenya khame...@gmail.com added the comment: Guys, in my item 2 the simplistic goal was stated clearly: open, read and close. Do you confirm that this basic sequence is not supported by urllib2 under 2.7 ? (I just requested for a tiny documentation update entry) regards, Valery

[issue12955] urllib2.build_opener().open() is not friendly to with ... as:

2011-09-10 Thread Valery Khamenya
New submission from Valery Khamenya khame...@gmail.com: The following intuitive construction with urllib2.build_opener().open() as: ... leads to AttributeError: addinfourl instance has no attribute '__exit__' http://docs.python.org/library/urllib2.html says almost nothing about concept

Re: How to initialize each multithreading Pool worker with an individual value?

2010-12-02 Thread Valery
your answer only now. reagrds -- Valery -- http://mail.python.org/mailman/listinfo/python-list

Re: How to initialize each multithreading Pool worker with an individual value?

2010-12-01 Thread Valery Khamenya
. In contrast, your case looks for me that you rather propose to initiate the connection each time a new job comes from queue for an execution. Regards, Valery -- http://mail.python.org/mailman/listinfo/python-list

How to initialize each multithreading Pool worker with an individual value?

2010-11-30 Thread Valery Khamenya
over port # %s % port if __name__ == __main__: ports=((4001,4002, 4003), ) p = Pool(3, port_initializer, ports) # oops... :-) some_data_to_send = range(20) p.map(use_connection, some_data_to_send) best regards -- Valery A.Khamenya -- http://mail.python.org/mailman/listinfo/python

[issue10351] Add autocompletion for keys in dictionaries

2010-11-18 Thread Valery Khamenya
Valery Khamenya khame...@gmail.com added the comment: Guys, do you expect anythig else from me in respect to this issue? Let me know it before my non-stopable garbage collector wipes all the details from my brain away :) -- ___ Python tracker rep

[issue10351] Add autocompletion for keys in dictionaries

2010-11-09 Thread Valery Khamenya
Valery Khamenya khame...@gmail.com added the comment: Hi Éric, thanks for guiding. So, attached is the concatenation of two forward unified diffs for rlcompleter.py and test_rlcompleter.py -- both as of py3k trunk. Tested against Python 3.1.2 though. P.S. hm, py3k code appeared

[issue10351] to introduce autocompletion for keys in dictionaries (patch attached)

2010-11-08 Thread Valery Khamenya
New submission from Valery Khamenya khame...@gmail.com: 1. The patch introduces autocompletion for keys in dictionaries (patch attached) 2. The patched rlcompleter as such works OK for unicode dictionary keys as well. All tests pass OK. HOWEVER, readline's completion mechanism seem

[issue10352] rlcompleter.py has no tests in trunk

2010-11-08 Thread Valery Khamenya
New submission from Valery Khamenya khame...@gmail.com: rlcompleter.py has no test_rlcompleter in trunk, see http://svn.python.org/view/python/trunk/Lib/test/ There is one in 2.7 though. Remark: the issue http://bugs.python.org/issue10351 introduces autocompletion patch and comes with new

[issue10081] 'import' operator doesn't work with unicode non 7-bit ASCII module names (OS: windows)

2010-10-13 Thread Valery Lesin
New submission from Valery Lesin valery.le...@gmail.com: OS: windows The attempt to import module with non 7-bit ASCII name results in 'ImportError: No module named module name' exception. Some thoughts: import.c uses functions like fopen, stat and FindFirstFile which wouldn't work

[issue10082] PyRun_SimpleFile crashes application

2010-10-13 Thread Valery Lesin
New submission from Valery Lesin valery.le...@gmail.com: All the functions in Python/C API for file execution (like PyRun_SimpleFile) crash the application. Some thoughts about problem: these functions use FILE* as first parameter which is binary incompatible with different CRT (python.dll

[issue10082] PyRun_SimpleFile crashes application

2010-10-13 Thread Valery Lesin
Valery Lesin valery.le...@gmail.com added the comment: OS: windows xp Compiler: MSVC versions 7.1, 8.0 and 9.0 Actually, the difference in compiler for python library and client applications causes the problem (I suppose that even same compiler with different options could give binary

[issue10068] global objects created in some module are not destroyed when last reference to that module is released

2010-10-12 Thread Valery Lesin
New submission from Valery Lesin valery.le...@gmail.com: Interpreter: Python 3.1.2 Sample: = first.py = import sys import second if 'second' in sys.modules: print ('in sys modules') del sys.modules['second'] del second = second.py = class A: def __init__(self

Re: a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-26 Thread Valery
. Valery -- http://mail.python.org/mailman/listinfo/python-list

Re: a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-10 Thread Valery
here:http://groups.google.com/group/unladen-swallow/browse_thread/thread/9... ) yes, I've understood the idea explained by you there. regards, Valery -- http://mail.python.org/mailman/listinfo/python-list

a huge shared read-only data in parallel accesses -- How? multithreading? multiprocessing?

2009-12-09 Thread Valery
... print res ## Kind regards Valery -- http://mail.python.org/mailman/listinfo/python-list

from logging import * causes an error under Ubuntu Karmic

2009-10-04 Thread Valery
AttributeError: 'module' object has no attribute 'NullHandler' $ uname -a Linux vaktop 2.6.31-11-generic #38-Ubuntu SMP Fri Oct 2 11:55:55 UTC 2009 i686 GNU/Linux -- regards Valery -- http://mail.python.org/mailman/listinfo/python-list

Re: from logging import * causes an error under Ubuntu Karmic

2009-10-04 Thread Valery
OK, I've filed a bug. Because Python2.5 works fine here. -- Valery -- http://mail.python.org/mailman/listinfo/python-list

[issue7052] from logging import * causes an error under Ubuntu Karmic

2009-10-04 Thread Valery
New submission from Valery khame...@gmail.com: Hi all (I never filed a bug, so, I am not sure that all fields are OK) Anyway, here is the self explaining issue: $ python Python 2.6.3 (r263:75183, Oct 3 2009, 11:20:50) [GCC 4.4.1] on linux2 Type help, copyright, credits or license

[issue7052] from logging import * causes an error under Ubuntu Karmic

2009-10-04 Thread Valery
Valery khame...@gmail.com added the comment: I have just installed python2.5 in addition. And there is no this issue with it. So, it rather speific to python2.6 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7052

multiprocessing + console + windows = challenge?

2009-09-26 Thread Valery
Valery -- http://mail.python.org/mailman/listinfo/python-list

[issue1712522] urllib.quote throws exception on Unicode URL

2008-12-21 Thread Valery
Valery khame...@gmail.com added the comment: Hi, gurus, can anyone then give a hint what we mortals should use in order to form the URL with non-ascii symbols? We loved so much idea to feed our national symbols to urllib.quote as unicode string... and now we are quite disoriented... Thanks

[issue1712522] urllib.quote throws exception on Unicode URL

2008-12-21 Thread Valery
Valery khame...@gmail.com added the comment: (self-answer to msg78153) the working recipe is: http://www.nabble.com/Re:-Problem:-neither-urllib2.quote-nor- urllib.quote-encode-the--unicode-strings-arguments-p19823144.html ___ Python tracker rep

Problem: neither urllib2.quote nor urllib.quote encode the unicode strings arguments

2008-10-03 Thread Valery Khamenya
Hi all things like urllib.quote(uпиво Müller ) fail with error message: type 'exceptions.KeyError': u'\u043f' Similarly with urllib2. Anyone got a hint?? I need it to form the URI containing non-ascii chars. thanks in advance, best regards -- Valery -- http://mail.python.org/mailman/listinfo

SOCKS5 + python = pain in you-know-where ?

2007-08-30 Thread Valery
Hi all just googled both the web and groups. Who could believe in that: nothing simple, helpful and working concerning SOCKS5 support in python. Anyone got success here? Regards, Valery. -- http://mail.python.org/mailman/listinfo/python-list