[issue24827] round(1.65, 1) return 1.6 with decimal

2015-08-08 Thread Zachary Ware
Zachary Ware added the comment: I think the key point that you're missing (and which I could have made clearer in my previous message) is that `Decimal(2.675) != Decimal('2.675')`. In the first case, a Decimal instance is created from a float, and 2.675 cannot be represented perfectly in

[issue24827] round(1.65, 1) return 1.6 with decimal

2015-08-08 Thread umedoblock
umedoblock added the comment: last compared results are different. should be bug or at least think that how to get a same result about D(round(df2, 2)) == D(round(ds2, 2)) from decimal import Decimal as D f1 = 1.65 s1 = str(f1) df1 = D(f1) ds1 = D(s1) f2 = 2.675 s2 = str(f2) df2 = D(f2)

[issue24827] round(1.65, 1) return 1.6 with decimal

2015-08-08 Thread umedoblock
umedoblock added the comment: In this case. round(1.65, 1) == 1.7 False round(2.675, 2) == 2.68 False I never say anything. Because I understand what you said. But I use the decimal module. please pay attention to use decimal module. -- ___ Python

[issue17570] Improve devguide Windows instructions

2015-08-08 Thread Carol Willing
Carol Willing added the comment: Steve and Zach, If you are happy with the changes, I have no objection to committing and closing this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17570

[issue24827] round(1.65, 1) return 1.6 with decimal

2015-08-08 Thread umedoblock
umedoblock added the comment: I have a headache. because python reports many error after I patched below patches. --- Lib/test/test_decimal.py.orig 2015-08-08 17:41:01.986316738 +0900 +++ Lib/test/test_decimal.py2015-08-08 17:41:05.470316878 +0900 @@ -1935,6 +1935,7 @@

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: This is a legitimate problem and I'd definitely like it fixed. However, the angle brackets and the quote marks are ugly: decode(obj, encoding='sys.getdefaultencoding()', errors='strict') Attached is a tweaked version of the patch that sidesteps the

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2015-08-08 Thread Pierre Quentel
Pierre Quentel added the comment: Victor, you can apply the patch and close the issue. Le 7 août 2015 17:12, Peter Landry rep...@bugs.python.org a écrit : Peter Landry added the comment: A new patch that simply removes Content-Length from part headers when present. -- Added

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How with more complex expressions, like sys.getdefaultencoding() or 'utf-8'. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24824 ___

[issue24827] round(1.65, 1) return 1.6 with decimal

2015-08-08 Thread Merlijn van Deen
Merlijn van Deen added the comment: As Zachary explained, the behavior is correct. There are three issues in play here. 1) The rounding method. With the ROUND_HALF_EVEN rounding mode, .5 is rounded to the nearest *even* number, so 1.65 is rounded to 1.6, while 1.75 is rounded to 1.8. 2)

[issue15944] memoryviews and ctypes

2015-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset e33f2b8b937f by Stefan Krah in branch '3.5': Issue #15944: memoryview: Allow arbitrary formats when casting to bytes. https://hg.python.org/cpython/rev/e33f2b8b937f New changeset c7c4b8411037 by Stefan Krah in branch 'default': Merge #15944.

[issue15944] memoryviews and ctypes

2015-08-08 Thread Stefan Krah
Stefan Krah added the comment: Done. Thanks for the patch. -- components: +Interpreter Core resolution: - fixed stage: patch review - resolved status: open - closed versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue23756] Tighten definition of bytes-like objects

2015-08-08 Thread Stefan Krah
Stefan Krah added the comment: I would commit this, except that I'm not too happy with the use of the term bytes-like in general. Yesterday I mistyped this: import ctypes x = ctypes.c_double m = memoryview(x) Traceback (most recent call last): File stdin, line 1, in module TypeError:

[issue23756] Tighten definition of bytes-like objects

2015-08-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: The thing is, most users don't know what the buffer protocol is (even Numpy users, probably), while bytes-like at least will make some sense - even though I agree it's an imperfect approximation. -- ___ Python

[issue23756] Tighten definition of bytes-like objects

2015-08-08 Thread Stefan Krah
Stefan Krah added the comment: For end users it's probably adequate. But several committers find the term confusing (msg236283, msg188484). :) Anyway, I'm going to commit this since it adds clarity. -- ___ Python tracker rep...@bugs.python.org

[issue23756] Tighten definition of bytes-like objects

2015-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset d1ef54751412 by Stefan Krah in branch '3.5': Issue #23756: Clarify the terms contiguous and bytes-like object. https://hg.python.org/cpython/rev/d1ef54751412 New changeset c59b2c4f4cac by Stefan Krah in branch 'default': Merge #23756.

[issue23756] Tighten definition of bytes-like objects

2015-08-08 Thread Stefan Krah
Stefan Krah added the comment: Martin, thanks for the patch! -- resolution: - fixed stage: patch review - resolved status: open - closed versions: +Python 3.6 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23756

[issue24827] round(1.65, 1) return 1.6 with decimal

2015-08-08 Thread umedoblock
umedoblock added the comment: excuse me. I understand ROUND_HALF_EVEN meaning. I think that __round__() function work ROUND_HALF_UP. so sorry. I don't have exactly knowledge about ROUND_HALF_EVEN. I misunderstand about ROUND_HALF_EVEN. I have thought ROUND_HALF_EVEN means ROUND_HALF_UP. SO

[issue24828] Segfault when using store-context AST node in a load context

2015-08-08 Thread Xavier Morel
New submission from Xavier Morel: It looks to be fixed in 3.3 and up, but in Python 2.7 import ast m = ast.Module(body=[ ast.Expr(value=ast.Name(id='foo', ctx=ast.Store())) ]) ast.fix_missing_locations(m) code = compile(m, '', mode='exec') eval(code) will

[issue12854] PyOS_Readline usage in tokenizer ignores sys.stdin/sys.stdout

2015-08-08 Thread Adam Bartoš
Adam Bartoš added the comment: http://bugs.python.org/issue17620 is a duplicate, but with more discussion. -- nosy: +Drekin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12854 ___

[issue12854] PyOS_Readline usage in tokenizer ignores sys.stdin/sys.stdout

2015-08-08 Thread eryksun
Changes by eryksun eryk...@gmail.com: -- resolution: - duplicate status: open - closed superseder: - Python interactive console doesn't use sys.stdin for input ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12854

[issue24829] Use interactive input even if stdout is redirected

2015-08-08 Thread Adam Bartoš
New submission from Adam Bartoš: Currently, if one redirects stdout, readline hook is not used (see https://hg.python.org/cpython/file/default/Parser/myreadline.c#l208). I would assume that if I run Python as py -i output.txt, I can use GNU readline or other readline hook for input just like

[issue24830] IndexError should (must?) report the index in error!

2015-08-08 Thread kedar mhaswade
New submission from kedar mhaswade: I am a n00b Python programmer. So far, I am loving Python! Thank you. Apologies if this has been already reported. A rudimentary search did not fetch anything and hence I am filing this as an enhancement request. If it has been already reported, please

[issue24830] IndexError should (must?) report the index in error!

2015-08-08 Thread R. David Murray
R. David Murray added the comment: Although this isn't a strict duplicate of issue 18162, the strict duplicate, issue 1534607, was closed as a duplicate of issue 18162, so I'm doing the same here. Issue 18162 will address this issue by providing a useful default message that the interpreter

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-08-08 Thread Chetan Reddy
Chetan Reddy added the comment: I'm seeing the same exception as op with Python-3.5.0b4. I'm writing a function in a library, and am using asyncio to make my function run faster. I'd like my library function to be useful even to users who aren't using asyncio and therefore won't call

[issue24831] Load average in test suite too high

2015-08-08 Thread Stefan Krah
New submission from Stefan Krah: On my machine (Lenovo T400, Linux) the load average during running the 2.7 test suite is about 0.5 (with some exceptions like test_io). The system is still usable even during test_io. In 3.6 the load average is 2.0, with some tests making the system

[issue24831] Load average in test suite too high

2015-08-08 Thread Stefan Krah
Stefan Krah added the comment: Scratch the comment about test_io in 2.7: It also renders the system unusable. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24831 ___

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, Serhiy, After giving this some thought I think that my initial patch is a wrong approach here -- inspect module should not be touched to fix this issue. With this patch applied, signature object for codecs.encode would have a Parameter with a bogus

[issue23970] Update distutils.msvccompiler for VC14

2015-08-08 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23970 ___

[issue24476] Statically link vcruntime140.dll

2015-08-08 Thread Steve Dower
Steve Dower added the comment: Fixed this, and forgot I had a bug open for it so I didn't reference it from the commit. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue24186] OpenSSL causes buffer overrun exception

2015-08-08 Thread Steve Dower
Steve Dower added the comment: I did not get a helpful response from the compiler team, so the optimized function will have to stay disabled for 3.5. Moving this to 3.6 in the hope that we can figure it out by then. -- versions: +Python 3.6 -Python 3.5

[issue19450] Bug in sqlite in Windows binaries

2015-08-08 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19450 ___

[issue24634] Importing uuid should not try to load libc on Windows

2015-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1df7a0821c73 by Steve Dower in branch '3.5': Issue #24634: Importing uuid should not try to load libc on Windows https://hg.python.org/cpython/rev/1df7a0821c73 -- nosy: +python-dev ___ Python tracker

[issue24634] Importing uuid should not try to load libc on Windows

2015-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 90e2747425ad by Steve Dower in branch '2.7': Issue #24634: Importing uuid should not try to load libc on Windows https://hg.python.org/cpython/rev/90e2747425ad -- ___ Python tracker

[issue24634] Importing uuid should not try to load libc on Windows

2015-08-08 Thread Steve Dower
Steve Dower added the comment: Done for 2.7, 3.5 and 3.6. Decided against touching 3.4 because it's not really an issue with MSVC 10.0, just 9.0 and 14.0. And I used eryksun's suggested approach. -- resolution: - fixed stage: - resolved status: open - closed

[issue24831] Load average in test suite too high

2015-08-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Just to diagnose this, try to run the test suite with nice. If it still make the system unusable, then it's probably an I/O issue rather than CPU scheduling. -- nosy: +pitrou ___ Python tracker

[issue24826] ability to integrate editor, shell, debugger in one window

2015-08-08 Thread Mark Roseman
Mark Roseman added the comment: Yes that's exactly what I was thinking. If everything is a frame rather than a toplevel it'll be much easier to reconfigure things. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24826

[issue24832] Issue building docs with newer sphix (default theme - classic)

2015-08-08 Thread R. David Murray
New submission from R. David Murray: After doing a make clean in Doc, the built documents no longer rendered correctly. I tracked this down to the Sphinx warning I'd been ignoring for a while: WARNING: 'default' html theme has been renamed to 'classic'. Please change your html_theme setting

[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-08-08 Thread Chetan Reddy
Chetan Reddy added the comment: Disregard my previous comment. I realize now that I shouldn't be calling run_until_complete in a library function because it will fail if the user had already started running the event loop. I will attempt to use a create and use a new event loop in my library

[issue24832] Issue building docs with newer sphix (default theme - classic)

2015-08-08 Thread Carol Willing
Carol Willing added the comment: Is the behavior different in default or 3.5 release and 2.7 release? The default branch has html_theme in Doc/conf.py https://hg.python.org/cpython/file/default/Doc/conf.py set to 'pydoctheme'. The 2.7 branch has html_theme in Doc/conf.py

[issue24667] OrderedDict.popitem()/__str__() raises KeyError

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: FWIW I set up a test harness that runs test_collections and odict_reproduce with monotonically increasing PYTHONHASHSEED values. I let it run overnight; it's now past iteration 158600. Apart from some weirdness in the low 70ks that I can't reproduce it's

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: Can we do better? How about a new field on the Parameter object, symbolic_default_value, which shows you the expression used to compute the value? We could then set default_value to the result of the expression, pydoc could print the symbolic expression,

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Yury Selivanov
Yury Selivanov added the comment: Can we do better? How about a new field on the Parameter object, symbolic_default_value, which shows you the expression used to compute the value? We could then set default_value to the result of the expression, pydoc could print the symbolic

[issue24751] regrtest/buildbot: test run marked as failure even when re-run succeeds

2015-08-08 Thread David Bolen
David Bolen added the comment: While running a manual test (make buildbottest) on my 2.7 Ubuntu buildbot, I ran into an exception in this patch: The tail end of the test run: [401/401/1] test_signal 379 tests OK. 1 test failed: test_curses 21 tests skipped: test_aepack test_al

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: I just tried every module, simulating pydoc on it. codecs is the only one that failed. So, I can live with just changing codecs for now. But let's do it properly in 3.6. Go ahead and check in for 3.5--or, if you don't get it done before I want to tag the

[issue24832] Issue building docs with newer sphix (default theme - classic)

2015-08-08 Thread R. David Murray
R. David Murray added the comment: I only checked this on 3.5 and 3.6, but 3.4 is using pydoctheme, and python2.7 is using default. So presumably none of them will build using Sphinx 1.3.1. Yuri's change appears to be undoing a change he inadvertently committed, which was probably a change

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: sys.getdefaultencoding() always returns utf-8 in 3.x (it left for compatibility with 2.x). I suggested to set defaults to literal utf-8. This matches documentation and signatures of str.encode() and bytes.decode(). --

[issue24751] regrtest/buildbot: test run marked as failure even when re-run succeeds

2015-08-08 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: fixed - stage: resolved - needs patch status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24751 ___

[issue24831] Load average in test suite too high

2015-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Any specific tests or all tests? 3.x has many new features in comparison with 2.x, and new tests for these features. For example zipfile and tarfile tests run much longer due to testing with bzip2 and lzma compressions. -- nosy: +serhiy.storchaka

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: That's a fine change for 3.5. For 3.6 I want to solve the general problem, at which point we can switch back to calling sys.getdefaultencoding() if we like. Serhiy, can you make a patch a post it here? I want to tag 3.5.0rc1 in one or two hours. --

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is easy. In future we should unify docstrings for codecs.encode() and codecs.decode() with str.encode(), bytes.decode() and like. -- Added file: http://bugs.python.org/file40153/codecs_default_encoding.patch

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Please use encoding='utf-8' as definition for codecs.encode() and codecs.decode(). There is no adjustable default encoding in Python 3 anymore. For Python 3.6 this should probably be fixed everywhere. -- ___

[issue24832] Issue building docs with newer sphix (default theme - classic)

2015-08-08 Thread Carol Willing
Carol Willing added the comment: David, Thanks for pointing this out. I totally forgot that the 2 and 3 versions use different themes :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24832

[issue24824] Pydoc fails with codecs

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: Please change Default encoding is to The default encoding is. Apart from that, LGTM, please check in! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24824

[issue23973] PEP 484 implementation

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: Can we mark this closed now? -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23973 ___ ___

[issue24585] Windows installer does not detect existing installs

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: Did this work as hoped in beta 4? Can we mark it as fixed now? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24585 ___

[issue24732] 3.5.0b3 Windows accept() on unready non-blocking socket raises PermissionError

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: If this is now fixed but still needs a unit test, can I change it from release blocker to high priority? -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24732

[issue24272] PEP 484 docs

2015-08-08 Thread Larry Hastings
Larry Hastings added the comment: I assume what we've got is good enough for rc1? Can we mark this closed / reduce the priority from release blocker? Note that there are few (if any) restrictions on fixing docs during the release candidates. (Though after today we'll be switching to the

[issue24585] Windows installer does not detect existing installs

2015-08-08 Thread Steve Dower
Steve Dower added the comment: We won't really know until we've gotten feedback from people with b4 who install rc1 - the upgrade step is the part that needs testing, and that takes two releases. If you want to pull the priority down though, go ahead. --

[issue24764] cgi.FieldStorage can't parse multipart part headers with Content-Length and no filename in Content-Disposition

2015-08-08 Thread STINNER Victor
STINNER Victor added the comment: Not today. I'm in holiday. Ping me in two weeks or find another core dev. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24764 ___

[issue24826] ability to integrate editor, shell, debugger in one window

2015-08-08 Thread Al Sweigart
Al Sweigart added the comment: Is this a duplicate of https://bugs.python.org/issue9262 Either way, there's some good discussion there and also on https://bugs.python.org/issue24750 (ctrl-f for tabbed) -- nosy: +Al.Sweigart ___ Python tracker

[issue24751] regrtest/buildbot: test run marked as failure even when re-run succeeds

2015-08-08 Thread Zachary Ware
Zachary Ware added the comment: Ah. The problem is on 2.7 only; 3.x calls sorted() on the set operation. The set operation should just go away, though; we don't count ENV_CHANGED as 'bad' anymore. Will fix shortly. -- ___ Python tracker

[issue24827] round(1.65, 1) return 1.6 with decimal

2015-08-08 Thread Zachary Ware
Zachary Ware added the comment: I'm glad you understand it now :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24827 ___ ___ Python-bugs-list

[issue24832] Issue building docs with newer sphix (default theme - classic)

2015-08-08 Thread Zachary Ware
Zachary Ware added the comment: Which version of Sphinx are you using? The Docs buildbot is happily building with 1.3.1 (though failing the lint check, which I missed when it started). -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org

[issue24751] regrtest/buildbot: test run marked as failure even when re-run succeeds

2015-08-08 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- assignee: - zach.ware resolution: - fixed stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24751

[issue24751] regrtest/buildbot: test run marked as failure even when re-run succeeds

2015-08-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d69b214e668 by Zachary Ware in branch '2.7': Issue #24751: Fix running regrtest with '-w' flag in case of test failures. https://hg.python.org/cpython/rev/7d69b214e668 -- ___ Python tracker