[issue29480] Mac OSX Installer SSL Roots

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Thanks for your suggestions.  I agree that the Root Certificates and OpenSSL 
situation on macOS is still less than desirable.  For 3.7.0b2, I have tried to 
make things more obvious in two ways.  One, the installer package will now 
attempt to open a Finder window for the /Application/Python 3.7 folder that 
contains the "Install Certificates.command".  Two, rather than just a generic 
"installation complete" message at the end of the install, there is now a 
tailored message that urges the user to click on the "Install 
Certificates.command" icon. I considered trying to run the command 
automatically from the installer but that gets a bit messy: 1. it requires a 
network connection; 2. the installer would need to ensure the installation 
takes place with the right user and group permission and not just as root; 3. 
the user might not want to use certifi; and 4. the solution needs to work 
across all macOS versions supported by the installer variant.  Also, it appears 
the installer doesn't allo
 w command files to be executed by clicking on a link in the installer window, 
a prudent security measure.  While not perfect, I think what's now in 3.7.0b2 
should be an improvement, at least it will be much harder to overlook without 
being too obnoxious about it.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
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



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-02-27 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

xdegaye wrote:
> An explanation should be given for the behavior of 3.7 and 3.8 in the jump.py 
> case.

In 3.7 when running jump.py as in msg183254, Python aborts with a frame stack 
overflow.  The reason is that when the generator is resumed after the jump, its 
send() method is called with an argument and pushes the argument on the frame 
stack (i.e. f->f_stacktop - f->f_valuestack == 1 in gen_send_ex() before the 
call to PyEval_EvalFrameEx()). This argument is supposed to be popped by the 
first instruction executed by the generator which is expected to be YIELD_VALUE 
but, because of the jump, f->f_lasti is now 0 and the send() argument is not 
popped.  Hence the stack overflow.

When LLTRACE is undefined in ceval.c, stack oveflow checking is disabled. I 
have checked with gdb that, in that case, when YIELD_VALUE is about to be 
executed then STACK_LEVEL() is 3 instead of 1 and therefore YIELD_VALUE does 
not pop the right value from the stack. The stack is indeed corrupted.

So there are two reasons for forbiddig to jump from a yield statement:
* the ceval loop has exited and the jump is not allowing the user to jump to 
another line
* after the jump, resuming a generator corrupts the frame stack

--

___
Python tracker 

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



[issue29480] Mac OSX Installer SSL Roots

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Tommy, you should ask your question elsewhere, like on Stackoverflow or on the 
Python mailing list.  It does not seem related to this issue at all or to 
indicate a problem with Python itself. (For the record, the Python Developer's 
Guide has some good tips on how to build Python for macOS and other platforms; 
see https://devguide.python.org/setup/#build-dependencies)

--

___
Python tracker 

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



[issue32864] Visual glitches when animating ScrolledText instances using place geometry manager

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Victor, FYI, 3.7.0b2 has just been released and the macOS 10.9+ installer 
contains an updated version of Tcl/Tk (8.6.7 -> 8.6.8).  According to the Tk 
change log, there were a number of macOS related fixes that went in to 8.6.8. 
Perhaps some of the glitches you were seeing have been fixed?  If not, as 
Serhiy points out, it's best to report the issue to the Tk project especially 
if it can be easily reproduced without using Python with, like with the Tcl 
wish shell.  Good luck!

--

___
Python tracker 

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



[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Don't use ord('x'). Use just 'x' or b'x'[0].

--

___
Python tracker 

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



[issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

As of 3.7.0b1, the new macOS 10.9+ installer variant includes a private copy of 
Tcl/Tk 8.6: 8.6.7 for 3.7.0b1, updated to 8.6.8 for 3.7.0b2.  The framework 
layout is pretty much the same as in the original attempt, that is, everything 
is installed within /Library/Frameworks/Python.framework.  One big thing that 
has changed since the previous attempt: thanks to work by Matthew Brett et al, 
major Python packages that had C code referencing Tk (like matplotlib and 
Pillow) now discover Tcl and Tk symbols dynamically at run time rather than 
having to compile with a particular Tcl/Tk version's header files. That was the 
hangup previously because third-party apps had hardcoded paths to the Tcl/Tk 
header files on macOS.  Hopefully, there aren't many of those left and, if so, 
they can borrow code from matplotlib 
(https://github.com/matplotlib/matplotlib/pull/6442).  The legacy 10.6+ 
installer variants still link with Tcl/Tk 8.5.x from 
/Library/Frameworks/Tk.framework (a la ActiveTcl); ActiveS
 tate now only provides 8.6.x packages for macOS 10.9+ and Tk 8.6.x gets little 
exposure on older systems and depends more and more on features in newer macOS 
releases.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.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



[issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping

2018-02-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I settled on the following to compare ParseMap implementations.

from idlelib.pyparse import Parser
import timeit

class ParseGet(dict):
def __getitem__(self, key): return self.get(key, ord('x'))
class ParseMis(dict):
def __missing__(self, key): return ord('x')

for P in (ParseGet, ParseMis):
print(P.__name__, 'hit', 'miss')
p = p=P({i:i for i in (10, 34, 35, 39, 40, 41, 91, 92, 93, 123, 125)})
print(timeit.timeit(
"p[10],p[34],p[35],p[39],p[40],p[41],p[91],p[92],p[93],p[125]",
number=10, globals = globals()))
print(timeit.timeit(
"p[11],p[33],p[36],p[45],p[50],p[61],p[71],p[82],p[99],p[125]",
number=10, globals = globals()))

ParseGet hit miss
1.104342376
1.112531999
ParseMis hit miss
0.353020707002
1.216596776003

ParseGet hit miss
1.185322191
1.191544951999
ParseMis hit miss
0.347727272002
1.317010653

Avoiding custom code for all ascii chars will be a win.  I am sure that calling 
__missing__ for non-ascii will be at least as fast as it is presently.  I will 
commit a revision tomorrow.  

I may then compare to Serhiy's sub/replace suggestion.  My experiments with 
'code.translate(tran)' indicate that time grows sub-linearly up to 1000 or 
1 chars.  This suggests that there are significant constant or log-like 
terms.

--

___
Python tracker 

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



[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-02-27 Thread Ned Deily

Change by Ned Deily :


--
nosy: +mark.dickinson, rhettinger

___
Python tracker 

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



[issue32968] Fraction modulo infinity should behave consistently with other numbers

2018-02-27 Thread Elias Zamaria

New submission from Elias Zamaria :

Usually, a positive finite number modulo infinity is itself. But modding a 
positive fraction by infinity produces nan:

>>> from fractions import Fraction
>>> from math import inf
>>> 3 % inf
3.0
>>> 3.5 % inf
3.5
>>> Fraction('1/3') % inf
nan

Likewise, a positive number modulo negative infinity is usually negative 
infinity, a negative number modulo infinity is usually infinity, and a negative 
number modulo negative infinity is usually itself, unless the number doing the 
modding is a fraction, in which case it produces nan.

I think fractions should behave like other numbers in cases like these. I don't 
think this comes up very often in practical situations, but it is inconsistent 
behavior that may surprise people.

I looked at the fractions module. It seems like this can be fixed by putting 
the following lines at the top of the __mod__ method of the Fraction class:

if b == math.inf:
if a >= 0:
return a
else:
return math.inf
elif b == -math.inf:
if a >= 0:
return -math.inf
else:
return a


If that is too verbose, it can also be fixed with these lines, although this is 
less understandable IMO:

if math.isinf(b):
return a if (a >= 0) == (b > 0) else math.copysign(math.inf, b)


I noticed this in Python 3.6.4 on OS X 10.12.6. If anyone wants, I can come up 
with a patch with some tests.

--
components: Interpreter Core
messages: 313045
nosy: elias
priority: normal
severity: normal
status: open
title: Fraction modulo infinity should behave consistently with other numbers
versions: Python 3.6, 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



[issue32959] zipimport fails when the ZIP archive contains more than 65535 files

2018-02-27 Thread Thomas Wouters

Thomas Wouters  added the comment:

FWIW, yes, this is because zipimport doesn't support ZIP64, and doesn't even 
flag it as an error when the ZIP requires it. Instead it skips files; the ZIP64 
format works by setting the fields that would overflow to the maximum value as 
a signal that the real value should be read from the ZIP64 records, which means 
it's still a valid non-64-bit ZIP file, just a truncated one.

Adding ZIP64 support to zipimport is not trivial, and requires breaking some 
behaviour that's bad (not according to the ZIP spec) but actually covered by 
zipimport's tests: prepending arbitrary data to the ZIP file by just 
concatenating them together (rather than rewriting the ZIP archive's offsets). 
I don't think there's going to be an easy fix here, although I am working on 
open-sourcing a replacement zipimport that I wrote for work, which does support 
ZIP64 properly (and also fixes some other fundamental flaws in zipimport). I 
hope to have that done soon, and we can discuss replacing zipimport with that 
module in Python 3.8 or later.

--

___
Python tracker 

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



[issue32966] Python 3.6.4 - 0x80070643 - Fatal Error during installation

2018-02-27 Thread Steve Dower

Steve Dower  added the comment:

Make sure all your Windows updates are installed, reboot if necessary, and try 
again.

I believe this is the error that occurs when another installation is ongoing, 
and Windows Update is about the only tool likely to be installing something 
without telling you or us about it. It's a known and ongoing issue right now, 
but not something we can resolve from our installer.

--

___
Python tracker 

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



[issue32959] zipimport fails when the ZIP archive contains more than 65535 files

2018-02-27 Thread bbayles

Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-02-27 Thread miss-islington

miss-islington  added the comment:


New changeset 8c65360dd0c1ea5b5d2e60a0694daf3f9df8f56b by Miss Islington (bot) 
in branch '3.6':
bpo-30928:  Update idlelib/NEWS.txt, possibly for 3.7.0b2  (GH-5932)
https://github.com/python/cpython/commit/8c65360dd0c1ea5b5d2e60a0694daf3f9df8f56b


--

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-02-27 Thread miss-islington

miss-islington  added the comment:


New changeset 0ea49fc0bfa10205895f9fb78b4d6659b2946883 by Miss Islington (bot) 
in branch '3.7':
bpo-30928:  Update idlelib/NEWS.txt, possibly for 3.7.0b2  (GH-5932)
https://github.com/python/cpython/commit/0ea49fc0bfa10205895f9fb78b4d6659b2946883


--
nosy: +miss-islington

___
Python tracker 

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



[issue18387] Add 'symbols' link to pydoc's html menu bar.

2018-02-27 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

It looks like this patch was close to being approved.  Ron, would you be able 
to open a Github pull request for your patch?  Thanks!

--
nosy: +csabella
versions: +Python 3.8 -Python 3.4

___
Python tracker 

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



[issue32706] test_check_hostname() of test_ftplib started to fail randomly

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Let's get the changes into master first and stabilized there and then we can 
discuss the possibility of a 3.7 backport.

--

___
Python tracker 

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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Thanks for everyone's input and thanks for the PRs!  Since there are still 
outstanding review comments, I decided to revert this from both master and 3.7 
for 3.7.0b2. I would suggest getting a polished version stabilized in master 
for 3.8.0.  We could then discuss the possibility of a 3.7 backport.

--
priority: deferred blocker -> 
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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-02-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5706

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-02-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5705

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-02-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 0954c9e9c8fbea452f56120df592f2061d3209c7 by Terry Jan Reedy in 
branch 'master':
bpo-30928:  Update idlelib/NEWS.txt, possibly for 3.7.0b2  (GH-5932)
https://github.com/python/cpython/commit/0954c9e9c8fbea452f56120df592f2061d3209c7


--

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0

2018-02-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I plan to start a new issue for 3.8.0 when 3.7.0rc1 is released and 'What's new 
in 3.8.0 (since 3.7.0)' is added to master. IDLE PRs after rc1 that are not an 
emergency fix will go into 3.7.1

--
title: Copy modified blurbs to idlelib/NEWS.txt -> Copy modified blurbs to 
idlelib/NEWS.txt for 3.7.0

___
Python tracker 

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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:


New changeset b7dcae358e9d5a3ac9dafec9f6b64e9a66843ad8 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (GH-5912) 
(GH-5931)
https://github.com/python/cpython/commit/b7dcae358e9d5a3ac9dafec9f6b64e9a66843ad8


--

___
Python tracker 

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



[issue32967] make check in devguide failing

2018-02-27 Thread Mariatta Wijaya

New submission from Mariatta Wijaya :

Thanks. Can you open the issue in github.com/python/devguide?

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



[issue31512] Add non-elevated symlink support for dev mode Windows 10

2018-02-27 Thread Alexey Izbyshev

Change by Alexey Izbyshev :


--
nosy: +izbyshev

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2018-02-27 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +5704

___
Python tracker 

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



[issue32967] make check in devguide failing

2018-02-27 Thread Neeraj Badlani

Change by Neeraj Badlani :


--
assignee: docs@python
components: Documentation
nosy: docs@python, neerajbadlani
priority: normal
severity: normal
status: open
title: make check in devguide failing
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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:


New changeset be50a7b627d0aa37e08fa8e2d5568891f19903ce by Ned Deily (Serhiy 
Storchaka) in branch 'master':
Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (#5912)
https://github.com/python/cpython/commit/be50a7b627d0aa37e08fa8e2d5568891f19903ce


--

___
Python tracker 

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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5703

___
Python tracker 

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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Terry:

> Is "this will only be useful on Windows," in the source-deps readme still 
> true? It appears that the tcl/tk tar.gz source is meant for Mac also.

The macOS installer builds do not use the cpython-source-deps repo.

--
priority: release blocker -> 
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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:


New changeset a7edca7122cb952874e74d64d693c5b938c758cb by Ned Deily in branch 
'3.7':
bpo-32901: update macOS 10.9+ installer to Tcl/Tk 8.6.8
https://github.com/python/cpython/commit/a7edca7122cb952874e74d64d693c5b938c758cb


--

___
Python tracker 

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



[issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:


New changeset 9189e95d9c6691de18783b2e9213ec2dc18fd0c5 by Ned Deily in branch 
'master':
bpo-32901: update macOS 10.9+ installer to Tcl/Tk 8.6.8
https://github.com/python/cpython/commit/9189e95d9c6691de18783b2e9213ec2dc18fd0c5


--

___
Python tracker 

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



[issue32965] Passing a bool to io.open() should raise a TypeError, not read from stdin

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Thanks for your report.  Alas, this is expected behavior.  As documented, the 
Boolean values False and True behave like the integers 0 and 1; this behavior 
dates back to the earliest days of Python.  So when you pass False to open, you 
are passing the integer 0 and file number 0 is sys.stdin.

https://docs.python.org/3/library/stdtypes.html#boolean-values

--
nosy: +ned.deily
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



[issue32959] zipimport fails when the ZIP archive contains more than 65535 files

2018-02-27 Thread Brett Cannon

Change by Brett Cannon :


--
nosy: +twouters

___
Python tracker 

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



[issue32966] Python 3.6.4 - 0x80070643 - Fatal Error during installation

2018-02-27 Thread Ned Deily

Change by Ned Deily :


--
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue32965] Passing a bool to io.open() should raise a TypeError, not read from stdin

2018-02-27 Thread Erik Johnson

Erik Johnson  added the comment:

Also, it's the 3rd and 4th reads that I had to hit ctrl-d to get back to the 
REPL, as you can see in the example the first two read just fine from that 
initial block of text I had pasted in.

This is what I get for not properly proofreading before I file an issue.

--

___
Python tracker 

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



[issue32966] Python 3.6.4 - 0x80070643 - Fatal Error during installation

2018-02-27 Thread Scott

New submission from Scott :

Installing Python 3.6.4, Windows 10 64bit, exits installer and dumps the 
following error code to log.

[18B8:4394][2018-02-27T15:41:06]i399: Apply complete, result: 0x80070643, 
restart: None, ba requested restart:  No

0x80070643 - Fatal Error during installation


Attempted Command line installation as Administrator, installation standard 
methods as Administrator

--
components: Installation
files: Python 3.6.4 (64-bit)_20180227154057.log
messages: 313027
nosy: exceltw
priority: normal
severity: normal
status: open
title: Python 3.6.4 - 0x80070643 - Fatal Error during installation
type: crash
versions: Python 3.6
Added file: https://bugs.python.org/file47464/Python 3.6.4 
(64-bit)_20180227154057.log

___
Python tracker 

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



[issue32965] Passing a bool to io.open() should raise a TypeError, not read from stdin

2018-02-27 Thread Erik Johnson

Erik Johnson  added the comment:

Please excuse the typo on the 2nd line of the OP, it should say "open/io.open", 
not "op/io.open".

--

___
Python tracker 

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



[issue32965] Passing a bool to io.open() should raise a TypeError, not read from stdin

2018-02-27 Thread Erik Johnson

New submission from Erik Johnson :

When you open a filehandle using either True or False as the file, the open 
succeeds.

This has been reproduced using op/io.open on Python 3.6.4, 3.5.2, and 3.4.5, as 
well as with io.open() on Python 2.7.14.

This can be easily demonstrated in the REPL:

>>> f = open(False)
>>> f.read(10)
Lorem ipsum dolor sit amet
'Lorem ipsu'
>>> f.read(10)
'm dolor si'
>>> f.read(10)
't amet\n'
>>> f.read(10)
''
>>> f.close()
>>>
%


After the first read, I pasted in enough to stdin to exceed 10 bytes, and hit 
Enter. After the 2nd and third reads I had to hit Ctrl-d to exit back to the 
REPL. And, as a fun bonus, closing the filehandle quits the REPL.


This doesn't look like intended behavior. It doesn't make logical sense (why 
not just use sys.stdin if you want to read from stdin?), and isn't documented. 
This should either raise a TypeError, or the behavior should be documented. 
From the docs:

file is a path-like object giving the pathname (absolute or relative to the 
current working directory) of the file to be opened or an integer file 
descriptor of the file to be wrapped. (If a file descriptor is given, it is 
closed when the returned I/O object is closed, unless closefd is set to False.)

Moreover, when you pass other values that don't match the above description, a 
TypeError is raised:

>>> open(123.456)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: integer argument expected, got float
>>> open(None)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: expected str, bytes or os.PathLike object, not NoneType
>>> open(['wtf', 'am', 'i', 'doing???'])
Traceback (most recent call last):
  File "", line 1, in 
TypeError: expected str, bytes or os.PathLike object, not list


So, one of str, bytes, and os.PathLike are expected, right? And yet...


>>> isinstance(True, (str, bytes, os.PathLike))
False
>>> isinstance(False, (str, bytes, os.PathLike))
False


It should also be noted that when using the open() builtin on Python 2 instead 
of io.open(), you get a more logical result:

>>> open(False)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: coercing to Unicode: need string or buffer, bool found

--
messages: 313025
nosy: terminalmage
priority: normal
severity: normal
status: open
title: Passing a bool to io.open() should raise a TypeError, not read from stdin
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue9635] Add Py_BREAKPOINT and sys._breakpoint hooks

2018-02-27 Thread Dave Malcolm

Dave Malcolm  added the comment:

On Fri, 2018-02-23 at 00:16 +, Cheryl Sabella wrote:
> Cheryl Sabella  added the comment:
> 
> Did PEP553 make this issue obsolete?

I *think* they have slightly different scope: if I'm reading it right,
PEP553 is about injecting a breakpoint into the Python debugger.  This
proposal was about injecting a lower-level breakpoint for debugging
CPython itself (for e.g. gdb to handle).

The idea was to make it easier to, say, step through a particular
CPython construct at the C level by injecting a breakpoint right before
it:

def test_something():
  # lots of setup
  sys.c_level_breakpoint()
  # whatever comes next

so that sys.c_level_breakpoint drops you into, say, gdb, and from there
you can step through the following Python code at the C level, without
having to express stepping through all the setup at the C/gdb level.

Hope that makes sense.

That said, I'm full-time on gcc these days, and unlikely to pursue this
from the CPython side.

--

___
Python tracker 

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



[issue31355] Remove Travis CI macOS job: rely on buildbots

2018-02-27 Thread Antoine Pitrou

Change by Antoine Pitrou :


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



[issue31355] Remove Travis CI macOS job: rely on buildbots

2018-02-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset d7687eb4b66c9f675b112eff1169326a1766c111 by Antoine Pitrou in 
branch 'master':
bpo-31355: Travis-CI: re-enable macOS job (#5858)
https://github.com/python/cpython/commit/d7687eb4b66c9f675b112eff1169326a1766c111


--

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2018-02-27 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset fff596f792a0752b0e571fa57809e5752aba6353 by Alexander Belopolsky 
(Miss Islington (bot)) in branch '3.7':
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) 
(gh-5929)
https://github.com/python/cpython/commit/fff596f792a0752b0e571fa57809e5752aba6353


--

___
Python tracker 

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



[issue32403] date, time and datetime alternate constructors should take fast construction path

2018-02-27 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset fff596f792a0752b0e571fa57809e5752aba6353 by Alexander Belopolsky 
(Miss Islington (bot)) in branch '3.7':
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) 
(gh-5929)
https://github.com/python/cpython/commit/fff596f792a0752b0e571fa57809e5752aba6353


--

___
Python tracker 

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



[issue32964] Reuse a testing implementation of the path protocol in tests

2018-02-27 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue32403] date, time and datetime alternate constructors should take fast construction path

2018-02-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5701

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2018-02-27 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset 5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe by Alexander Belopolsky 
(Paul Ganssle) in branch 'master':
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814)
https://github.com/python/cpython/commit/5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe


--

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2018-02-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5700

___
Python tracker 

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



[issue32403] date, time and datetime alternate constructors should take fast construction path

2018-02-27 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset 5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe by Alexander Belopolsky 
(Paul Ganssle) in branch 'master':
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814)
https://github.com/python/cpython/commit/5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe


--

___
Python tracker 

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



[issue32964] Reuse a testing implementation of the path protocol in tests

2018-02-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

In a number of tests there are simple implementations of the path protocol. 
Unlike to pathlib.Path they implement only necessary minimum of methods. The 
proposed PR moves this implementation into test.support. It also fixes some 
misuses of it.

I have named it SimplePath. Are there better ideas? PathLike was rejected due 
to possible confusion with os.PathLike.

--
components: Tests
messages: 313018
nosy: brett.cannon, ezio.melotti, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Reuse a testing implementation of the path protocol in tests
type: enhancement
versions: Python 3.6, 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



[issue29915] Drop Mac OS X Tiger support in Python 3.7?

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Update: due to recent changes at github.com to no longer support older 
implementations of SSL/TLS, the git client on the macOS 10.4 Tiger buildbot 
server has stopped working. We had a brief discussion with David Bolen, the 
buildbot's owner, and decided it was no longer worth trying to upgrade git 
there just to keep those 10.4 buildbots running.  That doesn't necessarily mean 
we are intentionally breaking 10.4 support in 3.7 (or other supported Python 
versions) but we will no longer be doing any CI testing via our buildbot farm 
and can't guarantee that it will continue to work.  I will add a note somewhere 
about that in the 3.7 documentation prior to final release.

https://mail.python.org/mm3/archives/list/buildbot-sta...@python.org/thread/5DXFBUROSMEDB3QTAZDATD64R3IRV2UG/

--
resolution: postponed -> fixed

___
Python tracker 

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



[issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

With a current Tk 8.6.8, test_virtual_event no longer fails (still does with 
8.5.18) but test_identify still fails as it does with 8.5.

--
versions: +Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0`

2018-02-27 Thread Iryna Shcherbina

New submission from Iryna Shcherbina :

test_gdb fails on Fedora 28. This happens only in debug build, and only if 
built with control flow protection flags: `-mcet -fcf-protection` AND 
optimization `-O0`.

Reproduction steps on Fedora 28 (x86_64):

./configure --with-pydebug
make 'EXTRA_CFLAGS=-mcet -fcf-protection -O0'
make test TESTOPTS='-v test_gdb'

Actual result:

Re-running test 'test_gdb' in verbose mode
GDB version 8.1:
GNU gdb (GDB) Fedora 8.1-8.fc28
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".
test_NULL_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with NULL ob_type is handled gracefully ... ok
test_NULL_ptr (test.test_gdb.PrettyPrintTests)
Ensure that a NULL PyObject* is handled gracefully ... ok
test_builtin_method (test.test_gdb.PrettyPrintTests) ... FAIL
test_builtins_help (test.test_gdb.PrettyPrintTests)
Ensure that the new-style class _Helper in site.py can be handled ... FAIL
test_bytes (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of bytes ... FAIL
test_corrupt_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a corrupt ob_type is handled gracefully ... ok
test_corrupt_tp_flags (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_flags is handled ... ok
test_corrupt_tp_name (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_name is handled ... ok
test_dicts (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of dictionaries ... FAIL
test_exceptions (test.test_gdb.PrettyPrintTests) ... FAIL
test_frames (test.test_gdb.PrettyPrintTests) ... FAIL
test_frozensets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of frozensets ... FAIL
test_getting_backtrace (test.test_gdb.PrettyPrintTests) ... ok
test_int (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of various int values ... FAIL
test_lists (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of lists ... FAIL
test_modern_class (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of new-style class instances ... FAIL
test_selfreferential_dict (test.test_gdb.PrettyPrintTests)
Ensure that a reference loop involving a dict doesn't lead proxyval ... FAIL
test_selfreferential_list (test.test_gdb.PrettyPrintTests)
Ensure that a reference loop involving a list doesn't lead proxyval ... FAIL
test_selfreferential_new_style_instance (test.test_gdb.PrettyPrintTests) ... 
FAIL
test_selfreferential_old_style_instance (test.test_gdb.PrettyPrintTests) ... 
FAIL
test_sets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of sets ... FAIL
test_singletons (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of True, False and None ... FAIL
test_strings (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of unicode strings ... FAIL
test_subclassing_list (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of an instance of a list subclass ... FAIL
test_subclassing_tuple (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of an instance of a tuple subclass ... FAIL
test_truncation (test.test_gdb.PrettyPrintTests)
Verify that very long output is truncated ... FAIL
test_tuples (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of tuples ... FAIL
test_basic_command (test.test_gdb.PyListTests)
Verify that the "py-list" command works ... FAIL
test_one_abs_arg (test.test_gdb.PyListTests)
Verify the "py-list" command with one absolute argument ... FAIL
test_two_abs_args (test.test_gdb.PyListTests)
Verify the "py-list" command with two absolute arguments ... FAIL
test_down_at_bottom (test.test_gdb.StackNavigationTests)
Verify handling of "py-down" at the bottom of the stack ... FAIL
test_pyup_command (test.test_gdb.StackNavigationTests)
Verify that the "py-up" command works ... FAIL
test_up_at_top (test.test_gdb.StackNavigationTests)
Verify handling of "py-up" at the top of the stack ... FAIL
test_up_then_down (test.test_gdb.StackNavigationTests)
Verify "py-up" followed by "py-down" ... FAIL
test_bt (test.test_gdb.PyBtTests)
Verify that the "py-bt" command works ... FAIL
test_bt_full (test.test_gdb.PyBtTests)
Verify that the "py-bt-full" command works ... FAIL
test_gc (test.test_gdb.PyBtTests)
Verify that "py-bt" indicates if a thread 

[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-02-27 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Actually

$ git rebase --onto master 3.7 bpo-17288

fails with one single change in Objects/frameobject.c and one simply needs to 
(as I have tested it)
remove all the three confict markers in this file and remove the following two 
lines that were enclosed by these markers:

min_addr = Py_MIN(new_lasti, f->f_lasti);
max_addr = Py_MAX(new_lasti, f->f_lasti);

then run:

$ git add Objects/frameobject.c
$ git rebase --continue
$ git co master; git merge bpo-17288

--

___
Python tracker 

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



[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Since this is still happening on current macOS 10.13.3, we should get a fix for 
this in before 3.6.5rc1.  PR's welcome!

--
priority: normal -> release blocker
stage:  -> needs patch

___
Python tracker 

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



[issue31106] os.posix_fallocate() generate exception with errno 0

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

I agree with Alexey's analysis.

Koobs, could you please open a new issue about the failing test?  Unless 
someone knows of a foolproof way to determine on all platforms that a file is 
resident on ZFS, the fix is to skip the test on FreeBSD as well if ZFS is 
likely to be used there.

Also, can someone add a NEWS entry and close this issue?

--
nosy: +ned.deily
priority: normal -> deferred blocker

___
Python tracker 

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



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-02-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Usually we create a PR for master (unless the issue is gone here) and backport 
it to other branches. In this case it may be better to start from 3.7, but it 
is worth to look at the patch against master for the case if the change can 
written in the form that minimizes difference between 3.7 and master.

--

___
Python tracker 

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



[issue32493] UUID Module - FreeBSD build failure

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

We are still seeing the 3.7 and 3.8 FreeBSD buildbot failures Victor identified 
in msg310147.  Can someone please take this on and produce a PR?

--
nosy: +ned.deily
priority: normal -> deferred blocker
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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2018-02-27 Thread Eric Snow

Eric Snow  added the comment:

Sounds good, Ned.  Sorry for my confusion.

--

___
Python tracker 

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



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-02-27 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Yes, rebase fails merging two changes in Objects/frameobject.c.
I can write another PR for master if you want.

--

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2018-02-27 Thread Christoph Groth

Christoph Groth  added the comment:

Unfortunately I do not feel competent enough to submit a documentation patch 
because I still do not understand why ModuleNotFoundError was added.

I don't want to bother you further with this.  Thank you all for your prompt 
replies.  If you agree with me that there is indeed an issue, please open it 
yourself.

--

___
Python tracker 

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



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-02-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Are there any problems with rebasing it to master?

--

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Christoph, thanks for your suggestion.  If you think the documentation needs 
improving, please open a new issue with any suggested wording (or, even better, 
a doc PR).  This issue (issue15767) has long been closed and any discussion 
here is likely to not be acted on.

--
nosy: +ned.deily

___
Python tracker 

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



[issue32911] Doc strings no longer stored in body of AST

2018-02-27 Thread Ned Deily

Ned Deily  added the comment:

Since we are already past the 3.7.0b2 cutoff time and there does not seen to be 
a consensus that the current 3.7 behavior needs to change and the proposed 
change is quite large, I think we should not change anything now for b2.  You 
can have a discussion on python-dev and, if there is a consensus for change, we 
can look at it for b3.

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2018-02-27 Thread Christoph Groth

Christoph Groth  added the comment:

Thank you, Chris, for your reply.  If this is indeed the main use case of 
ModuleNotFoundError, I respectfully suggest to document it better.  The way 
things are now, Python users who switch to 3.6 encounter this new exception 
during their work with the interpreter and invariably wonder "Should I change 
anything in my code because of this?  If not, why was it introduced?".  In my 
opinion the current documentation does not answer these questions well.  Note 
that this is not about some deeply buried detail.  Every Python programmer is 
bound to encounter this.

That said, I cannot imagine many cases where user code would like to fall back 
to html.parser only if fancy_parser is not installed but not if an older 
version of fancy_parser is installed (or maybe it's an entirely *different* 
fancy_parser?).  And in the rare cases where that is desired, it was already 
perfectly idiomatic to do so:

try:
import fancy_parser
except ImportError:
from html.parser import HTMLParser
else:
from fancy_parser import NewParser as HTMLParser

--

___
Python tracker 

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



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-02-27 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

Added PR 5928 for the 3.7 branch.

--

___
Python tracker 

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



[issue17288] cannot jump from a 'return' or 'exception' trace event

2018-02-27 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +5699

___
Python tracker 

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



[issue32911] Doc strings no longer stored in body of AST

2018-02-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Sorry, Python-Dev, of course.

--

___
Python tracker 

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



[issue32911] Doc strings no longer stored in body of AST

2018-02-27 Thread INADA Naoki

INADA Naoki  added the comment:

Python-list? -dev? -ideas?

--

___
Python tracker 

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



[issue32911] Doc strings no longer stored in body of AST

2018-02-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Would be nice to discuss this design question on Python-list.

--

___
Python tracker 

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



[issue32911] Doc strings no longer stored in body of AST

2018-02-27 Thread INADA Naoki

INADA Naoki  added the comment:

I'm implementing (2).  Please check GH-5927.

--
keywords:  -patch
stage: patch review -> 

___
Python tracker 

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



[issue32911] Doc strings no longer stored in body of AST

2018-02-27 Thread INADA Naoki

Change by INADA Naoki :


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

___
Python tracker 

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



[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2018-02-27 Thread Christian Heimes

Christian Heimes  added the comment:

Ned,

I have pushed the enhancement now. I feel a bit guilty about the last minute 
push, but I honestly believe it's in our best interesting.

There is a high chance that the new APIs will be required for Debian and other 
distros in the near future. OpenSSL has deprecated the old API, too. It is 
likely that OpenSSL 1.2.0 will remove both the options (OP_NO_TLSv1, 
OP_NO_TLSv1_2, ...) options and version specific protocols (PROTOCOL_TLSv1, 
PROTOCOL_TLSv1_2, ...).

--

___
Python tracker 

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



[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2018-02-27 Thread miss-islington

miss-islington  added the comment:


New changeset 4c842b09209ccf1b4f853106b1f58bb888da02ef by Miss Islington (bot) 
in branch '3.7':
bpo-31453: Add setter for min/max protocol version (GH-5259)
https://github.com/python/cpython/commit/4c842b09209ccf1b4f853106b1f58bb888da02ef


--
nosy: +miss-islington

___
Python tracker 

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



[issue15767] add ModuleNotFoundError

2018-02-27 Thread Chris Jerdonek

Chris Jerdonek  added the comment:

Eric touched on the use when he said the following above:

> It's nice to be able to distinguish between the failure to *find* the module 
> during import from other uses of ImportError.

To make up one example, you might want to use a fallback module if a package 
isn't installed:

try:
from fancy_parser import NewParser as HTMLParser
except ModuleNotFoundError:
from html.parser import HTMLParser

But you might still want an error if the package is installed, though 
incorrectly (e.g. fancy_parser is installed, but an old version that doesn't 
have NewParser). Catching ImportError would swallow this error, whereas 
ModuleNotFoundError would let it bubble up.

--

___
Python tracker 

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



[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2018-02-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5697

___
Python tracker 

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



[issue32961] namedtuple displaying the internal code

2018-02-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

In 2.7 namedtuple() takes four arguments.

namedtuple(typename, field_names, verbose=False, rename=False)

A sequence of field names should be passed as the second argument. In you case 
you pass four argumens: 'a' as field names, 'b' as the verbose flag, and 'c' as 
the rename flag. Since 'b' has true boolean value, namedtuple() outputs the 
source used for generating a named tuple with a single field 'a'.

In Python 3.6+ verbose and rename are keyword-only parameters (see issue25628) 
and this error can be caught earlier:

>>> sample = namedtuple('Name','a','b','c')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: namedtuple() takes 2 positional arguments but 4 were given

This change can't be backported to 2.7 for two reasons:

1) There is no syntax support for keyword-only parameters in 2.7.
2) This can break a correct code which passes flags as positional arguments.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32961] namedtuple displaying the internal code

2018-02-27 Thread Eric V. Smith

Eric V. Smith  added the comment:

See https://docs.python.org/2/library/collections.html#collections.namedtuple

namedtuple is called as:
collections.namedtuple(typename, field_names[, verbose=False][, rename=False])

So you are passing in
typename = 'Name'
field_names = 'a'
verbose = 'b'
rename = 'c'

'b' is a True value, so that's why it's showing the output.

You want to be using: 
sample = namedtuple('Name', ['a', 'b', 'c'])

--
nosy: +eric.smith
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



[issue32961] namedtuple displaying the internal code

2018-02-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The behavior of collections.namedtuple has nothing to do with IDLE.  I verified 
the behavior in 2.7.  In 3.7, one must group the field names, as in a tuple, 
and the corrected statement has no output.

I had nothing to do with namedtuple development.  I presume that the people who 
are are aware of the 2.7 behavior.  My guess is that they regaurd the behavior 
change was either a new version feature change or as too disruptive a fix to 
backport to 2.7.  Hence, I expect this to be closed.

--
assignee: terry.reedy -> 
components: +Library (Lib) -IDLE
nosy: +rhettinger

___
Python tracker 

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



[issue32951] Prohibit direct instantiation of SSLSocket and SSLObject

2018-02-27 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset 89c2051a554d2053ac87b0adbf11ed0f1bb65db3 by Christian Heimes in 
branch '3.7':
[3.7] bpo-32951: Disable SSLSocket/SSLObject constructor (GH-5864) (#5925)
https://github.com/python/cpython/commit/89c2051a554d2053ac87b0adbf11ed0f1bb65db3


--

___
Python tracker 

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



[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2018-02-27 Thread Christian Heimes

Christian Heimes  added the comment:

I have another good reason to land PR 5259 in 3.7. OpenSSL 1.1.0 has deprecated 
the old way to disable/enable protocol versions with set option. The 
OP_NO_TLSv1* constants will likely get removed in OpenSSL 1.2.0. I'm expecting 
to see a 1.2.0 release within the next two years. Therefore we should include 
SSLContext.maximum_version and SSLContext.minimum_version now. We may even have 
to backport them to 3.6 and 2.7.

https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_options.html

> SSL_OP_NO_SSLv3, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, 
> SSL_OP_NO_DTLSv1, SSL_OP_NO_DTLSv1_2
>These options turn off the SSLv3, TLSv1, TLSv1.1 or TLSv1.2 protocol 
> versions with TLS or the DTLSv1, DTLSv1.2 versions with DTLS, respectively. 
> As of OpenSSL 1.1.0, these options are deprecated, use 
> SSL_CTX_set_min_proto_version and SSL_CTX_set_max_proto_version instead.

--

___
Python tracker 

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



[issue32951] Prohibit direct instantiation of SSLSocket and SSLObject

2018-02-27 Thread Christian Heimes

Change by Christian Heimes :


--
pull_requests: +5696

___
Python tracker 

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



[issue28124] Rework SSL module documentation

2018-02-27 Thread miss-islington

miss-islington  added the comment:


New changeset 102d5204add249248d1a0fa1dd3f673e884b06b4 by Miss Islington (bot) 
in branch '3.7':
bpo-28124: deprecate ssl.wrap_socket() (GH-5888)
https://github.com/python/cpython/commit/102d5204add249248d1a0fa1dd3f673e884b06b4


--
nosy: +miss-islington

___
Python tracker 

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



[issue32911] Doc strings no longer stored in body of AST

2018-02-27 Thread INADA Naoki

INADA Naoki  added the comment:

I tried this patch:

diff --git a/Python/ast.c b/Python/ast.c
index e2092f0f85..93be2bc839 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -3537,9 +3537,9 @@ docstring_from_stmts(asdl_seq *stmts)
 if (s->kind == Expr_kind && s->v.Expr.value->kind == Str_kind) {
 string doc = s->v.Expr.value->v.Str.s;
 /* not very efficient, but simple */
-memmove(_seq_GET(stmts, 0), _seq_GET(stmts, 1),
-(stmts->size - 1) * sizeof(void*));
-stmts->size--;
+//memmove(_seq_GET(stmts, 0), _seq_GET(stmts, 1),
+//(stmts->size - 1) * sizeof(void*));
+//stmts->size--;
 return doc;
 }
 }

But I got "SyntaxError: from __future__ imports must occur at the beginning of 
the file".

docstring is very special while it looks like just a single string literal 
statement...

--

___
Python tracker 

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



[issue31727] FTP_TLS errors when use certain subcommands

2018-02-27 Thread Jonathan

Jonathan  added the comment:

Hi Christian - Can you not reproduce it from the code included in my original 
report? I think that's pretty much all that should be needed, as it's all I was 
using when I discovered the issue.

I figure the hard part will be finding a FTP_TLS server to test with.

--
status: pending -> open

___
Python tracker 

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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2018-02-27 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Note that I'm still -1 on merging this patch because it is unclear how to 
create such plist files using public Apple APIs.

P.S. The low-level code for creating and reading binary plist files appears to 
be used for more than juist plist archives.

--

___
Python tracker 

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



[issue32963] Python 2.7 tutorial claims source code is UTF-8 encoded

2018-02-27 Thread Martijn Pieters

Change by Martijn Pieters :


--
nosy: +Mariatta, rhettinger

___
Python tracker 

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



[issue32963] Python 2.7 tutorial claims source code is UTF-8 encoded

2018-02-27 Thread Martijn Pieters

New submission from Martijn Pieters :

Issue #29381 updated the tutorial to clarify #! use, but the 2.7 patch re-used 
Python 3 material that doesn't apply. See r40ba60f6 at 
https://github.com/python/cpython/commit/40ba60f6bf2f7192f86da395c71348d0fa24da09

It now reads:

"By default, Python source files are treated as encoded in UTF-8."

and

" To display all these characters properly, your editor must recognize that the 
file is UTF-8, and it must use a font that supports all the characters in the 
file."

This is a huge deviation from the previous text, and confusing and wrong to 
people new to Python 2.

--
assignee: docs@python
components: Documentation
messages: 312986
nosy: docs@python, mjpieters
priority: normal
severity: normal
status: open
title: Python 2.7 tutorial claims source code is UTF-8 encoded
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



[issue32961] namedtuple displaying the internal code

2018-02-27 Thread poornaprudhvi

New submission from poornaprudhvi :

>>> from collections import namedtuple
>>> sample = namedtuple('Name','a','b','c')

This is returning the following code as output:

class Name(tuple):
'Name(a,)'

__slots__ = ()

_fields = ('a',)

def __new__(_cls, a,):
'Create new instance of Name(a,)'
return _tuple.__new__(_cls, (a,))

@classmethod
def _make(cls, iterable, new=tuple.__new__, len=len):
'Make a new Name object from a sequence or iterable'
result = new(cls, iterable)
if len(result) != 1:
raise TypeError('Expected 1 arguments, got %d' % len(result))
return result

def __repr__(self):
'Return a nicely formatted representation string'
return 'Name(a=%r)' % self

def _asdict(self):
'Return a new OrderedDict which maps field names to their values'
return OrderedDict(zip(self._fields, self))

def _replace(_self, **kwds):
'Return a new Name object replacing specified fields with new values'
result = _self._make(map(kwds.pop, ('a',), _self))
if kwds:
raise ValueError('Got unexpected field names: %r' % kwds.keys())
return result

def __getnewargs__(self):
'Return self as a plain tuple.  Used by copy and pickle.'
return tuple(self)

__dict__ = _property(_asdict)

def __getstate__(self):
'Exclude the OrderedDict from pickling'
pass

a = _property(_itemgetter(0), doc='Alias for field number 0')

--
assignee: terry.reedy
components: IDLE
messages: 312984
nosy: poornaprudhvi, terry.reedy
priority: normal
severity: normal
status: open
title: namedtuple displaying the internal code
type: behavior
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



[issue32932] better error message when __all__ contains non-str objects

2018-02-27 Thread Xiang Zhang

Xiang Zhang  added the comment:

I would like the error message improved. The Python message is obviously much 
better than the C message. It sends the cause to your eyes. Different messages 
issued from similar statements are confusing. And due to the non-ideal message 
is generated by C, the traceback is more limited.

tmpdir/
  - __init__.py . __all__ = [1]
  - a.py . __all__ = [1]

>>> from tmpdir import *
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1031, in _handle_fromlist
  File "", line 1026, in _handle_fromlist
TypeError: Item in tmpdir.__all__ must be str, not int
>>> from tmpdir.a import *
Traceback (most recent call last):
  File "", line 1, in 
TypeError: attribute name must be string, not 'float'

--

___
Python tracker 

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



[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2018-02-27 Thread Vinay Sajip

Vinay Sajip  added the comment:

> Vinay, should this back-ported to 3.6?

Yes, I think it should be.

--

___
Python tracker 

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



[issue28124] Rework SSL module documentation

2018-02-27 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5695

___
Python tracker 

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



[issue28124] Rework SSL module documentation

2018-02-27 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset 90f05a527c7d439f1d0cba80f2eb32e60ee20fc3 by Christian Heimes in 
branch 'master':
bpo-28124: deprecate ssl.wrap_socket() (#5888)
https://github.com/python/cpython/commit/90f05a527c7d439f1d0cba80f2eb32e60ee20fc3


--

___
Python tracker 

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