[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 shouldn't use identity check for flags.

--

___
Python tracker 

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



[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, I added this after assigning encoding:

if len(' '.encode(encoding, errors='replace')) > 1:
encoding = 'latin-1'

I have no idea if this is a good idea or not. The current behaviour of mojibake 
in the parsed result is certainly worse, since the choice of utf-16-le is 
entirely contained within the parse() function.

--

___
Python tracker 

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



[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 problem is here:
1. I've created test.dll, which is static linked with Python. I've function 
tstf there:
void tstf()
{
Py_Initialize();
Py_Finalize();
}
(ofcourse I've imported it in source.def - tstf @1)

And I have main dll:

typedef void(*vv)();
void exec()
{
HMODULE hModule = ::LoadLibrary(L"d:\\PATH_TO_TEST.dll");
vv fnc = (vv)::GetProcAddress(hModule, "tstf");
(*fnc)();
::FreeLibrary(hModule);
}

int main
{
exec();
//exec();
//exec();
}

So I get more leaks because of more call exec() function.

Waiting for your answer, than you!

--

___
Python tracker 

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



[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 bytes with, and cgi infers this parameter from 
sys.stdin. I don't have the slightest idea why unquote/unquote_to_bytes 
unconditionally encodes with utf-8 and then allows decoding with an arbitrary 
encoding, but I guess it works okay for ASCII-compatible encodings?

Unfortunately, utf-16-le is not ASCII compatible, and so this doesn't work. I'm 
not familiar enough with cgi or urllib.parse to know what to fix - any 
suggestions?

--

___
Python tracker 

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



[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 

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



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

2016-08-14 Thread Peter Lovett

Changes by Peter Lovett :


--
nosy: +PeterLovett

___
Python tracker 

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



[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: http://bugs.python.org/file44111/tau4.diff

___
Python tracker 

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



[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, 1/n) right.

So a single Newton iteration, if carried out in infinite precision, should be 
enough to get all the bits "right" (meaning not significantly worse than 0.5 
ulp error when converted back to a float).

So if you find yourself doing more than one Newton iteration, you're just 
fighting floating-point noise.  It's an illusion - nothing is actually getting 
better, except perhaps by accident.

Which suggests one approach for doubles (in C - same as a Python float):  get 
the pow() approximation.  Feed it to a `fractions.Fraction()` constructor.  Do 
one Newton iteration using the Fraction type.  Then use `float()` to convert 
the result to a float.

I believe that's the best you can possibly do without doing real work ;-)

--

___
Python tracker 

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



[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 phrases rather than ints used.  I can imagine 
myself publishing seeds in other contexts.

In 3.2, seed gained a 2nd parameter -- 'version'.  "With version 2 (the 
default), a str, bytes, or bytearray object gets converted to an int and all of 
its bits are used."  For this case, hashing is not an issue. But 'conversion to 
int' is. Did it change with the introduction of FSR in 3.3?  It certainly 
should be frozen now, and the fact noted in the code.

For other non-int objects, a hashable is required.  (I expect anything other 
than int or string-like to be rare.) The doc does not say so (it should), but 
the dosctring does and experiment with [] confirms.

"With version 1, the hash() of a is used instead."

For hashed objects, whether version is 1 or 2, I guess the best we can do is to 
restore the fixed hash once used.

For a fixed sequence of outputs, both seed and rng have to be fixed.  2.7 still 
has WichmannHill for this reason.  It is gone in 3.x.  It the rng is 
significantly changed (different sequence for the same seed), I believe the 
seed version should be changed also.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue26823] Shrink recursive tracebacks

2016-08-14 Thread Emanuel Barry

Emanuel Barry added the comment:

This is irrelevant to this issue.

--

___
Python tracker 

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



[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 different libs in 1 module?

Like I can get the logs from 1 module just fine.
However if I try to get from things (lets say from asyncio (then it would 
return nothing).

--

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



[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 rendering tests being specific 
to CPython

- I added docs updates and a couple of What's New entries for the change

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[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 

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



[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 

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



[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

___
Python tracker 

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



[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 

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



[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 

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



[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 cache so each unique 
value is only created once;  at some point I'll make those cached values 
weakref'ed so they disappear when no longer used.

--

___
Python tracker 

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



[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 

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



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

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



[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

___
Python tracker 

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



[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'?

--

___
Python tracker 

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



[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 

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



[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 

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



[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 lines or functions). The patch that fixes the 
invalid escapes is four times larger than the previous one.

I would also advise to add to PEP 8 a bit recommending that strings used in 
regular expressions alwaus be raw-strings, even if there's no need to, as a lot 
(at least 70%) of the invalid escapes fixed were used in regexes.

--
Added file: http://bugs.python.org/file44107/invalid_stdlib_escapes_2.patch

___
Python tracker 

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



[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

___
Python tracker 

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



[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: http://bugs.python.org/file44106/check_msgbeep_error.diff

___
Python tracker 

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



[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, you quickly hit the exponential blowup and 
with most flags applications, it's utterly impractical to construct all the 
combinations at the start. So you have MyFlags.a|MyFlags.b is not 
MyFlags.a|MyFlags.b, and that is very weird and unexpected (especially if 
MyFlags.a is MyFlags.a, which it is if this case just delegates to 
Enum.__new__).

How does this patch propose to solve this problem?

--
nosy: +veky

___
Python tracker 

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



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

CloudABI, a sandboxed runtime environment for UNIX 
(https://mail.python.org/pipermail/python-dev/2016-July/145708.html), doesn't 
implement these ways of doing file locking, for the reason that these 
operations do not fit nicely within its process model. These locks are 
per-process; not per-descriptor. This means that processes cannot safely be 
composed or decomposed.

Attached is a relatively small patch to make flock() and lockf() optional, only 
compiling them when the necessary APIs are present. The LOCK_* constants are 
now also defined optionally.

--
components: Extension Modules
files: patch-no-flock.txt
messages: 272692
nosy: EdSchouten
priority: normal
severity: normal
status: open
title: [Patch] Complete bits necessary for making fcntl's file locking optional
versions: Python 3.6
Added file: http://bugs.python.org/file44105/patch-no-flock.txt

___
Python tracker 

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



[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:  -> zach.ware
stage: needs patch -> patch review
Added file: http://bugs.python.org/file44104/issue11620.diff

___
Python tracker 

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



[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'))
4.08166632639171

And in looking through test_cmath, it appears that only the two numeric
argument form of complex(i, j) is tested for any of the functions, not the
complex('i+nj') string form.

On Sun, Aug 14, 2016 at 1:48 PM, Ned Deily  wrote:

>
> 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 
> 
> ___
>

--

___
Python tracker 

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



[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 

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



[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
severity: normal
stage: test needed
status: open
title: Add complex case to test_builtin abs()

___
Python tracker 

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



[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 

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



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



[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

___
Python tracker 

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



[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 

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



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



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



[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 a readline hook. Whenever we have interactive stdio, and so 
PyOS_Readline is called, the new proposed API PyIO_Readline would be called 
instead. This would return Unicode str Py_Object*, so the result can be 
directly returned by input() and should be somehow encoded afterwards by the 
tokenizer (these are the only consumers of PyOS_Readline). 

We may even leave the tokenizer alone and redefine PyOS_Readline as a wrapper 
of PyIO_Readline, having full control of the encoding process there. So it 
would be enough to set up the tokenizer with UTF-8 encoding despite the fact 
that sys.std*.encoding would be UTF-16.

(I hope that if the tokenizer was desiged nowdays, it would operate on strings 
rather than bytes so there won't be any encoding problems at all.)

Also, third parties would benefit from sys.readlinehook – at least 
win_unicode_console and pyreadline would just set the attribute rather than 
messing with ctypes.

--

___
Python tracker 

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



[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 / 2" as those who know pi 
only are more than those who know tau only.

--

___
Python tracker 

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



[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 used, which implies that sys.stdin.encoding cannot 
always be used directly).

Adding __readlinehook__ as an alternative may be feasible, but a decent amount 
of work given how we call into the current readline implementation. 
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.

The easiest approach wrt issue1602 seems to be to special case the console by 
reencoding from utf-16-le to utf-8 and forcing the encoding in the tokenizer to 
utf-8 (instead of sys.stdin.encoding) in this case. I'll start here so that at 
least we can parse Unicode from the interactive prompt.

--
assignee:  -> steve.dower
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[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 

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



[issue12345] Add math.tau

2016-08-14 Thread Emanuel Barry

Changes by Emanuel Barry :


--
nosy:  -ebarry

___
Python tracker 

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



[issue12345] Add math.tau

2016-08-14 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy:  -zach.ware

___
Python tracker 

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



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

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



[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 

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



[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 pull in 
Jelle's test from his original patch); I have been doing all of my os 
package-related changes in a single checkout and so this one isn't wholly 
written in isolation.

--

___
Python tracker 

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



[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 

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



[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 readline API is most annoying because it assumes strlen is valid for any 
encoded text (and at so many places it's near unfixable), but there's another 
issue for this part.

Also, I don't have answers for most of the questions in the review on the patch 
because I copied all of those bits from fileio.c. Can certainly clean parts of 
them up for the console API, but I count compatibility with the FileIO class a 
useful goal where possible.

--

___
Python tracker 

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



[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 

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



[issue27755] Retire DynOptionMenu with a ttk Combobox

2016-08-14 Thread SilentGhost

Changes by SilentGhost :


--
stage:  -> resolved

___
Python tracker 

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



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

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[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 usual transcendental and power functions 
(including nth root). And if everyone followed those recommendations, then yes, 
the correct rounding would imply that those cross-platform differences would be 
a thing of the past.

I don't see that happening any time soon, though: writing an implementation of 
log (for example) that's provably correctly rounded for all possible inputs is 
much harder than writing an implementation that's simply "almost always" 
correctly rounded (e.g., provably accurate to 0.53 ulps instead of 0.5 ulps), 
and the latter is going to be good enough in the vast majority of contexts. 
Going from "almost always correctly rounded" to "correctly rounded" isn't going 
to have much effect on the overall accuracy of a multistep numerical algorithm, 
so all you're buying (apart from a likely degraded running time) is the 
cross-platform reproducibility, and it's not really clear how useful 
cross-platform reproducibility is as a goal in its own right. Overall, it 
doesn't seem like a good tradeoff.

The pow function is especially hard to make correctly rounded, not least 
because of its two inputs. At least for single-input transcendental functions 
there's some (perhaps remote) hope of doing exhaustive testing on the 18 
million million million possible double-precision inputs; for a function taking 
two inputs that's completely infeasible.

You can take a look at CRlibm [1] for efforts in the direction of a 
correctly-rounded libm; AFAIK it hasn't had wide adoption, and its pow function 
is still work in progress.

[1] http://lipforge.ens-lyon.fr/www/crlibm/

--

___
Python tracker 

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



[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 

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



[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 results are accurate to 
> within 10 ulps or so is probably good enough.

Thanks for the advice Mark.

This has certainly showed my naivety when it comes to floating point :-( 
I thought IEEE 754 was supposed to put an end to these sorts of cross- 
platform differences. If this was a trig function, I wouldn't have been 
so surprised, but I was not expecting pow() to differ like this. Once I 
started getting exact results on my machine, I thought everyone would 
see the same thing.

--

___
Python tracker 

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



[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 

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



[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 floating-point operations 
involved.

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 results are accurate to within 10 ulps or so is 
probably good enough.

If you want an actual correctly-rounded nth root just for testing purposes, 
it's certainly possible to construct one with integer arithmetic, but an easier 
alternative might simply be to use MPFR's "mpfr_root" function (as wrapped by 
gmpy2) to generate test values.

--

___
Python tracker 

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



[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 significantly (b) the 
> accuracy of the `y**n` computation. It's entirely possible that the 
> value giving the smaller epsilon is actually the worse of the two 
> approximations.

Let's call the two calculated roots y and w, where y is generated by 
pow() and w is the "improved" version, and the actual true 
mathematical root is r (which might fall between floats).

You're saying that it might turn out that abs(y**n - x) < abs(w**n - x), 
but abs(w - r) < abs(y - r), so I return the wrong calculated root.

I can see how that could happen, but not what to do about it. I'm 
tempted to say "that platform's pow() is weird, and the best I can do 
is return whatever it returns". That way you're no worse than if I just 
used pow() and didn't try to improve the result at all.

I think this would be a problem if I wanted to make nth_root() a public 
function with a guarantee that it will be better than pow(), but at 
worst here it just slows the geometric mean down a bit compared to a 
naive pow(product, 1/n).

What else can I do? Since I'm only dealing with integer powers, should I 
try using my own ipow(y, n) for testing?

def ipow(y, n):
x = 1.0
while n > 0:
if n % 2 == 1:
x *= y
n //= 2
y *= y
return x

--

___
Python tracker 

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



[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

___
Python tracker 

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



[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 errors; they're approximations to the 
errors, since the computations of the epsilons depends on (a) the usual 
floating-point rounding, and more significantly (b) the accuracy of the `y**n` 
computation. It's entirely possible that the value giving the smaller epsilon 
is actually the worse of the two approximations.

--

___
Python tracker 

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



[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 to 
platform).

--

___
Python tracker 

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



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

> One issue here is that libm pow functions vary hugely in quality, so 
> any algorithm that depends on ** or math.pow is going to be hard to 
> prove anything about.

pow() is just the starting point. An earlier version of the function 
started with an initial guess of x for the nth root of x, but it was 
very slow, and sometimes failed to converge in any reasonable time. By 
swapping to an initial guess calculated with pow(), I cut the number of 
iterations down to a much smaller number.

Because I'm not to worried about being super-fast, the nth root function 
goes through the following steps:

- use y = pow(x, 1/n) for an initial guess;
- if y**n == x, return y;
- improve the guess with the "Nth root algorithm";
- if that doesn't converge after a while, return y;
- 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().

> I think the tests should simply be weakened: it's unreasonable to 
> expect perfect results in this case.

Okay. I'll weaken the tests.

--

___
Python tracker 

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



[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 interactive, input() goes via readlinehook 
machinery, otherwise it just writes and reads an ordinary file.

The latter means we don't have to touch readline machinery now, the downside is 
that custom rlcompleters like pyreadline won't work on input().

--

___
Python tracker 

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



[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 

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



[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 

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



[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 to convert to float

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 595, in 
geometric_mean
s = 2**p * _nth_root(2**q, n)
  File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 346, in 
nth_root
return _nroot_NS.float_nroot(x, n)
  File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 364, in 
float_nroot
return _nroot_NS.bignum_nroot(x, n)
  File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 489, in 
bignum_nroot
b = 2**q * _nroot_NS.nroot(2**r, n)
  File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 384, in 
nroot
r1 = math.pow(x, 1.0/n)
OverflowError: int too large to convert to float

--

___
Python tracker 

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



[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 depends on ** or math.pow is going to be hard to prove anything 
about.

I think the tests should simply be weakened: it's unreasonable to expect 
perfect results in this case.

--
nosy: +mark.dickinson

___
Python tracker 

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



[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 

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



[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

___
Python tracker 

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



[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 it would be even better to use 
a CSPRNG like the new “secrets” module, or uuid.uuid4(). Otherwise, perhaps 
there is the possibility of attacks by predicting the boundary and injecting 
HTTP headers, splitting up requests, etc via a file upload.

Both Forest and Senthil’s patches look like they load all the data into memory, 
so would not be useful for streaming, which was the original request. Hence I 
am putting this back to “needs patch”. Issue 3243 has been resolved, meaning 
that we can stream upload data as long as the Content-Length has been 
pre-calculated. The length could be calculated based from the length of each 
piece (e.g. file sizes).

Also, with Issue 12319 (chunked encoding) about to be resolved, if people only 
need to use HTTP 1.1, it may be easier to upload forms using chunked encoding, 
where you don’t have to worry about Content-Length.

--
stage: patch review -> needs patch

___
Python tracker 

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



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



[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 

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



[issue15012] test issue

2016-08-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Replying from new email address.

--

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



[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 somebody will use it in new code.

There is no much time left before feature freeze. If general IntFlags will not 
added, I'm going to open separate issues for adding specialized class for every 
particular case (re, os, etc).

--

___
Python tracker 

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



[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

___
Python tracker 

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



[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
http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/11140/steps/test/logs/stdio

The first is
AssertionError: 9.002 != 9

An slightly different failure happens on AMD64 Free BSD and Open Indiana 
buildbots:
http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/11077/steps/test/logs/stdio
==
FAIL: testFraction (test.test_statistics.Test_Nth_Root)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_statistics.py",
 line 1247, in testFraction
self.assertEqual(self.nroot(x**12, 12), float(x))
AssertionError: 1.1865 != 1.1868

--
title: Private _nth_root function loses accuracy on PowerPC -> Private 
_nth_root function loses accuracy

___
Python tracker 

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