[issue27034] Remove derecated asynchat.fifo

2016-05-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Looks good to me. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27034> ___ ___ Python-bugs-

[issue25933] Unhandled exception (TypeError) with ftplib in function retrbinary/retrlines causes inoperable behavior without crashing

2016-03-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It looks to me that forcing self.voidresp() in case the callback raises an exception is a bad idea: it may easily end up hanging if the server is not supposed to send a response at that point (see: the transfer is not finished). As for the issue per se: I

[issue25458] ftplib: command response shift - mismatch

2016-03-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I'm not sure I understood the problem. Perhaps if you provide a patch that would make things more clear and you'd have more chances to see this issue fixed. -- ___ Python tracker <rep...@bugs.python.org>

[issue11361] suggestion for os.kill(pid,CTRL_C_EVENT) in tests

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

[issue23948] Deprecate os.kill() on Windows

2016-02-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: See also #26350. -- nosy: +giampaolo.rodola ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Different but kind of related, disk_usage() is not able to accept bytes: >>> shutil.disk_usage(b'.') Traceback (most recent call last): File "", line 1, in File "C:\python34\lib\shutil.py", line 989, in disk total,

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': On Python 3.4, Windows 7: >>> import shutil, os >>> path = 'psuugxik1s0รจ' >>> os.stat(path) os.stat_result(st_mode=33206, st_ino=6755399441249628, st_dev=3158553679, st_nlink=1, st_uid=0, st_gid=0, st_size=27136, st_atime=1455

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: You are right, my bad. I'll fix doc mentioning that on Windows "path" can only be a directory (on UNIX it can also be a file). -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.py

[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-11-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I confirm the problem can be fixed by installing SP-1 (on Windows 7). Thanks eryksun. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

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

[issue25157] Installing Python 3.5.0 32bit on Windows 8.1 64bit system gives Error 0x80240017

2015-11-02 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I am having the same problem with Windows 7 64-bit. Tried to install all updates but nothing changed. As for the suggestion to install SP1 1: - Windows update does not automatically install it - As for the manual installation I am not sure which file

[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This is supposed to be a new feature hence the patch should be targeted against Python 3.6, definitively not 2.7. -- versions: +Python 3.6 -Python 2.7, Python 3.4, Python 3.5 ___ Python tracker <

[issue1103213] Adding a recvexactly() to socket.socket: receive exactly n bytes

2015-09-18 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' <g.rod...@gmail.com>: -- nosy: +giampaolo.rodola ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.o

[issue678264] test_resource fails when file size is limited

2015-08-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/issue678264 ___ ___ Python

[issue9917] resource max value represented as signed when should be unsigned

2015-08-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/issue9917 ___ ___ Python-bugs

[issue4709] Mingw-w64 and python on windows x64

2015-05-18 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: For what it's worth I dropped support for mingw32 in psutil for exact the same reasons. As such I cannot imagine how hard could it be to add and maintain support for mingw in a much larger project as Python

[issue23467] Improve byte formatting compatibility between Py2 and Py3

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

[issue18932] Optimize selectors.EpollSelector.modify()

2015-02-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Attached is a patch (for epoll only) which updates the SelectorKey. This introduces a considerable slowdown compared to my first patch: no patch:16.2 usec per loop your patch: 12.4 usec per loop my patch:10.9 usec per loop first patch: 3.07 usec

[issue18932] Optimize selectors.EpollSelector.modify()

2015-02-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Yes, it appears so. I would suggest to come up with a patch which overrides modify() for all those selectors which can benefit from it (poll, epoll, kqueue) and refactor register() / unregister() (for select) in a separate issue / patch. Also, I suppose

[issue18932] Optimize selectors.EpollSelector.modify()

2015-02-05 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- stage: - needs patch type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18932

[issue18932] Optimize selectors.EpollSelector.modify()

2015-02-05 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I mean something like this (for epoll), as in avoiding to call unregister() / register() at all: diff -r 017e7391ab58 Lib/selectors.py --- a/Lib/selectors.py Wed Feb 04 08:37:02 2015 -0800 +++ b/Lib/selectors.py Thu Feb 05 18:42:26 2015 +0100 @@ -412,6

[issue18932] Optimize selectors.EpollSelector.modify()

2015-02-04 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: _BaseSelectorImpl.modify() still calls unregister() and register(). To my understanding the whole point of this proposal was to avoid that in order to obtain the speedup and (possibly) avoid race conditions

[issue2292] Missing *-unpacking generalizations

2015-01-22 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: -giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2292 ___ ___ Python

[issue10388] spwd returning different value depending on privileges

2014-12-31 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I still think this should be fixed (raise an exception) in the next major release. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10388

[issue23111] ftplib.FTP_TLS's default constructor does not work with TLSv1.1 or TLSv1.2

2014-12-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: ssl_version is a class attribute so you can simply set that before instantiating FTP_TLS class: import ftplib ftplib.FTP_TLS.ssl_version = ... client = ftplib.FTP_TLS(...) ... -- ___ Python tracker rep

[issue22642] trace module: unclear error message

2014-10-15 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': $ python3.4 -m trace -l Traceback (most recent call last): File /usr/local/lib/python3.4/runpy.py, line 170, in _run_module_as_main __main__, mod_spec) File /usr/local/lib/python3.4/runpy.py, line 85, in _run_code exec(code, run_globals) File

[issue12458] Tracebacks should contain the first line of continuation lines

2014-10-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- stage: test needed - needs patch versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12458

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

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

[issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error

2014-06-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: @Giampaolo can you add anything to this? As for smptd encoding error I think a reasonable thing to do would be to reply with 501 Can't decode command.. There's no way for the server to return a more specific error message (e.g. SSL is not supported

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

2014-06-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Yes. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16976

[issue6916] Remove deprecated items from asynchat

2014-06-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Signaling the deprecation or just the existence of asynchat.fifo really isn't worth the effort because the code is no longer used since fifo was replaced with a deque in python 2.6. Basically it's dead code and the only reason it remained there is because

[issue9693] asynchat push_callable() patch

2014-06-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Yeah, I don't think this is worth it anymore. Closing as won't fix. -- assignee: - giampaolo.rodola resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue19495] Enhancement for timeit: measure time to run blocks of code using 'with'

2014-06-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It might still be worth having a time elapsed decorator This is exactly what I think. It's a very common task. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19495

[issue6916] Remove deprecated items from asynchat

2014-06-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I simply removed asynchat.fifo documentation. Closing this out. -- resolution: - fixed status: open - closed versions: +Python 3.5 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue12317] inspect.getabsfile() is not documented

2014-06-14 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: giampaolo.rodola - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12317

[issue10084] SSL support for asyncore

2014-06-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: asyncore module has been deprecated as per https://docs.python.org/3/library/asyncore.html: This module exists for backwards compatibility only. For new code we recommend using asyncio. Closing this out as won't fix. -- resolution: - wont fix

[issue11792] asyncore module print to stdout

2014-06-14 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Looking back at this: a warning seems a bit too invasive to me as there are cases where avoiding to override a certain methods are legitimate. I will just close this out as won't fix, also because asyncore has been deprecated by asyncio

[issue13564] ftplib and sendfile()

2014-06-11 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file35568/ftplib-sendfile5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13564

[issue13564] ftplib and sendfile()

2014-06-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Updated patch which uses the newly added socket.sendfile() method (issue 17552). -- assignee: - giampaolo.rodola type: enhancement - performance versions: +Python 3.5 -Python 3.4 ___ Python tracker rep

[issue13559] Use sendfile where possible in httplib

2014-06-11 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch in attachment uses the newly added socket.sendfile() method (issue 17552). -- keywords: +patch type: enhancement - performance Added file: http://bugs.python.org/file35569/httplib-sendfile.patch ___ Python

[issue21721] socket.sendfile() should use TransmitFile on Windows

2014-06-11 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': This is a follow up of issue 17552 which adds a new socket.sendfile() method taking advantage of high-performance os.sendfile() on UNIX. The same thing could be done for Windows by using TransmitFile: http://msdn.microsoft.com/en-us/library/windows/desktop

[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Charles, Antoine, any final thought about this given the reasons I stated above? If you're still -1 about adding 'send_blocksize' argument I guess I can get rid of it and perhaps reintroduce it later if we see there's demand

[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I agree, but both points are addressed by sendfile() I'm talking about send(), not sendfile(). Please remember that send() will be used as the default on Windows or when non-regular files are passed to the function. My argument is about introducing

[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: OK then, I'll trust your judgement. I'll use 8K as the default and will commit the patch soon. -- assignee: - giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552

[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- keywords: +3.2regression -needs review, patch resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552

[issue17552] Add a new socket.sendfile() method

2014-06-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Looking back at this I think a send_blocksize argument is necessary after all. shutil.copyfileobj() has it, so is ftplib.FTP.storbinary() and httplib (issue 13559) which will both be using socket.sendfile() once it gets included. Updated patch

[issue17552] Add a new socket.sendfile() method

2014-06-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I agree it is not necessary for sendfile() (you were right). Do not introducing it for send(), though, poses some questions. For instance, should we deprecate or ignore 'blocksize' argument in ftplib as well? Generally speaking, when using send

[issue17552] Add a new socket.sendfile() method

2014-06-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: ...speaking of which, now that I look back at those benchmarks it looks like 65536 bytes is the best compromise (in my latest patch I used 16348). -- ___ Python tracker rep...@bugs.python.org http

[issue21326] asyncio: request clearer error message when event loop closed

2014-06-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- components: +Asyncio ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21326 ___ ___ Python-bugs

[issue21365] asyncio.Task reference misses the most important fact about it, related info spread around intros and example commentary instead

2014-06-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- components: +Asyncio ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21365 ___ ___ Python-bugs

[issue21645] test_read_all_from_pipe_reader() of test_asyncio hangs on FreeBSD 9

2014-06-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- components: +Asyncio ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21645 ___ ___ Python-bugs

[issue1191964] asynchronous Subprocess

2014-06-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- components: +Asyncio ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1191964 ___ ___ Python-bugs

[issue21599] Argument transport in attach and detach method in Server class in base_events file is not used

2014-06-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- components: +Asyncio nosy: +gvanrossum, yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21599

[issue18381] unittest warnings counter

2014-06-03 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: FWICT Berker's patch LGTM. Michael, are you OK with committing this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18381

[issue18695] os.statvfs() not working well with unicode paths

2014-05-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ok, I will go on then. You have eaten return NULL; in posix_mkfifo. What do you mean? If TESTFN_UNICODE.encode(TESTFN_ENCODING) fails (on POSIX locale), it will be better to run tests with unicode(TESTFN, 'ascii') than skip them. Agreed. Tests

[issue21531] Sending a zero-length UDP packet to asyncore invokes handle_close()

2014-05-19 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: That doesn't surprise me as asyncore does not natively support UDP protocol in the first place. -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21531

[issue21423] concurrent.futures.ThreadPoolExecutor should accept an initializer argument

2014-05-13 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Related: https://groups.google.com/forum/#!topic/dev-python/ytbYwHXKC6o I'm not sure how what is proposed here would be useful for ThreadPoolExecutor but it would definitely be helpful being able to set an initializer for ProcessPoolExecutor because right

[issue1284316] Win32: Security problem with default installation directory

2014-04-29 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1284316

[issue1284316] Win32: Security problem with default installation directory

2014-04-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: If on one hand I agree that Python being in C:\PythonXX is not optimal for all the reasons which have been mentioned so far, changing such an old established aspect of the interpreter would be too much disruptive as a change. To say one, being

[issue13559] Use sendfile where possible in httplib

2014-04-28 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- dependencies: +Add a new socket.sendfile() method versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13559

[issue17552] socket.sendfile()

2014-04-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Given the opinions expressed so far I: - got rid of the blocksize parameter - got rid of the use_fallback parameter - added a count parameter - used os.fstat() to figure out the total file size and passed it directly to sendfile() I'm attaching socket

[issue17552] socket.sendfile()

2014-04-24 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: [...] I'd like a parameter for the offset, and another one for the number of bytes to send. To sum up, I think there's a fundamental confusion between blocksize and count in this API. Ah OK, I see what you mean now. If seems we didn't understand each

[issue17552] socket.sendfile()

2014-04-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: 1) I really don't like the use_fallback argument Apart from complicating the prototype, what do this bring? My initial thought was that the user might want to know *why* a file cannot be sent by using the fastest method and hence wants to see the original

[issue17552] socket.sendfile()

2014-04-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Note: my example about limiting the transfer speed does not really apply 'cause as this stands right now it cannot be used with non-blocking sockets. Other arguments do though and I hope it's clear that we need blocksize

[issue17552] socket.sendfile()

2014-04-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Considering the current indecision about certain design aspects I started a discussion on python-ideas: https://mail.python.org/pipermail/python-ideas/2014-April/027752.html -- ___ Python tracker rep

[issue17552] socket.sendfile()

2014-04-23 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I think asyncio would be better off using os.sendfile() / TransmitFile directly, in fact the current patch explicitly does not support non-blocking sockets (I couldn't see any sane approach to do that). Here's an example of how os.sendfile() should be used

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': s = socket.socket() s.type SocketType.SOCK_STREAM: 1 s.settimeout(2) s.type 2049 I can reproduce this with Python 3.5, 3.4 and 3.3. 2.7 is not affected. -- messages: 216999 nosy: giampaolo.rodola priority: normal severity: normal status

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: It seems this was introduced in issue 7523 / revision 12442ac3f7dd. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21327

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- Removed message: http://bugs.python.org/msg217001 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21327

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Generally speaking I think it's fine to have this behavior only if the socket object is instantiated like this: s = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_NONBLOCK) s.type 2049 ...but when it comes to using setblocking() I would not expect

[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Generally speaking I think it's fine to have this behavior only if the socket object is instantiated like this: s = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_NONBLOCK) s.type 2049 ...but when it comes to using settimeout() I would not expect

[issue17552] socket.sendfile()

2014-04-22 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Yet another patch fixing some problems on Windows. Hopefully this should be the last one as for what concerns the POSIX systems. As such I would kindly ask for a review and/or further suggestions. -- Added file: http://bugs.python.org/file35004

[issue17552] socket.sendfile()

2014-04-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Attached is a simple benchmark script transmitting a 100MB file. On my Linux box sendfile() is almost twice as fast as send(): send() real 0.0613s user 0.0100s sys 0.0900s total0.1000s sendfile() real 0.0318s user 0.s sys

[issue17552] socket.sendfile()

2014-04-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Instead of returning [...] you could specify `no_fallback=False` that could be set to `True` to assert that the fallback is not used [...] and return the number of bytes sent. Good idea, thanks, that is much better indeed. Updated patch is in attachment

[issue17552] socket.sendfile()

2014-04-21 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +josiah.carlson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552 ___ ___ Python-bugs

[issue17552] socket.sendfile()

2014-04-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New patch in attachment. Changes: - docs - replaced select() / poll() with the new selectors module - file position is always updated both on return and on error; this means file.tell() is the designated way to know how many bytes were sent - replaced

[issue17552] socket.sendfile()

2014-04-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17552

[issue20421] expose SSL socket protocol version

2014-04-18 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Debatable. Maybe I'm +0.1 for returning the plain string. IMO when it comes to stdlib modules, enums are only really useful for converting integer constants. -- ___ Python tracker rep...@bugs.python.org http

[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2014-04-17 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Interesting, I wasn't aware of this FTP(S) feature. Unfortunately RFC-4217 really doesn't say much about how this should be done but it definitively looks like something worth having. AFAIU this looks like something which should be implemented by servers

[issue12523] 'str' object has no attribute 'more' [/usr/lib/python3.2/asynchat.py|initiate_send|245]

2014-04-16 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The part of the code where that is more likely to happen is the push() method. One might also submit a producer (push_with_producer()) erroneously returning strings on more() though; how to properly fix this one is not clear to me because of the bad

[issue1191964] asynchronous Subprocess

2014-04-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Some initial comments here: http://bugs.python.org/review/1191964/#msg1. Also, if I think about integrating this into an IO loop it seems natural to me to think about timeouts. How complicated would it be to do this? data = proc.read_nonblocking(timeout=0

[issue21076] Turn signal.SIG* constants into enums

2014-04-04 Thread Giampaolo Rodola'
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/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-04-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: If there are no other concerns I will commit latest patch tomorrow, then do the renaming. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21126] Integrate doctest.run_docstring_examples() with unittest

2014-04-01 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': In order to run a certain function via doctest run_docstring_examples() can be used: http://stackoverflow.com/a/10081450/376587 The function returns None though. I am in a situation where I want to run a single function's doctest from a unittest and want

[issue21076] Turn signal.SIG* constants into enums

2014-03-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: (replying here 'cause rietveld keeps giving me an exception when I submit a reply) On 2014/03/28 00:49:47, haypo wrote: http://bugs.python.org/review/21076/diff/11457/Lib/signal.py File Lib/signal.py (right): http://bugs.python.org/review/21076/diff

[issue21076] Turn signal.SIG* constants into enums

2014-03-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New patch in attachment provides 3 enum containers and overrides all the necessary signal module APIs so that they interoperate with enums on both get and set. I decided *not* to rename signamodule.c to _signamodule.c in this patch so that it is easier

[issue21076] Turn signal.SIG* constants into enums

2014-03-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Updated patch following Victor's suggestions is in attachment. -- Added file: http://bugs.python.org/file34655/signals4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': Relevant discussion + BDFL approval: https://mail.python.org/pipermail/python-ideas/2014-March/027286.html Patch (not tested on Windows) is in attachment. -- components: Library (Lib) files: signals.patch keywords: patch messages: 214959 nosy

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file34637/signals.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Removed file: http://bugs.python.org/file34637/signals.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file34640/signals.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Removed file: http://bugs.python.org/file34640/signals.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file34642/signals.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This time I made it without --git but that didn't help either. Not sure what to do. :-\ Note: the devguide recommends using --git BTW: http://docs.python.org/devguide/committing.html Should that be changed

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Removed file: http://bugs.python.org/file34642/signals.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: Added file: http://bugs.python.org/file34643/signals2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: OK, it appears it works now. Sorry for the notification noise. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076

[issue21080] asyncio.subprocess: connect pipes of two programs

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

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-03-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: -1 about adding raise_on_blocking_send=False option as IMO it unnecessarily complicates the API. Note: when working with plain sockets send() returning 0 means the connection has been closed by the other peer, same for os.sendfile(). It appears ssl module

[issue21068] Make ssl.PROTOCOL_* an enum

2014-03-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I like this. Possibly it should be done for all ssl APIs returning a constant. Are there others? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21068

<    1   2   3   4   5   6   7   8   9   10   >