[issue24810] UX mode for IDLE targeted to 'new learners'

2016-06-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is not going to go anywhere for the present.

--
assignee:  -> terry.reedy
resolution:  -> rejected
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



[issue27173] Modern Unix key bindings for IDLE

2016-06-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I don't understand 
>  idle_modern_unix_key_set3.patch effectively fixes [the bug].
That is the patch that generated the exception I posted.

I look forward to contributions to improving the dialog.  Redoing the font tab 
is #24776.  The highlight tab is #24781.  The latest mockups look like 
improvements to me, but we can discuss further.  (#24781 also has Mark's 
proposed refactoring of the dialog code, but I have not reviewed in detail.)  
There are numerous issues connected with key definitions.

--

___
Python tracker 

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



[issue27242] Make the docs for NotImplemented & NotImplementedError unambigous

2016-06-06 Thread Emanuel Barry

Emanuel Barry added the comment:

New patch with small tweaks. Thanks Jelle for the comments!

--
Added file: 
http://bugs.python.org/file43273/NotImplemented_exceptions_wording_3.patch

___
Python tracker 

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



[issue27238] Bare except: usages in turtle.py

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Brett and Martin.

Jelle, I think it would be safer to use "except Exception" here. "except 
(TypeError, ValueError):" is not enough.

--

___
Python tracker 

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



[issue27246] Keyboard Shortcuts Crash Idle

2016-06-06 Thread Emanuel Barry

Emanuel Barry added the comment:

Your report was already addressed in #27192, and the solution to your problem 
was given by Ned Deily. If you are still experiencing crashes with the official 
python.org version, please specify so. In the meantime, I'm closing this off as 
duplicate.

--
nosy: +ebarry
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Keyboard Shortcuts Consistently Cause Crashes

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

After applying this patch I'm going to redesign Highlighting and Keys tabs in 
the Settings dialog.

--

___
Python tracker 

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



[issue27246] Keyboard Shortcuts Crash Idle

2016-06-06 Thread Harrison Chudleigh

New submission from Harrison Chudleigh:

When pressing Alt-E, Alt-I, Alt-N and Alt-U to create special characters in 
IDLE (the diacritics ´,ˆ,˜and¨) the program crashed.

--
components: IDLE
messages: 267590
nosy: Harrison Chudleigh
priority: normal
severity: normal
status: open
title: Keyboard Shortcuts Crash Idle
type: crash
versions: Python 3.4

___
Python tracker 

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



[issue27242] Make the docs for NotImplemented & NotImplementedError unambigous

2016-06-06 Thread Emanuel Barry

Emanuel Barry added the comment:

Added further notes to `NotImplemented` and `NotImplementedError` to clearly 
state the differences between the two. I also added some more details to 
`TypeError` - I'm amazed at how little was described for such a common 
exception!

Maybe I explained a bit too thoroughly in some parts, but I like to have 
everything unambigous and well explained.

I haven't yet spent the time to learn how to build documentation (Soon™), so 
I'm going off the existing docs, and I try to follow the style as closely as 
possible.

--
title: Clarify the use cases of NotImplemented in the docs -> Make the docs for 
NotImplemented & NotImplementedError unambigous
Added file: 
http://bugs.python.org/file43272/NotImplemented_exceptions_wording_2.patch

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm aware of the bug with deleting current key set. 
idle_modern_unix_key_set3.patch effectively fixes it.

--

___
Python tracker 

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



[issue5124] IDLE - pasting text doesn't delete selection

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think it is better to fix this in all versions unconditionally.

This simple workaround is good enough for IDLE, but if add it as a part of 
Tkinter, it should be much more complex. I prefer to provide this as a recipe 
at http://code.activestate.com/recipes/langs/python/ .

--

___
Python tracker 

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



[issue26415] Fragmentation of the heap memory in the Python parser

2016-06-06 Thread Benjamin Peterson

Benjamin Peterson added the comment:

It seems to me a simpler solution would be allocate all nodes for a parse tree 
in an arena.

--

___
Python tracker 

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



[issue27127] Never have GET_ITER not followed by FOR_ITER

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What if generate following code?

GET_ITER
JUMP_FORWARD L2
L1:
# ...
L2:
FOR_ITER L1

This saves one jump instruction per iteration.

Next, we can merge GET_ITER+JUMP_FORWARD in one FOR_BEGIN instruction for 
regular loops. Generators will start with JUMP_FORWARD.

--

___
Python tracker 

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



[issue27127] Never have GET_ITER not followed by FOR_ITER

2016-06-06 Thread Demur Rumed

Changes by Demur Rumed :


Added file: http://bugs.python.org/file43271/forbegin2.patch

___
Python tracker 

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



[issue27227] argparse fails to parse [] when using choices and nargs='*'

2016-06-06 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> needs patch
versions:  -Python 3.4

___
Python tracker 

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



[issue27127] Never have GET_ITER not followed by FOR_ITER

2016-06-06 Thread Demur Rumed

Changes by Demur Rumed :


Removed file: http://bugs.python.org/file43270/forbegin2.patch

___
Python tracker 

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



[issue27127] Never have GET_ITER not followed by FOR_ITER

2016-06-06 Thread Demur Rumed

Demur Rumed added the comment:

Attached is a patch which fixes test_sys_settrace & test_pdb & test_trace. 
Still failing is test_genexps. I'm unsure the best way to fix this one:

1. Allow generator expressions to defer type errors about non iterables until 
the initial call to next

2. Create a TEST_ITER opcode entirely for generator expressions to eagerly throw

3. Generate instructions like
FOR_BEGIN, if empty, jump over generator & put an empty generator on the stack
-> CALL_FUNCTION 2, have generator produce code as LOAD_FAST 0, LOAD_FAST 1, 
, FOR_ITER repeat  (ie translate stack of FOR_BEGIN from before 
call as header of generator)

Empty generator can be created with 'LOAD_CONST (None,), FOR_BEGIN, POP' but it 
seems rather bad to have generators require 3 more opcodes around their 
creation than currently

--
Added file: http://bugs.python.org/file43270/forbegin2.patch

___
Python tracker 

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



[issue19234] socket.fileno() documentation

2016-06-06 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue7949] IDLE: problems with dark GTK or KDE color schemes

2016-06-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Use of ttk got delayed for back-compatibility issues.  We should be clear to 
start in a week.

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



[issue27173] Modern Unix key bindings for IDLE

2016-06-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I looked at _set3 and it looks plausible and possibly complete other than 
testing.  I added something about testing customizations to #27099.  This 
applied cleanly to 3.6.  3.6 started, dialog opened, new key set selected, 
dialog closed, config-main.cfg looks good.  Open dialog, same as custom, close 
dialog, config-keys and config main changed as expected.  Open 3.5, open 
dialog, everything looks fine.

Now the problems.

1. To delete, one must select as current.  After deletion, config tries to 
reread the keyset just deleted.  This prints a warning to console for each item 
in the set, with message as to default used instead.   The same happens with 
deleting custom themes.  I may have noted this somewhere, but cannot find.

In any case, the solution for both problems is to either allow deletion of 
non-selected sets, and only such, or to switch to *something* before 
re-reading.  I open a new issue, #27245, for this.

2. More serious, the warnigs are followed by
Exception in Tkinter callback
Traceback (most recent call last):
  File "F:\Python\dev\35\lib\tkinter\__init__.py", line 1550, in __call__
return self.func(*args)
  File "F:\Python\dev\35\lib\idlelib\configDialog.py", line 1182, in Ok
self.Apply()
  File "F:\Python\dev\35\lib\idlelib\configDialog.py", line 1186, in Apply
self.DeactivateCurrentConfig()
  File "F:\Python\dev\35\lib\idlelib\configDialog.py", line 1166, in 
DeactivateCurrentConfig
instance.RemoveKeybindings()
  File "F:\Python\dev\35\lib\idlelib\EditorWindow.py", line 771, in 
RemoveKeybindings
self.text.event_delete(event, *keylist)
  File "F:\Python\dev\35\lib\idlelib\MultiCall.py", line 391, in event_delete
self.__binders[triplet[1]].unbind(triplet, func)
  File "F:\Python\dev\35\lib\idlelib\MultiCall.py", line 234, in unbind
doit()
  File "F:\Python\dev\35\lib\idlelib\MultiCall.py", line 232, in 
doit = lambda: self.bindedfuncs[triplet[2]][triplet[0]].remove(func)
ValueError: list.remove(x): x not in list

Hitting OK repeats warnings and traceback (the last line might have been a bit 
different the first time).  Only Cancel would close.

--

___
Python tracker 

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



[issue27245] IDLE: Fix deletion of custom themes and key bindings

2016-06-06 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Open IDLE by running from console or importing idlelib.idle in interactive 
Python window.  In the IDLE Preferences dialog, create a new custom theme or 
key set.  [Apply] or close with [OK].  Reopen, if necessary, select the new 
custom set as current, select Delete, and Apply or close.  IDLE will delete the 
set and then try to read it.  A warning message will appear in the 
console/interpreter for each item in the set that is had to replace with the 
default value.

IDLE should replace the deleted set with one of the builtins before reading, or 
even better, allow and require deletion of something that is not current.

--
messages: 267580
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: Fix deletion of custom themes and key bindings
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



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ec214654708f by Martin Panter in branch '2.7':
Issue #27229: Comment in middle of shell command fails on BSD and OS X
https://hg.python.org/cpython/rev/ec214654708f

New changeset de5b85f96266 by Martin Panter in branch '3.5':
Issue #27229: Comment in middle of shell command fails on BSD and OS X
https://hg.python.org/cpython/rev/de5b85f96266

New changeset b7a4c076ba40 by Martin Panter in branch 'default':
Issue #27229: Merge makefile fix from 3.5
https://hg.python.org/cpython/rev/b7a4c076ba40

--

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Nick Coghlan

Nick Coghlan added the comment:

Yury's proposal sounds good to me - I'll have time to do a proper review 
tomorrow (at a quick glance, my one suggestion is to move the if statement 
outside the example decorator, so the decorator is defined differently based on 
the Python version, rather than checking the version when called)

--

___
Python tracker 

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



[issue5124] IDLE - pasting text doesn't delete selection

2016-06-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I can't test but I looked at the patch.  It uses the new-to-me fact that bound 
'functions' can be tcl code in a string.  For me, root.bind_class('Text', 
'<>') returns the code string '\ntk_textPaste %W\n'.  Options for 
the patch:

0. Do nothing.
1. 3.6 as option (default TBD).
2. 3.6 as fixed change.
3. All versions as option (default TBD).
4. All versions as fixed change.

I have determined that adding new sections to config-main does not affect 
previous releases, so 1 and 3 are possible.  See the post I just made to #27099 
as to what is needed for new options.

For 1 and 3, there is the question of default - 'insert' versus 'replace', and 
for 3, whether it should be the same in all versions.  I don't think 'insert' 
and the option should stay around forever.

The question we need to think about is what would be best for beginners. The 
young but experienced Widows user, new to Linux, reported this to me as a bug 
that tripped her up a lot.

Serhiy, I think that this change, at least as an option, should be in tkinter, 
so as to make it more 'cross-platform'.  In the meantime, I will look at 
including this with the changes in #20799.

I am thinking about posting to python-ideas for other opinions on what to do in 
which package.

--

___
Python tracker 

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



[issue27229] In tree cross-build fails copying Include/graminit.h to itself

2016-06-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 619f7a2aa40a by Martin Panter in branch '3.5':
Issue #27229: Fix in-tree cross-build rule, by Xavier de Gaye
https://hg.python.org/cpython/rev/619f7a2aa40a

New changeset 9902230b101f by Martin Panter in branch 'default':
Issue #27229: Merge cross-compiling fix from 3.5
https://hg.python.org/cpython/rev/9902230b101f

New changeset ffed402528c7 by Martin Panter in branch '2.7':
Issue #27229: Fix in-tree cross-build rule, by Xavier de Gaye
https://hg.python.org/cpython/rev/ffed402528c7

--
nosy: +python-dev

___
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

2016-06-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The final paragraph of my initial post should have talked about config-main and 
features, rather than keys.

The following experiment indicates that adding new sections to config-main.def 
and customizations thereof to config-main.cfg should not be a problem. 

Add the following to config-main.cfg
[NewSection]
new = True

Open IDLE 2.7 from console (python, with import).
Open config dialog.
Change item.
Close with [OK]
confirm that change is written and new section is left alone.
Close IDLE.
Repeat with 3.5.

Old versions will not see new config-main.def, so that is not an issue.

Conclusion: adding a new section that old versions ignore is much safer then 
adding a new value for a current section that old versions do read and act 
on, and which may refer to something that does not exist.  (This was the 
problem with IDLE Dark theme and would be with Unix New keyset).

The remaining issues:

4. Finding a place on the dialog itself for new customization widgets. On Font, 
Theme, and General tabs, there is space available either now or with some 
changes.  The dialog can be enlarged if needed.

5. Adding the behind-the-scenes plumbing.  This is mostly straightforward.

6. Doing minimal refactoring to make better testing easier.
That would include being able to patch in a .idlerc directory or individual 
user files.  The files are small and could easily fit in memory as StringIOs.

I would like to be able to set user files, open config and idleConf, open 
config dialog, simulate user actions on the dialog, close, and check the effect 
on the files.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27188] sqlite3 execute* methods return value not documented

2016-06-06 Thread Dave Sawyer

Dave Sawyer added the comment:

No problem. I did a pull and reposted with additional fixes suggested by
Berker and one copy/paste error I spotted.

On Sat, Jun 4, 2016 at 11:34 PM, SilentGhost  wrote:

>
> SilentGhost added the comment:
>
> Thanks for the patch, Dave. For whatever reason it doesn't seem to apply
> cleanly to the current tip, would you mind preparing a new patch that does?
>
> --
> assignee:  -> docs@python
> components: +Documentation
> nosy: +SilentGhost, berker.peksag, docs@python, ghaering
> stage:  -> patch review
> type: enhancement -> behavior
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue27188] sqlite3 execute* methods return value not documented

2016-06-06 Thread Dave Sawyer

Dave Sawyer added the comment:

Updated optional parameters. Fixed executescript which takes a single 
parameter. The English is correct - one needs to looks at the verbs to be sure 
they match in tense and number. Like "He OPENS the fridge, GRABS the milk, and 
DRINKS it." This method CREATES a cursor, CALLS the method, and RETURNS the 
cursor.

--
Added file: http://bugs.python.org/file43269/issue27188_patch2.txt

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Yury Selivanov

Yury Selivanov added the comment:

Updated patch (fix_aiter2.patch)

--
Added file: http://bugs.python.org/file43268/fix_aiter2.patch

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-06 Thread Colm Buckley

Colm Buckley added the comment:

@larry

Short version; I'm not set up on HG and don't have enough time to get there 
from here. The patch I submitted applies cleanly to the HG tip as of 15 minutes 
ago (rev 101768) with only offset changes; the attached v4 version includes the 
necessary offset changes.

--
Added file: http://bugs.python.org/file43267/getrandom_nonblocking_v4.patch

___
Python tracker 

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



[issue27238] Bare except: usages in turtle.py

2016-06-06 Thread Martin Panter

Martin Panter added the comment:

The documentation says __file__ can be missing. It is missing for builtin 
modules (e.g. sys) and frozen modules (e.g. __hello__).

--
nosy: +martin.panter

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

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



[issue26467] Add async magic method support to unittest.mock.Mock

2016-06-06 Thread Brett Cannon

Brett Cannon added the comment:

There's also __aiter__, but it's semantics might be changing (issue #27243).

Robert or Michael, any opinions on Yusuke's proposal?

--
nosy: +rbcollins

___
Python tracker 

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



[issue27242] Clarify the use cases of NotImplemented in the docs

2016-06-06 Thread Raymond Hettinger

Raymond Hettinger added the comment:

It would be nice to also clarify and differentiate NotImplementedError as well.

--
nosy: +rhettinger

___
Python tracker 

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



[issue27242] Clarify the use cases of NotImplemented in the docs

2016-06-06 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue27242] Clarify the use cases of NotImplemented in the docs

2016-06-06 Thread Guido van Rossum

Guido van Rossum added the comment:

LGTM

--
nosy: +gvanrossum

___
Python tracker 

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



[issue20210] Provide configure options to enable/disable Python modules and extensions

2016-06-06 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Just found this ticket and apparently late to the game...

Some comments:

It is already possible to selectively build Python C extension modules in the 
stdlib via editing the Modules/Setup file and this is a lot better to maintain 
than a long list of configure options.

Martin's suggestion to add support for a *disabled* option would make this even 
easier. This would also complement the *static* and *shared* option we have for 
Modules/Setup to define modules to compile into the main executable rather than 
as shared module.

The only bit that's missing (if really needed), is to prevent setup.py from 
building modules not listed in Modules/Setup as shared libs. This could be had 
with a single configure option, e.g. --disable-setuppy-builds.

But all that said, I don't think, it's really necessary to cripple Python just 
to save some image space. As you can see with our eGenix PyRun runtime, it is 
possible to compress Python down to just a few MBs:

http://www.egenix.com/products/python/PyRun/

while still having most of the stdlib readily available.

--
nosy: +lemburg

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Yury Selivanov

Yury Selivanov added the comment:

> Can you guys get this solid and checked in before then?

Will do my best.  I'll update the patch soon with some code comments and docs.

--

___
Python tracker 

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



[issue27239] Make idlelib.macosx self-contained.

2016-06-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Here is a post-import patch with tests.

--
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file43266/macosx-contained.diff

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Larry Hastings

Larry Hastings added the comment:

Okay.

I'm hoping to not delay 3.5.2 RC1, and the schedule calls for me to tag the 
release Saturday afternoon.  Can you guys get this solid and checked in before 
then?

--

___
Python tracker 

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



[issue27238] Bare except: usages in turtle.py

2016-06-06 Thread Brett Cannon

Brett Cannon added the comment:

__file__ could be None if __spec__.origin is None. The import machinery doesn't 
introspect on __file__ for anything, so it won't break import if __file__ has 
alternative values. In general, though, normal imports will set __file__ to a 
string.

--

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Guido van Rossum

Guido van Rossum added the comment:

Unless Nick disagrees (or unless we can't figure out how to implement it) I
think Yury's proposal makes sense. So if Larry is asking for my fiat, this
is it.

--

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Yury Selivanov

Yury Selivanov added the comment:

It's a rather long & conservative process, but it will be easier for people to 
migrate their code.

--

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Yury Selivanov

Yury Selivanov added the comment:

> While I agree this needs to be fixed, one key piece of documentation needed 
> will be to cover how to write an __aiter__ method that does the right thing 
> on both 3.5.1 and 3.5.2+ (and also avoids the deprecation warning in the 
> latter case).

Oh, this is tough.

How about we do this:

1. In 3.5.2 we start to support new behaviour. We raise 
PendingDeprecationWarning.  We update documentation and PEP 492.  The 
recommended way to write 3.5 code is to keep returning awaitables from 
__aiter__.  We can add a snippet of code for a compatibility decorator to the 
docs.

2. In 3.6 we start to raise DeprecationWarning.  The recommended way to write 
code for 3.6 & 3.7 is to return async iterators from __aiter__.

3. In 3.7 we remove support of the old behaviour.

It's a rather long & conservative process, but it will be

--

___
Python tracker 

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



[issue25602] Add support for EVFILT_USER kqueue filter

2016-06-06 Thread William Grzybowski

William Grzybowski added the comment:

I have bumped into this issue as well.

This change would be much appreciate on my end.

What can we do to move the ball forward here?

Thanks!

--
nosy: +wg

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Larry Hastings

Larry Hastings added the comment:

As RM my default position is naturally "don't change behavior in point 
releases".  I'm willing to be overruled by the BDFL, less so by anybody else.

--

___
Python tracker 

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



[issue27238] Bare except: usages in turtle.py

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Brett, can __file__ of imported/executed module be None, bytes or absent in 
3.6? Can it be non-str?

--
nosy: +brett.cannon

___
Python tracker 

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



[issue20210] Provide configure options to enable/disable Python modules and extensions

2016-06-06 Thread STINNER Victor

STINNER Victor added the comment:

Fedora 24 also uses a minimal "system python" to get small cloud
image: https://fedoraproject.org/wiki/Changes/System_Python#Benefit_to_Fedora

The base package only contains the minimum subset of the stdlib, the
full stdlib comes with a second package based on the first one.

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-06 Thread Larry Hastings

Larry Hastings added the comment:

>  I'm uploading a third version of the patch (against clean 3.5.1 source

Not against the 3.5 branch from hg.python.org/cpython ?  If not, why not?

--

___
Python tracker 

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



[issue27236] Add CHAINED_COMPARE_OP opcode

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your tests Josh.

I have collected additional statistics. According to it CHAINED_COMPARE_OP 
would be used 100 times less than COMPARE_OP. This is not worth adding new 
opcode.

--
resolution:  -> rejected
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



[issue27244] print(';;') fails in pdb with SyntaxError

2016-06-06 Thread wim glenn

wim glenn added the comment:

Seems to be as documented here:

https://docs.python.org/2/library/pdb.html#debugger-commands

"No intelligence is applied to separating the commands; the input is split at 
the first ;; pair, even if it is in the middle of a quoted string."

--
nosy: +wim.glenn

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Nick Coghlan

Nick Coghlan added the comment:

Since the old behaviour is only deprecated with Yury's changes, rather than 
disallowed entirely, I think it makes sense to provide a 3.5.x version that 
also supports the new behaviour.

In addition to my docs comment above, the other thing I noticed in reviewing 
the patch is that the proposed tests don't currently check that we *don't* emit 
a deprecation warning for the newly permitted forward compatible cases that 
return an asynchronous iterator (rather than an awaitable) directly from 
__aiter__.

There are definitely some tests that exercise that path, so we could rely on 
the general principle of "the test suite shouldn't emit deprecation warnings", 
but we could also add some tests that specifically check that no warning is 
emitted in that case.

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-06 Thread Colm Buckley

Colm Buckley added the comment:

@larry -

Thank you for joining in. I'm uploading a third version of the patch (against 
clean 3.5.1 source, with correct whitespace and a less confusing comment) which 
implements the following:

* configure.ac / pyconfig.h.in : looks for linux/random.h and sets 
HAVE_LINUX_RANDOM_H if present.

* random.c : calls getrandom() with the GRND_NONBLOCK flag; if that fails, fall 
back to reading /dev/urandom which will have insufficient entropy but will at 
least return some data.

I feel that there is no consistent way to signal to higher-level applications 
that the random data has sub-standard entropy; but that this at least preserves 
the expected semantics, and doesn't block on startup in the event of an 
uninitialized entropy pool.

--
Added file: http://bugs.python.org/file43265/getrandom-nonblocking-v3.patch

___
Python tracker 

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



[issue27244] print(';;') fails in pdb with SyntaxError

2016-06-06 Thread Chris Withers

New submission from Chris Withers:

This doesn't seem right:

(Pdb) ';;'
*** SyntaxError: EOL while scanning string literal
*** SyntaxError: EOL while scanning string literal
(Pdb) p ';;'
*** SyntaxError: EOL while scanning string literal
*** SyntaxError: EOL while scanning string literal
(Pdb) !print(';;')
*** SyntaxError: EOL while scanning string literal
*** SyntaxError: EOL while scanning string literal

--
components: Library (Lib)
messages: 267549
nosy: cjw296
priority: normal
severity: normal
status: open
title: print(';;') fails in pdb with SyntaxError
versions: Python 3.4

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Guido van Rossum

Guido van Rossum added the comment:

Would it be easier to handle for everyone if this did not vary between
3.5.0/1 and 3.5.2, and instead was an incompatibility in 3.6? (That would
still be allowed given 492's provisional status.)

--
nosy: +ned.deily

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Nick Coghlan

Nick Coghlan added the comment:

While I agree this needs to be fixed, one key piece of documentation needed 
will be to cover how to write an __aiter__ method that does the right thing on 
both 3.5.1 and 3.5.2+ (and also avoids the deprecation warning in the latter 
case).

(I've also added Larry to the cc list as release manager)

--
nosy: +larry

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-06 Thread Larry Hastings

Larry Hastings added the comment:

Speaking as the 3.5 RM, I suppose I have to have an opinion.  I don't think 
"Python now uses a better source of randomness to seed the random module at 
startup" is a major feature.  It's a nice-to-have, not a must-have.  And people 
who care about good randomness (e.g. people doing crypto with the random 
module) shouldn't be relying on the freebie initialization they get just by 
importing.

So I think changing the default is fine, especially if the new default is "seed 
from the entropy pool, but if it's empty failover to the not-as-good source of 
random bits".  If you think that's a bad move, please add your comments 
here--I'm willing to have my mind changed about this.

I'll remind you: the schedule says I tag 3.5.2 RC 1 this coming Saturday 
(almost exactly six days from now).  Naturally I'd prefer to make the release 
on time.

--

___
Python tracker 

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



[issue20210] Provide configure options to enable/disable Python modules and extensions

2016-06-06 Thread Thomas Petazzoni

Thomas Petazzoni added the comment:

Hello,

On Sat, 04 Jun 2016 23:33:00 +, Matthias Klose wrote:

> fyi, this came up again at the 2016 Language Summit, the request here
> was to provide some minimal packages which are just enough to run a
> cloud image (the cloud-init package requires a somehow minimal
> python).

Thanks for the feedback! Definitely glad to hear that some other folks
are interested in reducing the footprint of the default Python
installation. Since embedded people have been ignored, hopefully the
cloud people will have more luck in this endeavor :)

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

--

___
Python tracker 

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



[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Yury Selivanov

New submission from Yury Selivanov:

There is a small flaw in PEP 492 design -- __aiter__ should not return an 
awaitable object that resolves to an asynchronous iterator. It should return an 
asynchronous iterator directly.

Let me explain this by showing some examples.

I've discovered this while working on a new asynchronous generators PEP.  Let's 
pretend that we have them already: if we have a 'yield' expression in an 'async 
def' function, the function becomes an "asynchronous generator function":

   async def foo():
  await bar()
  yield 1
  await baz()
  yield 2

   # foo -- is an `asynchronous generator function`
   # foo() -- is an `asynchronous generator`

If we iterate through "foo()", it will await on "bar()", yield "1", await on 
"baz()", and yield "2":

   >>> async for el in foo():
   ... print(el)
   1
   2

If we decide to have a class with an __aiter__ that is an async generator, we'd 
write something like this:

   class Foo:
  async def __aiter__(self):
  await bar()
  yield 1
  await baz()
  yield 2

However, with the current PEP 492 design, the above code would be invalid!  The 
interpreter expects __aiter__ to return a coroutine, not an async generator.

I'm still working on the PEP for async generators, targeting CPython 3.6.  And 
once it is ready, it might still be rejected or deferred.  But in any case, 
this PEP 492 flaw has to be fixed now, in 3.5.2 (since PEP 492 is provisional).

The attached patch fixes the __aiter__ in a backwards compatible way:

1. ceval/GET_AITER opcode calls the __aiter__ method.

2. If the returned object has an '__anext__' method, GET_AITER silently wraps 
it in an awaitable, which is equivalent to the following coroutine:

async def wrapper(aiter_result):
return aiter_result

3. If the returned object does not have an '__anext__' method, a 
DeprecationWarning is raised.

--
assignee: yselivanov
components: Interpreter Core
files: fix_aiter.patch
keywords: patch
messages: 267544
nosy: brett.cannon, gvanrossum, haypo, lukasz.langa, ncoghlan, yselivanov
priority: release blocker
severity: normal
status: open
title: __aiter__ should return async iterator instead of awaitable
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43264/fix_aiter.patch

___
Python tracker 

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



[issue27242] Clarify the use cases of NotImplemented in the docs

2016-06-06 Thread Emanuel Barry

New submission from Emanuel Barry:

The NotImplemented docs aren't explicit enough when it comes to where it 
can/should be used. Patch attached.

--
assignee: docs@python
components: Documentation
files: NotImplemented_wording_1.patch
keywords: patch
messages: 267543
nosy: docs@python, ebarry
priority: normal
severity: normal
stage: patch review
status: open
title: Clarify the use cases of NotImplemented in the docs
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43263/NotImplemented_wording_1.patch

___
Python tracker 

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



[issue27241] Catch exceptions raised in pstats add (repl)

2016-06-06 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +georg.brandl
stage:  -> patch review

___
Python tracker 

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



[issue27241] Catch exceptions raised in pstats add (repl)

2016-06-06 Thread Joe Jevnik

New submission from Joe Jevnik:

I was trying to add a file and accidently mistyped the name which crashed the 
repl session. I think it would be nicer to report the failure but bring me back 
to the prompt so I can decide what I would like to do.

This patch catches any IOErrors that can be raised when adding a file in the 
repl, reports it to the user, and then returns them to the repl.

--
components: Demos and Tools
files: catch-pstats-add.patch
keywords: patch
messages: 267542
nosy: ll
priority: normal
severity: normal
status: open
title: Catch exceptions raised in pstats add (repl)
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43262/catch-pstats-add.patch

___
Python tracker 

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



[issue27236] Add CHAINED_COMPARE_OP opcode

2016-06-06 Thread Josh Rosenberg

Josh Rosenberg added the comment:

It is a little funny though. I expect a more common test like:

if a < b < c: pass

to be unconditionally faster than the logically equivalent:

if a < b and b < c: pass

The only difference between the two should be that b is loaded only once, which 
should make the chained comparison either equivalent or faster. But thanks to 
the additional stack manipulations needed, in microbenchmarks, this isn't the 
case. I was just testing a couple simple cases in ipython (3.5, Linux, x64), 
and the chained comparison is actually slower when short-circuiting is involved:

%%timeit -r5 a, b, c = range(3, 0, -1)
if a < b < c: pass
1000 loops, best of 5: 33.7 ns per loop

%%timeit -r5 a, b, c = range(3, 0, -1)
if a < b and b < c: pass
1000 loops, best of 5: 25 ns per loop

or even without short-circuiting, but with the final test failing, chained 
loses (by a smaller margin):

%%timeit -r5 a, b, c = 0, 1, 0
if a < b < c: pass
1000 loops, best of 5: 42.5 ns per loop

%%timeit -r5 a, b, c = 0, 1, 0
if a < b and b < c: pass
1000 loops, best of 5: 39.3 ns per loop

The same pattern holds if a and c are replaced with constants, e.g. if 0 < b < 
2: (so only b is loaded by name). Yes, it's a small difference; when a, b, c 
are initialized from range(3), so all tests succeed, chained comparisons win, 
44.9 ns to 54.5 ns. But it seems kind of odd that the simplest case of a 
chained comparison is actually a pessimization in two of the three cases.

Not saying it's worth changing (I doubt chained comparisons occur in code 
enough to justify the tiny savings a dedicated op code could provide), but it's 
not something I'd reject out of hand.

--
nosy: +josh.r

___
Python tracker 

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



[issue22558] Missing doc links to source code for Python-coded modules.

2016-06-06 Thread Nathan Harold

Nathan Harold added the comment:

I went over the sections I above called "Other/Smaller details" as addressed in 
mywork3.patch.  I think they look fine.  The patch applies seamlessly to both 
3.5 and 3.6.

For reference, since I noted them when I reviewed mywork2.patch last week, here 
are the packages at issue in the question about links to packages:

Package docs in which the patch in this issue adds a link to __init__.py: 
dbm.rst, email.rst, importlib.rst, json.rst, msilib.rst, tkinter.rst, 
unittest.rst, xml.dom.rst, xml.sax.rst

Package docs in which the patch in this issue adds a link to a directory: 
2to3.rst, email.mime.rst, idle.rst, multiprocessing.rst, sqlite3.rst, 
urllib.rst, venv.rst, xml.rst

Also, I noticed that asyncio.rst provides a precedent for linking to a source 
directory.  So both ways have been done before.

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-06 Thread Stefan Krah

Stefan Krah added the comment:

I think such warnings should be emitted at application level, similar to the 
case when a program refuses to run under UID 0.

If admins wish, they can also integrate such checks into the system startup 
sequence (e.g. runlevel 3 is only reached if randomness is actually available).

--
nosy: +skrah

___
Python tracker 

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



[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-06-06 Thread Petr Ovtchenkov

Petr Ovtchenkov added the comment:

This mean that code for search in /usr/include/... in multiarch environment was 
added by you in commit fc1903166 2012-09-21 13:52:29 +0200, so in my suggestion 
I just don't change behaviour of you code.

As for my opinion, any additions of -I/usr/include/... are wrong: compiler 
either see it without such -I... or shouldn't see it at all (as for cross), or 
require hint from builder (something like 
CURSES_CFLAGS=-I/home/bluser/new_curses/include).

--

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-06 Thread Antti Haapala

Antti Haapala added the comment:

I don't think setting environment variables is a solution, as it is not always 
clear which script occurs early in the boot process, or even that which program 
has components written in Python. However I'd want to be notified of failure as 
well, perhaps a warning should be emitted.

--
nosy: +ztane

___
Python tracker 

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



[issue26415] Fragmentation of the heap memory in the Python parser

2016-06-06 Thread A. Skrobov

A. Skrobov added the comment:

Now that #26526 landed (thanks to everybody involved!), I'm requesting a review 
on an updated version of my patch, which addresses the excessive memory 
consumption by the parser.

The description of my original patch still applies:

> The attached patch for the parser reduces "Maximum resident set size 
> (kbytes)" threefold, for the degenerate example of 'import ast; 
> ast.parse("0,"*100, mode="eval")', by eliminating many CST nodes that 
> have a single child.
>
> According to the comment in Parser/node.c -- "89% of PyObject_REALLOC calls 
> in PyNode_AddChild passed 1 for the size" -- the memory saving should be 
> generally applicable, and not limited just to this degenerate case.

> I've now tried it with "perf.py -r -m", and the memory savings are as follows:
> ...
> on these benchmarks, the saving is not threefold, of course; but still quite 
> substantial (up to 30%).

My new patch updates Modules/parsermodule.c to accept such "compressed" nodes, 
so that everything still builds cleanly and passes the tests.

--
nosy: +benjamin.peterson, berker.peksag, brett.cannon, fdrake, giampaolo.rodola
Added file: http://bugs.python.org/file43261/patch

___
Python tracker 

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



[issue27173] Modern Unix key bindings for IDLE

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue5124] IDLE - pasting text doesn't delete selection

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-06-06 Thread Matthias Klose

Matthias Klose added the comment:

sorry, I don't understand your last comment.

--

___
Python tracker 

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



[issue27238] Bare except: usages in turtle.py

2016-06-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue27233] Missing documentation for PyOS_FSPath

2016-06-06 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

Thanks for the comments here and in Rietveld. This patch adds versionadded and 
an extra space.

--
Added file: http://bugs.python.org/file43260/issue27233-cr.patch

___
Python tracker 

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



[issue27231] Support the fspath protocol in the posixpath module

2016-06-06 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

I wrote the patch assuming that the error messages would be changed in 
accordance with issue27232. Let's put this on hold until that is resolved.

--
dependencies: +os.fspath() should not use repr() on error

___
Python tracker 

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



[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2016-06-06 Thread Sophie

Sophie added the comment:

In case someone else need it, here is a patch for python 3.5.0b1

--
nosy: +Sopouic
versions: +Python 3.5 -Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file43259/python-3.5.0b1-fdvalidation.patch

___
Python tracker 

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



[issue27232] os.fspath() should not use repr() on error

2016-06-06 Thread Jelle Zijlstra

Changes by Jelle Zijlstra :


--
resolution: not a bug -> 
status: closed -> open

___
Python tracker 

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



[issue27232] os.fspath() should not use repr() on error

2016-06-06 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

No, that issue just adds the address to the repr() of types. It is not normal 
to use repr for type objects in error messages:

>>> int(None)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: int() argument must be a string, a bytes-like object or a number, 
not 'NoneType'
>>> open(None, 0)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: open() argument 2 must be str, not int
>>> os.fspath(None)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: expected str, bytes or os.PathLike object, not 

--

___
Python tracker 

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



[issue27238] Bare except: usages in turtle.py

2016-06-06 Thread Jelle Zijlstra

Jelle Zijlstra added the comment:

This patch removes all usages of "except:" in turtle.py. The tests in 
test_turtle.py and turtle.rst still work.

--
keywords: +patch
Added file: http://bugs.python.org/file43258/issue27238.patch

___
Python tracker 

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



[issue17004] Expand zipimport to include other compression methods

2016-06-06 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

+1 for that. I like XZ support so that our application size can be reduced.

--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-06-06 Thread Марк Коренберг

Changes by Марк Коренберг :


--
nosy:  -mmarkk

___
Python tracker 

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



[issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew'

2016-06-06 Thread SilentGhost

Changes by SilentGhost :


--
stage:  -> needs patch
type:  -> behavior
versions:  -Python 3.2, 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



[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-06 Thread Martin Panter

Martin Panter added the comment:

Thanks Susumu, I think the logic is right this time. I left some new 
suggestions for the tests, if you want to take them on or not, that’s up to you.

--

___
Python tracker 

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



[issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew'

2016-06-06 Thread Leblond Emmanuel

New submission from Leblond Emmanuel:

The folding code for email headers crashes whenever it hits line 
_header_value_parser.py:432 given it try to call method `_fold_as_ew`.

```
(venv)➜  vigiechiro-api git:(in2p3) ✗ python test_mail.py  
Traceback (most recent call last):
  File "test_mail.py", line 36, in 
mail.send(msg)
  File 
"/home/emmanuel/projects/vigiechiro-api/venv/lib/python3.5/site-packages/flask_mail.py",
 line 492, in send
message.send(connection)
  File 
"/home/emmanuel/projects/vigiechiro-api/venv/lib/python3.5/site-packages/flask_mail.py",
 line 427, in send
connection.send(self)
  File 
"/home/emmanuel/projects/vigiechiro-api/venv/lib/python3.5/site-packages/flask_mail.py",
 line 190, in send
message.as_bytes() if PY3 else message.as_string(),
  File 
"/home/emmanuel/projects/vigiechiro-api/venv/lib/python3.5/site-packages/flask_mail.py",
 line 385, in as_bytes
return self._message().as_bytes()
  File "/usr/lib/python3.5/email/message.py", line 179, in as_bytes
g.flatten(self, unixfrom=unixfrom)
  File "/usr/lib/python3.5/email/generator.py", line 115, in flatten
self._write(msg)
  File "/usr/lib/python3.5/email/generator.py", line 195, in _write
self._write_headers(msg)
  File "/usr/lib/python3.5/email/generator.py", line 422, in _write_headers
self._fp.write(self.policy.fold_binary(h, v))
  File "/usr/lib/python3.5/email/policy.py", line 190, in fold_binary
folded = self._fold(name, value, refold_binary=self.cte_type=='7bit')
  File "/usr/lib/python3.5/email/policy.py", line 204, in _fold
return self.header_factory(name, ''.join(lines)).fold(policy=self)
  File "/usr/lib/python3.5/email/headerregistry.py", line 255, in fold
return header.fold(policy=policy)
  File "/usr/lib/python3.5/email/_header_value_parser.py", line 300, in fold
self._fold(folded)
  File "/usr/lib/python3.5/email/_header_value_parser.py", line 1228, in _fold
rest._fold(folded)
  File "/usr/lib/python3.5/email/_header_value_parser.py", line 432, in _fold
part._fold_as_ew(folded)
AttributeError: 'UnstructuredTokenList' object has no attribute '_fold_as_ew'
> /usr/lib/python3.5/email/_header_value_parser.py(432)_fold()
-> part._fold_as_ew(folded)
```

Given folding depends a lot on the processed value, this bug only trigger in 
very specific encoded headers (I've try to reproduce this bug with various 
values but only the one which originally made me find the bug worked so far).

I've isolated the bug into a simple test case (see enclosed file).

It seems this part of the code has been rewritten between Python2 and 3 (the 
file _header_value_parser.py doesn't exists in Python2). So unsurprisingly the 
bug doesn't trigger in Python2.

Replacing `part._fold_as_ew(folded)` by `part._fold(folded)` seems to fix the 
bug, but given my poor knowledge of this code, this fix probably produce 
unwanted behaviors.

--
components: email
files: test_mail_2.py
messages: 267525
nosy: Leblond Emmanuel, barry, r.david.murray
priority: normal
severity: normal
status: open
title: 'UnstructuredTokenList' object has no attribute '_fold_as_ew'
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43257/test_mail_2.py

___
Python tracker 

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



[issue26983] float() can return not exact float instance

2016-06-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

My failure. Thank you for your report and patch SilentGhost.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue26983] float() can return not exact float instance

2016-06-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6216fb8afa53 by Serhiy Storchaka in branch 'default':
Issue #26983: Fixed test_format failure.
https://hg.python.org/cpython/rev/6216fb8afa53

--

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-06 Thread Xiang Zhang

Xiang Zhang added the comment:

I am confused why this could happen. On x86 platform, you can not even create a 
string of size 0x. On x64 platform, I don't think strlen(s) + 3 can 
lead to overflow where s is of size Py_ssize_t.

--

___
Python tracker 

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



[issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c)

2016-06-06 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue25738] http.server doesn't handle RESET CONTENT status correctly

2016-06-06 Thread Mathieu Dupuy

Changes by Mathieu Dupuy :


--
nosy:  -deronnax

___
Python tracker 

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



[issue26983] float() can return not exact float instance

2016-06-06 Thread SilentGhost

SilentGhost added the comment:

test_format resulted in semi-failure due to this change. The attached patch 
fixes the issue.

--
assignee:  -> serhiy.storchaka
nosy: +SilentGhost
resolution: fixed -> 
stage: resolved -> commit review
status: closed -> open
Added file: http://bugs.python.org/file43256/issue26983.diff

___
Python tracker 

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



[issue26867] test_ssl test_options fails on ubuntu 16.04

2016-06-06 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +SilentGhost
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



[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-06-06 Thread Petr Ovtchenkov

Petr Ovtchenkov added the comment:

Matthias,

This question is really for you:

fc1903166 (doko2012-09-21 13:52:29 +0200  422) if 
multiarch_path_component != '':
fc1903166 (doko2012-09-21 13:52:29 +0200  423) 
add_dir_to_list(self.compiler.library_dirs,
fc1903166 (doko2012-09-21 13:52:29 +0200  424)  
   '/usr/lib/' + multiarch_path_component)
fc1903166 (doko2012-09-21 13:52:29 +0200  425) 
add_dir_to_list(self.compiler.include_dirs,
fc1903166 (doko2012-09-21 13:52:29 +0200  426)  
   '/usr/include/' + multiarch_path_component)
fc1903166 (doko2012-09-21 13:52:29 +0200  427) 
return

--

___
Python tracker 

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



[issue27232] os.fspath() should not use repr() on error

2016-06-06 Thread SilentGhost

SilentGhost added the comment:

This is behaviour introduced by issue 25548, it would make sense to me to 
discuss this problem there if you think it's necessary. repr in error messages 
has been a standard approach in Python for a very long time, however.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
superseder:  -> Show the address in the repr for class objects

___
Python tracker 

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



[issue27231] Support the fspath protocol in the posixpath module

2016-06-06 Thread SilentGhost

SilentGhost added the comment:

There seems to be an issue with your patch, it does apply cleanly when doing 
that manually, but Rietveld doesn't like it. The changes in Lib/posixpath.py 
and Lib/test/test_posixpath.py don't show up.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue27168] Comprehensions and await need more unittests

2016-06-06 Thread SilentGhost

Changes by SilentGhost :


--
components: +Tests
title: Yury isn't sure comprehensions and await interact correctly -> 
Comprehensions and await need more unittests
type:  -> behavior

___
Python tracker 

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