[issue13291] latent NameError in xmlrpc package
Ezio Melotti ezio.melo...@gmail.com added the comment: I left a couple of comments on rietveld. -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13218] test_ssl failures on Debian/Ubuntu
Nadeem Vawda nadeem.va...@gmail.com added the comment: New changeset 3c225f938dae by Barry Warsaw in branch '2.7': - Issue #13218: Fix test_ssl failures on Debian/Ubuntu. http://hg.python.org/cpython/rev/3c225f938dae This changeset appears to have broken a number of the 2.7 Linux buildbots: http://www.python.org/dev/buildbot/all/builders/AMD64%20Gentoo%20Wide%202.7/builds/861 http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%202.7/builds/287 http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%20Non-Debug%202.7/builds/245 http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%202.7/builds/1147 http://www.python.org/dev/buildbot/all/builders/ARM%20Ubuntu%202.7/builds/24 All of the errors look something like: == ERROR: test_protocol_sslv3 (test.test_ssl.ThreadedTests) Connecting to an SSLv3 server with various client options -- Traceback (most recent call last): File /home/buildbot/buildarea/2.7.ochtman-gentoo-amd64/build/Lib/test/test_ssl.py, line 75, in f return func(*args, **kwargs) File /home/buildbot/buildarea/2.7.ochtman-gentoo-amd64/build/Lib/test/test_ssl.py, line 1029, in test_protocol_sslv3 client_options=ssl.OP_NO_SSLv3) AttributeError: 'module' object has no attribute 'OP_NO_SSLv3' == ERROR: test_protocol_tlsv1 (test.test_ssl.ThreadedTests) Connecting to a TLSv1 server with various client options -- Traceback (most recent call last): File /home/buildbot/buildarea/2.7.ochtman-gentoo-amd64/build/Lib/test/test_ssl.py, line 75, in f return func(*args, **kwargs) File /home/buildbot/buildarea/2.7.ochtman-gentoo-amd64/build/Lib/test/test_ssl.py, line 1044, in test_protocol_tlsv1 client_options=ssl.OP_NO_TLSv1) AttributeError: 'module' object has no attribute 'OP_NO_TLSv1' The ARM Ubuntu builder gets two additional errors, saying that ssl.PROTOCOL_SSLv2 doesn't exist either. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13291] latent NameError in xmlrpc package
Florent Xicluna florent.xicl...@gmail.com added the comment: Thank you. Patch updated. -- Added file: http://bugs.python.org/file23551/issue13291_xmlrpc_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception
Charles-François Natali neolo...@free.fr added the comment: This does not seem to work. Yes, the proposed fix is buggy: the solution is to drain the output buffer, guarding against recursive calls between send() and handle_close() (patch attached). Note that after the first 'handle_close' has been printed, there are no 'handle_write' printed, which indicates that the operating system (here linux) states that the socket is not writable. That's because you're closing the socket, whereas the original report is dealing with half-shutdown connections. Try this: class Reader(asyncore.dispatcher): def __init__(self, sock): asyncore.dispatcher.__init__(self, sock) +self.shutdown = False def writable(self): return False def handle_read(self): self.recv(64) -self.close() +if not self.shutdown: +self.shutdown = True +self.socket.shutdown(socket.SHUT_WR) class Writer(asyncore.dispatcher_with_send): def __init__(self, address): This will behave as expected. Calling socket.shutdown(socket.SHUT_WR) means that you won't send any more data, but that you're still ready to receive: it results in a FIN being sent to the remote endpoint, which will receive EOF on recv(). But subsequent send() from the remote endpoint will still succeed. Whereas with socket.close(), you not only shut down your sending part, but you also signify that you don't want to receive data any more: a FIN will be sent immediately to the remote endpoint, and on subsequent send() from the remote endpoint, a RST will be returned, which will result in EPIPE (or, in there was data in the receive socket buffer when the local endpoint was closed, a RST will be sent directly, resulting in ECONNRESET). I still need to write a test. -- keywords: +patch Added file: http://bugs.python.org/file23552/asyncore_drain.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12498 ___diff --git a/Lib/asyncore.py b/Lib/asyncore.py --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -535,6 +535,7 @@ num_sent = 0 num_sent = dispatcher.send(self, self.out_buffer[:512]) self.out_buffer = self.out_buffer[num_sent:] +return num_sent def handle_write(self): self.initiate_send() @@ -548,6 +549,15 @@ self.out_buffer = self.out_buffer + data self.initiate_send() +def handle_close(self): +if not self.closing: +self.closing = True +# try to drain the output buffer +while self.writable() and self.initiate_send() 0: +pass +self.close() + + # --- # used for debugging. # --- ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5875] test_distutils failing on OpenSUSE 10.3, Py3k
Charles-François Natali neolo...@free.fr added the comment: Here's the error message: error: File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyc error: File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyo File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyc File not found: /tmp/tmpsga9lh/foo/build/bdist.linux-i686/rpm/BUILDROOT/foo-0.1-1.i386/usr/local/lib/python3.3/site-packages/foo.pyo http://python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/934/steps/test/logs/stdio -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5875 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue670664] HTMLParser.py - more robust SCRIPT tag parsing
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached a new patch with a few more tests and minor refactoring. -- keywords: +needs review stage: patch review - commit review versions: +Python 2.7 Added file: http://bugs.python.org/file23553/issue670664.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue670664 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13292] missing versionadded for bytearray
New submission from Florent Xicluna florent.xicl...@gmail.com: versionadded is missing here: http://docs.python.org/library/functions.html#bytearray -- assignee: docs@python components: Documentation messages: 146633 nosy: docs@python, flox priority: normal severity: normal stage: needs patch status: open title: missing versionadded for bytearray type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13292 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10519] setobject.c no-op typo
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 72de2ac8bb4f by Petri Lehtinen in branch '2.7': Avoid unnecessary recursive function calls (closes #10519) http://hg.python.org/cpython/rev/72de2ac8bb4f New changeset 664bf4f3a820 by Petri Lehtinen in branch '3.2': Avoid unnecessary recursive function calls (closes #10519) http://hg.python.org/cpython/rev/664bf4f3a820 New changeset a5c4ae15b59d by Petri Lehtinen in branch 'default': Avoid unnecessary recursive function calls (#closes #10519) http://hg.python.org/cpython/rev/a5c4ae15b59d -- nosy: +python-dev resolution: accepted - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10519 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception
Xavier de Gaye xdeg...@gmail.com added the comment: Thanks for the explanations. I confirm that the patch fixes 'asyncore_12498.py' with your changes applied to this script. Note that the patch may break applications that have given different semantics to 'closing' ('closing' being such a common name for a network application) after they noticed that this attribute is never used by asyncore nor by asynchat. It seems that the same fix could also be applied to asynchat. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12498 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10519] setobject.c no-op typo
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 7ddc7b339a8b by Petri Lehtinen in branch '2.7': Fix the return value of set_discard (issue #10519) http://hg.python.org/cpython/rev/7ddc7b339a8b New changeset b643458a0108 by Petri Lehtinen in branch '3.2': Fix the return value of set_discard (issue #10519) http://hg.python.org/cpython/rev/b643458a0108 New changeset f634102aca01 by Petri Lehtinen in branch 'default': Fix the return value of set_discard (issue #10519) http://hg.python.org/cpython/rev/f634102aca01 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10519 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13293] xmlrpc.client encode error
New submission from luchenue l...@ooa.cc: import xmlrpc.client server = xmlrpc.client.Server('XXX') print(server.login(b'bHVjaGVudWU=',b'bHVjaGVudWU=')) = xmlrpc.client def dump_string write(escape(value)) dispatch[bytes] = dump_string = def escape(s): s = s.replace(, amp;) bytes can't replace -- messages: 146637 nosy: luchenue priority: normal severity: normal status: open title: xmlrpc.client encode error type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13293 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13277] tzinfo subclasses information
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +belopolsky, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12762] EnvironmentError_str contributes to unportable code
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12762 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13293] xmlrpc.client encode error
Florent Xicluna florent.xicl...@gmail.com added the comment: binary data should be wrapped with Binary. http://docs.python.org/dev/library/xmlrpc.client.html#binary-objects -- components: +Library (Lib), XML nosy: +flox resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13293 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13294] http.server - HEAD request when no resource is defined.
New submission from karl karl+pythonb...@la-grange.net: A very simple HTTP server #!/usr/bin/python3 import http.server from os import chdir # CONFIG ROOTPATH = '/Your/path/' PORT = 8000 # CODE def run(server_class=http.server.HTTPServer, server_handler=http.server.SimpleHTTPRequestHandler): server_address = ('', PORT) httpd = server_class(server_address, server_handler) httpd.serve_forever() class MyRequestHandler(http.server.SimpleHTTPRequestHandler): def do_GET(self): pass if __name__ == '__main__': chdir(ROOTPATH) print(server started on PORT: +str(PORT)) run(server_handler=MyRequestHandler) Let's start the server. % python3 serveur1.py server started on PORT: 8000 And let's do a GET request with curl. % curl -v http://localhost:8000/ * About to connect() to localhost port 8000 (#0) * Trying ::1... Connection refused * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) GET / HTTP/1.1 User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5 Host: localhost:8000 Accept: */* * Empty reply from server * Connection #0 to host localhost left intact curl: (52) Empty reply from server * Closing connection #0 The server sends nothing because GET is not defined and I haven't defined anything in case of errors. So far so good. Now let's do a HEAD request on the same resource. % curl -vsI http://localhost:8000/ * About to connect() to localhost port 8000 (#0) * Trying ::1... Connection refused * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8000 (#0) HEAD / HTTP/1.1 User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5 Host: localhost:8000 Accept: */* * HTTP 1.0, assume close after body HTTP/1.0 200 OK HTTP/1.0 200 OK Server: SimpleHTTP/0.6 Python/3.1.2 Server: SimpleHTTP/0.6 Python/3.1.2 Date: Sun, 30 Oct 2011 14:19:00 GMT Date: Sun, 30 Oct 2011 14:19:00 GMT Content-type: text/html; charset=utf-8 Content-type: text/html; charset=utf-8 Content-Length: 346 Content-Length: 346 * Closing connection #0 The server shows in the log the request localhost - - [30/Oct/2011 10:19:00] HEAD / HTTP/1.1 200 - And is answering. I would suggest that the default behavior is to have something similar to the one for the GET aka nothing. Or to modify the library code that for any resources not yet defined. The server answers a code 403 Forbidden. I could submit a patch in the next few days. -- components: Library (Lib) messages: 146639 nosy: karlcow, orsenthil priority: normal severity: normal status: open title: http.server - HEAD request when no resource is defined. type: feature request versions: Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13294 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12801] C realpath not used by os.path.realpath
Charles-François Natali neolo...@free.fr added the comment: Another problem with the POSIX realpath(3): it can fail with ENOENT if the target path doesn't exist, whereas the current Python implementation succeeds even if a component in the path doesn't exist. Note the quotes around succeeds, because I'm not sure whether this behavior is a good thing: the result is just plain wrong. I wonder whether we should break backwards compatibility on this particular point... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12801 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13295] html5 template for Lib/http/server.py
New submission from karl karl+pythonb...@la-grange.net: The code has a set of old HTML templates. Here is a patch to change it to very simple html5 templates. -- components: Library (Lib) files: server-html5.patch keywords: patch messages: 146641 nosy: karlcow, orsenthil priority: normal severity: normal status: open title: html5 template for Lib/http/server.py type: feature request versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file23554/server-html5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception
Xavier de Gaye xdeg...@gmail.com added the comment: Note that the patch may break applications that have given different semantics to 'closing' ('closing' being such a common name for a network application) after they noticed that this attribute is never used by asyncore nor by asynchat. I was thinking about the discussion in issue 1641, the second part of the discussion starting with msg 84972. The attached patch uses another name and drains the output buffer only on a close event, not on error conditions. I will do the patch for asynchat and do both test cases, unless you beat me to it. -- Added file: http://bugs.python.org/file23555/asyncore_drain_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12498 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13295] html5 template for Lib/http/server.py
Ezio Melotti ezio.melo...@gmail.com added the comment: I think HTML 4.01 strict is still fine -- no need to move to HTML 5 yet. The template that uses HTML 3.2 can probably be updated though. -- nosy: +eric.araujo, ezio.melotti versions: +Python 3.3 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13295] html5 template for Lib/http/server.py
Ezio Melotti ezio.melo...@gmail.com added the comment: Here's a patch to replace 3.2 with 4.01. The output of the page should be checked and validated before committing this. I'm not sure if this should go in 2.7/3.2 too, on one hand it's not a bug fix so it shouldn't, on the other hand I don't think it will break anything and it's consistent with the doctype used for the error page. -- Added file: http://bugs.python.org/file23556/issue13295.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13294] http.server - HEAD request when no resource is defined.
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13294 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception
Charles-François Natali neolo...@free.fr added the comment: The attached patch uses another name In that case, you should use a name starting with an underscore (private namespace). and drains the output buffer only on a close event, not on error conditions. Hmmm... I don't think it's a good idea. For example, look at this in send(): except socket.error as why: # winsock sometimes throws ENOTCONN if why.args[0] in _DISCONNECTED: self.handle_close() return b'' So it looks like on Windows, ENOTCONN can be returned instead of EOF: the pending_close_evt flag wouldn't be set, and we wouldn't drain the output buffer. Also, some OSes can return POLLHUP without POLLIN when the remote end shut down the connection: http://blogs.oracle.com/vlad/entry/poll_and_pollhup_in_solaris readwrite() would call handle_close() without setting the flag, and the output buffer would also be lost (Note that the current code is probably broken: when POLLHUP is received, this likely means that the remote end has shutdown the connection, but there might still be some data in the input socket buffer. I'll try to dig a little...). So I'd rather stay on the safe side, and always try to drain the output buffer in handle_close (worth case, we'll receive a EPIPE/ECONNRESET, initiate_send will return 0 and we'll break out of the loop). I will do the patch for asynchat and do both test cases, unless you beat me to it. Go ahead :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12498 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13296] IDLE: __future__ flags don't clear on shell restart
New submission from Roger Serwy roger.se...@gmail.com: The interactive interpreter in IDLE does not reset its compiler __future__ flags when you restart the shell. To verify this, type into the shell: from __future__ import barry_as_FLUFL 1 != 2 You'll get a syntax error. Restart the shell and type 1 != 2 A syntax error still occurs. The ModifiedInterpreter class in PyShell.py ultimately relies on codeop to mimic the interactive prompt. The codeop module was created specifically for remembering __future__ flags for subsequent commands. The provided patch stores the flags of the interpreter when it first initializes, and then restores them in restart_subprocess. It's a patch against 3.2.2. -- components: IDLE files: patch_future.diff keywords: patch messages: 146646 nosy: ezio.melotti, serwy priority: normal severity: normal status: open title: IDLE: __future__ flags don't clear on shell restart type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file23557/patch_future.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13296 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12797] io.FileIO and io.open should support openat
Antoine Pitrou pit...@free.fr added the comment: Here is my quick review: - shouldn't the opener also get the third open() argument (although it currently seems to always be 0o666)? - when fdobj is NULL, you shouldn't override the original error - PyLong_AsLong can fail (if the opener returns too large an int), you should check for that Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5219] IDLE/Tkinter: edit win stops updating when tooltip is active
Roger Serwy roger.se...@gmail.com added the comment: Attached is a patch against 3.2.2 which does proper after_cancel calls on the after calls to checkhide_event. -- Added file: http://bugs.python.org/file23558/patch5219.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception
Changes by Xavier de Gaye xdeg...@gmail.com: Added file: http://bugs.python.org/file23559/asyncore_shutdown.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12498 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception
Xavier de Gaye xdeg...@gmail.com added the comment: While writing the test case, I found out that the test case does not fail before the patch. It seems that draining the output buffer already works: The attached script 'asyncore_shutdown.py' drains the output buffer when run without the patch, with Python 3.2, and prints 'Done.'. The dispatcher_with_send handle_close() method is never called. The attached 'asyncore_shutdown.log' file is the output of the tcpdump of the connection. It shows that packets are sent after the first FIN. This is on linux. -- Added file: http://bugs.python.org/file23560/asyncore_shutdown.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12498 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12797] io.FileIO and io.open should support openat
Benjamin Peterson benja...@python.org added the comment: Also, the documentation should indicate what exactly is supposed to be returned by opener. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10363] Embedded python, handle (memory) leak
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 608975eafe86 by Antoine Pitrou in branch '3.2': Issue #10363: Deallocate global locks in Py_Finalize(). http://hg.python.org/cpython/rev/608975eafe86 New changeset 728595c16acd by Antoine Pitrou in branch 'default': Issue #10363: Deallocate global locks in Py_Finalize(). http://hg.python.org/cpython/rev/728595c16acd -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10363 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13265] IDLE crashes when printing some unprintable characters.
Roger Serwy roger.se...@gmail.com added the comment: I can reproduce the problem with Ubuntu 11.04 with Python 3.2. The WidgetRedirector calls tk_call with a tuple containing unencoded Unicode strings. Attached is a patch to encode all arguments if the argument has the encode attribute. This seems to fix the problem, but can someone who knows more about Python and Tk's Unicode handling take a look? -- keywords: +patch nosy: +serwy Added file: http://bugs.python.org/file23561/patch13265.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception
Charles-François Natali neolo...@free.fr added the comment: While writing the test case, I found out that the test case does not fail before the patch. It seems that draining the output buffer already works: The attached script 'asyncore_shutdown.py' drains the output buffer when run without the patch, with Python 3.2, and prints 'Done.'. The dispatcher_with_send handle_close() method is never called. That's because you didn't define a handle_read() method: since you never read from the socket, you don't detect EOF, and never call handle_close(): Try with this: print('Done.') self.close() +def handle_read(self): +self.recv(MSG_SIZE) + def handle_close(self): print('calling handle_close') asyncore.dispatcher_with_send.handle_close(self) And it'll fail ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12498 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12797] io.FileIO and io.open should support openat
Ross Lagerwall rosslagerw...@gmail.com added the comment: Updated patch: * checks for long overflow * raises original exception if opener returns null * makes it explicit that opener must return an open file descriptor. I don't think that mode should be passed in since it is not specified in the parameters to open() (and always defaults to 0o666 anyway). Specifying the file mode should be left to the opener if needed. -- Added file: http://bugs.python.org/file23562/opener_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12797 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10519] setobject.c no-op typo
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5c17394b0b95 by Petri Lehtinen in branch '3.2': Add Misc/NEWS entry for issue #10519 http://hg.python.org/cpython/rev/5c17394b0b95 New changeset 3bda54275817 by Petri Lehtinen in branch '2.7': Add Misc/NEWS entry for issue #10519 http://hg.python.org/cpython/rev/3bda54275817 New changeset a912ea48dd4c by Petri Lehtinen in branch 'default': Add Misc/NEWS entry for issue #10519 http://hg.python.org/cpython/rev/a912ea48dd4c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10519 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13291] latent NameError in xmlrpc package
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f3d454b20b35 by Florent Xicluna in branch '3.2': Closes #13291: NameError in xmlrpc package. http://hg.python.org/cpython/rev/f3d454b20b35 -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13293] xmlrpc.client encode error
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 013d2881beb5 by Florent Xicluna in branch '3.2': Issue #13293: Better error message when trying to marshal bytes using xmlrpc.client. http://hg.python.org/cpython/rev/013d2881beb5 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13293 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1467929] %-formatting and dicts
Changes by Florent Xicluna florent.xicl...@gmail.com: -- stage: needs patch - patch review versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1467929 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13295] html5 template for Lib/http/server.py
Martin v. Löwis mar...@v.loewis.de added the comment: Ezio: your patch is fine for 3.3. I agree it's not a bug fix. I propose the following additional changes, though: - the name of the root element should be lower-case in the DOCTYPE declaration. - DEFAULT_ERROR_MESSAGE should get an opening html tag. karl: HTML 3.2 may be old, but it's not outdated. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13295 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12105] open() does not able to set flags, such as O_CLOEXEC
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: fixed - duplicate ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12105 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13274] heapq pure python version uses islice without guarding for negative counts
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 57f73b0f921c by Raymond Hettinger in branch '2.7': Issue 13274: Make the pure python code for heapq more closely match the C implementation for an undefined corner case. http://hg.python.org/cpython/rev/57f73b0f921c -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13274 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13274] heapq pure python version uses islice without guarding for negative counts
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 155e57a449b5 by Raymond Hettinger in branch '3.2': Issue 13274: Make the pure python code for heapq more closely match the C implementation for an undefined corner case. http://hg.python.org/cpython/rev/155e57a449b5 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13274 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13274] heapq pure python version uses islice without guarding for negative counts
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I went ahead an added the guards to the pure python code. Still disagree with your assertion that non-cpython implementations were somehow broken when an undefined behavior was implemented in a different way -- nsmallest() and nlargest() have no guaranteed meaning for negative numbers. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13274 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13265] IDLE crashes when printing some unprintable characters.
Ned Deily n...@acm.org added the comment: Sorry, I should have noticed earlier that this is a duplicate of Issue12342. The problem is simply that Tcl/Tk does not currently support the display of Unicode code points outside of the BMP. The question then is what IDLE to do when asked to display such characters. The current behavior of letting tkinter detect the unsupported code point and bubbling up a somewhat unhelpful exception message is not the most user-friendly response. Let's continue any discussion of this over on the earlier issue. -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - characters with ord above 65535 fail to display in IDLE ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13265 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12342] characters with ord above 65535 fail to display in IDLE
Ned Deily n...@acm.org added the comment: (Merging CC list from duplicate Issue13265. -- nosy: +ezio.melotti, kbk, maniram.maniram, serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception
Xavier de Gaye xdeg...@gmail.com added the comment: That's because you didn't define a handle_read() method Ooops... Attached is a patch for dispatcher_with_send and asynchat with a test case for each, that fail when the fix is not applied. -- Added file: http://bugs.python.org/file23563/asyncore_drain_3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12498 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12342] characters with ord above 65535 fail to display in IDLE
Martin v. Löwis mar...@v.loewis.de added the comment: Changing the error message sounds fine to me. People in need of the feature should lobby their system vendors to provide a Tcl build that uses a 32-bit Tcl_UniChar. Not sure whether it would actually render the string correctly, but at least it would be able to represent it correctly internally. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2979] use_datetime in SimpleXMLRPCServer
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox stage: needs patch - patch review versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2979 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13297] xmlrpc.client could accept bytes for input and output
New submission from Florent Xicluna florent.xicl...@gmail.com: Since Python 3 makes clear the distinction between bytes and string, there is no more reason to use the xmlrpc.client.Binary wrapper for binary objects. The xmlrpc library may deal with bytes and bytearray normally. To support backward compatibility, the ServerProxy will have a keyword argument use_bytes similar to the use_datetime from issue #1120353. -- components: Library (Lib), XML messages: 14 nosy: flox priority: normal severity: normal status: open title: xmlrpc.client could accept bytes for input and output type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13297] xmlrpc.client could accept bytes for input and output
Changes by Florent Xicluna florent.xicl...@gmail.com: -- keywords: +patch stage: - patch review Added file: http://bugs.python.org/file23564/issue13297_xmlrpc_bytes.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13293] xmlrpc.client encode error
Florent Xicluna florent.xicl...@gmail.com added the comment: FWIW, I opened a feature request #13297. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13293 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13281] robotparser.RobotFileParser ignores rules preceeded by a blank line
Senthil Kumaran sent...@uthcode.com added the comment: I agree with your interpretation of the RFC. The parsing rules do not specify any provision for inclusion of blank lines within the records. However, I find that inclusion is no harm either. I checked that with a robots.txt parser (Google webmaster tools) and presented the last.fm's robots.txt file which had blank line within records. As expected, it did not crib. I would say that we can be lenient on this front and the question would if we allow, would it break any parsing rules? I think, no. The patch does not break any tests, but a new test should be added to reflect this situation. I don't have a strong opinion on having a strict=(True|False) for the blank line accommodation within records(only). I think, it is better we don't add a new parameter and just be lenient. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13298] Result type depends on order of operands for bytes and bytearray
New submission from Nick Coghlan ncogh...@gmail.com: In a recent python-ideas discussion of the differences between concatenation and augmented assignment on lists, I pointed out the general guiding principle behind Python's binary operation semantics was that the type of a binary operation should not depend on the order of the operands. That is X op Y and Y op X should either consistently create results of the same type (1 + 1.1, 1.1 + 1) or else throw an exception ([] + (), () + []). This principle is why list concatenation normally only works with other lists, but will accept arbitrary iterables for augmented assignment. collections.deque exhibits similar behaviour (i.e. strict on the binary operation, permissive on augmented assignment). However, bytes and bytearray don't follow this principle - they accept anything that implements the buffer interface even in the binary operation, leading to the following asymmetries: b'' + bytearray() b'' b'' + memoryview(b'') b'' bytearray() + b'' bytearray(b'') bytearray() + memoryview(b'') bytearray(b'') memoryview(b'') + b'' Traceback (most recent call last): File stdin, line 1, in module TypeError: unsupported operand type(s) for +: 'memoryview' and 'bytes' memoryview(b'') + bytearray(b'') Traceback (most recent call last): File stdin, line 1, in module TypeError: unsupported operand type(s) for +: 'memoryview' and 'bytearray' Now, the latter two cases are due to a known problem where returning NotImplemented from sq_concat or sq_repeat doesn't work properly (so none of the relevant method implementations in the stdlib even try), but the bytes and bytearray interaction is exactly the kind of type asymmetry the operand order independence guideline is intended to prevent. My question is - do we care enough to try to change this? If we do, then it's necessary to decide on more appropriate semantics: 1. The list solution, permitting only the same type in binary operations (high risk of breaking quite a lot of code) 2. Don't allow arbitrary buffers, but do allow bytes/bytearray interoperability 2a. always return bytes from mixed operations 2b. always return bytearray from mixed operations 2c. return the type of the first operand (ala set.__or__) Or just accept that this really is more of a guideline than a rule and adjust the documentation accordingly. -- components: Interpreter Core messages: 146669 nosy: ncoghlan priority: normal severity: normal status: open title: Result type depends on order of operands for bytes and bytearray type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13299] namedtuple row factory for sqlite3
New submission from Nick Coghlan ncogh...@gmail.com: Currently, sqlite3 allows rows to be easily returned as ordinary tuples (default) or sqlite3.Row objects (which allow dict-style access). collections.namedtuple provides a much nicer interface than sqlite3.Row for accessing ordered data which uses valid Python identifiers for field names, and can also tolerate field names which are *not* valid identifiers. It would be convenient if sqlite3 provided a row factory along the lines of the one posted here: http://peter-hoffmann.com/2010/python-sqlite-namedtuple-factory.html (except with smarter caching on the named tuples) -- messages: 146670 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: namedtuple row factory for sqlite3 type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2979] use_datetime in SimpleXMLRPCServer
Changes by Florent Xicluna florent.xicl...@gmail.com: -- assignee: - flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2979 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13298] Result type depends on order of operands for bytes and bytearray
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13226] Expose RTLD_* constants in the posix module
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: Python/sysmodule.c still contains references to DLFCN module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13226 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13300] IDLE 3.3 Restart Shell command fails
New submission from Ned Deily n...@acm.org: Currently in the default (pre-3.3) branch, IDLE fails if its Restart Shell command is attempted: Exception in Tkinter callback Traceback (most recent call last): File Lib/tkinter/__init__.py, line 1397, in __call__ return self.func(*args) File Lib/idlelib/PyShell.py, line 1180, in restart_shell self.interp.restart_subprocess() File Lib/idlelib/PyShell.py, line 429, in restart_subprocess self.rpcclt.accept() File Lib/idlelib/rpc.py, line 525, in accept working_sock, address = self.listening_sock.accept() File Lib/socket.py, line 134, in accept fd, addr = self._accept() OSError: [Errno 9] Bad file descriptor IDLE Subprocess: socket error: Connection refused, retrying IDLE Subprocess: socket error: Connection refused, retrying Warning (from warnings module): File Lib/idlelib/run.py, line 127 socket_error = err ResourceWarning: unclosed socket.socket object, fd=3, family=2, type=1, proto=0 IDLE Subprocess: socket error: Connection refused, retrying The culprit is recent changeset 3a5a0943b201 which attempted to prevent some debug ResourceWarnings during IDLE shutdown. Adding the close override to the RPCClient class causes the listening socket to be closed when the shell is restarted but then a new listening socket is not opened. The listening socket should only be closed when IDLE terminates, not when the subprocess is restarted. -- assignee: ned.deily components: IDLE messages: 146672 nosy: amaury.forgeotdarc, ned.deily priority: normal severity: normal stage: needs patch status: open title: IDLE 3.3 Restart Shell command fails type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13300] IDLE 3.3 Restart Shell command fails
Changes by Ned Deily n...@acm.org: -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file23565/issue13300-3x.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13296] IDLE: __future__ flags don't clear on shell restart
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 87251608cb64 by Ned Deily in branch '2.7': Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart. http://hg.python.org/cpython/rev/87251608cb64 New changeset 9fbf79d6be56 by Ned Deily in branch '3.2': Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart. http://hg.python.org/cpython/rev/9fbf79d6be56 New changeset d8acd4344ce9 by Ned Deily in branch 'default': Issue 13296: Fix IDLE to clear compile __future__ flags on shell restart. http://hg.python.org/cpython/rev/d8acd4344ce9 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13296 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13296] IDLE: __future__ flags don't clear on shell restart
Ned Deily n...@acm.org added the comment: Thanks for the patch! Committed to 27 (for release in 2.7.3), 32 (for 3.2.3), and default (for 3.3). -- assignee: - ned.deily nosy: +ned.deily resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13296 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13281] Make robotparser.RobotFileParser ignore blank lines
Terry J. Reedy tjre...@udel.edu added the comment: Since following the spec is not a bug, this issue is a feature request for 3.3. I agree with just being lenient with no added parameter. Perhaps that should be mentioned in the doc with (or in) a version-added note. Senthil: does doc standard allow something like Version added 3.3: Ignore blanks lines within record groups. ? -- title: robotparser.RobotFileParser ignores rules preceeded by a blank line - Make robotparser.RobotFileParser ignore blank lines type: behavior - feature request versions: -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13299] namedtuple row factory for sqlite3
Changes by Ned Deily n...@acm.org: -- nosy: +ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com