[issue13714] Methods of ftplib never ends if the ip address changes

2012-01-05 Thread Giampaolo Rodola'
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

[issue13714] Methods of ftplib never ends if the ip address changes

2012-01-05 Thread Giampaolo Rodola'
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

[issue13714] Methods of ftplib never ends if the ip address changes

2012-01-05 Thread Giampaolo Rodola'
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

[issue13714] Methods of ftplib never ends if the ip address changes

2012-01-05 Thread Giampaolo Rodola'
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

[issue13724] socket.create_connection and multiple IP addresses

2012-01-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13724 ___ ___ Python

[issue13761] Add flush keyword to print()

2012-01-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13761 ___ ___ Python

[issue13752] add a str.casefold() method

2012-01-19 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13752 ___ ___ Python

[issue13822] is(upper/lower/title) are not exactly correct

2012-01-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13822 ___ ___ Python

[issue13609] Add os.get_terminal_size() function

2012-01-21 Thread Giampaolo Rodola'
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

[issue13846] Add time.monotonic() function

2012-01-24 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13846 ___ ___ Python

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903 ___ ___ Python

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-03 Thread Giampaolo Rodola'
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

[issue16669] Docstrings for namedtuple

2012-12-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I don't think it is worth complicating the API for this. There have been zero requests for this functionality. Even the doc field of property() is rarely used. +1 -- nosy: +giampaolo.rodola ___ Python

[issue16646] FTP.makeport() loses socket error details

2012-12-17 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Why did you replace socket.error with OSError? I think we should use socket.create_connection() as a guide line: http://hg.python.org/cpython/file/45dfb657b430/Lib/socket.py#l401 A patch is in attachment. -- Added file: http://bugs.python.org

[issue16646] FTP.makeport() loses socket error details

2012-12-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16646

[issue16646] FTP.makeport() loses socket error details

2012-12-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- resolution: - fixed stage: commit review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16646

[issue16692] Support TLS 1.1 and TLS 1.2

2012-12-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16692 ___ ___ Python

[issue16646] FTP.makeport() loses socket error details

2012-12-17 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ouch! My bad. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16646 ___ ___ Python-bugs-list mailing

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: A couple of years ago I conducted similar tests and it turned out that 64k was the best compromise: http://code.google.com/p/pyftpdlib/issues/detail?id=94 Twisted uses 128k. I'd be for using 64k and also change asynchat.async_chat.ac_*_buffer_size

[issue16641] sched.scheduler.enter arguments should not be modifiable

2012-12-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch looks fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16641 ___ ___ Python-bugs-list

[issue16640] Less code under lock in sched.scheduler

2012-12-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch looks fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16640 ___ ___ Python-bugs-list

[issue16165] sched.scheduler.run() blocks scheduler

2012-12-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sorry for chiming in so late. The patch looks fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16165

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: IMO no. asyncore.dispatcher_with_send should not exist in the first place as it basically is a castrated version of asynchat.async_chat with less capabilities. I'd say it's there only for an historical reason. Moving ac_*_buffer_size to asyncore.dispatcher

[issue16802] fileno argument to socket.socket() undocumented

2012-12-28 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16802 ___ ___ Python

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: But even in asynchat, there's a lot of copying going on, length computations performed twice in a row, etc. What/where do you mean exactly? I see little value in focusing efforts towards things such as initiate_with_send which are not supposed to be used

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: memoryview is also great to avoid copies when sending/receiving to a socket. That's interesting. How exactly? Would producer_fifo have to change from a deque() to a memoryview() object? In that case we might have to take backward compatibility

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2012-12-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New patch in attachment. It always uses poll() and maintains and internal fd/Connection map. I get one failure due to the returned list being sorted differently than when using select() though

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2012-12-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Updated patch including test fixes is in attachment. -- Added file: http://bugs.python.org/file28501/issue10527-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10527

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2012-12-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I know. I proposed something like that here: http://mail.python.org/pipermail/python-ideas/2012-May/015223.html. In theory all the necessary pieces are already there. What's missing is an agreement on what the API should look like, and that's the hard part

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2012-12-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Well, for now I'd say let's just check in this patch as-is. I would be keen on considering this a bug and hence address the patch for Python 2.7, 3.2, 3.3 and 3.4. -- ___ Python tracker rep...@bugs.python.org

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Does asyncore expose its implementation details? I was talking about asynchat. What is supposed to change is asynchat.async_chat.producer_fifo attribute which is currently a collections.deque object

[issue16787] asyncore.dispatcher_with_send - increase the send buffer size

2012-12-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: BTW, the patch looks ok to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16787 ___ ___ Python-bugs

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2012-12-31 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola resolution: - fixed stage: patch review - commit review status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10527

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2013-01-02 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: My bad, sorry. It should be fixed now. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10527

[issue14807] Move tarfile.filemode() into stat module

2013-01-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Previous issue should have been fixed by now. Closing. -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14807

[issue16853] add a Selector to the select module

2013-01-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Is this currently being written from scratch? It shouldn't be IMO. Instead I recommend using the existent Tornado or pyftpdlib IO loop as an example: https://github.com/facebook/tornado/tree/master/tornado/platform https://github.com/facebook/tornado/blob

[issue16853] add a Selector to the select module

2013-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: @Guido: agreed. there's no SELECT_ERR anymore [...] the error will be reported when the FD will be read/written I don't think this is a good idea, particularly during this early stage. This assumption might be valid for select() but not for poll

[issue16853] add a Selector to the select module

2013-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Inline comments: http://bugs.python.org/review/16853/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16853

[issue16853] add a Selector to the select module

2013-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The actual error (which may be ECONNRESET, but also EBADF, ENOBUFS...) will be raised upon the next call to read()/write(), or can be retrieved through getsockopt(SO_ERROR). Mmmm... I would be tempted to think the same but the fact that both Tornado

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2013-01-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: asyncore's __getattr__ horror was scheduled for removal a long ago (3.1 as per issue8483). We can safely remove it for 3.4 and fix the RuntimeError exception above for all the earlier Python versions which are affected

[issue13103] copy of an asyncore dispatcher causes infinite recursion

2013-01-05 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13103

[issue16871] Cleanup a few minor things

2013-01-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ok for asyncore/asynchat in 3.4 branch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16871 ___ ___ Python

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2013-01-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: What do you mean? The intent was to use poll() instead of select() anywhere available in order to avoid running out of fds. The change didn't affect Windows because as of right now select() is the only thing available

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2013-01-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Damn, you're right. I must have messed up something while porting the patch from 3.2 all the way up to 3.4 as the merge produced some conflicts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2013-01-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: 3.3 and 3.4 branches should now be fixed. 2.7 and 3.2 still need to be fixed and the code from connections.py removed. Sorry for the mess up. -- assignee: giampaolo.rodola - ___ Python tracker rep

[issue16976] Asyncore/asynchat hangs when used with ssl sockets

2013-01-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: asyncore simply does not support SSL. That is tracked in issue 10084. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16976

[issue17006] Warn users about hashing secrets?

2013-01-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17006 ___ ___ Python

[issue16038] ftplib: unlimited readline() from connection

2013-01-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16038 ___ ___ Python

[issue16042] smtplib: unlimited readline() from connection

2013-01-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16042 ___ ___ Python

[issue16039] imaplib: unlimited readline() from connection

2013-01-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16039 ___ ___ Python

[issue16040] nntplib: unlimited readline() from connection

2013-01-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16040 ___ ___ Python

[issue16041] poplib: unlimited readline() from connection

2013-01-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16041 ___ ___ Python

[issue3871] cross and native build of python for mingw* hosts

2013-01-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This discussion got very long and it's not clear (to me at least) what the status of the patch is and whether it has been accepted for inclusion. Maybe it makes sense to bring this up to python-dev mailing list instead of keep stressing this thread

[issue17055] ftplib.ftpcp test

2013-01-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: ftplib.ftpcp? What is that? I do not understand what you're trying to test. ftplib test suite is already pretty extended. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17055

[issue16038] ftplib: unlimited readline() from connection

2013-02-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: LineTooLong should be added to ftplib.all_errors. 4096 looks enough to me. The longest lines I can think of occur when processing MLSD command which produces an output of like this: type=file;size=156;perm=r;modify=20071029155301;unique=801cd2; music.mp3

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: See issue 9285 in which I wrote a decorator for profile/cProfile. That can be modified to work both as a decorator or a context manager by using contextlib.contextmanager. Shall I continue in issue 9285 and rewrite that patch? -- nosy

[issue9285] Add a profile decorator to profile and cProfile

2013-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ok, will look into this soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9285 ___ ___ Python-bugs-list

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: As for runcall() we haven't the ability to freely support kwargs *and* filename. I see two possibilities. Kill kwargs, as such: +def runcall(func, *args, filename=None, sort=-1): +Run func(*args) under profiler, optionally saving results in +filename

[issue9285] Add a profile decorator to profile and cProfile

2013-02-12 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9285 ___ ___ Python-bugs

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-12 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17130 ___ ___ Python-bugs

[issue9285] Add a profile decorator to profile and cProfile

2013-02-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: A preliminary patch for cProfile.py is in attachment. Will make changes to profile.py later. -- Added file: http://bugs.python.org/file29050/profile.patch ___ Python tracker rep...@bugs.python.org http

[issue17197] c/profile refactoring

2013-02-12 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': profile and cProfile modules define the same utility functions (run() and runctx()) which use the same code except the profiler class. Considering that we're going to add 2 new utility functions (runcall() and runblock(), see issue9285 and issue17130) I

[issue17197] c/profile refactoring

2013-02-12 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- components: +Library (Lib) keywords: +easy -patch versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17197

[issue17197] c/profile refactoring

2013-02-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: No, it's the other way around. It's from cProfile which I import profile. diff --git a/Lib/cProfile.py b/Lib/cProfile.py --- a/Lib/cProfile.py +++ b/Lib/cProfile.py ... +import profile as _pyprofile -- ___ Python

[issue16038] ftplib: unlimited readline() from connection

2013-02-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch looks ok. Just add the new exception class to all_errors list. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16038

[issue17197] c/profile refactoring

2013-02-17 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Of course you're right. I didn't realize that. How about this (in attachment)? -- keywords: +patch Added file: http://bugs.python.org/file29106/profile-refactoring.diff ___ Python tracker rep...@bugs.python.org

[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16446 ___ ___ Python

[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I also bumped into this problem on both 2.7 and 3.3. It is very annoying. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16446

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I already posted a patch in issue 9285. Maybe we should close this one as a duplicate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17130

[issue17197] c/profile refactoring

2013-02-25 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17197

[issue9285] Add a profile decorator to profile and cProfile

2013-02-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ok, here's an updated patch modeled after: http://hg.python.org/cpython/rev/422169310b7c It works fine with cProfile.py but not with profile.py where I get this exception when I try to use the context manager (tests can be run in order to reproduce

[issue13564] ftplib and sendfile()

2013-03-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Note that is changed Giampaolo's patch to call sendfile on the whole file, not by block. That's not compatible across POSIX platforms. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue13564] ftplib and sendfile()

2013-03-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ah ok, I misinterpreted what you wrote then. Generally speaking though, you don't need to know the file size: you just decide a blocksize (= 65536 is usually ok) and use sendfile() as you use send

[issue13564] ftplib and sendfile()

2013-03-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Specifying a big blocksize doesn't mean the transfer will be faster. send/sendfile won't send more than a certain amount of bytes anyways. If I'm not mistaken I recall from previous benchmarks that after a certain point (131072 or something) increasing

[issue13564] ftplib and sendfile()

2013-03-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The transfer won't be faster mainly because it's really I/O bound. But it will use less CPU, only because you're making less syscalls. Have you actually measured this? -- ___ Python tracker rep

[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17338 ___ ___ Python

[issue13564] ftplib and sendfile()

2013-03-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It seems you're right, sorry. We need to take that into account then. In the meantime I rewrote the original patch and got rid of the use_sendfile explicit argument in order to attempt to use sendfile() by default and fall back on using send() if bytes

[issue13564] ftplib and sendfile()

2013-03-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It's necessary because sendfile() can fail with EAGAIN. As for your blocksize = filesize argument I changed my opinion: despite being less CPU consuming we might incur into problems if that number is too big. 'count' parameter on Linux, for example

[issue13564] ftplib and sendfile()

2013-03-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: 'count' is size_t, like for mmap() and any other function accepting a length, so nothing wrong can happen. Then why 'offset' and 'count' parameters have a different data type? Linux: sendfile(..., off_t *offset, size_t count); Solaris: sendfile

[issue13564] ftplib and sendfile()

2013-03-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Because offsets can be negative On Linux (and presumably on all POSIX platforms) passing a negative offset results in EINVAL. In that case, there's a problem with the patch, since select can block arbitrarily long because it doesn't take the socket

[issue13564] ftplib and sendfile()

2013-03-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: A much larger patch which should address all issues is in attachment. Updates: - use poll() instead of select() whenever possible - take socket timeout into account - take SSL/FTPS into account - when using select() look for EMFILE in case num fds

[issue13564] ftplib and sendfile()

2013-03-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13564

[issue10878] asyncore does not react properly on close()

2013-03-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm not sure what the OP and Gavin are complaining about in their last messages. Could you guys be more clear and/or provide a code sample which reproduces the problem? -- ___ Python tracker rep

[issue1641] asyncore delayed calls feature

2013-03-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm not sure how many users asyncore has out there nowadays, but if it has to stay in the stdlib then I see some value in adding a scheduler to it because it is an essential component. If this is still desirable I can restart working on a patch, although

[issue13564] ftplib and sendfile()

2013-03-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I don't understand why you must put the socket in non-blocking mode for sendfile(). I did that mainly because I'm using select() / poll() and it seems kind of natural to set the socket in non-blocking mode (proftpd does the same). I'm not sure whether

[issue13564] ftplib and sendfile()

2013-03-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Because otherwise sendfile() fails with EAGAIN many times before sending any actual data. select() / poll() make sure the while loop awakens only when the socket is ready to be written (as opposed to continuously catching EAGAIN and wait for sendfile

[issue13564] ftplib and sendfile()

2013-03-09 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I see. Well, what I'm experiencing right now if I remove the select() / poll() call is a sequence of EAGAIN errors alternated by successful sendfile() calls. Either the man page is wrong or I'm missing something

[issue12684] profile does not dump stats on exception like cProfile does

2013-03-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I wasn't aware of this issue (sorry) and I have already fixed this back in cset 422169310b7c for the 3.4 branch. 2.7, 3.2 and 3.3 branches can still be fixed though. -- versions: +Python 2.7 -Python 3.4

[issue17437] Difference between open and codecs.open

2013-03-16 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': In Python 2 the distinction between open() and codes.open() was clear because 'encoding' and 'errors' args were provided by codecs.open only. This is no longer the case in Python 3 since both args are provided also by open(). I'm probably missing

[issue17452] ftplib raises exception if ssl module is not available

2013-03-18 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Fixed, thanks. -- assignee: - giampaolo.rodola resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17452

[issue5845] rlcompleter should be enabled automatically

2013-03-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5845 ___ ___ Python-bugs

[issue13564] ftplib and sendfile()

2013-03-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: After digging a bit further it seems EAGAIN occurs in case a timeout was previously set against the socket as in ftplib.FTP(..., timeout=2) (at least on Linux, FWICT). As such, we can debate whether avoid using select/poll if timeout was not set. I'll

[issue12197] non-blocking SSL write in Windows sends large data but raises exception

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12197 ___ ___ Python

[issue12187] subprocess.wait() with a timeout uses polling on POSIX

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12187 ___ ___ Python

[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-06-08 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs

[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-06-09 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: This whole thread is becoming quite confusing. It would be better to open a separate issue for any bug or feature request which is not related to exposing signalfd(2) and pthread_sigmask

[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-09 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12303 ___ ___ Python

[issue12317] inspect.getabsfile() is not documented

2011-06-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: giampaolo.rodola nosy: giampaolo.rodola priority: normal severity: normal status: open title: inspect.getabsfile() is not documented versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

[issue9246] os.getcwd() hardcodes max path len

2011-06-18 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9246 ___ ___ Python-bugs

[issue12139] Add CCC command support to ftplib

2011-06-27 Thread Giampaolo Rodola'
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/issue12139

<    4   5   6   7   8   9   10   11   12   13   >