[issue26085] Document default tk Text class bindings for tkinter and IDLE

2016-10-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I want to recast this as a doc issue.  The BINDINGS section of 
http://www.tcl.tk/man/tcl8.6/TkCmd/text.htm, near the bottom, has a list with 
33 numbered items.  The main categories of action include selection 
modification, cursor movement, and text deletion.  Minor categories include 
insertion, transposition, undo/redo. However, the items are not neatly grouped 
this way.

Some of these actions are IDLE menu items and are listed in the IDLE menu doc.  
Many more are documented in 
https://docs.python.org/3/library/idle.html#editing-and-navigation.  Some 
useful actions, such as ^t Tranposition Right, are omitted.

Some of this IDLE doc is wrong, at least for IDLE, at least on Windows.  For 
instance, at least on Windows, ^a in IDLE is Select All, not Move Beginning of 
Line.

For working on IDLE, it would be very helpful to have a *categorized* listing 
of class-bound actions that are verified to work for tkinter Text, with notes 
on any OS differences.  I can then check what works on IDLE and how it changes 
the bindings on either some or all systems.  I can and someday will do this for 
Windows, but I currently would need help for other OSes.

To help people avoid clashes such as Nick ran into, the tkinter doc should also 
have a sorted and abbreviated list of bound event sequences.  "Text comes with 
bindings for the following event sequences for keys: Control-a, ..., z; 
Control-Shift-?, ...,z, Meta-...(Unix), Command-...(Mac).  For mice, ..."  
Follow with a note on what can or cannot be unbound and the need to use 'break' 
when overriding.

A function to produce for IDLE a similar list that includes IDLE's 
system-specific add-ons and a user's customizations, would be a separate but 
very useful issue.  Not knowing current bindings makes customization hard.  
Another spinoff issue would be making actions available via the IDLE menu 
system.

--
assignee: docs@python -> terry.reedy
stage:  -> needs patch
title: Tkinter spoils the input text -> Document default tk Text class bindings 
for tkinter and IDLE
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



[issue28517] Dead code in wordcode

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The main problem was that this bug caused unnecessary breakage of tests in 
Victor's bytecode [1].

Stéphane, the number of opcodes to the end of the block was counted 
incorrectly. Just off-by-one error. One unreachable opcode always was left.

[1] https://github.com/haypo/bytecode

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



[issue28517] Dead code in wordcode

2016-10-25 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

ah ok, thanks for the explanation.

--

___
Python tracker 

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



[issue28426] PyUnicode_AsDecodedObject can only return unicode now

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 71dce630dc02 by Serhiy Storchaka in branch '3.4':
Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug 
build.
https://hg.python.org/cpython/rev/71dce630dc02

New changeset 74569ecd67e4 by Serhiy Storchaka in branch '3.5':
Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug 
build.
https://hg.python.org/cpython/rev/74569ecd67e4

New changeset 6af1a26e655f by Serhiy Storchaka in branch '3.6':
Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug 
build.
https://hg.python.org/cpython/rev/6af1a26e655f

New changeset 1ab1fd00e9d6 by Serhiy Storchaka in branch 'default':
Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug 
build.
https://hg.python.org/cpython/rev/1ab1fd00e9d6

--
nosy: +python-dev

___
Python tracker 

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



[issue28517] Dead code in wordcode

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> closed

___
Python tracker 

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



[issue25464] Tix HList header_exists should be "exist"

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is hard to add tests because testing infrastructure for Tix doesn't exist.

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

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ca1b91829edf by Serhiy Storchaka in branch '3.5':
Issue #28314: Added tests for xml.etree.ElementTree.Element.getiterator().
https://hg.python.org/cpython/rev/ca1b91829edf

New changeset c14a2d2a3b19 by Serhiy Storchaka in branch '3.6':
Issue #28314: Added tests for xml.etree.ElementTree.Element.getiterator().
https://hg.python.org/cpython/rev/c14a2d2a3b19

New changeset 17334c1d9245 by Serhiy Storchaka in branch 'default':
Issue #28314: Added tests for xml.etree.ElementTree.Element.getiterator().
https://hg.python.org/cpython/rev/17334c1d9245

--

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

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



[issue20847] asyncio docs should call out that network logging is a no-no

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

Марк Коренберг added the comment:

Typical network logging is using syslog UDP. Sending UDP is never block.

--
nosy: +mmarkk

___
Python tracker 

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



[issue28523] Idlelib.configdialog: use 'color' insteadof 'colour'

2016-10-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Hmmm. I believe the Win10 Anniversary Update is supposed to include the new 
Ubuntu-bash-linux subsystem.  I presume it should include sed.  I need to see 
if I have the update and the subsystem, and what it includes.  I could have 
done this one, within one file, with replace-all. But I expect to be doing some 
multifile name changes, and I presume sed will do that.

I decided to apply this tomorrow after re-checking the changes.  I checked 
current configdialog issues and decided not to worry about backports.  Planned 
and proposed cosmetic fixups -- PEP8 renamings, ttk replacements (see #27755, 
for instance), and revised layouts will be bigger issues.  And I want to start 
on these next.

--

___
Python tracker 

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



[issue25464] Tix HList header_exists should be "exist"

2016-10-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Subsequent to me suggesting a test, the 3.6 doc gained this: "Deprecated since 
version 3.6: This Tk extension is unmaintained and should not be used in new 
code."  This answers my question about using it in IDLE. Good to apply this 
anyway, but no test is fine with me.

--

___
Python tracker 

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



[issue28107] Update typing module dicumentation for NamedTuple

2016-10-25 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Guido,

> Honestly I think it's better if this remains a "hidden" feature until we have 
> support for it in mypy. So let's wait for that.

This patch now could be applied (since the mypy PR for this is merged).

--

___
Python tracker 

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



[issue28426] PyUnicode_AsDecodedObject can only return unicode now

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> BTW Serhiy, how about PyUnicode_AsEncodedObject? Not see it in your deprecate 
> list.

Indeed. It is not such useless as other functions (that support only the rot13 
encoding), but it can be replaced with either PyUnicode_AsEncodedString or 
PyCodec_Encode (both exists in 2.7).

Updated patch deprecates PyUnicode_AsEncodedObject too. Please make a review of 
warning messages, I'm not sure about the wording.

--
versions:  -Python 3.4, Python 3.5
Added file: 
http://bugs.python.org/file45211/deprecate-str-to-str-coding-unicode-api-2.patch

___
Python tracker 

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



[issue28465] python 3.5 magic number

2016-10-25 Thread 曹忠

曹忠 added the comment:

Thanks, I see.

Brett Cannon 于2016年10月25日 周二 00:28写道:

Brett Cannon added the comment:

Closing this as a third-party Debian issue (if it even matters as bytecode
is an optimization local to a machine and so different magic numbers
shouldn't matter).

--
nosy: +brett.cannon
resolution:  -> third party
status: open -> closed

___
Python tracker 

___

-- 

Thanks & Best Regards!
曹 忠(Joo Tsao)

广州市盈丰计算机科技有限公司

Address: 广州天河区科韵路12号之一3A02室
Mobile: 137 6331 0068
Tel: +86 020 3829 6735
Fax: +86 020 3829 6726

--

___
Python tracker 

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



[issue28526] Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject

2016-10-25 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

PyUnicode_AsEncodedObject() can return an object of arbitrary type, while 
PyUnicode_AsEncodedString() always returns bytes. The code that uses 
PyUnicode_AsEncodedObject() in the _curses module expects bytes, but does not 
check the type of the result. This can cause undefined behavior, including a 
crash. Using PyUnicode_AsEncodedString() is more correct in this case.

--
assignee: serhiy.storchaka
components: Extension Modules
files: curses-PyUnicode_AsEncodedString.patch
keywords: patch
messages: 279377
nosy: serhiy.storchaka, twouters
priority: normal
severity: normal
stage: patch review
status: open
title: Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject
type: crash
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7
Added file: 
http://bugs.python.org/file45212/curses-PyUnicode_AsEncodedString.patch

___
Python tracker 

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



[issue28107] Update typing module documentation for NamedTuple

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
title: Update typing module dicumentation for NamedTuple -> Update typing 
module documentation for NamedTuple

___
Python tracker 

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



[issue28426] PyUnicode_AsDecodedObject can only return unicode now

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
dependencies: +Use PyUnicode_AsEncodedString instead of 
PyUnicode_AsEncodedObject

___
Python tracker 

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



[issue28426] PyUnicode_AsDecodedObject can only return unicode now

2016-10-25 Thread Xiang Zhang

Xiang Zhang added the comment:

LGTM. I can understand the wording.

--

___
Python tracker 

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



[issue5830] heapq item comparison problematic with sched's events

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a test.

--
keywords: +patch
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.0, Python 3.1
Added file: http://bugs.python.org/file45213/test_sched_noncomparable_args.patch

___
Python tracker 

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



[issue5830] heapq item comparison problematic with sched's events

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file45214/test_sched_noncomparable_args.patch

___
Python tracker 

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



[issue5830] heapq item comparison problematic with sched's events

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: 
http://bugs.python.org/file45213/test_sched_noncomparable_args.patch

___
Python tracker 

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



[issue28427] WeakValueDictionary next bug (with multithreading)

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Following patch fixes more cases. But I don't think it fixes race conditions, 
it just makes them less likely.

Increased priority because this bug makes weakref.WeakValueDictionary unusable 
in multithread program.

--
components: +Library (Lib)
priority: normal -> critical
Added file: http://bugs.python.org/file45215/issue28427-2.patch

___
Python tracker 

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



[issue23262] webbrowser module broken with Firefox 36+

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Would not be easier to drop a support of SeaMonkey 1.x and other ancient 
browsers?

--

___
Python tracker 

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



[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b471447352ac by INADA Naoki in branch '3.6':
Issue #28430: Fix iterator of C implemented asyncio.Future doesn't
https://hg.python.org/cpython/rev/b471447352ac

New changeset bd141ec2973a by INADA Naoki in branch 'default':
Issue #28430: Fix iterator of C implemented asyncio.Future doesn't
https://hg.python.org/cpython/rev/bd141ec2973a

--
nosy: +python-dev

___
Python tracker 

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



[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka
stage: patch review -> commit review

___
Python tracker 

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



[issue23262] webbrowser module broken with Firefox 36+

2016-10-25 Thread Oleg Broytman

Oleg Broytman added the comment:

I don't think Firefox versions <36 are too old to be dropped.

--

___
Python tracker 

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



[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

3.5 is free from both problems. They were introduced in f33433d9c163.

--
versions:  -Python 3.5

___
Python tracker 

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



[issue28527] Hack in `genericpath.commonprefix()` crashes if `m` argument is not indexable

2016-10-25 Thread Jonathan Hogg

New submission from Jonathan Hogg:

If `genericpath.commonprefix()` is called with a non-indexable argument, then 
the check for passing in a list of lists/tuples will raise an exception due to 
the `m[0]` test.

--
components: Library (Lib)
messages: 279386
nosy: jonathanhogg
priority: normal
severity: normal
status: open
title: Hack in `genericpath.commonprefix()` crashes if `m` argument is not 
indexable
type: crash
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



[issue28527] Hack in `genericpath.commonprefix()` crashes if `m` argument is not indexable

2016-10-25 Thread Christian Heimes

Christian Heimes added the comment:

That's correct. The function raises a TypeError when you pass in a wrong type.

--
nosy: +christian.heimes
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-25 Thread INADA Naoki

INADA Naoki added the comment:

> - It appears it also touches Misc/NEWS a bit too much. Please make sure to 
> not to commit that.

I wont to move move this entry from "Core and Builtins" section to "Library" 
section:

- Issue #26081: Added C implementation of asyncio.Future.
  Original patch by Yury Selivanov.

May I do it?

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

___
Python tracker 

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



[issue28527] Hack in `genericpath.commonprefix()` crashes if `m` argument is not indexable

2016-10-25 Thread Jonathan Hogg

Jonathan Hogg added the comment:

While I agree that the documentation specifies that this function takes a list, 
the previous version did not require a list, just any object that is iterable.

Unfortunately, this change is causing a break in real code (`xon.sh` in this 
case, which appears to pass a `set()` to this function).

Given the `os.fspath` change could have been made to not require an indexable 
argument, I would argue that this change is an unnecessary regression.

--

___
Python tracker 

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



[issue23262] webbrowser module broken with Firefox 36+

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> I don't think Firefox versions <36 are too old to be dropped.

Just Firefox versions <1.5.

Firefox 1.5 released 11 years ago supported options -new-window and -new-tab 
[1].

[1] 
http://website-archive.mozilla.org/www.mozilla.org/firefox_releasenotes/en-US/firefox/releases/1.5.html

--

___
Python tracker 

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



[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9d618cebfc21 by Serhiy Storchaka in branch '3.6':
Issue #28408: Fixed a leak and remove redundant code in 
_PyUnicodeWriter_Finish().
https://hg.python.org/cpython/rev/9d618cebfc21

New changeset 24c3f997bd1a by Serhiy Storchaka in branch 'default':
Issue #28408: Fixed a leak and remove redundant code in 
_PyUnicodeWriter_Finish().
https://hg.python.org/cpython/rev/24c3f997bd1a

--
nosy: +python-dev

___
Python tracker 

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



[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue23262] webbrowser module broken with Firefox 36+

2016-10-25 Thread Oleg Broytman

Oleg Broytman added the comment:

Ah, I see. Ok then, see the new patch.

--
Added file: http://bugs.python.org/file45216/webbrowser.py-3.5-newfox.patch

___
Python tracker 

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



[issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fe1fea4ded04 by Serhiy Storchaka in branch '3.5':
Issue #28353: os.fwalk() no longer fails on broken links.
https://hg.python.org/cpython/rev/fe1fea4ded04

New changeset e99ec3c77a63 by Serhiy Storchaka in branch '3.6':
Issue #28353: os.fwalk() no longer fails on broken links.
https://hg.python.org/cpython/rev/e99ec3c77a63

New changeset 33a1a3dd0051 by Serhiy Storchaka in branch 'default':
Issue #28353: os.fwalk() no longer fails on broken links.
https://hg.python.org/cpython/rev/33a1a3dd0051

--
nosy: +python-dev

___
Python tracker 

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



[issue28054] Diff for visually comparing actual with expected in mock.assert_called_with.

2016-10-25 Thread Michael Foord

Michael Foord added the comment:

I like the idea and would be happy for it to be added to mock.

--

___
Python tracker 

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



[issue20491] textwrap: Non-breaking space not honored

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



[issue20491] textwrap: Non-breaking space not honored

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fcabef0ce773 by Serhiy Storchaka in branch '3.5':
Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces.
https://hg.python.org/cpython/rev/fcabef0ce773

New changeset bfa400108fc5 by Serhiy Storchaka in branch '3.6':
Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces.
https://hg.python.org/cpython/rev/bfa400108fc5

New changeset b86dacb9e668 by Serhiy Storchaka in branch 'default':
Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces.
https://hg.python.org/cpython/rev/b86dacb9e668

--
nosy: +python-dev

___
Python tracker 

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



[issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d54c2a1c796 by Serhiy Storchaka in branch '3.5':
Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space
https://hg.python.org/cpython/rev/8d54c2a1c796

New changeset ebe5bd33f86f by Serhiy Storchaka in branch '3.6':
Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space
https://hg.python.org/cpython/rev/ebe5bd33f86f

New changeset 049e58f74272 by Serhiy Storchaka in branch 'default':
Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space
https://hg.python.org/cpython/rev/049e58f74272

--
nosy: +python-dev

___
Python tracker 

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



[issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4a3892f49e1a by Serhiy Storchaka in branch 'default':
Issue #28255: calendar.TextCalendar.prweek() no longer prints a space after
https://hg.python.org/cpython/rev/4a3892f49e1a

--

___
Python tracker 

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



[issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

prweek() and pryear() are changed only in 3.7. If this breaks somebody's code, 
there is enough time to update this code or rollback changes.

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



[issue23262] webbrowser module broken with Firefox 36+

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tests are failed with webbrowser.py-3.5-newfox.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



[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue23262] webbrowser module broken with Firefox 36+

2016-10-25 Thread Oleg Broytman

Oleg Broytman added the comment:

What's the error? Buildbot URL?

--

___
Python tracker 

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



[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9f7505019767 by Serhiy Storchaka in branch '3.5':
Issue #27275: Fixed implementation of pop() and popitem() methods in
https://hg.python.org/cpython/rev/9f7505019767

New changeset 2def8a24c299 by Serhiy Storchaka in branch '3.6':
Issue #27275: Fixed implementation of pop() and popitem() methods in
https://hg.python.org/cpython/rev/2def8a24c299

New changeset 19e199038704 by Serhiy Storchaka in branch 'default':
Issue #27275: Fixed implementation of pop() and popitem() methods in
https://hg.python.org/cpython/rev/19e199038704

--
nosy: +python-dev

___
Python tracker 

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



[issue27268] Incorrect error message on float('')

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy:  -serhiy.storchaka
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




[issue28528] Pdb.checkline()

2016-10-25 Thread Thomas Kluyver

New submission from Thomas Kluyver:

Pdb.checkline() does a hasattr() check to protect against self.curframe not 
existing. self.curframe can also be None (if self.forget() or self.reset() was 
called), but checkline() does not handle this.

The attached patch treats self.curframe == None as equivalent to the attribute 
being absent.

Background:
http://bugs.python.org/issue9230
https://github.com/ipython/ipython/issues/10028

(Georg, I've nosy-listed you as I saw your name on a couple of similar issues; 
I hope you don't mind)

--
components: Library (Lib)
files: pdb-reset-checkline.patch
keywords: patch
messages: 279402
nosy: georg.brandl, takluyver
priority: normal
severity: normal
status: open
title: Pdb.checkline()
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45217/pdb-reset-checkline.patch

___
Python tracker 

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



[issue23262] webbrowser module broken with Firefox 36+

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

$ ./python -m test.regrtest -vuall test_webbrowser
...
==
FAIL: test_open (test.test_webbrowser.MozillaCommandTest)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython-3.5/Lib/test/test_webbrowser.py", line 99, in 
test_open
arguments=['openURL({})'.format(URL)])
  File "/home/serhiy/py/cpython-3.5/Lib/test/test_webbrowser.py", line 42, in 
_test
self.assertIn(option, popen_args)
AssertionError: '-raise' not found in ['http://www.example.com']

--

___
Python tracker 

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



[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-25 Thread Terry J. Reedy

Terry J. Reedy added the comment:

+- Issue #28430: Fix iterator of C implemented asyncio.Future doesn't accept

+  non-None value is passed to it.send(val).

This NEWS entry is not a coherent English sentence.  Please revise.  I don't 
understand it well enough to suggest a revision, but would review a replacement.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue28430] asyncio: C implemeted Future cause Tornado test fail

2016-10-25 Thread INADA Naoki

INADA Naoki added the comment:

I'm sorry about my bad English.

> Fix iterator of C implemented asyncio.Future

This meant:

fut = asyncio.Future()  # C implemented version of asyncio.Future
it = iter(fut)  # Iterator of it
it.send(42) # raised TypeError before. It was not compatible with Python 
version of asyncio.Future

--

___
Python tracker 

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



[issue23262] webbrowser module broken with Firefox 36+

2016-10-25 Thread Oleg Broytman

Oleg Broytman added the comment:

Oops, yes, mea culpa, sorry. Patch for the test added.

--
Added file: http://bugs.python.org/file45218/test_webbrowser.py-3.5-newfox.patch

___
Python tracker 

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



[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-10-25 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Serhiy, doesn't this patch "fix" the issue by making subclasses with custom 
__getitem__/__delitem__ implementations not have them invoked by the 
superclass's pop/popitem?

The old code meant that pop and popitem didn't need to be overridden even if 
you overrode __getitem__/__delitem__ in a way that differed from the default 
(e.g. __setitem__ might add some tracking data to the value that __getitem__ 
strips). Now they must be overwritten.

The expiringdict's flaw seems to be that its __contains__ call and its 
__getitem__ are not idempotent, which the original code assumed (reasonably) 
they would be.

The original code should probably be restored here. The general 
PyObject_GetItem/DelItem are needed to work with arbitrary subclasses 
correctly. The Sequence_Contains check is needed to avoid accidentally invoking 
__missing__ (though if __missing__ is not defined for the subclass, the 
Sequence_Contains check could be skipped).

The only reason OrderedDict has the problem and dict doesn't is that 
OrderedDict was trying to be subclassing friendly (perhaps to ensure it remains 
compatible with code that subclassed the old Python implementation), while dict 
makes no such efforts. dict happily bypasses custom __getitem__/__delitem__ 
calls when it uses pop/popitem.

--
nosy: +josh.r

___
Python tracker 

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



[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-10-25 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Explaining expiringdict's issue: It's two race conditions, with itself, not 
another thread.

Example scenario (narrow race window):

1. An entry has an expiry time of X (so it will self-delete at time X or later)
2. At time X-1, the PySequence_Contains check is run, and it returns 1 (true)
3. Because contains returned True, at time X PyObject_GetItem is run, but 
because it's time X, expiringdict's __getitem__ deletes the entry and raises 
KeyError

An alternative scenario with a *huge* race window is:

1. An entry has an expiry time of X (so it will self-delete at time X or later)
2. No lookups or membership tests or any other operations that implicitly clean 
the expiring dict occur for a while
3. At time X+1000, _odict_FIRST (in popitem) grabs the first entry in the 
OrderedDict without invoking the __contains__ machinery that would delete the 
entry
3. At time X+1000 or so, the PySequence_Contains check is run, and it returns 0 
(false), because the __contains__ machinery is invoked, and again, because no 
default is provided for popitem, a KeyError is raised (this time by the popitem 
machinery, not __getitem__)

expiringdict is unusually good at bringing this on itself. The failing popitem 
call is in __setitem__ for limited length expiringdicts, 
self.popitem(last=False), where they're intentionally removing the oldest 
entry, when the oldest entry is the most likely to have expired (and since 
__len__ isn't overridden to expire old entries, it may have been expired for 
quite a while).

The del self[next(OrderedDict.__iter__(self))] works because they didn't 
override __iter__, so it's not expiring anything to get the first item, and 
therefore only __delitem__ is involved, not __contains__ or __getitem__ (note: 
This is also why the bug they reference has an issue with "OrderedDict mutated 
during iteration"; iteration returns long expired keys, but looking the expired 
keys up deletes them, causing the mutation issue).


Possible correct fixes:

1. Make popitem _more_ subclass friendly; when it's an OrderedDict subclass, 
instead of using _odict_LAST and _odict_FIRST, use (C equivalent) of 
`next(reversed(self))` and `next(iter(self))` respectively. This won't fix 
expiringdict as is (because it's broken by design; it doesn't override 
__iter__, so it will happily return long expired keys that disappear on 
access), but if we're going for subclass friendliness and allowing 
non-idempotent __contains__/__getitem__/__iter__ implementations, it's the 
right thing to do. If expiringdict implemented __iter__ to copy the keys, then 
loop over the copy, deleting expired values and yielding unexpired values, this 
would at least reduce the huge race window to a narrow window (because it could 
still yield a key that's almost expired)
2. Check for the presence of __missing__ on the type and only perform the 
PySequence_Contains check if __missing__ is defined (to avoid 
autovivification). This fixes the narrow race condition for subclasses without 
__missing__, but not the huge race condition
3. Explicitly document the idempotence assumptions made by OrderedDict 
(specifically, that all non-mutating methods of OrderedDict must not be made 
mutating in subclasses unless the caller also overrides all multistep 
operations, e.g. pop/popitem/setdefault).

TL;DR: expiringdict is doing terrible things, assuming the superclass will 
handle them even though the superclass has completely different assumptions, 
and therefore expiringdict has only itself to blame.

--

___
Python tracker 

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



[issue28526] Use PyUnicode_AsEncodedString instead of PyUnicode_AsEncodedObject

2016-10-25 Thread Josh Rosenberg

Josh Rosenberg added the comment:

LGTM.

--
nosy: +josh.r

___
Python tracker 

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



[issue28529] 0 ** 0 should raise ArithmeticError

2016-10-25 Thread Jáchym Barvínek

New submission from Jáchym Barvínek:

0 ** 0 is mathematically undefined and equivalent to 0/0. 0/0 correctly raises 
ZeroDivisionError, but 0 ** 0 == 1. Also 0.0 ** 0 == 0 ** 0.0 == 0.0 ** 0.0 == 
0.0. Similarly for math.pow.

--
components: Interpreter Core
messages: 279410
nosy: Jáchym Barvínek
priority: normal
severity: normal
status: open
title: 0 ** 0 should raise ArithmeticError
versions: Python 3.5

___
Python tracker 

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



[issue28529] 0 ** 0 should raise ArithmeticError

2016-10-25 Thread Jáchym Barvínek

Jáchym Barvínek added the comment:

Sorry, It should be 0.0 ** 0 == 0 ** 0.0 == 0.0 ** 0.0 == 1.0 of course.

--

___
Python tracker 

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



[issue27495] Pretty printing sorting for set and frozenset instances

2016-10-25 Thread Steven D'Aprano

Steven D'Aprano added the comment:

There seems to be consensus that this should be treated as a bug fix, not a new 
feature. Could this still make it into 3.6 even though it missed the first beta?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue28529] 0 ** 0 should raise ArithmeticError

2016-10-25 Thread Tim Peters

Tim Peters added the comment:

This won't be changed - it's a near-universally mandated behavior across 
relevant standards.  Many years ago it wasn't, but Knuth changed minds when he 
wrote:

"""
We must define x^0=1 for all x, if the binomial theorem is to be valid when x=0 
, y=0 , and/or x=-y . The theorem is too important to be arbitrarily restricted!
"""

More here:

https://www.quora.com/Why-does-Python-return-1-for-pow-0-0-which-is-mathematically-wrong

--
nosy: +tim.peters
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue28029] Replace and empty strings

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Interestingly, initially string.replace() was implemented in terms of 
split/join. string.replace(s, '', s2, n) returned s for any s, s2 and n.

After making replace() a method of str, in aca7b5eaf5e8 (1999-10-12), it became 
raising ValueError for empty pattern string.

Since 762dd09edb83 (issue599128, 2002-08-23) it supports zero-length pattern 
string. str.replace('', s1, s2, n) returned '' for any s1, s2 and n.

New implementation added in 41809406a35e (2006-05-25) made str.replace('', '', 
'x', -1) returning 'x' while str.replace('', '', 'x', 1) still returns ''.

As you can see, the behavior of replacing with empty pattern is not stable. It 
was changed several times. Maybe it is a time for new change.

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



[issue28530] Howto detect if an object is of type os.DirEntry

2016-10-25 Thread stephan

New submission from stephan:

I have a small problem with python 3.5.2 64bit on win7 64 bit:

I cannot check if an object is of type DirEntry 
(os.DirEntry or nt.DirEntry).

Did I misunderstand something or what is wrong?

Here is a log of my console:
-
In [63]: sd = os.scandir(".")

In [64]: de = next(sd)

In [65]: type(de)
Out[65]: nt.DirEntry

In [66]: import nt

In [67]: nt.DirEntry
---
AttributeErrorTraceback (most recent call last)
 in ()
> 1 nt.DirEntry

AttributeError: module 'nt' has no attribute 'DirEntry'

In [68]: os.DirEntry
---
AttributeErrorTraceback (most recent call last)
 in ()
> 1 os.DirEntry

AttributeError: module 'os' has no attribute 'DirEntry'

In [69]:

--

--
messages: 279415
nosy: stephan
priority: normal
severity: normal
status: open
title: Howto detect if an object is of type os.DirEntry
versions: Python 3.5

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Guido van Rossum

Guido van Rossum added the comment:

Applied:

remote: notified python-check...@python.org of incoming changeset bb23770f82f1
remote: notified python-check...@python.org of incoming changeset 3b8dfe6f5bcb

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bb23770f82f1 by Guido van Rossum in branch '3.6':
Issue 25002: Deprecate asyncore/asynchat. Patch by Mariatta.
https://hg.python.org/cpython/rev/bb23770f82f1

New changeset 3b8dfe6f5bcb by Guido van Rossum in branch 'default':
Issue 25002: Deprecate asyncore/asynchat. Patch by Mariatta. (3.6->3.7)
https://hg.python.org/cpython/rev/3b8dfe6f5bcb

--
nosy: +python-dev

___
Python tracker 

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



[issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ec12e16ea6a1 by Serhiy Storchaka in branch '3.6':
Issue #28353: Try to fix tests.
https://hg.python.org/cpython/rev/ec12e16ea6a1

New changeset a0913dbadea6 by Serhiy Storchaka in branch 'default':
Issue #28353: Try to fix tests.
https://hg.python.org/cpython/rev/a0913dbadea6

--

___
Python tracker 

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



[issue28531] Improve utf7 encoder memory usage

2016-10-25 Thread Xiang Zhang

New submission from Xiang Zhang:

Currently utf7 encoder uses an aggressive memory allocation strategy: use the 
worst case 8. We can tighten the worst case.

For 1 byte and 2 byte unicodes, the worst case could be 3*n + 2. For 4 byte 
unicodes, the worst case could be 6*n + 2.

There are 2 cases. First, all characters needs to be encoded, the result length 
should be upper_round(2.67*n) + 2 <= 3*n + 2. Second, encode and not encode 
characters appear one by one. For even length, it's 3n < 3n + 2. For odd 
length, it's exactly 3n + 2.

This won't benefit much when the string is short. But when the string is long, 
it speeds up.

Without patch:

[bin]$ ./python3 -m perf timeit -s 's = "abc"*10' 's.encode("utf7")'

Median +- std dev: 2.79 us +- 0.09 us
[bin]$ ./python3 -m perf timeit -s 's = "abc"*100' 's.encode("utf7")'

Median +- std dev: 4.55 us +- 0.13 us
[bin]$ ./python3 -m perf timeit -s 's = "abc"*1000' 's.encode("utf7")'

Median +- std dev: 14.0 us +- 0.4 us
[bin]$ ./python3 -m perf timeit -s 's = "abc"*1' 's.encode("utf7")'

Median +- std dev: 178 us +- 1 us

With patch:

[bin]$ ./python3 -m perf timeit -s 's = "abc"*10' 's.encode("utf7")'

Median +- std dev: 2.87 us +- 0.09 us
[bin]$ ./python3 -m perf timeit -s 's = "abc"*100' 's.encode("utf7")'

Median +- std dev: 4.50 us +- 0.23 us
[bin]$ ./python3 -m perf timeit -s 's = "abc"*1000' 's.encode("utf7")'

Median +- std dev: 13.3 us +- 0.4 us
[bin]$ ./python3 -m perf timeit -s 's = "abc"*1' 's.encode("utf7")'

Median +- std dev: 102 us +- 1 us

The patch also removes a check, base64bits can only be not 0 when inShift is 
not 0.

--
components: Interpreter Core
files: utf7_encoder.patch
keywords: patch
messages: 279419
nosy: haypo, serhiy.storchaka, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Improve utf7 encoder memory usage
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45219/utf7_encoder.patch

___
Python tracker 

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



[issue28531] Improve utf7 encoder memory usage

2016-10-25 Thread Xiang Zhang

Changes by Xiang Zhang :


Removed file: http://bugs.python.org/file45219/utf7_encoder.patch

___
Python tracker 

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



[issue28531] Improve utf7 encoder memory usage

2016-10-25 Thread Xiang Zhang

Changes by Xiang Zhang :


Added file: http://bugs.python.org/file45220/utf7_encoder.patch

___
Python tracker 

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



[issue28531] Improve utf7 encoder memory usage

2016-10-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue20847] asyncio docs should call out that network logging is a no-no

2016-10-25 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue28107] Update typing module documentation for NamedTuple

2016-10-25 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks, applied!

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



[issue28107] Update typing module documentation for NamedTuple

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 78c0487562d9 by Guido van Rossum in branch '3.6':
Issue #28107: Update typing module documentation for NamedTuple (Ivan)
https://hg.python.org/cpython/rev/78c0487562d9

New changeset 709b19b9d6ea by Guido van Rossum in branch 'default':
Issue #28107: Update typing module documentation for NamedTuple (Ivan) 
(3.6->3.7)
https://hg.python.org/cpython/rev/709b19b9d6ea

--
nosy: +python-dev

___
Python tracker 

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



[issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target

2016-10-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 470224ec16b6 by Serhiy Storchaka in branch '3.5':
Issue #28353: Fixed tests of os.fwalk() with broken links.
https://hg.python.org/cpython/rev/470224ec16b6

--

___
Python tracker 

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



[issue28522] can't make IDLEX work with python._pth and python-3.6.0b2

2016-10-25 Thread Steve Dower

Steve Dower added the comment:

Can you tell me more about the crash? It doesn't cause a crash when I try it 
with my own install.

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: closed -> open

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This change broke buildbots.

$ ./python -We -m test.regrtest test_os 
Run tests sequentially
0:00:00 [1/1] test_os
test test_os crashed -- Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/libregrtest/runtest.py", line 151, in 
runtest_inner
the_module = importlib.import_module(abstest)
  File "/home/serhiy/py/cpython/Lib/importlib/__init__.py", line 126, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 978, in _gcd_import
  File "", line 961, in _find_and_load
  File "", line 950, in _find_and_load_unlocked
  File "", line 655, in _load_unlocked
  File "", line 677, in exec_module
  File "", line 205, in _call_with_frames_removed
  File "/home/serhiy/py/cpython/Lib/test/test_os.py", line 5, in 
import asynchat
  File "/home/serhiy/py/cpython/Lib/asynchat.py", line 48, in 
import asyncore
  File "/home/serhiy/py/cpython/Lib/asyncore.py", line 65, in 
PendingDeprecationWarning, stacklevel=2)
PendingDeprecationWarning: asyncore module is deprecated in 3.6. Use asyncio 
instead.

test_os failed

1 test failed:
test_os

Total duration: 59 ms
Tests result: FAILURE

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28522] can't make IDLEX work with python._pth and python-3.6.0b2

2016-10-25 Thread Big Stone

Big Stone added the comment:

I just see a windows screen poping up with (translated from french)

"Python has stopped to work" 

a problem caused this program to stop working correctly. Windows is going to 
close this program and will inform you if a solution is available.

--

___
Python tracker 

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



[issue28530] Howto detect if an object is of type os.DirEntry

2016-10-25 Thread R. David Murray

R. David Murray added the comment:

Out of curiosity, what is your use case?

You can grab an object you know is a DirEntry and take its type to get a type 
object to use in, for example, isinstance.

posix.DirEntry is exposed...either nt.DirEntry should be too, or the posix one 
shouldn't be, and/or there should be an os.DirEntry superclass.  So, something 
isn't quite right here no matter how you look at it, IMO.

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



[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-25 Thread Steve Dower

Steve Dower added the comment:

Not sure how I missed it originally, but that extra 1 char is actually very 
important:

Python 3.6.0b2 (v3.6.0b2:b9fadc7d1c3f, Oct 10 2016, 20:36:51) [MSC v.1900 32 
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>  import sys
>>>  sys.ps1='> '
>  sys

The extra space is because of that. Really ought to fix this before the next 
beta.

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

___
Python tracker 

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



[issue28532] Show sys.version when -V option is supplied twice.

2016-10-25 Thread INADA Naoki

New submission from INADA Naoki:

As discussed on python-dev, this patch adds -VV option to python cmdline.

$ ./python -V
Python 3.6.0b2+
$ ./python -VV
Python 3.6.0b2+ (3.6:84a3c5003510+, Oct 26 2016, 02:47:38) 
[GCC 6.2.0 20161005]

The patch includes doc and man update.
Please see, especially my English.

--
assignee: inada.naoki
components: Interpreter Core
files: verbose-version.patch
keywords: patch
messages: 279428
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Show sys.version when -V option is supplied twice.
type: behavior
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45221/verbose-version.patch

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Guido van Rossum

Guido van Rossum added the comment:

Sorry about that. Should I roll it back or is there a way to make the test pass 
(expect this deprecation)?

--

___
Python tracker 

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



[issue28514] Python (IDLE?) freezes on file save on Windows

2016-10-25 Thread Kamran

Kamran added the comment:

To Ned Deily
I am using Python 3.2.3 because I use it at schoolo and my teacher said use
this. Also because I do not know how to use any other model other than this
because I was taught this at school. ANY SUGGESTIONS

THANKS

*Kamran Muhammad*

On Mon, Oct 24, 2016 at 8:05 PM, Eryk Sun  wrote:

>
> Eryk Sun added the comment:
>
> > Windows 7 is very old.
>
> 3.8 will probably be the last Python version to support Windows 7 (2020-01
> EOL). 3.6 is the last to support Vista.
>
> --
> nosy: +eryksun
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28522] can't make IDLEX work with python._pth and python-3.6.0b2

2016-10-25 Thread Steve Dower

Steve Dower added the comment:

Check in the Event Log viewer to see if there is an "Application Error" entry 
for python.exe. Also, if you run python.exe from a command prompt there may be 
more information displayed in the output.

--

___
Python tracker 

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



[issue28530] Howto detect if an object is of type os.DirEntry

2016-10-25 Thread Eryk Sun

Eryk Sun added the comment:

os.DirEntry exists in 3.6, but the change wasn't backported to 3.5. See issue 
27038. As a workaround, you can scan a non-empty directory to get a reference 
to the DirEntry type, e.g.:

import os
import tempfile

with tempfile.NamedTemporaryFile() as f:
path = os.path.dirname(f.name)
DirEntry = type(next(os.scandir(path)))

--
nosy: +eryksun

___
Python tracker 

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



[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, what is the reason for this code!

But Python implementation of popitem() don't call overridden 
__getitem__/__delitem__. It uses dict.pop(). Simplified C implementation is 
closer to Python implementation.

expiringdict is not the only implementation broken by accelerated OrderedDict. 
See other example in issue28014.

--

___
Python tracker 

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



[issue28259] Ctypes bug windows

2016-10-25 Thread Aristotel

Aristotel added the comment:

Sorry for delay. I tried to write as small as possible example. Sorry if it is 
too big
Usage: run 2 consoles, cd to dir with sources. In first console type 'python3 
main.py test1.tox', and in second type 'python3 main.py test2.tox'. Wait 1-2 
min until apps connect and you will see a lot of "access violation reading 
0x" when consoles start video call. sometimes apps crashes too. crashes 
fine on both win 7 an win 8 for me

--
Added file: http://bugs.python.org/file45222/toxygen_video_test.zip

___
Python tracker 

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



[issue28333] input() with Unicode prompt produces mojibake on Windows

2016-10-25 Thread Eryk Sun

Eryk Sun added the comment:

I forgot to include the link to the python-list thread where this came up:

https://mail.python.org/pipermail/python-list/2016-October/715428.html

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think replacing

import asynchat
import asyncore

with

with warnings.catch_warnings():
warnings.simplefilter('ignore', PendingDeprecationWarning)
import asynchat
import asyncore

can help.

asynchat and asyncore are used in several tests.

In long term asynchat and asyncore should be replaced with alternatives.

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Sorry about this Serhiy. I can work on another patch based on your code snippet 
later today.

Should I create a different ticket about replacing asyncore and asynchat?

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Should I create a different ticket about replacing asyncore and asynchat?

This may require several tickets, one per case.

--
components: +Library (Lib)
resolution: fixed -> 
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.7

___
Python tracker 

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



[issue28533] Replace asyncore

2016-10-25 Thread Mariatta Wijaya

New submission from Mariatta Wijaya:

Deprecation warning was added to asyncore in https://bugs.python.org/issue25002

asyncore is still used in several tests and should be replaced.

--
messages: 279439
nosy: Mariatta
priority: normal
severity: normal
status: open
title: Replace asyncore

___
Python tracker 

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



[issue28534] Replace asynchat

2016-10-25 Thread Mariatta Wijaya

New submission from Mariatta Wijaya:

Deprecation warning was added to asynchat in https://bugs.python.org/issue25002

asynchat is still used in several tests and should be replaced.

--
components: asyncio
messages: 279441
nosy: Mariatta, gvanrossum, yselivanov
priority: normal
severity: normal
status: open
title: Replace asynchat

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, asyncore/asynchat are used in smtpd!

It looks to me that we should first write asyncio alternative to smtpd, then 
deprecate smtpd, and only after this we can deprecate asyncore/asynchat.

--
dependencies: +Deprecate smtpd (based on deprecated asyncore/asynchat): write a 
new smtp server with asyncio

___
Python tracker 

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



[issue28533] Replace asyncore

2016-10-25 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
components: +asyncio
nosy: +gvanrossum, yselivanov

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks Serhiy, 

I created these two tickets:
https://bugs.python.org/issue28534
https://bugs.python.org/issue28533

--

___
Python tracker 

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



[issue28529] 0 ** 0 should raise ArithmeticError

2016-10-25 Thread Mark Dickinson

Mark Dickinson added the comment:

Also, https://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_power_of_zero

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue17711] Persistent id in pickle with protocol version 0

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



[issue14061] Misc fixes and cleanups in archiving code in shutil and test_shutil

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
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



[issue27517] LZMACompressor and LZMADecompressor raise exceptions if given empty strings twice

2016-10-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue25002] Deprecate asyncore/asynchat

2016-10-25 Thread R. David Murray

R. David Murray added the comment:

The alternative has already been written: aiosmtpd, in the aiolibs project.  
The question is should it be added to the stdlib...

--

___
Python tracker 

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



  1   2   >