[issue8214] Add exception logging function to syslog module
Sean Reifschneider j...@tummy.com added the comment: I have completed the exception handling code as prototyped in msg101687. Please review. -- assignee: - jafo keywords: +needs review stage: needs patch - patch review Added file: http://bugs.python.org/file17159/logexception2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8581] Logging handlers do not handle double-closing very well
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: This part of the code has been changed in trunk (to use weak references), and the error does not occur in Python 2.7/3.2. I'm not sure I fully agree with your assertion that it's not a programmer error to close a handler twice - this could certainly happen as a result of a bug in the application. So, I'm not sure (now that we're in Python 2.7 beta) that it's worth backporting this to 2.6.6. Thoughts? -- resolution: - out of date status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8581 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Mark Dickinson dicki...@gmail.com added the comment: Alexander: range *does* still accept such arguments (in 2.7); just not floats: from decimal import Decimal range(Decimal(20), Decimal(20)) [] range(Decimal('1e100'), Decimal('1e100')) Traceback (most recent call last): File stdin, line 1, in module TypeError: range() integer start argument expected, got Decimal. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8581] Logging handlers do not handle double-closing very well
Santoso Wijaya santa@me.com added the comment: File-like objects handle multiple close() gracefully, silently making the second and subsequent close() calls to an already closed I/O object do nothing. Why can't the same expectation be applied to logging handlers? -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8581 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7724] setup.py ignores SDK root on OSX
Ronald Oussoren ronaldousso...@mac.com added the comment: I've cleaned up the patch and made it clearer that platforms other than OSX aren't affected by rewriting code like this: f = os.path.join(d, db.h) if sys.platform == darwin and is_macosx_sdk_path(d): f = os.path.join(sysroot, d[1:], db.h) The new version of the patch is also more compreshensive, I've added SDK-awareness code for the sqlite and bdb extensions as well, those looked for files without using find_file (because they do more than just look at files). I can build unix-style and framework builds with this patch, both with and without specifying SDKs. I haven't tested the results on a linux box yet. I intent to apply this patch on sunday. Note: the patch intentionally doesn't include an update to Misc/NEWS, I will write that bit when I actually commit. I'll also forward port to 3.2 when committing. -- keywords: +patch Added file: http://bugs.python.org/file17160/issue7724-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7724 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8582] urllib.urlretrieve fails with ValueError: Invalid format string
Senthil Kumaran orsent...@gmail.com added the comment: Fixed in trunk: r80675 release26-maint: r80676 py3K: r80677 release31-maint:r80678 -- resolution: - fixed stage: unit test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8581] Logging handlers do not handle double-closing very well
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: - Original Message From: Santoso Wijaya rep...@bugs.python.org File-like objects handle multiple close() gracefully, silently making the second and subsequent close() calls to an already closed I/O object do nothing. Why can't the same expectation be applied to logging handlers? I'm not objecting to the change on philosophical grounds, merely commenting that it doesn't happen in 2.7/3.2 and suggesting it's not worth fixing in 2.6/3.1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8581 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4388] test_cmd_line fails on MacOS X
Michael Foord mich...@voidspace.org.uk added the comment: I still see this failure on Python 3 trunk with Mac OS X 10.6. -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4388 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8576] test_support.find_unused_port can cause socket conflicts on Windows
Paul Moore p.f.mo...@gmail.com added the comment: Here's a patch for test_logging. It needed a minor tweak to logging.config - but I can't see anywhere that this affects the documentation, so I didn't do a doc patch. I hope that's OK. I'll have a look at test_socket but that looks a bit too deep for me. And test_httplib seems to be testing that if you supply a specific port, the connection socket actually connects on that port, so I can't really see any way of avoiding needing a specific unused port there :-( -- Added file: http://bugs.python.org/file17161/test_logging.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8586] test_imp.py test failures on Py3K Mac OS X
New submission from Michael Foord mich...@voidspace.org.uk: I get the following failure running test_imp on py3k, Mac OS X 10.6.3. == ERROR: test_package___file__ (__main__.PEP3147Tests) -- Traceback (most recent call last): File Lib/test/test_imp.py, line 303, in test_package___file__ support.forget('pep3147') File /compile/python-trunk3/Lib/test/support.py, line 227, in forget unlink(source + 'c') File /compile/python-trunk3/Lib/test/support.py, line 186, in unlink os.unlink(filename) OSError: [Errno 20] Not a directory: '/dev/null/lib/python32.zip/pep3147.pyc' -- messages: 104702 nosy: brett.cannon, michael.foord priority: normal severity: normal stage: unit test needed status: open title: test_imp.py test failures on Py3K Mac OS X type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8587] test_import.py test failures on Py3K Mac OS X
New submission from Michael Foord mich...@voidspace.org.uk: I get the following failures with test_import on Mac OS X 10.6.3: == ERROR: test_import (test.test_import.ImportTests) -- Traceback (most recent call last): File /compile/python-trunk3/Lib/test/test_import.py, line 93, in test_import test_with_extension(.py) File /compile/python-trunk3/Lib/test/test_import.py, line 86, in test_with_extension forget(TESTFN) File /compile/python-trunk3/Lib/test/support.py, line 227, in forget unlink(source + 'c') File /compile/python-trunk3/Lib/test/support.py, line 186, in unlink os.unlink(filename) OSError: [Errno 20] Not a directory: '/dev/null/lib/python32.zip/@test_9343_tmp.pyc' == ERROR: test___cached__ (test.test_import.PycacheTests) -- Traceback (most recent call last): File /compile/python-trunk3/Lib/test/test_import.py, line 504, in setUp self._clean() File /compile/python-trunk3/Lib/test/test_import.py, line 498, in _clean forget(TESTFN) File /compile/python-trunk3/Lib/test/support.py, line 227, in forget unlink(source + 'c') File /compile/python-trunk3/Lib/test/support.py, line 186, in unlink os.unlink(filename) OSError: [Errno 20] Not a directory: '/dev/null/lib/python32.zip/@test_9343_tmp.pyc' == ERROR: test___cached___legacy_pyc (test.test_import.PycacheTests) -- Traceback (most recent call last): File /compile/python-trunk3/Lib/test/test_import.py, line 504, in setUp self._clean() File /compile/python-trunk3/Lib/test/test_import.py, line 498, in _clean forget(TESTFN) File /compile/python-trunk3/Lib/test/support.py, line 227, in forget unlink(source + 'c') File /compile/python-trunk3/Lib/test/support.py, line 186, in unlink os.unlink(filename) OSError: [Errno 20] Not a directory: '/dev/null/lib/python32.zip/@test_9343_tmp.pyc' == ERROR: test_import_pyc_path (test.test_import.PycacheTests) -- Traceback (most recent call last): File /compile/python-trunk3/Lib/test/test_import.py, line 504, in setUp self._clean() File /compile/python-trunk3/Lib/test/test_import.py, line 498, in _clean forget(TESTFN) File /compile/python-trunk3/Lib/test/support.py, line 227, in forget unlink(source + 'c') File /compile/python-trunk3/Lib/test/support.py, line 186, in unlink os.unlink(filename) OSError: [Errno 20] Not a directory: '/dev/null/lib/python32.zip/@test_9343_tmp.pyc' == ERROR: test_missing_source (test.test_import.PycacheTests) -- Traceback (most recent call last): File /compile/python-trunk3/Lib/test/test_import.py, line 504, in setUp self._clean() File /compile/python-trunk3/Lib/test/test_import.py, line 498, in _clean forget(TESTFN) File /compile/python-trunk3/Lib/test/support.py, line 227, in forget unlink(source + 'c') File /compile/python-trunk3/Lib/test/support.py, line 186, in unlink os.unlink(filename) OSError: [Errno 20] Not a directory: '/dev/null/lib/python32.zip/@test_9343_tmp.pyc' == ERROR: test_missing_source_legacy (test.test_import.PycacheTests) -- Traceback (most recent call last): File /compile/python-trunk3/Lib/test/test_import.py, line 504, in setUp self._clean() File /compile/python-trunk3/Lib/test/test_import.py, line 498, in _clean forget(TESTFN) File /compile/python-trunk3/Lib/test/support.py, line 227, in forget unlink(source + 'c') File /compile/python-trunk3/Lib/test/support.py, line 186, in unlink os.unlink(filename) OSError: [Errno 20] Not a directory: '/dev/null/lib/python32.zip/@test_9343_tmp.pyc' == ERROR: test_package___cached__ (test.test_import.PycacheTests) -- Traceback (most recent call last): File /compile/python-trunk3/Lib/test/test_import.py, line 504, in setUp self._clean() File /compile/python-trunk3/Lib/test/test_import.py, line 498, in _clean forget(TESTFN) File /compile/python-trunk3/Lib/test/support.py, line 227, in forget unlink(source + 'c') File /compile/python-trunk3/Lib/test/support.py, line 186, in unlink os.unlink(filename) OSError: [Errno 20]
[issue8587] test_import.py test failures on Py3K Mac OS X
Michael Foord mich...@voidspace.org.uk added the comment: This is likely related to issue 8586 - the actual failure is very similar (a bad path in support.py). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8586] test_imp.py test failures on Py3K Mac OS X
Michael Foord mich...@voidspace.org.uk added the comment: I see similar failures (failing to unlink weird paths from support.py) in: test_imp.py, test_import.py, test_pydoc.py, test_runpy.py, -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8586] test_imp.py test failures on Py3K Mac OS X
Michael Foord mich...@voidspace.org.uk added the comment: So I'm assuming issue 8587 (same failure in test_import.py) is a duplicate of this. I'll close 8587. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8587] test_import.py test failures on Py3K Mac OS X
Michael Foord mich...@voidspace.org.uk added the comment: Assuming this is actually the same problem as issue 8586. -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8588] test_urllib2.py test failures on Py3K Mac OS X
New submission from Michael Foord mich...@voidspace.org.uk: Failures on py3k, Mac OS X 10.6.3. == ERROR: test_proxy_https (__main__.HandlerTests) -- Traceback (most recent call last): File Lib/test/test_urllib2.py, line 1010, in test_proxy_https r = o.open(req) File /compile/python-trunk3/Lib/urllib/request.py, line 349, in open response = self._open(req, data) File /compile/python-trunk3/Lib/urllib/request.py, line 367, in _open '_open', req) File /compile/python-trunk3/Lib/urllib/request.py, line 327, in _call_chain result = func(*args) File /compile/python-trunk3/Lib/urllib/request.py, line 655, in lambda meth(r, proxy, type)) File /compile/python-trunk3/Lib/urllib/request.py, line 663, in proxy_open if req.host and proxy_bypass(req.host): File /compile/python-trunk3/Lib/urllib/request.py, line 2214, in proxy_bypass return proxy_bypass_macosx_sysconf(host) File /compile/python-trunk3/Lib/urllib/request.py, line 2183, in proxy_bypass_macosx_sysconf hostIP = ip2num(hostIP) File /compile/python-trunk3/Lib/urllib/request.py, line 2161, in ip2num if len(parts) != 4: TypeError: object of type 'map' has no len() == ERROR: test_proxy_https_proxy_authorization (__main__.HandlerTests) -- Traceback (most recent call last): File Lib/test/test_urllib2.py, line 1026, in test_proxy_https_proxy_authorization r = o.open(req) File /compile/python-trunk3/Lib/urllib/request.py, line 349, in open response = self._open(req, data) File /compile/python-trunk3/Lib/urllib/request.py, line 367, in _open '_open', req) File /compile/python-trunk3/Lib/urllib/request.py, line 327, in _call_chain result = func(*args) File /compile/python-trunk3/Lib/urllib/request.py, line 655, in lambda meth(r, proxy, type)) File /compile/python-trunk3/Lib/urllib/request.py, line 663, in proxy_open if req.host and proxy_bypass(req.host): File /compile/python-trunk3/Lib/urllib/request.py, line 2214, in proxy_bypass return proxy_bypass_macosx_sysconf(host) File /compile/python-trunk3/Lib/urllib/request.py, line 2183, in proxy_bypass_macosx_sysconf hostIP = ip2num(hostIP) File /compile/python-trunk3/Lib/urllib/request.py, line 2161, in ip2num if len(parts) != 4: TypeError: object of type 'map' has no len() -- messages: 104708 nosy: michael.foord priority: normal severity: normal status: open title: test_urllib2.py test failures on Py3K Mac OS X versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8588] test_urllib2.py test failures on Py3K Mac OS X
Changes by Michael Foord mich...@voidspace.org.uk: -- assignee: - orsenthil nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal
New submission from Michael Foord mich...@voidspace.org.uk: If you run test_warnings.py under an ascii terminal (at least on Mac OS X) then test_warnings.CEnvironmentVariableTests.test_nonascii fails. Perhaps the test should be skipped? == FAIL: test_nonascii (__main__.CEnvironmentVariableTests) -- Traceback (most recent call last): File Lib/test/test_warnings.py, line 758, in module test_main() File Lib/test/test_warnings.py, line 753, in test_main PyEnvironmentVariableTests File /compile/python-trunk3/Lib/test/support.py, line 1053, in run_unittest _run_suite(suite) File /compile/python-trunk3/Lib/test/support.py, line 1027, in _run_suite result = runner.run(suite) File /compile/python-trunk3/Lib/unittest/runner.py, line 158, in run result.printErrors() File /compile/python-trunk3/Lib/unittest/runner.py, line 109, in printErrors self.printErrorList('FAIL', self.failures) File /compile/python-trunk3/Lib/unittest/runner.py, line 116, in printErrorList self.stream.writeln(%s % err) File /compile/python-trunk3/Lib/unittest/runner.py, line 24, in writeln self.write(arg) UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 121: ordinal not in range(128) Looks like the traceback here actually comes from unittest trying to report the failure. -- messages: 104709 nosy: michael.foord priority: normal severity: normal status: open title: test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - brett.cannon components: +Tests nosy: +brett.cannon, haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8586] test_imp.py test failures on Py3K Mac OS X
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - barry components: +Tests nosy: +barry stage: unit test needed - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8576] test_support.find_unused_port can cause socket conflicts on Windows
Antoine Pitrou pit...@free.fr added the comment: Vinay, are you ok with the proposed patch? -- nosy: +vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8590] test_httpservers.CGIHTTPServerTestCase failure on 3.1-maint Mac OS X
New submission from Michael Foord mich...@voidspace.org.uk: A failure in test_httpservers.py on 31-maint (not failing in py3k) on Mac OS X 10.6.3: test_post (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call last): File /private/var/folders/WD/WDk8J3uFE7OM9tRer5Oy4E+++TI/-Tmp-/tmpv_ZniR/cgi-bin/file2.py, line 2, in module import cgi File /compile/py-31-maint/Lib/cgi.py, line 34, in module from operator import attrgetter ImportError: No module named operator [28226 refs] FAIL == FAIL: test_post (__main__.CGIHTTPServerTestCase) -- Traceback (most recent call last): File Lib/test/test_httpservers.py, line 379, in test_post AssertionError: b'' != b'1, python, 123456\n' Interesting to see the import error during the test. Running python and executing import operator works fine. -- messages: 104711 nosy: michael.foord priority: normal severity: normal stage: needs patch status: open title: test_httpservers.CGIHTTPServerTestCase failure on 3.1-maint Mac OS X versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8588] test_urllib2.py test failures on Py3K Mac OS X
Michael Foord mich...@voidspace.org.uk added the comment: Same failure on 31-maint. -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4388] test_cmd_line fails on MacOS X
Michael Foord mich...@voidspace.org.uk added the comment: This passes for me in Mac OS X Terminal (a UTF8 terminal) but fails in iTerm (an ascii terminal) on both 31-maint and py3k. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4388 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8581] Logging handlers do not handle double-closing very well
Jason Baker amnorv...@gmail.com added the comment: Vinay, I don't necessarily disagree with you. However, this appears to be a pretty trivial change. If there is a 2.6.6, I think this should go in it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8581 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8576] test_support.find_unused_port can cause socket conflicts on Windows
R. David Murray rdmur...@bitdance.com added the comment: Could you special case the test_socket test by checking for the error that Windows sometimes throws and retrying (in a loop for say a second)? Not ideal, but probably better than adding a sleep or throwing away the test :) -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8586] test_imp.py test failures on Py3K Mac OS X
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: barry - nosy: +ezio.melotti, flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal
R. David Murray rdmur...@bitdance.com added the comment: Victor has proposed a patch for the traceback problem for regrtest, I think. I haven't looked at it, but I wonder if there is something that can instead be done to make unittest work in cases like this when run in an ascii terminal. See issue 8522. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8586] test_imp.py test failures on Py3K Mac OS X
Changes by R. David Murray rdmur...@bitdance.com: -- assignee: - barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8586 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8567] decimal module doesn't respect precedence rules for exceptional conditions
Mark Dickinson dicki...@gmail.com added the comment: Here's a quick fix for Decimal._fix, that just makes sure that it raises exceptions in the appropriate order. I'll also try to apply the check_precedence methodology included in this patch to every single testcase. I don't think it's reasonable to add this testing to the test-suite, though: test_decimal is slow enough as it is. -- keywords: +patch Added file: http://bugs.python.org/file17162/issue8567.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8567] decimal module doesn't respect precedence rules for exceptional conditions
Changes by Mark Dickinson dicki...@gmail.com: Added file: http://bugs.python.org/file17163/issue8567.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8567] decimal module doesn't respect precedence rules for exceptional conditions
Changes by Mark Dickinson dicki...@gmail.com: Removed file: http://bugs.python.org/file17162/issue8567.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8589] test_warnings.CEnvironmentVariableTests.test_nonascii fails under an ascii terminal
Michael Foord mich...@voidspace.org.uk added the comment: What does issue 8522 have to do with it - did you mean a different issue? In unittest it could catch the UnicodeEncodeError and write the ascii repr instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: On Sat, May 1, 2010 at 3:50 AM, Mark Dickinson rep...@bugs.python.org wrote: Mark Dickinson dicki...@gmail.com added the comment: Alexander: range *does* still accept such arguments (in 2.7); just not floats: from decimal import Decimal range(Decimal(20), Decimal(20)) [] Decimal must be a special case. With the code attached by OP and trunk:80673, I get $ ./python.exe bad_range.py ... Traceback (most recent call last): File bad_range.py, line 12, in module print range(MyInt(2**64), MyInt(2**64+10)) TypeError: range() integer start argument expected, got instance. Same with new style MyInt: $ ./python.exe bad_range1.py ... Traceback (most recent call last): File bad_range1.py, line 12, in module print range(MyInt(2**64), MyInt(2**64+10)) TypeError: range() integer start argument expected, got MyInt. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Mark Dickinson dicki...@gmail.com added the comment: Decimal is behaving in exactly the same way as MyInt, isn't it? What do you get for range(MyInt(20), MyInt(20))? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8567] decimal module doesn't respect precedence rules for exceptional conditions
Mark Dickinson dicki...@gmail.com added the comment: Better patch, that checks exception precedence for every test case when EXTENDEDERRORTEST is defined. With this patch, I get 11 test failures in test_decimal (down from 50 test failures before the Decimal._fix fix). Now we just have to track down the remaining wrongly ordered exceptions... -- Added file: http://bugs.python.org/file17164/issue8567_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8514] Create fsencode() and fsdecode() functions in os.path
Antoine Pitrou pit...@free.fr added the comment: In posixmodule.c, the following snippet doesn't make sense anymore: if (k == NULL) { PyErr_Clear(); continue; } If memory allocation of the bytes object fails, we should error out. (same for if (v == NULL) a bit later) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8514 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8576] test_support.find_unused_port can cause socket conflicts on Windows
Paul Moore p.f.mo...@gmail.com added the comment: Might work - but the only ones that were actually failing for me were test_multiprocessing and test_smtplib. So I'm not quite sure where/when the error would be raised on the remaining 2 (socket httplib). But I'll keep it in mind. To be honest, the remaining tests haven't actually failed in my experience, I'm now really only seeing if I can remove all uses of find_unused_port on the basis of Jean-Paul's comment that it's the wrong approach. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8576 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module
Jean-Paul Calderone exar...@twistedmatrix.com added the comment: One open question regarding interaction with threading. sigprocmask's behavior in a multithreaded program is unspecified. pthread_sigmask should be used instead. I could either expose both of these and let the caller choose, or I could make signal.sigprocmask use pthread_sigmask if it's available, and fall back to sigprocmask. I don't see any disadvantages of doing the latter, and the former seems like it would create an attractive nuisance. However, I don't have much experience with sigprocmask; I'm only interested in it because of its use in combination with signalfd. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8591] update mkpkg to latest coding standards
New submission from Dan Buch daniel.b...@gmail.com: On first glance, `distutils2.mkpkg` does not reflect the latest and greatest in Python coding standards. I'd like to take a stab at PEP-(7|8)'ing the whole thing, although I know there are other issues open to add features to the module, so I don't want to cause unnecessary merge pains. Thoughts? -- assignee: tarek components: Distutils2 messages: 104726 nosy: meatballhat, tarek priority: normal severity: normal status: open title: update mkpkg to latest coding standards type: behavior versions: 3rd party, Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module
Changes by Jean-Paul Calderone exar...@twistedmatrix.com: -- nosy: +gps ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8591] update mkpkg to latest coding standards
Éric Araujo mer...@netwok.org added the comment: Pepeightification is ok for things like whitespace that do not break compatibility (don’t waste time doing it manually though, we have automated tools that can be used to reindent the whole of Distutils2). However, renaming classes and functions has to be done with caution, if there’s code out there that depends on the module. Moreover, PEP 8 does not tell everything, e.g. other PEPs describe good practices for doctrings, and a lot of idioms are not covered in PEP 8. Distutils2 also has the constraint of having to stay compatible with Python 2.4. Personally, I also find that the name of the script is misleading. That said, I don’t know the status of mkpkg. If we aim at removing the setup.py script, a utility that helps writing setup.py scripts is doomed to be removed. Or it may be repurposed to write a setup.cfg file. -- nosy: +merwok type: behavior - versions: -3rd party ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: On Sat, May 1, 2010 at 10:59 AM, Mark Dickinson rep...@bugs.python.org wrote: Mark Dickinson dicki...@gmail.com added the comment: Decimal is behaving in exactly the same way as MyInt, isn't it? What do you get for range(MyInt(20), MyInt(20))? Hmm, maybe there is a 2.7 bug here after all: [20, 21, 22] range(MyInt(2**64), MyInt(2**64+3)) Traceback (most recent call last): File stdin, line 1, in module TypeError: range() integer start argument expected, got instance. Same with Decimal: Traceback (most recent call last): File stdin, line 1, in module TypeError: range() integer start argument expected, got Decimal. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +gregory.p.smith -gps ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8572] httplib getheader() throws error instead of default
Senthil Kumaran orsent...@gmail.com added the comment: It seems that 3.x behavior is correct. I am quoting a relevant section from rfc 2616. It MUST be possible to combine the multiple header fields into one field-name: field-value pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma. - Should we change the 2.x behavior then? (This can break apps, which might be depending upon the existing behavior of 2.x code) Also, this bug is on default value, it fair to assume that the default might given as None, or a string and rarely as int. I don't see anyone would have passed it (correctly for current code) as list. Why don't we handle it at email.message.Message's get_all method? get_all is supposed to return a list or None. Attaching a patch (which is almost David's first suggestion). -- keywords: +patch Added file: http://bugs.python.org/file17165/issue8572.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8572 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8572] httplib getheader() throws error instead of default
Changes by Senthil Kumaran orsent...@gmail.com: Removed file: http://bugs.python.org/file17165/issue8572.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8572 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8572] httplib getheader() throws error instead of default
Senthil Kumaran orsent...@gmail.com added the comment: previous patch had a typo and a mistake. uploading the correct one. -- Added file: http://bugs.python.org/file17166/issue8572.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8572 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8567] decimal module doesn't respect precedence rules for exceptional conditions
Mark Dickinson dicki...@gmail.com added the comment: Final patch (?!) fixes all the test failures due to exception precedence issues. -- Added file: http://bugs.python.org/file17167/issue8567_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8567 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8591] update mkpkg to latest coding standards
Dan Buch daniel.b...@gmail.com added the comment: I probably shouldn't have dropped the PEP8 bomb so much as stated that I feel the module could use some updating. It's my (very much potentially wrong) understanding that `distutils2.mkpkg` isn't considered library code so much as the guts of a script. The reason for my concern about `distutils2.mkpkg` goes something like this: - it is a new addition to the distutils toolkit - if any kind of walkthrough is to be written for using distutils, there's a good chance the `mkpkg` script will be mentioned - curious folks like myself may look at the source code for the script - said curious folks may either be new to Python or new to programming in general - I don't want newcomers getting the wrong idea about Python coding standards I should also mention that I have the same concern(s) about everything in the `Demo` tree of CPython :) Even if `setup.py` files aren't the eventual goal, if they're around for even another 2 years I think the effort is justified. /2cents -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8591 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser
Fredrik Lundh fred...@effbot.org added the comment: Namespaces are a fundamental part of the XML information model (both xpath and infoset) and all modern XML document formats, so I'm not sure what problem you're trying to solve by pretending that they don't exist. It's a bit like modifying import foo to work like from foo import *... -- nosy: +effbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8592] 'y' does not check for embedded NUL bytes
New submission from Antoine Pitrou pit...@free.fr: The documentation for the 'y' format (PyArg_ParseTuple and friends) states that: « The bytes object must not contain embedded NUL bytes; if it does, a TypeError exception is raised. » But, reading Python/getargs.c, the strlen() check is actually missing in the code for 'y'. -- assignee: loewis components: Interpreter Core messages: 104734 nosy: loewis, pitrou priority: normal severity: normal stage: needs patch status: open title: 'y' does not check for embedded NUL bytes type: behavior versions: Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8592 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4485] fast swap of default Windows python versions
Andreas Lemke mueslifl...@nexgo.de added the comment: Python 2.5, 2.6, 3.0, etc. are not fully compatible programming languages. And we cannot expect that there will ever be the one and only ultimate version of Python (hopefully). Many of us need to have more than one of them installed simultaneously. Upon opening a Python file, the right version needs to be started. For those of us who use IDLE, we wish the right version to be started with “Edit with IDLE”. Therefore, we need a clean – pythonic – solution to this problem. I am probably not qualified to determine the best such solution. My main concern is that the community takes the issue seriously. Nevertheless, it seems to me that different file name extensions (.py25, .py26, .py30) would be a good candidate to solve the issue. On Windows, I set up the appropriate file type associations. It worked quite well, except that IDLE doesn't seem to recognize files with extensions other than .py. -- nosy: +Andreas24 versions: +Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8593] Improve c-api/arg.rst
New submission from Antoine Pitrou pit...@free.fr: This patch fixes, reorders and improves c-api/arg.rst. I would even suggest to go further and single out a couple of most useful formats ('s', 'y*', 'i', 'l'...) so that people don't get lost in all the possibilities. -- assignee: d...@python components: Documentation files: argdoc.patch keywords: patch messages: 104736 nosy: d...@python, pitrou priority: normal severity: normal stage: patch review status: open title: Improve c-api/arg.rst versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17168/argdoc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8593 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Robert Bradshaw rober...@math.washington.edu added the comment: Thank you Alexander. Yes, there is still an issue for large operands, and the attached patch does fix it. Floats are explicitly checked for and rejected by PyArg_ParseTuple for the l format (as called by builtin_range) so to preserve this behavior we can explicitly check in the argument parsing of handle_range_longs as well. This all goes away in Py3 due to the unification of int and long. (And I agree that using __index__ rather than __int__ fits better there). -- Added file: http://bugs.python.org/file17169/bltinmodule2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8557] subprocess PATH semantics and portability
Dave Abrahams d...@boostpro.com added the comment: @r.david.murray: did you try running my test? I think it shows that we are pretty darned close to fully portable. I believe we could fix Popen to make it fully portable pretty easily. In fact, there may be a pure-python fix. Documenting the differences would also not be hard. I would discourage you from relying *solely* on a description such as uses execvpe on POSIX to describe the semantics. Aside from being a nonportable description, it doesn't help anyone who isn't familiar with the POSIX system calls. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)
Ilya Sandler ilya.sand...@gmail.com added the comment: a note on testing: it should be possible to integrate the tests into existing test_pdb.py by simply placing subprocess based tests next to doctest-based tests. This way pdb tests will at least be in a single module. (this is an approach taken by a patch in http://bugs.python.org/issue7964) Would it be better? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7245 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6822] Error calling .storlines from ftplib
Giampaolo Rodola' g.rod...@gmail.com added the comment: Attached is a patch which fixes FTP_TLS class as well and changes the test server a little bit. Shouldn't retrlines() suffer the same issue? -- assignee: - giampaolo.rodola nosy: +giampaolo.rodola versions: +Python 3.1, Python 3.2 -Python 3.0 Added file: http://bugs.python.org/file17170/ftplib.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6822 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Robert, Your patch segfaults on Lib/test/test_builtin.py, but I agree with the approach. I'll see if it is easy to fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- assignee: - belopolsky nosy: +belopolsky -Alexander.Belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Mark Dickinson dicki...@gmail.com added the comment: Hmm, maybe there is a 2.7 bug here after all: Yes, indeed! Which is why I was suggesting 'wont fix' rather than 'out of date' :) The bltinmodule2.diff patch from Robert causes a segfault in test_builtin on my system; I haven't looked at the patch itself properly, but there's likely some refcounting problem. The patch also lacks tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: out of date - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Mark Dickinson dicki...@gmail.com added the comment: A couple of suggestions regarding the patch: (1) I'd suggest leaving the first part of handle_range_longs intact, up to and including the /* ilow and ihigh correct now; do istep */ block. Then build out the three if (!PyInt_Check(...)) ... blocks below to include argument conversion. I think the patch would look cleaner this way. (2) Rather than using PyNumber_Long, I'd prefer an explicit check for, and call to, nb_int. This is the behaviour that's used for the 'l' getargs format. PyNumber_Long is considerably more complicated, and involves looking at __trunc__ and __long__; so if you use PyNumber_Long you'll still end up with inconsistent behaviour between small and large arguments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: I am attaching a patch which does not crash or leak (as tested with -R :) and adds a unit test for OP's case. The problem, however is that it does not work if new style classes are used in the test case. See disabled (with if 0) test in the patch. I'll give it some more thought. -- Added file: http://bugs.python.org/file17171/bltinmodule3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Mark, I did not see your last comment before uploading the last patch. I think your suggestion to bypass PyNumber_Long will fix the new/old style classes discrepancy. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8214] Add exception logging function to syslog module
Sean Reifschneider j...@tummy.com added the comment: Jack Diederich commented: I don't have my tracker login on this computer so I'll post here. I'd +1 on making the module python with just the core functionality imported from C (it releases the GIL when doing IO). Then you could replace the few hundred lines of C with just the few lines of python from the prototype. That said...The parens in return (NULL) are extra and against PEP 7 (though there are already a bunch in syslogmodule.c).You need to NULL check the saved_hook in newhookobject() before INCREF'ing it.Should the saved hook be called after the syslog call? It might do anything.The patch needs unit tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Mark Dickinson dicki...@gmail.com added the comment: Alexander, I think it should be as simple as replacing the if (!PyInt_Check(ilow) ...) block with something like this: if (!PyInt_Check(ilow) !PyLong_Check(ilow)) { PyNumberMethods *nb = Py_TYPE(ilow)-tp_as_number; PyObject *temp; if (PyFloat_Check(ilow) || nb == NULL || nb-nb_int == NULL) { PyErr_Format(PyExc_TypeError, range() integer start argument expected, got %s., ilow-ob_type-tp_name); goto Fail; } temp = (*nb-nb_int)(ilow); Py_DECREF(ilow); ilow = temp; if (temp == NULL) goto Fail; } and then doing the same for the ihigh and istep blocks. But I haven't tested this. Mark -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8593] Improve c-api/arg.rst
Antoine Pitrou pit...@free.fr added the comment: Patch uploaded at http://codereview.appspot.com/979047 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8593 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8594] Add a source_address option to ftplib
New submission from Giampaolo Rodola' g.rod...@gmail.com: Similarly to issue 3972 the patch in attachment adds a new source_address option to FTP class to bind to a specific address when connecting to a remote FTP server. It must be noted that this gets done for both control and passive data connections (client connecting to server). The latter one solves issue 1661754. -- components: Library (Lib) files: ftplib_source_address.patch keywords: needs review, patch messages: 104749 nosy: giampaolo.rodola, pitrou, r.david.murray priority: normal severity: normal status: open title: Add a source_address option to ftplib type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file17172/ftplib_source_address.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8594 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1661754] ftplib passive ftp problem on multihomed clients
Giampaolo Rodola' g.rod...@gmail.com added the comment: Issue 8594 is related with this one. -- superseder: - Add a source_address option to ftplib ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1661754 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8550] Expose SSL contexts
Antoine Pitrou pit...@free.fr added the comment: Here is a patch exposing SSL contexts as the SSLContext class. Also, SSL sockets are refactored to create a standalone SSLContext object, unless you create them using the new SSLContext.wrap_socket(). Please note that SSLContexts do not expose much more information than SSL sockets previously did. New SSLContext functionality (such as options) can be added later. Docs are missing, but tests are there. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file17173/sslcontext.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8550 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8557] subprocess PATH semantics and portability
R. David Murray rdmur...@bitdance.com added the comment: I didn't run the script. I have now, but I'm not clear from its output what each test is actually doing, and don't really have the time to figure it out from the code right now. I think it is probably more efficient to just ask you what your suggestion is for making things more portable? As for the docs, the docs link to the os.exec python docs, which explain the PATH semantics. Linking to the Microsoft documentation would equivalently explain the Windows semantics. An explicit footnote discussing the differences in PATH behavior in the subprocess context would probably be helpful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8594] Add a source_address option to ftplib
Antoine Pitrou pit...@free.fr added the comment: You should not use find_unused_port(), because it causes problems on some Windows buildbot. Also, there's something fishy in your patch, because you never set self.source_address. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8594 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8214] Add exception logging function to syslog module
Antoine Pitrou pit...@free.fr added the comment: Rewriting another implementation of traceback formatting in C is bad. Just import the traceback module and call the desired function in that module. -- nosy: +pitrou versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8214] Add exception logging function to syslog module
Sean Reifschneider j...@tummy.com added the comment: Thanks for the review Jack. I was very tempted to split it into C and Python components, but I decided against it because it's so close to the 2.7 release. I think it would be best to defer that for the Python 3 release, because of potential packaging issues. I'm open to discussion on that though. I've changed all the return(NULL)s in the package. NULL check on saved_hook is done. I also had the same thought about the saved_hook/syslog ordering, so I've changed it. I've added soe unit tests. I tried getting fancy and testing the exception handling, but had to fork to do it and then unittests were still catching the exception, so I just left it the minimal set of tests I put in there. Thanks. -- Added file: http://bugs.python.org/file17174/logexception3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8214] Add exception logging function to syslog module
Brian Curtin cur...@acm.org added the comment: The test file should use test_support.import_module(syslog) instead of the try/except, which would then make the skip decorators unnecessary. -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This patch, bltinmodule4.diff, seems to work for all cases. Mark, It looks like I came up with almost the same logic as you did. The only difference that I can see is that your code does not check that nb_int returns an integer. Also I put repeated logic into a separate function. The patch includes unit tests that pass reference leak test. -- stage: unit test needed - patch review Added file: http://bugs.python.org/file17175/bltinmodule4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Added file: http://bugs.python.org/file17176/bltinmodule4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1533] Bug in range() function for large values
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: Removed file: http://bugs.python.org/file17175/bltinmodule4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1533 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8214] Add exception logging function to syslog module
Sean Reifschneider j...@tummy.com added the comment: Changed to use import_module. -- Added file: http://bugs.python.org/file17177/logexception4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8550] Expose SSL contexts
Antoine Pitrou pit...@free.fr added the comment: New patch with docs. -- Added file: http://bugs.python.org/file17178/sslcontext2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8550 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8214] Add exception logging function to syslog module
Benjamin Peterson benja...@python.org added the comment: You shouln't use fail*. They're deprecated. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8214] Add exception logging function to syslog module
Sean Reifschneider j...@tummy.com added the comment: Switched to using assertTrue/assertFalse. -- Added file: http://bugs.python.org/file17179/logexception5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8214 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8595] Unexpected default timeout in http-client-related libraries
New submission from Julian python_...@somethinkodd.com: Since Python 2.6, httplib has offered a timeout parameter for fetches. As the documentation explains, if this parameter is not provided, it uses the global default. What the document doesn't explain is httplib builds on top of the socket library. The socket library has a default timeout of None (i.e. forever). This may be an appropriate default for general sockets, but it is a poor default for httplib; typical http clients would use a timeout in the 2-10 second range. This problem is propagated up to urllib2, which sits on httplib, and further obscures that the default might be unsuitable. From an inspection of the manuals, Python 3.0.1 suffers from the same problem except, the names have changed. urllib.response sits on http.client. I, for one, made a brutal mistake of assuming that the global default would be some reasonable default for fetching web pages; I didn't have any specific timeout in mind, and was happy for the library to take care of it. Several million successful http downloads later, my server application thread froze waiting forever when talking to a recalcitrant web-server. I imagine others have fallen for the same trap. While an ideal solution would be for httplib and http.client to use a more generally acceptable default, I can see it might be far too late to make such a change without breaking existing applications. Failing that, I would recommend that the documentation for httplib, urllib, urllib2, http.client and urllib.request (+ any other similar libraries sitting on socket? FTP, SMTP?) be changed to highlight that the default global timeout, sans deliberate override, is to wait a surprisingly long time. -- assignee: d...@python components: Documentation, Library (Lib) messages: 104763 nosy: d...@python, oddthinking priority: normal severity: normal status: open title: Unexpected default timeout in http-client-related libraries type: behavior versions: Python 2.6, Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8595 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser
Dmitry Chichkov dchich...@gmail.com added the comment: This patch does not modify the existing behavior of the library. The namespace_separator parameter is optional. Parameter already exists in the EXPAT library, but it is hard coded in the cElementTree.XMLParser code. Fredrik, yes, namespaces are a fundamental part of the XML information model. Yet an option of having them ignored is a very valuable one in the performance critical code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8583 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8595] Explain the default timeout in http-client-related libraries
Senthil Kumaran orsent...@gmail.com added the comment: I am not sure, there can be a default timeout value for client libraries like httplib and urllib2. Socket connection do have timeout and as you may have figured out already, the option in httplib and urllib methods is to set/override the socket._GLOBAL_DEFALT_TIMEOUT which is None by default (Wait indefinitely). Since client libraries are using a global, setting it at once place (say at httplib) has same timeout applicable for other modules within the same process. I see docs can highlight it more or perhaps link to sockets timeout information. -- nosy: +orsenthil title: Unexpected default timeout in http-client-related libraries - Explain the default timeout in http-client-related libraries ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8595 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8557] subprocess PATH semantics and portability
Dave Abrahams d...@boostpro.com added the comment: I've uploaded a new probe.py that contains a win32 Popen wrapper that I think acts just like *nix's Popen w.r.t. PATH and environment (pass --fix to demonstrate). I suggest using this or an equivalent wrapper for Win32, and documenting the fact that with shell=False, filename extensions need to be supplied explicitly on windows. -- Added file: http://bugs.python.org/file17180/probe.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8557 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8595] Explain the default timeout in http-client-related libraries
Julian python_...@somethinkodd.com added the comment: @orsenthil: Consider the definition of httplib.HTTPConnection.__init__(), in Python 2.6. def __init__(self, host, port=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT): This could be replaced with: def __init__(self, host, port=None, strict=None, timeout=10): or, perhaps better, def __init__(self, host, port=None, strict=None, timeout=httplib._HTTP_DEFAULT_TIMEOUT): This timeout value is passed to the call in socket.create_connection, so I believe if it is overriden, it only applies to the relevant sockets and not to all sockets globally. Note: I am not arguing here that this SHOULD be done - it would break existing applications, especially those that were written before Python 2.6 - merely that it COULD be done. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8595 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8596] crypt blowfish 'ignores' salt
New submission from pvo user+pyt...@localhost.localdomain.org: Blowfish crypt uses a 128 bit salt, not only the letters [./a-zA-Z0-9]. Despite the different salts, crypt ignores the salt and produces identical encrypted passwords. The problem occurs on FreeBSD 7.2 with Python 2.5.5 (r255:77872) and Python 2.6.4 (r264:7570) (both from the ports) python2.6 crypt_blf.py salt: '$2a$05$)O\x0e9\xb7\xb0\xc9\xd6)v.\xd3\x03\xea!\xc1$' $2a$05$t59ktwmm7.WpI./5uuAazXv5nUvrWyN1EzMcL6/EQ0HrNyJwq salt: '$2a$05$\x1ak\x0c\xfbF\xf5\xdf\xb4\x99\xa6\x12\x81\x8d\xce\xea\x19$' $2a$05$COgstwmm../5uuu63L/Vi1a/9FQpklC2BKZ74ai8JM2ey salt: '$2a$05$\x80:\x14\xbb\xc3R\x95\xb9\xcb\xf0#\x04\xbf\xf7\xe9$' $2a$05$COgstwmm../5uuu63L/Vi1a/9FQpklC2BKZ74ai8JM2ey salt: '$2a$05$i\x01 \x10\x13#\xe3\xdc\x80\x90[3\xd5@(\x96$' $2a$05$COgstwmm../5uuu63L/Vi1a/9FQpklC2BKZ74ai8JM2ey salt: '$2a$05$\xa8CY\xa6\x018\xe7\x0b}\x92\xd3\xa1L1\xfb$' $2a$05$COgstwmm../5uuu63L/Vi1a/9FQpklC2BKZ74ai8JM2ey -- components: Library (Lib) files: crypt_blf.py messages: 104768 nosy: pvo priority: normal severity: normal status: open title: crypt blowfish 'ignores' salt type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file17181/crypt_blf.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8596 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8595] Explain the default timeout in http-client-related libraries
Senthil Kumaran orsent...@gmail.com added the comment: On Sun, May 02, 2010 at 03:45:09AM +, Julian wrote: Note: I am not arguing here that this SHOULD be done - it would break existing applications, especially those that were written before Python 2.6 - merely that it COULD be done. I get your point, Julian. What I was worried about is, is it the correct thing to do? Which I am not sure and I believe it is not as httplib and urllib are not client themselves but are libraries to build clients. httplib and urllib can be considered as convenient interfaces over underlying sockets. Breaking of existing apps is the next question, which should definitely be avoided. And an explanation in the docs certainly seems to be the way to go. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8595 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8597] build out-of-line asm on Windows
New submission from Zooko O'Whielacronx zo...@zooko.com: I maintain a Python package which comes with assembly optimizations -- http://tahoe-lafs.org/trac/pycryptopp . Someone was porting this package to Win64 today and discovered that distutils couldn't build it because the Microsoft compiler on Win64 doesn't allow in-line assembly and distutils doesn't know how to build out-of-line assembly (see also http://stackoverflow.com/questions/1664812/can-pythons-distutils-compile-s-assembly which says that there isn't a known way to do this). So the fellow who is porting pycryptopp to Win64 for me, Samuel Neves, found this hack in someone else's setup.py file: http://bitbucket.org/ambroff/greenlet/src/3ad4830aa109/setup.py We're probably going to adapt that hack to the pycryptopp setup.py file in order to work around this problem. But then another fellow named Josip Djolonga who is a GSoC student working on Distutils2 suggested that we could patch the compiler class to use assembly files and pass them to cl.exe. Samuel worked up a patch that does that and then he was able to build pycryptopp on Win64. Here is his patch attached as a file. Note that we will still need to do some work-around in the pycryptopp setup.py file in order to make pycryptopp buildable on Win64 with older versions of Python that do not have this fix. Any suggestions on the best way to do that would be welcome. Oops, I see that Samuel gave me the patch in traditional diff form instead of unified diff form. I hope you can accept it anyway since he has gone to bed. -- assignee: tarek components: Distutils files: patch.diff keywords: patch messages: 104770 nosy: tarek, zooko priority: normal severity: normal status: open title: build out-of-line asm on Windows type: behavior Added file: http://bugs.python.org/file17182/patch.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8597 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com