[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 base-2.  The float is actually 
2.67482236431605997495353221893310546875, but Python knows you're 
human and almost certainly didn't want that number, so it shows you 2.675 when 
asked.  The second Decimal instance is created from the string '2.675', and is 
converted straight to base-10.

Moving on to the rounding, both the float 2.675 and the Decimal created from 
the float 2.675 round down to 2.67 (or nearly, in the case of the float), 
because they're actually 2.674999..., and 4 rounds down.  The Decimal created 
from a string rounds to 2.68, because it actually is 2.675 and 5 rounds to even 
(in this case, 8).

 from decimal import Decimal as D
 f = 2.675
 s = str(f)
 s # Python chooses the shortest representation
'2.675'
 df = D(f)
 ds = D(s)
 f, df, ds
(2.675, Decimal('2.67482236431605997495353221893310546875'), 
Decimal('2.675'))
 f == df
True
 f == ds
False
 df == ds
False
 D(round(f, 2)), D(round(df, 2)), D(round(ds, 2))
(Decimal('2.6699289457264239899814128875732421875'), 
Decimal('2.67'), Decimal('2.68'))

The moral of the story is: everything is working as expected and don't create 
Decimals from floats unless you want the base-2 approximation of the value.

--
title: round(1.65, 1) return 1.6 with decima modulel - round(1.65, 1) return 
1.6 with decimal

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24827
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
 ds2 = D(s2)

 f1, df1, ds1
(1.65, Decimal('1.649911182158029987476766109466552734375'), 
Decimal('1.65'))
 f2, df2, ds2
(2.675, Decimal('2.67482236431605997495353221893310546875'), 
Decimal('2.675'))

 D(round(df1, 1)) == D(round(ds1, 1))
True
 D(round(df2, 2)) == D(round(ds2, 2))
False

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24827
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue24827
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 @@
 ('123.456', 4, '123.4560'),
 ('123.455', 2, '123.46'),
 ('123.445', 2, '123.44'),
+('1.65', 1, '1.7'),
 ('Inf', 4, 'NaN'),
 ('-Inf', -23, 'NaN'),
 ('sNaN314', 3, 'NaN314'),

--- ./Lib/decimal.py.orig   2015-08-08 17:42:20.662319881 +0900
+++ ./Lib/decimal.py2015-08-08 17:39:40.210313472 +0900
@@ -1782,7 +1782,7 @@
 def _round_half_even(self, prec):
 Round 5 to even, rest to nearest.
 if _exact_half(self._int, prec) and \
-(prec == 0 or self._int[prec-1] in '02468'):
+(prec == 0 or self._int[prec-1] in '01234'):
 return -1
 else:
 return self._round_half_up(prec)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24827
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 quote marks and 
the angle brackets, by substituting in an object with a custom repr.

Yury, if my change to your patch looks good to you, please go ahead and check 
it in. That way it won't slow down 3.5.0rc1.  Thanks!

--
Added file: 
http://bugs.python.org/file40151/larry.fix.pydoc.for.calls.with.functions.1.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 file: http://bugs.python.org/file40145/cgi_multipart.patch

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue24764
 ___


--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24764
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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) Rounding of floats. Floats cannot represent every number, and numbers are 
therefore rounded.

 - round(2.675, 2) = round(2.6748, 2) and is thus rounded to 2.67
 - round(1.65, 1) = round(1.6499, 1) and is thus rounded to 1.6

3a) In Python 2, round returns a float, so Decimal(round(Decimal(1.65))) = 
Decimal(1.6) =  
Decimal('1.600088817841970012523233890533447265625') != 
Decimal('1.6')

3b) In Python 3, Decimal.__round__ is implemented, so round(D(1.65), 1) == 
D(1.6) as expected.

--
nosy: +valhallasw

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24827
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.
https://hg.python.org/cpython/rev/c7c4b8411037

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15944
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue15944
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: memoryview: a bytes-like object is required, not 
'_ctypes.PyCSimpleType'


The previous error message was (changed in #16518) was:

_ctypes.PyCSimpleType does not support the buffer interface.


Which I find much clearer. Memoryviews (for better or worse,
but PEP-3118 was accepted) are Mini-NumPy-arrays. I'm still not
sure if we should hide that from users.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23756
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 tracker rep...@bugs.python.org
http://bugs.python.org/issue23756
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue23756
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.
https://hg.python.org/cpython/rev/c59b2c4f4cac

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23756
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 SORRY.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24827
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 segfault on eval. So will a similarly incorrect ast.Attribute node.

Version tested:

Python 2.7.10 (default, May 28 2015, 12:02:55) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin

--
components: Library (Lib)
messages: 248269
nosy: xmorel
priority: normal
severity: normal
status: open
title: Segfault when using store-context AST node in a load context
type: crash
versions: Python 2.7, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24828
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 normal; only the output is redirected 
to the file.

--
messages: 248271
nosy: Drekin
priority: normal
severity: normal
status: open
title: Use interactive input even if stdout is redirected
type: behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24829
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 point me in the right direction so that I can stand 
corrected.

I believe following experience could be improved:
-
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 23 2015, 02:52:03) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type help, copyright, credits or license for more information.
 l = []
 l[2]
Traceback (most recent call last):
  File stdin, line 1, in module
IndexError: list index out of range
-

if the message would indicate the index in error. This, I believe, is a 
low-hanging fruit that has several debugging benefits.

I hate to compare things, but I do want to note that Java does better in this 
regard:
Exception in thread main java.lang.ArrayIndexOutOfBoundsException: 10
at Foo.main(Foo.java:5)

--
messages: 248272
nosy: kedar mhaswade
priority: normal
severity: normal
status: open
title: IndexError should (must?) report the index in error!
type: enhancement
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24830
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 would then use.

--
nosy: +r.david.murray
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - Add index attribute to IndexError

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24830
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 get_event_loop().close() at the end of 
their main function.

I can't call get_event_loop().close() in my own library function, because i 
don't want to be closing the event loop in case the user is using the event 
loop.

Is the recommended approach here for me to create my own loop and close it in 
my function (while saving and restoring the existing event loop in case the 
user has already created an event loop)? Guido's comment at 
http://bugs.python.org/msg205027 makes me think not.

The easiest solution might be to not require the user to call 
get_event_loop().close() . This will allow library writers to use 
asyncio.run_until_complete without worrying the user seeing an exception on 
exit. If you agree with this, I'm willing to spend the effort to track down 
this particular exception and provide a patch to fix it.

--
nosy: +chetan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23548
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 practically unusable (e.g. test_mmap).

--
components: Tests
messages: 248275
nosy: skrah
priority: high
severity: normal
stage: needs patch
status: open
title: Load average in test suite too high
type: resource usage
versions: Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24831
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 default value, breaking functions like 
'BoundArguments.apply_defaults()' etc.  In other words, whatever AC puts in 
'signature.parameters['encoding'].default' must be an object that will be 
accepted by the function.

codecs.encode, if implemented in Python, would look like:

   def encode(obj, encoding=None, errors='strict'):
   if encoding is None:
   encoding = sys.getdefaultencoding()
   ...

And that's how the signature should be defined for the C version (because 
that's what is actually happening in C code as well!)

The new patch changes the AC specs from

  _codecs.encode
  obj: object
  encoding: str(c_default=NULL) = sys.getdefaultencoding()
  errors: str(c_default=NULL) = strict

to

  _codecs.encode
  obj: object
  encoding: str(accept={str, NoneType}) = NULL
  errors: str(c_default=NULL) = strict

(docstring is updated too).

This change, by the way, is in accordance with PEP 436:

   The values supplied for these [default] parameters must be compatible with 
ast.literal_eval.

--
nosy: +ncoghlan
Added file: http://bugs.python.org/file40152/codecs_ac.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue24476
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24186
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue24634
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue24634
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24634
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue24831
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 either to the new 'alabaster' default theme, or to 'classic' 
to keep using the old default.

Now, this seems problematic, because we don't know which version of Sphinx is 
going to be used to build the docs, so it doesn't seen correct to just change 
inherit = default to inherit = classic in tools/pydoctheme.conf.

Any sphinx experts know what the correct solution is here?  Do we change it and 
thus (IIUC) require 1.3.1 as the minimum Sphinx version?

--
assignee: docs@python
components: Documentation
messages: 248285
nosy: docs@python, r.david.murray
priority: normal
severity: normal
status: open
title: Issue building docs with newer sphix (default theme - classic)

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24832
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 function. Apologies for adding noise to this 
page.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23548
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
https://hg.python.org/cpython/file/2.7/Doc/conf.py to 'default'.

Iss24400 made a recent change https://hg.python.org/cpython/rev/68996acdec6f.

--
nosy: +willingc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24832
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 been rock solid.

So, looks good!

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24667
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, and codecs encode/decode could be more 
straightforward.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 expression, and codecs encode/decode could be 
 more straightforward.

Maybe it's a good idea, but I'm -1 on pushing new APIs to 3.5 without some 
careful consideration at this super late stage (and it's not going to be a 
small change btw).

Let's just fix the codecs module.

--
nosy: +Yury.Selivanov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 test_applesingle test_bsddb185 test_cd test_cl
test_dl test_gl test_imgfile test_kqueue test_linuxaudiodev
test_macos test_macostools test_msilib test_ossaudiodev
test_scriptpackages test_startfile test_sunaudiodev test_winreg
test_winsound test_zipfile64
Those skips are all expected on linux2.
Re-running failed tests in verbose mode
Traceback (most recent call last):
  File ./Lib/test/regrtest.py, line 1598, in module
main()
  File ./Lib/test/regrtest.py, line 655, in main
for test in bad[:]:
TypeError: 'set' object has no attribute '__getitem__'


The code is attempting to iterate over a sliced copy of bad (bad[:]) due to 
later possible mutation, but by that point, if you had failures, bad is a set, 
from the block shortly above where it subtracts out the environment changed 
list.  I was testing 2.7, but I think the issue affects all branches.

Perhaps list(bad) instead of bad[:]?

--
nosy: +db3l

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24751
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 release, I'll do it.

Explain one thing to me, though--how would docs.python.org get utf-8 for the 
encoding argument to encode/decode?  The docs are built from .rst files, not 
from introspection on a live interpreter.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 he made locally so he could get the docs to build because 
of this very problem.

--
assignee: docs@python - 
nosy: +georg.brandl, yselivanov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24832
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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().

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24831
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24824
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 Bitbucket pull 
request workflow, so that will complicate matters slightly.)

--
nosy: +larry

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24272
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24585
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue24826
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue24751
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
http://bugs.python.org/issue24832
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 rep...@bugs.python.org
http://bugs.python.org/issue24751
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com