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

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

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

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

[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

[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2015-12-13 Thread Nir Cohen
Nir Cohen added the comment: I would love some comments (and PRs, of course) on ld. Wanna make it as robust as possible. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/

[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2015-12-06 Thread Nir Cohen
Nir Cohen added the comment: I have a premliminary implementation of it: https://github.com/nir0s/ld Would love some help. It tries to use adhere to the standards (os-release first, lsb-release later, then, distro-specific release files). It also returns more types of values then there were

[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2015-12-06 Thread Nir Cohen
Nir Cohen added the comment: I didn't mean to say that it was. Still, it's important to have some implementation of identifying linux distributions and their properties.. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue1322] Deprecate platform.dist() and platform.linux_distribution() functions

2015-12-06 Thread Nir Cohen
Nir Cohen added the comment: Apologies. This can be simply installed by running `pip install ld` (from https://pypi.python.org/pypi/ld). Some notes: * I've just now started writing tests * Haven't tested on versions other than 2.7.x and 2.6.x * There's some stray code there. This works

[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

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

2011-08-31 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: For the record, turns out there was a bit of misunderstanding. I used the term deprecate above to mean warn users (through documentation) that they should not use (a feature) and not in its Python-dev sense of remove (a feature) after a period

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

2011-07-28 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Hi Gregory, Gregory P. Smith g...@krypto.org added the comment: No Python thread is ever fork safe because the Python interpreter itself can never be made fork safe. Nor should anyone try to make the interpreter itself safe. It is too complex

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

2011-07-19 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: then multiprocessing is completely brain-damaged and has been implemented by a moron. Please do not use this kind of language. Being disrespectful to other people hurts the discussion. -- ___ Python

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

2011-07-19 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: (BTW: there are religions without god, so whom shall e.g. i praise for the GIL?) Guido? ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721

[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

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

2011-07-15 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Here is a morning reasoning exercise - please help find the flaws or refine it: 5) Sanitizing worker threads in the multiprocessing module Sanitizing a worker thread in the context of this problem is to make sure it can not create a state that may

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

2011-07-12 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Well, my brain did not deadlock, but after spinning on the problem for a while longer, it now thinks Tomaž Šolc and Steffen are right. We should try to fix the multiprocessing module so it does not deadlock single-thread programs and deprecate fork

[issue874900] malloc

2011-07-11 Thread Nir Aides
Changes by Nir Aides n...@winpdb.org: -- title: threading module can deadlock after fork - malloc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue874900

[issue874900] threading module can deadlock after fork

2011-07-11 Thread Nir Aides
Changes by Nir Aides n...@winpdb.org: -- title: malloc - threading module can deadlock after fork ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue874900

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

2011-07-06 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Would you like to work on a patch to add an atfork mechanism? I will start with an attempt to generate a summary report on this rabbit hole of a problem, the views and suggestions raised by people here and what we may expect from atfork approach

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

2011-07-04 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Sorry, I fail to see how the import graph is related to the correct lock acquisition order. Some locks are created dynamically, for example. Import dependency is a reasonable heuristic to look into for inter-module locking order. The rational

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

2011-07-01 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: - what would be the API of this atfork() mechanism (with an example of how it would be used in the library)? The atfork API is defined in POSIX and Gregory P. Smith proposed a Python one above that we can look into. http://pubs.opengroup.org

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

2011-06-30 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Well, I ping my view that we should: 1) Add general atfork() mechanism. 2) Dive into the std lib and add handlers one by one, that depending on case, either do the lock/init thing or just init the state of the library to some valid state

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

2011-06-30 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: I believe that the comp.programming.threads post from David Butenhof linked above explains why adding atfork() handlers isn't going to solve this. In Python atfork() handlers will never run from signal handlers, and if I understood correctly

[issue1625] bz2.BZ2File doesn't support multiple streams

2011-05-25 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: Right! I updated the patch and added a test for the aligned stream/buffer case. -- Added file: http://bugs.python.org/file22114/cpython-bz2-streams.patch ___ Python tracker rep...@bugs.python.org http

  1   2   3   >