[issue3008] Let bin() show floats
Raymond Hettinger [EMAIL PROTECTED] added the comment: The other reviewers asked for: * same treatment for oct() and hex() * platform independent exact representation of floats * fixed-size exponential style output instead of tons of leading zeros * output that round-trips through eval() * use Py2.6 octal format in 2.6, and 3.0 format in 3.0 Attaching a patch with tests. Added file: http://bugs.python.org/file10668/float3.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3008 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2110] Implement __format__ for Decimal
Mark Dickinson [EMAIL PROTECTED] added the comment: Reopening this; I'd like to have a second go at implementing the 'n' format specifier for the Decimal type. See issue 2802 for hints about how to go about this. -- assignee: facundobatista - marketdickinson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Mark Dickinson [EMAIL PROTECTED] added the comment: On Wed, Jun 18, 2008 at 4:56 PM, Arnaud Bergeron [EMAIL PROTECTED] wrote: Arnaud Bergeron [EMAIL PROTECTED] added the comment: Would these do? self.assertEqual(slice(None, -10).indices(10), (0, 0, 1)) self.assertEqual(slice(None, -11, ).indices(10), (0, 0, 1)) self.assertEqual(slice(None, -12, -1).indices(10), (9, -1, -1)) Perfect. Thank you. If this is changed, then I think the following should also be changed: (9, 10, -1) I believe the second index here should be 9, not 10. Do you agree? With these two changes the code, while marginally more complicated, is actually easier to understand than before, since exactly the same processing is applied to both the start and stop indices. I think this is as it should be. Added file: http://bugs.python.org/file10669/unnamed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___div class=gmail_quoteOn Wed, Jun 18, 2008 at 4:56 PM, Arnaud Bergeron lt;a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/agt; wrote:brblockquote class=gmail_quote style=margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex; br Arnaud Bergeron lt;a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/agt; added the comment:br br Would these do?br br self.assertEqual(slice(None, nbsp; -10 nbsp; nbsp;).indices(10), (0, nbsp;0, nbsp;1))br self.assertEqual(slice(None, nbsp; -11, nbsp; ).indices(10), (0, nbsp;0, nbsp;1))br self.assertEqual(slice(None, nbsp; -12, -1).indices(10), (9, -1, -1))br/blockquotedivbr/divdivPerfect. nbsp;Thank you./divdivbr/divdivIf this is changed, then I think the following should also be/divdiv changed:/divdivbr/divdivdivgt;gt;gt; slice(10, 10, -1).indices(10) nbsp;# expect (9, 9, -1)/divdiv(9, 10, -1)/divdivbr/divdivI believe the second index here should be 9, not 10./divdivDo you agree?/div divbr/divdivWith these two changes the code, while marginally/divdivmore complicated, is actually easier to understand than/divdivbefore, since exactly the same processing is applied/divdivto both the start and stop indices. nbsp;I think this is as/div divit should be./divdivbr/div/div/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Changes by Mark Dickinson [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10669/unnamed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Mark Dickinson [EMAIL PROTECTED] added the comment: Sorry: looks like I messed up that last post. The example should be: slice(10, 10, -1).indices(10) # expect (9, 9, -1) (9, 10, -1) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Mark Dickinson [EMAIL PROTECTED] added the comment: Here's a new patch that incorporates Arnaud's fix and tests, together with a few extra tests. While I expect that this change will affect very little code, I think it's the right thing to do, because: - start and stop are now processed identically, making the source code easier to understand, and the behaviour easier to explain. - expected invariants now hold even in corner cases; for example, after: start, stop, step = my_slice.indices(length) it's guaranteed that 0 = start = stop = lengthif step is positive, and length-1 = start = stop = -1 if step is negative. However, I'd like a second opinion from another core developer before checking this in. Added file: http://bugs.python.org/file10670/issue3004.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Mark Dickinson [EMAIL PROTECTED] added the comment: 0 = start = stop = lengthif step is positive, and length-1 = start = stop = -1 if step is negative. That should be: 0 = start = length and 0 = stop = length (step 0), and length-1 = start = -1, length-1 = stop = -1 (step 0); it's not guaranteed that start = stop always holds in the first case, or that start = stop in the second. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Changes by Raymond Hettinger [EMAIL PROTECTED]: -- assignee: marketdickinson - rhettinger nosy: +rhettinger ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1615158] POSIX capabilities support
Matt Kern [EMAIL PROTECTED] added the comment: Updated patch with numerous changes, which (hopefully) address the issues you raised. Added file: http://bugs.python.org/file10671/patch-20080620-1232.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1615158 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3008] Let bin() show floats
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: I don't like this modification of a PyString object: + n = PyString_GET_SIZE(conv); + conv_str = PyString_AS_STRING(conv); + /* Remove the trailing 'L' if present */ + if (n conv_str[n-1] == 'L') + conv_str[n-1] = '\0'; + result = PyString_FromFormat(%s * 2.0 ** %d, conv_str, exp); The string may have other references (ex: all single-char strings are shared) and it seems unwise to directly modify the memory. Also, tests should check if negative numbers have the same representation as their absolute value (with the sign). It is not obvious from the implementation, which uses floor(). -- nosy: +amaury.forgeotdarc ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3008 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1615158] POSIX capabilities support
Matt Kern [EMAIL PROTECTED] added the comment: Updated patch with further documentation fixes. Added file: http://bugs.python.org/file10672/patch-20080620-1314.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1615158 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3008] Let bin() show floats
Mark Dickinson [EMAIL PROTECTED] added the comment: The patch looks good to me. It's a bit unfortunate that -0.0 doesn't round-trip correctly (the sign of the zero gets lost): eval(bin(-0.0)) 0.0 I don't know whether it's worth special-casing this; the output would have to be in a different format: '-0b0 * 2.0 ** 0' isn't good enough, since unary minus has higher precedence than multiplication. -- nosy: +marketdickinson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3008 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2110] Implement __format__ for Decimal
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- status: closed - open ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2110 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3008] Let bin() show floats
Raymond Hettinger [EMAIL PROTECTED] added the comment: Hmm, I don't see a way to preserve -0.0 without varying from the standard format. Attaching an updated patch for Amaury's comments. Added file: http://bugs.python.org/file10673/float4.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3008 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3008] Let bin() show floats
Changes by Raymond Hettinger [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10674/float5.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3008 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3008] Let bin() show floats
Raymond Hettinger [EMAIL PROTECTED] added the comment: Mark, I added tests for Inf/Nan. Will this work on all platforms? Added file: http://bugs.python.org/file10675/float5.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3008 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3008] Let bin() show floats
Changes by Raymond Hettinger [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10674/float5.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3008 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Raymond Hettinger [EMAIL PROTECTED] added the comment: Looks like a straight-forward patch. -- assignee: rhettinger - marketdickinson resolution: - accepted ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3131] 2to3 can't find fixes_dir
Benjamin Peterson [EMAIL PROTECTED] added the comment: Collin, how does this look? #!/usr/bin/env python from lib2to3 import refactor import sys import os fixers = os.path.join(os.path.dirname(refactor.__file__), fixes) sys.exit(refactor.main(fixers)) -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1545] shutil fails when copying to NTFS in Linux
Raghuram Devarakonda [EMAIL PROTECTED] added the comment: I have submitted a patch (http://codereview.appspot.com/2384) for WindowsError issue as it is reported in two other bugs #3134 and #2549. I have only tested on Linux so I would appreciate if some one who have access to windows can test it as well. Considering that the fix is simple and more bugs are being opened for the same problem, it is worthwhile to check this in quickly. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1545 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3004] Bug in slice.indices()
Mark Dickinson [EMAIL PROTECTED] added the comment: Committed, r64426. Thanks for the report, Arnaud. -- status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3004 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3151] elementtree serialization bug for weird namespace urls
New submission from robert forkel [EMAIL PROTECTED]: when serializing elementtrees with weird namespaces like {$stuff}, the generated xml is not valid: Python 2.5.1 (r251:54863, Mar 7 2008, 04:10:12) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 IDLE 1.2.1 No Subprocess from xml.etree import ElementTree as et e = et.fromstring('prefix:localname xmlns:prefix=${stuff}/') e.tag '{${stuff}}localname' t = et.ElementTree(e) from StringIO import StringIO f = StringIO() t.write(f) f.seek(0) print f.read() ns0:}localname xmlns:ns0=${stuff / -- components: Library (Lib) messages: 68463 nosy: xrotwang severity: normal status: open title: elementtree serialization bug for weird namespace urls type: behavior versions: Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3151 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3131] 2to3 can't find fixes_dir
Helmut Jarausch [EMAIL PROTECTED] added the comment: The suggested fix succeeds but then the next problem occurs Traceback (most recent call last): File /usr/local/bin/2to3, line 6, in module sys.exit(refactor.main(fixers)) File /usr/local/lib/python3.0/lib2to3/refactor.py, line 81, in main rt = RefactoringTool(fixer_dir, options) File /usr/local/lib/python3.0/lib2to3/refactor.py, line 160, in __init__ self.pre_order, self.post_order = self.get_fixers() File /usr/local/lib/python3.0/lib2to3/refactor.py, line 185, in get_fixers mod = __import__(fixer_pkg + .fix_ + fix_name, {}, {}, [*]) ValueError: Empty module name -- nosy: +HWJ ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3149] multiprocessing build fails on Solaris 10
Jean Brouwers [EMAIL PROTECTED] added the comment: One more comment on SEM_VALUE_MAX for Solaris. _POSIX_SEM_VALUE_MAX is defined in limits.h on Solaris and that header file must be included. Better might be to use _SEM_VALUE_MAX which is defined in param.h and that header files needs to be included as well. Rerhaps, INT_MAX is best. /usr/include/limits.h:#define _POSIX_SEM_NSEMS_MAX 256 /usr/include/limits.h:#define _POSIX_SEM_VALUE_MAX32767 /usr/include/sys/param.h:#define_SEM_NSEMS_MAX INT_MAX /usr/include/sys/param.h:#define_SEM_VALUE_MAX INT_MAX Btw, the value of _POSIX_SEM_MAX_VALUE is 32767. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs on OS X 10.5.3
Miki Tebeka [EMAIL PROTECTED] added the comment: Still hangs for me on the 2.6 trunk on Ubuntu 8.04 -- nosy: +tebeka ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs on OS X 10.5.3
Jesse Noller [EMAIL PROTECTED] added the comment: Where exactly does it hang Miki? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2277] MozillaCookieJar does not support Firefox3 cookie files
Changes by Qiangning Hong [EMAIL PROTECTED]: -- nosy: +hongqn ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2277 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3131] 2to3 can't find fixes_dir
Georgij Kondratjev [EMAIL PROTECTED] added the comment: Do what Benjamin Peterson suggested and also edit get_fixers(self) in refactor.py so fixer_pkg is initialized like this: fixer_pkg = os.path.relpath(self.fixer_dir, os.path.join(os.path.dirname(__file__), '..')) fixer_pkg = fixer_pkg.replace(os.path.sep, .) This works for me. -- nosy: +orivej ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3131] 2to3 can't find fixes_dir
Georgij Kondratjev [EMAIL PROTECTED] added the comment: Here is the patch (against both current svn and beta 1). -- keywords: +patch Added file: http://bugs.python.org/file10676/2to3.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3143] development docs waste a lot of horizontal space on left nav bar
Georg Brandl [EMAIL PROTECTED] added the comment: I know about this and will think about possible ways out of it. Of course if someone has a patch it will probably be faster. -- components: +Documentation tools (Sphinx) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3143 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3131] 2to3 can't find fixes_dir
Georgij Kondratjev [EMAIL PROTECTED] added the comment: After uploading the patch I noticed -#!/usr/bin/env python +#!/usr/bin/python3.0 in it. They just should be dropped. Added file: http://bugs.python.org/file10677/2to3.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3131] 2to3 can't find fixes_dir
Benjamin Peterson [EMAIL PROTECTED] added the comment: The patch looks good, but I'm going to let Collin deal with it because I'm not sure if he wants to maintain backwards compatibility with older version. (os.path.relpath was introduced in 2.6) -- priority: - release blocker ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3131 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3152] ast module docs document private attribute
New submission from Brett Cannon [EMAIL PROTECTED]: The docs for the ast module document the '_fields' attribute on AST instances. Either that documentation needs to go away or the attribute needs to be renamed as the leading underscore means it is private to the internal API. -- assignee: georg.brandl components: Documentation keywords: easy messages: 68473 nosy: brett.cannon, georg.brandl priority: critical severity: normal status: open title: ast module docs document private attribute type: behavior versions: Python 2.6, Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3152] ast module docs document private attribute
Georg Brandl [EMAIL PROTECTED] added the comment: I disagree. The AST classes are auto-generated, the leading underscore of _fields is there to avoid clashes with field names from the AST types. This is similar to http://docs.python.org/dev/library/collections#collections.somenamedtuple._fields which shouldn't be renamed, but isn't private either. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3151] elementtree serialization bug for weird namespace urls
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: A one-letter fix :-) (the localname cannot contain special characters) -- assignee: - effbot keywords: +patch nosy: +amaury.forgeotdarc, effbot Added file: http://bugs.python.org/file10678/etree.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3151 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3152] ast module docs document private attribute
Raymond Hettinger [EMAIL PROTECTED] added the comment: This is consistent with the methods in named tuples (also to avoid name clashes). -- components: +None keywords: +26backport nosy: +rhettinger ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1615158] POSIX capabilities support
Martin v. Löwis [EMAIL PROTECTED] added the comment: Unfortunately, these changes missed the beta for 2.6, so it must be delayed until 2.7. -- versions: +Python 2.7 -Python 2.6 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1615158 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3153] sqlite leaks on error
New submission from Adam Olsen [EMAIL PROTECTED]: Found in Modules/_sqlite/cursor.c: self-statement = PyObject_New(pysqlite_Statement, pysqlite_StatementTy pe); if (!self-statement) { goto error; } rc = pysqlite_statement_create(self-statement, self-connection, operation); if (rc != SQLITE_OK) { self-statement = 0; goto error; } Besides the ugliness of allocating the object before passing it to the create function, if pysqlite_statement_create fails, the object is leaked. -- components: Extension Modules messages: 68478 nosy: Rhamphoryncus severity: normal status: open title: sqlite leaks on error type: resource usage ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3153 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3154] Quick search box renders too long on FireFox 3
New submission from Miki Tebeka [EMAIL PROTECTED]: See gray area in attached screenshot -- assignee: georg.brandl components: Documentation files: doc.png messages: 68479 nosy: georg.brandl, tebeka severity: normal status: open title: Quick search box renders too long on FireFox 3 versions: Python 2.6 Added file: http://bugs.python.org/file10679/doc.png ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3152] ast module docs document private attribute
Martin v. Löwis [EMAIL PROTECTED] added the comment: I agree with Georg and Raymond, closing this as won't fix. -- nosy: +loewis resolution: - wont fix status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3154] Quick search box renders too long on FireFox 3
Adam Olsen [EMAIL PROTECTED] added the comment: Works for me. -- nosy: +Rhamphoryncus ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3154] Quick search box renders too long on FireFox 3
Benjamin Peterson [EMAIL PROTECTED] added the comment: Are you using a pre-final version of Firefox? -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3154] Quick search box renders too long on FireFox 3
Miki Tebeka [EMAIL PROTECTED] added the comment: Using final version (on Ubuntu 8.04) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3155] Python should expose a pthread_cond_timedwait API for threading
New submission from Gregory P. Smith [EMAIL PROTECTED]: Currently the threading module has loops in it such as threading.Condition.wait's loop that attempts to acquire a lock in non-blocking mode and if it fails, sleeps for a while and trys again. (with exponential backoff of sleep time from 500us to 50ms in the current implementation). This is inefficient. Perhaps pthread_cond_timedwait does the same thing internally in some implementations but even if so, it will do it a lot more efficiently than doing it in python. We should expose a PyThread_acquire_lock API that accepts a timeout and uses pthread_cond_timedwait (or the equivalent on other OSes) when available. caveats? This may alter behavior with regards to KeyboardInterrupt exceptions coming in being processed or not depending on the particular OS timedwait implementation. -- components: Interpreter Core messages: 68484 nosy: gregory.p.smith priority: normal severity: normal status: open title: Python should expose a pthread_cond_timedwait API for threading type: feature request ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3155 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3154] Quick search box renders too long on FireFox 3
Adam Olsen [EMAIL PROTECTED] added the comment: That's the same version I'm using. Maybe there's some font size differences? I'm also on a 64-bit AMD. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3154 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3088] test_multiprocessing hangs on OS X 10.5.3
Miki Tebeka [EMAIL PROTECTED] added the comment: Jesse, I just run make test, it runs until test_multiprocessing and then hangs there ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3156] bytes type has inconsistent methods (append, insert)
New submission from A.M. Kuchling [EMAIL PROTECTED]: bytearray's methods aren't consistent in what they accept. append() takes either an int or a character: b = bytearray('abc') b.append(76) ; b bytearray(b'abcL') b.append('M') ; b bytearray(b'abcLM') .insert() accepts only integers: b.insert(0, 97) ; b bytearray(b'aabcLM') b.insert(0, 'a') ; b Traceback (most recent call last): File stdin, line 1, in module TypeError: an integer is required Both PEP 358 and the docstring for .append() only document 'int' as a legal input, so I suspect append() is wrong here. -- messages: 68487 nosy: akuchling severity: normal status: open title: bytes type has inconsistent methods (append, insert) type: behavior versions: Python 2.6 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3156 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3151] elementtree serialization bug for weird namespace urls
Changes by A.M. Kuchling [EMAIL PROTECTED]: -- keywords: +easy ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3151 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3157] sqlite3 minor documentation issues
New submission from Stephen Lewis [EMAIL PROTECTED]: The documentation for several methods in the sqlite3 library seems to be at odds with the function names: sqlite3.Cursor.fetchone -- Fetches several rows from the resultset. sqlite3.Cursor.fetchmany -- Fetches all rows from the resultset. sqlite3.Cursor.fetchall -- Fetches one row from the resultset. This is apparent on Ubuntu's packaged version 2.5.2-2ubuntu4, and a quick glance at the online SVN repository implies that its present in the trunk. Also, it might be helpful the documentation for sqlite3.connect were to mention that it takes a file name as a parameter :) -- assignee: georg.brandl components: Documentation messages: 68488 nosy: georg.brandl, slewis severity: normal status: open title: sqlite3 minor documentation issues versions: Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3157 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3158] Doctest fails to find doctests in extension modules
New submission from Fernando Pérez [EMAIL PROTECTED]: Doctest fails to find doctests defined in extension modules. With tools like cython (http://cython.org) it's trivially easy to add docstrings to extension code, a task that is much less pleasant with hand-written extensions. The following patch is a minimal fix for the problem: --- doctest_ori.py 2008-06-20 19:22:56.0 -0700 +++ doctest.py 2008-06-20 19:23:53.0 -0700 @@ -887,7 +887,8 @@ for valname, val in obj.__dict__.items(): valname = '%s.%s' % (name, valname) # Recurse to functions classes. -if ((inspect.isfunction(val) or inspect.isclass(val)) and +if ((inspect.isfunction(val) or inspect.isclass(val) or + inspect.isbuiltin(val) ) and self._from_module(module, val)): self._find(tests, val, valname, module, source_lines, globs, seen) However, it is likely not sufficient as it doesn't take into account the __test__ dict, for which probably the same change would work, just a few lines later. Furthermore, the real issue is in my view in the distinction made by inspect between isfunction() and isbuiltin() for the sake of analyzing docstrings. isfunction() returns false for a function that is defined in an extension module (though it *is* a function) while isbuiltin returns True (though it is *not* a builtin). For purposes of doctesting, doctest should simply care: - That it is a function. - That it has a docstring that can be parsed. But in too many places in doctest there are currently assumptions about being able to extract full source, line numbers, etc. Hopefully this quick fix can be applied as it will immediately make doctest work with large swaths of extension code, while a proper rethinking of doctest is made. BTW, in that process doctest will hopefully be made more modular and flexible: its current structure forces massive copy/paste subclassing for any kind of alternate use, since it has internally hardwired use of its own classes. Doctest is tremendously useful, but it really could use with some structural reorganization to make it more flexible (cleanly). -- components: Library (Lib) messages: 68489 nosy: fer_perez severity: normal status: open title: Doctest fails to find doctests in extension modules versions: Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3158 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com