Giampaolo Rodola' added the comment:
Looks good to me.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27034>
___
___
Python-bugs-
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
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>
Changes by Giampaolo Rodola' <g.rod...@gmail.com>:
--
nosy: +giampaolo.rodola
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Giampaolo Rodola' added the comment:
See also #26350.
--
nosy: +giampaolo.rodola
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
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,
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
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
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
Changes by Giampaolo Rodola' <g.rod...@gmail.com>:
--
nosy: +giampaolo.rodola
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
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
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 <
Changes by Giampaolo Rodola' <g.rod...@gmail.com>:
--
nosy: +giampaolo.rodola
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.o
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue678264
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9917
___
___
Python-bugs
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23467
___
___
Python
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
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
stage: - needs patch
type: - performance
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18932
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
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: -giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
___
___
Python
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
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
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
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22524
___
___
Python
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
Giampaolo Rodola' added the comment:
Yes.
--
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16976
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
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
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
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
assignee: giampaolo.rodola -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12317
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
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
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
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
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
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
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
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
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
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
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
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
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
components: +Asyncio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21326
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
components: +Asyncio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21365
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
components: +Asyncio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21645
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
components: +Asyncio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1191964
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
components: +Asyncio
nosy: +gvanrossum, yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21599
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +josiah.carlson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17552
___
___
Python-bugs
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21080
___
___
Python
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
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
401 - 500 of 1713 matches
Mail list logo