[issue30707] Incorrect description of "async with" in PEP492 and documentation

2017-06-19 Thread Nick Coghlan

Nick Coghlan added the comment:

The specific issue is that early exits from an "async with" statement are 
actually defined the same way they for synchronous with statements: exiting 
early via return, break, or continue, is the same as reaching the end of the 
try block.

However, that's not what the documentation currently says: it describes "async 
with" in terms of try/except/else, which isn't correct.

--
nosy: +ncoghlan, yselivanov

___
Python tracker 

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



[issue30708] Ensure that the result of PyUnicode_AsWideCharString() doesn't contain null characters if size is not returned

2017-06-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2333

___
Python tracker 

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



[issue30708] Ensure that the result of PyUnicode_AsWideCharString() doesn't contain null characters if size is not returned

2017-06-19 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The second parameter of the PyUnicode_AsWideCharString() function

wchar_t* PyUnicode_AsWideCharString(PyObject *unicode, Py_ssize_t *size)

is a pointer to Py_ssize_t. The size of created wchar_t array is saved on this 
pointer if it is not NULL. If NULL is passed as the second argument, the only 
way to determine the size of the wchar_t string is using wcslen(). But if the 
string contains the null characters, it looks truncated for wcslen() and other 
C API functions.

Reliable code should always pass the non-NULL second argument and check that 
wcslen() is equal to the returned string size. See for example the code in 
Modules/_io/winconsoleio.c. Passing NULL as the second argument is unsafe. But 
most code doesn't do such check (see all other usages of 
PyUnicode_AsWideCharString(..., NULL)). And this check complicates the callers 
code.

I propose to make the check for null characters inside of 
PyUnicode_AsWideCharString() if NULL is passes as the second argument. This 
will fix all unsafe usages of PyUnicode_AsWideCharString() and allow to 
simplify the reliable code.

This issue fixes the part of issue13617.

--
components: Interpreter Core, Unicode
messages: 296401
nosy: ezio.melotti, haypo, serhiy.storchaka, steve.dower
priority: normal
severity: normal
stage: patch review
status: open
title: Ensure that the result of PyUnicode_AsWideCharString() doesn't contain 
null characters if size is not returned
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue30707] Incorrect description of "async with" in PEP492 and documentation

2017-06-19 Thread Damien George

New submission from Damien George:

The behaviour of the "async with" statement in CPython does not match the 
description of it in PEP492, nor the language documentation.  The 
implementation uses a try/except/finally block, while the PEP and documentation 
describe the behaviour using a try/except/else block.  The PEP and 
documentation should be updated to reflect the true intention of "async with".

--

___
Python tracker 

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



[issue30707] Incorrect description of "async with" in PEP492 and documentation

2017-06-19 Thread Damien George

Changes by Damien George :


--
assignee: docs@python
components: Documentation
nosy: Damien George, docs@python
priority: normal
severity: normal
status: open
title: Incorrect description of "async with" in PEP492 and documentation
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue13617] Reject embedded null characters in wchar* strings

2017-06-19 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue30629] lower() is called twice

2017-06-19 Thread 成瀬基樹

Changes by 成瀬基樹 :


--
pull_requests: +2332

___
Python tracker 

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



[issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements

2017-06-19 Thread Vedran Čačić

Vedran Čačić added the comment:

I'd just like to say that I like

   A configuration preference that permits writing and running
   test programs from the editor without having to save the file
   (you're warned upon quitting whether to save).

very much, it would save me a lot of time, and would like to see it in some 
future version of IDLE. I can even try to implement it myself, but of course, 
it would be much better if Terry did it.

--
nosy: +veky

___
Python tracker 

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



[issue30629] lower() is called twice

2017-06-19 Thread 成瀬基樹

成瀬基樹 added the comment:

It will be highlight of my programmer life. Thank you. That pull request is 
just the beginning, not the last.

--

___
Python tracker 

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



[issue5680] Command-line arguments when running in IDLE

2017-06-19 Thread veganaiZe

Changes by veganaiZe :


--
nosy: +veganaiZe

___
Python tracker 

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



[issue30701] Exception parsing certain invalid email address headers

2017-06-19 Thread Tim Bell

Tim Bell added the comment:

I'm using the email package to ingest a firehose of spam; spammers aren't known 
for following norms or standards, so it's not surprising that I'm discovering 
lots of edge cases.

I'll supply fixes for what I find where I can, time permitting.

--

___
Python tracker 

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



[issue30420] Clarify kwarg handing for subprocess convenience APIs

2017-06-19 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 0a4fe1d8578fa59004518f8deef137282be4d71a by Mariatta in branch 
'3.6':
[3.6] bpo-30420: List cwd parameter in subprocess convenience APIs (GH-1685) 
(GH-2253)
https://github.com/python/cpython/commit/0a4fe1d8578fa59004518f8deef137282be4d71a


--
nosy: +Mariatta

___
Python tracker 

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



[issue17583] IDLE HOWTO

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks.  This is helpful and got me started thinking.

I don't want to duplicate the reference doc too much, but a reference is just 
that, a reference.  The menu items are discussed in the order they appear, not 
the order a beginner might use the most common ones.

Judging from Stackoverflow questions, covering platform specifics is needed.  
People seem to miss the following: Python runs IDLE; IDLE hands user code to 
Python to execute.  Output and error messages come from Python, not IDLE.  If 
you want python to import 3rd party modules, one must install the module for 
the Python used to run IDLE.  (I have answered at least 3 variations of this 
question.) Anyway, I realize that I have a source of frequent beginner 
questions and problems.  If we have answers in a How-To, I can quote and 
suggest that people read it.

Amit, do you wish to continue with this?

--

___
Python tracker 

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



[issue17583] IDLE HOWTO

2017-06-19 Thread Cheryl Sabella

Cheryl Sabella added the comment:

I think it's a good start, but may need some tweaking.  For example, the
Menu options should probably somehow stand out from the rest of the text.

I think it would be useful for a beginner, depending on how much of a
beginner they are and how they got to this page.  For example, if I wanted
to learn Python and had no prior programming experience, most likely I
would google 'learn python' (or maybe even just 'learn to program') and
check out those links.  Some results, like the Tutorial in the python.org
docs, focus on getting Python installed and using the interactive
interpreter.  There doesn't seem to be anything in the python.org docs
(except for the FAQ) that suggest using IDLE.  Although, the FAQ might be
one of the first places a beginner would look, so maybe a link from there
to the HOWTO would be helpful.  I think showing how to install IDLE and use
it is important, and that alone would make this page useful.  The current
IDLE doc page has the command line usage in the middle of the page, but
doesn't really just answer how do I install it and how do I run it?

So, assuming a beginner is following some tutorial, they get to a point
where they need an editor.  Following the instructions for installing any
program can be tricky.  Heck, even installing Python might have been
tricky, so good for them if they got this far.  But, without any
instructions for getting IDLE to run, they are left to googling for it.  It
would be great for the python docs can have a step by step installation
instruction and even troubleshooting.  Then, as this HOWTO does, explain
what opens up and how to use the editor, etc.  As I've recently experienced
with git, I find it frustrating to spend half a day trying to get something
to work when it should be easy.  This page could be a one page
introduction/reference so that someone doesn't have to cobble together
answers from all over the internet to questions they didn't even know to
ask.

--

___
Python tracker 

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



[issue18152] Idle: add 2.7 backport script

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> out of date
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



[issue18316] Idle 2.7: update to simplify cross-version patches

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am no longer patching IDLE for 2.7, partly because of the testing issue.

--
resolution:  -> out of date
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



[issue18583] Idle: enhance FormatParagraph

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.7

___
Python tracker 

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



[issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements

2017-06-19 Thread Ned Deily

Ned Deily added the comment:

House cleaning: much time has passed since this issue was originally opened and 
the state of IDLE development has changed dramatically for the better since 
then, thanks, in large part, to Terry taking charge.  I suspect that nearly all 
of the individual items here have already been addressed as separate issues.  
But, as I no longer have time to follow IDLE development, I am going to 
reassign this issue to Terry for a final review and closing.

--
assignee: ned.deily -> terry.reedy
versions: +Python 3.7 -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



[issue18583] Idle: enhance FormatParagraph

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE
versions: +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



[issue20403] Idle options dialog: add help

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Help has been restored, but perhaps not with this patch.  Before closing, I 
should check if there is anything I want to use.

--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.6, Python 3.7 -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



[issue21359] IDLE Redo command accelerator acts as Undo with current OS X Cocoa Tk 8.5.15

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE
nosy: +terry.reedy
stage:  -> test needed
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue21473] Idle: test startup scripts.

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue21474] Idle: updata fixwordbreaks() for unicode identifiers

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue18504] IDLE: Improve Mock_Text

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: IDLE:Improvements- Improving Mock_Text -> IDLE: Improve Mock_Text

___
Python tracker 

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



[issue18504] IDLE:Improvements- Improving Mock_Text

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE
versions: +Python 3.6, Python 3.7 -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



[issue21632] Idle: sychronize text files across versions as appropriate.

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Help.txt has been replaced by help.html, generated from idle.html, generated 
from idle.rst, which is so far kept in sync for current maintenance and feature 
versions.  Readme.txt has been replaced and is in sync for 3.6 and 7.  The 3.6 
and 3.7 code have one line difference in test_calltips.

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



[issue21632] Idle: sychronize text files across versions as appropriate.

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue30706] EmailMessage Object Creation

2017-06-19 Thread R. David Murray

R. David Murray added the comment:

This isn't the place to get help on Python coding, but since this is a 
relatively new API I'll give you a pointer, and then you can tell me where the 
docs need improvement :)

If you do message_from_string(yourstring, policy=email.policy.default), you 
should get back an EmailMessage object.

That said, your example does return an EmailMessage for me, if I put a string 
in place of your self.original_message, which must be something from your 
program.  However, that won't *work* very well, because the policy is set to 
Compat32, and Compat32 and EmailMessage aren't designed to work together.  A 
lot of things will work fine, but you'll get some weird errors.  However, I 
don't think that that is worth a documentation note, since it is a logical 
consequence of using _class=EmailMessage without specifying a policy.

--

___
Python tracker 

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



[issue21673] Idle: hilite search terms in hits in Find in Files output window

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue21624] Idle: polish htests

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue21787] Idle: make 3.x Hyperparser.get_expression recognize ...

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue17506] Improve IDLE news handling

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

To minimize news merge headaches, I have been pushing news items separately 
from IDLE patches, usually in batches of at least two.  It has not been too 
much bother to copy from NEWS.txt to NEWS.

If and when news handling is automated, I will request that items directed at 
the IDLE section also go to NEWS.txt.

--
components: +IDLE
versions: +Python 3.6, Python 3.7 -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



[issue30576] http.server should support HTTP compression (gzip)

2017-06-19 Thread Glenn Linderman

Glenn Linderman added the comment:

@martin sez:
It may be reasonable to serve the Content-Encoding field based on the stored 
file though. If the client requests file “xyz”, there should be no encoding, 
but if the request was explicitly for “xyz.gz”, the server could add 
Content-Encoding. But I suspect this won’t help Pierre.

I think this suggestion violates the mapping between file name and expected 
data type: if the request is for "xyz.gz" then the requester wants the 
compressed form of the file "xyz", but adding the Content-Encoding header would 
cause (most known) browsers to decode the file in the network stack, and the 
resulting file displayed or saved would be the uncompressed form, with the 
compressed name.

While my implementation of the compression technique I outlined is, in fact, in 
a higher-level server which runs on top of either http.server or Apache, my 
perception of having to implement it at that level was that this is the sort of 
thing that the low-level server should be capable of, via configuration 
settings.

I note that for Apache, both mod_deflate and mod_brotli support either 
on-the-fly or pre-compressed data files, so it would appear that the authors of 
those modules agree with my perception that this should be a low-level server 
configuration thing.

Your example of a /tmp server, Martin, serves to point out the benefits of 
having pre-compressed files... much less storage is required.  I haven't looked 
at the pull request in detail: I'm not particularly interested in on-the-fly 
compression, but I wasn't certain until Pierre responded exactly what he was 
proposing.

--

___
Python tracker 

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



[issue30689] len() and iter() of ChainMap don't work with unhashable keys

2017-06-19 Thread R. David Murray

R. David Murray added the comment:

IMO, it would actually be surprising for ChainMap to support unhashable keys.  
In Python, as Raymond indicates, "mapping" is pretty much synonymous with 
'dict-like', and it would be where that was *not* true that we might add extra 
documentation.

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



[issue22010] Idle: better management of Shell window output

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue22209] Idle: add better access to extension information

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue14944] Setup & Usage documentation for pydoc, IDLE, & 2to3

2017-06-19 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2017-06-19 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The two issues you are refering to are the instruments that are needed to 
reproduce the problem. The reference to PR 2035 is only made here to argue 
about the question of the correct way to control the successive calls to 
PyErr_NormalizeException(). This question is relevant here since one of the 
problems raised by this issue is that in the case of memory exhaustion the user 
is given a RecursionError as the cause of the problem.

FWIW PR 2035 transforms the tail recursion in PyErr_NormalizeException() into a 
loop (as compilers would do during optimization). An infinite recursion becomes 
then an infinite loop instead. The advantage is that there is no stack 
overflow. The drawback is that it is an infinite loop.

--

___
Python tracker 

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



[issue30495] IDLE: modernize textview module

2017-06-19 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Thanks, Terry.  I've pulled the textview changes out and made a PR.  I know
you had said there can be more than one PR for a bug, so I did it under
this number.  Hope that was the right thing to do.

I'll take a look at help_about separately.

On Mon, Jun 19, 2017 at 6:16 PM, Cheryl Sabella 
wrote:

>
> Changes by Cheryl Sabella :
>
>
> --
> pull_requests: +2331
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue24212] Idle, 2.7, backport idlelib.__main__, enable py -m idlelib

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I wanted this for the same reason you backported test.__main__ in #30223, but 
I'm not going to fix the problems.

--

___
Python tracker 

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



[issue30495] IDLE: modernize textview module

2017-06-19 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +2331

___
Python tracker 

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



[issue17583] IDLE HOWTO

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Cheryl, what do you think of the revised patch?  I imagine it needs some 
updating for *nix, but does it seem useful to a beginner?

--
nosy: +csabella
versions: +Python 3.6, Python 3.7 -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



[issue14944] Setup & Usage documentation for pydoc, IDLE, & 2to3

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not sure where installed scripts are documented in Using Python.  'idle' 
and 'idle3' are not installed on Windows.

--
title: Setup & Usage documentation for pydoc, idle & 2to3 -> Setup & Usage 
documentation for pydoc, IDLE, & 2to3
versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue23431] Idle Application Not Responding

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

No followup, no issue.  If IDLE did not run but python did, the next thing to 
have tried would have been 
.../python3.4 -c "import tkinter; tkinter.Tk()"

--
nosy: +terry.reedy
resolution:  -> out of date
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



[issue18330] Fix idlelib.PyShell.build_subprocess_arglist use of __import__

2017-06-19 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue18330] Fix idlelib.PyShell.build_subprocess_arglist use of __import__

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue24212] Idle, 2.7, backport idlelib.__main__, enable py -m idlelib

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am no longer patching IDLE for 2.7.

--
assignee:  -> terry.reedy
components: +IDLE
resolution:  -> wont fix
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



[issue30706] EmailMessage Object Creation

2017-06-19 Thread Michael Salsone

New submission from Michael Salsone:

I am looking to use the get_body() method from email.message.EmailMessage, but 
I am unable to create an object of this type. I am attempting to create an 
object of this from message_from_string (as well as some of the other 
email.parser methods). But it won't allow me to change the class to 
email.message.EmailMessage. I've read through the source for some this code, 
but I don't see where you thread the needle here, is it even possible?

Example:
from email.message import EmailMessage
email.message_from_string(self.original_message, _class=EmailMessage)

--
components: email
messages: 296378
nosy: Michael Salsone, barry, r.david.murray
priority: normal
severity: normal
status: open
title: EmailMessage Object Creation
type: 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



[issue24936] Idle: handle 'raise' properly when running with subprocess (2.7)

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The Runtime error is what current py 3 raises.  TypeError is what 2.7.13 
raises. Since the only problem is for someone who read the doc running 'raise' 
in IDLE 2.7  in -n mode, closing.

--
assignee:  -> terry.reedy
components: +IDLE
resolution:  -> wont fix
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



[issue30703] regrtest hangs on the master branch

2017-06-19 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_multiprocessing_forkserver hangs on x86-64 Sierra 3.x. buildbot -> 
regrtest hangs on the master branch

___
Python tracker 

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



[issue30703] test_multiprocessing_forkserver hangs on x86-64 Sierra 3.x. buildbot

2017-06-19 Thread STINNER Victor

STINNER Victor added the comment:

Different issue, but same behaviour: test hangs and then killed by buildbot, 
whereas a single test was still running.

See also bpo-30351 which tracks similar bugs, but on Python 2.7.

I really hate such bugs :-(

http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/928/steps/test/logs/stdio

...
0:15:10 load avg: 0.52 [404/406] test_unicodedata passed -- running: test_pydoc 
(401 sec)
0:15:10 load avg: 0.52 [405/406] test_exception_hierarchy passed -- running: 
test_pydoc (401 sec)

command timed out: 1200 seconds without output running ['make', 'buildbottest', 
'TESTOPTS=-j2', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=2111.415970

--

___
Python tracker 

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



[issue24996] IDLE: debugger local/global vars should not be editable

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe an Entry validator can reject all keystrokes.  

It seem feasible that globals could be changed.  I could look at what pdb can 
do and if so, how.

--

___
Python tracker 

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



[issue24996] IDLE: debugger local/global vars should not be editable

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
stage:  -> test needed
versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue25015] Idle: scroll Text faster with mouse wheel

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue25031] IDLE - file list improvements

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
stage:  -> test needed
versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue25036] IDLE - infrastructure changes so editors don't assume they're in a toplevel

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
stage:  -> test needed
versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue20917] Idle: Enhance font change notification system

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
stage:  -> test needed
versions: +Python 3.6, Python 3.7 -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



[issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive.

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I closed #17060 as a duplicate of this.  Roger Serwy there said
 "The .home_callback() in Lib/idlelib/EditorWindow.py contains the logic from 
#3851 for placing the cursor at the beginning of the prompt, but it requires 
that a key combination be bound to the beginning-of-line virtual event.

Should we append " " to the begining-of-line config in 
Lib/idlelib/config-keys.def ?"

--
assignee:  -> terry.reedy
stage:  -> test needed
type:  -> behavior

___
Python tracker 

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



[issue18444] IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor before the prompt, which then makes the keyboard unresponsive.

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4

___
Python tracker 

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



[issue17060] IDLE -- jump to home should not go past the PS1 and PS2 prompts

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am closing this instead of #18444 because the latter has more extensive 
discussion.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> IDLE: Mac OS X pressing ctrl-A in Python shell moved cursor 
before the prompt, which then makes the keyboard unresponsive.

___
Python tracker 

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



[issue25090] IDLE: remove noisy icons from class (module) browser

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
stage:  -> test needed
versions: +Python 3.7 -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



[issue18064] IDLE: add current directory to open_module

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.6, Python 3.7 -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



[issue18064] IDLE: add current directory to open_module

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For IDLE development, I would love to have idlelib and idlelib.idle_test on the 
open line.  Perhaps this should be user configurable: Favorite directories for 
opening files.

--

___
Python tracker 

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



[issue18318] Idle: stop depending on console output

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 

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



[issue21674] Idle: Add 'find all' in current file

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 

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



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2017-06-19 Thread Alexander Mohr

Changes by Alexander Mohr :


--
nosy: +thehesiod

___
Python tracker 

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



[issue30701] Exception parsing certain invalid email address headers

2017-06-19 Thread R. David Murray

R. David Murray added the comment:

Yep, you found an edge case I didn't write a test for.  The defect should get 
added to the header object during parsing.  (Those are supposed to get copied 
to the message object...)

--

___
Python tracker 

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



[issue30495] IDLE: modernize textview module

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You were waiting on my review of the revised patch.

1. Remove the help_about changes.  Reworking help_about is #24813.  I just 
reviewed Mark Roseman's patch.  I do not want the button frames because I would 
like to get rid of the buttons.  Besides that, I don't think the classes give 
enough benefit.  If I wanted to keep the buttons, create_py/idle/button 
functions might be considered.  You can attach to that issue a minimal change 
patch or PR that splits off AboutFrame from AboutDialog (the window).  Leave 
the latter name alone for now to minimize changes needed in other files.  We 
can then consider adding pieces of what Mark did one at a time.

2. I downloaded the patch, deleted help_about changes, applied, and tested.

Test_help_about needs two  insertions of '.textframe'  to solve
==
ERROR: test_file_buttons (idlelib.idle_test.test_help_about.LiveDialogTest)
Test buttons that display files.
--
Traceback (most recent call last):
  File "f:\dev\3x\lib\idlelib\idle_test\test_help_about.py", line 67, in 
test_file_buttons
dialog._current_textview.text.get('1.0', '1.end'))
AttributeError: 'TextviewWindow' object has no attribute 'text'

==
ERROR: test_printer_buttons (idlelib.idle_test.test_help_about.LiveDialogTest)
Test buttons whose commands use printer function.
--
Traceback (most recent call last):
  File "f:\dev\3x\lib\idlelib\idle_test\test_help_about.py", line 48, in 
test_printer_buttons
dialog._current_textview.text.get('1.0', '1.end'))
AttributeError: 'TextviewWindow' object has no attribute 'text'

Make a PR this time so I can review a side-by-side diff and retest.

--

___
Python tracker 

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



[issue25218] Automate creation of idlelib/help.html from Doc/.../idle.html

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +Build, IDLE

___
Python tracker 

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



[issue25219] Update doc for Idle command line options.

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue25198] Idle: improve idle.html help viewer.

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue25244] Idle: refine right-click behavior

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue25522] IDLE: warn if save-as name matches stdlib name

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE
versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue22742] IDLE shows traceback when printing non-BMP character

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE -Library (Lib)
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue26353] IDLE: Saving Shell should not add \n

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 

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



[issue22893] Idle: __future__ does not work in startup code.

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +IDLE

___
Python tracker 

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



[issue27099] IDLE: turn builting extensions into regular modules

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue27388] IDLE configdialog: reduce multiple references to Var names

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue27452] IDLE: Cleanup config code

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue27465] IDLE:Make help source menu entries unique and sorted.

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue27477] IDLE: Switch search dialogs to ttk widgets, and other refinement

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-19 Thread Steve Dower

Changes by Steve Dower :


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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-19 Thread Steve Dower

Steve Dower added the comment:

Ned - this has been merged into 3.6 branch and the buildbots look good.

Feel free to move the NEWS item around and/or cherrypick into 3.6.2 at your 
leisure.

--
nosy: +ned.deily

___
Python tracker 

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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-19 Thread Steve Dower

Steve Dower added the comment:


New changeset 2c899ccffda92a7f3d4e7a01f14a666504db07b5 by Steve Dower in branch 
'3.5':
bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on 
vcvarsall.bat (#2252) (#2281)
https://github.com/python/cpython/commit/2c899ccffda92a7f3d4e7a01f14a666504db07b5


--

___
Python tracker 

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



[issue28572] IDLE: add tests for config dialog.

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue26143] Ensure that IDLE's stdlib imports are from the stdlib

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

#25488 and #26143 address related issues of sys.path as seen by IDLE and user 
code.  #26143 focuses on what IDLE sees, and user modules shadowing IDLE 
modules, #25488 focuses on what user code sees, and the presence of idlelib in 
sys.path making buggy code work.  It includes startup information relevant to 
#26143 also.  Both should be solved by patching IDLE in same place.

--

___
Python tracker 

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



[issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added

2017-06-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

#25488 and #26143 address related issues of sys.path as seen by IDLE and user 
code.  #26143 focuses on what IDLE sees, and user modules shadowing IDLE 
modules, #25488 focuses on what user code sees, and the presence of idlelib in 
sys.path making buggy code work.  It includes startup information relevant to 
#26143 also.  Both should be solved by patching IDLE in same place.

--
components: +IDLE

___
Python tracker 

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



[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-06-19 Thread Steve Dower

Steve Dower added the comment:

Zach, I just spotted this build log, that appears to have failed to download 
nuget.exe: 
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.6/builds/339/steps/compile/logs/stdio

Guessing the bot is only succeeding because it currently has all the 
dependencies. Maybe we should consider just checking in nuget.exe?

--

___
Python tracker 

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



[issue30671] dict: improve lookup function

2017-06-19 Thread Tim Peters

Tim Peters added the comment:

BTW, I should have spelled this out earlier:  recall that x and y collide on 
the first probe if and only if

x = y (mod 2**k)   [1]

The second probe never happens unless they do collide on the first probe, so 
when looking at the second probe we can assume that [1] is true.  Since [1] is 
true,

5*(x % 2**k) + 1 = 5*(y % 2**k) + 1

is also true (and there's nothing special here about "5" and "1" - it would 
hold for any multiplier and any addend).  The second probe just adds (x >> 5) % 
2**k to the left side of that and (y >> 5) % 2**k to the right side of that.  
Therefore the second probes collide if and only if (in addition to [1])

x >> 5 = y >> 5 (mod 2**k)  [2]

The primary point is that any analysis that ignores the higher-order bits is 
missing the primary thing that matters ;-)

[2] does reveal some potential weaknesses in the scheme.  For example, if k < 
5, some bits of the hash code have no effect on the probe sequence (e.g., if 
k==1, the first probe depends only on the hash code's last bit, and if there's 
collision then a second-probe collision depends only on bit 2**5 -- bits 2**1 
through 2**4 are effectively ignored - but the table only has 2 slots in the 
k==1 case).  Decreasing PERTURB_SHIFT works against that.

OTOH, if k > 5, some of the bits that contributed to [1] being true also feed 
into whether [2] is true.  Increasing PERTURN_SHIFT works against that.

Setting PERTURB_SHIFT=k (i.e., make it depend on the number of slots) avoids 
both, but dosen't appear to actually perform better than always using 5.

The rub is that collisions just aren't a real problem under the current scheme 
- and hashsim.py shows it's doing about as well on that count as the 
theoretical gold standard ("uniform hashing").

If people have time to spend on dicts, I'd rather see them pursue entirely 
different methods, that guarantee to slash the _worst_ case number of probes.  
hashsim.py also shows that while long collision chains are rare, they do occur 
(and they also occur under "uniform hashing").  Then, e.g., we could drop the 
annoying "hash randomization" cruft.  For example, dig into "cuckoo hashing" 
and "Robin Hood hashing".  Just be warned that, regardless of scheme, the 
devil's in the details :-(

--

___
Python tracker 

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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-19 Thread Steve Dower

Steve Dower added the comment:


New changeset 06d6e3d0bb5b8a3d3105289034953a8014356a0b by Steve Dower in branch 
'3.6':
bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on 
vcvarsall.bat (#2252) (#2280)
https://github.com/python/cpython/commit/06d6e3d0bb5b8a3d3105289034953a8014356a0b


--

___
Python tracker 

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



[issue26143] Ensure that IDLE's stdlib imports are from the stdlib

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue30422] Add roadmap.txt section to idlelib

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue27609] IDLE completions: format, factor, and fix

2017-06-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-19 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +2330

___
Python tracker 

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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-19 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +2329

___
Python tracker 

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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-19 Thread Steve Dower

Steve Dower added the comment:


New changeset 40a23e88994aca92c83c8e84ab8b8cdc11d7ec54 by Steve Dower in branch 
'master':
bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on 
vcvarsall.bat (#2252)
https://github.com/python/cpython/commit/40a23e88994aca92c83c8e84ab8b8cdc11d7ec54


--

___
Python tracker 

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



[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2017-06-19 Thread R. David Murray

R. David Murray added the comment:

I'll make one argument in favor of retaining the exception, and if that doesn't 
fly then I agree to the solution and will try to review the PR soon.

The argument is this: if parsedate_to_datetime raises an error, you get 
information about *why* the date was invalid, which you don't get from a 'None' 
return.  It is my thought that this would be the most useful behavior for the 
cases where you call it directly (otherwise, why call it directly?)

(And as far as the doc issue goes, you are correct Barry that the current docs 
don't document the difference in the error case; I noted in another issue that 
that "should be fixed"...which is only the case now if you agree to my argument 
above :)

--

___
Python tracker 

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



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-06-19 Thread Nikolay Kim

Nikolay Kim added the comment:

Let’s close this issue then. I don’t like it anyway.

> On Jun 19, 2017, at 10:21 AM, Grzegorz Grzywacz  
> wrote:
> 
> 
> Grzegorz Grzywacz added the comment:
> 
> This is not problem with madis-data.ncep.noaa.gov not doing ssl shutdown, 
> this is problem with asyncio not doing it.
> 
> Patch from this #30698 issue fix this too.
> 
> --
> nosy: +grzgrzgrz3
> 
> ___
> Python tracker 
> 
> ___

--
nosy: +fafhrd

___
Python tracker 

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



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-06-19 Thread Grzegorz Grzywacz

Grzegorz Grzywacz added the comment:

This is not problem with madis-data.ncep.noaa.gov not doing ssl shutdown, this 
is problem with asyncio not doing it.

Patch from this #30698 issue fix this too.

--
nosy: +grzgrzgrz3

___
Python tracker 

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



[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2017-06-19 Thread Brett Cannon

Brett Cannon added the comment:

So is PR 2035 a fix for this? This discussion on this exact problem seems to 
have ended up spanning a couple issues and a PR so I'm losing track of where 
things sit at the moment.

--

___
Python tracker 

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



  1   2   >