[issue23591] Add Flags and IntFlags

2016-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think this is a problem. For now os.O_WRONLY is os.O_WRONLY, but os.O_WRONLY|os.O_CREAT|os.O_TRUNC is not os.O_WRONLY|os.O_CREAT|os.O_TRUNC. There is an exponential number of combinations (actually infinite number if count not named bits) and you

[issue1602] windows console doesn't print or input Unicode

2016-08-14 Thread Steve Dower
Steve Dower added the comment: For more info here, cgi.parse has code like this: def parse(fp, ...): if fp is None: fp = sys.stdin encoding = getattr(fp, 'encoding', 'latin-1') # later on... return urllib.parse.parse_qs(a_str, encoding=encoding, ...) As an easy hack,

[issue27734] Memory leaks at Python35-32

2016-08-14 Thread Филипп Пономарев
Филипп Пономарев added the comment: Hmm. Correct me if I'm not right. You agree that you have leaks, but you will not do anything with them until they start repeat in a loop? So I've updated problem. Thnx about nosy, idk. What I want is to use Python API without leaks in my programm. The

[issue1602] windows console doesn't print or input Unicode

2016-08-14 Thread Steve Dower
Steve Dower added the comment: I'm fairly happy with where my current patch is at (not posted right now - too many different machines involved) and only one test is failing - test_cgi. The problem seems to be that urllib.parse.unquote() takes an encoding parameter to decode utf-8 encoded

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-14 Thread Xiang Zhang
Xiang Zhang added the comment: I write a patch for this trivial fix along with a corresponding test. Hope it helps. :) -- keywords: +patch Added file: http://bugs.python.org/file44112/issue27414.patch ___ Python tracker

[issue10716] Modernize pydoc to use better HTML and separate CSS

2016-08-14 Thread Peter Lovett
Changes by Peter Lovett : -- nosy: +PeterLovett ___ Python tracker ___ ___

[issue12345] Add math.tau

2016-08-14 Thread Lisa Roach
Lisa Roach added the comment: I have added some more detail to the Tau documentation, including that Tau is 2 * pi, as well as some links to Tau Day and Vi Hart's video. That should give Python users enough to get started forming their own opinions on tau vs pi :) -- Added file:

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Tim Peters
Tim Peters added the comment: A meta-note: one iteration of Newton's method generally, roughly speaking, doubles the number of "good bits" in the initial approximation. For floating n'th root, it would an astonishingly bad libm pow() that didn't get more than half the leading bits in pow(x,

[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree with the value of a Reproducibility guarantee. (The new section appears to have been added -- by Raymond -- in 3.2.) For instance, people posting play-through videos using reproducible random maps typically post the 'seed' and I have seen memorable

[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Emanuel Barry
Emanuel Barry added the comment: This is irrelevant to this issue. -- ___ Python tracker ___ ___

[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Decorater
Decorater added the comment: 3.6 would make thread exceptions not print out to console or at least be configured to make them logged with the logging module in threading.py for 3.6? because I would like it to use the logger. Oh and how can I get the logs from the logging module from 2

[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Emanuel Barry
Emanuel Barry added the comment: Pretty sure this falls under the "New features" category, and as such can't be applied on 3.5. -- ___ Python tracker

[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Decorater
Decorater added the comment: Be nice if 3.5 had this as well. As it can be very annoying at times. (Not to mention thread exceptions just cant be handled by anyone's code unless you modify threading.py -- nosy: +Decorater ___ Python tracker

[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Emanuel Barry
Emanuel Barry added the comment: Awesome, thanks! The "What's new" entry is a bit confusing though; to a casual observer it might look like the `traceback` module was updated but the normal behaviour wasn't changed. -- ___ Python tracker

[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks for the patch, Emanuel! The merged patch uses your implementation and the test cases you designed, with the following changes: - I refactored the test cases so the traceback module gets tested on all implementations, with only the CPython builtin

[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5a2ff215e841 by Nick Coghlan in branch 'default': Issue #26823: Abbreviate recursive tracebacks https://hg.python.org/cpython/rev/5a2ff215e841 -- nosy: +python-dev ___ Python tracker

[issue27573] code.interact() should print an exit message

2016-08-14 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue6422] timeit called from within Python should allow autoranging

2016-08-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: Still to do (coming soon): - make the 0.2s time configurable; - have `timeit` and `repeat` methods (and functions) fall back on `autorange` if the number is set to 0 or None. -- assignee: -> steven.daprano ___

[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Nick Coghlan
Nick Coghlan added the comment: I'm at the PyCon AU sprints today, and will take a look at getting this merged. -- assignee: ebarry -> ncoghlan stage: patch review -> commit review ___ Python tracker

[issue27723] Document typing.Text and typing.AnyStr

2016-08-14 Thread Guido van Rossum
Guido van Rossum added the comment: Also see my comments in rietveld. --Guido (mobile) -- ___ Python tracker ___

[issue23591] Add Flags and IntFlags

2016-08-14 Thread Ethan Furman
Ethan Furman added the comment: Currently, the patch has the main values pre-created (so identity works as expected), and combinations are created on the fly (like normal class instances) -- in which case identity cannot be relied upon. Once I have the basic work done, I'll go back and add a

[issue27350] Compact and ordered dict

2016-08-14 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file44110/compact-dict.patch ___ Python tracker ___

[issue27173] Modern Unix key bindings for IDLE

2016-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes. If I decide to do a backport to either 3.5 or 2.7, I can reopen or just commit. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: -Python 2.7, Python 3.5 ___ Python

[issue27755] Retire DynOptionMenu with a ttk Combobox

2016-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Justin, we are using ttk in 3.6, so the idea is feasible if it works. I do not remember a specific proposal to use ttk Combobox, as it could not be done before now. Mark, any comments? -- nosy: +markroseman ___

[issue27750] Idle editor crashes when input size more than 250 lines given

2016-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please describe more exactly the pasting. Also try the same when you run the same code in the standard python interpreter. Same or different behavior? Also, what system? Pasting varies a bit between OSes. Is '250' needed'? --

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-08-14 Thread Emanuel Barry
Emanuel Barry added the comment: Rebased patch so that it applies cleanly again. -- Added file: http://bugs.python.org/file44109/type_one_argument_5.patch ___ Python tracker

[issue27364] Deprecate invalid unicode escape sequences

2016-08-14 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file44108/deprecate_invalid_escapes_both_2.patch ___ Python tracker ___

[issue27364] Deprecate invalid unicode escape sequences

2016-08-14 Thread Emanuel Barry
Emanuel Barry added the comment: Here's a new pair of patches for this. There are some small tweaks to the tests, and I properly fixed all instances of invalid escapes (I also made some strings into raw-strings at some places where it's not needed, solely for consistency with surrounding

[issue27723] Document typing.Text and typing.AnyStr

2016-08-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Thank you for the patch, Michael! I could add a comment that probably it is better to mention the definition of AnyStr = TypeVar('AnyStr', str, bytes) at beginning and only then go with examples. -- nosy: +levkivskyi

[issue25387] sound_msgbeep doesn't check the return value of MessageBeep

2016-08-14 Thread Zachary Ware
Zachary Ware added the comment: Here's a patch. This has the possibility of breaking existing code, but the fix is simple (just catch RuntimeError) and is probably more in line with what's expected. -- keywords: +patch stage: needs patch -> patch review Added file:

[issue23591] Add Flags and IntFlags

2016-08-14 Thread Vedran Čačić
Vedran Čačić added the comment: I tried to implement this once. The biggest problem I encountered is inconsistency with Enum identity: Enum's main idea is that its objects are pre-created and __new__ just return one of them, so equality is simply identity. If you try to do this with flags,

[issue27764] [Patch] Complete bits necessary for making fcntl's file locking optional

2016-08-14 Thread Ed Schouten
New submission from Ed Schouten: Python's fcntl module already provides some support for making support for file locking optional. For example, constants like F_SETFL are only defined if present. Unfortunately, the accompanying functions 'flock()' and 'lockf()' are present unconditionally.

[issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings

2016-08-14 Thread Zachary Ware
Zachary Ware added the comment: Here's an updated patch. I'm a little wary of applying this on 3.5, because it is backward-incompatible: a str is no longer accepted with SND_MEMORY. On the other hand, it's pretty much a fluke if that works at all currently. -- assignee: ->

[issue27763] Add complex case to test_builtin abs()

2016-08-14 Thread Evelyn Mitchell
Evelyn Mitchell added the comment: test_cmath includes abs() of zeros, infinities, and real or imaginary part NaN, but does not include a test for the magnitude conversion, which would be triggered by something like >>> abs(complex(2.1,3.5)) 4.08166632639171 >>> abs(complex('2.1+3.5j'))

[issue27763] Add complex case to test_builtin abs()

2016-08-14 Thread Ned Deily
Ned Deily added the comment: I think tests for abs() using complex numbers are already in test_cmath. How do they look? -- nosy: +ned.deily ___ Python tracker

[issue27763] Add complex case to test_builtin abs()

2016-08-14 Thread Evelyn Mitchell
New submission from Evelyn Mitchell: The description of abs() says "If the argument is a complex number, its magnitude is returned." but test_builtin doesn't include any complex number test cases. -- components: Library (Lib) messages: 272688 nosy: Evelyn Mitchell priority: low

[issue27573] code.interact() should print an exit message

2016-08-14 Thread Ned Deily
Ned Deily added the comment: Steven, don't forget to update Misc/NEWS and to close this issue on the bug tracker. Thanks! -- nosy: +ned.deily ___ Python tracker

[issue27173] Modern Unix key bindings for IDLE

2016-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can this issue be closed? -- ___ Python tracker ___ ___ Python-bugs-list

[issue27599] Buffer overrun in binascii

2016-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that fixes buffer overrun in binascii.b2a_qp() and binascii.a2b_qp() and adds additional tests. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file44103/binascii_qp_overrun.patch

[issue27573] code.interact() should print an exit message

2016-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9410dc027505 by Steven D'Aprano in branch 'default': Issue27573 code.interact prints a message when exiting. https://hg.python.org/cpython/rev/9410dc027505 -- nosy: +python-dev ___ Python tracker

[issue27713] Spurious "platform dependent libraries" warnings when running make

2016-08-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue17620] Python interactive console doesn't use sys.stdin for input

2016-08-14 Thread Adam Bartoš
Adam Bartoš added the comment: > Unfortunately, it looks like detecting when a readline hook has been added is > going to involve significant changes to the tokenizer, which I really don't > want to do. We don't need to detect the presence of readline hook, it may be so that there is always

[issue12345] Add math.tau

2016-08-14 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: >From http://tauday.com/ > No, really, pi is wrong... For me it's a sign that pi is (currently) more common than tau. One purpose of the documentation is helping newcomers understand what Python's built-in objects mean. "tau = 2 * pi" is better than "pi = tau

[issue17620] Python interactive console doesn't use sys.stdin for input

2016-08-14 Thread Steve Dower
Steve Dower added the comment: I'm working on this as part of my fix for issue1602. Not yet sure how this will come out - compatibility with GNU readline seems to be the biggest issue, as if we want to keep that then we can't allow embedded '\0' in the encoded text (i.e. UTF-16 cannot be

[issue27573] code.interact() should print an exit message

2016-08-14 Thread Paul Moore
Paul Moore added the comment: LGTM. Maybe worth a documentation note - "Changed in 3.6 - added an exit message"? But I'm OK with it as is if you don't think that's worth it. -- nosy: +paul.moore ___ Python tracker

[issue12345] Add math.tau

2016-08-14 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: -ebarry ___ Python tracker ___ ___ Python-bugs-list

[issue12345] Add math.tau

2016-08-14 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: -zach.ware ___ Python tracker ___ ___

[issue12345] Add math.tau

2016-08-14 Thread STINNER Victor
STINNER Victor added the comment: Chi Hsuan Yen added the comment: > The documentation of tau should mention it's equal to 2 * pi. According to this discussion, tau is very important. Maybe it's better to document pi as tau/2? :-) -- ___ Python

[issue27573] code.interact() should print an exit message

2016-08-14 Thread Brett Cannon
Brett Cannon added the comment: LGTM -- assignee: -> steven.daprano nosy: +brett.cannon ___ Python tracker ___

[issue26027] Support Path objects in the posix module

2016-08-14 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the review! I'll probably update the patch next week based on your feedback (which I agree with). As for error messages and tests, they exist in my patches on issues dependent on this one (e.g. the tests included in issues #27524 and #27182 which

[issue6422] timeit called from within Python should allow autoranging

2016-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 424eb46f7f3a by Steven D'Aprano in branch 'default': Issue6422 add autorange method to timeit.Timer https://hg.python.org/cpython/rev/424eb46f7f3a -- nosy: +python-dev ___ Python tracker

[issue1602] windows console doesn't print or input Unicode

2016-08-14 Thread Steve Dower
Steve Dower added the comment: The current patch actually only affects the raw IO, so the concern would be one of the wrappers trying to work in bytes when it should be dealing in characters. This should be no different from reading a UTF16 file, so either both work or both are broken. The

[issue23591] Add Flags and IntFlags

2016-08-14 Thread Ethan Furman
Ethan Furman added the comment: IntFlags will be in before feature freeze. -- ___ Python tracker ___ ___

[issue27755] Retire DynOptionMenu with a ttk Combobox

2016-08-14 Thread SilentGhost
Changes by SilentGhost : -- stage: -> resolved ___ Python tracker ___ ___

[issue27755] Retire DynOptionMenu with a ttk Combobox

2016-08-14 Thread Justin Foo
Justin Foo added the comment: Ah, I've noticed the folly of my ways. This sort of stuff is already being managed with patches filed under various other issues. It just wasn't obvious to me as I wasn't seeing many new improvements in the default branch or much communication on IDLE-dev.

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Mark Dickinson
Mark Dickinson added the comment: > I thought IEEE 754 was supposed to put an end to these sorts of > cross-platform differences. Maybe one day. (Though I'm not holding my breath.) IEEE 754-2008 does indeed *recommend* (but not actually *require*) correctly rounded implementations of all the

[issue12345] Add math.tau

2016-08-14 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: The documentation of tau should mention it's equal to 2 * pi. -- nosy: +Chi Hsuan Yen ___ Python tracker ___

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, Aug 14, 2016 at 12:05:37PM +, Mark Dickinson wrote: > But I don't think there's a real problem here so long as you don't > have an expectation of getting super-accurate (e.g., correctly rounded > or faithfully rounded) results; testing that

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-14 Thread Stefan Krah
Stefan Krah added the comment: Sorry, I missed issue27587_pystate_addmodule.diff: no new issue in the updated analysis. -- ___ Python tracker ___

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Mark Dickinson
Mark Dickinson added the comment: > What else can I do? Since I'm only dealing with integer powers, should I > try using my own ipow(y, n) for testing? I'd expect that a square-and-multiply-style pow would be less accurate than math.pow, in general, simply because of the number of

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, Aug 14, 2016 at 10:52:42AM +, Mark Dickinson wrote: > Same deal here: those aren't the actual errors; they're approximations > to the errors, since the computations of the epsilons depends on (a) > the usual floating-point rounding, and more

[issue27587] Issues, reported by PVS-Studio static analyzer

2016-08-14 Thread Stefan Krah
Stefan Krah added the comment: Pavel did another analysis with the external packages removed. Thanks for this! http://www.viva64.com/en/b/0418/ The new analysis found another glitch. Also see my message to python-committers. -- nosy: +skrah ___

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Mark Dickinson
Mark Dickinson added the comment: > - finally, compare the epsilons abs(y**n - x) for the initial guess > and improved version, returning whichever gives the smaller epsilon. > > So I'm confident that nth_root() should never be worse than pow(). Same deal here: those aren't the actual

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Mark Dickinson
Mark Dickinson added the comment: > - if y**n == x, return y; Here's the problem, though: you're using the libm pow again in this test, so the result of this being True doesn't give tight information about how close y is to the nth root of x (and the test result may well differ from platform

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, Aug 14, 2016 at 08:29:39AM +, Mark Dickinson wrote: > Steven: can you explain why you think your code *should* be giving > exact results for exact powers? Do you have an error analysis that > says that should be the case? No error analysis, only

[issue1602] windows console doesn't print or input Unicode

2016-08-14 Thread Adam Bartoš
Adam Bartoš added the comment: There is also the following consequence of (not) having the standard filenos: input() either considers the streams interactive or not. To consider them interactive, standard filenos and isatty are needed on sys.stdin and sys.stdout. If the streams are considered

[issue27760] integer overflow in binascii.b2a_qp

2016-08-14 Thread tehybel
tehybel added the comment: The patch seems correct to me. -- nosy: +tehybel ___ Python tracker ___ ___

[issue27758] integer overflow in the _csv module's join_append_data function

2016-08-14 Thread tehybel
tehybel added the comment: Thanks for fixing this. I looked at the patch and it seems correct. -- nosy: +tehybel ___ Python tracker ___

[issue27181] Add geometric mean to `statistics` module

2016-08-14 Thread Mark Dickinson
Mark Dickinson added the comment: A failing case: >>> statistics.geometric_mean([0.7 for _ in range(5000)]) Traceback (most recent call last): File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 362, in float_nroot isinfinity = math.isinf(x) OverflowError: int too large

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Mark Dickinson
Mark Dickinson added the comment: Steven: can you explain why you think your code *should* be giving exact results for exact powers? Do you have an error analysis that says that should be the case? One issue here is that libm pow functions vary hugely in quality, so any algorithm that

[issue27759] selectors incorrectly retain invalid file descriptors

2016-08-14 Thread STINNER Victor
STINNER Victor added the comment: Regenerated patch to get a review button. -- Added file: http://bugs.python.org/file44102/selectors.patch ___ Python tracker

[issue27574] Faster parsing keyword arguments

2016-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset e527715bd0b3 by Serhiy Storchaka in branch 'default': Issue #27574: Decreased an overhead of parsing keyword arguments in functions https://hg.python.org/cpython/rev/e527715bd0b3 -- nosy: +python-dev ___

[issue3244] multipart/form-data encoding

2016-08-14 Thread Martin Panter
Martin Panter added the comment: I think encoding the user’s IP address into the boundary is a bad idea. Forest’s version uses the existing “email” package, which calls random.randrange(sys.maxsize) and searches through the data for conflicts. I haven’t really researched this, but I suspect

[issue27739] add math.sign/signum

2016-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks David. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27749] python 3.5.2 maybe crash

2016-08-14 Thread Decorater
Decorater added the comment: I use code that does multithreading to from a library that uses ffmpeg for exact it makes daemon threads so it could be from that. -- ___ Python tracker

[issue15012] test issue

2016-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Replying from new email address. -- ___ Python tracker ___ ___

[issue22395] test_pathlib error for complex symlinks on Windows

2016-08-14 Thread SilentGhost
Changes by SilentGhost : -- resolution: -> out of date stage: -> resolved ___ Python tracker ___

[issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable

2016-08-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue26800] Don't accept bytearray as filenames part 2

2016-08-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue23591] Add Flags and IntFlags

2016-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Due to dynamic typing EnumSet actually is not needed in Python. You can use sets, tuples or lists for combining enums in new API. IntFlags is needed for old API that already uses ints. I think introducing non-int Flags is overengineering, can't imagine

[issue26027] Support Path objects in the posix module

2016-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added comments on Rietveld. Needed tests for supporting path-like objects. And it would be nice to have few tests for error messages. -- assignee: serhiy.storchaka -> brett.cannon stage: commit review -> test needed

[issue27761] Private _nth_root function loses accuracy

2016-08-14 Thread Martin Panter
Martin Panter added the comment: The problem is more widespread than just Power PC. The same failures (+/-29) are also seen on the three s390x buildbots. There are multiple failures of testExactPowers(Negatives) on