[issue11812] transient socket failure to connect to 'localhost'
Charles-François Natali neolo...@free.fr added the comment: The server thread only waits for 3 seconds for the connection. If a connection is not created before 3 seconds, the server suicides and when the connection is tried, it will fail. This probably explain why the problem is sporadic and seems to depend of name resolving. If the DNS resolver is slow, we have a problem. Indeed, but 3 seconds to resolve localhost is not slow, it's really that the name lookup service is broken. So, I would propose: 1. Use 127.0.0.1 instead of localhost. As noted, this might break on IPv6-only hosts. Not sure this will be a problem, though. Another, less intrusive solution has been suggested by Victor: use the address returned by getsockname() instead of support.HOST when connecting. 2. Delete the timeout in the server. I don't see the purpose of it, except be sure the server thread dies eventually. Lets configure the thread as daemon, and don't mind with the thread join. Sounds like a recipe for masking bugs. Having a dangling thread is probably not a good idea. If 1) is not enough to fix this failure, then you can first try to increase this to a huge value (e.g. 30 seconds). 3. Cleanup the Event signaling. OK. 4. time.sleep(0.1)?... Please... :-) Yeah, this should be removed. I have seen this issue too in 2.7, in my buildbots (OpenIndiana). Please check your name resolution setting :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9750] sqlite3 iterdump fails on column with reserved name
Lucas Sinclair blastoc...@mac.com added the comment: My patch contains two new dump tests which originally fail, and the fixes to the code that makes them pass. -- Added file: http://bugs.python.org/file23629/issue9750.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11828] startswith and endswith don't accept None as slice index
Guido van Rossum gu...@python.org added the comment: As I wrote in python-dev: I agree with Raymond that this should be treated as a feature request and not fixed in 2.7 / 3.2. (However the mention of 'find' in the error message for 'index' is a bug and should be fixed.) As for the feature request, I think that allowing None in more places is more regular and consistent across interfaces. I note that the slice() object also represents missing or default values as None, so it is not just a carryover from the old string.py. So, +1 on the feature for 3.3; -1 on the fix in 3.2 or 2.7. -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
Ned Deily n...@acm.org added the comment: Lucas, there is nothing particularly special about the configuration parameters that Michael used other than enabling debug. Prior to Xcode 4, Xcode supplied a standard (non-LLVM) gcc as the default compiler, 4.2 for 10.6 and 4.0 for 10.5 and 10.4. Python is regularly built and supported on these configurations and is known to work using a default ./configure (with no parameters). Xcode 4.2 is problematic because it no longer includes the non-LLVM gcc and there have been various rumors of problems and at least one patch applied already. As noted above, I am testing the various significant configure and compiler options right now for Xcode 4.2 and will update this issue with recommendations and patches (if necessary) when that is complete. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13369] timeout with exit code 0 while re-running failed tests
New submission from Florent Xicluna florent.xicl...@gmail.com: Seen on Windows 7 builder. http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/3949 This build is considered green by buildbot. Actually, the exit code should not be 0. (...) [360/360/4] test_descr 324 tests OK. 4 tests failed: test_distutils test_logging test_packaging test_pep277 6 tests altered the execution environment: test_multiprocessing test_site test_ssl test_subprocess test_sysconfig test_tcl 26 tests skipped: test_crypt test_curses test_dbm_gnu test_dbm_ndbm test_epoll test_fcntl test_fork1 test_gdb test_grp test_ioctl test_kqueue test_nis test_openpty test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd test_readline test_resource test_syslog test_threadsignals test_wait3 test_wait4 test_zipfile64 2 skips unexpected on win32: test_gdb test_readline Re-running failed tests in verbose mode (...) test_additional_fixers (packaging.tests.test_mixin2to3.Mixin2to3TestCase) ... ok test_convert_code_only (packaging.tests.test_mixin2to3.Mixin2to3TestCase) ... program finished with exit code 0 elapsedTime=7325.264000 -- components: Tests keywords: buildbot messages: 147280 nosy: flox priority: low severity: normal stage: needs patch status: open title: timeout with exit code 0 while re-running failed tests type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13369 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13254] maildir.items() broken
Petri Lehtinen pe...@digip.org added the comment: Even better would be to set skewfactor to something negative in this test, too. I was told that long sleeps in tests are frowned upon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13254 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13211] urllib2.HTTPError does not have 'reason' attribute.
Petri Lehtinen pe...@digip.org added the comment: Ok. Sounds that you've already evaluated this alternative, so I'm fine with it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13211 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Jesús Cea Avión j...@jcea.es added the comment: Charles-François: The only way for the server thread being around would be if the test fails badly, not calling teardown (I would do a fake tcp connection to the server in the teardown, followed by a thread.join). In this case, the thread (being daemon) will die when the tests are done anyway, and the test will be showed as fail in the buildbots, so somebody should take care of it. I would not mask anything. About using getsockname(), the bind would bind to all IPs of the machine, including real network interfaces. I rather prefer to keep the bind private and not accesible from the external network :-). I really think that ipv6-only hosts are a non-issue just now. And the failure would be quite self-evident. In Solaris I get this exception: socket.error: [Errno 126] Cannot assign requested address. Quite clear. Anyway, we can keep using localhost, but just delete the socket timeout in the server. About the nameresolution speed, it is actually happening. Could be, too, a busy machine. I know that some buildbots are running inside a virtual machine, sometimes with little real RAM and possibly paging a lot. The fact is that the 3 second delay is actually happening, and I don't think that solution should be to increase the timeout. That only mask the issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Antoine Pitrou pit...@free.fr added the comment: Anyway, we can keep using localhost, but just delete the socket timeout in the server. Please don't. Any problem might then hang the whole test suite. You can bump it up if you want, though. About using getsockname(), the bind would bind to all IPs of the machine, including real network interfaces. How so? sock = socket.socket() sock.bind((localhost, 0)) sock.getsockname() ('127.0.0.1', 60919) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13237] subprocess docs should emphasise convenience functions
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e929d2a96d9b by Nick Coghlan in branch '3.2': Issue #13237: Forward port subprocess module updates and explicitly document UTF-8 encoding assumption when universal_newlines=True http://hg.python.org/cpython/rev/e929d2a96d9b New changeset d3b159c43ee8 by Nick Coghlan in branch '3.2': Issue #13237: Remove duplicate data value descriptions from the subprocess docs http://hg.python.org/cpython/rev/d3b159c43ee8 New changeset 7545f4fb450c by Nick Coghlan in branch '3.2': Issue #13237: Fix formatting error - the legacy shell commands weren't meant to be under the Notes heading http://hg.python.org/cpython/rev/7545f4fb450c New changeset 0b50008bb953 by Nick Coghlan in branch 'default': Issue #13237: Forward port from 3.2 of subprocess documentation updates. Needed quite a few adjustments to account for new features coming in 3.3 http://hg.python.org/cpython/rev/0b50008bb953 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13237] subprocess docs should emphasise convenience functions
Nick Coghlan ncogh...@gmail.com added the comment: Well, that forward port was definitely more complicated than I expected. Additional reviews of both 3.2 and 3.3 (i.e. default) would be appreciated - there were quite a few adjustments needed to cope with changes between 2.7 and 3.2 and then additional changes between 3.2 and 3.3. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13237 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Jesús Cea Avión j...@jcea.es added the comment: Uh doing a fake connection in the teardown would be problematic if the socket is reused for something else in the meantime. The kernel is suppose to keep the socket in the not reuse state for a while, but... I am seeing too liberal mixing of support.HOST and localhost. That should be unified. I need consensus about making test.support.HOST = 127.0.0.1. What do you think? test_ftplib needs love too, but changes are far more intrusive there. I will wait until you approve changes to telnetlib.py. Please, review attached changeset. -- hgrepos: +89 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Changes by Jesús Cea Avión j...@jcea.es: Added file: http://bugs.python.org/file23630/2b155a6d25bb.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Jesús Cea Avión j...@jcea.es added the comment: Antoine: Deleting the socket timeout doesn't hang the test if we set the thread to daemon and do not do a thread.join() (unneeded in the normal situation, since garbage collecting the test instance will collect the thread too). If you don't like this, I can do a fake connection in teardown (look the proposed changeset). The problem with that is OS port reuse. Quite safe, but only quite. If thread.join had a timeout , we could wait for a while and if the thread is still active, do a fake connection and another join. A bit overkill for a test, I guess :-). I stand corrected about getsockname(). I am neutral to it, although we are still involving DNS. I would rather prefer a direct 127.0.0.1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Changes by Michael Foord mich...@voidspace.org.uk: -- nosy: -michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Antoine Pitrou pit...@free.fr added the comment: Please, review attached changeset. Doesn't look acceptable to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Antoine Pitrou pit...@free.fr added the comment: If thread.join had a timeout , we could wait for a while and if the thread is still active, do a fake connection and another join. What's wrong with a socket timeout exactly? Everything you're proposing is ten times more complicated, and more fragile. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13238] Add shell command helpers to subprocess module
Nick Coghlan ncogh...@gmail.com added the comment: After working on the documentation updates to the subprocess module to emphasise the convenience functions, I've now changed my mind and think it makes sense to keep these additions in that module. Now that the shell helpers will default to using shlex.quote() and require the !u conversion specifier to bypass that behaviour, and also will have distinct names from the ordinary non-shell based versions, my original concerns that lead to me wanting to keep them out of subprocess no longer apply. That means the general preference that subprocess be our one stop shop for explicit subprocess invocation can once again take precedence. I'm actually planning to change the API a bit though, dropping shell_format and shell_format_map in favour of the following helper class: class ShellCommand: def __init__(self, command, *, **callkwds): self.command = command self.callkwds = callkwds def format(self, *args, **kwds): return _ShellFormatter().vformat(_fmt, args, kwds) def format_map(self, mapping): return _ShellFormatter().vformat(_fmt, (), mapping) def call(self, *args, **kwds): if args or kwds: cmd = _ShellFormatter().vformat(cmd, args, kwds) return subprocess.call(cmd, shell=True, **self.callkwds) def check_call(self, *args, **kwds): if args or kwds: cmd = _ShellFormatter().vformat(cmd, args, kwds) return subprocess.check_call(cmd, shell=True, **self.callkwds) def shell_output(cmd, *args, **kwds): if args or kwds: cmd = _ShellFormatter().vformat(cmd, args, kwds) data = subprocess.check_output(cmd, shell=True, universal_newlines=True) if data[-1:] == \n: data = data[:-1] return data The module level helpers would then just become re module style wrappers: def shell_call(command, *args, **kwds): return ShellCommand(command).shell_call(*args, **kwds) def check_shell_call(command, *args, **kwds): return ShellCommand(command).check_shell_call(*args, **kwds) def shell_output(command, *args, **kwds): return ShellCommand(command).shell_output(*args, **kwds) -- title: Add shell command helpers to shutil module - Add shell command helpers to subprocess module ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13238 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13238] Add shell command helpers to subprocess module
Nick Coghlan ncogh...@gmail.com added the comment: Éric, to answer your question, with the planned version of the new API, a *.py value interpolated with {!u} should indeed pick up all of those files, since the wildcard will be passed unmodified to the underlying shell, and all shells I am aware of will accept foo bar.py as a match for *.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13238 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Jesús Cea Avión j...@jcea.es added the comment: Antoine, the problem with this test is the timeout. We can set an arbitrary timeout, but how big is big enough?. My change doesn't need a timeout at all. Problem solved. The only cosmetic problem is the risk of leaking a thread. But it would not affect the testsuite if it is a daemon thread, and we would only leak if the test fails, not under normal circunstances. The complexities suggested are heroic effords trying to manage that thread when simply ignoring it would be acceptable. I could set a timeout of 5 minutes just to satisfy you, but for that time the test should have been done yet, and the thread collected anyway. I see that more a hack that actually setting the thread to daemon and forget it, knowing that it will automatically die when done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Antoine Pitrou pit...@free.fr added the comment: Antoine, the problem with this test is the timeout. We can set an arbitrary timeout, but how big is big enough?. I would say answering this question is your task, since you have access to that buildbot. The only cosmetic problem is the risk of leaking a thread. This is not cosmetic, the thread might be keeping all kinds of resources alive, it might also break other tests which expect there to be a single running Python thread (if e.g. signals are being tested). We don't want a failing test to trigger a potential cascade of subsequent failures. I could set a timeout of 5 minutes just to satisfy you, but for that time the test should have been done yet The issue is not to satisfy me, it's to satify the buildbots. If you say that 5 minutes is necessary to reliably resolve localhost, then surely there's a configuration problem? If you say that replacing localhost with 127.0.0.1 would fix the issue, then perhaps we should do that, but we must check that it doesn't break any other tests (for example IPv6 tests). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Jesús Cea Avión j...@jcea.es added the comment: Antoine: Then you would be satisfied if I increase the timeout from 3 seconds to 60 seconds and clean the event signaling?. The current event signaling code has a few race conditions with potential deadlocks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Antoine Pitrou pit...@free.fr added the comment: Antoine: Then you would be satisfied if I increase the timeout from 3 seconds to 60 seconds and clean the event signaling? Yes! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Jesús Cea Avión j...@jcea.es added the comment: Consider too that if something goes bad enough in the test to skip the teardown method, the thread will be alive for a while, possibly contaminating some other tests, like you commented. This is actually unsolvable, I think. Code that NEED to be executed with no other threads around could/should check the thread count and fail with a clear error message. So we at least can point to the real culprit. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Antoine Pitrou pit...@free.fr added the comment: Consider too that if something goes bad enough in the test to skip the teardown method, Such as? tearDown is normally like a finally block, it always gets executed (unless perhaps setUp fails). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Changes by Jesús Cea Avión j...@jcea.es: Added file: http://bugs.python.org/file23631/71ab454bfe19.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13370] test_ctypes fails on osx 10.7
New submission from Ronald Oussoren ronaldousso...@mac.com: test_ctypes fails when building and testing on OSX 10.7 (Lion). This is likely caused by changes in the compiler w.r.t. the calling convention. I've worked around this problem in PyObjC, and will try to port that workaround to ctypes. BTW. Using --with-system-ffi does not fix the issue for me -- assignee: ronaldoussoren components: Macintosh, ctypes messages: 147299 nosy: ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: test_ctypes fails on osx 10.7 type: behavior versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Jesús Cea Avión j...@jcea.es added the comment: Please, review 71ab454bfe19.diff . I am not satisfied with the timeout approach, since the timeout time is arbitrary. I would rather do the fake connection in teardowm, to be sure the server died. Anyway, this seems to be the minimal patch to solve the problem at hand most of the time (if know the test is failing sporadically with a timeout of 3 seconds, hope it fails once per year with a timeout of 60 seconds). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13370] test_ctypes fails on osx 10.7
STINNER Victor victor.stin...@haypocalc.com added the comment: test_ctypes fails when building and testing on OSX 10.7 (Lion). What is the error message? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13370] test_ctypes fails on osx 10.7
Ronald Oussoren ronaldousso...@mac.com added the comment: I should have included the failures in my first message, sorry about that. IIRC the workaround in PyObjC I mention in my initial message does explicit sign extension when needed. W.r.t to the first couple of failures, not that: struct.unpack('b', struct.pack('B', 130)) == (-126,) == FAIL: test_byte (ctypes.test.test_cfuncs.CFunctions) -- Traceback (most recent call last): File /Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_cfuncs.py, line 21, in test_byte self.assertEqual(self.S(), -126) AssertionError: 130 != -126 == FAIL: test_byte_plus (ctypes.test.test_cfuncs.CFunctions) -- Traceback (most recent call last): File /Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_cfuncs.py, line 27, in test_byte_plus self.assertEqual(self.S(), -126) AssertionError: 130 != -126 == FAIL: test_short (ctypes.test.test_cfuncs.CFunctions) -- Traceback (most recent call last): File /Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_cfuncs.py, line 45, in test_short self.assertEqual(self.S(), -32766) AssertionError: 32770 != -32766 == FAIL: test_short_plus (ctypes.test.test_cfuncs.CFunctions) -- Traceback (most recent call last): File /Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_cfuncs.py, line 51, in test_short_plus self.assertEqual(self.S(), -32766) AssertionError: 32770 != -32766 == FAIL: test_doubleresult (ctypes.test.test_functions.FunctionTestCase) -- Traceback (most recent call last): File /Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_functions.py, line 143, in test_doubleresult self.assertEqual(result, -21) AssertionError: 65771.0 != -21 == FAIL: test_floatresult (ctypes.test.test_functions.FunctionTestCase) -- Traceback (most recent call last): File /Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_functions.py, line 131, in test_floatresult self.assertEqual(result, -21) AssertionError: 65771.0 != -21 == FAIL: test_intresult (ctypes.test.test_functions.FunctionTestCase) -- Traceback (most recent call last): File /Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_functions.py, line 105, in test_intresult self.assertEqual(result, -21) AssertionError: 65771 != -21 == FAIL: test_longdoubleresult (ctypes.test.test_functions.FunctionTestCase) -- Traceback (most recent call last): File /Library/Frameworks/PythonDev.framework/Versions/2.7/lib/python2.7/ctypes/test/test_functions.py, line 155, in test_longdoubleresult self.assertEqual(result, -21) AssertionError: 65771.0 != -21 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Changes by Jesús Cea Avión j...@jcea.es: Added file: http://bugs.python.org/file23632/b93657b239a5.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Changes by Jesús Cea Avión j...@jcea.es: Removed file: http://bugs.python.org/file23631/71ab454bfe19.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Jesús Cea Avión j...@jcea.es added the comment: Stupid mistake. Please, review b93657b239a5.diff (erroneous sock.close() deleted) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13371] Some Carbon extensions don't build on OSX 10.7
New submission from Ronald Oussoren ronaldousso...@mac.com: A number of Carbon wrapper modules don't build on OSX 10.7: $ make ... Failed to build these modules: _Fm_Qd_Qdoffs This is with '--with-universal-archs=intel', which worked fine on OSX 10.6. A short part of the compiler output: /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:26: error: expected ‘)’ before ‘*’ token /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_GetFontName’: /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:60: error: ‘GetFontName’ undeclared (first use in this function) /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:60: error: (Each undeclared identifier is reported only once /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:60: error: for each function it appears in.) /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:65: warning: implicit declaration of function ‘GetFontName’ /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_GetFNum’: /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:78: error: ‘GetFNum’ undeclared (first use in this function) /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:83: warning: implicit declaration of function ‘GetFNum’ /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_RealFont’: /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:97: error: ‘RealFont’ undeclared (first use in this function) /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:103: warning: implicit declaration of function ‘RealFont’ /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_SetFScaleDisable’: /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:115: error: ‘SetFScaleDisable’ undeclared (first use in this function) /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:120: warning: implicit declaration of function ‘SetFScaleDisable’ /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c: In function ‘Fm_FontMetrics’: /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:129: error: ‘FMetricRec’ undeclared (first use in this function) /Users/ronald/Projects/python/rw/2.7/Mac/Modules/fm/_Fmmodule.c:129: error: expected ‘;’ before ‘theMetrics’ Given the modules and failure it seems that a number of (long) deprecated Carbon functions got removed from Apple's header files. -- assignee: ronaldoussoren components: Macintosh messages: 147304 nosy: ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: Some Carbon extensions don't build on OSX 10.7 type: compile error versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13371 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Antoine Pitrou pit...@free.fr added the comment: Stupid mistake. Please, review b93657b239a5.diff (erroneous sock.close() deleted) Looks good to me, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13371] Some Carbon extensions don't build on OSX 10.7
Changes by STINNER Victor victor.stin...@haypocalc.com: -- components: +Build ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13371 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13371] Some Carbon extensions don't build on OSX 10.7
Ronald Oussoren ronaldousso...@mac.com added the comment: _Fm fails because the wrapped functionality is no longer present in the Headers (last seen in the QD.framework headers in the 10.6 SDK) likewise for _Qdoffs and _Qd. The attached patch changed the preprocessor guards around these bindings from #ifndef __LP64__ To: #if !defined(__LP64__) !defined(MAC_OS_X_VERSION_10_7) That is, disable the bindings for these deprecated APIs when building for 64-bit code or when building with the 10.7 SDK (or later). There is a small risk with this patch: I'm not 100% sure that Apple will refrain from adding a definition for MAC_OS_X_VERSION_10_7 in a later release of the 10.6 SDK. -- keywords: +patch nosy: +ned.deily stage: needs patch - patch review Added file: http://bugs.python.org/file23633/issue13371.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13371 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11812] transient socket failure to connect to 'localhost'
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 76b6b85e4b78 by Jesus Cea in branch '2.7': Solved a potential deadlock in test_telnetlib.py. Related to issue #11812 http://hg.python.org/cpython/rev/76b6b85e4b78 New changeset 554802e562fa by Jesus Cea in branch '2.7': Partial patch for issue #11812: Take care of test_telnetlib.py http://hg.python.org/cpython/rev/554802e562fa New changeset f94533c9229d by Jesus Cea in branch '3.2': Solved a potential deadlock in test_telnetlib.py. Related to issue #11812 http://hg.python.org/cpython/rev/f94533c9229d New changeset 3b9f58f85d3e by Jesus Cea in branch '3.2': Partial patch for issue #11812: Take care of test_telnetlib.py http://hg.python.org/cpython/rev/3b9f58f85d3e New changeset 85c10a905424 by Jesus Cea in branch 'default': MERGE: Solved a potential deadlock in test_telnetlib.py. Related to issue #11812 http://hg.python.org/cpython/rev/85c10a905424 New changeset ca8a0dfb2176 by Jesus Cea in branch 'default': MERGE: Partial patch for issue #11812: Take care of test_telnetlib.py http://hg.python.org/cpython/rev/ca8a0dfb2176 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13327] Update utime API to not require explicit None argument
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 8907d646e0df by Jesus Cea in branch 'default': Commit 59dca1e2363d for issue #13327 introduced a compilation warning http://hg.python.org/cpython/rev/8907d646e0df -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13327 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13364] Duplicated code in decimal module
Mark Dickinson dicki...@gmail.com added the comment: Sorry, I'm closing this as rejected. It might possibly have been better to write the code this way to begin with, but the code is already there, it's working, and there's little to be gained by 'fixing' it at this point. -- assignee: - mark.dickinson resolution: - rejected status: open - closed type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13360] UnicodeWarning raised on sequence and set comparisons
Florent Xicluna florent.xicl...@gmail.com added the comment: Then we'll live with it, or work around when it's possible. For the purists, hopefully we have Python 3 which allows to mix bytes and strings in a set(). -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13360 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6397] Implementing Solaris /dev/poll in the select module
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13372] handle_close called twice in poll2
New submission from Xavier de Gaye xdeg...@gmail.com: When use_poll is True, test_handle_close in test_asyncore.py invokes twice the handle_close() method. The attached patch: modifies test_handle_close so that it fails when handle_close() is called more than once includes a fix that makes readwrite() behave like poll(): check that the dispatcher instance is still in the socket map, before calling the handle_xxx methods -- components: Library (Lib) files: handle_close.diff keywords: patch messages: 147311 nosy: giampaolo.rodola, josiahcarlson, neologix, stutzbach, xdegaye priority: normal severity: normal status: open title: handle_close called twice in poll2 type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file23634/handle_close.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13372 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12392] pthread_kill() doesn't work on the main thread on FreeBSD6
Changes by Florent Xicluna florent.xicl...@gmail.com: -- Removed message: http://bugs.python.org/msg147102 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12392 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue444582] Finding programs in PATH, adding shutil.which
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue444582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13292] missing versionadded for bytearray
Florent Xicluna florent.xicl...@gmail.com added the comment: Done by Eric, thank you. Because of a typo, the message was attached to the wrong ticket. New changeset 8ea34a74f118 by Éric Araujo in branch '2.7': Add missing versionadded (fixes #12392) http://hg.python.org/cpython/rev/8ea34a74f118 -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ 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
[issue13211] urllib2.HTTPError does not have 'reason' attribute.
Senthil Kumaran sent...@uthcode.com added the comment: Hi Jason Petri, urllib2.HTTPError never had a reason attribute. In the docs, it is mentioned that only URLError has the reason attribute. The HTTPError sublasses URLError and addinforurl class, but the further initialization happens only in the addinforurl class atrs. If you got confused that the HTTPError as args and not reason, the 'args' is not coming from URLError. HTTPError is raised for peculiar conditions such like authentication failures and it is 'used' as expected failure for certain authentication conditions. URLError is not so, it is seen more as an exception like socket errors. The example your illustrated is an Authentication failure and as per docs, it is guaranteed to have code attribute to verify the kind of HTTP error are getting. msg is corresponding HTTP error code msg. Take this example for URLError which will have reason attribute, it will work in both 2.7,3.2 and 3.3 import urllib.request, urllib.error, urllib.parse try: urllib.request.urlopen('http://aninvalidsite/something') except urllib.error.URLError as exc: print(exc.reason) Because this is a socket error, the reason as [Errno -2] Name or service not known and HTTPError may not be a proper exception for this. This is more of an IOError which urllib calls a URLError. I am not sure, how the need for 'reason' attribute for HTTPError exception was felt as the docs just say about 'code'. (HTTPError is informed as a subclass of URLError, but HTTPError does not call the URLError 's __init__ and acts standalone. I am not sure, how to go about with this bug. If a new .reason attribute has to be added to HTTPError, then it is a feature request though, I wonder why we need when code and msg serve an adequate purpose. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13211 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6397] Implementing Solaris /dev/poll in the select module
Changes by Jesús Cea Avión j...@jcea.es: Added file: http://bugs.python.org/file23635/c47a846bed1a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +Yury.Selivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1677872] Efficient reverse line iterator
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1677872 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13211] urllib2.HTTPError does not have 'reason' attribute.
Petri Lehtinen pe...@digip.org added the comment: My impression was that because HTTPError is a subclass of URLError, it should have the same attributes, and maybe some extra. A user reading the docs doesn't know whether it calls the base class __init__ or not. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13211 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1677872] Efficient reverse line iterator
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1677872 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1238cdd288d2 by Charles-François Natali in branch 'default': Back out changeset b6336ba796d4 until fix for #13303. http://hg.python.org/cpython/rev/1238cdd288d2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6397] Implementing Solaris /dev/poll in the select module
Changes by Jesús Cea Avión j...@jcea.es: Removed file: http://bugs.python.org/file23635/c47a846bed1a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6397] Implementing Solaris /dev/poll in the select module
Changes by Jesús Cea Avión j...@jcea.es: Added file: http://bugs.python.org/file23636/518b32ce893e.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6397] Implementing Solaris /dev/poll in the select module
Jesús Cea Avión j...@jcea.es added the comment: Please, check the new changeset, with all your feedback. Thanks!. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6397 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments
Ezio Melotti ezio.melo...@gmail.com added the comment: Attached patch, please review. -- assignee: docs@python - ezio.melotti keywords: +patch nosy: +eric.araujo, ezio.melotti stage: - commit review versions: +Python 2.7 -Python 3.1 Added file: http://bugs.python.org/file23637/issue6570.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5904] strftime docs do not explain locale effect on result string
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - needs patch versions: +Python 2.7 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5904 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13211] urllib2.HTTPError does not have 'reason' attribute.
Jason R. Coombs jar...@jaraco.com added the comment: That was my point. If HTTPError is a subclass of URLError, then an HTTPError _is an_ URLError, and thus should implement the same public interface. The problem is better illustrated with this request: try: urllib.request.urlopen('http://api.wordnik.com/v4/word.json/foo/examples') except urllib2.URLError as exc: # We caught a URLError, what's the reason? print(exc.reason) This code will fail with an attribute error, but only when the except clause catches an HTTPError (as it does in this case). The documentation explicitly states that HTTPError is a subclass of URLError and it doesn't say anything about the addinfourl interface. The documentation strongly suggests (though implicitly) that HTTPError.reason will be present as it is with URLError. If HTTPError does not implement the reason attribute, then there is no value in making it the subclass of URLError, and HTTPError should probably have the same parent class as URLError. However, this change is even more drastic and would almost certainly violate backward compatibility constraints. The proposal I've made is generally backward compatible, and addresses the underlying bug (that URLError.__init__ is never called), and the symptom that a HTTPError does not implement the documented public interface. Perhaps there's a better approach, but I believe based on the example code above, the implementation is broken. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13211 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13211] urllib2.HTTPError does not have 'reason' attribute.
Changes by Jason R. Coombs jar...@jaraco.com: -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13211 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13373] Unexpected blocking call to multiprocessing.Queue.get with a timeout
New submission from Arnaud Ysmal stack...@netbsd.org: Using get(timeout=1) on a multiprocessing.Queue sometimes leads to a blocking get. It seems that there is no check whether the timeout has expired after acquiring the lock but before the time.time(), which can cause a call to poll() with a negative timeout. (patch attached) -- components: Library (Lib) files: multiprocessing_queues.patch keywords: patch messages: 147319 nosy: stacktic priority: normal severity: normal status: open title: Unexpected blocking call to multiprocessing.Queue.get with a timeout type: behavior Added file: http://bugs.python.org/file23638/multiprocessing_queues.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13373] Unexpected blocking call to multiprocessing.Queue.get with a timeout
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13373] Unexpected blocking call to multiprocessing.Queue.get with a timeout
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix stage: - patch review versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13373 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7412] distutils install race condition
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7412 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11082] ValueError: Content-Length should be specified
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11427] ctypes from_buffer no longer accepts bytes
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +flox type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11682] PEP 380 reference implementation for 3.3
Yury Selivanov yseliva...@gmail.com added the comment: It looks like there is a memory leak bug (on StopIteration exception instances). Attached is the test to expose it. It seems that adding 'Py_DECREF(e);' after 'PyErr_SetObject(PyExc_StopIteration, e);' in 'genobject.c' fixes the leak. -- Added file: http://bugs.python.org/file23639/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11682 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13093] Redundant code in PyUnicode_EncodeDecimal()
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +facundobatista, mark.dickinson, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13093 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12245] Document the meaning of FLT_ROUNDS constants for sys.float_info
Ezio Melotti ezio.melo...@gmail.com added the comment: LGTM -- nosy: +ezio.melotti stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12245 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8025] TypeError: string argument expected, got 'str'
Ezio Melotti ezio.melo...@gmail.com added the comment: This was fixed in #12434. -- assignee: - ezio.melotti resolution: - duplicate stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8025 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13374] Deprecate usage of the Windows ANSI API in the nt module
New submission from STINNER Victor victor.stin...@haypocalc.com: Attached patch deprecates the Windows ANSI API (bytes API) in the nt module. Use Unicode filenames instead of bytes filenames to not depend on the ANSI code page anymore and to support any Unicode filename. The patch changes also os.link(), os.rename() and os.symlink() to not accept two filenames of different types: require two Unicode filenames or two bytes filenames. It is an expected change, it did it to simplify the source code. I change it if necessary. -- components: Library (Lib) files: deprecate_win_bytes_api.patch keywords: patch messages: 147323 nosy: haypo priority: normal severity: normal status: open title: Deprecate usage of the Windows ANSI API in the nt module versions: Python 3.3 Added file: http://bugs.python.org/file23640/deprecate_win_bytes_api.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11082] ValueError: Content-Length should be specified
Senthil Kumaran sent...@uthcode.com added the comment: Here is the docs patch which will help us close the issue. Addressing Eric's last comment - I believe the what's new and News for this issue was added with the feature, this one was Exception msg change. -- Added file: http://bugs.python.org/file23641/issue-11082-docs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13374] Deprecate usage of the Windows ANSI API in the nt module
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 6bf07db23445 by Victor Stinner in branch 'default': Issue #13374: Use Unicode filenames instead of bytes filenames http://hg.python.org/cpython/rev/6bf07db23445 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13374] Deprecate usage of the Windows ANSI API in the nt module
STINNER Victor victor.stin...@haypocalc.com added the comment: The patch deprecates bytes filenames for the following functions: nt._getfullpathname nt._isdir os.access os.chdir os.chmod os.link os.listdir os.lstat os.mkdir os.open os.rename os.rmdir os.stat os.symlink os.unlink os.utime Oh, I forgot a test for os.open(bytes). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13374] Deprecate usage of the Windows ANSI API in the nt module
STINNER Victor victor.stin...@haypocalc.com added the comment: Functions like os.execv() or os.readlink() are not deprecated because the underlying C function really uses a bytes API (execv and readlink). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13374] Deprecate usage of the Windows ANSI API in the nt module
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +loewis, mhammond ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13374 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments
Terry J. Reedy tjre...@udel.edu added the comment: def parrot(voltage, state='a stiff', action='voom', type='Norwegian Blue'): +accepts one :term:`positional argument` (``voltage``) and three +:term:`keyword arguments keyword argument` (``state``, ``action``, +and ``type``). This is simply false. An argument for voltage is required, the other three are optional. I suggest something like the followinga: Calls to this function require 1 to 4 arguments. An argument for voltage is required; arguements for the other three parameters are optional because they have default arguments specified. Arguments can be matched to parameters by either position or 'keyword', where the keyword is the name of a parameter. The two conditions are that each parameter is matched to at most one argument and that keyword matches follow positional matches. The following matches 4 argumnts to the corresponding parameters by position: parrot(100, 'loose', 'skid', 'American Red') This matches the same arguments by keyword (parameter name): parrot(state='loose', voltage=100, type='American Red', action='loose') Any order is acceptable for such 'keyword arguments'. A call can mix the two matching methods. This parrot(100, action='loose') passes one argument each way and lets 'state' and 'type' get their default values of 'a stiff' and 'Norwegian Blue'. add minimal set of bad calls -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments
Ezio Melotti ezio.melo...@gmail.com added the comment: +accepts one :term:`positional argument` (``voltage``) and three +:term:`keyword arguments keyword argument` (``state``, ``action``, +and ``type``). This is simply false. An argument for voltage is required, the other three are optional. I suggest something like the followinga: That part refers to the function signature, not the function call. I tried to avoid using the term function signature to avoid introducing yet another term, but maybe the two things should be separated a bit more. I also tried to avoid the use of 'parameters' (the 'names' in the function signature) and 'arguments' (the actual values passed to the function when it's called) to keep the things simple and also because not everyone agrees on this terminology. Would adding 'required' before 'positional' and 'optional' before 'keyword arguments' be ok? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11082] ValueError: Content-Length should be specified
Ezio Melotti ezio.melo...@gmail.com added the comment: I think the information in the patch should go in the urlopen doc, not in urlencode. Adding a note to urlencode that says that the result must be encoded is fine, but all the details about the default encoding and the fact that an extra Content-Type header is necessary when the encoding is not iso-8859-1 belong to the urlopen doc IMHO. (Is the header actually necessary? I think I always sent utf-8 without header, and the example you added in r88394 also uses utf-8 with no extra headers.) There are also a few minor issues with the patch -- I'll leave a note in rietveld for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11427] ctypes from_buffer no longer accepts bytes
Meador Inge mead...@gmail.com added the comment: I agree this is a regression. I am looking more into it now. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11427 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13370] test_ctypes fails on osx 10.7
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments
Terry J. Reedy tjre...@udel.edu added the comment: Would adding 'required' before 'positional' and 'optional' before 'keyword arguments' be ok? No! What is false in the original and the above is the equation and confusion of 'required' with 'positional' and 'optional' with 'keyword'. Required/optional is an argument property for all calls to a function as determined by the function definition. Position/keyword is an argument property for each particular call as determined by the call itself (or the programmer thereof). The two contrasts are logically independent even if there is empirical correlation in the practice of some programmers. All arguments for parrot, both the required voltage argument and the three optional arguments, can be passed by either position or keyword. This is shown by the examples that pass both types of arguments both ways. (Similarly, both required and optional args can be defined as (pass-by-)keyword-only arguments, def f(a,b=2,*,c,d=4): return a,b,c,d f(1,c=3) (1, 2, 3, 4) though such possibilities are not relevant here.) An argument for voltage is required, the other three are optional. Prefix the above with When calling this function,. That part refers to the function signature, not the function call. I was specifically referring to calls. All parameters in a signature require an argument. A function signature may (optionally ;-) define an argument for any parameter as optional *in function call expressions* by giving an alternate default argument for the parameter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments
Ezio Melotti ezio.melo...@gmail.com added the comment: OK, now I got what you mean. I'll try to come up with a better patch then :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13375] Provide a namedtuple style interface for os.walk values
New submission from Nick Coghlan ncogh...@gmail.com: The 3-tuple values yielded by os.walk could be made easier to work with in some use cases by offering a namedtuple style interface (similar to what is done with sys.float_info). for dirinfo in os.walk(base_dir): print(dirinfo.path) print(dirinfo.subdirs) print(dirinfo.files) -- messages: 147334 nosy: ncoghlan priority: normal severity: normal status: open title: Provide a namedtuple style interface for os.walk values ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13375 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13375] Provide a namedtuple style interface for os.walk values
Changes by Nick Coghlan ncogh...@gmail.com: -- stage: - needs patch type: - feature request versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13375 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13229] Improve tools for iterating over filesystem directories
Nick Coghlan ncogh...@gmail.com added the comment: A related idea is updating os.walk tuples to be a custom object offering a namedtuple style API (similar to sys.float_info). I created a separate issue for that: #13375 I've also updated the title of this issue to describe the problem it aims to address rather than the specific solution that first occurred to me. -- title: Add shutil.filter_walk - Improve tools for iterating over filesystem directories ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13229 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13376] readline: pre_input_hook not getting called
New submission from Sam Cates python@samcates.com: OS: Mac 10.7.2 Python: 2.7.1 Setting a pre input hook in readline has no effect. This simple example illustrates the problem: #!/usr/bin/python import readline def hook(): readline.insert_text(' from pre_input_hook') readline.redisplay() readline.set_pre_input_hook(hook) while True: line = raw_input('Prompt (stop to quit): ') if line == 'stop': break print 'ENTERED: %s' % line The hook never gets called, thus from pre_input_hook is never displayed. -- assignee: ronaldoussoren components: Macintosh messages: 147336 nosy: ronaldoussoren, scates priority: normal severity: normal status: open title: readline: pre_input_hook not getting called type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13376 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com