[issue12211] math.copysign must keep object type.

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: As with all the math docs, 'x' refers to the value, not the object with the value. However, "Return abs(x) with the sign of y" is, to me, clearer and more accurate. Both doc string and doc chapter should get any modification. -- nosy: +terry.reedy __

[issue11457] Expose nanosecond precision from system calls

2011-06-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jun 3, 2011 at 3:57 PM, Martin v. Löwis wrote: .. > I suggest that rather than using composite time stamps, decimal.Decimal is > used to represent high-precision time in Python. I support this idea in theory, but as long as decimal is implemente

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: The intermingling of character data and markup is far from irrelevant: that's exactly what str.format() does! I don't see how it can be irrelevant to a discussion of how the string is parsed. Note that there are no restrictions, in general, on what's in a form

[issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')

2011-06-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8572bf1b56ec by Victor Stinner in branch '3.2': Issue #12016: Add test_errorhandle() to TestBase_Mapping of http://hg.python.org/cpython/rev/8572bf1b56ec New changeset c3dc94d53ef8 by Victor Stinner in branch 'default': (Merge 3.2) Issue #12016: Ad

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: For c stdio files, intermixed reads and writes require a file positioning operation. This is a nuisance and source of program bugs. I do not see any such limitation documented for our io module. So for both reasons, it will be nice to not have the limitation

[issue12006] strptime should implement %V or %u directive from libc

2011-06-03 Thread Ashley Anderson
Ashley Anderson added the comment: Attaching a patch for the documentation just in time for the weekend! -- Added file: http://bugs.python.org/file22240/12006_doc.patch ___ Python tracker _

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-06-03 Thread STINNER Victor
STINNER Victor added the comment: > If I understand, the essence of the patch is to do > the file positioning automatically internally when needed. My patch is just a proposition to fix the issue. I wrote "I suppose that we can do better": self.seek(self.tell()) is more a workaround than a rea

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue11457] Expose nanosecond precision from system calls

2011-06-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: Am 03.06.2011 22:11, schrieb Arfrever Frehtes Taifersar Arahesis: > > Arfrever Frehtes Taifersar Arahesis added the > comment: > > os.utimensat() and os.futimens() already exist since Python 3.3 and require > 2-tuples (or None) as second and third argument

[issue11457] Expose nanosecond precision from system calls

2011-06-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I support this idea in theory, but as long as decimal is implemented > in Python, os module should probably expose a low level (tuple-based?) > interface and a higher level module would provide Decimal-based > high-precision time. Can you explain why you thi

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Ben Wolfson
Ben Wolfson added the comment: str.format doesn't intermingle character data and markup. The PEP is quite clear about the terms in this case, at least: the *argument* to str.format consists of character data (passed through unchanged) and markup (processed). That's what it means to say that "

[issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')

2011-06-03 Thread STINNER Victor
STINNER Victor added the comment: cjk_decode.patch: - patch *all* CJK decoders to replace only the first byte of an invalid byte sequence (by U+FFFD). Example from the issue title: b'\xff\n'.decode('gb2312', 'replace') gives now '�\n' instead of just '�' - add at least one unit test for *eac

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: >From the PEP: "Format strings consist of intermingled character data and >markup." -- ___ Python tracker ___ _

[issue12219] tkinter.filedialog.askopenfilename XT dialog on Windows 7

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have no idea what 'XT' in the title means. The only possible relevant change I *know* of is that 3.2 on Windows comes with a later version tk/tcl 8.5 than 3.1. If you find the exact version numbers, you could query/report on the tk/tcl forums, also at Activ

[issue12240] Allow multiple setup_hooks

2011-06-03 Thread Erik Bray
Erik Bray added the comment: Great! I'll add a patch shortly. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue11457] Expose nanosecond precision from system calls

2011-06-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jun 3, 2011 at 6:13 PM, Martin v. Löwis wrote: .. >> I support this idea in theory, but as long as decimal is implemented >> in Python, os module should probably expose a low level (tuple-based?) >> interface and a higher level module would provid

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: """ >>> d = {"{0}": "spam"} >>> # a matched pair of braces. What's inside is considered markup. ... >>> "{0}".format(d) "{'{0}': 'spam'}" >>> # a matched pair of braces. Inside is a matched pair of braces, and what's >>> inside of that is not considered markup.

[issue11457] Expose nanosecond precision from system calls

2011-06-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: > One reason is the desire to avoid loading Python module from a > C-module. This desire is indeed no guidance for Python development; the opposite is the case. The only exception may be bootstrapping issues, which I claim are irrelevant in this case. ---

[issue12220] minidom xmlns not handling spaces in xmlns attribute value field

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: SyntaxErrors refer to Python syntax errors; they are raised during parsing of *Python* code. An error in the value given to a Python sensibly raises a ValueError unless a module does something more specific. >From the xml.dom doc "DOM Level 2 recommendation d

[issue12226] use secured channel for uploading packages to pypi

2011-06-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I can fill separate bug for packaging, server certificate validation > and support for non-SSL builds of python (for which there is > workaround with upload -r option that I've just discovered), > but it is an additional delay and the only reason I invested

[issue12224] problem with siginterrupt

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor, I understand your response as saying that there is no bug, which would suggest closing this. Correct? If not, what is the requested action? -- nosy: +terry.reedy ___ Python tracker

[issue12232] embedded python import cmath

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Hanging is different from crashing. 2.6 and 3.1 (soon) are only open for security issues. Perhaps your system is missing something needed for the import. If you want this to stay open, retest with 2.7 or 3.2 and give much more information: your system/OS, C/C+

[issue12237] Document how to open non-default webbrowser

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: The intended method of using a non-default browser is well documented and the OP did exactly the right thing. However, even if Opera is present, the 'right thing' does not work because nothing but iexplorer gets registered (and that not completely usefully),

[issue10799] Improve webbrowser (.open) doc and behavior

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Upon further experimentation, I realize that I can only open in Firefox because I have it set as my default browser. It would otherwise be inaccessible because it is not in the _browser registry. It also appears that I cannot intentionally use Internet Explor

[issue6490] os.popen documentation is probably wrong

2011-06-03 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: os.popen documentation in 2.6 is probably wrong -> os.popen documentation is probably wrong ___ Python tracker ___

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Ben Wolfson
Ben Wolfson added the comment: """ >From the PEP: "Format strings consist of intermingled character data and >markup." """ I know. Here is an example of a format string: "hello, {0}" Here is the character data from that format string: "hello, " Here is the markup: "{0}" This follows *dir

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Perhaps the stdio requirement was based on an underlying OS (*nix?) requirement, which io has to fulfill even if it does not use stdio. Stdio was, I presume, optimized for speed. In the relatively rare case of mixed read/write, it *should* put the burden on

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: We're going to have to agree to disagree. I believe that "{0[}]}" is the markup "{0[}" followed by the character data "]}". -- ___ Python tracker _

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, I wondered about that when I saw Barry was using old-style classes in his example. Perhaps the answer then is to add a PyInstance_Check() to skip invocation of __dir__() completely for old-style classes? -- ___ P

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/3 Nick Coghlan : > > Nick Coghlan added the comment: > > Ah, I wondered about that when I saw Barry was using old-style classes in his > example. Perhaps the answer then is to add a PyInstance_Check() to skip > invocation of __dir__() completely for

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread R. David Murray
R. David Murray added the comment: I would guess that if you instead skipped __dir__ completely for old style classes it would expose a different bug in this or some other package. -- ___ Python tracker _

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Nick Coghlan
Nick Coghlan added the comment: It would be broken in the same way that it was broken in 2.7.1 though. That can be a plus when it comes to maintenance releases. OTOH, this does turn a silent failure (__dir__() ignored on old-style classes) into a noisy failure (must return a list). If you ma

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: I believe the type check was gratuitous to begin with and should be removed. There's no reason the result has to be a list. -- ___ Python tracker

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/6/3 Raymond Hettinger : > > Raymond Hettinger added the comment: > > I believe the type check was gratuitous to begin with and should be removed.   > There's no reason the result has to be a list. The reason for it is that the sort() method is called o

[issue10027] os.lstat/os.stat don't set st_nlink on Windows

2011-06-03 Thread Brian Curtin
Brian Curtin added the comment: This code has changed a lot since originally being committed, so I'll handle backporting in #12084 which has the latest changes. -- status: open -> closed ___ Python tracker __

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can sorted() be used instead? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue12226] use secured channel for uploading packages to pypi

2011-06-03 Thread anatoly techtonik
anatoly techtonik added the comment: I believe that's a very personal judgement. For me exposing core Python development accounts is a fundamental flaw. The more accounts are collected, the more real are attacks through PyPI package injection. -- _

[issue12248] __dir__ semantics changed in Python 2.7.2

2011-06-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: or something like: result = obj.__dir__() if not isinstance(result, list): result = list(result) result.sort() return result -- ___ Python tracker _

[issue12211] math.copysign must keep object type.

2011-06-03 Thread umedoblock
umedoblock added the comment: abs() behavior show below. >>> type(abs(-1)) >>> type(abs(-1.0)) we should fix this problem if write "Return abs(x) with the sign of y" I'd like to try this problem if need fix. I'm going to attach the patch. -- ___

<    1   2