[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

jcr: 3.5 only gets security fixes.  If this issue does not apply to 3.6 or 3.7, 
this should be closed.  When core developers (snake after name) change the 
headers, you should assume that they know what they are doing and not change 
them back.

--

___
Python tracker 

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



[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-27 Thread Terry J. Reedy

Change by Terry J. Reedy :


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



[issue31552] IDLE: Convert browswers to use ttk.Treeview

2017-09-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The main issue for conversion is expanding nodes.  tree.py does not define a 
widget class.  Rather, is uses a used a canvas and places images and text 
thereupon.  The latter is done with instances of TreeNode.  Each instance 
thereof is initialized with an instance of a subclass of TreeItem.  TreeItems 
can tell their TreeNode whether they can generate children without actually 
doing so.

Treeview *is* a widget which manages internal column and line structures.  
Clicking a [+] or [-] icon generates a '<>' or '<>' 
event.  Double clicking a line generates both a select and flip event.  The 
catch is that there is no [+] unless the node already has at least one child.

One solution would be to initially generate the whole tree of Treeview items 
from the pyclbr tree.  Another is to give items with children a dummy child and 
replace it on demand.  The item could be given its line number (as a string) as 
its id.  A subclass of Treeview (or a Frame containing one) could have a dict 
mapping ids to child dicts).

Since the browser TreeItem subclasses are used by pathbrowser, I would 
initially move them to that module rather than delete them.  Or I would combine 
the two modules.

--

___
Python tracker 

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



[issue31552] IDLE: Convert browswers to use ttk.Treeview

2017-09-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Two concrete reasons to make the conversion: two issues are stymied by current 
tree.TreeNode.

1. #25090 tree.TreeNode requires an icon for every line.  Hence functions and 
classes get python file and director icons and they are difficult to remove.  
By default, Treeview items do not get an image beside the text.

2. #20827 tree.TreeNode hardcodes single click behavior (in multiple places). 
TreeItems can only override or augment double clicks.  So it would be hard to 
keep hilites synchronized in browser and editor.  Treeview generates 
'<>' when a line is clicked on; setting the editor line can be 
done in a select handler.

--

___
Python tracker 

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



[issue22140] "python-config --includes" returns a wrong path (double prefix)

2017-09-27 Thread Benjamin Peterson

Benjamin Peterson  added the comment:


New changeset 68b131d5b674549bb637b366730497714ad11328 by Benjamin Peterson in 
branch '3.6':
[3.6] closes bpo-22140: Prevent double substitution of prefix in 
python-config.sh (GH-3769) (#3793)
https://github.com/python/cpython/commit/68b131d5b674549bb637b366730497714ad11328


--

___
Python tracker 

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



[issue22140] "python-config --includes" returns a wrong path (double prefix)

2017-09-27 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
pull_requests: +3777

___
Python tracker 

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



[issue20827] IDLE : Display function argument list in ClassBrowser

2017-09-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

As with removing icons (#25090), moving 'highlight line in editor' from double 
click to single click is not trivial.  Single click behavior is baked into 
tree.  TreeNode.  TreeItems can only override or augment double-click behavior. 
 I am deferring 'improve visibility of function argument list until I seriously 
look at ttk.Treeview (#31552).

--

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-09-27 Thread Julien Palard

Julien Palard  added the comment:

I'm still unable to reproduce the bug.

I'm now monitoring the docs.python.org hierarchy whith a:

grep -rl 'définition' /srv/docs.python.org/ja/; grep -rl か 
/srv/docs.python.org/{2.7,3.6,3.7}

So if it happen again we'll maybe learn more, according to this simple grep the 
bug is not on production at this time on any page.

--

___
Python tracker 

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



[issue1649329] Extract file-finding and language-handling code from gettext.find

2017-09-27 Thread Éric Araujo

Éric Araujo  added the comment:

Reopening.  Eggs are still not officially blessed, but zipapps are.

--
resolution: rejected -> 
stage: resolved -> 
status: closed -> open
versions: +Python 3.7 -Python 3.2

___
Python tracker 

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



[issue1649329] Extract file-finding and language-handling code from gettext.find

2017-09-27 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

FYI - We run into this problem getting things using gettext for i18n within a 
hermetic zipped up Python application at work.  I'm not reopening it as I have 
nothing new to propose right now, but figured I'd drop a note that it does seem 
like a good idea.

Assuming that everything lives on a local filesystem is not a given.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue31614] can't list groupby generator without breaking the sub groups generators

2017-09-27 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Except for display the last few elements, this is the documented and intended 
behavior: ( https://docs.python.org/3/library/itertools.html#itertools.groupby 
):

'''
The returned group is itself an iterator that shares the underlying iterable 
with groupby(). Because the source is shared, when the groupby() object is 
advanced, the previous group is no longer visible. So, if that data is needed 
later, it should be stored as a list:

groups = []
uniquekeys = []
data = sorted(data, key=keyfunc)
for k, g in groupby(data, keyfunc):
groups.append(list(g))  # Store group iterator as a list
uniquekeys.append(k)
'''

The display of the last few elements isn't supposed to happen.  That is being 
fixed so that all of the subiterator results are empty when the parent iterator 
is exhausted.

--
assignee:  -> rhettinger
nosy: +rhettinger
resolution:  -> not a bug
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



[issue31613] tkinter.simpledialog default buttons (not buttonbox) are not localized, unlike all messagebox

2017-09-27 Thread jcrmatos

jcrmatos  added the comment:

Hello,

I would expect the same behaviour as askopenfilename from tkinter.filedialog 
where the buttons are localized (in my case in Portuguese).

What I get is the buttons (in tkinter.simpledialog) are always in English.

Best regards,

JM

--

___
Python tracker 

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



[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-27 Thread jcrmatos

jcrmatos  added the comment:

Hello,

There are no parameters for the buttons.

There is a difference in behaviour between messagebox windows (no shortcuts at 
all) to askopenfilename from tkinter.filedialog where the Open button has teh 
shortcut (but the Cancel one doesn't).


Best regards,

JM

--

___
Python tracker 

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



[issue31614] can't list groupby generator without breaking the sub groups generators

2017-09-27 Thread Loïc Le Loarer

New submission from Loïc Le Loarer :

If I "list" the itertools groupby generator, then the sub generators of each 
groups are all empty except the last one.

import itertools as i
L = ['azerty','abcd','ac','aaa','z','baba','bitte','rhum','z','y']
g = list(i.groupby(L, lambda x: x[0]))
number_of_groups = len(g)
ans = 0
for k, v in g: # This doesn't work
#for k, v in i.groupby(L, lambda x: x[0]): # This works
v = list(v)
print(k,v,len(v))
ans += 100*len(v)//number_of_groups
print(ans)
assert(ans == 163)
I don't understand why. Is my code broken ?

The need for saving the group generator first exists when I need the number of 
groups before walking thru the groups, like in the above example.

I have not been able to test to latest python versions, is the problem already 
fixed ?

--
messages: 303180
nosy: Loïc Le Loarer
priority: normal
severity: normal
status: open
title: can't list groupby generator without breaking the sub groups generators
type: behavior
versions: Python 2.7, Python 3.5

___
Python tracker 

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



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman

Oren Milman  added the comment:

fixed indeed. thanks! :)

--

___
Python tracker 

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



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Ezio Melotti

Ezio Melotti  added the comment:

This should be fixed now, thanks for the report!

--
assignee:  -> ezio.melotti
resolution:  -> third party
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



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman

Oren Milman  added the comment:

thanks :)
opened http://psf.upfronthosting.co.za/roundup/meta/issue642

--

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-09-27 Thread Julien Palard

Julien Palard  added the comment:

I'd prefer to understand exacly what is going wrong and fix it, but I agree it 
would fix the issue and even fix the other hypothesis, so I don't exclude doing 
it, even if I find the root cause.

I'm currently doing a full build locally (I previously tried building using the 
Doc/Makefile, was unable to reproduce the bug, I'm now building using the 
build_docs.py script) it will take like an hour on my laptop, I'll see.

--

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-09-27 Thread Zachary Ware

Zachary Ware  added the comment:

Sounds like we really ought to be building each translation in its own 
directory so they can't possibly stomp on each other.

--
nosy: +zach.ware

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-09-27 Thread Julien Palard

Julien Palard  added the comment:

Found another hypothesis: As the builds take a long time, builds may overlap 
(starting a build while another is still unfinished, typically rsync-ing its 
files), but this would result in:

- japanese being build while french being rsynced
- french being build while english being rsynced
- english being build while japanese being rsynced

This mean japanese on french pages, french on english pages, and english on 
japanese pages, which is the other way around, nobody spotted any of this 
overlaps, so I discard this hypothesis.

--

___
Python tracker 

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



[issue31613] tkinter.simpledialog default buttons (not buttonbox) are not localized, unlike all messagebox

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

What do you expect and what do you get?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

These are standard Tk widgets. Tkinter is not responsible for the look and feel 
of them. It just call the Tk command tk_messageBox with corresponding 
parameters [1].

[1] https://www.tcl.tk/man/tcl8.6/TkCmd/messageBox.htm

--

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-09-27 Thread Julien Palard

Julien Palard  added the comment:

Thanks for those details.

Until we find japanese on a french page, or french on an english page, which 
would clearly disproove the hypothesis of a build picking up translated files 
from a previous build, I still consider this hypothesis the good one.

I'm also seeing pages like genindex-位.html on the english directory tree, which 
is less surprising : the english build may just not remove them.

--

___
Python tracker 

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



[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-27 Thread jcrmatos

jcrmatos  added the comment:

Hello,

Here it is.


from tkinter import Tk
from tkinter.messagebox import askokcancel, showerror


master=Tk()
showerror('Error', 'Error message', parent=master)
a = askokcancel('Error', 'Error message', parent=master)
master.mainloop()


Best regards,

JM

--

___
Python tracker 

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



[issue31613] tkinter.simpledialog default buttons (not buttonbox) are not localized, unlike all messagebox

2017-09-27 Thread jcrmatos

jcrmatos  added the comment:

Hello,

Here is some example code:

from tkinter import Label, Tk
from tkinter.simpledialog import Dialog


class CalendarDialog(Dialog):
def __init__(self, parent, title='', year=0, month=0):
self.year = year  # type: int
self.month = month  # type: int

Dialog.__init__(self, parent, 'Select a date')

def body(self, parent):
Label(parent, text='A label').pack()


master = Tk()
result = CalendarDialog(master, year=2017, month=9).result
master.mainloop()


Best regards,

JM

--

___
Python tracker 

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



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Chi Hsuan Yen

Chi Hsuan Yen  added the comment:

IIRC bugs of bugs.python.org should go to 
http://psf.upfronthosting.co.za/roundup/meta/

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



[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Would be help if you provide a minimal script that exposes the problem.

--

___
Python tracker 

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



[issue31531] crash and SystemError in case of a bad zipimport._zip_directory_cache

2017-09-27 Thread Oren Milman

Oren Milman  added the comment:

Yet another code that causes a SystemError:
import zipimport
importer = zipimport.zipimporter('foo.zip')
tup_as_list = 
list(zipimport._zip_directory_cache['foo.zip']['foo\\__init__.py'])
tup_as_list[0] = None
zipimport._zip_directory_cache['foo.zip']['foo\\__init__.py'] = 
tuple(tup_as_list)
importer.load_module('foo')

This could be fixed by checking in get_code_from_data() whether modpath is a 
string.

--

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-09-27 Thread asl

asl  added the comment:

html dump

--
Added file: https://bugs.python.org/file47173/デザインと歴史 FAQ — Python 2.7.14 
ドキュメント.html

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-09-27 Thread asl

asl  added the comment:

Attached is a screenshot of https://docs.python.org/2.7/faq/design.html 
generated by web-capture.net shortly before this report was created.

It shows the whole content was in Japanese.

On the screenshot, it says it was last updated on Sep 26, 2017.

It was one of the numerous sources I used to verify that it wasn't just my end 
which was seeing the language mix up.

Unfortunately, that is the only actual screenshot that I have available that 
was created when it happened.

The browser cache for the English page is also gone but I do have the cache of 
the Japanese page which was in French.

https://docs.python.org/ja/2.7/faq/design.html
```
HTTP/1.1 200
status: 304
date: Wed, 27 Sep 2017 16:54:12 GMT
via: 1.1 varnish
age: 130544
x-served-by: cache-sin18020-SIN
x-cache: HIT
x-cache-hits: 2
x-timer: S1506531252.204533,VS0,VE0
server: nginx
content-type: text/html
last-modified: Tue, 26 Sep 2017 03:00:31 GMT
etag: "59c9c2cf-146c2"
x-clacks-overhead: GNU Terry Pratchett
accept-ranges: bytes
content-length: 83650
```

--
Added file: https://bugs.python.org/file47172/shot-20170926-28526-p58mc1.jpeg

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread Steve Dower

Steve Dower  added the comment:

If you install VS 2017 and select the "Python native development" option as 
described in the dev guide, you get the correct compilers (plural) for Python 
3.5 onwards. The build.bat file (specifically, the find_msbuild.bat helper) 
will choose the correct version.

You do not need to install VS 2015 anymore. VS 2015 and VS 2017 both include VC 
toolset v140, which is the officially supported compiler (the VS version is 
separate).

The error is coming from the Tcl makefile at these lines:

.SUFFIXES:
.SUFFIXES:.c .rc

I personally have no idea what these mean or why it is failing, and I don't 
even know what these are meant to do. But perhaps you have some file called 
".SUFFIXES" or similar that is causing the Tcl build to fail?

--

___
Python tracker 

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



[issue31613] tkinter.simpledialog default buttons (not buttonbox) are not localized, unlike all messagebox

2017-09-27 Thread jcrmatos

New submission from jcrmatos :

Hello,

tkinter.simpledialog default buttons (not buttonbox) are not localized, unlike 
all messagebox.

Best regards,

JM

--
components: Tkinter
messages: 303162
nosy: jcrmatos
priority: normal
severity: normal
status: open
title: tkinter.simpledialog default buttons (not buttonbox) are not localized, 
unlike all messagebox
type: behavior
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



[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-27 Thread jcrmatos

Change by jcrmatos :


--
versions: +Python 3.5 -Python 3.7

___
Python tracker 

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



[issue25359] io.open() fails to open ascii file if LANG env not set

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Possible related issues: issue6393 and issue30409.

--

___
Python tracker 

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



[issue31611] Tests failures using -u largefile when the disk is full

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

largefile - It is okay to run some test that may create huge
files.  These tests can take a long time and may
consume >2GB of disk space temporarily.

I understand this as 2GB is a minimum free disk space for tests without 
"largefile". Tests with "largefile" need more free disk space.


Accordingly the bigmemtest decorator is used for tests that consume >1GB of RAM.

--

___
Python tracker 

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



[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Nick Coghlan

Change by Nick Coghlan :


--
stage: backport needed -> 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



[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 084f80b82c564c8a3cef26fc6e56da188a379be2 by Nick Coghlan (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31588: Validate return value of __prepare__() methods (GH-3790)
https://github.com/python/cpython/commit/084f80b82c564c8a3cef26fc6e56da188a379be2


--

___
Python tracker 

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



[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-09-27 Thread Josh Rosenberg

Change by Josh Rosenberg :


--
nosy: +josh.r

___
Python tracker 

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



[issue31611] Tests failures using -u largefile when the disk is full

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

> "largefile" is for moderately large files, around 2 GiB.

largefile creates files larger than 2 GB. Extract of test_largefile:

# size of file to create (>2GB; 2GB == 2147483648 bytes)
size = 25

My VM has less than 2 GB free: only 1.36 GB free.

--

___
Python tracker 

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



[issue31607] Add listsize in pdb.py

2017-09-27 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I don't think this is worth adding a separate command.

If some controls were needed (changing the list size has not been requested 
before), it may be better to follow gdb with set/get commands that could be 
used for other parameters 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



[issue23239] SSL match_hostname does not accept IP Address

2017-09-27 Thread Alex Gaynor

Alex Gaynor  added the comment:

I'd be in favor of backporting this to the 2.x - encouraging reliance on the 
nonsense behaviour of putting IPAddresses in DNS Names or relying on CN over 
SAN is bad, and we shouldn't encourage it.

--
nosy: +Alex Gaynor

___
Python tracker 

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



[issue29400] Add instruction level tracing via sys.settrace

2017-09-27 Thread Jakub Wilk

Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue23239] SSL match_hostname does not accept IP Address

2017-09-27 Thread j-harbott

j-harbott  added the comment:

The original issue still exists in py27, is there a chance to get the fix 
backported? See https://github.com/pyca/cryptography/issues/3943 and 
https://github.com/shazow/urllib3/issues/1269 for sample issues that arise 
because we need to work around this one.

--
nosy: +j-harbott
versions: +Python 2.7

___
Python tracker 

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



[issue31584] Documentation Language mixed up

2017-09-27 Thread Julien Palard

Julien Palard  added the comment:

Local builds were not able to reproduce the bug for the moment and I did not 
spotted the bug on production neither. If anyone see it please write down the 
URL, the misplaced translation, and the date, time, timezone on which the 
string was found, so I can inspect the server logs.

Did the strings were all over the page, or only a few strings on a normally 
rendered page?

--

___
Python tracker 

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



[issue31611] Tests failures using -u largefile when the disk is full

2017-09-27 Thread Jeremy Kloth

Change by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread Jeremy Kloth

Change by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

To compile Python 2.7, you need VS 2008 *and* 2010.

To compile Python 3.5, 3.6 or master, you need VS 2015.

To compile Python 3.4, you need VS 2010.

I had to work on Python 2.7, 3.4, 3.5, 3.6 and master, so I installed VS 2008, 
2010 and 2015 :-)

I didn't give a try to VS 2017 yet. I'm fine with 3 VS versions installed in 
parallel ;-)

--

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> https://haypo-notes.readthedocs.io/cpython_windows.html#python-and-visual-studio-version-matrix

Thank you Victor.

Therefore I do need to install 4 versions of Visual Studio for building three 
major maintained branches: 2008, 2010, 2015 and 2017? Oh, now I understand why 
Victor doesn't have sufficient disk space for running tests.

--

___
Python tracker 

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



[issue31611] Tests failures using -u largefile when the disk is full

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Definitely the test shouldn't be quietly skipped! If you enable the "largefile" 
resource, but the test can't write large file, this is either a bug in the 
tested code, or an error in the test, or misconfiguration.

We already have the "extralargefile" resource which is excluded from "all". 
"largefile" is for moderately large files, around 2 GiB.

--

___
Python tracker 

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



[issue31580] Defer compiling regular expressions

2017-09-27 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I'm closing this experiment.

I'm not convinced that even if we can make start up time faster for module 
global regular expressions, we'll ever get enough buy-in from the ecosystem to 
make this worth it, because you'd really want to get all your dependencies 
converted, and that would take years, especially since any wins wouldn't be 
possible until Python 3.7.

--
resolution:  -> wont fix
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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread Paul Moore

Paul Moore  added the comment:

I believe that's the case, although I'm somewhat surprised by the nature of the 
error. I'm just checking diffs at the moment.

But VS 2015 is the officially supported compiler for 3.6.

--

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

Here are my notes on how to compile CPython on Windows:
https://haypo-notes.readthedocs.io/cpython_windows.html#python-and-visual-studio-version-matrix

--

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

> I have installed Visual Studio 2017 and have ran PCbuild\build.bat.

Oh, I think that VS 2017 is a new feature of Python 3.7 (master), no?

Steve Dower, or Zachary Ware: can you confirm?

See bpo-31340 and bpo-30389.

--

___
Python tracker 

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



[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

CI is still running for the backport, so I'll merge that tomorrow.

Thanks for the patch!

--
resolution:  -> fixed
stage: patch review -> backport needed

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I have installed Visual Studio 2017 and have ran PCbuild\build.bat.

>From the master branch all have built successfully.

--

___
Python tracker 

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



[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3776

___
Python tracker 

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



[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 5837d0418f47933b2e3c139bdee8a79c248a943c by Nick Coghlan (Oren 
Milman) in branch 'master':
bpo-31588: Validate return value of __prepare__() methods (GH-3764)
https://github.com/python/cpython/commit/5837d0418f47933b2e3c139bdee8a79c248a943c


--

___
Python tracker 

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



[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Aye, that's exactly what I did.

--

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

How did you build Python 3.6 on Windows? Did you use Visual Studio 2015? Do you 
use Visual Studio GUI or in the command line?

--
nosy: +haypo

___
Python tracker 

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



[issue31612] Building 3.6 fails on Windows

2017-09-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

makefile.vc(1076): fatal error U1087: cannot have : and :: dependents for same 
target [C:\Users\Serhiy Storchaka\py\cpython3.6\PCbuild\tcl.vcxproj]

The full log is attached.

--
components: Build, Windows
files: build.log
messages: 303141
nosy: paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Building 3.6 fails on Windows
type: compile error
versions: Python 3.6
Added file: https://bugs.python.org/file47171/build.log

___
Python tracker 

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



[issue6986] _json crash on scanner/encoder initialization error

2017-09-27 Thread Oren Milman

Change by Oren Milman :


--
pull_requests: +3775

___
Python tracker 

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



[issue31611] Tests failures using -u largefile when the disk is full

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

> This is expected behavior, isn't?

I would prefer that the test skips itself when the disk is full: on "OSError: 
[Errno 28] No space left on device".

Or maybe largefile resource should be excluded from "all"... at least on 
Windows, since NTFS doesn't see to support files full of zeros without 
accounting zero bytes (seek + write 1 byte: NTFS counts the seek in the disk 
space).

--

___
Python tracker 

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



[issue6986] _json crash on scanner/encoder initialization error

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It would be nice.

--

___
Python tracker 

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



[issue31607] Add listsize in pdb.py

2017-09-27 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi David,

It's my fault and you are right, I didn't give the right description.

By default when you want to list the source code with pdb, you will use the 
list command but this one is just limited to the 10 next lines and there is no 
possibility to change this limit of 10 lines.

We can play with the second parameter of pdb, examples:

* list 10, 11
will show the code from the line 10 to 11

* list 10, 50
will show the code from the line 10 to 50

* list 10, 5
will show the code from the line 10 and the next 5 lines.

* list
will show from the current position and the next 10 lines.

and my first question was, why this limit exists? Could we change that?

after, I have read the doc of gdb and I have seen there was a "set linesize 
count" option where you can configure the number of lines to show.

Here is the reason of my proposal.

For the configuration of pdb, I am interested, I know we can use the .pdbrc 
file but it is really interesting if we desire to add new aliases or add new 
commands for the breakpoints.


Here is an other example for this issue:

./python -m pdb demo.py
 
> demo.py(1)()
-> import os
(Pdb) listsize 5
List size: 5
(Pdb) l
  1  -> import os
  2 import sys
  3 
  4 def main():
  5 print(f"CWD: {sys.getcwd()}")
  6 print(f"PID: {sys.getpid()}")
(Pdb) l
  7 
  8 if __name__ == '__main__':
  9 main()
[EOF]
(Pdb)

--

___
Python tracker 

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



[issue31611] Tests failures using -u largefile when the disk is full

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is expected behavior, isn't?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31607] Add listsize in pdb.py

2017-09-27 Thread R. David Murray

R. David Murray  added the comment:

It isn't obvious from your description here what 'listsize' does.  I think you 
should have provided some more motivating details :)

Looking at your PR, this is essentially a configuration setting.  I wonder if 
we should think about the general problem rather than continuing to clutter the 
top level command namespace.  (The only current example of this I spotted in 
the pdb docs is display/undisplay.)

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



[issue31603] Please add argument to override stdin/out/err in the input builtin

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

input() is a convenient function for simple user interaction. If you need to 
read a data from different file object just use its readline() method.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29400] Add instruction level tracing via sys.settrace

2017-09-27 Thread Fred L. Drake, Jr.

Change by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

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



[issue29400] Add instruction level tracing via sys.settrace

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

The main blocker question is the API change. I started a thread on python-dev 
to discuss it:
https://mail.python.org/pipermail/python-dev/2017-September/149632.html

--

___
Python tracker 

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



[issue31608] crash in methods of a subclass of _collections.deque with a bad __new__()

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

All other sequence objects return an instance of the base class rather than a 
subclass. list, tuple, str, bytes, bytearray, array. Only deque tries to create 
an instance of a subclass.

--
assignee:  -> rhettinger
nosy: +rhettinger, serhiy.storchaka
versions: +Python 2.7, Python 3.6

___
Python tracker 

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



[issue31609] PCbuild\clean.bat fails if the path contains whitespaces

2017-09-27 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
title: PCbuild\clean.bat fails if the patch contains whitespaces -> 
PCbuild\clean.bat fails if the path contains whitespaces

___
Python tracker 

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



[issue31603] Please add argument to override stdin/out/err in the input builtin

2017-09-27 Thread R. David Murray

R. David Murray  added the comment:

This is probably a topic for the python-ideas mailing list.  For example, 
rather than complicating input, it might be better to propose adding a 
redirect_stdin to contextlib to parallel the two existing redirect context 
managers.  I don't remember why that was not added when the others were, but 
there was probably a reason, so a discussion about what the best solution is 
for the use case is in order, and python-ideas is the place for that.

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



[issue31606] [Windows] Tests failing on installed Python 3.7a1 on Windows

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

I created bpo-31611 "Tests failures using -u largefile when the disk is full" 
for failures caused by my low free disk space.

--

___
Python tracker 

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



[issue31611] Tests failures using -u largefile when the disk is full

2017-09-27 Thread STINNER Victor

New submission from STINNER Victor :

I ran the Python test suite on Windows on a freshly installed Python 3.7a1 and 
I got errors: bpo-31606.

I created a separated issue for tests failing because my disk has low free 
space.


On my Windows VM, I have a single 40 GB disk with 1.36 GB free.

C:\Users\haypo\AppData\Local\Programs\Python\Python37>python -m test -v -u all 
test_largefile

==
ERROR: test_truncate (test.test_largefile.PyLargeFileTest)
--
Traceback (most recent call last):
  File 
"C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_largefile.py",
 line 37, in setUp
f.flush()
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\_pyio.py", 
line 1226, in flush
self._flush_unlocked()
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\_pyio.py", 
line 1233, in _flush_unlocked
n = self.raw.write(self._write_buf)
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\_pyio.py", 
line 1630, in write
return os.write(self._fd, b)
OSError: [Errno 28] No space left on device

(other tests fail with similar message)



test_io:

==
ERROR: test_large_file_ops (test.test_io.CIOTest)
--
Traceback (most recent call last):
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_io.p
y", line 574, in test_large_file_ops
self.large_file_ops(f)
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_io.p
y", line 355, in large_file_ops
self.assertEqual(f.write(b"xxx"), 3)
OSError: [Errno 28] No space left on device

==
ERROR: test_large_file_ops (test.test_io.PyIOTest)
--
Traceback (most recent call last):
  File 
"C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_io.py", 
line 574, in test_large_file_ops
self.large_file_ops(f)
  File 
"C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_io.py", 
line 355, in large_file_ops
self.assertEqual(f.write(b"xxx"), 3)
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\_pyio.py", 
line 1630, in write
return os.write(self._fd, b)
OSError: [Errno 28] No space left on device

--
components: Tests
messages: 303130
nosy: haypo
priority: normal
severity: normal
status: open
title: Tests failures using -u largefile when the disk is full
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



[issue6986] _json crash on scanner/encoder initialization error

2017-09-27 Thread Oren Milman

Oren Milman  added the comment:

I would be happy to open such a PR, if you don't mind.

--
nosy: +Oren Milman

___
Python tracker 

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



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

2017-09-27 Thread Stefan Behnel

Change by Stefan Behnel :


--
nosy:  -scoder

___
Python tracker 

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



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

2017-09-27 Thread Stefan Behnel

Stefan Behnel  added the comment:

FWIW, both the feature and the PR look ok to me. Code formatting is a little 
funny at times, but the implementation looks good.

--
nosy: +scoder

___
Python tracker 

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



[issue31610] Use select.poll instead of select.select in SocketServer.BaseServer.serve_forever

2017-09-27 Thread Беатрис Бонева

New submission from Беатрис Бонева :

The select function does not work for file descriptors with number >= 1024. It 
has FD_SETSIZE limit (see 
https://stackoverflow.com/questions/7976388/increasing-limit-of-fd-setsize-and-select#7977082).
So, serve_forever won't work if more than 1024 file descriptors are opened in 
the process (ValueError: filedescriptor out of range in select() is raised).
Moreover, the select function is considered inefficient, hard to scale and 
old-fashioned nowadays. Refer to 
https://stackoverflow.com/questions/970979/what-are-the-differences-between-poll-and-select#3951845.
Better alternative will be to use poll or epoll even.

--
components: Library (Lib)
messages: 303127
nosy: Беатрис Бонева
priority: normal
severity: normal
status: open
title: Use select.poll instead of select.select in 
SocketServer.BaseServer.serve_forever
type: performance

___
Python tracker 

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



[issue31608] crash in methods of a subclass of _collections.deque with a bad __new__()

2017-09-27 Thread Oren Milman

Change by Oren Milman :


--
keywords: +patch
pull_requests: +3774
stage:  -> patch review

___
Python tracker 

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



[issue31609] PCbuild\clean.bat fails if the patch contains whitespaces

2017-09-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

C:\Users\Serhiy Storchaka\py\cpython3.6-debug>PCbuild\clean.bat
'C:\Users\Serhiy' is not recognized as an internal or external command,
operable program or batch file.

--
components: Build, Windows
messages: 303126
nosy: paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: PCbuild\clean.bat fails if the patch contains whitespaces
type: behavior

___
Python tracker 

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



[issue31608] crash in methods of a subclass of _collections.deque with a bad __new__()

2017-09-27 Thread Oren Milman

New submission from Oren Milman :

The following code causes the interpreter to crash:

import _collections
class BadDeque(_collections.deque):
def __new__(cls, *args):
if len(args):
return 42
return _collections.deque.__new__(cls)

BadDeque() * 42

(The interpreter would crash also if we replaced 'BadDeque() * 42' with
'BadDeque() + _collections.deque([42])'.)

This is because deque_copy() (in Modules/_collectionsmodule.c) returns whatever
BadDeque() returned, without verifying it is a deque.
deque_repeat() assumes that deque_copy() returned a deque, and passes it to
deque_inplace_repeat(), which assumes it is a deque, and crashes.

(Similarly, deque_concat() assumes that deque_copy() returned a deque, which
is the reason for the other crash.)


ISTM it is a very unlikely corner case, so that adding a test (as well as
a NEWS.d item) for it is unnecessary.
What do you think?

--
components: Extension Modules
messages: 303125
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: crash in methods of a subclass of _collections.deque with a bad __new__()
type: crash
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



[issue31606] [Windows] Tests failing on installed Python 3.7a1 on Windows

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Try to run these tests with -u all,-largefile.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31607] Add listsize in pdb.py

2017-09-27 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
keywords: +patch
pull_requests: +3772
stage:  -> patch review

___
Python tracker 

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



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
priority: normal -> critical

___
Python tracker 

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



[issue31593] [2.7][3.6] test_socketserver ForkingMixIn tests leaks child processes on Python 3.6

2017-09-27 Thread STINNER Victor

Change by STINNER Victor :


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



[issue31607] Add listsize in pdb.py

2017-09-27 Thread Stéphane Wirtel

New submission from Stéphane Wirtel :

I just added a new command for the prompt of Pdb.

(Pdb) listsize
List size: 10
(Pdb) listsize 5
List size: 5
(Pdb) listsize
List size: 5

I will publish a PR

--
messages: 303123
nosy: matrixise
priority: normal
severity: normal
status: open
title: Add listsize in pdb.py
type: enhancement
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Oren Milman

Oren Milman  added the comment:

Nick, maybe you tried to reproduce in release?
In debug (where I got the SystemError), you have in the beginning of 
_PyFrame_New_NoTrack():
#ifdef Py_DEBUG
if (code == NULL || globals == NULL || !PyDict_Check(globals) ||
(locals != NULL && !PyMapping_Check(locals))) {
PyErr_BadInternalCall();
return NULL;
}

--

___
Python tracker 

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



[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

There's no __prepare__ method in 2.7, so that version can't be affected by this.

For 3.6 and 3.7, I can't reproduce the reported SystemError. Instead, I get:

```
>>> class BadMetaclass(type):
... def __prepare__(*args):
... pass
... 
>>> class Foo(metaclass=BadMetaclass):
... pass
... 
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in Foo
TypeError: 'NoneType' object is not subscriptable

```

The error remains the same if I add `@classmethod` to the __prepare__ 
definition.


That's still thoroughly cryptic and worth changing, but indicates the test 
should be checking the error message details, not just the error type.

--
versions:  -Python 2.7

___
Python tracker 

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



[issue31593] [2.7][3.6] test_socketserver ForkingMixIn tests leaks child processes on Python 3.6

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset b4920d562b74e909bfae71bf119350a01d1d5e5e by Victor Stinner in 
branch '2.7':
bpo-31593: test_socketserver waits child processes (#3786)
https://github.com/python/cpython/commit/b4920d562b74e909bfae71bf119350a01d1d5e5e


--

___
Python tracker 

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



[issue31606] [Windows] Tests failing on installed Python 3.7a1 on Windows

2017-09-27 Thread STINNER Victor

New submission from STINNER Victor :

I installed Python 3.7a1 on Windows. The following tests fail:
---
372 tests OK.

5 tests failed:
test_io test_largefile test_marshal test_regrtest test_tools

30 tests skipped:
test_asdl_parser test_crypt test_curses test_dbm_gnu test_dbm_ndbm
test_devpoll test_epoll test_fcntl test_fork1 test_gdb test_grp
test_ioctl test_kqueue test_nis test_openpty test_ossaudiodev
test_pipes test_poll test_posix test_pty test_pwd test_readline
test_resource test_spwd test_syslog test_threadsignals test_wait3
test_wait4 test_xxtestfuzz test_zipfile64

Total duration: 4 min 18 sec
Tests result: FAILURE
---

test_regrtest: "ERROR: test_pcbuild_rt (test.test_regrtest.ProgramsTestCase)" 
because the tested script is not installed.

C:\Users\haypo\AppData\Local\Programs\Python\Python37>python -m test -v -u all 
test_largefile

==
ERROR: test_truncate (test.test_largefile.PyLargeFileTest)
--
Traceback (most recent call last):
  File 
"C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_largefile.py",
 line 37, in setUp
f.flush()
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\_pyio.py", 
line 1226, in flush
self._flush_unlocked()
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\_pyio.py", 
line 1233, in _flush_unlocked
n = self.raw.write(self._write_buf)
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\_pyio.py", 
line 1630, in write
return os.write(self._fd, b)
OSError: [Errno 28] No space left on device

(other tests fail with similar message)

I have a single 40 GB disk with 1.36 GB free.


C:\Users\haypo\AppData\Local\Programs\Python\Python37>python -m test -v  
test_marshal
== CPython 3.7.0a1 (v3.7.0a1:8f51bb4, Sep 19 2017, 19:32:44) [MSC v.1900 64 bit 
(AMD64)]
== Windows-8.1-6.3.9600-SP0 little-endian
== cwd: C:\Users\haypo\AppData\Local\Temp\test_python_4124
== CPU count: 4
== encodings: locale=cp1252, FS=utf-8
Run tests sequentially
0:00:00 [1/1] test_marshal
test_array (test.test_marshal.BufferTestCase) ... ok
(...)
test_large_marshal (test.test_marshal.BugsTestCase) ... ok
test_loads_2x_code (test.test_marshal.BugsTestCase) ... Windows fatal exception:
 stack overflow

Current thread 0x1528 (most recent call first):
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\unittest\case.
py", line 178 in handle
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\unittest\case.
py", line 743 in assertRaises
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_mars
hal.py", line 192 in test_loads_2x_code
  (...)
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\runpy.py", lin
e 193 in _run_module_as_main


test_tools:

==
ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts)
--
Traceback (most recent call last):
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_tool
s\test_sundry.py", line 36, in test_sundry
import_tool(name)
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_tool
s\__init__.py", line 21, in import_tool
return importlib.import_module(toolname)
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\importlib\__in
it__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 679, in exec_module
  File "", line 219, in _call_with_frames_removed
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\Tools\scripts\2to3
.py", line 5, in 
sys.exit(main("lib2to3.fixes"))
SystemExit: 1

--
Ran 59 tests in 3.094s

FAILED (errors=1)
Warning -- logging._handlerList was modified by test_tools
  Before: (28425746248, [, ], [])
  After:  (28425746248, [, ], [, ])
test test_tools failed
test_tools failed


test_io:

==
ERROR: test_large_file_ops (test.test_io.CIOTest)
--
Traceback (most recent call last):
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_io.p
y", line 574, in test_large_file_ops
self.large_file_ops(f)
  File "C:\Users\haypo\AppData\Local\Programs\Python\Python37\lib\test\test_io.p
y", line 355, in large_file_ops
self.assertEqual(f.write(b"xxx"), 3)
OSError: [Errno 28] No space left on device


[issue31588] SystemError in class creation in case of a metaclass with a bad __prepare__() method

2017-09-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I'm not a metaclass expert. Eric, Nick, could you please take a look at the 
patch?

--
versions: +Python 2.7, Python 3.6

___
Python tracker 

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



[issue25532] infinite loop when running inspect.unwrap over unittest.mock.call

2017-09-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Let's call it done with the current sys.getrecursionlimit() behaviour, and if 
that turns out to be problematic in practice, someone will hopefully file a new 
issue about it.

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



[issue31593] [2.7][3.6] test_socketserver ForkingMixIn tests leaks child processes on Python 3.6

2017-09-27 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3771

___
Python tracker 

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



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman

Change by Oren Milman :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman

Oren Milman  added the comment:

I am not 100% sure that issues are showed because they had a recent activity, 
but ISTM like the reason..

--

___
Python tracker 

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



[issue31593] [2.7][3.6] test_socketserver ForkingMixIn tests leaks child processes on Python 3.6

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset fdcf3e9629201ef725af629d99e02215a2d657c8 by Victor Stinner in 
branch '3.6':
bpo-31593: test_socketserver waits child processes (#3766)
https://github.com/python/cpython/commit/fdcf3e9629201ef725af629d99e02215a2d657c8


--

___
Python tracker 

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



[issue31605] meta issue: bugs.python.org search shows only issues with recent activity

2017-09-27 Thread Oren Milman

New submission from Oren Milman :

For example, when I search for 'ctypes', I get only two results.

Just in case, i checked and got the same results in multiple browsers, and also 
on Ubuntu and on Windows.

--
components: Demos and Tools
messages: 303114
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: meta issue: bugs.python.org search shows only issues with recent activity
type: behavior

___
Python tracker 

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



[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-27 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3770
stage: resolved -> patch review

___
Python tracker 

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



[issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC

2017-09-27 Thread STINNER Victor

STINNER Victor  added the comment:

Should we backport the fix to Python 3.3 and 3.4 as well?

I don't think so.

--

___
Python tracker 

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



[issue31604] unittest.TestLoader().loadTestsFromTestCase(...) fails when adding test cases with the expectedFailure decorator

2017-09-27 Thread Erasmus Cedernaes

New submission from Erasmus Cedernaes :

How to reproduce:
* Run the attached file with Python 2.7 without any modifications. This will 
produce an error, as described below.
* Uncomment line 2 (the decorator @unittest.expectedFailure) and run the file 
with Python 2.7. This will not produce an error.

Description:
Adding the decorator @unittest.expectedFailure to a unittest.TestCase causes 
the TestLoader().loadTestsFromTestCase(...) to fail with the following output:

===
$ python2.7 mwe.py
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
  File "[...]/mwe.py", line 12, in 
tests = unittest.TestLoader().loadTestsFromTestCase(TestClassThatFails)
  File "/usr/lib/python2.7/unittest/loader.py", line 50, in 
loadTestsFromTestCase
if issubclass(testCaseClass, suite.TestSuite):
TypeError: issubclass() arg 1 must be a class
==

The error does only occur when adding the test manually to a test suite. 
Running unittest.main(), does not produce the error.

--
components: Tests
files: mwe.py
messages: 303112
nosy: Erasmus Cedernaes
priority: normal
severity: normal
status: open
title: unittest.TestLoader().loadTestsFromTestCase(...) fails when adding test 
cases with the expectedFailure decorator
type: crash
versions: Python 2.7
Added file: https://bugs.python.org/file47170/mwe.py

___
Python tracker 

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



  1   2   >