[issue24658] open().write() fails on 2 GB+ data (OS X)

2017-05-21 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue21074] Too aggressive constant folding

2017-05-21 Thread STINNER Victor

STINNER Victor added the comment:

(I reopen the issue since it got a long new comment.)

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

___
Python tracker 

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



[issue24658] open().write() fails on 2 GB+ data (OS X)

2017-05-21 Thread STINNER Victor

STINNER Victor added the comment:

I see that we have other clamps on Windows using INT_MAX:

* sock_setsockopt()
* sock_sendto_impl()

Are these functions ok on macOS? If not, a new issue should be opened ;-)

--

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Louie Lu

Louie Lu added the comment:

Terry: I see, I'll take some debugger stuff to try first.
Cheryl: If you got any problem on 4/5/6, feel free to ask me on IRC or here!

--

___
Python tracker 

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



[issue30416] constant folding opens compiler to quadratic time hashing

2017-05-21 Thread Andrew Dalke

Andrew Dalke added the comment:

A complex solution is to stop constant folding when there are more than a few 
levels of tuples. I suspect there aren't that many cases where there are more 
than 5 levels of tuples and where constant creation can't simply be assigned 
and used as a module variable.

This solution would become even more complex should constant propagation be 
supported.

Another option is to check the value about to be added to co_consts. If it is a 
container, then check if it would require more than a few levels of hash calls. 
If so, then simply add it without ensuring uniqueness.

This could be implemented because the compiler could be told how to carry out 
that check for the handful of supported container types.

--

___
Python tracker 

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



[issue21074] Too aggressive constant folding

2017-05-21 Thread Andrew Dalke

Andrew Dalke added the comment:

I know this issue was closed many years ago, and I don't propose re-opening it. 
I write this comment because some of the earlier comments here make it sound 
like only a foolish or perverse programmer might be affected by this 'too 
aggressive constant folding'. I'll provide a real-world example of how it 
affected me. It took me several hours to track it down, and even longer to 
decide that the fault shouldn't be solely attributed to poor coding practices 
on my side.

I recently updated a code base from Python 2.7 to Python 3.5+. It contains a C 
extension which handles 64-bit indexing. One of the test files, 
"test_large.py", exercises the API with multi-gigabyte strings. It typically 
takes about 10 minutes to run so it isn't part of the normal test suite. 
Instead, it's decorated with a @unittest.skipUnless(), and only enabled if the 
file is executed directly or if an environment variable is set.

The file creates about 25 multi-GB string constants, like 's = b"\xfe" * 
(2**32+1)'. Those alone require a minute to create, but that's acceptable 
overhead because these tests are usually skipped, and when not skipped are only 
10% of the total run-time. Here is an example extracted from my code; this 
tests the population count on a byte string:

RUN_ALL = "LARGE_TESTS" in os.environ
if __name__ ==  "__main__":
RUN_ALL = True

@unittest.skipUnless(RUN_ALL, "large tests not enabled; set LARGE_TESTS")
class LargeTests(unittest.TestSuite):
def test_popcount(self):
s = b"\xfe\xff" * (2**31 + 1)
self.assertEqual(bitops.byte_popcount(s), 15*(2**31 + 1))

if __name__ ==  "__main__":
unittest.main()

As part of the update I did a 'move function' refactoring across the code base 
and re-ran the tests. Unit test discovery seemed to hang and ^C didn't work. 
Investigation showed it was in __import__("test_large"), which was needed 
because I had changed code in test_large.py. I finally figured out it was due 
to constant folding, which created the string, found it was too large, and 
discarded it. Test discovery took a minute, even though all of the tests were 
marked as 'skip' and would not be called.

Once done, the compiler generated a .pyc file. I hadn't noticed the problem 
earlier because the .py file rarely changed, so rarely needed to be recompiled. 
It would have a bigger issue if I ran test_large.py directly, as that will 
always trigger the one minute compilation, even if I specified a test which 
didn't use them. (There were no bugs in 64-bit handling during the update so I 
didn't need to do that.)

I was going to report the issue, then found that INADA Naoki had reported 
almost exactly the same issue here, back in 2014.

I was bewildered by some of the comments here, because they seemed to suggest I 
was at fault for writing such poor quality code in the first place. Others may 
be in the same boat as me, so I'll make a few points to add some 
counter-balance.

"Are we really supposed to protect programmers from their own folly by 
second-guessing when constant folding might be required and when it might not?"

If there is a 'folly', it is shared with the developers of Python's 
constant-folding implementation who thought there wouldn't be a problem, and 
provide no mechanisms (like #2506 proposed in 2008 to disable optimization; 
also available in #26145) which might help people like me diagnose a problem. 
But I don't think there was any folly. There was an engineering decision that 
the benefits of constant folding outweighed the negatives. Just like in my case 
there was an engineering decision that constant expressions which worked in 
Python 2.5-2.7 didn't need to be made future-proof against improved 
constant-folding.

"How is the interpreter supposed to know the function isn't called?"

Perhaps a standard-library decorator which says that a function will be skipped 
when run as a unit test? But really, the question should be "how is the 
*byte-code compiler* supposed to know". This highlights a shift between the 
Python I started with, which left everything up to the run-time virtual machine 
interpreter, and the smarter compile-time optimizer we have now. As it gets 
smarter, we developers seem to need to know more about how the optimizer works 
in order to avoid unwanted side-effects. Currently this knowledge is 'arcane'.

"simply declare a manifest constant and use that instead"

The fundamental problem is there's no way for a programmer to create large 
constant value which is safe from a sufficiently smart compiler, and nothing 
which outlines how smart the compiler will get. Instead, people figure out what 
works operationally, but that's specific to a given CPython version.

My code ran into problems because Python's constant folding improved from under 
me. Even if I follow that advice, how do I avoid having a future version of 
Python restore the problem?

For example, the following function is currently not subject to 

[issue29596] Unfinished sentense in howto/clinic.rst

2017-05-21 Thread G Young

Changes by G Young :


--
pull_requests: +1801

___
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-05-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The existing todo.txt is a decade out of date or so.  A low priority item is to 
review it against open issues + my own todo list.  What I remember from when I 
read it is that some seemed either very low priority or something I don't 
really want to do.  There are also XXX and TODO comments in some modules.

Single window app.  Look at your browser.  Open at least 10 pages in separate 
tabs.  This might be IDLE in the future.   Then imagine that each page was 
instead in a separate window.  This is IDLE today. Find is also in a separate 
window.  On older Windows, most separate windows is a separate icon on the task 
bar, though in Win 10, multiple windows are stacked under one icon. Or try the 
same experiment with a tabbed editor such as Notepad++.  [Note that one can, 
for instance, have multiple windows, but each window usually has multiple tabs.]

--

___
Python tracker 

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



[issue23560] Group the docs of similar methods in stdtypes.rst

2017-05-21 Thread Cheryl Sabella

Cheryl Sabella added the comment:

I hope this is OK, but I created a version of the patch with a table as Raymond 
suggested.  I didn't know how to make a patch, so I did it in a PR.  I wanted 
to have a comparison available to see the differences between the two versions. 
 I used the original categories as defined by Martin.

I could also add a bytearray column if the table looks reasonable.

Thanks!

--

___
Python tracker 

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



[issue23560] Group the docs of similar methods in stdtypes.rst

2017-05-21 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1800

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2017-05-21 Thread Eric Snow

Eric Snow added the comment:

Yes, I still need it. :)

--

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

PR merged.  I will worry about where in the test to call AboutDialog.Ok, which 
has the last uncovered line  - and any other details -- later, perhaps when I 
merge this file into help.py.

--

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 054e09147aaa6f61aca6cd40c7bf7ce6dc54a04b by terryjreedy 
(mlouielu) in branch 'master':
bpo-30290: IDLE: Add more tests for help_about dialog (#1697)
https://github.com/python/cpython/commit/054e09147aaa6f61aca6cd40c7bf7ce6dc54a04b


--

___
Python tracker 

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



[issue24658] open().write() fails on 2 GB+ data (OS X)

2017-05-21 Thread Stéphane Wirtel

Changes by Stéphane Wirtel :


--
pull_requests: +1798

___
Python tracker 

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



[issue24658] open().write() fails on 2 GB+ data (OS X)

2017-05-21 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Hello

I just updated this ticket with a PR on Github.

--

___
Python tracker 

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



[issue30361] Docs example: converting mixed types to floating point

2017-05-21 Thread G Young

Changes by G Young :


--
pull_requests: +1797

___
Python tracker 

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



[issue30388] ndbm can't iterate through values on OS X

2017-05-21 Thread Emily Morehouse

Changes by Emily Morehouse :


--
nosy: +emilyemorehouse

___
Python tracker 

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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-21 Thread Joel Hillacre

Joel Hillacre added the comment:

> Joel, our patch system has moved to GitHub. Mind to turn your patch into a PR?

I have opened a PR now.

I took a look at changing my example into a test. I am not sure how to test for 
a lack of warning. Closest test I found was BadHELOServerTests in 
test_smtplib.py, but using mock_socket would not cause the warning from 
socket.py.

--

___
Python tracker 

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



[issue30413] Add fnmatch.filterfalse function

2017-05-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> 1) what do you think about "os.path is posixpath" vs just checking os.name == 
> 'posix' as I suggested earlier?

Currently os.path is posixpath if and only if os.name == 'posix'. But this can 
be changed in future. I think it is safer to the current check. The posixpath 
module doesn't contain classes, enums or namedtuples, it's import is fast.

And it would be safer to keep the check in the function rather than move it at 
module level.

> What do you think of a keyword argument like 'case' to both filter and 
> filterfalse that, when True, would make these functions behave equivalently to
> [n for n in names if fnmatchcase(n, pattern)]

This is a different issue. fnmatch.filter() was added for speeding up 
glob.glob() (see issue409973). I don't know whether there is a good use case 
for filtercase().

> isn't normcase in both posixpath and ntpath doing isinstance(str, bytes) 
> checks that are redundant with os.fspath?

Good catch! It seems to me that they are redundant. Please open a new issue for 
this.

--
title: Add fnmatch.filter_false function -> Add fnmatch.filterfalse function

___
Python tracker 

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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-21 Thread Joel Hillacre

Changes by Joel Hillacre :


--
pull_requests: +1796

___
Python tracker 

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



[issue30413] Add fnmatch.filter_false function

2017-05-21 Thread Wolfgang Maier

Wolfgang Maier added the comment:

@serhiy: my bad! I just hadn't realized this behavior of the original.
With this requirement I cannot see any simpler solution than Steven's.

Some other questions though to everyone involved:
1) what do you think about "os.path is posixpath" vs just checking os.name == 
'posix' as I suggested earlier?

2) speaking of missing functionality in filter:
What do you think of a keyword argument like 'case' to both filter and 
filterfalse that, when True, would make these functions behave equivalently to
[n for n in names if fnmatchcase(n, pattern)]
The default would be False, of course. I know this would be inconsistent in 
terms of argument vs separate functions, but it is easy to explain and learn 
and without it Windows users of filter/filterfalse would really suffer from the 
much poorer performance due to the slow normcase call (even slower now with the 
new fspath protocol) even if they pass in normalized names already.

3) not directly related to this issue, but I came across it in this context:

isn't normcase in both posixpath and ntpath doing isinstance(str, bytes) checks 
that are redundant with os.fspath? Is this oversight or am I missing something 
again?

--

___
Python tracker 

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



[issue30425] Python 3.6.1 (32-bit)_20170522020736.log

2017-05-21 Thread Chakrit Rakhuang

New submission from Chakrit Rakhuang:

[08B4:3B88][2017-05-22T02:07:36]i001: Burn v3.10.3.3007, Windows v10.0 (Build 
15063: Service Pack 0), path: 
C:\Users\CHAKRI~1\AppData\Local\Temp\{FF4877B7-8096-4550-B901-76C2391DCB87}\.cr\python-3.6.1.exe
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'ActionLikeInstalling' to value 'Installing'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'ActionLikeInstallation' to value 'Setup'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'ShortVersion' to value '3.6'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'ShortVersionNoDot' to value '36'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 'WinVer' to 
value '3.6-32'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'WinVerNoDot' to value '36-32'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'InstallAllUsers' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'InstallLauncherAllUsers' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 'TargetDir' 
to value ''
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'DefaultAllUsersTargetDir' to value '[ProgramFilesFolder]Python[WinVerNoDot]'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'TargetPlatform' to value 'x86'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'DefaultJustForMeTargetDir' to value 
'[LocalAppDataFolder]Programs\Python\Python[WinVerNoDot]'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'OptionalFeaturesRegistryKey' to value 
'Software\Python\PythonCore\[WinVer]\InstalledFeatures'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'TargetDirRegistryKey' to value 
'Software\Python\PythonCore\[WinVer]\InstallPath'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'DefaultCustomTargetDir' to value ''
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'InstallAllUsersState' to value 'enabled'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'InstallLauncherAllUsersState' to value 'enabled'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'CustomInstallLauncherAllUsersState' to value '[InstallLauncherAllUsersState]'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'TargetDirState' to value 'enabled'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'CustomBrowseButtonState' to value 'enabled'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_core' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_exe' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_dev' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_lib' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_test' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_doc' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_tools' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_tcltk' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_pip' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_launcher' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'Include_launcherState' to value 'enabled'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_symbols' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'Include_debug' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'LauncherOnly' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'DetectedLauncher' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'DetectedOldLauncher' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'AssociateFiles' to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 'Shortcuts' 
to value '1'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'PrependPath' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'CompileAll' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing numeric variable 
'SimpleInstall' to value '0'
[08B4:3B88][2017-05-22T02:07:36]i000: Initializing string variable 
'SimpleInstallDescription' to value ''
[08B4:3B88][2017-05-22T02:07:36]i009: Command Line: 
'"-burn.clean.room=C:\Users\Chakrit  
Rakhuang\Downloads\Programs\python-3.6.1.exe" -burn.filehandle.attached=648 
-burn.filehandle.self=624'
[08B4:3B88][2017-05-22T02:07:36]i000: Setting 

[issue30412] mailbox : add option to prevent platform EOL conversion

2017-05-21 Thread R. David Murray

R. David Murray added the comment:

I'm not entirely sure why some of the conversions are done they way they are, 
but I do know that one goal is to make all of the line endings consistent, 
whatever may be the case on disk.  If you aren't modifing the mailbox, nothing 
should happen.  If you are, rewriting it to be consistent would seem to me to 
be the correct thing to do.

If you want to propose a patch that optionally guesses the line discipline of 
the input file and uses it on rewrite, we'll consider it, but I'm really not 
sure it is worth it unless it actually simplifies the existing code and/or 
makes it more consistent, while still meeting the existing behavior of handling 
mixed line endings in the input files.

--
type: behavior -> enhancement
versions:  -Python 2.7, 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



[issue30416] constant folding opens compiler to quadratic time hashing

2017-05-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Caching a tuple's hash value is a nice idea but it would increase the memory 
consumption of all tuples, which would probably hurt much more in the average 
case...  Unless of course we find a way to cache the hash value in a separate 
memory area that's reserved on demand.

--

___
Python tracker 

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



[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-05-21 Thread Utkarsh Upadhyay

Utkarsh Upadhyay added the comment:

So we are okay with

datetime.timedelta(minutes=-1)
# -datetime.timedelta(seconds=60)

and

datetime.timedelta(minutes=-1).seconds
# 86340

datetime.timedelta(minutes=-1).days
# -1

?

Perhaps I'm reading this incorrectly:

"If the repr() shows different numbers than the attributes things are worse 
than now." ~ Guido, https://marc.info/?l=python-dev=145066934224955=2

Maybe he was only talking about:

datetime.timedelta(minutes=-1)
# datetime.timedelta(minutes=-1)

but I would like a second opinion on it. :)

Also, I'll just drop the description of .repr from the .RST documentation 
because it is not to be relied on anyway. Any objections to that?

~
ut

--

___
Python tracker 

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



[issue24960] Can't use lib2to3 with embeddable zip file.

2017-05-21 Thread Gregory P. Smith

Gregory P. Smith added the comment:

re: Paul's "I'm not sure I see why you'd want to run lib2to3 with the embedded 
distribution anyway. Surely you'd do any 2to3 conversion in a normal 
development installation"

lib2to3 is a library useful for doing things with Python code.  Not just a 
stand alone tool.

Kirk: Could you please post your change as a pull request on 
https://github.com/python/cpython/ rather than attaching individual files here. 
 a full file isn't a reviewable change.

Also, Grammar.txt is loaded and saved as a cached pickle file for speed.  When 
packaging up an embedded stdlib bundle I recommend shipping that pickle.  
(loaded in pgen2/grammar.py).

both probably need to use 
https://docs.python.org/3.6/library/pkgutil.html#pkgutil.get_data to read the 
file out of the package rather than assuming it lives on a filesystem.

using the zipfile module within lib2to3 to try and figure out when it should 
look somewhere other than a filesystem is the wrong approach.

--
nosy: +gregory.p.smith
stage:  -> needs patch
versions: +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



[issue26171] heap overflow in zipimporter module

2017-05-21 Thread Berker Peksag

Changes by Berker Peksag :


--
pull_requests:  -1794

___
Python tracker 

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



[issue30424] make pydoc-topics fails

2017-05-21 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> needs patch
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



[issue30424] make pydoc-topics fails

2017-05-21 Thread Jelle Zijlstra

New submission from Jelle Zijlstra:

Running `make pydoc-topics` in Doc/ on master fails with

$ make pydoc-topics
sphinx-build -b pydoc-topics -d build/doctrees -D latex_elements.papersize=  . 
build/pydoc-topics 
Running Sphinx v1.6.1
making output directory...
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [pydoc-topics]: all pydoc topics
updating environment: 466 added, 0 changed, 0 removed
reading sources... [100%] whatsnew/index


looking for now-outdated files... none found
pickling environment... done
checking consistency... done
/Users/jzijlstra-mpbt/py/venvs/venv36/lib/python3.6/site-packages/sphinx/application.py:444:
 RemovedInSphinx17Warning: app.status_iterator() is now deprecated. Use 
sphinx.util.status_iterator() instead.
  RemovedInSphinx17Warning)
/Users/jzijlstra-mpbt/py/venvs/venv36/lib/python3.6/site-packages/sphinx/application.py:425:
 RemovedInSphinx17Warning: app._display_chunk() is now deprecated. Use 
sphinx.util.display_chunk() instead.
  RemovedInSphinx17Warning)
building topics... [  1%] assert


Exception occurred:
  File 
"/Users/jzijlstra-mpbt/py/venvs/venv36/lib/python3.6/site-packages/sphinx/builders/__init__.py",
 line 129, in create_translator
assert translator_class, "translator not found for %s" % 
self.__class__.__name__
AssertionError: translator not found for PydocTopicsBuilder
The full traceback has been saved in 
/var/folders/nh/ctlmlrjs6sx561k27fgn4btmgp/T/sphinx-err-_9ox_985.log, if 
you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message 
can be provided next time.
A bug report can be filed in the tracker at 
. Thanks!
make: *** [build] Error 1


I ran into this because some code in Lib/pydoc.py told me to run make 
pydoc-topics as part of the patch for issue 30406.

--
messages: 294104
nosy: Jelle Zijlstra, ezio.melotti
priority: normal
severity: normal
status: open
title: make pydoc-topics fails

___
Python tracker 

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



[issue30414] multiprocesing.Queue silently ignore messages after exc in _feeder

2017-05-21 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +davin, xiang.zhang

___
Python tracker 

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



[issue30412] mailbox : add option to prevent platform EOL conversion

2017-05-21 Thread Xiang Zhang

Changes by Xiang Zhang :


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



[issue30394] smtplib leaves open sockets around if SMTPConnectError is raised in __init__

2017-05-21 Thread Xiang Zhang

Xiang Zhang added the comment:

Joel, our patch system has moved to GitHub. Mind to turn your patch into a PR?

--
nosy: +xiang.zhang
stage:  -> patch review
type: enhancement -> behavior
versions: +Python 2.7, Python 3.5, Python 3.7

___
Python tracker 

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



[issue30423] [asyncio] orphan future close loop and cause "RuntimeError: Event loop stopped before Future completed."

2017-05-21 Thread Jimmy Lai

New submission from Jimmy Lai:

Problem:
"RuntimeError: Event loop stopped before Future completed." throws when calling 
run_until_complete().

We investigate and find out some orphan futures stay in the event loop before 
we run another run_until_complete(another_async_func()).
The orphan future has pending state and is attached with _run_until_complete_cb 
from previous run_until_complete.
It happens because the orphan future thrown Exception and then raise, thus 
remove_done_callback(_run_until_complete_cb) didn't called.
Move it to finally section can fix it.
With this patch, we stop seeing the Runtime Error.

--
components: asyncio
messages: 294102
nosy: jimmylai, yselivanov
priority: normal
pull_requests: 1795
severity: normal
status: open
title: [asyncio] orphan future close loop and cause "RuntimeError: Event loop 
stopped before Future completed."
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



[issue26171] heap overflow in zipimporter module

2017-05-21 Thread Jimmy Lai

Changes by Jimmy Lai :


--
pull_requests: +1794

___
Python tracker 

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



[issue30416] constant folding opens compiler to quadratic time hashing

2017-05-21 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
nosy: +Jim Fasarakis-Hilliard

___
Python tracker 

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



[issue29854] Segfault when readline history is more then 2 * history size

2017-05-21 Thread Nir Soffer

Nir Soffer added the comment:

This issue does not exist on OS X 10.11.6 (latest my old mac can install).

I tested using .editrc file:

$ cat ~/.editrc
history size 5

With history file with 10 items that crashes on Linux using GNU readline.

This settings is ignored, adding items to the history file without truncating 
it to 5 items.

I tested also truncating the size using readline.set_history_size(). It works 
correctly, but this means every application need to implement its own readline 
configuration, instead of reusing the system readline configuration.

So this bug is relevant only to GNU readline, need to skip this test when using 
libedit.

--

___
Python tracker 

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



[issue30421] argparse: relative include of config files

2017-05-21 Thread Robert Schindler

Changes by Robert Schindler :


--
pull_requests: +1792

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am about to go to bed, way late.

I would like to review and apply all the non-test changes, 4,5,6 in one PR, and 
add 3 since I know what I meant.  There can be multiple commits in one PR 
though.

Louie, from #30422 and a tracker search, you can see that there is lots to do, 
for more that 1 or even 2 people.  I think 4,5,6 are a good way for Cheryl to 
start with IDLE.  Other files need similar changes that do  not need your 
tkinter skills.

If you are looking for a useful challenge, there are 12 open IDLE debugger 
issues + some enhancements debugger ideas I have not bothered to post yet.  If 
that does not interest you, I can try to suggest something else after I get up 
again.

I expect to be away from my computer on my Monday.

--

___
Python tracker 

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



[issue30362] Launcher add list and list with paths options

2017-05-21 Thread Paul Moore

Paul Moore added the comment:

I'm also not a fan of the -0 option. I'm OK with the ability to list available 
interpreters, but there's nothing about -0 as an option that says to me that's 
what it's for.

I'm not a huge fan of including the list in the standard help, as py -h already 
generates the launcher help followed by the Python help and so is pretty 
verbose.

Maybe just bite the bullet and use "py --list"? It doesn't clash with any 
existing Python argument, and the core interpreter doesn't typically use long 
options, so we're probably reasonably safe grabbing --list.

--

___
Python tracker 

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



[issue30421] argparse: relative include of config files

2017-05-21 Thread Robert Schindler

Robert Schindler added the comment:

Hi Louie,

oh, I didn't notice that. But that's great news. I'll send a PR soon.

Best regards
Robert

--

___
Python tracker 

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



[issue29702] Error 0x80070003: Failed to launch elevated child process

2017-05-21 Thread Kai Shen

Kai Shen added the comment:

when you perform the installation and choose the "Download debugging symbols" 
or "Download debug binaries", make sure your internet connection is up and 
available.

--
nosy: +Kai Shen

___
Python tracker 

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



[issue30421] argparse: relative include of config files

2017-05-21 Thread Louie Lu

Louie Lu added the comment:

Hi Robert, the submit flow has migrate to GitHub pull requests workflow, and it 
is strongly preferred to used GitHub PR workflow, do you mind to convert your 
patch to GitHub?


* GitHub repo: https://github.com/python/cpython
* devguide about PR: http://cpython-devguide.readthedocs.io/pullrequest.html

--
nosy: +louielu

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Louie Lu

Louie Lu added the comment:

Cheryl: yes, I may work on 4a/4b and msg294004 on Monday, or do you start at 
these tasks?

--

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Oh, I had started to make the changes, but that's OK.  I'm still doing 
discovery too.  'Fun' did mean that I'll try something.  This is exactly what I 
wanted to work on to dive into tkinter and idle, so I got excited.

Louie, just to coordinate, are you working on other items that Terry listed 
here?

Terry, should I do each item in its own PR for quick review or should I try to 
do many at once in a single PR?  I was doing both the name changes and 
docstrings (and now maybe the import change) in one PR, but maybe that's too 
much?

--

___
Python tracker 

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



[issue30409] locale.getpreferredencoding doesn't return result

2017-05-21 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests:  -1780

___
Python tracker 

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



[issue30419] Bdb: Update doc page

2017-05-21 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +1791

___
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-05-21 Thread Louie Lu

Louie Lu added the comment:

Roadmap definitely helps us for targeting what to do and clear the current 
development status. Such as #27609 helps a lot for focus on improving on part 
of the IDLE.

1. Should this be merged with the existing TODO.txt to ROADMAP.txt?
2. What does a "single window app" mean, the current design isn't a "single 
window app"?

--

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Louie, at first glance, this appears to implement the remaining changes in 1 
and 2.

A possible problem is that I expect the needed 'self.' additions will conflict 
with the name changes on the same lines that Cheryl said she would do, about 10 
hours ago.  Cheryl, if you have not yet started your patch, hold off for now, 
until I can properly review Louie's patch.

--

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2017-05-21 Thread Mark Dickinson

Mark Dickinson added the comment:

Adding Tim Peters to the nosy, since I suspect (without actually having 
checked) that this is his language.

--
nosy: +tim.peters

___
Python tracker 

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



[issue29710] Incorrect representation caveat on bitwise operation docs

2017-05-21 Thread Mark Dickinson

Mark Dickinson added the comment:

So on re-reading the docs, I think we're misinterpreting this part:

> this assumes that there are enough bits so that no overflow occurs during the 
> operation

One way to think of | and & (and ~ and ^, too):

1. Find a positive integer n such that both x and y can be represented *without 
overflow* in n-bit two's complement.

2. Do the computation x | y (or x & y, x ^ y, ~x, as appropriate) in n-bit 
two's-complement arithmetic, giving an n-bit two's complement result that we 
re-interpret as a signed integer in the usual way.

I think the "so that no overflow occurs" refers to choosing n sufficient large 
in the first step above. Note that it doesn't matter what value of n we choose 
to use, so long as it's large enough: evaluating 5 & -17 will work just as well 
using 8-bit two's complement as using 23-bit two's complement --- we'll get the 
same result either way.

(I personally tend to find it easier to think in terms of the infinite 2-adic 
representation, which is essentially what you get by extending the 0 or 1 sign 
bit leftwards into an infinite string of 0s or 1s.)

--

___
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-05-21 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Idlelib needs a roadmap with a bit of history to help orient new contributors 
to IDLE as to where I see it going.  I am not sure whether to add this to 
README.txt or make is a separate roadmap.txt file.  A rough draft (which 
started as just an outline ;-):

Summary of planned improvements:
  Fix bugs and selectively add enhancements.
  Continue improving tests.
  Modernize code and refactor as needed for other improvements.
  Convert tk widgets with ttk equivalents to ttk.
  Convert IDLE from multiple windows to a window with tabbed panes.


Recent history relevant to current improvements:

* Summer 2010: Pydev discussed whether to remove IDLE (too old) or modernize 
it.  'Modernize' mostly meant 'use the better-looking ttk widgets' and 'convert 
IDLE a modern single window app'.  The decision was to modernize, but this was 
mostly blocked from starting at that time.  Using ttk dependably requires 
tcl/tk 8.5.  Reorganizing IDLE externally requires internal reorganization that 
will break 3rd party extensions that use more than the documented extension API.

* Winter 2013: PEP 434 formalized the practice of allowing IDLE improvements to 
be backported even if more of an enhancement than a bug fix.  Except for 
idlelib.idle.*, it also declared idlelib to be a 'private implementation 
modules'.  The intention was to eventually allow refactoring, even if not 
immediately.  'Big' changes like using ttk and tabbed pane conversion were 
specifically kept blocked until decided otherwise in further discussion.

* Spring 2016: After the required further discussion, which began the previous 
summer, modernization and refactoring were unblocked for IDLE 3.6+.  IDLE 3.6 
was allowed to (and now does) require tcl/tk 8.5.  Any 3rd-party code that 
requires 3.5 idlelib can adjust, require Python 3.5, or incorporate 3.5 idlelib.


Specific goals for 3.7:

* Bug fixes: Some priorities are fix hangs and crashes; continue after 
exceptions, if possible, instead of exiting; display fatal exceptions in a tk 
messagebox before exiting.  Backport all changes to 3.6.  

* Unittests: Continue expanding the test/test_idle.py and  idlelib/idle_test/ 
suite begun in Summer 2013.  Change code as needed to enable testing.  (The May 
2016 decision allows this to be done freely.)  Ideally, test every patch to 
prevent regressions.

* Dialog appearance and operation: Htests ensure that widget creation code runs 
and that the 'look and feel' is minimally acceptable.  Convert any remaining 
'sanity check' code not converted in summer 2014, such as in config.py.  Fix 
some remaining consistency issues.  Rework About IDLE and the option dialogs.

* Modernizing code: After the May 2016 decisions, modules were renamed to short 
lowercase PEP8 names.  Changes within modules are best done when adding tests 
(if a module is not already fully tested).  Some specifics:
  - Convert function names to lowercase.
  - Replace '*' in 'from tkinter import *' with objects.
  - Convert tkinter submodule imports from the backwards-looking 2to3 
conversion.  Change 'import tkinter.font as TkFont' to 'from tkinter import 
font' and replace 'TkFont' with 'font' in the rest of a module.  Do the same 
with messagebox, colorchooser, and simpledialog.
  - Eliminate unneeded intermediate collections objects (some from 2to3 
conversion).  Example: 'for k in list(d.keys):' should be 'for k in d:'.

[Notes: import * and VALUE versus 'value' are discussed in #30290. Searching 
idlelib for 'import tkinter.' gets 16 hits.]

* Refactoring: Make Editor, PyShell, and Output subclasses of a base text-based 
window that only has common features.  Separate startup code from pyshell.

* Ttk widgets: Some windows and dialogs have been converted.  Finish.  
Optional: allow selection of available themes.  [Futuristic: create an IDLE 
theme, possibly based on the Python snake colors, green, blue, and yellow.]

* Tabbed panes: Convert any listed toplevel windows with multiple widgets to 
windows with a frame with multiple widgets.  (The help window was specifically 
designed this way.)  Frames can later be moved from the window to a tab.  (To 
do this, text-based frames in menu windows must also be disentangled from the 
menu.)

I would like to have a single window app by 2017, but that is too speculative 
to list now.

--
assignee: terry.reedy
messages: 294089
nosy: csabella, louielu, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Add roadmap.txt section to idlelib
type: enhancement
versions: 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



[issue30421] argparse: relative include of config files

2017-05-21 Thread Robert Schindler

Changes by Robert Schindler :


Added file: http://bugs.python.org/file46882/argparse_relative_includes2.patch

___
Python tracker 

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



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-21 Thread STINNER Victor

STINNER Victor added the comment:

So, would you mind to write such PR?

--

___
Python tracker 

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



[issue30418] test_communicate_epipe() of test_subprocess fails randomly on AMD64 Windows7 SP1 3.x

2017-05-21 Thread STINNER Victor

STINNER Victor added the comment:

Basically, Windows EINVAL here looks like UNIX EPIPE. I agree to always
ignore it (remove the check on poll()).

I added the poll() check when I added the EINVAL test because I don't know
well Windows and I didn't know that write () can also fail with EINVAL if
the process is still running.

Your example makes it perfectly clear.

In short, Python must behave the same on Windows and UNIX on your example:
ignore errors on stdin.write().

--

___
Python tracker 

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



[issue30421] argparse: relative include of config files

2017-05-21 Thread Robert Schindler

Changes by Robert Schindler :


--
title: Relative include of config files -> argparse: relative include of config 
files

___
Python tracker 

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



[issue30421] Relative include of config files

2017-05-21 Thread Robert Schindler

New submission from Robert Schindler:

Hi,

When one includes an argument file at the command line using argparse and that 
file contains another include statement, the inner include path is treated as 
relative to os.getcwd(), what is not the way people expect it to be, I guess.

This patch modifies argparse so that it treats paths of files to include as 
relative to the location of the file the include was made from.

I also pulled statements that I think should not be enclosed by the try/except 
out of it and changed the workflow so that the file descriptor of an include 
file is closed before another one is opened by the recursive call to 
_read_args_from_files again.. That way, the number of file descriptors open at 
a time is kept low.

Best regards
Robert

--
components: Library (Lib)
files: argparse_relative_includes.patch
keywords: patch
messages: 294086
nosy: roschi
priority: normal
severity: normal
status: open
title: Relative include of config files
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46881/argparse_relative_includes.patch

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 2b67c7aae7344365dfc12a31e72e4b2659e6875d by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-30415: Add new tests for the fnmatch module. (GH-1684). (#1696)
https://github.com/python/cpython/commit/2b67c7aae7344365dfc12a31e72e4b2659e6875d


--

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset bc75b72d393bc40c3243d7099db6c2c39fe632aa by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-30415: Add new tests for the fnmatch module. (GH-1684) (#1695)
https://github.com/python/cpython/commit/bc75b72d393bc40c3243d7099db6c2c39fe632aa


--

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset cf5c1be8f6e0bc90280f66c65bb49808f01bfb3a by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30415: Add new tests for the fnmatch module. (GH-1684) (#1694)
https://github.com/python/cpython/commit/cf5c1be8f6e0bc90280f66c65bb49808f01bfb3a


--

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Louie Lu

Louie Lu added the comment:

Due to the merged of #30303, text_view now have _utest attribute for unittest, 
upload the unittest of help_about dialog in PR 1697

--
nosy: +louielu

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1790

___
Python tracker 

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



[issue30362] Launcher add list and list with paths options

2017-05-21 Thread Steve Barnes

Steve Barnes added the comment:

Latest push still has -0 and -0p options for explicit discovery but also 
defaults to displaying the list if the requested version is not found. (As well 
as the default python being marked with a trailing * - I have also removed the 
less than helpful "default python not found when no pythons were found, (very 
much a corner case).

I feel that the help text is a little on the long side to include the list as 
well in response to --help so only added it to match not found use case.

I also feel quite strongly that the option for displaying the discovered paths 
saves a step or two in locating problem installations.

--

___
Python tracker 

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



[issue23560] Group the docs of similar methods in stdtypes.rst

2017-05-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I don't think this should be done.  Instead, add a table at the top listing the 
functions in groups, possibly linking to the alphabetical details docs below.

When looking a what a string method does, alphabetical makes the search easier 
than having to guess which group something is in before you can find it.

--
nosy: +rhettinger

___
Python tracker 

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



[issue30290] IDLE: add tests for help_about.py

2017-05-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I take 'fun' to mean you will try something.  And yes, I have thought about the 
following for all IDLE modules.

6. Replace "from tkinter import *".  It was mainly intended for interactive 
use. In production IDLE, use either
a. from tkinter  import Tk, Frame, Label, Button, 
b. import tkinter as tk

6a requires more typing in the import statement, but as a replacement, leaves 
the rest of the code alone.  It documents what widgets will be used in the 
module.  It allows individual classes to be mocked for a particular test or 
group of tests.  I know I have done this for the tkinter TypeVar classes.

6b has a short import but requires more typing in the module body, especially 
when tkinter constants are present, as they are here.

When exploring or writing short, one-off programs, I usually use 'as tk'.  But 
for IDLE, I may have converted at least one file to 'as tk', but I am now using 
'import Tk, ...' and prefer it.

My current thoughts about Tkinter constants versus string literals, such as 
BOTH versus 'both': The two forms by themselves are about equally easy to type. 
 The CAPS form is shorter but louder, whereas to me they are minor items that 
should not be loud. The constants seem designed to work with 'import *'; one 
can then potentially use name completion for the longer names.  After 'as tk', 
I think "tk.Both" is worse than "'both'".  For new code with explicit imports, 
adding constants to the imports is extra work.  For existing code with many 
constants, such as help_about, adding constants to the imports is less work 
than converting.  So I am inclined to leave them as are until such time as we 
might do a search-replace throughout idlelib.

When there are a few constants, I have put them after the classes.  For this 
module, I would like to try a separate import rather than use '\' line 
continuation.

from tkinter import TOP, BOTTOM, SIDE, SUNKEN, EW, ...
---

In one file with just two constants, I initially converted to the quoted 
literal, but another core dev objected on the basis that the constants are 
checked when the function is compiled instead of when called, and that this is 
somehow safer.  For when issue comes up again, I am recording my current 
replies here.

1. The same logic would suggest that we should write, for instance, 
"open(filename, mode=W, encoding=ASCII, errors=STRICT)" (after appropriate 
imports) instead of the current "open(filename, mode='w', encoding='ascii', 
errors='strict')".

2. If running a file to do a test compile also does a test call of 
create-widget functions, then the objection does not apply.  For every IDLE 
file that creates tk windows, there is an htest, initiated by running the file, 
that creates an instance of the window.  The first purpose is to insure that 
widget creation calls are legitimate.  The unit tests will eventually do the 
same, as in 1b above.  (The second purpose, not duplicated by unittests, is to 
see if the result 'looks good'.)

--

___
Python tracker 

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



[issue30413] Add fnmatch.filter_false function

2017-05-21 Thread Steven D'Aprano

Steven D'Aprano added the comment:

I'm happy for you to change the name to filterfalse.

--

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1789

___
Python tracker 

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



[issue30416] constant folding opens compiler to quadratic time hashing

2017-05-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +pitrou

___
Python tracker 

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



[issue29976] urllib.parse clarify what ' ' in schemes mean

2017-05-21 Thread Senthil Kumaran

Senthil Kumaran added the comment:


New changeset b5bf7e85b74070973bff3e69990f948a0ed5efdb by Senthil Kumaran in 
branch '3.6':
bpo-29976: urllib.parse clarify '' in scheme values. (GH-984) (GH-1692)
https://github.com/python/cpython/commit/b5bf7e85b74070973bff3e69990f948a0ed5efdb


--

___
Python tracker 

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



[issue29976] urllib.parse clarify what ' ' in schemes mean

2017-05-21 Thread Senthil Kumaran

Senthil Kumaran added the comment:


New changeset a2a822614c64b01b0cf5c0ee63a96b3ad4561a85 by Senthil Kumaran in 
branch '3.5':
bpo-29976: urllib.parse clarify '' in scheme values. (GH-984) (GH-1693)
https://github.com/python/cpython/commit/a2a822614c64b01b0cf5c0ee63a96b3ad4561a85


--

___
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-05-21 Thread Martin Panter

Martin Panter added the comment:

If you add “cwd” to Frequently Use Arguments, please try to keep the details in 
one place. Otherwise you encourage a fix for Issue 15533 (cwd platform 
specifics) to repeat the problem of Issue 20344 (args vs shell platform 
specifics), where some details are only found in one section and contradict the 
other section.

--

___
Python tracker 

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



[issue30415] Improve fnmatch testing

2017-05-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1788

___
Python tracker 

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