New submission from Giampaolo Rodola' g.rod...@gmail.com:
http://docs.python.org/library/os.html#os.getuid
os.getuid() documentation just states:
Return the current process’s user id.
It is not clear, however, whether user id refers to real, effective or saved
user id.
As per:
http
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Update: I think also os.getlogin() doc is wrong.
This is what it states (2.7 doc):
Return the name of the user logged in on the controlling terminal of
the process. For most purposes, it is more useful to use the
environment variable
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Indeed, now that I google for getlogin, it's not easy to figure out what kind
of user it is supposed to return exactly.
For getuid() it seems pretty clear that we're talking about _real_ uid, though.
http://www.manpagez.com/man/2/getuid
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I think data_size_limit and command_size_limit should be class attributes
instead of instance attributes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1745035
Giampaolo Rodola' g.rod...@gmail.com added the comment:
AFAICT patch looks ok to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1745035
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10516
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: -giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2001
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Fixed for Python 2.6 in r87123.
Closing out as fixed.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9129
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10711
___
___
Python
New submission from Giampaolo Rodola' g.rod...@gmail.com:
After having implemented a similar thing in psutil (
http://code.google.com/p/psutil/issues/detail?id=142 ) I decided to contribute
a patch for Python which exposes getpriority() and setpriority() POSIX calls in
the os module
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Forgot to attach the patch.
--
Added file: http://bugs.python.org/file20177/getsetpriority.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10784
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10784
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
If somebody would provide a patch that adds prctl to the posix module,
that would be fine with me - we have a long tradition of exposing all
available system calls if somebody wants them.
Just for the record, I was about to try to do
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: -giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4953
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1559549
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Problem is you have to return False right after close().
There's an open issue to add a scheduler to asyncore:
http://bugs.python.org/issue1641
Closing this out as invalid.
--
nosy: +giampaolo.rodola
resolution: - invalid
status
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Question: should Py_BEGIN/END_ALLOW_THREADS be used around getpriority() and
setpriority() calls? It's still not clear to me when to use them exactly.
--
___
Python tracker rep
Giampaolo Rodola' g.rod...@gmail.com added the comment:
What if you return False also in writable method?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10878
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Thanks for writing this.
Follows my comments.
I would focus on trying to provide a unique interface across all platforms.
Being sendfile() not a standard POSIX I think we should not worry about
providing a strict one-to-one interface
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Also, I think it should be optional since when it's NULL, sendfile()
implicitly assumes the current offset (file's tell() return value).
This is true on Linux, at least. Not sure about other platforms but my
best guess
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I agree then, although I'm not sure there are other functions in the os module
(or anywhere else) having a variable number of args depending on the platform.
I wanted to try your patch but it does not apply cleanly (python 3.2, revision
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I agree then, although I'm not sure having a function with a variable number of
args depending on the platform is acceptable.
I wanted to try your patch but it does not apply cleanly (python 3.2, revision
87930
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
Removed message: http://bugs.python.org/msg126007
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10882
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4112
___
___
Python-bugs
Giampaolo Rodola' g.rod...@gmail.com added the comment:
The patch as-is did not work on Linux.
I had to add entries in pyconfig.h.in and configure files in order to make
os.sendfile available.
Patch is in attachment.
--
Added file: http://bugs.python.org/file20357/sendfile_v2.patch
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
versions: +Python 3.3 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1615158
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9344
___
___
Python-bugs
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4761
___
___
Python-bugs
Giampaolo Rodola' g.rod...@gmail.com added the comment:
You have misinterpreted the purpose of timeout argument.
timeout argument tells select() or poll() how long they have to wait before
returning in case no file descriptors are ready.
This has nothing to do with asyncore.loop() which
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10968
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10852
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10963
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Please note that on FreeBSD things work a little bit differently for
non-blocking sockets:
http://www.freebsd.org/cgi/man.cgi?query=sendfilesektion=2
In details I'm talking about:
When using a socket marked for non-blocking I/O
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I documented this some months ago:
http://docs.python.org/library/asyncore.html#asyncore.dispatcher_with_send
Being asynchat's push() method more convenient for such kind of task I
expressively avoided to be too specific about
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
versions: +Python 3.3 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1191964
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Could you please also add support for offset argument on Linux?
Also, headers, trailers and flags could be turned in keyword args for
simplicity.
--
___
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.org/issue3561
___
___
Python-bugs
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Copy *count* bytes from file descriptor *in* to file descriptor
*out*, starting at *offset* and continuing for *count* bytes.
The latter part is incorrect as it is not guaranteed that all bytes specified
in count argument are going
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I'm pretty sure that Solaris isn't the only platform that supports non-
socket file descriptors here, Linux (the platform I'm using), is one
such case.
No, sendfile() on Linux supports only socket file descriptors:
http
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Attached is a patch which tests about half the API.
Certain functions are not documented and/or it's not clear what they do, for
others it seems unlikely they are actually used nowadays (although I haven't
checked).
Also, it probably
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11015
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
* class TestCase(unittest.TestCase): - why not give the test class a
more useful name?
done
* import_fresh_module is tested similarly to import_module - can't a
test be added that it indeed performs its special sauce?
Even
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11051
___
___
Python
New submission from Giampaolo Rodola' g.rod...@gmail.com:
From RFC-3659:
The MLST and MLSD commands are intended to standardize the file and
directory information returned by the server-FTP process. These
commands differ from the LIST command in that the format of the
replies
Giampaolo Rodola' g.rod...@gmail.com added the comment:
In case someone is interested in statistics, I wrote a sendfile() wrapper by
using ctypes for pyftpdlib and benchmark results are quite impressive:
http://code.google.com/p/pyftpdlib/issues/detail?id=152#c5
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11127
___
___
Python
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11109
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Patch in attachment provides a complete test suite.
It also fixes a problem which occurred on BSD platforms when using non-blocking
sockets: EAGAIN/EBUSY are now raised if the transmitted data == 0 bytes
reflecting socket's send
Giampaolo Rodola' g.rod...@gmail.com added the comment:
You're right, that line is certainly wrong as it should compare for bytes but
the trailer data still doesn't get appended.
Do you have a BSD box in order to figure out what's wrong
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I was testing against FreeBSD 7.0 RC1 and I confirm the problem doesn't occur
on 8.1 version. Patch in attachment adds test for flags argument and skips
headers/trailers tests on linux and solaris.
I'm ok for committing this as-is in 3.3
Giampaolo Rodola' g.rod...@gmail.com added the comment:
On a second thought I have two complaints.
There is no reason to return the file offset, also because this is only
supported on Linux. On all other platforms we are calculating the file offset
by making a sum of offset + number of bytes
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Patch in attachment removes offset and return just the number of bytes sent as
an integer.
Tests and documentation are updated accordingly.
--
Added file: http://bugs.python.org/file20733/sendfile_v8.patch
New submission from Giampaolo Rodola' g.rod...@gmail.com:
At the current state asyncore implicitly supports TCP (SOCK_STREAM) sockets
only, despite UDP support might be added in the future.
For simplicity, create_socket() should assume TCP/IP by default.
This would avoid the user to import
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
assignee: - giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11177
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Please provide more information.
Have you actually seen this happen?
retrlines method isn't currently looking for EOF.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Initial draft of a patch including tests and a new ssl_dispatcher subclass.
asynchat needs to be changed as well, probably by using a mixin class.
--
keywords: +patch
Added file: http://bugs.python.org/file20752/asyncore_ssl_v1
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I'd say the test can be removed. It's not really important.
--
assignee: - giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11214
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Patch looks fine to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11227
Giampaolo Rodola' g.rod...@gmail.com added the comment:
+1
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11232
___
___
Python-bugs-list mailing
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Such code should be rewritten via weakref.
Can you write a patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11257
Giampaolo Rodola' g.rod...@gmail.com added the comment:
What do you mean by constructions like self.ac_in_buffer[:n] will lead to
misbehaviour.?
Please try to be more precise (e.g. by providing a piece of code which
demonstrates the issue
Giampaolo Rodola' g.rod...@gmail.com added the comment:
This is not easy to do. See:
http://bugs.python.org/issue6692
Closing out as duplicate.
--
nosy: +giampaolo.rodola
resolution: - duplicate
status: open - closed
___
Python tracker rep
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11273
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I'd be fine with this. My only concern are performances.
I've tried this:
http://code.google.com/p/pyftpdlib/issues/attachmentText?id=152aid=-7106494857544071944name=bench.pytoken=bd350bbd6909c7c2a70da55db15d24ed
Results:
plain dict
Giampaolo Rodola' g.rod...@gmail.com added the comment:
+1, this has been done for other modules such as ftplib as well and probably
could be done for others such as httplib and poplib.
--
nosy: +giampaolo.rodola
___
Python tracker rep
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I would like to add source_ip and source_port parameters to
smtplib.SMTP, default to '' and 0 respectively.
It would be better to provide a unique source_address parameter defaulting to
None, for consistency
New submission from Giampaolo Rodola' g.rod...@gmail.com:
Patch in attachment provides a context manager for SMTP class so that it can be
used with the with statement.
--
messages: 129096
nosy: giampaolo.rodola, pitrou
priority: normal
severity: normal
status: open
title: smtplib
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Seems like the signature of Lib.test.mock_socket.create_connection does
not match socket.create_connection since 2.7.
You can add a fake parameter which does nothing.
What is the notation for the new keyword arguments?
fun(a, b, c
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Ouch! Here. =)
--
keywords: +patch
Added file: http://bugs.python.org/file20845/smtplib_context_manager.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11289
Giampaolo Rodola' g.rod...@gmail.com added the comment:
is print really necessary in the test?
no, my mistake
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11289
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Yes, you must update Doc/library/smtplib.rst and write tests.
If you're not the one who's gonna commit the patch you can ignore
Doc/whatsnew/3.3.srt and Misc/NEWS changes.
Updating the docstring is usually optional but I see smtplib
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11287
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
We already have 3 places where a tuple is used:
socket.socket.bind
socket.create_connection
http.client.HTTPConnection
Changing this notation in smtplib for such a rarely used feature is not worth
the effort, imo.
Also, I would not add
New submission from Giampaolo Rodola' g.rod...@gmail.com:
Unlike ftplib, smtplib and probably others, poplib suppresses error_proto
exceptions on quit().
I'm not sure in what circumstances a POP3 server can return a negative response
on QUIT but if this happens poplib should raise an exception
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Can we commit this patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11049
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Follow my comments:
+ source_address=('', 0)):
Make that default to None instead and pass it as-is to
socket.create_connection().
+self.source_address = source_address
There's no need to store the source
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I'm going to commit the patch and then watch whether some of the buildbots turn
red.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10882
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Committed in r88580.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10882
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Fixed.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11232
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Can you provide a patch including a test case?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11259
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11314
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Thanks Georg.
It seems we have a failure on Leopard:
http://www.python.org/dev/buildbot/all/builders/PPC%20Leopard%203.x/builds/1411/steps/test/logs/stdio
Also, I think I can add support for AIX if someone gives me SSH access over an
AIX
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Sorry: fixed in r88581.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11232
New submission from Giampaolo Rodola' g.rod...@gmail.com:
http://www.python.org/dev/buildbot/all/builders/sparc%20solaris10%20gcc%203.x/builds/2658/steps/test/logs/stdio
Patch in attachment.
--
files: sendfile-test.patch
keywords: patch
messages: 129411
nosy: giampaolo.rodola, loewis
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Fixed in r88604, r88605, r88606
--
resolution: - fixed
status: open - closed
versions: +Python 2.7, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11214
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Patch in attachment.
--
keywords: +patch
versions: +Python 3.3 -Python 3.2
Added file: http://bugs.python.org/file20894/nntplib-context-manager.patch
___
Python tracker rep...@bugs.python.org
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Committed in r88608 including Py_RETURN_NONE and Py_BEGIN/END_ALLOW_THREADS
changes.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Misc/NEWS updated in r88609.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10784
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Committed in r88616.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11323
___
___
Python
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Fixed in r88619.
--
nosy: +josiah.carlson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11177
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Fixed in r88620.
--
components: +Library (Lib)
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11291
Giampaolo Rodola' g.rod...@gmail.com added the comment:
You are right, I haven't thought about that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11281
Giampaolo Rodola' g.rod...@gmail.com added the comment:
(socket.error, EOFError) after quit() indicates that the socket is
disconnected, in which case we should not raise any error (or at least, this is
the approach we're using in ftplib) while all other NNTPError related errors
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +rosslagerwall
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11323
___
___
Python-bugs
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11325
___
___
Python-bugs-list
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Unless there's a way to automatically call close() when a dispatcher instance
is no longer referenced (and I can't think of anything to do that) I'd say we
better close this as rejected
Giampaolo Rodola' g.rod...@gmail.com added the comment:
What about Doc/whatsnew/3.3.rst?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4761
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11333
___
___
Python
1 - 100 of 1713 matches
Mail list logo