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 -
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
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
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
Change by Nir Soffer :
--
nosy: +nirs
___
Python tracker
<https://bugs.python.org/issue26868>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Nir Soffer :
--
nosy: +nirs
___
Python tracker
<https://bugs.python.org/issue20215>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Change by Nir Soffer :
--
pull_requests: +5787
___
Python tracker
<https://bugs.python.org/issue33021>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nir Soffer :
--
keywords: +patch
pull_requests: +5786
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33021>
___
___
Python-
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
Change by Nir Soffer :
--
keywords: +patch
pull_requests: +4563
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32186>
___
___
Python-
Change by Nir Soffer :
--
pull_requests: +4564
___
Python tracker
<https://bugs.python.org/issue32186>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Change by Nir Soffer :
--
keywords: +patch
pull_requests: +4241
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31945>
___
___
Python-
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
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
Changes by Nir Soffer :
--
pull_requests: +2952
___
Python tracker
<http://bugs.python.org/issue30980>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
--
pull_requests: +2951
___
Python tracker
<http://bugs.python.org/issue30980>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
--
pull_requests: +2950
___
Python tracker
<http://bugs.python.org/issue30980>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Nir Soffer added the comment:
The "new" closing attribute is old as asyncore, it was just unused :-)
--
___
Python tracker
<http://bugs.python.o
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
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
Nir Soffer added the comment:
The advantage is avoiding wasteful copy on each iteration.
--
nosy: +Nir Soffer
___
Python tracker
<http://bugs.python.org/issue30
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
Changes by Nir Soffer :
--
pull_requests: +2872
___
Python tracker
<http://bugs.python.org/issue30994>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Nir Soffer :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue30985>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
Changes by Nir Soffer :
--
pull_requests: +2839
___
Python tracker
<http://bugs.python.org/issue30980>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
Changes by Nir Soffer :
--
pull_requests: +2747
___
Python tracker
<http://bugs.python.org/issue25516>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
--
pull_requests: +2702
___
Python tracker
<http://bugs.python.org/issue29854>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
--
pull_requests: +2701
___
Python tracker
<http://bugs.python.org/issue29854>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
--
pull_requests: +2698
___
Python tracker
<http://bugs.python.org/issue29854>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
--
pull_requests: +2687
___
Python tracker
<http://bugs.python.org/issue29854>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
Nir Soffer added the comment:
Sure, I'll add news entry and tests.
--
___
Python tracker
<http://bugs.python.org/issue29854>
___
___
Python-bugs-list m
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
Changes by Nir Soffer :
--
nosy: +nirs
___
Python tracker
<http://bugs.python.org/issue26180>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Changes by Nir Soffer :
--
keywords: +patch
Added file:
http://bugs.python.org/file40941/0001-Issue-254074-Test-condition-behavior-instead-of-inte.patch
___
Python tracker
<http://bugs.python.org/issue25
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
Changes by Nir Soffer :
--
nosy: +haypo, pitrou
___
Python tracker
<http://bugs.python.org/issue25516>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue25516>
___
___
Python-bugs-list mailing list
Unsubscrib
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
<http://bugs.python.org/issue25
Changes by Nir Soffer :
--
keywords: +patch
Added file:
http://bugs.python.org/file40900/0001-Issue-25516-threading.Condition._is_owned-fails-when.patch
___
Python tracker
<http://bugs.python.org/issue25
Nir Soffer added the comment:
The issue was introduced in this commit:
commit 8cb1ccbb8b9ed01c26d2c5be7cc86682e525dce7
Author: Guido van Rossum
Date: Thu Apr 9 22:01:42 1998 +
New Java-style threading module. The doc strings are in a separate module
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.
Changes by Nir Soffer :
Added file:
http://bugs.python.org/file40741/0001-In-threading-module-use-with-instead-of-try-finally.patch
___
Python tracker
<http://bugs.python.org/issue25
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
Changes by Nir Soffer :
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue25298>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
--
nosy: +gregory.p.smith
___
Python tracker
<http://bugs.python.org/issue25319>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Nir Soffer :
Added file:
http://bugs.python.org/file40688/0001-Keep-lock-type-when-reseting-internal-locks.patch
___
Python tracker
<http://bugs.python.org/issue25
Changes by Nir Soffer :
Added file:
http://bugs.python.org/file40687/0001-Keep-lock-type-when-reseting-internal-locks-2.7.patch
___
Python tracker
<http://bugs.python.org/issue25
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
New submission from Nir Soffer:
Same patch works also for 2.7
--
___
Python tracker
<http://bugs.python.org/issue25298>
___
___
Python-bugs-list mailing list
Unsub
Changes by Nir Soffer :
--
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
Added file:
http
Changes by Nir Soffer :
Added file:
http://bugs.python.org/file40601/0001-Remove-unneeded-and-unsafe-mkstemp-replacement-2.7.patch
___
Python tracker
<http://bugs.python.org/issue25
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
Changes by Nir Soffer :
--
nosy: +nirs
___
Python tracker
<http://bugs.python.org/issue6721>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Nir Soffer added the comment:
This is a duplicate of http://bugs.python.org/issue6721
--
nosy: +nirs
___
Python tracker
<http://bugs.python.org/issue22
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
Nir Soffer 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
___
Python tracker
Changes by Nir Soffer :
--
nosy: +nirs
___
Python tracker
<http://bugs.python.org/issue1068268>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
Nir Soffer added the comment:
I quoted str.split docs:
- http://docs.python.org/lib/string-methods.html
- http://docs.python.org/dev/library/stdtypes.html
- http://docs.python.org/dev/3.0/library/stdtypes.html
string.split doc does it explain this:
>>> ' a b '.spli
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/
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
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>
__
___
Nir Soffer added the comment:
Addionally, if the default value is empty string, you expect it work with
empty string. If a non empty value is needed, it would use None as the
default.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
1 - 100 of 111 matches
Mail list logo