[issue27734] Memory leaks at Python35-32

2016-08-10 Thread Филипп Пономарев

Changes by Филипп Пономарев :


--
components: +Windows -2to3 (2.x to 3.x conversion tool)
nosy: +paul.moore, steve.dower, tim.golden, zach.ware -Филипп Пономарев
type:  -> resource usage

___
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-10 Thread Филипп Пономарев

Changes by Филипп Пономарев :


--
components: 2to3 (2.x to 3.x conversion tool)
nosy: Филипп Пономарев
priority: normal
severity: normal
status: open
title: Memory leaks at Python35-32
versions: Python 3.5

___
Python tracker 

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



[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-10 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue27732] IDLE tests should be quiet

2016-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

> @support.requires_resource('audio')?

The point is that the noise is extraneous and should be optional.  I want the 
tests to run (quietly) when I run them with unittest (which is most of the 
time) and anytime -ugui is true (too few of the buildbots).  It was not too 
hard fix and has bonuses both for normal running and for tests.  The parenmatch 
module has an option to turn off noise, and I might generalize that option, 
while still providing visual signals.

--

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2016-08-10 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



[issue27732] IDLE tests should be quiet

2016-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Bell-using files patched (module and test)
autoexpand, parenmatch, replace, search, undo

Bell-using files not patched (no test yet) 
debugger, editor, grep, history, pyshell, scrolled_list, zoomheight

A second bonus is that the dummy bell function, instead of lambda: None, can be 
a mock used to test that bell() was called when it should be (or even not).  
This was already true for test_undo, except that the mock wrapped rather than 
replaced the real bell function.  I opened spinoff #27733 to extend this idea.

To make this possible, I gave the class instances a self.bell function that was 
replaced by the test code afterwards.  I am leaving this issue open to give the 
other bell-using classes a similar attribute in preparation for future tests.

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-08-10 Thread Martin Panter

Martin Panter added the comment:

Any news on the remaining failures for year 2037?

What about the buildbots that time out? Can the size of the tests be reduced, 
or perhaps should the buildbots be updated to extend the timeout?

--

___
Python tracker 

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



[issue27733] Test that self.bell is called in IDLE classes when intended.

2016-08-10 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Spinoff of #27732, which changed 5 tested bell-using classes to consistently 
call 'self.bell()' (instead of self.text.bell or whatever) so tests for such 
classes could replace the function with a quiet function.  For 4 of the 
classes, the replacement is currently 'lambda: None'.  For undo, it is a quiet 
mock that replaced a noisy mock wrapping and calling the original bell().  The 
purpose of the mock, either way, is to test that bell() is called when intended.

I plan to add a new idle_test.mock_tk.bell function.  I am considering having 
it automatically reset 'called' when 'called is accessed.  In any case, this 
issue is about extending the use of mock bells to other tests.

--
assignee: terry.reedy
components: IDLE
messages: 272397
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Test that self.bell is called in IDLE classes when intended.
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue27733] Test that self.bell is called in IDLE classes when intended.

2016-08-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +Tests

___
Python tracker 

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



[issue27732] IDLE tests should be quiet

2016-08-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2eb84fe85889 by Terry Jan Reedy in branch 'default':
Issue #27732: Silence test_idle with dummy bell functions.
https://hg.python.org/cpython/rev/2eb84fe85889

--
nosy: +python-dev

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter

Changes by Martin Panter :


--
assignee: orsenthil -> martin.panter

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter

Martin Panter added the comment:

Some of the header field validation was included in Demian’s first patch, 
raising HTTPEncodingError. But I don’t know why he included it. Maybe it was 
more appropriate then; it looks like that patch took a different approach than 
the current encode_chunked=True mechanism.

--
assignee: martin.panter -> orsenthil

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Martin Panter

Martin Panter added the comment:

_is_textIO(): I’m sorry but I still prefer the TextIOBase check over read(0). 
Each option has a disadvantage, but with TextIOBase, the disadvantage only 
affects text files, not byte files.

Maybe another option is to stick with the current checking of the “mode” 
attribute, or are its failings significant for chunked encoding? It seems to me 
that the most important use cases would be reading bytes from a pipe file, 
custom bytes file object reader, generator, etc, but not a text file without a 
“mode” attribute.

Checking Content-Length and Transfer-Encoding: I would prefer to remove this, 
unless there is a “good” reason to keep them. I want to understand why the 
three specific checks were added, and what made them more special than other 
potential checks (e.g. the format of the Content-Length value, or that the 
resulting body matches it). If the reason is something like “it is too easy for 
the caller to accidentally trigger the problem”, then there may be another way 
to fix it. Or maybe it is a mitigation for a security problem? But at the 
moment, it just seems to me like code being too smart for its own good.

I mentioned a few possible bugs with parsing Transfer-Encoding at 
.
 The format of the Transfer-Encoding value is specified at 
 and 
. In Issue 23498, I identified 
some parts of Python that parse header values like this, although it looks like 
http.cookiejar.split_header_words() may be the only one usable for 
Transfer-Encoding.

--

___
Python tracker 

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



[issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts

2016-08-10 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue27720] decimal.Context.to_eng_string wrong docstring

2016-08-10 Thread Evelyn Mitchell

Evelyn Mitchell added the comment:

I had to look up what engineering notation meant, so I added detail to the 
docstring.

--
nosy: +Evelyn Mitchell
stage:  -> patch review
Added file: http://bugs.python.org/file44072/patch27720

___
Python tracker 

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



[issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial

2016-08-10 Thread Ben Hoyt

Ben Hoyt added the comment:

Okay, patch attached -- I think it's best to simply remove that sentence.

Side note: this is why GitHub is so good -- click edit, remove the sentence, 
click create pull request (approx time 30 seconds). I've got a new machine 
since I last did Python development, so to create an actual patch I needed to: 
download Mercurial, clone the repo, install Sphinx, edit the file, build the 
docs, create the patch (approx time 30 minutes). On the positive side, each of 
those steps was painless and trouble-free. :-)

--
keywords: +patch
Added file: http://bugs.python.org/file44071/issue27719-1.patch

___
Python tracker 

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



[issue27732] IDLE tests should be quiet

2016-08-10 Thread Zachary Ware

Zachary Ware added the comment:

You could guard the noisy tests with "@support.requires_resource('audio')" 
(however that is actually spelled :)).

--
nosy: +zach.ware

___
Python tracker 

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



[issue27732] IDLE tests should be quiet

2016-08-10 Thread Terry J. Reedy

New submission from Terry J. Reedy:

IDLE uses tkinter.widget.bell() in various places to signal an exceptional 
situation.  Examples include 'Find' when the target cannot be found and 'Expand 
word' when there is no expansion (or are no more expansions.

[The tk manual page is http://www.tcl.tk/man/tcl8.6/TkCmd/bell.htm.  I have no 
idea what difference it makes which window the bell is rung on.

When running test_idle, there are about 5 beeps.  They serve no purpose and can 
only discourage buildbot owners from running gui tests, even if they could.  
Test_tk and test_ttk_guionly are silent.

A solution is to replace something like 'self.text.bell' with 'self.bell', 
where the latter is either the former or 'lambda: None', depending on a 
'utest=False' parameter.

The replacement could lead to the following bonus in a follow-on issue: a 
separate function could be augmented to emit a 'visual bell', a signal that is 
seen rather than heard.  This would benefit both the hard-of-hearing and those 
who edit with sound turned off or redirected to headphones not worn.  Notepad++ 
somehow flashes the Search dialog title bar as well a adding a message to the 
status bar.  I would rather flash (blink) the text not found or expanded.  The 
idea is to replace a hard-coded external function with a custom wrapper subject 
to future improvement.

--
assignee: terry.reedy
components: IDLE
messages: 272390
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE tests should be quiet
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread R. David Murray

R. David Murray added the comment:

Yes, this is one of those cases where the benefit of the change is probably 
outweighed by the cost.

--

___
Python tracker 

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



[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The issue with test_textview in 3.x is that tearDownModule deleted a module 
attribute, 'TV', that was not created in setUpModule.  For 2.7, 'TV' is a class 
attribute that is created in setUpClass and deleted in tearDownClass, so it 
does not have the same problem.  On the other hand, 'TV' is the original 
textView.TextViewer class, as modified with mocks in setUpClass.  The 
modifications are not reverted in tearDownClass.  This is the original code, 
later modified in 3.x.  This is safe both for re-runs and likely future tests, 
but this is not immediately obvious.  In any case, it violates the idea/rule 
that tests should not make permanent changes.  So I backported the local 
subclass of TextViewer used in 3.x.

--

___
Python tracker 

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



[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0de509a79181 by Terry Jan Reedy in branch '2.7':
Issue #27714: For IDLE's test_textview, backport 3.x subclass with mocks
https://hg.python.org/cpython/rev/0de509a79181

--

___
Python tracker 

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



[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-10 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue27730] Update shutil to work with max file path length on Windows

2016-08-10 Thread Steve Dower

Steve Dower added the comment:

Issue #27731 will resolve this for the latest versions of Windows 10, but if we 
want to support this for earlier versions of Windows here's the algorithm I'd 
suggest:

* if len(path) < 260 - we're good, don't do anything
* get the last '\' or '/' character before the 260th character and split the 
path into two parts (path1 and path2)
* use CreateFile to get a handle to path1, then GetFinalPathNameByHandle to get 
a normalized npath1 (which will have the '\\?\' prefix)
* split path2 by '/' and '\' characters, trim leading and trailing spaces from 
each segment, trim trailing dots from each segment, and append them to npath1 
separated by '\' characters
* use this normalized path instead of path

It's a relatively expensive operation, but it is the most reliable way to 
normalize a path. The place where it'll fall down is that trimming spaces and 
trailing dots and replacing '/' with '\' is not guaranteed to be the only 
processing that is done. However, it should solve 99% of cases which is better 
than the 0% that currently work.

--

___
Python tracker 

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



[issue27731] Opt-out of MAX_PATH on Windows 10

2016-08-10 Thread Steve Dower

New submission from Steve Dower:

According to 
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx 
we can opt-out of MAX_PATH limitations on a selection of functions on the 
latest version of Windows 10. This will allow unprefixed paths (i.e. no "\\?\") 
to exceed 260 characters for many common functions.

I will enable this for Python 3.6.

--
assignee: steve.dower
components: Windows
messages: 272385
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Opt-out of MAX_PATH on Windows 10
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue27729] Provide a better error message when the file path is too long on Windows

2016-08-10 Thread Steve Dower

Steve Dower added the comment:

See https://github.com/pypa/pip/issues/3055 for an example of this error.

(Also note that there is a path limit of ~32k with the prefix, and that using 
it also disables a lot of standard path resolution algorithms, so simply adding 
it everywhere does not fix anything.)

--

___
Python tracker 

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



[issue27730] Update shutil to work with max file path length on Windows

2016-08-10 Thread Brett Cannon

New submission from Brett Cannon:

It would be nice to have a place in the stdlib that can work with long file 
names on Windows no matter what. shutils seems like a possibly reasonable place.

--
components: Windows
messages: 272384
nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Update shutil to work with max file path length on Windows

___
Python tracker 

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



[issue27729] Provide a better error message when the file path is too long on Windows

2016-08-10 Thread Brett Cannon

New submission from Brett Cannon:

Windows has a max path length when the path doesn't start with r'\\?\'. When 
you hit that limit you get a FileNotFoundError but no explanation that it was 
because of some file path length. It would be nice to clarify this case in the 
exception message (probably by changing 
PyErr_SetExcFromWindowsErrWithFilenameObjects() in Python/errors.c).

--
components: Windows
messages: 272382
nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: test needed
status: open
title: Provide a better error message when the file path is too long on Windows
type: behavior

___
Python tracker 

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



[issue26686] email.parser stops parsing headers too soon when given a defective message.

2016-08-10 Thread Martin Panter

Martin Panter added the comment:

Thanks David. Since I am more intersted in fixing this robustly for HTTP and 
similar protocols, I might focus on just Issue 24363. Either confine my changes 
to the existing HTTP (or new) policy and start using that, or just address this 
from the HTTP package.

--

___
Python tracker 

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



[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Martin Panter

Martin Panter added the comment:

If the code does happen to mutate the dictionary, there would still be a bug 
with modifying any dictionary passed in by the caller. But I suspect there is 
no bug. So I am not sure the change is worth it. If we do go ahead, the 
documentation needs updating to say None is now allowed.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree.  The issue may come up with other tests in the future.  I just decided 
to do the part I knew how to do first ;-).

For #18409, I added the mac call to Phil's original patch with the vague 
comment "now needed to run without raising".  But it is not needed on Windows.  
I suspect that the then new IDLE GSOC student, S.H., had emailed me after 
reviewing existing work.  He mostly worked on Linux, but I believe he had 
access to a Mac.

setupApp calls 4 fixup functions.  I am pretty sure that that the test itself 
does not need the failing menu fix overrideRootMenu, at least not now. (The 
case might be different if I ever add live EditorWindow tests.) Three days 
after the initial patch, the patch by S.H. for #21682 replaced EditorWindow 
with a mock.  The reason was to stop menu leaks.  But it should have also 
eliminated any need to patch the EditorWindow menu.

Two of the functions, addOpenEventSupport and hideTkConsole don't seem like 
they should ever be needed.  The last, should only matter for tests that 
generate the events involved (and only on 8.5).
 
So what happens if you comment out line 34?
  macosx.setupApp(cls.root, None)

If deleting the call is not possible, maybe we can replace it with something 
more specific.  If not, then the following should work, but at the cost of 
masking a possible IDLE bug (unless a new _utest=False parameter is added to 
the signature -- but I dislike adding such complications until really needed.)

first_time = True  # new
def setupApp(root, flist):
""
if isAquaTk() and first_time:  # modified
first_time = False  # new
...

--
priority: low -> normal
stage:  -> needs patch
type:  -> behavior
versions: +Python 2.7

___
Python tracker 

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



[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dc31fa499359 by Terry Jan Reedy in branch '3.5':
Issue #27714: text_textview now passes when re-run in the same process
https://hg.python.org/cpython/rev/dc31fa499359

--

___
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-10 Thread Evelyn Mitchell

Evelyn Mitchell added the comment:

I also agree with Raymond's arguments. Adding tau doesn't add clarity to the 
math module, it just adds complexity.

--
nosy: +Evelyn Mitchell

___
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-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Agreed with Raymond's arguments.

--

___
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-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Noted, but it doesn't change my decision. Obscure fact: did you know there
are also branches of mathematics and engineering that define pi to for
something else?

--

___
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-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

+1 to Raymond.

--
nosy: +serhiy.storchaka

___
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-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Perhaps minds are already made up, but this may be the last chance to say that 
I think that this shouldn't go forward.

* The push to use of "tau" has the flavor a political fad or wishful thinking 
that may or may not succeed.  The math module should only implement established 
practice.

* Since not everyone knows or uses tau, its use would tend to make code less 
clear. As a reviewer, I would ask that code like "from math import tau" to be 
changed to "from math import tau as twopi".  The latter is more clear to most 
users (how many people would recognize "tau * r" when it occurs in the middle 
of a larger expression?).  

* I've surveyed engineers in my recent Python courses (often with Physics, EE, 
MaterialScience, DSP, or CompSci backgrounds and not a single one of them had 
heard of this constant).

* If people really wanted this, we would be seeing more cases of "tau = 2.0 * 
math.pi" in code.  Google searches and Github code search shows that this is 
very rare.

* It is already trivial to write "tau=2.0*pi" so why bother?

* Adding mysteriously named constants degrades the usability of the math module 
where many of the tools are currently self-evident but not all (
tau is a number, gamma is a function, and what the heck is a frexp?).

* Also, the name "tau" is already used for other purposes in various contexts 
(shear stress, proper time in relativity, torque, tau lepton, optical depth in 
astronomy, time contacts in RC circuits, etc).

If needed, I can survey the audiences at the upcoming SF PyData conference and 
the SF PyBay conference to see if any of the participants have any clue what 
this is about and whether they would support the addition.

--

___
Python tracker 

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



[issue27502] Python -m Module Vulnerable to Buffer Over Flow.

2016-08-10 Thread R. David Murray

R. David Murray added the comment:

A python traceback is not in and of itself a security issue.

Based on your program name, I am guessing you are trying to "break" python.  
That's fine, but if you want us to take action on a bug report like this you 
are going to have to do more work in characterizing the problem and identifying 
an actual bug.  It isn't even obvious from what you've supplied that there is a 
bug (it looks like it could be a networking error).

Also, in the future please post individual files rather than a zip file, since 
they are much easier to review.

You don't indicate which version of python you are running, so I'm clearing the 
versions.

--
type: security -> behavior
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 
3.6

___
Python tracker 

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



[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
stage:  -> patch review

___
Python tracker 

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



[issue27502] Python -m Module Vulnerable to Buffer Over Flow.

2016-08-10 Thread Dhiraj

Dhiraj added the comment:

Sorry , for replying to late , But yes if the script is run , again and again 
the application throws the python error and the Server gets crashed.
I request to have a look on it.

--

___
Python tracker 

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



[issue17153] tarfile extract fails when Unicode in pathname

2016-08-10 Thread Vinay Sajip

Vinay Sajip added the comment:

Could you point to some suitable projects from GitHub whose tarballs fail on 
3.5 / 3.6? My script in the first post, with the replacing of "unicode(...)" 
with "str(...)" and my original failing archive, works on Python 3.5 and 3.6 on 
Linux. Which platform have you seen failures on?

--

___
Python tracker 

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



[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Ned Deily

Ned Deily added the comment:

Terry, b10a312f6d00 appears to fix most of the issue, that is, if I insert a 
deliberate failure into another IDLE test and use -w without -j, the four 
repeatable errors I identified above no longer occur.  Thanks.  However, the 
fifth, timing-dependent error still occurs during the -w rerun perhaps ever 5th 
run or so.  It might be worth pursuing to help squash other intermittent 
results:

==
ERROR: setUpClass (idlelib.idle_test.test_autocomplete.AutoCompleteTest)
--
Traceback (most recent call last):
  File 
"/py/dev/3x/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_autocomplete.py",
 line 34, in setUpClass
macosx.setupApp(cls.root, None)
  File 
"/py/dev/3x/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py",
 line 245, in setupApp
overrideRootMenu(root, flist)
  File 
"/py/dev/3x/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py",
 line 215, in overrideRootMenu
del mainmenu.menudefs[-1][1][0]
IndexError: list assignment index out of range

--

___
Python tracker 

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



[issue27286] str object got multiple values for keyword argument

2016-08-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Bytecode generated by 3.5.1 is not correct (wrong error message can be not the 
only effect). The only way to resolve this issue is regenerating the bytecode.

3.5.2 was released two weeks after committing this patch. I expected it 
includes this change.

--
nosy: +larry

___
Python tracker 

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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-08-10 Thread Ned Deily

Ned Deily added the comment:

With 8f37d772f71f, the test no longer fails.  Thanks!

--
resolution:  -> fixed
stage: needs patch -> 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



[issue27584] New addition of vSockets to the python socket module

2016-08-10 Thread R. David Murray

R. David Murray added the comment:

Ah, I see.  No, the versionadded will be 3.6, and should go *after* the 
documentation of the new socket type.

The existing socket tests are in Lib/test/test_socket.py.

--

___
Python tracker 

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



[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread Ned Deily

Ned Deily added the comment:

It seems that there are a bunch of different ctags and ctags-like programs out 
there.  I don't use ctags myself (nor the "make tags" build step) and I don't 
know how other programs use the tags file it produces so I don't really have an 
opinion one way or the other.  All I can say is that, after a quick check on 
the two systems I'm most familiar with, each with a different version of ctags 
(GNU ctags on Debian and a version of BSD tags on OS X), for both the -t option 
is functional and the resulting tags files with and without the -t step in the 
Makefile recipe are different.  It may be that the extra entries produced by 
the -t step are just redundant.  So, without spending more time on this right 
now, I would be willing to apply a patch that ignores an error if -t is 
missing.  Otherwise, if someone is certain there is no loss of functionality on 
our supported platforms by removing the -t step, they are welcome to apply the 
existing patch.

--
assignee: ned.deily -> 

___
Python tracker 

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



[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Thanks R.David.Murray,

@SilentGhost in fact, in this code, it's not an issue but we use a bad practice 
and not a good practice with a mutable value.

--

___
Python tracker 

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



[issue27584] New addition of vSockets to the python socket module

2016-08-10 Thread Cathy Avery

Cathy Avery added the comment:

Sure I can add tests. I would like to base them on the existing socket tests. 
Where are those?

I did add a version

+  .. versionadded:: 3.4

It just not may not be the right one.

--

___
Python tracker 

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



[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b10a312f6d00 by Terry Jan Reedy in branch 'default':
Issue #27714: text_textview now passes when re-run in the same process
https://hg.python.org/cpython/rev/b10a312f6d00

--
nosy: +python-dev

___
Python tracker 

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



[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For test_textview, I triggered the symptom -- 4 'TV' NameErrors on re-run, by 
(temporarily) adding 1/0 to tearDownModule and running with -w.  After removing 
the TV deletion, only the ZeroDivisionError remained.

This experiment also resulted in a '''can't invoke "event" command:  
application has been destroyed''' message.  For me it only happens on the 
re-run, not in the first run.  In verbose mode, it follows the one test in 
test_config_key.  Converting the test to 'pass' proved it to be the source.  
Looking at the code, I could not find any obvious callback that would be left 
behind.  Adding 'root.update() stops the message.  (Adding 
root.update_idletasks() did not.)

In the output quoted above, the same message is shown for the non-verbose 
initial run,  If from the same cause, the same fix might work on Mac also.

--

___
Python tracker 

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



[issue27286] str object got multiple values for keyword argument

2016-08-10 Thread John Ehresman

John Ehresman added the comment:

Should the bytecode magic number be bumped in the 3.5 branch?  This breaks .pyc 
/ .pyo binary compatibility for python 3.5.  As far as I can tell this has 
never been done before in a release after the major.minor.0 final release.

This patch has made its way into debian's python 3.5 and I've gotten a bug 
report because of it for an app distributed without python source.

Looking at the 3.5.2 tarball, it does not look like the change was included in 
3.5.2.  If the magic number is bumped in 3.5, the comment should be changed to 
reflect that it changes in 3.5.3 and not in 3.5.2

--
nosy: +jpe

___
Python tracker 

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



[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread R. David Murray

R. David Murray added the comment:

Well, it's a problem in general because if the called routine modifies the 
default dict...the default is modified.  I'm guessing it is never modified, but 
it is indeed better future proofing of the code to not use a mutable default in 
a routine that passes the variable to other functions, as this one does.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue27584] New addition of vSockets to the python socket module

2016-08-10 Thread R. David Murray

R. David Murray added the comment:

Looks like there's a missing versionadded directive in the doc patch.

Is it possible/sensible to add tests for the new feature?

(I haven't reviewed the patch in detail, hopefully someone with more experience 
with C socket programming than I have will do that.)

--
nosy: +r.david.murray
stage:  -> patch review

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2016-08-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PyArg_ParseTupleAndKeywords() and Argument Clinic now support positional-only 
arguments. Thus this my objection can be resolved. But performance argument 
still needs an investigation.

In any case the patch needs updating, since the zlib module was rewritten for 
using Argument Clinic.

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



[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread SilentGhost

SilentGhost added the comment:

Why is that an issue?

--
nosy: +SilentGhost

___
Python tracker 

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



[issue27200] make doctest in CPython has failures

2016-08-10 Thread Zachary Ware

Zachary Ware added the comment:

Thanks for creating all the patches!  If you create further issues for this, 
feel free to make me nosy.

--

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

When I have read the last patch, I have seen a mutable as the default value of 
the HTTPConnection.request method. I have proposed this issue and the attached 
patch http://bugs.python.org/issue27728

--
nosy: +matrixise

___
Python tracker 

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



[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Stéphane Wirtel

New submission from Stéphane Wirtel:

http.client.HTTPConnection.request, the argument 'headers' has a default value, 
and this one is a mutable (dict).

--
messages: 272352
nosy: matrixise
priority: normal
severity: normal
status: open
title: HTTPConnection.requests has a mutable as default value for headers
versions: Python 3.6

___
Python tracker 

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



[issue27728] HTTPConnection.requests has a mutable as default value for headers

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

here is my patch for that.

--
keywords: +patch
Added file: http://bugs.python.org/file44070/issue27728.diff

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2016-08-10 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


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



[issue18880] ssl.SSLSocket shutdown doesn't behave like socket.shutdown

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Christian,

What do you think about this issue ?

1. Fix for 3.5 and 3.6
2. Maybe for 2.7 ?

--
assignee:  -> christian.heimes
nosy: +christian.heimes, matrixise

___
Python tracker 

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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

While still curious if the Mac specific code is correct, I changed test to 
match the code.  Someone please check by running at least test_idle after 
pulling.

--

___
Python tracker 

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



[issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option

2016-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Mark, the 'question above' was actually posted to #27380, the original query 
issue.

--

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

martin or serhiy,

can we move this issue to 3.6 ?

--
nosy: +matrixise

___
Python tracker 

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



[issue12290] __setstate__ is called for false values

2016-08-10 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
versions: +Python 3.5, Python 3.6 -Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue26081] Implement asyncio Future in C to improve performance

2016-08-10 Thread Yury Selivanov

Yury Selivanov added the comment:

> Implementing full behavior of generator seems difficult to me.
I'll implement minimum implementation in next patch.

Sure, but you have to implement send() and throw().

--

___
Python tracker 

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



[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Ned,

BSD cTags does not support -t

The -t option is a no-op for compatibility with previous versions of ctags that 
did not create tags for typedefs, enums, structs and unions by default.

https://www.freebsd.org/cgi/man.cgi?query=ctags=1#end

Gnu GLOBAL aka gtags does not support -t

stephane@sg1 /t/g/gtags> ./gtags -t
./gtags: invalid option -- 't'
Usage: gtags [-ciIOqvw][-d tag-file][-f file][dbpath]
stephane@sg1 /t/g/gtags> ./gtags --version
gtags (GNU GLOBAL) 6.5.4
Copyright (c) 2016 Tama Communications Corporation
License GPLv3+: GNU GPL version 3 or later 

And Exuberant Tags does not support -t

Maybe we can remove it ?

Or I can propose a patch where we try to support the '-t' parameter but this 
one is not defined, just for the compatibility.

Thank you,

Stephane

--
assignee:  -> ned.deily
nosy: +ned.deily

___
Python tracker 

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



[issue27380] IDLE: add base Query dialog with ttk widgets

2016-08-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8f37d772f71f by Terry Jan Reedy in branch 'default':
Issue #27380: For test_query on Mac, adjust one expected result.
https://hg.python.org/cpython/rev/8f37d772f71f

--

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2016-08-10 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
assignee:  -> berker.peksag

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Fixed with your comments.

--
Added file: http://bugs.python.org/file44069/issue6057-3.6-2.diff

___
Python tracker 

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



[issue6057] sqlite3 error classes should be documented

2016-08-10 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch!

+.. exception:: DatabaseError
+
+Exception raised for errors that are related to the database.  It

Indentation is not in line with other items:

+.. exception:: DatabaseError
+
+   Exception [...]

In Cursor.execute() documentation, ``sqlite3.Warning`` needs to be replaced 
with :exc:`sqlite3.Warning`.

Also, in Cursor.close() documentation, ``ProgrammingError`` needs to be 
replaced with :exc:`sqlite3.ProgrammingError`.

--
stage: commit review -> patch review

___
Python tracker 

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



[issue27621] Finish IDLE Query dialog appearance and behavior.

2016-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There is still Serhiy's original issue about moving  default with 
focus, plus possible appearance changes.

--

___
Python tracker 

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



[issue27621] Finish IDLE Query dialog appearance and behavior.

2016-08-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f0e86b60de5f by Terry Jan Reedy in branch 'default':
Issue #27621: Put query response validation error messages in query box
https://hg.python.org/cpython/rev/f0e86b60de5f

--
nosy: +python-dev

___
Python tracker 

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



[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread Evelyn Mitchell

Evelyn Mitchell added the comment:

It looks to me the patch only removes the -t argument, as required.

--
nosy: +Evelyn Mitchell
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



[issue6057] sqlite3 error classes should be documented

2016-08-10 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


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



[issue6057] sqlite3 error classes should be documented

2016-08-10 Thread Jaysinh shukla

Jaysinh shukla added the comment:

Dear Stéphane,
I will be agreed with the way proposed by you.

--

___
Python tracker 

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



[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

and in my first description, I have just forgotten to indicate this argument 
was not supported by the last version of ctags. @SilentGhost confirms this 
point ;-) (since 1998).

--

___
Python tracker 

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



[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

yep, maybe in this case, we can accept my patch ;-)

--

___
Python tracker 

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



[issue25825] AIX shared library extension modules installation broken

2016-08-10 Thread David Edelsohn

David Edelsohn added the comment:

Let's start with this patch to revert the change mentioned in msg256136 to look 
for python.exp in Modules -- the test, the source for the file, and the 
location to delete the file.

A follow-up patch will fix the data in _sysconfigdata.py.

--
Added file: http://bugs.python.org/file44068/Issue25825-patch1.txt

___
Python tracker 

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



[issue27727] Update Tools/freeze to use .vcxproj files

2016-08-10 Thread SilentGhost

Changes by SilentGhost :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
stage:  -> needs patch
type: compile error -> behavior
versions: +Python 3.6

___
Python tracker 

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



[issue27727] Update Tools/freeze to use .vcxproj files

2016-08-10 Thread Evelyn Mitchell

Evelyn Mitchell added the comment:

Kaeptm, thanks for submitting this. Is this a Windows issue?

--
nosy: +Evelyn Mitchell

___
Python tracker 

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



[issue27727] Update Tools/freeze to use .vcxproj files

2016-08-10 Thread Kaeptm Blaubaer

New submission from Kaeptm Blaubaer:

The Tools/freeze script is broken because the .dsp files no longer exists.

--
components: Demos and Tools
messages: 272334
nosy: Kaeptm Blaubaer
priority: normal
severity: normal
status: open
title: Update Tools/freeze to use .vcxproj files
type: compile error

___
Python tracker 

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



[issue27724] PEP3119 inconsintent with actual CPython impl

2016-08-10 Thread R. David Murray

R. David Murray added the comment:

Probably.  PEPs, once completed (unless they are informational PEPs), are 
historical documents, and the real implementation may diverge from the PEP 
immediately, or after maintenance updates.  The real documentation for the 
added feature should be in the main docs.  We are not always good about making 
that true, and we do reference the PEPs, and so sometimes we do update them.  
I'll leave this open so someone knowledgeable about it can decide if this 
should be fixed, or if there are missing "real docs" (I don't get hits for 
either constant grepping the docs).

--
nosy: +r.david.murray

___
Python tracker 

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



[issue26686] email.parser stops parsing headers too soon when given a defective message.

2016-08-10 Thread R. David Murray

R. David Murray added the comment:

I would prefer if we did lookahead to see if the subsequent line looks like a 
header.  It's more complicated to do that, of course, and could still lead to 
false negatives.  However, I think that would probably retain enough backward 
compatibility to be acceptable.  It would also be sensible to make this a 
policy switch, and as I said elsewhere I'm fine with changing the defaults of 
the http policy even in 3.5.  (The downside of *that* is that I'm sure there 
are bugs hiding in the new header parsing code, so actually using the http 
policy to parse http headers will doubtless "allow" us to find some of them.)

Even more complicated, but a better heuristic: look ahead to the next blank 
line, up to some limit (5 lines?), and if you do find something that looks like 
a header, also make sure that none of the intermediate lines look like a MIME 
boundary.   That still leaves the question of what to do with a source text 
that has non-header lines up to the next blank line (this applies to one line 
lookahead as well).  Maybe see if there is more text after the blank line and 
if so assume the non-header is part of the header, otherwise not?

Regardless, lookahead may be difficult to code.  So an alternative that uses 
your approach, but triggered by a policy setting on http, would be acceptable 
backward compatibility wise.  If we want to we could even make an internal http 
policy that is compat32 plus this new flag.

--

___
Python tracker 

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



[issue27721] distutils strtobool returns 0 and 1 rather than False and True

2016-08-10 Thread Joseph Bane

Joseph Bane added the comment:

Thank you for your feedback. I definitely understand your reasoning and 
commitment to not introducing breaking changes in externally facing codes. I 
also agree that this does fall slightly more on the side of aesthetic rather 
than functional changes. However, this change doesn't seem like it is 
significantly altering the interface of strtobool; if anything it is making it 
clearer and less surprising, especially for Python 2/3+ users.

I know, as someone in that category, having learned Python at version 2.5, that 
it was a bit surprising when I got back an integer from this function rather 
than the native True and False values. I also want to emphasize that this 
change is specifically targeting Python 3.6, not 2.7, 3.4, or 3.5. Making this 
small change in a not-yet-released version should be safe, but, of course, that 
is my outsider opinion. You absolutely have a valid point if I were asking that 
we change a released version and it is not something I take lightly.

Lastly, this is the kind of change I would hope I could make easily as a first 
time contributor to the project because of it being more of an aesthetic one. 
After all, isn't the whole point of making changes to a project about making it 
cleaner, modern, and clearer?

Thanks again. I really appreciate the feedback and discussion. P.S. If there is 
support to introduce this change, I will certainly update the tests and docs as 
pointed out.

--

___
Python tracker 

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



[issue17153] tarfile extract fails when Unicode in pathname

2016-08-10 Thread Vadim Markovtsev

Vadim Markovtsev added the comment:

Relevant issue in pip: https://github.com/pypa/setuptools/issues/710

--

___
Python tracker 

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



[issue17153] tarfile extract fails when Unicode in pathname

2016-08-10 Thread Vadim Markovtsev

Vadim Markovtsev added the comment:

So... The bug persists in 3.5 ad 3.6. It prevents from e.g. unpacking tarballs 
coming from GitHub repos with Unicode file names.

--
nosy: +Vadim Markovtsev2

___
Python tracker 

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



[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread SilentGhost

SilentGhost added the comment:

For the record, according to http://ctags.sourceforge.net/news.html that option 
was removed in version 2.0.1 released over 18 years ago.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue26081] Implement asyncio Future in C to improve performance

2016-08-10 Thread INADA Naoki

INADA Naoki added the comment:

> Left a couple of comments; the important one -- Future.__await__ (and 
> Future.__iter__) should always return a *new* instance of a generator-like 
> object (tied to the Future object).

Implementing full behavior of generator seems difficult to me.
I'll implement minimum implementation in next patch.

--

___
Python tracker 

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



[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
stage:  -> patch review

___
Python tracker 

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



[issue27726] ctags -t does not exists in Makefile.pre.in

2016-08-10 Thread Stéphane Wirtel

New submission from Stéphane Wirtel:

I use Exuberant Ctags 5.8 on my Fedora 24, and this version does not accept the 
'-t' argument, as defined in the 'tags' target of the Makefile.

--
files: Makefile.pre.in.diff
keywords: patch
messages: 272326
nosy: larry, matrixise
priority: normal
severity: normal
status: open
title: ctags -t does not exists in Makefile.pre.in
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44067/Makefile.pre.in.diff

___
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-10 Thread Mark Dickinson

Mark Dickinson added the comment:

At some point before 3.6, the docs should get updated, and `cmath` should get 
the `tau` constant too.

--

___
Python tracker 

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



[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-10 Thread SilentGhost

Changes by SilentGhost :


--
components: +Interpreter Core
nosy: +facundobatista, mark.dickinson, rhettinger, skrah

___
Python tracker 

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



[issue27725] Use Py_SIZE(x) instead of x->ob_size

2016-08-10 Thread REIX Tony

New submission from REIX Tony:

I'm porting Python 2.7.* on AIX.

I am now using a version 13.1.3.2 of XLC.
I was previously using version 12.1.0.14 .
It appears that this new compiler shows a potential issue in Python v2 code. 
This issue seems to appear when -O2 is used.

I was porting Python 2.7.11 with -O2 instead of -O0 when I got it.

The issue appears when running tests involving power() with Decimals where the 
x_sub() routine is used.

The following Python code shows the issue:
  from decimal import *
  c = Context(7, ROUND_UP)
  d = c.power(Decimal(0.7), Decimal(3.4))
  print d
Good result is:  0.2973948 .
The bug returns: 2.440099 

However, I have about 22 errors when running:
./python Lib/test/regrtest.py -v test_decimal
It is random in 64bit and quite constant in 32bit.

The issue deals with using x->ob-size.
There is a macro:
Include/object.h:#define Py_SIZE(ob)  (((PyVarObject*)(ob))->ob_size)

The issue appears in last lines of Objects/longobject.c:x_sub() routine, when 
changing the sign:   z->ob_size = -(z->ob_size);

I have looked at version 2.7.12 and 2.7.10 of Python: they contain the same 
code as in 2.7.11.
And ->ob_size is used about 45 times, mainly in Objects/longobject.c. However, 
Py_SIZE(...) is used ten times more (475).

- Looking at version 3.5.1 of Python, I see that ->ob_size is now used only 
once, in: Objects/object.c .
And Py_SIZE(...) is now used 616 times.

And I also see that the Python 2.7.11-12 x_sub() code:
  if (sign < 0)
z->ob_size = -(z->ob_size);
  return long_normalize(z);
has been replaced in Python 3.5.1 by:
  if (sign < 0) {
_PyLong_Negate();
if (z == NULL)
return NULL;
  }
  return long_normalize(z);

  /* If a freshly-allocated int is already shared, it must
  be a small integer, so negating it must go to PyLong_FromLong */
  Py_LOCAL_INLINE(void)
  _PyLong_Negate(PyLongObject **x_p)
  {
 PyLongObject *x;

 x = (PyLongObject *)*x_p;
 if (Py_REFCNT(x) == 1) {
 Py_SIZE(x) = -Py_SIZE(x);
 return;
 }

 *x_p = (PyLongObject *)PyLong_FromLong(-MEDIUM_VALUE(x));
 Py_DECREF(x);
 }


So, it looks to me that Python v2 version should do the same that Python v3 has 
done: replace x->ob-size by Py_SIZE(x) everywhere, and improve the code of 
x_sub() by using some _PyLong_Negate() routine or macro.

--
components: Library (Lib)
messages: 272324
nosy: trex58
priority: normal
severity: normal
status: open
title: Use Py_SIZE(x) instead of x->ob_size
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue27708] Rounding/Large Int representation error with multiplication and division

2016-08-10 Thread Ethan Glass

Ethan Glass added the comment:

Thank you so much!

--

___
Python tracker 

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



[issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data

2016-08-10 Thread Senthil Kumaran

Senthil Kumaran added the comment:

(Assigning this to Martin)

I really like this patch, and I support that we land this before the feature 
freeze of 3.6. 

As along as the API interface to users is simple, the changes internal to 
_send_output should not be a concern. Yeah, I agree that multiple things needs 
to be taken care, but it is alright.

Also, +1 to do validation of transfer-encoding usage as it's done by the patch. 
This is along the lines of RFC recommendation and it is better to fail early 
than let the server implementation be the decider. 

I would like to know the better suggestion for "testing text" too. (Adding 
haypo to steer us here) Although, I would point out that the static method has 
a generic name _is_textIO, while relying on .read attribute which is checked 
outside the static method.

--
assignee: orsenthil -> martin.panter
nosy: +haypo

___
Python tracker 

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



[issue27724] PEP3119 inconsintent with actual CPython impl

2016-08-10 Thread Daisuke Miyakawa

New submission from Daisuke Miyakawa:

Python 3.5.2 (and Python 2.7.12) uses Py_TPFLAGS_IS_ABSTRACT while PEP 3119 
menttions "Py_TPFLAGS_ABSTRACT" for it. At some point had the name of the flag 
been changed without modifying PEP?

--
assignee: docs@python
components: Documentation
messages: 272321
nosy: Daisuke Miyakawa, docs@python
priority: normal
severity: normal
status: open
title: PEP3119 inconsintent with actual CPython impl
versions: Python 3.5

___
Python tracker 

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



[issue10721] Remove HTTP 0.9 server support

2016-08-10 Thread Martin Panter

Martin Panter added the comment:

FWIW I doubt HTTP 1.1 ever required support for other HTTP versions; see for 
instance .

This v2 patch adds another test that includes what I understand is a true HTTP 
0.9 request (although the mock connection infrastructure closes the connection 
before receiving the response, so you don’t see any deadlock). This is based on 
, which includes only one CRLF 
newline. I also added an entry to the What’s New page.

--
Added file: http://bugs.python.org/file44066/http09server.v2.patch

___
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-10 Thread Mark Dickinson

Mark Dickinson added the comment:

> I'd test that tau is exactly equal to 2*pi.

+1

--

___
Python tracker 

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



[issue26526] In parsermodule.c, replace over 2KLOC of hand-crafted validation code, with a DFA

2016-08-10 Thread Xavier Combelle

Xavier Combelle added the comment:

The DFA is generated by other part of existing cpython code ? If it's the case 
looks like you did a great job.

--
nosy: +xcombelle

___
Python tracker 

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



[issue27200] make doctest in CPython has failures

2016-08-10 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Thanks for committing all of these patches! I have local patches for some more 
tests; I'll try to find some time to upload them.

--

___
Python tracker 

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



  1   2   >