[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Andre, we need to severely trim quotes when posting by email. A summary with 
added info.

Andre: 2000 pixels / 183 mm = 10.9 pixels / mm
Terry: 1440 pixels / 336 mm = 4.3 pixels / mm
Andre: Windows Display setting text size, custom scaling = 200%, 200%
Terry: "   " = 125%, none
Andre: 8 mm tall taskbar needs zoom 'margin' of 178.
Terry: 11 mm tall taskbar needs zoom 'margin' of 114.

I don't see now to get from px/mm, settings, and bar height to the needed zoom 
correction.

Conclusion 1: The previous Windows zoom margin of 78 is likely better for 
people with stock Windows (text size = 100%), making the change to 114 in PR 
13575 wrong for them.
Conclusion 2: No value is right for all Windows users.  I assume this is also 
true for Linux and Windows.

Conclusion 3: We need to somehow calculate a specific correction from 
information available from tkinter.  If necessary, add a 'Configurtion' button 
to the Options menu or Settings dialog.  Display a maximized text window, have 
user verify that it fits properly, and get geometry.

--

___
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

2019-05-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I changed the type to behavior because the hard-coded pixel heights prevent the 
browsers form being usable on at least one HiDPI monitor.  I closed #37041 in 
favor of this on the presumption that ttk.Treeview will work on such monitors, 
at least after fix_scaling(root) is called.  I posted a quick test there.

--
type: enhancement -> behavior
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue37041] IDLE: path browser unusable on some displays

2019-05-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Another reason to replace IDLE's custom tree widget with hard-coded constants 
with ttk.Treeview.

I am closing this because I believe that #31552 will solve this problem.  For 
an initial check, run the following test code, extracted from
https://tkdocs.com/tutorial/tree.html
Click the [+] buttons.  I am curious whether commenting out the fix_scaling 
call makes any difference.

-
import tkinter as tk
from tkinter import ttk
from idlelib.run import fix_scaling

root = tk.Tk()
tree = ttk.Treeview(root)
tree.pack()
fix_scaling(root)

tree.insert('', 'end', 'widgets', text='Widget Tour')
tree.insert('', 0, 'gallery', text='Applications')
id = tree.insert('', 'end', text='Tutorial')
tree.insert('widgets', 'end', text='Canvas')
tree.insert(id, 'end', text='Tree')

root.mainloop()

--
assignee:  -> terry.reedy
components: +IDLE
resolution:  -> duplicate
stage:  -> resolved
superseder:  -> IDLE: Convert browswers to use ttk.Treeview
type:  -> behavior
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



[issue35360] Update SQLite to 3.26 in Windows and macOS installer builds

2019-05-25 Thread Ma Lin


Ma Lin  added the comment:

@Mariatta Wijaya, would you update SQLite?

I want to do it myself, by following your patch in issue28791.
But I find I have to commit SQLite's source code to 
https://github.com/python/cpython-source-deps, so I think this should be done 
by a core developer.

--
nosy: +Ma Lin, Mariatta

___
Python tracker 

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



[issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition)

2019-05-25 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

I created pull request bpo-29699 to fix this issue. It adds an additional 
exception handler to ignore FileNotFoundError for most of the try blocks that 
already handle OSError.

I decided not to add it to the initial os.open() call. This should provide the 
same semantics as the "rm -r" shell command. It will fail with 
FileNotFoundError when foo is missing, which is the same behavior as "rm -r 
foo" returning "rm: foo: No such file or directory" when foo is missing. 
Similarly, "rm -rf foo" always succeeds and is equivalent to setting 
"ignore_errors=true" in the shutil.rmtree() call.

--

___
Python tracker 

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



[issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition)

2019-05-25 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
keywords: +patch
pull_requests: +13487
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13580

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2019-05-25 Thread Kevin G


Kevin G  added the comment:

Can anyone add "reverse" support? Key and reverse support are both functional 
requirement.

--
nosy: +flyingosprey

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Andre Roberge

Andre Roberge  added the comment:

On Sat, May 25, 2019 at 9:49 PM Terry J. Reedy 
wrote:

>
> Terry J. Reedy  added the comment:
>
> Thank you.  Along with your path browser report, things are much
> clearer.  With variable pixel densities and custom settings, we cannot
> use fixed pixel or even mm numbers. 114 is right for me because I have
> Display Setting "Change the size of text, apps, and other apps, and
> other items" to 125%.

Yes, that's the settings I was talking about (my OS is in French, so I
couldn't quote you the exact text.)

Mine is set at 200%, as recommended by Windows -  and which makes the text
just large enough to be readable for me.

My taskbar is 11+mm high.   78 or something near
> that is right for 100%.  150% would need more than 114.
>
> Under 'Advanced scaling settings', one can enter a custom scaling size.
> Is this what you meant when you said you set scaling to 200% or 100%.
>
Yes, see above.

> No need to post what you wrote.  Let me summarize the numbers I want
> along with mine for comparison.
>
> What I need to do now is examine the tk screen sizing system and
> functions and see if the needed numbers (max usable height for zoom) are
> available.  If not, I might add a 'Calibrate screen' item under Options.
>
>
I think that would possibly work out best - people could customize to their
liking. With so many different display, including 4k monitors, it makes
sense to just make it user-configurable.

André

> On 5/25/2019 6:42 PM, Andre Roberge wrote:
> >
> > Andre Roberge  added the comment:
> >
> > Thanks.
> >
> > I did a quick check. 114 solves the problem of the Restore Height not
> > working, but the status bar is still hidden.  To me, the crucial part of
> > the problem was the restore height not working, so I'd be happy with
> this.
> >
> > At 164, I can see parts of the status bar
> > [image: image.png]
> >
> > At 180, there is a tiny gap
> >
> > [image: image.png]
> >
> > 178 seems to be just touching.
> >
> > [image: image.png]
> >
> > With the vertical resolution of my screen being 2000 px, tiny gaps are
> > essentially invisible.  Because of this huge resolution, most display
> > elements (text, icons ... and the taskbar) are set up to be twice as big
> -
> > this is the 200% factor I was referring to. So, in pixel terms, the
> taskbar
> > on my computer is likely twice as high as yours.
> >
> > Using a measuring tape, the physical size of my screen is 183 mm; the
> > taskbar is 8 mm high.
> >
> > I can add these comments (and screenshots?) on the bug tracker if you'd
> > like.
> >
> > Thanks for finding the solution to this problem.
> >
> > André
> >
> > P.S. I *just* started using IDLE again as I want to use it as a basis for
> > my project.  The last time I had used IDLE was with Python 2.4 - I
> quickly
> > moved on to using other editors. There's been tremendous progress since
> and
> > I want to thank you for all your work.
> >
> > On Sat, May 25, 2019 at 7:11 PM Terry J. Reedy 
> > wrote:
> >
> >>
> >> Terry J. Reedy  added the comment:
> >>
> >> The current patch fixed the hidden status bar on Windows.  I just had to
> >> increase the margin reserved for the taskbar from 76 to 114.  This will
> >> also work if the taskbar is moved to the top of the screen.  If the
> taskbar
> >> is moved to either side or if it is less high for previous versions of
> >> Windows, a visible margin is better than a hidden status bar.
> >>
> >> --
> >>
> >> ___
> >> Python tracker 
> >> 
> >> ___
> >>
> >
> > --
> > Added file: https://bugs.python.org/file48358/image.png
> > Added file: https://bugs.python.org/file48359/image.png
> > Added file: https://bugs.python.org/file48360/image.png
> >
> > ___
> > Python tracker 
> > 
> > ___
> >
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue22385] Define a binary output formatting mini-language for *.hex()

2019-05-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Given that we have f-strings, I don't think a format mini language makes as 
much sense.  My PR adds support for separators to the .hex() methods (and to 
binascii.hexlify) via a parameter.  Extending beyond what MicroPython already 
does in its binascii implementation (a single sep parameter).

--

___
Python tracker 

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



[issue22385] Define a binary output formatting mini-language for *.hex()

2019-05-25 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +patch
pull_requests: +13486
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13578

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Thank you.  Along with your path browser report, things are much 
clearer.  With variable pixel densities and custom settings, we cannot 
use fixed pixel or even mm numbers. 114 is right for me because I have 
Display Setting "Change the size of text, apps, and other apps, and 
other items" to 125%.  My taskbar is 11+mm high.   78 or something near 
that is right for 100%.  150% would need more than 114.

Under 'Advanced scaling settings', one can enter a custom scaling size. 
Is this what you meant when you said you set scaling to 200% or 100%.

No need to post what you wrote.  Let me summarize the numbers I want 
along with mine for comparison.

What I need to do now is examine the tk screen sizing system and 
functions and see if the needed numbers (max usable height for zoom) are 
available.  If not, I might add a 'Calibrate screen' item under Options.

On 5/25/2019 6:42 PM, Andre Roberge wrote:
> 
> Andre Roberge  added the comment:
> 
> Thanks.
> 
> I did a quick check. 114 solves the problem of the Restore Height not
> working, but the status bar is still hidden.  To me, the crucial part of
> the problem was the restore height not working, so I'd be happy with this.
> 
> At 164, I can see parts of the status bar
> [image: image.png]
> 
> At 180, there is a tiny gap
> 
> [image: image.png]
> 
> 178 seems to be just touching.
> 
> [image: image.png]
> 
> With the vertical resolution of my screen being 2000 px, tiny gaps are
> essentially invisible.  Because of this huge resolution, most display
> elements (text, icons ... and the taskbar) are set up to be twice as big -
> this is the 200% factor I was referring to. So, in pixel terms, the taskbar
> on my computer is likely twice as high as yours.
> 
> Using a measuring tape, the physical size of my screen is 183 mm; the
> taskbar is 8 mm high.
> 
> I can add these comments (and screenshots?) on the bug tracker if you'd
> like.
> 
> Thanks for finding the solution to this problem.
> 
> André
> 
> P.S. I *just* started using IDLE again as I want to use it as a basis for
> my project.  The last time I had used IDLE was with Python 2.4 - I quickly
> moved on to using other editors. There's been tremendous progress since and
> I want to thank you for all your work.
> 
> On Sat, May 25, 2019 at 7:11 PM Terry J. Reedy 
> wrote:
> 
>>
>> Terry J. Reedy  added the comment:
>>
>> The current patch fixed the hidden status bar on Windows.  I just had to
>> increase the margin reserved for the taskbar from 76 to 114.  This will
>> also work if the taskbar is moved to the top of the screen.  If the taskbar
>> is moved to either side or if it is less high for previous versions of
>> Windows, a visible margin is better than a hidden status bar.
>>
>> --
>>
>> ___
>> Python tracker 
>> 
>> ___
>>
> 
> --
> Added file: https://bugs.python.org/file48358/image.png
> Added file: https://bugs.python.org/file48359/image.png
> Added file: https://bugs.python.org/file48360/image.png
> 
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there)

2019-05-25 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
keywords: +patch
pull_requests: +13485
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13577

___
Python tracker 

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



[issue3693] Obscure array.array error message

2019-05-25 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
pull_requests:  -13484

___
Python tracker 

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



[issue3693] Obscure array.array error message

2019-05-25 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
pull_requests: +13484
pull_request: https://github.com/python/cpython/pull/13577

___
Python tracker 

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



[issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there)

2019-05-25 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

Some discussion in 
https://github.com/python/cpython/pull/13349#discussion_r284567113

--

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread STINNER Victor


STINNER Victor  added the comment:

> In any case, I think the namedtuple / structseq solution is elegant, because 
> we can add additional information later

I used the same design for the new sys.unraisablehook in bpo-36829 and I'm 
already working on adding a new 'err_msg' field to the argument passed to this 
took: PR 13488 :-)

I was trapped in the past when I had to modify warnings "hooks" 
(warnings.showwarning and warnings.formatwarning) when I had to add a new 
'source' parameter. I had to write wrappers which are fragile, to keep the 
backward compatibility.

> (the user must only be careful not to use tuple unpacking)

threading.excepthook doesn't mention the compatibility with tuple on purpose. 
It only documents attributes with their names.

--

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread STINNER Victor


STINNER Victor  added the comment:

Antoine Pitrou:
> A Thread.excepthook() method does not allow to notify exceptions raised in 
> C-created threads ("dummy threads").

I modified my PR to use the threading identitifer (threading.get_ident()) as 
the thread name if args.thread is None.

--

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread STINNER Victor


STINNER Victor  added the comment:

> Indeed, if you write your own Thread class, you can add a try...except
> in the Thread.run() method.  You don't need a dedicated
> Thread.excepthook() method.

Exactly. You can already do you best in your run() method to handle exceptions.

threading.excepthook is only there is everything else already failed.

FYI in my implementation, if threading.excepthook raises a new exception, it's 
also handled... by sys.excepthook this time ;-)


> The only way a per-thread hook could be useful is if you could set it
> *outside* of the Thread class (so not as a method), so that one can e.g.
> catch / report exceptions raised in threads launches by third-party
> libraries.

I discuss threading excepthook with Pablo and he asked me if it would be 
possible to have a different behavior depending if the thread is spawn by my 
application or by "third party code". Using threading.excepthook, you can mark 
your threads that you spawn directly using a specific name, a special 
attribute, or you may even track them in a list (maybe using weak references).

If sys.excepthook is used to handle threading exceptions, you call 
threading.current_thread(), but then we come back to the issue to "dying" 
Python: exception which occurs late in Python finalization, when most modules 
are already cleared and import no longer works.

--

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Andre Roberge

Andre Roberge  added the comment:

Thanks.

I did a quick check. 114 solves the problem of the Restore Height not
working, but the status bar is still hidden.  To me, the crucial part of
the problem was the restore height not working, so I'd be happy with this.

At 164, I can see parts of the status bar
[image: image.png]

At 180, there is a tiny gap

[image: image.png]

178 seems to be just touching.

[image: image.png]

With the vertical resolution of my screen being 2000 px, tiny gaps are
essentially invisible.  Because of this huge resolution, most display
elements (text, icons ... and the taskbar) are set up to be twice as big -
this is the 200% factor I was referring to. So, in pixel terms, the taskbar
on my computer is likely twice as high as yours.

Using a measuring tape, the physical size of my screen is 183 mm; the
taskbar is 8 mm high.

I can add these comments (and screenshots?) on the bug tracker if you'd
like.

Thanks for finding the solution to this problem.

André

P.S. I *just* started using IDLE again as I want to use it as a basis for
my project.  The last time I had used IDLE was with Python 2.4 - I quickly
moved on to using other editors. There's been tremendous progress since and
I want to thank you for all your work.

On Sat, May 25, 2019 at 7:11 PM Terry J. Reedy 
wrote:

>
> Terry J. Reedy  added the comment:
>
> The current patch fixed the hidden status bar on Windows.  I just had to
> increase the margin reserved for the taskbar from 76 to 114.  This will
> also work if the taskbar is moved to the top of the screen.  If the taskbar
> is moved to either side or if it is less high for previous versions of
> Windows, a visible margin is better than a hidden status bar.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: https://bugs.python.org/file48358/image.png
Added file: https://bugs.python.org/file48359/image.png
Added file: https://bugs.python.org/file48360/image.png

___
Python tracker 

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



[issue34613] asyncio.StreamReader initialization documentation incorrectly declare limit as None

2019-05-25 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue37048] ssl module: QUIC support for HTTP/3

2019-05-25 Thread Jeremy Lainé

Jeremy Lainé  added the comment:

I have started implementing a QUIC stack in Python [1] so I'll share a couple 
of thoughts in addition to Christian's two valid points:

- SSLSocket is almost certainly not going to be the right entry point. QUIC's 
interface to TLS is entirely focused on passing in / out handshake messages and 
extracting secrets. No data is actually encrypted by the TLS engine.

- In addition to being notified about keying material we will need access to 
the raw extensions either received in the EncryptedExtensions or the 
ClientHello. This is because QUIC exchanges its transport parameters in the 
form of a TLS extension.

- We will also need additional APIs to manipulate session tickets, both when 
acting as a client and a server, in order to achieve 0-RTT handshakes. When 
acting as a client we need to be able to pass in the session ticket to use and 
be notified when a new session ticket is received. We also need to know the 
value of the max_early_data_size extension. When acting as a server we need a 
callback to provide the TLS engine with session tickets and to control issuing 
new session tickets, and provide the max_early_data_size value.

- For header protection and payload encryption we need access to a number of 
crypto primitives including AES, ChaCha20 and a way to use AEAD.

For aioquic I decided to use cryptography's primitives and implemented a 
minimal TLS 1.3 engine on top of it. This avoids having to wait for some future 
version of OpenSSL to provide the necessary APIs or having to use a patched 
version of OpenSSL.

[1] https://github.com/aiortc/aioquic

--
nosy: +jlaine

___
Python tracker 

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



[issue37050] Remove expr_text from ast node FormattedValue

2019-05-25 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
nosy: +mbussonn

___
Python tracker 

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



[issue36964] `python3 -m venv NAME`: virtualenv is not portable

2019-05-25 Thread Marco Sulla


Marco Sulla  added the comment:

> if you have entry points installed then moving them to another 
> machine would break their shebang lines.

Not if you port it on the same OS using, for example

#!/usr/bin/env python3

> And even if you do it on your local machine there's no guarantee
> something else wasn't structured to be directory-specific.

You are telling about user code, not the virtualenv itself. If the user doe not 
write the code in such a way it's portable, it's his fault. But this should not 
stop people that do it right to try to port the venv if possible.

I think the modification
VIRTUAL_ENV="$(dirname "$(dirname "$(readlink -nf "$0")")")"

is very little and quite robust. Don't know how to do in fish and csh shells, 
but in bash and sh it works.

--

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The current patch fixed the hidden status bar on Windows.  I just had to 
increase the margin reserved for the taskbar from 76 to 114.  This will also 
work if the taskbar is moved to the top of the screen.  If the taskbar is moved 
to either side or if it is less high for previous versions of Windows, a 
visible margin is better than a hidden status bar.

--

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Tal, how is zoom/restore height working on your Mac?

On my updated Macbook Air Mohave, the zoom bottom margin of 88 is too large.  
Since IDLE starts fully zoomed on this small screen, I determined this by 
shrinking Shell and then zooming it.  The result leaves a margin between IDLE 
and the app panel, which goes away when restoring to initial state.  But I want 
to know if 88 is too large on other machines before I change it.

--
nosy: +taleinat
stage: patch review -> needs patch

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +13483
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13576

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le 25/05/2019 à 23:09, STINNER Victor a écrit :
> 
> I don't see the relationship between the API (signature) and the ability to 
> set a per-thread hook.
> 
> I'm not convinced that a per-thread hook is needed.

Indeed, if you write your own Thread class, you can add a try...except
in the Thread.run() method.  You don't need a dedicated
Thread.excepthook() method.

The only way a per-thread hook could be useful is if you could set it
*outside* of the Thread class (so not as a method), so that one can e.g.
catch / report exceptions raised in threads launches by third-party
libraries.

--

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Sorry, I had overlooked the issue with global variables at shutdown.  Though 
that issue only occurs with daemonic threads, since non-daemonic threads are 
joined before global variables are cleared.

In any case, I think the namedtuple / structseq solution is elegant, because we 
can add additional information later (the user must only be careful not to use 
tuple unpacking).

--

___
Python tracker 

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



[issue37051] Glossary item "hashable" incorrect

2019-05-25 Thread John Riehl

New submission from John Riehl :

The entry in the glossary for "hashable" 
(https://docs.python.org/3/glossary.html#term-hashable) states "All of Python’s 
immutable built-in objects are hashable." Tuples are described as immutable 
sequence types 
(https://docs.python.org/3/library/stdtypes.html#immutable-sequence-types), but 
they are not hashable unless all of their elements are hashable. Suggest 
updating the glossary to reflect this.

--
assignee: docs@python
components: Documentation
messages: 343514
nosy: docs@python, john.riehl
priority: normal
severity: normal
status: open
title: Glossary item "hashable" incorrect
type: behavior
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



[issue36084] Threading: add builtin TID attribute to Thread objects

2019-05-25 Thread Michael Felt


Michael Felt  added the comment:

On 23/05/2019 18:16, Jake Tesler wrote:
> Jake Tesler  added the comment:
>
> Michael Felt -
> If you would like some help with adding/building AIX support for this 
> functionality, tag me, I'd be glad to help out! :)
>
> --
Thanks - I'll try to look at this early next week.
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread STINNER Victor


STINNER Victor  added the comment:

Serhiy Storchaka:
> I propose to add the Thead.excepthook() method with the signature compatible 
> with sys.excepthook(). This will allow to set easily per-thread hooks and a 
> global hook.

I don't see the relationship between the API (signature) and the ability to set 
a per-thread hook.

I'm not convinced that a per-thread hook is needed. My proposed global 
threading.excepthook gets a thread parameter which allows a custom hook to 
implement a different behavior depending on the thread. You can use a different 
behavior depending on the thread name, depending on a custom Thread attribute, 
etc.

Would it be acceptable for first add a global hook and see later if a 
per-thread hook is needed?

--

___
Python tracker 

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



[issue37050] Remove expr_text from ast node FormattedValue

2019-05-25 Thread Eric V. Smith


New submission from Eric V. Smith :

I added the expr_text optional field to the FormattedValue node in order to 
implement the '=' feature of f-strings (see issue 36817).

However, the expr_text field isn't strictly needed. Instead, the same feature 
could be added with another Constant string node child of the JoinedStr node.

I'm going to remove expr_text and use another Constant in order to remove this 
change to the 3.8 ast nodes. I have a patch mostly worked out, I'll have it 
ready in the next day or two. I want to get this in to 3.8 beta 1, because 
otherwise we're stuck with the expr_text implementation.

--
assignee: eric.smith
components: Interpreter Core
messages: 343511
nosy: eric.smith, lukasz.langa
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Remove expr_text from ast node FormattedValue
versions: Python 3.8

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread STINNER Victor


STINNER Victor  added the comment:

> A Thread.excepthook() method does not allow to notify exceptions raised in 
> C-created threads ("dummy threads").

The main difference between sys.excepthook and threading.excepthook is that the 
threading hook displays the thread name. Which output do you expect if you 
don't pass a threading.Thread object (which has a 'name' attribute)? The thread 
identifier from _thread.get_ident()?

I can easily modify the default hook implementation to support args.thread=None 
and displays _thread.get_ident() as the name instead.


> Also, as I said already, you can get the current thread by calling 
> threading.current_thread() in the except hook. There is no need to pass it 
> explicitly to the except hook.

I understand that your plan is to use sys.excepthook to handle threading.Thread 
uncaught exception.

My main concern is that sys.excepthook can fail on importing the threading 
module. One solution would be to import threading when the sys module is 
created and keep a strong reference to threading.current_thread(). But I 
dislike this idea.

I already raised my concern, but so far, you didn't explain how you plan to fix 
this practical issue.

Moreover, the current threading code is quite complex. My guess is that this 
complexity is needed to display exception very late during Python shutdown, 
when module attributes are set to None and import no longer works.

I would prefer to not move this complexity into sys.excepthook which has 
currently a simple implementation.

--

Daemon threads are evil. We should drop this nasty feature... but I would 
prefer to not block this issue by the removal of daemon threads, since I'm sure 
that a lot of code rely on them and so it will be really hard to really remove 
them.

--

___
Python tracker 

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



[issue37044] Build/test artifacts not ignored for framework build

2019-05-25 Thread Ned Deily


Ned Deily  added the comment:

That seems like a reasonable request.  We should also check that the Makfile 
clean* rules do the right thing.  One potential complication: the framework 
name is specified by the ./configure --with-framework-name= parameter, so it 
may not always be "Python.framework", the default value.

--

___
Python tracker 

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



[issue37024] SQLite flag in configure due to homebrew not linking sqlite

2019-05-25 Thread Ned Deily


Ned Deily  added the comment:

I don't understand what the issue is here.  Can you explain or point to an 
explanation of why Homebrew is not linking to SQLite?  Is it just not to the 
Apple-supplied SQLite?

--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue37048] ssl module: QUIC support for HTTP/3

2019-05-25 Thread SilentGhost


Change by SilentGhost :


--
nosy: +SilentGhost

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I have a 27" 2560X1440 screen.  For me:
>>> import tkinter; tkinter.Tk().tk.call('tk', 'scaling')
1.333...

I presume 3200x200 should be 3200x2000 and that the diagonal size is small 
enough that the screen is a HiDPI screen, making tk's scaling above 1.4, so 
that run.fix_scaling() adjusts font sizes.

I am not sure what you mean by 'scaling at 100%/200%' other than tk scaling <, 
>= 1.4 or HiDPI no/yes, or how you changed the scaling.  I grepped idlelib for 
'scaling' and only found references to the function and the tk call.

In any case, tcl/tk does not properly support HiDPI screens.  Serhiy Storchaka 
contributed fix_scaling to make IDLE readable on a HiDPI Linux laptop.  The 1.4 
and .75 values are empirical.  With help from Windows experts, I added the 
SetProcessDpiAwareness call near the top of pyshell when a Windows user with a 
HiDPI screen reported a problem on idledev.  I believe that the call tells 
Windows that IDLE already makes a scaling adjustment, so it should not also do 
so.

zoomheight.zoom_height() restores by calling top.wm_geometry('').
https://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M42 says
  "If newGeometry is specified as an empty string then any existing 
user-specified geometry for window is cancelled, and the window will revert to 
the size requested internally by its widgets."

This works for normal screens but somehow not for your HiDPI Windows screen.  
Can you do the print experiment I suggested previously?

I will experiment to see how much '22' needs to be increased for Windows to 
accomodate the task bar.  What is really needed is to determine the size and 
orientation of the taskbar, or rather the remaining 'full-screen' height.

Serhiy, do you still have a HiDPI screen?  If so, does Options => Zoom/Restore 
Height work for you?  Do Linux desktop managers have bottom panels or taskbars 
that can cover part of a zoomed window?

Ignore any task bar over status bar issue.)

--
nosy: +serhiy.storchaka
title: IDLE: Zoom Height Restore restores to default, not previous size -> 
IDLE: Improve zoomheight doc and behavior.

___
Python tracker 

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



[issue37047] Refactor AsyncMock setup logic in create_autospec

2019-05-25 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
keywords: +patch
pull_requests: +13482
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13574

___
Python tracker 

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



[issue37049] Implement PEP 589: add TypedDict to typing

2019-05-25 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
keywords: +patch
pull_requests: +13481
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13573

___
Python tracker 

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



[issue37049] Implement PEP 589: add TypedDict to typing

2019-05-25 Thread Ivan Levkivskyi


New submission from Ivan Levkivskyi :

The actual implementation is performed by type checkers like mypy. We just need 
to add `TypedDict` to the `typing` module.

--
assignee: levkivskyi
components: Library (Lib)
messages: 343506
nosy: gvanrossum, levkivskyi
priority: normal
severity: normal
stage: needs patch
status: open
title: Implement PEP 589: add TypedDict to typing
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue37048] ssl module: QUIC support for HTTP/3

2019-05-25 Thread Christian Heimes


New submission from Christian Heimes :

This ticket collects information for QUIC [1][2] support and tracks, which APIs 
have to be added to Python in order to implement a QUIC protocol stack on top 
of Python's ssl and socket module. QUIC is a "UDP-Based Multiplexed and Secure 
Transport" protocol. It will replace TCP and TLS record layer as transport 
channels in the upcoming HTTP/3 [3][4] standard. Although it's UDP, QUIC does 
*not* use DTLS (Datagram TLS, vulgo TLS over UDP).

As far as I understand QUIC at the moment, the ssl module has to gain two 
additional features:

1. A way to send/receive TLS messages that are not wrapped in the TLS record 
layer.
2. A key callback that gets called whenever key material is exchanged during 
handshake or updated later on.

OpenSSL does not implement the necessary APIs, yet [5]. Tatsuhiro Tsujikawa's 
experimental OpenSSL fork [6] implements (1) as a SSL option SSL_MODE_QUIC_HACK 
and (2) as a callback that acts on five different key types.

(Disclaimer: My current understanding of QUIC is very limited.)

[1] https://tools.ietf.org/html/draft-ietf-quic-transport-20
[2] https://en.wikipedia.org/wiki/QUIC
[2] https://http3-explained.haxx.se/en/
[4] https://en.wikipedia.org/wiki/HTTP/3
[5] https://daniel.haxx.se/blog/2019/01/21/quic-and-missing-apis/
[6] https://github.com/tatsuhiro-t/openssl/commits/quic-draft-17

--
assignee: christian.heimes
components: SSL
messages: 343505
nosy: alex, christian.heimes, dstufft, janssen, njs
priority: normal
severity: normal
status: open
title: ssl module: QUIC support for HTTP/3
type: enhancement
versions: Python 3.9

___
Python tracker 

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



[issue37047] Refactor AsyncMock setup logic in create_autospec

2019-05-25 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

* In create_autospec there is some logic to detect if the function is an async 
function this could be refactored out as a private function.

* create_autospec has initialization code for async mock. For synchronous 
functions this is done with _setup_func and is called during setting signature. 
AsyncMock needs different setup logic code to setup the functions but the code 
can be refactored out of create_autospec into _setup_async_func.

* In create_autospec awaited attribute is not set for AsyncMock during setup 
[0] and hence this causes AttributeError when the coroutine is awaited. awaited 
attribute can be also initialized.

import asyncio
from unittest.mock import create_autospec

async def foo(): pass

spec = create_autospec(foo)
awaitable = spec()

async def main(): await awaitable

asyncio.run(main())

Traceback (most recent call last):
  File "/tmp/spam.py", line 13, in 
asyncio.run(main())
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/runners.py", 
line 43, in run
return loop.run_until_complete(main)
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/base_events.py",
 line 614, in run_until_complete
return future.result()
  File "/tmp/spam.py", line 11, in main
await awaitable
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", 
line 2045, in _mock_call
return await proxy()
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", 
line 2043, in proxy
await self.awaited._notify()
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/mock.py", 
line 596, in __getattr__
raise AttributeError("Mock object has no attribute %r" % name)
AttributeError: Mock object has no attribute 'awaited'

* In the setup logic to create attributes like assert_not_awaited uses the 
pattern setattr(mock, a, f) at [1] . But due to late binding 'a' in the 
function f has the last value of the loop 'assert_not_awaited' and hence 
calling other helpers also calls assert_not_awaited. This could be resolved by 
using a partial function that binds the attribute value early in the loop and 
respective function would be used in getattr.

>>> spec.assert_awaited_once_with(1) # Due to late binding assert_not_awaited 
>>> is always called
TypeError: assert_not_awaited() takes 1 positional argument but 2 were given

* assert_not_awaited has the error message indicating it should be awaited once 
[2] . This can be changed to indicate something like "Expected mock to not have 
been awaited".

>>> spec.assert_not_awaited()
AssertionError: Expected mock to have been awaited once. Awaited 1 times.

* mock docs have list of magic methods implemented where __aenter__, __aexit__, 
__aiter__ and __anext__ could be documented with versionadded directive. [3]

I have a PR with the above changes that I will post shortly for review.

[0] 
https://github.com/python/cpython/blob/7114c6504a60365b8b0cd718da0ec8a737599fb9/Lib/unittest/mock.py#L2506
[1] 
https://github.com/python/cpython/blob/7114c6504a60365b8b0cd718da0ec8a737599fb9/Lib/unittest/mock.py#L2518
[2] 
https://github.com/python/cpython/blob/7114c6504a60365b8b0cd718da0ec8a737599fb9/Lib/unittest/mock.py#L2154
[3] https://docs.python.org/3.8/library/unittest.mock.html#mocking-magic-methods

--
components: Library (Lib)
messages: 343504
nosy: asvetlov, cjw296, lisroach, mariocj89, michael.foord, xtreak, yselivanov
priority: normal
severity: normal
status: open
title: Refactor AsyncMock setup logic in create_autospec
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue37046] Implement PEP 586: add Literal type constructor to typing

2019-05-25 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
keywords: +patch
pull_requests: +13480
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13572

___
Python tracker 

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



[issue37046] Implement PEP 586: add Literal type constructor to typing

2019-05-25 Thread Ivan Levkivskyi


New submission from Ivan Levkivskyi :

The actual implementation is performed by type checkers like mypy. We just need 
to add `Literal` to the `typing` module.

--
assignee: levkivskyi
components: Library (Lib)
messages: 343503
nosy: gvanrossum, levkivskyi, michael0x2a
priority: normal
severity: normal
stage: needs patch
status: open
title: Implement PEP 586: add Literal type constructor to typing
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue36979] ncurses extension uses wrong include path

2019-05-25 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

This explains some of the build/linkage problems encountered in issue #36630, 
and that I encountered while working on issue #36982.

--
nosy: +yan12125

___
Python tracker 

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



[issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing

2019-05-25 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
keywords: +patch
pull_requests: +13479
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13571

___
Python tracker 

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



[issue37045] Implement PEP 591: add Final qualifier and @final decorator to typing

2019-05-25 Thread Ivan Levkivskyi


New submission from Ivan Levkivskyi :

The actual implementation is performed by type checkers like mypy. We just need 
to add the names to the `typing` module.

--
assignee: levkivskyi
components: Library (Lib)
messages: 343501
nosy: gvanrossum, levkivskyi, msullivan
priority: normal
severity: normal
stage: needs patch
status: open
title: Implement PEP 591: add Final qualifier and @final decorator to typing
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
versions:  -Python 2.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

if someone runs into an actual need for this on 32-bit builds, please provide 
details and feel free to reopen the issue.  closing as i don't believe there is 
any more for us to do.

--
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue37040] checking for membership in itertools.count enters infinite loop with no way to exit

2019-05-25 Thread Dan Rose


Dan Rose  added the comment:

Oops you are right. These enter uninterruptible loops too. They are exceptional 
situations and should do the expected thing - throw exceptions as well.

--

___
Python tracker 

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



[issue37040] checking for membership in itertools.count enters infinite loop with no way to exit

2019-05-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Adding the __contains__() method to the count iterator would not solve the 
general problem with infinite iterators. For example with the following 
expressions:

-1 in filter(None, itertools.count())
-1 in map(float, itertools.count())

It is not worth to add a method just to handle a single case of misusing. You 
should not use "in" with infinite iterators.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread miss-islington


miss-islington  added the comment:


New changeset 1b85f4ec45a5d63188ee3866bd55eb29fdec7fbf by Miss Islington (bot) 
in branch '3.7':
bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850)
https://github.com/python/cpython/commit/1b85f4ec45a5d63188ee3866bd55eb29fdec7fbf


--
nosy: +miss-islington

___
Python tracker 

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



[issue37039] IDLE: Zoom Height Restore restores to default, not previous size

2019-05-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Andre Roberge reported on idle-dev that Restore Height has no effect for him 
with Python 3.7.3, 32 bit, on Windows 10.  Since it works for me on Win 10, 
3.7.3-32 bit local debug build and 3.7.3-64 bit installed and ditto for 3.8, I 
am initially baffled.

Andre, the only way I know to debug this is for you to add debug prints to 
zoomheight.py and start IDLE in a console, to see the print output, with 'py -m 
idlelib' (add -3.7 if needed).  The first thing I can think of is 'print(geom)' 
and 'print(newgeom)' in zoom_height() after they are fetched and defined near 
the top and bottom.

--

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

A Thread.excepthook() method does not allow to notify exceptions raised in 
C-created threads ("dummy threads").

Also, as I said already, you can get the current thread by calling 
threading.current_thread() in the except hook. There is no need to pass it 
explicitly to the except hook.

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Here is what I've found for (32-bit) ARM:
- "long double" is 8 bytes long, so it's probably the same as "double"
(see 
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0274b/index.html)
- the standard alignment for "double" is 8 bytes
(see 
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf)

And on (32-bit) x86, it looks like the standard alignment for "long double" is 
4 bytes:
https://www.codesynthesis.com/~boris/blog/2009/04/06/cxx-data-alignment-portability/

So I don't think there's anything to change on 32-bit Python builds *if* we 
only really care about ARM and x86 (which is restrictive, but using "long 
double" in C extension types is a bit of an exotic issue).

--

___
Python tracker 

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



[issue37044] Build/test artifacts not ignored for framework build

2019-05-25 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue37040] checking for membership in itertools.count enters infinite loop with no way to exit

2019-05-25 Thread Dan Rose


Dan Rose  added the comment:

The general problem with infinite iterators is indeed a bigger issue and its 
resolution would probably resolve this issue too. With the examples you gave at 
least the user can ctrl-c to interrupt. Entering an infinite, *uninterruptible* 
loop is a consequence so bad that it deserves a guard rail.

> On May 25, 2019, at 11:48, Serhiy Storchaka  wrote:
> 
> 
> Serhiy Storchaka  added the comment:
> 
> Adding the __contains__() method to the count iterator would not solve the 
> general problem with infinite iterators. For example with the following 
> expressions:
> 
>-1 in filter(None, itertools.count())
>-1 in map(float, itertools.count())
> 
> It is not worth to add a method just to handle a single case of misusing. You 
> should not use "in" with infinite iterators.
> 
> --
> nosy: +serhiy.storchaka
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +13478
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13569

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

And of course, someone who has this issue can at worse recompile Python without 
pymalloc.

--

___
Python tracker 

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



[issue37043] Buildbots fail when new files are added

2019-05-25 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

In GH-13565, @yan12125 provides [this 
reference](https://github.com/python/buildmaster-config/blob/master/master/custom/factories.py)
 to the buildbot code that copies the code and thus imposes the requirement to 
declare source directories.

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I'm not marking this bug as "Fixed" as the original complaint about obmalloc'd 
structs with a long double not being aligned is still going to be true on 
32-bit platforms for 2.7 - 3.7.  We've merely increased the obmalloc alignment 
to 16-bytes on 64-bit platforms.

So the problem should only remain for 32-bit users which at this point are 
likely only arm (rpi and similar low end friends not using a 64-bit OS).

--
stage: patch review -> needs patch
versions: +Python 2.7, Python 3.6, Python 3.8, Python 3.9

___
Python tracker 

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



[issue37043] Buildbots fail when new files are added

2019-05-25 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

commit reverted in 
https://github.com/python/cpython/commit/2156fec1f7a8f9972e90cdbaf404e3fd9eaccb35

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

long double was changed to double seven years ago to avoid a different kind of 
undefined behavior...  
https://github.com/python/cpython/commit/e348c8d154cf6342c79d627ebfe89dfe9de23817#diff-fb41bdaf12f733cf6ab8a82677d03adc

We are going in circles here.

Submitting that PR to 3.7 caused the undefined behavior sanitizer buildbot to 
go back to reporting a ton more damage.

build before: https://buildbot.python.org/all/#/builders/137/builds/878 
   52k lines of test stdio
build after: https://buildbot.python.org/all/#/builders/137/builds/879
 4900k lines of test stdio

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

___
Python tracker 

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



[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-25 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

> Would it work to store it on the class then (once)?

A motivation for this change should be provided first: the incorrect behavior 
it is trying to fix or the enhancement it is providing.

--

___
Python tracker 

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



[issue37040] checking for membership in itertools.count enters infinite loop with no way to exit

2019-05-25 Thread SilentGhost


Change by SilentGhost :


--
nosy:  -SilentGhost

___
Python tracker 

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



[issue37043] Buildbots fail when new files are added

2019-05-25 Thread Zachary Ware


Zachary Ware  added the comment:

The issue here is not with buildbots, but with installation on POSIX platforms. 
 We do now have a couple of buildbots that install Python to a local location 
before running the tests, which is what flushes this out (see 
https://github.com/python/buildmaster-config/blob/master/master/custom/factories.py#L134-L147;
 they simply run `make install` before running the tests).

Adding these buildbots as pre-merge CI is not currently an option due to 
security implications (I don't want unreviewed code running on my home 
network).  I have plans to eventually allow certain builders to be run 
pre-merge iff the `awaiting merge` label is present on the PR, but I haven't 
had time to work on that yet.

It might be possible to adjust one of the Travis builds to install before 
running tests, but that leaves some other tests un-run, which just relocates 
the problem.

Removing reliance on an explicit listing of directories sounds nice, but does 
open up the possibility of installing more than expected if run from a dirty 
checkout.

What about adding a "new directories added to Makefile.pre.in" check to 
Tools/scripts/patchcheck.py?

--
nosy: +zach.ware

___
Python tracker 

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



[issue37040] checking for membership in itertools.count enters infinite loop with no way to exit

2019-05-25 Thread Dan Rose


Dan Rose  added the comment:

Reopening. While my behavioral expectation may be wrong, the current behavior 
is inappropriate. It would make more sense for count to have a `__contains__` 
method which raises a TypeError.

--
resolution: rejected -> 
status: closed -> open

___
Python tracker 

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



[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-25 Thread daniel hahler


daniel hahler  added the comment:

I've just found that I've created an issue with regard to `do_debug` for this 
already (https://bugs.python.org/issue36388), and a PR: 
https://github.com/python/cpython/pull/12479.

--

___
Python tracker 

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



[issue26836] Add memfd_create to os module

2019-05-25 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue36461] timeit: Additional changes for autorange

2019-05-25 Thread Michele Angrisano


Michele Angrisano  added the comment:

I agree with *target_time*. I'm working on it and soon I'm going to update the 
pr.

--
nosy: +mangrisano

___
Python tracker 

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



[issue26836] Add memfd_create to os module

2019-05-25 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +13477
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13567

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I believe buildbots are fixed. Please re-open if you find otherwise.

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset f7fba6cfb62edfc22e9b2e12a00ebaf5f348398e by Jason R. Coombs in 
branch 'master':
bpo-34632 fix buildbots and remove artifact (GH-13566)
https://github.com/python/cpython/commit/f7fba6cfb62edfc22e9b2e12a00ebaf5f348398e


--

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

> By the way, I think Python.framework is not needed?

Correct. That was an artifact that I unintentionally added.

I've submitted https://github.com/python/cpython/pull/13566 to address the two 
concerns.

I've also opened issue37043 and issue37044 to address the causes of these 
emergent failures.

--

___
Python tracker 

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



[issue37044] Build/test artifacts not ignored for framework build

2019-05-25 Thread Jason R. Coombs


New submission from Jason R. Coombs :

When developing on macOS, after some build/test operations (I'm not sure 
exactly which, but seemingly relating to a framework build), artifacts are 
generated which aren't ignored. As a result, it's easy for them to leak into a 
merge request as they did with GH-12547 (issue34632).

For example:

```
cpython master $ ./configure 
--enable-framework=/Users/jaraco/Library/Frameworks && make
...
cpython master $ git status 

   
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add ..." to include in what will be committed)

Mac/Resources/app/Info.plist
Mac/Resources/framework/Info.plist
Python.framework/Python
Python.framework/Versions/

nothing added to commit but untracked files present (use "git add" to track)
```

(also Python.framework/Resources/, except that's in the repo at the moment, the 
reason for reporting this issue)

Is there not a reason to ignore these artifacts so they don't risk being added 
to the commit?

--
components: macOS
messages: 343479
nosy: jaraco, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Build/test artifacts not ignored for framework build
type: behavior

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +13476
pull_request: https://github.com/python/cpython/pull/13566

___
Python tracker 

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



[issue37043] Buildbots fail when new files are added

2019-05-25 Thread Jason R. Coombs


New submission from Jason R. Coombs :

As [reported here](https://bugs.python.org/issue34632#msg343445), I submitted a 
pull request that passed all tests locally and in CI, but when accepted, build 
bots started to fail as a result of new files having been added to the project. 
It seems it's necessary in Makefile.pre.in to duplicate the git manifest to 
declare those directories... but only for buildbot builds. I don't fully 
understand why that is the case, but it would be nicer if there were 
protections from this footgun, especially since this issue may manifest several 
times in the same PR.

I can think of some ways to prevent this undesirable behavior:

- Include buildbot builds in the GitHub merge request checks.
- Add a GitHub bot that checks merge requests that create directories and alert 
the review of directories created if Makefile.pre.in doesn't include changes 
reflecting those directories.
- Remove the reliance on a separate directory listing in Makefile.pre.in.

--
components: Tests
messages: 343478
nosy: jaraco
priority: normal
severity: normal
status: open
title: Buildbots fail when new files are added
versions: Python 3.8

___
Python tracker 

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



[issue37042] wait_for(coro, timeout=0) memleak

2019-05-25 Thread ixje


ixje  added the comment:

Perhaps also worth mentioning is that when we supply None as timeout value in 
the `wait_for()` in the minimal sample, then it still reports 60MB memory 
usage. Seems pretty steep for doing basically nothing but looping around.

--

___
Python tracker 

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



[issue37042] wait_for(coro, timeout=0) memleak

2019-05-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Nice, thanks!

--

___
Python tracker 

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



[issue37042] wait_for(coro, timeout=0) memleak

2019-05-25 Thread ixje


ixje  added the comment:

This is the consumption I'm seeing.

--
Added file: 
https://bugs.python.org/file48357/test_leak_minimal_mem_consumption.png

___
Python tracker 

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



[issue1230540] sys.excepthook doesn't work in threads

2019-05-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I propose to add the Thead.excepthook() method with the signature compatible 
with sys.excepthook(). This will allow to set easily per-thread hooks and a 
global hook.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue37042] wait_for(coro, timeout=0) memleak

2019-05-25 Thread ixje


ixje  added the comment:

Hi Andrew, 
There is an attached minimal example (that differs from the code given in the 
first comment). I couldn't attach 2 files. So I pasted the code of one file to 
showcase how we could run into the issue, then a minimal reproducible example 
without network code in the attachment.

--

___
Python tracker 

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



[issue37042] wait_for(coro, timeout=0) memleak

2019-05-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks for the report.
If the problem  is in asyncio.wait_for() function the real network code can be 
stripped for the leakage example and replaced with `await asyncio.sleep()`.

Would you try to boil down the snippet by converting it into a code that I can 
execute on my laptop to reproduce the problem?

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset ea2b76bdc5f97f49701213d105b8ec2387ea2fa5 by Inada Naoki in branch 
'3.7':
bpo-27987: align PyGC_Head to alignof(long double) (GH-13335)
https://github.com/python/cpython/commit/ea2b76bdc5f97f49701213d105b8ec2387ea2fa5


--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-25 Thread Inada Naoki


Change by Inada Naoki :


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



[issue37042] wait_for(coro, timeout=0) memleak

2019-05-25 Thread ixje


New submission from ixje :

I have a networked process that looks somewhat like this in its most basic form

```
import asyncio

shutting_down = False

async def read_message(reader, timeout=30):
async def _read(reader: asyncio.StreamReader):
try:
d = await reader.readexactly(24)
# do something with the data
print("I'm never called")
except:
return None

try:
return await asyncio.wait_for(_read(reader), timeout)
except Exception:
return None


async def my_service():
reader, writer = await asyncio.open_connection('127.0.0.1', 20333)
while not shutting_down:
m = await read_message(reader, timeout=0)
if m is None:
continue
# else process message


if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.create_task(my_service())
loop.run_forever()
```

read_message() has a default timeout of 30, but I thought setting it to 0 
(instead of None) would be equal to blocking. This bleeds 16GB of memory in ~3 
minutes. A minimal example is provided.

I manually applied the patch of https://bugs.python.org/issue36613 to a self 
compiled build of 3.7.3 
(https://github.com/python/cpython/commit/ef4ec6ed12d6c6200a85068f60483723298b6ff4)
 on Ubuntu 18.04 and that did not solve the problem.

--
components: asyncio
files: test_leak_minimal.py
messages: 343470
nosy: asvetlov, ixje, yselivanov
priority: normal
severity: normal
status: open
title: wait_for(coro, timeout=0) memleak
type: resource usage
versions: Python 3.7
Added file: https://bugs.python.org/file48356/test_leak_minimal.py

___
Python tracker 

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



[issue37039] IDLE: Zoom Height Restore restores to default, not previous size

2019-05-25 Thread Andre Roberge


Andre Roberge  added the comment:

I have tried on another computer (Windows 10, screen resolution 1920 x 1080, 
text scaling 100%) and it works as expected: clicking on Restore Height 
restores the window's height to its original value.

Back to the computer where I reported the problem: changing the scaling from 
200% to 100% (which makes everything nearly unreadable) does not solve the 
problem.

Both tests were done with Python 3.7.3 (32 bit).

--

___
Python tracker 

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



[issue37039] IDLE: Zoom Height Restore restores to default, not previous size

2019-05-25 Thread Andre Roberge


Andre Roberge  added the comment:

As reported on the idle-dev list, on my system (Windows 10, display resolution 
3200 x 200, scaling of text at 200% as recommended), the Zoom Height changes 
the height of the window and Idle's status bar is no longer visible. Clicking 
on Restore Height does nothing: Idle's window does not return to the default 
(the size it had when it was open); it stays the same with the status bar 
either hidden behind the task bar.

--
nosy: +aroberge

___
Python tracker 

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



[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-25 Thread daniel hahler


daniel hahler  added the comment:

> In that case the proposed change builds an implicit stack of trace functions 
> that is increased each time the interpreter executes this hard breakpoint

Very valid and good point.

Would it work to store it on the class then (once)?

FWIW: pdbpp uses a global Pdb instance - mainly to support the use case of hard 
breakpoints like this (to remember/re-use its configuration then).

--

___
Python tracker 

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



[issue37041] IDLE: path browser unusable on some displays

2019-05-25 Thread Andre Roberge


New submission from Andre Roberge :

On my computer (Windows 10, screen resolution 3000 x 2000, scaling of text and 
other elements set at 200% as the recommended value), the path browser is 
essentially unusable as the items overlap each other. See the attached image. 

I found that changing the following:

def draw(self, x, y):
# XXX This hard-codes too many geometry constants!
dy = 40  # changed from 20

in tree.py solved the problem.

--
files: path_browser_problem.png
messages: 343466
nosy: aroberge, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: path browser unusable on some displays
Added file: https://bugs.python.org/file48355/path_browser_problem.png

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

I managed to create a setup similar to the buildbot builder "AMD64 Fedora 
Rawhide Clang Installed 3.x" [1] on Arch Linux. Running test_importlib on an 
installed CPython copy is fine now:

$ /usr/bin/python3.8 -m test.regrtest test_importlib
Run tests sequentially
0:00:00 load avg: 0.14 [1/1] test_importlib

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1 sec 288 ms
Tests result: SUCCESS

I apologize for not checking things carefully and misunderstanding the issue on 
"AMD64 Fedora Rawhide Clang Installed 3.x".

[1] 
https://github.com/python/buildmaster-config/blob/master/master/custom/factories.py

--

___
Python tracker 

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



[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2019-05-25 Thread Michael Felt


Michael Felt  added the comment:

No problem with trying out your tests. 

Sent from my iPhone

> On 25 May 2019, at 00:19, Erwan Le Pape  wrote:
> 
> 
> Erwan Le Pape  added the comment:
> 
> Thanks for testing that. It's good that you used an actual address because 
> that eliminates the possibility that AIX doesn't handle addresses it doesn't 
> really know about.
> 
> On the other hand, even when properly specified to a real scoped IPv6 
> address, `getaddrinfo` doesn't seem to get the necessary scope ID from the 
> underlying C call which socket.getaddrinfo > _socket.getaddrinfo is pretty 
> much mapped to.
> 
> I'm looking at cpython/master for the socketmodule implementation:
> https://github.com/python/cpython/blob/6dbbe748e101a173b4cff8aada41e9313e287e0f/Modules/socketmodule.c#L6400
>  is `getaddrinfo`
> https://github.com/python/cpython/blob/master/Modules/socketmodule.c#L1294 is 
> `makesockaddr` which actually creates the 4-tuple returned as the last 
> element of the `getaddrinfo` tuples.
> The fourth element (ie. the scope ID) is clearly `a->sin6_scope_id` which 
> should contain the scope ID.
> 
> At this stage, I don't know if this is a bug from the socketmodule which I 
> doubt or if the AIX `getaddrinfo` simply just doesn't handle scoped IP 
> addresses properly.
> 
> If you're still okay to proxy tests for AIX, I'll try and come up with either 
> a simple C snippet to see what's in the returned structure or ctype the AIX 
> `libc` `getaddrinfo`.
> 
> --
> 
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
pull_requests: +13475
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/13565

___
Python tracker 

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



[issue37011] pdb: restore original tracing function instead of sys.settrace(None)

2019-05-25 Thread Xavier de Gaye


Xavier de Gaye  added the comment:

> While typically pdb is not used in tests, it is just good practice, given 
> that there can only be a single trace function.

IMO invoking "good practice" is not sufficient to motivate such a change.

The proposed change is not backward compatible. A common use case for pdb is to 
insert a so-called hard breakpoint (import pdb; pdb.set_trace()) line in 
existing code. In that case the proposed change builds an implicit stack of 
trace functions that is increased each time the interpreter executes this hard 
breakpoint (when set in a loop or in a function invoked multiple times for 
example). When the user hits the 'continue' pdb command, then pdb stops at the 
next function call if the hard breakpoint has been hit more than once instead 
of leaving the pdb session for good as it does currently.

--
nosy: +xdegaye

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

By the way, I think Python.framework is not needed? 
https://github.com/python/cpython/commit/1bbf7b661f0ac8aac12d5531928d9a85c98ec1a9#diff-206dc381e448d5121da9a6040a2b13c1

--

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

Oops apparently my fix is incomplete. From the builder "AMD64 Fedora Rawhide 
Clang Installed 3.x" [1]:

ModuleNotFoundError: No module named 'test.test_importlib.data'

[1] https://buildbot.python.org/all/api/v2/logs/824407/raw

--

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Jason R. Coombs


Jason R. Coombs  added the comment:


New changeset c3738cfe63b1f2c1dc4a28d0ff9adb4e9e3aae1f by Jason R. Coombs 
(Chih-Hsuan Yen) in branch 'master':
bpo-34632: fix installation of importlib.metadata (#13563)
https://github.com/python/cpython/commit/c3738cfe63b1f2c1dc4a28d0ff9adb4e9e3aae1f


--

___
Python tracker 

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



[issue34632] Port importlib_metadata to Python 3.8

2019-05-25 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I started trying to replicate the failure. I got as far as this Dockerfile:

```
FROM fedora:rawhide

RUN yum install -y clang make git

RUN git clone https://github.com/python/cpython
WORKDIR cpython
RUN ./configure
RUN make
```

And then running `./python Tools/scripts/run_tests.py test_importlib`, but the 
tests fail due to zlib not being installed.

Sounds like yan12125 has the fix, so I'm shelving my investigation.

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



[issue37040] checking for membership in itertools.count enters infinite loop with no way to exit

2019-05-25 Thread Martin Panter


Martin Panter  added the comment:

Problems with long-running iterators are already discussed in:

Issue 31815: rejected proposal to check for interrupts
Issue 33939: proposal to flag iterators as being infinite

--
nosy: +martin.panter

___
Python tracker 

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



  1   2   >