[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
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

[issue2110] Implement __format__ for Decimal

2008-06-20 Thread Mark Dickinson
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 ___

[issue3004] Bug in slice.indices()

2008-06-20 Thread Mark Dickinson
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.assertEqua

[issue3004] Bug in slice.indices()

2008-06-20 Thread Mark Dickinson
Changes by Mark Dickinson <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10669/unnamed ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3004] Bug in slice.indices()

2008-06-20 Thread Mark Dickinson
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]>

[issue3004] Bug in slice.indices()

2008-06-20 Thread Mark Dickinson
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 id

[issue3004] Bug in slice.indices()

2008-06-20 Thread Mark Dickinson
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 (

[issue3004] Bug in slice.indices()

2008-06-20 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: marketdickinson -> rhettinger nosy: +rhettinger ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue1615158] POSIX capabilities support

2008-06-20 Thread Matt Kern
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 PROTECTE

[issue3008] Let bin() show floats

2008-06-20 Thread Amaury Forgeot d'Arc
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') +

[issue1615158] POSIX capabilities support

2008-06-20 Thread Matt Kern
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.o

[issue3008] Let bin() show floats

2008-06-20 Thread Mark Dickinson
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 dif

[issue2110] Implement __format__ for Decimal

2008-06-20 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- status: closed -> open ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-l

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
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

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10674/float5.diff ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
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]>

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10674/float5.diff ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3004] Bug in slice.indices()

2008-06-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Looks like a straight-forward patch. -- assignee: rhettinger -> marketdickinson resolution: -> accepted ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Benjamin Peterson
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 _

[issue1545] shutil fails when copying to NTFS in Linux

2008-06-20 Thread Raghuram Devarakonda
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 i

[issue3008] Let bin() show floats

2008-06-20 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: > Mark, I added tests for Inf/Nan. Will this work on all platforms? I think the tests should work on all common to semicommon platforms, including on all the buildbots. They won't work on non IEEE 754 platforms (float('nan') will throw an

[issue3004] Bug in slice.indices()

2008-06-20 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Committed, r64426. Thanks for the report, Arnaud. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3151] elementtree serialization bug for weird namespace urls

2008-06-20 Thread robert forkel
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

[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Helmut Jarausch
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 sys.exit(refactor.main(fixers)) File "/usr/local/lib/python3.0/lib2to3/refactor.py", line 81, in main

[issue3149] multiprocessing build fails on Solaris 10

2008-06-20 Thread Jean Brouwers
Jean Brouwers <[EMAIL PROTECTED]> added the comment: One more comment on SEM_VALUE_MAX for Solaris. _POSIX_SEM_VALUE_MAX is defined in on Solaris and that header file must be included. Better might be to use _SEM_VALUE_MAX which is defined in and that header files needs to be included as w

[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-06-20 Thread Miki Tebeka
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]> ___ __

[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-06-20 Thread Jesse Noller
Jesse Noller <[EMAIL PROTECTED]> added the comment: Where exactly does it hang Miki? ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-l

[issue2277] MozillaCookieJar does not support Firefox3 cookie files

2008-06-20 Thread Qiangning Hong
Changes by Qiangning Hong <[EMAIL PROTECTED]>: -- nosy: +hongqn ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing

[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Georgij Kondratjev
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.repl

[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Georgij Kondratjev
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]>

[issue3143] development docs waste a lot of horizontal space on left nav bar

2008-06-20 Thread Georg Brandl
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 PR

[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Georgij Kondratjev
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

[issue3131] 2to3 can't find fixes_dir

2008-06-20 Thread Benjamin Peterson
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 _

[issue3152] ast module docs document private attribute

2008-06-20 Thread Brett Cannon
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. -- assig

[issue3152] ast module docs document private attribute

2008-06-20 Thread Georg Brandl
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._field

[issue3151] elementtree serialization bug for weird namespace urls

2008-06-20 Thread Amaury Forgeot d'Arc
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

[issue3152] ast module docs document private attribute

2008-06-20 Thread Raymond Hettinger
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]>

[issue1615158] POSIX capabilities support

2008-06-20 Thread Martin v. Löwis
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]>

[issue3153] sqlite leaks on error

2008-06-20 Thread Adam Olsen
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, s

[issue3154] "Quick search" box renders too long on FireFox 3

2008-06-20 Thread Miki Tebeka
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 ve

[issue3152] ast module docs document private attribute

2008-06-20 Thread Martin v. Löwis
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]>

[issue3154] "Quick search" box renders too long on FireFox 3

2008-06-20 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Works for me. -- nosy: +Rhamphoryncus ___ Python tracker <[EMAIL PROTECTED]> ___ ___ P

[issue3154] "Quick search" box renders too long on FireFox 3

2008-06-20 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Are you using a pre-final version of Firefox? -- nosy: +benjamin.peterson ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3154] "Quick search" box renders too long on FireFox 3

2008-06-20 Thread Miki Tebeka
Miki Tebeka <[EMAIL PROTECTED]> added the comment: Using final version (on Ubuntu 8.04) ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bug

[issue3155] Python should expose a pthread_cond_timedwait API for threading

2008-06-20 Thread Gregory P. Smith
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 5

[issue3154] "Quick search" box renders too long on FireFox 3

2008-06-20 Thread Adam Olsen
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]> ___

[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-06-20 Thread Miki Tebeka
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]> ___ ___

[issue3156] bytes type has inconsistent methods (append, insert)

2008-06-20 Thread A.M. Kuchling
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:

[issue3151] elementtree serialization bug for weird namespace urls

2008-06-20 Thread A.M. Kuchling
Changes by A.M. Kuchling <[EMAIL PROTECTED]>: -- keywords: +easy ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing

[issue3157] sqlite3 minor documentation issues

2008-06-20 Thread Stephen Lewis
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 resultse

[issue3158] Doctest fails to find doctests in extension modules

2008-06-20 Thread Fernando Pérez
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

[issue3008] Let bin() show floats

2008-06-20 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Applied in r64438 -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___