[issue27879] add os.syncfs()

2021-10-10 Thread Nir Soffer
Nir Soffer added the comment: Updating python version, this is not relevant to 3.6 now. On linux users can use "sync --file-system /path" but it would be nice if we have something that works on multiple platforms. -- nosy: +nirs versions: +Python 3.11 -

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

[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

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

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

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

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

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

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

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

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

2018-03-16 Thread Nir Soffer
Nir Soffer <nir...@gmail.com> 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()

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

2018-03-08 Thread Nir Soffer
Nir Soffer <nir...@gmail.com> 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

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

2018-03-07 Thread Nir Soffer
Change by Nir Soffer <nir...@gmail.com>: -- pull_requests: +5787 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33021> ___ __

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

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

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

2018-03-07 Thread Nir Soffer
New submission from Nir Soffer <nir...@gmail.com>: 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

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

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

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

2017-11-30 Thread Nir Soffer
Change by Nir Soffer <nir...@gmail.com>: -- pull_requests: +4564 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32186> ___ __

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

2017-11-30 Thread Nir Soffer
Nir Soffer <nir...@gmail.com> 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 -

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

2017-11-30 Thread Nir Soffer
New submission from Nir Soffer <nir...@gmail.com>: 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) In

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-06 Thread Nir Soffer
Nir Soffer <nir...@gmail.com> 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.blo

[issue31945] Configurable blocksize in HTTP(S)Connection

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

[issue31945] Configurable blocksize in HTTP(S)Connection

2017-11-04 Thread Nir Soffer
New submission from Nir Soffer <nir...@gmail.com>: 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 HTTPConnectio

[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

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

2017-07-26 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2952 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30980> ___ __

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

2017-07-26 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2951 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30980> ___ __

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

2017-07-26 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2950 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30980> ___ __

[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

[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: The "new" closing attribute is old as asyncore, it was just unused :-) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.py

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

[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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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-22 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2872 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30994> ___ __

[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

[issue30985] Set closing variable in asyncore at close

2017-07-21 Thread Nir Soffer
Changes by Nir Soffer <nsof...@redhat.com>: -- nosy: +haypo ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30985> ___ __

[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

[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

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

2017-07-20 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2839 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30980> ___ __

[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

[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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

[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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

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

2017-07-12 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2747 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25516> ___ __

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

2017-07-08 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2702 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29854> ___ __

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

2017-07-08 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2701 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29854> ___ __

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

2017-07-08 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2698 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29854> ___ __

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

2017-07-07 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- pull_requests: +2687 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29854> ___ __

[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

[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 <rep...@bugs.python.org> <http://bugs.python.org/i

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

[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

[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 issue. The PR

[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 <rep...@bugs.python.org> <http://bugs.python.org/issue29854> ___ ___

[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

[issue26180] multiprocessing.util._afterfork_registry leak in threaded environment

2016-01-29 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- nosy: +nirs ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26180> ___ ___ Python

[issue25551] Event's test_reset_internal_locks too fragile

2015-11-04 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- keywords: +patch Added file: http://bugs.python.org/file40941/0001-Issue-254074-Test-condition-behavior-instead-of-inte.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25551] Event's test_reset_internal_locks too fragile

2015-11-04 Thread Nir Soffer
New submission from Nir Soffer: test_reset_internal_locks is looking at Event's _cond._lock - this make it harder to change internal details of the Condition object and make the test fragile. We should test the condition behavior instead. -- components: Tests messages: 254074 nosy

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

2015-11-02 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- nosy: +haypo, pitrou ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25516> ___ __

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

2015-10-30 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25516> ___ ___

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

2015-10-30 Thread Nir Soffer
Nir Soffer added the comment: The commit hash in the previous message is a git commit from the github mirror: https://github.com/python/cpython/commit/8cb1ccbb8b9ed01c26d2c5be7cc86682e525dce7 -- ___ Python tracker <rep...@bugs.python.org>

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

2015-10-29 Thread Nir Soffer
New submission from Nir Soffer: When using threading.Lock, threading.Condition._is_owned is assuming that the calling thread is owning the condition lock if the lock cannot be acquired. This check is completely wrong if another thread owns the lock. >>> cond = threading.

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

2015-10-29 Thread Nir Soffer
Nir Soffer added the comment: The issue was introduced in this commit: commit 8cb1ccbb8b9ed01c26d2c5be7cc86682e525dce7 Author: Guido van Rossum <gu...@python.org> Date: Thu Apr 9 22:01:42 1998 + New Java-style threading module. The doc strings are in a separate

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

2015-10-29 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- keywords: +patch Added file: http://bugs.python.org/file40900/0001-Issue-25516-threading.Condition._is_owned-fails-when.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25362] Use with instead of try finally

2015-10-10 Thread Nir Soffer
New submission from Nir Soffer: Using "with" is more clear and less error prone. -- components: Library (Lib) files: 0001-Use-with-instead-of-try-finally.patch keywords: patch messages: 252716 nosy: nirs priority: normal severity: normal status: open title: Use with inst

[issue25362] In threading module, use with instead of try finally

2015-10-10 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: Added file: http://bugs.python.org/file40741/0001-In-threading-module-use-with-instead-of-try-finally.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25298] Add lock and rlock weakref tests

2015-10-05 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- nosy: +pitrou ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25298> ___ __

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- nosy: +gregory.p.smith ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25319> ___ _

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Nir Soffer
New submission from Nir Soffer: When Event._reset_internal_locks was called after fork, it use to reinitialize its condition without arguments, using RLock instead of Lock. -- components: Library (Lib) files: 0001-Keep-lock-type-when-reseting-internal-locks.patch keywords: patch

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: Added file: http://bugs.python.org/file40688/0001-Keep-lock-type-when-reseting-internal-locks.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25319] Keep lock type when reseting internal locks

2015-10-05 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: Added file: http://bugs.python.org/file40687/0001-Keep-lock-type-when-reseting-internal-locks-2.7.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue25298] Add lock and rlock weakref tests

2015-10-02 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: -- components: Tests files: 0001-Add-lock-rlock-weakref-tests.patch keywords: patch nosy: nirs priority: normal severity: normal status: open title: Add lock and rlock weakref tests versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

[issue25298] Add lock and rlock weakref tests

2015-10-02 Thread Nir Soffer
New submission from Nir Soffer: Same patch works also for 2.7 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25298> ___ ___ Pyth

[issue25249] Unneeded and unsafe mkstemp replacement in test_subprocess.py

2015-09-27 Thread Nir Soffer
New submission from Nir Soffer: The module define unsafe replacement if tempfile.mkstemp is not available. This function is available in both master and 2.7 branches. -- components: Tests files: 0001-Remove-unneeded-and-unsafe-mkstemp-replacement.patch keywords: patch messages: 251720

[issue25249] Unneeded and unsafe mkstemp replacement in test_subprocess.py

2015-09-27 Thread Nir Soffer
Changes by Nir Soffer <nir...@gmail.com>: Added file: http://bugs.python.org/file40601/0001-Remove-unneeded-and-unsafe-mkstemp-replacement-2.7.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue6721] Locks in the standard library should be sanitized on fork

2014-11-03 Thread Nir Soffer
Changes by Nir Soffer nir...@gmail.com: -- nosy: +nirs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list

[issue22697] Deadlock with writing to stderr from forked process

2014-11-01 Thread Nir Soffer
Nir Soffer added the comment: This is a duplicate of http://bugs.python.org/issue6721 -- nosy: +nirs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22697

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

2012-03-13 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

[issue4277] asynchat's handle_error inconsistency

2011-07-17 Thread Nir Soffer
Nir Soffer nir...@gmail.com added the comment: The idea is good, but seems that error handling should be inlined into initiate_send. Also those 3 special exceptions should be defined once in the module instead of repeating them. -- nosy: +nirs

[issue1068268] subprocess is not EINTR-safe

2010-01-23 Thread Nir Soffer
Changes by Nir Soffer nir...@gmail.com: -- nosy: +nirs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1068268 ___ ___ Python-bugs-list mailing list

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

2009-08-09 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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 break exiting code that assume

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

2009-08-09 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-08-08 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-08-03 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-08-01 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue6550

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

2009-08-01 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-07-31 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-07-29 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-07-28 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-07-24 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-07-24 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

2009-07-24 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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

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

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

[issue5262] PythonLauncher considered harmfull

2009-07-23 Thread Nir Soffer
Nir Soffer nir...@gmail.com 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 rep...@bugs.python.org http://bugs.python.org/issue5262

[issue1123] split(None, maxsplit) does not strip whitespace correctly

2007-09-11 Thread Nir Soffer
Nir Soffer added the comment: There is a problem only when maxsplit is smaller than the available splits. In other cases, the docs and the behavior match. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1123

[issue1123] split(None, maxsplit) does not strip whitespace correctly

2007-09-10 Thread Nir Soffer
Nir Soffer added the comment: I did not look into the source, but obviously there is striping of leading and trailing whitespace. When you specify a separator you get: ' '.split(' ') ['', '', ''] ' a b '.split(' ') ['', 'a', 'b', ''] So one would expect to get this without striping

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-07 Thread Nir Soffer
Nir Soffer added the comment: Why bytes should not use a default whitespace split behavior as str? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1125 __ ___ Python-bugs-list

[issue1125] bytes.split shold have same interface as str.split, or different name

2007-09-06 Thread Nir Soffer
New submission from Nir Soffer: b'foo bar'.split() Traceback (most recent call last): File stdin, line 1, in module TypeError: split() takes at least 1 argument (0 given) b'foo bar'.split(None) Traceback (most recent call last): File stdin, line 1, in module TypeError: expected

[issue1123] split(None, maxsplit) does not strip whitespace correctly

2007-09-06 Thread Nir Soffer
Nir Soffer added the comment: typo in the title -- title: split(None, maxplit) does not strip whitespace correctly - split(None, maxsplit) does not strip whitespace correctly __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1123

[issue1123] split(None, maxplit) does not strip whitespace correctly

2007-09-06 Thread Nir Soffer
New submission from Nir Soffer: string object .split doc say (http://docs.python.org/lib/string- methods.html): If sep is not specified or is None, a different splitting algorithm is applied. First, whitespace characters (spaces, tabs, newlines, returns, and formfeeds) are stripped from

  1   2   >