Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14386
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13749
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5824
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1767511
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12184
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Sorry about that. It should now be fixed.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10340
Giampaolo Rodola' g.rod...@gmail.com added the comment:
http://hg.python.org/cpython/rev/0b960e41e533
Let's see how it goes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10340
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Closing as duplicate of issue 13694.
--
resolution: - duplicate
status: open - closed
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13325
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
assignee: - giampaolo.rodola
priority: high - normal
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14302
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14370
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Done. Sorry for the delay.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13694
New submission from Giampaolo Rodola' g.rod...@gmail.com:
Patch in attachment adds a running property to figure out whether the server
is running or not.
Also it raises an exception in case the server has already been started or
stopped. IMO such an event should be prevented beforehand
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
title: Add socketserver.running property - Add socketserver running property
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14375
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
keywords: +needs review -patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14375
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I agree it would be great to do this, in fact I'm using a modified version of
asyncore supporting register(), unregister() and modify() methods for file
descriptors, and the performance benefits are enormous.
On the other hand
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14373
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14320
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14307
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14309
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14295
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14310
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14139
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13248
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14170
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12655
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13997
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13972
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13968
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13742
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
No problem.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13928
___
___
Python-bugs
Giampaolo Rodola' g.rod...@gmail.com added the comment:
This biggest challenge I have noticed so far in exploring
this is how to handle timeouts on Windows
I haven't actually looked into it but this somewhat recalls:
http://bugs.python.org/issue1191964
Since issue1191964 is supposed
Giampaolo Rodola' g.rod...@gmail.com added the comment:
i can't understand this, does it means that one may use
self.connect() in handle_write()?
Nope. When handle_write() is called you are supposed to be *already* connected,
hence there's no point in calling connect() again
Giampaolo Rodola' g.rod...@gmail.com added the comment:
why is a not connected connection writable?
A non connected socket must be writable in order to connect.
if we call dispatcher.connect() immediately after .connect(),
socket error 10057 may be raised,
Not sure what you mean here
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13903
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13846
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
read environment varaiables [...] and raise an error if the size cannot be
read (so no need of default values). The os module is written as a thin
wrapper between Python and the OS. A more high level function (read
environment
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13822
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13752
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13761
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13724
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
It seems expected behavior to me, and the same issue should apply to all other
network libs as well. What would you expect ftplib to do in such case?
--
nosy: +giampaolo.rodola
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
What storbinary does is just using a socket to send data.
There's no way for storbinary to ask the socket whether an unpredicted event
such as an IP change occurred and neither it should.
As a user, you just shouldn't change the IP
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Since you say the connection hangs I think you can set a timeout:
ftp = ftplib.FTP(..., timeout=30)
That is applied to both control and data connection (and hence storbinary).
This way you should get a socket.timeout exception after 30
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Python can't do that. It's a socket implementation detail. Python just exposes
the underlying socket implementation as-is.
I'm closing this out as rejected.
--
assignee: - giampaolo.rodola
resolution: - rejected
status: open
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I'm not sure how useful this is as addr will be set later, when connection is
established.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13694
Giampaolo Rodola' g.rod...@gmail.com added the comment:
What I would do:
- build the namedtuple in Python rather than in C
- I don't particularly like CamelCased names for nametuples (I would use size
instead of TerminalSize)
- on UNIX, the ioctl() stuff can be done in python rather than in C
Giampaolo Rodola' g.rod...@gmail.com added the comment:
This should now be fixed. Thanks for signaling.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8684
Giampaolo Rodola' g.rod...@gmail.com added the comment:
http://bugs.python.org/file23241/patch1.1.diff
This looks like something which would fit better into shutil module rather than
os.
Also, the Windows implementation should not rely on ctypes.
--
nosy: +giampaolo.rodola
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
dependencies: +Add os.get_terminal_size() function
versions: -Python 2.7, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13041
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Plus, you should provide also heigth, not only width, possibly as a namedtuple:
import shutil
shutil.get_terminal_size()
size(width=80, heigth=170)
--
___
Python tracker rep
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12809
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13229
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
The docstring for shutil says: Utility functions for copying and
archiving files and directory trees. So it doesn't seem to fit at all.
Well... shutil should stand for shell utilities and it already contains stuff
which is not strictly
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5131
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7434
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6743
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13004
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10592
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10017
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8684
Giampaolo Rodola' g.rod...@gmail.com added the comment:
What about run(nowait=...) or run(only_ready=...)?
Doing this as a separate method seems unnecessarily complicated to me in terms
of implementation (move run logic into _run, add run and run_nowait,
etc...).
Most importantly, the user
Giampaolo Rodola' g.rod...@gmail.com added the comment:
blocking seems the most explicit to me.
With this, we can also fix issue1641 by providing a specific section into
asyncore doc which explains how to use asyncore in conjunction with sched
Giampaolo Rodola' g.rod...@gmail.com added the comment:
With issue13449 fixed I think we can now provide this functionnality by adding
a specific section into asyncore doc which explains how to use asyncore in
conjunction with sched module.
As such, asyncore.py itself won't need any change
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
assignee: - giampaolo.rodola
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13449
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +josiah.carlson, josiahcarlson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13449
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Now that I think of it maybe some kind of wrapper would still be necessary.
As of right now, we'd do something like this.
At the core we would have:
import asyncore, asynchat, sched
# global
scheduler = sched.scheduler()
while 1
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12082
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Are you suggesting to enable thread-synchronization by default and get rid of
explicit synchronized argument?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8684
Giampaolo Rodola' g.rod...@gmail.com added the comment:
This is what I get by using bench.py script attached to issue13451:
CURRENT VERSION (NO LOCK)
test_cancel: time=0.67457 : calls=1 : stdev=0.0
test_empty : time=0.00025 : calls=1 : stdev=0.0
Giampaolo Rodola' g.rod...@gmail.com added the comment:
New patch in attachment. I'll commit it later today.
--
nosy: +rhettinger
Added file: http://bugs.python.org/file23925/sched-thread-safe.patch
___
Python tracker rep...@bugs.python.org
http
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Thread locks introduced in issue8684 should make this change more robust.
If this patch is reasonable, I'd like to commit it before the one in issue8684
for simplicity.
Raymond?
--
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13585
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11647
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
That's why I nosyed you. Thanks. ;)
--
assignee: - giampaolo.rodola
components: +Library (Lib)
keywords: +easy -patch
resolution: - fixed
status: open - closed
___
Python tracker rep
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Updated patch adding a synchronized argument to scheduler class and updating
doc is in attachment.
--
Added file: http://bugs.python.org/file23903/sched-thread-safe.patch
___
Python tracker rep
Giampaolo Rodola' g.rod...@gmail.com added the comment:
This is not possible for two reasons:
- on most POSIX systems, sendfile() works with mmap-like (regular) files
only, while HTTPConnection.send() accepts any file-like object as long as it
provides a read() method
- after read()ing
New submission from Giampaolo Rodola' g.rod...@gmail.com:
Patch in attachment.
--
files: ftplib.patch
keywords: patch
messages: 149074
nosy: giampaolo.rodola, pitrou
priority: normal
severity: normal
status: open
title: Make use of with statement in ftplib
versions: Python 3.3
Added
New submission from Giampaolo Rodola' g.rod...@gmail.com:
In attachment.
This is actually just an excuse to store the patch somewhere and possibly
collect opinions as I don't really think this should go in because:
- it's UNIX only
- as such, deciding whether using sendfile() should probably
Giampaolo Rodola' g.rod...@gmail.com added the comment:
ftplib's sendfile support is not tracked as issue13559.
Considerations I made there should apply here as well.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13559
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Ops! I meant issue13564.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13559
Giampaolo Rodola' g.rod...@gmail.com added the comment:
New patch in attachment takes care of modifying empty() and queue property
according with the new implementation.
With this, the API behaves the same as before (this was my main concern).
Also, it's smarter when it comes to cleaning up too
Changes by Giampaolo Rodola' g.rod...@gmail.com:
Added file: http://bugs.python.org/file23786/bench.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13451
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Looking back at this patch, I think we can extract the thread-synchronization
parts and the peek() method, as they're both valuable additions, especially the
first one.
The very sched doc says:
In multi-threaded environments
Giampaolo Rodola' g.rod...@gmail.com added the comment:
In attachment.
Before the patch:
9.433167934417725
After the patch:
0.0016150474548339844
scheduler.queue and scheduler.empty should be modified in accordance (which I
haven't done, it's just to give you an idea).
--
Added
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Checked in as f1a21f2e3bec and dc52db0fa2e5.
Thanks.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13245
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I think this should go in.
I'm going to provide a slighly modified version of the attached patch which
includes document changes and get rid of some unit tests which are not really
necessary in my opinion.
--
nosy
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Updated patch in attachment.
--
Added file: http://bugs.python.org/file23745/issue13245.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13245
New submission from Giampaolo Rodola' g.rod...@gmail.com:
If True it would run the scheduled functions due to expire soonest (if any) and
then return.
This would make sched module usable into asynchronous applications.
--
messages: 148095
nosy: giampaolo.rodola
priority: normal
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file23746/sched-async.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13449
New submission from Giampaolo Rodola' g.rod...@gmail.com:
snippet
# bench.py
import sched, time
events = []
scheduler = sched.scheduler(time.time, time.sleep)
for x in range(4000):
scheduler.enter(1, 1, lambda: None, ())
t = time.time()
for x in scheduler._queue:
scheduler.cancel(x
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3974
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6397
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue444582
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1677872
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I think this thread is becoming a little messy and since asyncore/asynchat are
in a situation where even the slightest change can break existent code I
recommend to be really careful.
I see 3 different issues here:
1
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13344
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
When the remote end disconnects, handle_close is only called if recv
is called (from handle_read).
Actually this isn't true; handle_close() is also called in send():
http://hg.python.org/cpython/file/eb2991f7cdc8/Lib/asyncore.py#l364
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Follow my comments about half_duplex_close.diff (current latest patch).
+def handle_close(self):
+if not self._closing:
+self._closing = True
+# try to drain the output buffer
+while
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: -giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13218
___
___
Python
801 - 900 of 1713 matches
Mail list logo