[issue7010] Rounding when converting float tuple to str

2009-09-28 Thread Per Rosengren
New submission from Per Rosengren : When a floating point value is stored, the actual value stored is something at most some small number eps larger or smaller than the original value. Python knows this, so if it stores 0.1, and then prints the stored value, it rounds off decimals less signifi

[issue6992] multiple authors in setup.by

2009-09-28 Thread Tarek Ziadé
Tarek Ziadé added the comment: You can add them in the author field, separated by a space. It's a free field -- ___ Python tracker ___ ___

[issue7010] Rounding when converting float tuple to str

2009-09-28 Thread Eric Smith
Eric Smith added the comment: What OS, processor, and Python version are you running this code on? >From your example, it's Python 3.x. 3.1 has a completely rewritten float->decimal conversion system, and I get different results. >>> print(.1) 0.1 >>> print((.1,)) (0.1,) >>> For 2.6 and 3.0,

[issue7010] Rounding when converting float tuple to str

2009-09-28 Thread Mark Dickinson
Mark Dickinson added the comment: This is expected (and correct) behaviour for Python 2.x and 3.0. Note that the first example calls .1.__str__, while the second calls .1.__repr__. Python 2.6.2 (r262:71600, Aug 26 2009, 09:40:44) [GCC 4.2.1 (SUSE Linux)] on linux2 Type "help", "copyright", "cr

[issue7010] Rounding when converting float tuple to str

2009-09-28 Thread Mark Dickinson
Changes by Mark Dickinson : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue6992] multiple authors in setup.by

2009-09-28 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7010] Rounding when converting float tuple to str

2009-09-28 Thread Mark Dickinson
Mark Dickinson added the comment: And as Eric says, you shouldn't see this behaviour in Python 3.1, since there str(0.1) == repr(0.1) == '0.1'. If you are seeing it in 3.1, then something interesting's happening: please reopen in that case. :) -- _

[issue7011] tarinfo has problems with longlinks

2009-09-28 Thread Patrick Gerken
New submission from Patrick Gerken : Sadly, I am unable to debug it enough to be able to provide a thorough test case. I can provide information of how to reproduce the problem on request. I have a tar file and a diff to tarfile.py with some pdbs that only get activated in the middle of the file

[issue7005] ConfigParser does not handle options without values

2009-09-28 Thread Mats Kindahl
Mats Kindahl added the comment: I replied to the mail, but I don't know if it is attached to the issue, so I'll repeat here. I'll change the "value is not None" to just "value" where I used that idiom. The style of using options without values is quite common in my.cnf files used by MySQL prog

[issue7005] ConfigParser does not handle options without values

2009-09-28 Thread Mats Kindahl
Mats Kindahl added the comment: Fred L. Drake, Jr. wrote: > Fred L. Drake, Jr. added the comment: > > The test "value is not None" in line 620 (of the new version) could be > just "value" and get a little more value from less code. OK. > > I don't think I've ever run across a sample .ini-st

[issue7011] tarinfo has problems with longlinks

2009-09-28 Thread Patrick Gerken
Patrick Gerken added the comment: doh, I only searched for open bugs. Not for closed. This ticket is a dublicate of http://bugs.python.org/issue1471427 and fixed in python 2.5. If somebody has similar problems, here is a quickfix: I finally was able to reproduce the issue. It only happens when t

[issue7010] Rounding when converting float tuple to str

2009-09-28 Thread Per Rosengren
Per Rosengren added the comment: I tried Python 3.1, and it does indeed not have this issue. Thanks for swift response! -- ___ Python tracker ___ ___

[issue6992] multiple authors in setup.by

2009-09-28 Thread anatoly techtonik
anatoly techtonik added the comment: I want to add their emails also. What to write in author_email in this case? Will such author be parsed by various tools? By PyPi, for example, so that everyone get equal credits. I haven't found any remarks about correct handling of this field in distuti

[issue6992] Adding a Contributor field in PEP 314

2009-09-28 Thread Tarek Ziadé
Tarek Ziadé added the comment: Right, it's not handy for the emails. PyPI will display the author field, followed by the author_email field. So everyone will be displayed but not properly. But no tool is handling the Author and Author-email fields as multi-value fields. Maybe we could extend

[issue7012] Tabs is better than spaces for identation

2009-09-28 Thread Rohde Fischer
New submission from Rohde Fischer : Although it's probably futile, I'll still give it a try. I can see in your tutorial that you desire 4 spaces over tabs. I have never seen a good argument for spaces (and I've seen a lot), so I'll try to convince that tabs is the way (god damn it we don't liv

[issue7012] Tabs is better than spaces for identation

2009-09-28 Thread R. David Murray
R. David Murray added the comment: Python started out using tabs, for some of the reasons you elaborate. Years of practical experience have shown that using tabs causes pain. Our recommendation is not going to change. -- nosy: +r.david.murray priority: -> low resolution: -> rejected

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Committed the fix to parsetok.c in revision 75103 -- ___ Python tracker ___ ___ Python-bugs-

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Committed changed debug memory API in revision 75104 -- ___ Python tracker ___ ___ Python-bu

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: merged to py3k in 75105 -- resolution: -> accepted status: open -> closed ___ Python tracker ___ __

[issue6606] csv.Sniffer.sniff on data with doublequotes doesn't set up the dialect properly

2009-09-28 Thread Joseph Tate
Joseph Tate added the comment: Thank you, Thomas, for the patch, and Skip, for applying it. -- ___ Python tracker ___ ___ Python-bugs-

[issue1222585] C++ compilation support for distutils

2009-09-28 Thread David Kirkby
David Kirkby added the comment: Just to add, I'd much appreciate if this bug could be squashed. I see there is a patch, but it is against a 3-year old version, and is not a small patch. Hence I am reluctant to try to apply it myself. It is causing a problem in the Sage project, as I tried to c

[issue1222585] C++ compilation support for distutils

2009-09-28 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- versions: +Python 2.7, Python 3.2 -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Marco B
Marco B added the comment: This was already asked some years ago. http://mail.python.org/pipermail/python-list/2006-April/549340.html -- nosy: +markon ___ Python tracker ___ ___

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread R. David Murray
R. David Murray added the comment: Krisjan, after your commit I'm getting the following when trying to make python on both trunk and py3k: Objects/obmalloc.c:1372: error: conflicting types for '_PyObject_DebugCheckAddress' -- nosy: +r.david.murray status: closed -> open __

[issue6836] Mismatching use of memory APIs

2009-09-28 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: visual Studio didn't detect the missing 'const' for the void pointer. Fixed now in revision 75016 and revision 75107 -- status: open -> closed ___ Python tracker

[issue7013] Httplib read routine is not tolerant to not well-formed chunked http responses.

2009-09-28 Thread Andrei Korostelev
New submission from Andrei Korostelev : HTTPResponse._read_chunked cannot handle "slightly" ill-formed HTTP response not ended with 0 chunk-size. I did not make an analysis what type of webservers generate such responses, but one of them is bing.com (former msn.com). Example correct chunked http

[issue7013] Httplib read routine is not tolerant to not well-formed chunked http responses.

2009-09-28 Thread Andrei Korostelev
Andrei Korostelev added the comment: Patch for Python-2.6 -- Added file: http://bugs.python.org/file14989/httplib.python-2.6.2.diff ___ Python tracker ___ ___

[issue6992] Adding a Contributor field in PEP 314

2009-09-28 Thread anatoly techtonik
anatoly techtonik added the comment: Too complicated. I think any who significantly contributed to some package is an author. Maintainer is the one who does the goodness of making this package available to other systems through PyPi. {{{ authors = [ 'Anatoli ', 'Tarek ' ] }}} part is op

[issue7013] Httplib read routine is not tolerant to not well-formed chunked http responses.

2009-09-28 Thread Andrei Korostelev
Andrei Korostelev added the comment: Added patch for python-3.1.1 -- Added file: http://bugs.python.org/file14990/httplib.python-3.1.1.diff ___ Python tracker ___ ___

[issue6992] Adding a Contributor field in PEP 314

2009-09-28 Thread Tarek Ziadé
Tarek Ziadé added the comment: Notice that there's another issue: maintainer is not written in the Metadata if author is provided. Plus, PyPI has its own role system: owner+maintainer, that has nothing to do with the package Metadata (it's just who registered the package and who was granted so

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Thomas W. Barr
Thomas W. Barr added the comment: The string module, however, fails to properly capitalize anything in quotes: >>> string.capwords("i pity the 'foo'.") "I Pity The 'foo'." The string module could be easily made to work like the object. The object could be made to work more like the module, onl

[issue6790] httplib and array do not play together well

2009-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: These methods don't even produce a DeprecationWarning in current 2.6, I don't think it's ok to remove them. As for the special casing patch, it would be better with a test. -- nosy: +pitrou ___ Python tracker

[issue7010] Rounding when converting float tuple to str

2009-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: You're seeing the difference between str(.1) and repr(.1). When printing the tuple, you're getting the str of the tuple but just the repr of its contents ('%.17g'). When printing the number directly, you're just getting the str of the number which is round

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: I agree with the OP that str.title should be made smarter. As it stands, it is a likely bug factory that would pass unittests, then generate unpleasant results with real user inputs. Extending on Thomas's comment, I think string.capwords() needs to be depre

[issue6990] threading.local subclasses don't cleanup their state and it gets recycled

2009-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: The latest patch + tests looks ok to me. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-lis

[issue7001] turtle.py bug-fixes, backported from 3.1 [issue5923]

2009-09-28 Thread R. David Murray
R. David Murray added the comment: Committed to trunk in r75115, and 2.6 in r75116. As far as I know there are no tests for this module other than the doctests in the documentation. Those at least run without errors after the patches. -- resolution: -> fixed stage: commit review -> c

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread R. David Murray
R. David Murray added the comment: I believe capwords was supposed to be removed in 3.0, but this did not happen. -- nosy: +r.david.murray priority: -> normal stage: -> test needed ___ Python tracker

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: If you can find a link to the discussion for removing capwords, we can go ahead and deprecate it now. -- ___ Python tracker ___ _

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-09-28 Thread Mark Dickinson
Mark Dickinson added the comment: Gamma function added in r75117 (trunk), r75119 (py3k). I'm working on lgamma. -- ___ Python tracker ___

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread R. David Murray
R. David Murray added the comment: I haven't been able to find any discussion of deprecating capwords other than a mention in this thread: http://mail.python.org/pipermail/python-3000/2007-April/006642.html Later in the thread Barry says he is neutral on removing capwords, and it is not mentio

[issue7012] Tabs is better than spaces for identation

2009-09-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Then some of the arguments I've heard is that some editors shows tabs > badly, although true, then most proper editors it's possible to adjust > that to your personal preference That is no option for Python. In Python, it is part of the LANGUAGE SYNTAX tha

[issue7012] Tabs is better than spaces for identation

2009-09-28 Thread Guido van Rossum
Guido van Rossum added the comment: Wow. You (rohdef) really do sound like you are a time capsule from the eighties. Tabs would save keystrokes and bandwidth, and are not confusing? The keystrokes argument is wrong for most editors; the bandwidth argument doesn't matter due to disk size, netw

[issue7012] Tabs is better than spaces for indentation

2009-09-28 Thread Mark Dickinson
Changes by Mark Dickinson : -- title: Tabs is better than spaces for identation -> Tabs is better than spaces for indentation ___ Python tracker ___ _

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Thomas W. Barr
Thomas W. Barr added the comment: If "correct handling of apostrophe's and quotation marks, keeping the string length unchanged, and only changing desired letters from lower to uppercase with no other side-effects" is the criterion we want, then what I suggested (toupper() the first character, a

[issue7014] Logging incompatible with IronPython

2009-09-28 Thread Michael Foord
New submission from Michael Foord : Logging is incompatible with IronPython 2.6. See: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=24714 The core of the issue is that logging assumes that if sys._getframe is not defined then frames can still be accessed through exceptions. For

[issue6992] Adding a Contributor field in PEP 314

2009-09-28 Thread anatoly techtonik
anatoly techtonik added the comment: Having single `authors` field is enough, indeed. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm still researching what other languages do. MS-Excel matches what Python currently does. Django uses the python version and then fixes-up apostrophe errors: title=lambda value: re.sub("([a-z])'([A-Z])", lambda m: m.group(0).lower(), value.title()).

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thomas, if you write-up an initial patch, aim for the most conservative version that leaves all of the behavior unchanged except for embedded single apostrophes (to handle contractions and possessives). That will assure that we don't muck-up any existing use

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: We shouldn't change the current default behaviour, people are probably relying on it. Besides, doing the right thing is both (natural) language-dependent and context-dependent. It would be (very) hard to come with an implementation catering to all needs. Perhap

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido, do you have an opinion on whether to have str.title() handle embedded apostrophes, "you're" --> "You're" instead of "You'Re"? IMO, the problem comes-up often enough that people are looking for workarounds (i.e. string.capwords() was a failed hack crea

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Ezio Melotti
Ezio Melotti added the comment: > I think Ezio found some other information somewhere. While I was fixing #7000 I found that the tests for capwords had been removed in r54854 but since the function was already there I added them back in r75072. The commit message of r54854 says "Also remove all

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > While > the change would seem to always be helpful in an English context, in > French the proper title casing of "l'argent" is "L'Argent". Well I think even in English it doesn't work right. For example someone named O'Brien would end up as "O'brien". My poi

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, we might want to mention in the documentation that the title() method only gives imperfect results when trying to titlecase natural language. So that people don't get fooled thinking things are simple :-) What do you think? -- _

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Guido van Rossum
Guido van Rossum added the comment: Raymond, please refrain from emotional terms like "bug factory". I have nothing to say about whether string.capwords() should be removed, but I want to note that it does a split on whitespace and then rejoins using a single space, so that string.capwords('A

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Guido van Rossum
Guido van Rossum added the comment: A doc fix sounds like a great idea. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: gvanrossum -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: I will add a comment to the docs. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ _

[issue6790] httplib and array do not play together well

2009-09-28 Thread Kirk McDonald
Kirk McDonald added the comment: I have updated the patch with a unittest for httplib.HTTPConnection.send. -- Added file: http://bugs.python.org/file14991/issue6790-python2.6.diff ___ Python tracker ___

[issue6790] httplib and array do not play together well

2009-09-28 Thread Kirk McDonald
Changes by Kirk McDonald : Removed file: http://bugs.python.org/file14978/issue6790-python2.6.diff ___ Python tracker ___ ___ Python-bugs-list

[issue6729] Add support for ssize_t

2009-09-28 Thread Nikolaus Rath
Nikolaus Rath added the comment: Ok, apparently the lines that define c_size_t are these: if sizeof(c_uint) == sizeof(c_void_p): c_size_t = c_uint elif sizeof(c_ulong) == sizeof(c_void_p): c_size_t = c_ulong elif sizeof(c_ulonglong) == sizeof(c_void_p): c_size_t = c_ulonglong (side

[issue6790] httplib and array do not play together well

2009-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why do you need to give a non-empty body to the FakeSocket? Other than that, looks fine. -- ___ Python tracker ___ ___

[issue6790] httplib and array do not play together well

2009-09-28 Thread Kirk McDonald
Kirk McDonald added the comment: Oh, I suppose I don't. I had simply copy and pasted those four lines from the previous method. That line could easily be removed. -- ___ Python tracker

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-28 Thread Thomas W. Barr
Changes by Thomas W. Barr : -- nosy: +twb ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue6790] httplib and array do not play together well

2009-09-28 Thread Kirk McDonald
Kirk McDonald added the comment: Remove unused 'body'. -- Added file: http://bugs.python.org/file14992/issue6790-python2.6.diff ___ Python tracker ___ ___

[issue6790] httplib and array do not play together well

2009-09-28 Thread Kirk McDonald
Changes by Kirk McDonald : Removed file: http://bugs.python.org/file14991/issue6790-python2.6.diff ___ Python tracker ___ ___ Python-bugs-list

[issue7008] str.title() misbehaves with apostrophes

2009-09-28 Thread Neal Norwitz
Neal Norwitz added the comment: I don't recall anything specifically wrt removing capwords. Most likely it was something that struck me as not widely used or really necessary--a good candidate to be removed. Applications could then write the fucntion however they chose which would avoid the pr

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-09-28 Thread Thomas W. Barr
Thomas W. Barr added the comment: Do people have an opinion as to whether this should be fixed with a docfix, fixed as default (with option to allow path traversal) or fixed as a non-default option? The same issue exists in ZipFile.extract, but in that case you're presumably passing a path yo

[issue6990] threading.local subclasses don't cleanup their state and it gets recycled

2009-09-28 Thread Philip Jenvey
Philip Jenvey added the comment: applied in r75123-r75127, including a backport to release25-maint -- ___ Python tracker ___ ___ Pytho

[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-09-28 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- nosy: +stevenjd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7015] Getting call trace while executing "modules spam" at help prompt

2009-09-28 Thread Rishikesh K Rajak
New submission from Rishikesh K Rajak : [root@ ~]# python Python 2.6.2 (r262:71600, Aug 21 2009, 12:23:57) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> help() Welcome to Python 2.6! This is the online help utility.

[issue7014] Logging incompatible with IronPython

2009-09-28 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- nosy: +jaraco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue7016] .pyc files are set executable if the .py file is too

2009-09-28 Thread Steven D'Aprano
New submission from Steven D'Aprano : In Python 2.6, .pyc files inherit the executable bit from their .py file. This can lead to strangeness: $ echo pass > test.py $ chmod u+x test.py $ python2.6 -c "import test" $ ls -l test.pyc -rwxrw-r-- 1 steve steve 94 2009-09-29 16:54 test.pyc $ ./test.py