[issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are

2021-10-29 Thread Nir Friedman
Nir Friedman added the comment: Wouldn't a nicer resolution for this be to change `iter` (which effectively defines what is "iterable"), so that if `iter` does not find the `__iter__` or sequence protocol, it then looks for the iterator protocol (`__next__`), and if it fin

[issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are

2021-11-01 Thread Nir Friedman
Nir Friedman added the comment: Okay, fair enough. -- ___ Python tracker <https://bugs.python.org/issue45250> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds

2021-02-09 Thread Nir Soffer
Nir Soffer added the comment: Does https://github.com/python/cpython/pull/1799 solve this issue for synchronous with? with closing(this), closing(that): If it does, can we backport this fix to python 3.6? 3.6 is used as system python for RHEL/Centos 8, will be used for at least 5 years

[issue40327] list(sys.modules.items()) can throw RuntimeError: dictionary changed size during iteration

2020-07-09 Thread Nir Soffer
Nir Soffer added the comment: Does this really affect only python 3.7? We see this in RHEL 8.2, using python 3.6.8: https://bugzilla.redhat.com/show_bug.cgi?id=1837199#c69 Likely caused by: lvs = dict(self._lvs) Without locking. self._lvs is a dict that may contain 1000's of

[issue1762561] unable to serialize Infinity or NaN on ARM using marshal

2012-03-13 Thread Nir Soffer
Nir Soffer added the comment: As someone who has to develop on ARM OABI, I find this won't fix policy rather frustrating. If you happen to need this patch on 2.7, this is the same patch as arm-float2.diff, which can be applied cleanly to release 2.7.2. Changes from arm-float2.diff: - R

[issue10819] ValueError on repr(closed_socket_file)

2019-07-24 Thread Nir Soffer
Nir Soffer added the comment: I find this new behavior a usability regression. Before this change, code (e.g python 2 code ported to python 3) could do: fd = sock.fileno() Without handling errors, since closed socket would raise (good). Now such code need to check the return value (bad

[issue29854] Segfault when readline history is more then 2 * history size

2017-07-07 Thread Nir Soffer
Nir Soffer added the comment: The failures looks like libedit failures on OS X, where history size is ignored. The test is skipped if is_editline is set, we should probably skip on these platforms too. -- nosy: +Nir Soffer ___ Python tracker <h

[issue30871] Add a "python info" command somewhere to dump versions of all dependencies

2017-07-07 Thread Nir Soffer
Nir Soffer added the comment: I like the idea, may be also useful in https://github.com/sosreport/sos/blob/master/sos/plugins/python.py -- nosy: +Nir Soffer ___ Python tracker <http://bugs.python.org/issue30

[issue29854] Segfault when readline history is more then 2 * history size

2017-07-07 Thread Nir Soffer
Nir Soffer added the comment: So we have version 0x502 without libedit emulation succeeding on FreeBSD 9.x, and failing on 10.x. I think we are missing something, or maybe the libedit check is wrong. We need results from all builders to do something with this. I think at least for now we want

[issue29854] Segfault when readline history is more then 2 * history size

2017-07-07 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2687 ___ Python tracker <http://bugs.python.org/issue29854> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29854] Segfault when readline history is more then 2 * history size

2017-07-08 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2698 ___ Python tracker <http://bugs.python.org/issue29854> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29854] Segfault when readline history is more then 2 * history size

2017-07-08 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2701 ___ Python tracker <http://bugs.python.org/issue29854> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29854] Segfault when readline history is more then 2 * history size

2017-07-08 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2702 ___ Python tracker <http://bugs.python.org/issue29854> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25516] threading.Condition._is_owned() is wrong when using threading.Lock

2017-07-12 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2747 ___ Python tracker <http://bugs.python.org/issue25516> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25516] threading.Condition._is_owned() is wrong when using threading.Lock

2017-07-12 Thread Nir Soffer
Nir Soffer added the comment: I rebased the patch on master (it was created against the legacy git tree in github), and sent a pull request. -- nosy: +Nir Soffer ___ Python tracker <http://bugs.python.org/issue25

[issue30914] test_alpn_protocols (test.test_ssl.ThreadedTests) fails on Fedora 26

2017-07-12 Thread Nir Soffer
New submission from Nir Soffer: To reproduce: checkout https://github.com/nirs/cpython/commit/9648088e6ccd6d0cc04f450f55628fd8eda3784c mkdir debug cd debug ../configure --with-pydebug make make test ... == FAIL

[issue30931] Race condition in asyncore wrongly closes channel

2017-07-14 Thread Nir Soffer
Nir Soffer added the comment: Can you provide a minimal reproducer, or best add a failing test? -- nosy: +Nir Soffer ___ Python tracker <http://bugs.python.org/issue30

[issue30931] Race condition in asyncore may access the wrong dispatcher

2017-07-19 Thread Nir Soffer
Nir Soffer added the comment: Adding more info after discussion in github. After polling readable/writeable dispatchers, asyncore.poll(2) receive a list of ready file descriptors, and invoke callbacks on the dispatcher objects. If a dispatchers is closed and and a new dispatcher is created

[issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor

2017-07-20 Thread Nir Soffer
New submission from Nir Soffer: Commit 4d4c69dc35154a9c21fed1b6b4088e741fbc6ae6 added protection for double close in file_wrapper.close, but the test did not consider that fact that file_wrapper is dupping the file descriptor, making the test ineffective. >>> fd1, fd2 = os.pip

[issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor

2017-07-20 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2839 ___ Python tracker <http://bugs.python.org/issue30980> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30977] reduce uuid.UUID() memory footprint

2017-07-20 Thread Nir Soffer
Nir Soffer added the comment: This saves memory, but using str(uuid.uuid4()) requires even less memory. If you really want to save memory, you can keep the uuid.uuid4().int. Can you explain someone would like to have 100 uuid objects, instead of 100 strings? What is the advantage of

[issue30985] Set closing variable in asyncore at close

2017-07-21 Thread Nir Soffer
New submission from Nir Soffer: This is an old issue with asyncore - asyncore has a "closing" attribute, but it was never used. Every user has to implement the closing once logic in dispatcher subclasses. Here is a typical fixes in user code: - https://github.com/oVirt/vdsm/blob/maste

[issue30985] Set closing variable in asyncore at close

2017-07-21 Thread Nir Soffer
Changes by Nir Soffer : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue30985> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-22 Thread Nir Soffer
New submission from Nir Soffer: Asyncore is not thread safe, and cannot be called from multiple threads. Hence it does not need to copy the socket_map when preparing for poll or select. The copy was introduced in: commit d74900ebb5a22b387b49684990da1925e1d6bdc9 Author: Josiah Carlson Date

[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-22 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2872 ___ Python tracker <http://bugs.python.org/issue30994> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30985] Set closing variable in asyncore at close

2017-07-24 Thread Nir Soffer
Nir Soffer added the comment: I agree that this change alone is may not be important enough to fix in asyncore today - but this enables easy detection of closed sockets needed for https://github.com/python/cpython/pull/2764 or the alternative https://github.com/python/cpython/pull/2854

[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-24 Thread Nir Soffer
Nir Soffer added the comment: The advantage is avoiding wasteful copy on each iteration. -- nosy: +Nir Soffer ___ Python tracker <http://bugs.python.org/issue30

[issue30994] Asyncore does not need to copy map.items() before polling

2017-07-25 Thread Nir Soffer
Nir Soffer added the comment: Using a quick test with 1000 clients sending 100 pings, I could not see significant difference between master and this patch. Seems that the extra copy is hidden by the noise. Having this documented is good enough if someone want to use this. -- stage

[issue30931] Race condition in asyncore may access the wrong dispatcher

2017-07-25 Thread Nir Soffer
Nir Soffer added the comment: On my PR 2854, Nir added these comments (extract): > "And now we try to read from close dispatcher. I think we should wait > for #2804 (...)" > Sorry, I don't understand. My PR fixes described the bug that you > described in msg2986

[issue30985] Set closing variable in asyncore at close

2017-07-25 Thread Nir Soffer
Nir Soffer added the comment: The "new" closing attribute is old as asyncore, it was just unused :-) -- ___ Python tracker <http://bugs.python.o

[issue30931] Race condition in asyncore may access the wrong dispatcher

2017-07-25 Thread Nir Soffer
Nir Soffer added the comment: > I use the same trick all over the place in pyftpdlib: > https://github.com/giampaolo/pyftpdlib/blob/1268bb185cd63c657d78bc33309041628e62360a/pyftpdlib/handlers.py#L537 This allow detection of closed sockets, but does not fix the issue of accessing the

[issue30985] Set closing variable in asyncore at close

2017-07-25 Thread Nir Soffer
Nir Soffer added the comment: Giampaolo, people using only 3.7 should probably use asyncio. Fixing asyncore is more important to those that can use only 2.7 (e.g.Centos/RHEL) or have to support both python 3 and 2. Do you think using _closed is safer for backport? This can also clash with

[issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor

2017-07-26 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2950 ___ Python tracker <http://bugs.python.org/issue30980> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor

2017-07-26 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2951 ___ Python tracker <http://bugs.python.org/issue30980> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor

2017-07-26 Thread Nir Soffer
Changes by Nir Soffer : -- pull_requests: +2952 ___ Python tracker <http://bugs.python.org/issue30980> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30931] Race condition in asyncore may access the wrong dispatcher

2017-07-27 Thread Nir Soffer
Nir Soffer added the comment: Victor, I mostly agree with you, but I think we have here several bugs, and we should do the minimal fix for each of them. Your PR is too big, trying to fix too much. (Bug 1) The dispatcher A closes the dispatcher B. Currently, asyncore calls the handlers of the

[issue29854] Segfault when readline history is more then 2 * history size

2017-03-19 Thread Nir Soffer
New submission from Nir Soffer: GNU readline let the user select limit the history size by setting: $ cat ~/.inputrc set history-size 1000 So I cooked this test script: $ cat history.py from __future__ import print_function import readline readline.read_history_file(".history&quo

[issue29854] Segfault when readline history is more then 2 * history size

2017-03-20 Thread Nir Soffer
Nir Soffer added the comment: Sure, I'll add news entry and tests. -- ___ Python tracker <http://bugs.python.org/issue29854> ___ ___ Python-bugs-list m

[issue29854] Segfault when readline history is more then 2 * history size

2017-05-19 Thread Nir Soffer
Nir Soffer added the comment: I think the issue can be solved in readline or in the code using it, but I don't have more time to dig into this, and I think that python should not crash in this case. I don't have an environment to test Apple editline, so I cannot test this iss

[issue29854] Segfault when readline history is more then 2 * history size

2017-05-21 Thread Nir Soffer
Nir Soffer added the comment: This issue does not exist on OS X 10.11.6 (latest my old mac can install). I tested using .editrc file: $ cat ~/.editrc history size 5 With history file with 10 items that crashes on Linux using GNU readline. This settings is ignored, adding items to the history

[issue26868] Document PyModule_AddObject's behavior on error

2019-04-28 Thread Nir Soffer
Change by Nir Soffer : -- nosy: +nirs ___ Python tracker <https://bugs.python.org/issue26868> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-07 Thread Nir Soffer
New submission from Nir Soffer : If the file descriptor is on a non-responsive NFS server, calling fstat() can block for long time, hanging all threads. Most of the fstat() calls release the GIL around the call, but some calls seems to be forgotten. In python 3, the calls are handled now by

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-07 Thread Nir Soffer
Change by Nir Soffer : -- keywords: +patch pull_requests: +5786 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue33021> ___ ___ Python-

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-07 Thread Nir Soffer
Change by Nir Soffer : -- pull_requests: +5787 ___ Python tracker <https://bugs.python.org/issue33021> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-08 Thread Nir Soffer
Nir Soffer added the comment: Python cannot protect raw file descriptor from bad multi-threaded application. For example the application may close a file descriptor twice which may lead to closing unrelated file descriptor created by another thread just after it was closed, before the second

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-16 Thread Nir Soffer
Nir Soffer added the comment: Antoine, thanks for fixing this on master! but I don't think this issue can be closed yet. First, the issue is not a performance but reliability. I probably made bad choice when I marked this as performance. When you call mmap.mmap() in one thread, the e

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-16 Thread Nir Soffer
Nir Soffer added the comment: Attaching reproducer for mmapobject.size() -- Added file: https://bugs.python.org/file47491/mmap_size_nfs_test.py ___ Python tracker <https://bugs.python.org/issue33

[issue33021] Some fstat() calls do not release the GIL, possibly hanging all threads

2018-03-16 Thread Nir Soffer
Nir Soffer added the comment: Attaching reproducer for os.fdopen() -- Added file: https://bugs.python.org/file47492/fdopen_nfs_test.py ___ Python tracker <https://bugs.python.org/issue33

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-04 Thread Nir Soffer
New submission from Nir Soffer : blocksize is hardcoded to 8192 in send() and _read_readable(), preventing efficient upload when using file-like body. Users of the module that are not interested in chunked encoding can rewrite the copy loop using HTTPConnection.send(): conn

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-04 Thread Nir Soffer
Change by Nir Soffer : -- keywords: +patch pull_requests: +4241 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31945> ___ ___ Python-

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread Nir Soffer
Nir Soffer added the comment: When using highlevel request() api, users can control the block size by wrapping the file object with an iterator: class FileIter: def __init__(self, file, blocksize): self.file = file self.blocksize = blocksize def

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Nir Soffer
New submission from Nir Soffer : Using io.FileIO can hang all threads when accessing an inaccessible NFS server. To reproduce this, you need to open the file like this: fd = os.open(filename, ...) fio = io.FileIO(fd, "r+", closefd=True) Inside fileio_init, there is a ch

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Nir Soffer
Nir Soffer added the comment: Forgot to mention - reproducible with python 2.7. Similar issues exists in python 3, but I did not try to reproduce since we are using python 2.7. I posted patches for both 2.7 and master: - https://github.com/python/cpython/pull/4651 - https://github.com/python

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Nir Soffer
Change by Nir Soffer : -- pull_requests: +4564 ___ Python tracker <https://bugs.python.org/issue32186> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32186] io.FileIO hang all threads if fstat blocks on inaccessible NFS server

2017-11-30 Thread Nir Soffer
Change by Nir Soffer : -- keywords: +patch pull_requests: +4563 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32186> ___ ___ Python-

[issue34046] subparsers -> add_parser doesn't support hyphen char '-'

2018-07-04 Thread Nir Barel
New submission from Nir Barel : parent_parser = argparse.ArgumentParser(add_help=False) main_parser = argparse.ArgumentParser(prog='app_cli') service_subparsers = main_parser.add_subparsers(title="service", dest="service_co

[issue20215] socketserver.TCPServer can not listen IPv6 address

2018-09-14 Thread Nir Soffer
Change by Nir Soffer : -- nosy: +nirs ___ Python tracker <https://bugs.python.org/issue20215> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20215] socketserver.TCPServer can not listen IPv6 address

2018-09-14 Thread Nir Soffer
Nir Soffer added the comment: Doesn't it affect also 2.7, 3.6, 3.7, and 3.8? -- ___ Python tracker <https://bugs.python.org/issue20215> ___ ___ Pytho

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-22 Thread Nir Soffer
New submission from Nir Soffer : When using asynchat.async_chat channel, and connection is refused, asyncore fail incorrectly. First, instead of ECONNREFUSED, you get EPIPE, second, you also get a EBADF exception, and finally, the channel handle_close is called twice. The problem is the way

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-23 Thread Nir Soffer
Nir Soffer added the comment: The patch is tested with release26-maint and trunk. -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue6

[issue5262] PythonLauncher considered harmfull

2009-07-23 Thread Nir Soffer
Nir Soffer added the comment: I also think it should be removed. Opening a file should run it only if it is executable. -- nosy: +nirs ___ Python tracker <http://bugs.python.org/issue5

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer
Nir Soffer added the comment: Tested on Ubuntu Linux 9.04. The tests will probably fail on Windows, since connection refused is detected trough handle_expt_event, and not in hadnle_read_event. I hope someone on Windows will fix this

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer
Nir Soffer added the comment: The first fix reverted to 2.5 behavior, when self.connected is false when handle_connect is called. This behavior is little stupid - why call handle_connect if the socket is not really connected? This fix ensure that handle_connect is called only if the socket

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer
Nir Soffer added the comment: This version fix also handle_expt_event, so connection refused error should be handled in the same way also on Windows. -- Added file: http://bugs.python.org/file14562/asycore-handle-connect-event-3.patch ___ Python

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-28 Thread Nir Soffer
Nir Soffer added the comment: I have a big problem with asyncore_fix_refused.patch - it assumes that a dispatcher has a socket attribute, which can be used with t getsockopt(). This is true in the default dispatcher class implemented in asyncore, but wont work with file_dispatcher, or 3rd

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-29 Thread Nir Soffer
Nir Soffer added the comment: I'll check the patch this week. The asyncore framework has low level events - handle_read_event, handle_write_event and handle_expt_event - these events are not used for reading, writing and OOB - they are just responsible to call the high level events.

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-31 Thread Nir Soffer
Nir Soffer added the comment: I tested asyncore_fix_refused-3.patch on Mac OS X 10.5 - all asyncore and asynchat tests pass. There is one minor issue - _exception calls the non existing handle_close_event instead of handle_close. However, looking again at the code I think that it is ugly

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-08-01 Thread Nir Soffer
Nir Soffer added the comment: I was wrong about handle_connect_event - it is called only from the dispatcher, so it will not break 3rd party dispatcher. -- ___ Python tracker <http://bugs.python.org/issue6

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-08-01 Thread Nir Soffer
Nir Soffer added the comment: This is asyncore-fix-refused-3.patch with some fixes: 1. Call handle_close instead of non exiting handle_close_event 2. Remove unneeded handle_close_event in test classes 3. Revert removal of handle_expt_event in test classes - not clear why it was removed in

[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-08-03 Thread Nir Soffer
Nir Soffer added the comment: handle_expt is documented to be called when there is OOB data. However, handle_expt_event is not documented, and according the framework design as I see it, it simply means "socket has exceptional condition" when select returns. On unix, this means th

[issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs

2009-08-08 Thread Nir Soffer
Nir Soffer added the comment: You can control what is safe in your particular context using the safe keyword argument. How do you want to support unicode? you must decide which character encoding you like, which depends on the server side decoding the url. Just document the fact that this

[issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs

2009-08-09 Thread Nir Soffer
Nir Soffer added the comment: Senthil said: > The way to handle this issue would be add these characters > '%/:=&?~#+!$,;'@()*[]' to always_safe list. This is wrong - for example, '&=?' are NOT safe when quoting parameters for query string. This will bre

[issue2637] urllib.quote() escapes characters unnecessarily and contrary to docs

2009-08-09 Thread Nir Soffer
Nir Soffer added the comment: Here is one example of code that would break if the safe parameter is changed in a careless way mentioned here (look for url_encode): http://dev.pocoo.org/projects/werkzeug/browser/werkzeug/urls.py#L112 I'm sure we can find similar code in every web applic

[issue7471] GZipFile.readline too slow

2009-12-16 Thread Nir Aides
Nir Aides added the comment: Right, using the io module makes GzipFile as fast as zcat. I submit a new patch this time for Python 2.7, however, it is not a module rewrite, but again minimal refactoring. GzipFile is now derived of io.BufferedRandom, and as result the functionality of

[issue7471] GZipFile.readline too slow

2009-12-17 Thread Nir Aides
Nir Aides added the comment: How about using the first patch with the slicing optimization and additionally enhancing GzipFile with the methods required to make it play nice as a raw stream to an io.BufferedReader object (readable(), writable(), readinto(), etc...). This way we still get

[issue7471] GZipFile.readline too slow

2009-12-18 Thread Nir Aides
Nir Aides added the comment: Submitted combined patch for Python 2.7. If its good i'll send one for Python 3.2. -- Added file: http://bugs.python.org/file15589/gzip_7471_py27.diff ___ Python tracker <http://bugs.python.org/i

[issue7471] GZipFile.readline too slow

2009-12-19 Thread Nir Aides
Nir Aides added the comment: isatty() and __iter__() of io.BufferedIOBase raise on closed file and __enter__() raises ValueError with different (generic) message. Should we keep the original GzipFile methods or prefer the implementation of io.BufferedIOBase

[issue7471] GZipFile.readline too slow

2009-12-19 Thread Nir Aides
Changes by Nir Aides : Removed file: http://bugs.python.org/file15589/gzip_7471_py27.diff ___ Python tracker <http://bugs.python.org/issue7471> ___ ___ Python-bugs-list m

[issue7471] GZipFile.readline too slow

2009-12-19 Thread Nir Aides
Nir Aides added the comment: uploaded updated patch for Python 2.7. -- Added file: http://bugs.python.org/file15619/gzip_7471_py27.diff ___ Python tracker <http://bugs.python.org/issue7

[issue7471] GZipFile.readline too slow

2009-12-19 Thread Nir Aides
Nir Aides added the comment: Uploaded patch for Python 3.2. -- Added file: http://bugs.python.org/file15620/gzip_7471_py32.diff ___ Python tracker <http://bugs.python.org/issue7

[issue7540] urllib2 request does not update content length after new add_data

2009-12-24 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker <http://bugs.python.org/issue7540> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7564] test_ioctl fails sometimes

2009-12-24 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker <http://bugs.python.org/issue7564> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7519] CompileParser can't read files with BOM markers

2009-12-24 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker <http://bugs.python.org/issue7519> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7503] multiprocessing AuthenticationError "digest sent was rejected" when pickling proxy

2009-12-24 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker <http://bugs.python.org/issue7503> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7481] Failing to start a thread leaves "zombie" thread in "initial" state

2009-12-25 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker <http://bugs.python.org/issue7481> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue6452] urllib2.Request() will not work with long authorization headers

2009-12-27 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker <http://bugs.python.org/issue6452> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7544] Fatal error on thread creation in low memory condition

2009-12-27 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker <http://bugs.python.org/issue7544> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7544] Fatal error on thread creation in low memory condition

2009-12-27 Thread Nir Aides
Nir Aides added the comment: Memory can be pre-allocated by thread_PyThread_start_new_thread() before thread is spawned. -- ___ Python tracker <http://bugs.python.org/issue7

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2009-12-31 Thread Nir Aides
Changes by Nir Aides : -- nosy: +nirai ___ Python tracker <http://bugs.python.org/issue7610> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-03 Thread Nir Aides
Nir Aides added the comment: I uploaded a possible patch for Python 2.7. The patch converts ZipExtFile into subclass of io.BufferedIOBase and drops most of the original implementation. However, the patch breaks current newline behavior of ZipExtFile. I figured this was reasonable because

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-04 Thread Nir Aides
Nir Aides added the comment: Right, I was reading the 3.1 docs by mistake. I updated the patch. This time universal newlines are supported. On my dataset (75MB 650K lines log file) the readline() speedup is x40 for 'r' mode and x8 for 'rU' mode, and you can get an extra

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-04 Thread Nir Aides
Nir Aides added the comment: > Thank you. Are you sure the "Shortcut common case" in readline() > is useful? BufferedIOBase.readline() in itself should be rather fast. On my dataset the shortcut speeds up readline() 400% on top of the default C implementation. I can take a

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-10 Thread Nir Aides
Nir Aides added the comment: If the sequence of readaheads is ['a\r', '\nb\n'], the first use of the pattern will consume 'a', then the peek(2) will trigger a read() and the next use of the pattern will consume '\r\n'. I updated the patch and enhanc

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-14 Thread Nir Aides
Nir Aides added the comment: I uploaded an update for Python 2.7. > * you should probably write `n = sys.maxsize` instead of `n = 1 << 31 - 1` sys.maxsize is 64 bit number on my system but the maximum value accepted by zlib's decompress() seems to be INT_MAX defined in pyport.

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-15 Thread Nir Aides
Nir Aides added the comment: May be a good idea to clear this up in the documentation. http://en.wiktionary.org/wiki/may#Verb "(modal auxiliary verb, defective) To have permission to. Used in granting permission and in questions to make polite req

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-15 Thread Nir Aides
Changes by Nir Aides : Removed file: http://bugs.python.org/file17330/bfs.patch ___ Python tracker <http://bugs.python.org/issue7946> ___ ___ Python-bugs-list mailin

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-15 Thread Nir Aides
Nir Aides added the comment: Updated bfs.patch to patch cleanly updated py3k branch. Use: $ patch -p1 < bfs.patch -- Added file: http://bugs.python.org/file17356/bfs.patch ___ Python tracker <http://bugs.python.org/iss

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-16 Thread Nir Aides
Changes by Nir Aides : Added file: http://bugs.python.org/file17370/nir-ccbench-linux.log ___ Python tracker <http://bugs.python.org/issue7946> ___ ___ Python-bugs-list m

[issue7946] Convoy effect with I/O bound threads and New GIL

2010-05-16 Thread Nir Aides
Nir Aides added the comment: A link to ccbench results comparing old GIL, old GIL with long check interval, new GIL and BFS: http://bugs.python.org/file17370/nir-ccbench-linux.log Summary: Results for ccbench latency and bandwidth test run on Ubuntu Karmic 64bit, q9400 2.6GHz, all Python

[issue2281] Enhanced cPython profiler with high-resolution timer

2010-05-18 Thread Nir Aides
Nir Aides added the comment: > Nir, would you be interested in looking at this? yes, I'll take a look, but will take me a few days. -- ___ Python tracker <http://bugs.python.or

<    1   2   3   >