[issue39776] Crash in decimal module in heavy-multithreaded scenario

2020-02-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +yselivanov

___
Python tracker 

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



[issue39786] Have the heaps library support max heap

2020-02-28 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks for the suggestion, but I am going to decline.  The min heap has 
suffices for a wide variety of use cases for many, many years.  I see your 
point when it comes to strings, but that is a somewhat exotic use case.

--
nosy: +rhettinger
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue39725] unrelated `from None` exceptions lose prior exception information

2020-02-28 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Because there may be more exceptions than the code writer know. The code raised 
OverflowError and ValueError may be in different function, so the code writer 
know only about ValueError, but OverflowError is an implementation detail (and 
may be absent in other versions).

Currently the code writer has to write the cumbersome code

was_raised = False
try:
foo()  # may raise ValueError -> OverflowError
except:
was_raised = True
if was_raised:
raise KeyError from None

if they want to suppress only exceptions raised in foo(). And it is worse in 
case of finally.

--

___
Python tracker 

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



[issue39791] New `files()` api from importlib_resources.

2020-02-28 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



[issue39792] Two Ctrl+C is required to terminate when a pipe is blocking

2020-02-28 Thread Masahiro Sakai


New submission from Masahiro Sakai :

I noticed that two Ctrl+C instead of one are required to terminate following 
program on macOS and Linux.
I guess that the first Ctrl+C is ignored inside one of the finalizers.


import os

def main():
r, w = os.pipe()
f_w = os.fdopen(w, "w")
f_w.buffer.write(b"a" * 65536)
f_w.buffer.write(b"b")

main()


--
components: IO
messages: 362964
nosy: msakai
priority: normal
severity: normal
status: open
title: Two Ctrl+C is required to terminate when a pipe is blocking
type: behavior
versions: Python 3.6, Python 3.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



[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2020-02-28 Thread swgmma


Change by swgmma :


--
nosy: +swgmma

___
Python tracker 

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



[issue38380] Update SQLite to 3.31.1 in Windows and macOS installer builds

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
title: Update SQLite to 3.30 in Windows and macOS installer builds -> Update 
SQLite to 3.31.1 in Windows and macOS installer builds

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Great, thanks folks! I've pushed an update to GH-18678.

(BTW, is it kosher to force push to PRs like this?)

--

___
Python tracker 

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



[issue39791] New `files()` api from importlib_resources.

2020-02-28 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
assignee:  -> jaraco
components: +Library (Lib)
type:  -> behavior

___
Python tracker 

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



[issue39791] New `files()` api from importlib_resources.

2020-02-28 Thread Jason R. Coombs


New submission from Jason R. Coombs :

In the [importlib_resources 
backport](https://gitlab.com/python-devs/importlib_resources/)... in particular 
in [issue 58](https://gitlab.com/python-devs/importlib_resources/issues/58) and 
[merge request 
76](https://gitlab.com/python-devs/importlib_resources/-/merge_requests/76), 
the backport now has a new feature, a "files()" function.

Let's incorporate that functionality into importlib.resources.

--
messages: 362962
nosy: jaraco
priority: normal
severity: normal
status: open
title: New `files()` api from importlib_resources.
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



[issue39769] compileall.compile_dir(..., ddir="") omits the intermediate package paths when prepending the prefix

2020-02-28 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

keeping this open while i investigate if fixing 3.8 and 3.7 is feasible.  if 
nothing else i'll try to add a note to the docs about the issue in 3.5-3.8 with 
a code sample suggested workaround.

--
resolution:  -> fixed
stage: patch review -> commit review

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2020-02-28 Thread Kyle Stanley


Kyle Stanley  added the comment:

> The daemon thread itself is not problematic, because ProcessPoolExecutor uses 
> an atexit hook to shutdown itself and therefore join the management thread.

ThreadPoolExecutor also uses an atexit hook for its shutdown process. Also, it 
sets each worker thread to a daemon. So we'd definitely have to address as well 
that prior to killing off daemon threads.

> Perhaps the solution would be to have an additional kind of atexit hooks, 
> which get executed before threads are joined.

Hmm, a potential way to do this might be adding a form of "atexit hook" support 
that's specific to threads. Each registered function would get called in the 
internal `_shutdown()` [1] function in the threading module, just before all of 
the non-daemon threads are joined. To me, this seems best implemented as a new 
public function for the threading module, perhaps something like 
`threading.register_atexit()`. Would this be reasonable?

---

[1] - IIUC, `threading._shutdown()` is called in pylifecycle.c, in 
`wait_for_thread_shutdown()`, which is the way that non-daemon threads are 
joined when the interpreter shuts down in `Py_EndInterpreter()` or is finalized 
in `Py_FinalizeEx()`.

--

___
Python tracker 

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



[issue28686] py.exe ignored PATH when using python3 shebang

2020-02-28 Thread fireattack


fireattack  added the comment:

More interestingly, I can't reproduce the same bug on my another Win 7 machine 
with similar setup.

--

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

'pending' is a worthless state because any subsequent post changes back to 
'open'.

--
stage:  -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

-1 also, not worth the cost, so I would not bother with python-ideas.

--
nosy: +terry.reedy
status: pending -> open

___
Python tracker 

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



[issue39769] compileall.compile_dir(..., ddir="") omits the intermediate package paths when prepending the prefix

2020-02-28 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 02673352b5db6ca4d3dc804965facbedfe66425d by Gregory P. Smith in 
branch 'master':
bpo-39769: Fix compileall ddir for subpkgs. (GH-18676)
https://github.com/python/cpython/commit/02673352b5db6ca4d3dc804965facbedfe66425d


--

___
Python tracker 

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



[issue39782] local varible referenced a Exception won't be collected in function

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

For beginners, 'is this a Python bug' questions should usually be directed 
elsewhere for initial review.

https://docs.python.org/3/reference/compound_stmts.html#the-try-statement

"When an exception has been assigned using as target, it is cleared at the end 
of the except clause. This is as if

except E as N:
foo

was translated to

except E as N:
try:
foo
finally:
del N

This means the exception must be assigned to a different name to be able to 
refer to it after the except clause. Exceptions are cleared because with the 
traceback attached to them, they form a reference cycle with the stack frame, 
keeping all locals in that frame alive until the next garbage collection 
occurs."

"l['e']" is the first new name.  "b" in each locals is the second.  Without "b 
= ..." there is no increase because l['e'] gets replaced on each call.  But 
inserting each exception into the next locals (see "keeping all locals in that 
frame alive") in effect makes a linked list of frames and locals.

If one wants to keep multiple exceptions around, best to copy just the info one 
want kept.

--
nosy: +terry.reedy
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



[issue39772] Python 2 FAQ shown in h...@python.org auto reply

2020-02-28 Thread Mats Wichmann


Mats Wichmann  added the comment:

Admit it doesn't seem vastly helpful to pile on with a "not us", but the 
current webmaster@ autoreply is here: 
https://github.com/tjguk/python-webmaster/blob/master/auto-responder.txt/.  It 
contains this link: https://docs.python.org/3/faq/index.html/. Don't know where 
the help@ one comes from.

--
nosy: +mwichmann

___
Python tracker 

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



[issue39772] Python 2 FAQ shown in h...@python.org auto reply

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The autoresponse seems not to be in any .rst, .htm, .html, or .txt file in the 
cpython/python repository, so this tracker is not the right place for this 
issue.  I have sent a change request to both h...@python.org and 
webmas...@python.org.

--
nosy: +terry.reedy
resolution:  -> third party
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I agree with both Eric and Zachary, but I just wanted to point out that in a 
Python interpreter with a keyhole optimizer, you can expect that expressions 
like `1*10**9` to be a constant:

# Python 3.5
py> from dis import dis
py> dis('1*10**9')
  1   0 LOAD_CONST   4 (10)
  3 RETURN_VALUE

Marco, if you are worried about the performance cost of multiplying by a power 
of ten when creating constants, you shouldn't.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue39789] Update Windows release build machines to latest versions

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 45c4112b7250cb600aa2f3a42b4e6b5bfd2919c4 by Miss Islington (bot) 
in branch '3.8':
bpo-39789: Update Windows release build machines to VS 2019 (GH-18695)
https://github.com/python/cpython/commit/45c4112b7250cb600aa2f3a42b4e6b5bfd2919c4


--

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Regarding performance, on my computer, the overhead of calling tuple() on a 
list comp ranges from about 30% for tiny sequences down to about 5% for largish 
sequences.

Tiny sequences are fast either way:

[steve@ando cpython]$ ./python -m timeit "[i for i in (1,2,3)]"
5 loops, best of 5: 5.26 usec per loop

[steve@ando cpython]$ ./python -m timeit "tuple([i for i in (1,2,3)])"
5 loops, best of 5: 6.95 usec per loop


and for large sequences the time is dominated by the comprehension, not the 
call to tuple:

[steve@ando cpython]$ ./python -m timeit "[i for i in range(100)]"
1 loop, best of 5: 1.04 sec per loop

[steve@ando cpython]$ ./python -m timeit "tuple([i for i in range(100)])"
1 loop, best of 5: 1.1 sec per loop

(As the size of the list increases, the proportion of the time spent in calling 
tuple() approaches zero.)

So it is true that there is an opportunity to optimize the creation of a tuple. 
But we should all be aware of the dangerous of premature optimization and 
wasting our efforts on optimizing something that doesn't matter.

Marco, can you demonstrate an actual real piece of code, not a made-up 
contrived example, where the overhead of calling tuple is a bottleneck, or even 
a significant slow-down?



In real code, I would expect the processing inside the comprehension to be 
significant, which would decrease the proportional cost of calling tuple even 
more.


[steve@ando cpython]$ ./python -m timeit "[i**3 + 7*i**2 - 45*i + 11 
for i in range(500) if (i%7 in (2, 3, 5))]"
100 loops, best of 5: 3.02 msec per loop


[steve@ando cpython]$ ./python -m timeit "tuple(
[i**3 + 7*i**2 - 45*i + 11 
for i in range(500) if (i%7 in (2, 3, 5))])"
100 loops, best of 5: 3.03 msec per loop


Remember too that timings of Python code on real computers is subject to a 
significant amount of variability and noise due to all the other processes 
running at the same time, from the OS down to other applications. In my tests, 
I found no less than five pairs of measurement where the call to tuple was 
faster than NOT calling tuple. This is of course impossible, but it 
demonstrates that the overhead of calling tuple is small enough that it is 
within the range of random variation in time.

The bottom line is that while this would be a genuine micro-optimization, it is 
doubtful that it would make a significant difference to performance of programs 
apart from contrived benchmarks.

(On the other hand, C is so fast overall because everything in C is 
micro-optimized.)

If adding tuple comprehensions were free of any other cost, I would say "Sure, 
why not? It can't hurt." but they are not. Inventing new, ugly, fragile syntax 
is a tax on the programmer's performance and the ability of newcomers to learn 
the language. Readability matters.

So I am a very strong -1 vote on the proposed syntax, even if it would 
micro-optimize the creation of a tuple.

Marco, if you still want to argue for this, you will need to

(1) take it back to Python-Ideas, hopefully to get consensus on syntax or at 
least a couple of options to choose between;

(2) find a core developer willing to sponsor a PEP;

(3) write a PEP;

(4) and get the PEP accepted.


I'm closing this as Pending/Postponed. If you get a PEP accepted, you can 
re-open it.

--
resolution:  -> postponed
status: open -> pending

___
Python tracker 

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



[issue39745] BlockingIOError.characters_written represents number of bytes not characters

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Antoine, Although the text may have preceded your OSError reorganization, you 
were the last to touch this entry.  Is is correct, or does it need change?

Revision: f55011f8b63d3b046c1ec580312bc52ca47d721b
Author: Antoine Pitrou 
Date: 10/12/2011 12:57:23 PM
Message:
Update doc for BlockingIOError and its alias in the io module

--
nosy: +pitrou, terry.reedy

___
Python tracker 

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



[issue39789] Update Windows release build machines to latest versions

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

The backport to 3.8 doesn't matter so much for the build definition (the build 
always runs from master, even when targeting earlier versions), but the minor 
Nuget fixes are necessary, so may as well keep it all in sync.

I expect the backport to automerge, so closing.

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



[issue39789] Update Windows release build machines to latest versions

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:


New changeset 03153dd1459fab94f294a118ed1525e34d58601a by Steve Dower in branch 
'master':
bpo-39789: Update Windows release build machines to VS 2019 (GH-18695)
https://github.com/python/cpython/commit/03153dd1459fab94f294a118ed1525e34d58601a


--
message_count: 1.0 -> 2.0
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +18058
pull_request: https://github.com/python/cpython/pull/18697

___
Python tracker 

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



[issue39742] Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +larry

___
Python tracker 

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



[issue39731] ModuleNotFoundError: No module named '_ctypes'

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This does not look like a bug in cpython; if is it not, it should be closed.  
Please ask for help on python-list or another forum that covers installation 
issues.  Or maybe look for a pip user list.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue39729] stat.S_ISXXX can raise OverflowError for remote file modes

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

This was discussed on Python-Ideas:

https://mail.python.org/archives/list/python-id...@python.org/message/LSGZF3G4RFVTKXB5Y2EW5USL2JANG5RS/

and on Discuss:

https://discuss.python.org/t/why-no-tuple-comprehension/2820/1

In both cases the consensus was mostly negative: tuple comprehensions aren't 
very useful, and performance of current solutions is adequate.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue39727] cgi.parse() fatally attempts str.decode when handling multipart/form-data

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +Rhodri James, ethan.furman

___
Python tracker 

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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue39725] unrelated `from None` exceptions lose prior exception information

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Would it generaly work better if 'from None' only suppressed the previous 
exception?  That is the only one that the code writer knows about.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Zachary Ware


Zachary Ware  added the comment:

Agreed with Eric.

--
nosy: +zach.ware
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue39622] KeyboardInterrupt is ignored when await asyncio.sleep(0)

2020-02-28 Thread Maor Kleinberger


Change by Maor Kleinberger :


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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 7f53d87cb0324e391c969855ed8f4b3255f9f744 by Miss Islington (bot) 
in branch '3.8':
bpo-39718: add TYPE_IGNORE, COLONEQUAL to py38 changes in token (GH-18598)
https://github.com/python/cpython/commit/7f53d87cb0324e391c969855ed8f4b3255f9f744


--

___
Python tracker 

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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +18057
pull_request: https://github.com/python/cpython/pull/18696

___
Python tracker 

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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset c2f7eb254bee036afc8a71437ec6aac82f06a1ce by Shantanu in branch 
'master':
bpo-39718: add TYPE_IGNORE, COLONEQUAL to py38 changes in token (GH-18598)
https://github.com/python/cpython/commit/c2f7eb254bee036afc8a71437ec6aac82f06a1ce


--

___
Python tracker 

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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Barney Gale


Barney Gale  added the comment:

Attempted fix shown here: 
https://github.com/barneygale/cpython/commit/784630ef6ad05031abdefa523e61e0629b15e201

Note that I've already removed context manager support (and hence `_closed`) in 
this branch.

--
nosy: +barneygale

___
Python tracker 

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



[issue39718] TYPE_IGNORE, COLONEQUAL missing from py38 changes in token docs

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I verified the additions in token.py.  Thanks for the report.

--
assignee: docs@python -> terry.reedy
nosy: +terry.reedy
type:  -> behavior
versions: +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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

Isn't that what we ended up merging? (Goes to check). Ah, that was 3.30.1.

Sure, go for it. We'll have RCs of everything before the next final releases go 
out, so provided someone double checks that it's all good before then I'm okay 
with it.

--

___
Python tracker 

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



[issue39790] LICENSE.TXT file does not contain all incorporated software

2020-02-28 Thread Steve Dower


New submission from Steve Dower :

Looking at https://docs.python.org/3/license.html there's a list of 
"incorporated software" licenses, most of which say you need to distribute the 
license.

Right now, the LICENSE.txt file we distribute on Windows (made from the 
/LICENSE and PC/crtlicense.txt files in the repo, plus those in the source 
dependencies) does not include any of these licenses that come from C source 
files.

Arguably, we should just include all of them in a central file somewhere in the 
repo, even though there'd be some duplication.

(I have no idea whether other distros correctly gather it all together.)

--
components: Windows
messages: 362937
nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: LICENSE.TXT file does not contain all incorporated software
versions: Python 3.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



[issue39717] Fix exception causes in tarfile module

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

While I have no specific opinion on tarfile, I strongly disagree with a blanket 
prohibition on 'from None'.  Its proper use is to maintain a defined API and 
hide irrelevant implementation details.  Realistic toy example:

def f(x, y):
"Return (x+y)/y for non-zery y."

if y == 0:  # Body 1: look ahead.
raise ValueError('y cannot be 0')
else:
return (x+y)/y
# or
try:  # Body 2: leap first.
return (x+y)/y
except ZeroDivisionError:
raise ValueError('y cannot be 0') from None

'from e' instead of 'from None' would just add distracting noise.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I agree. I've updated the branches for source deps and cpython. I'll wait for 
Steve's approval before I open a new PR over at cpython-source-deps and update 
GH-18678.

--

___
Python tracker 

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



[issue39682] pathlib.Path objects can be used as context managers

2020-02-28 Thread Antony Lee


Antony Lee  added the comment:

A problem of having this bit of state in paths is that it violates assumptions 
based on immutability/hashability, e.g. with

from pathlib import Path

p = Path("foo")
q = Path("foo")

with p: pass

unique_paths = {p, q}

print(len(unique_paths))  # == 1, as p == q
for path in unique_paths:
print(path.resolve())  # Fails if the path is closed.

The last line fails with `unique_paths = {p, q}` as p has been closed (and 
apparently sets keep the first element when multiple "equal" elements are 
passed in), but not with `unique_paths = {q, p}`.

It would also prevent optimizations based on immutability as proposed in 
https://bugs.python.org/issue39783.

--
nosy: +Antony.Lee

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Ned Deily


Ned Deily  added the comment:

I would prefer to go to 3.31.1 at this point particularly given the track 
record of the SQLite project. It's been released for a month now.  Any 
objections, Steve?

--

___
Python tracker 

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



[issue36516] Python Launcher can not recognize pyw file as Python GUI Script file type correctly.

2020-02-28 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR.

I believe there also used to be a distinction between .py and .pyw files back 
in the distant past of classic MacOS (9 and earlier) and limited support for 
.pyw was carried over into Mac OS X (10).  But most of the references to .pyw 
for macOS have been removed over the years other than, it seems, here in Python 
Launcher.app. There are other more basic concerns with the Launcher app so I 
have been holding off on merging this change for 3.9.  I plan to make a 
decision about its fate by the end of the PyCon sprints in April.

--

___
Python tracker 

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



[issue39789] Update Windows release build machines to latest versions

2020-02-28 Thread Steve Dower


New submission from Steve Dower :

Shouldn't have any impact at all, but I'm going to mention it here so it gets 
in the NEWS file. Just in case someone hits an obscure edge case and is trying 
to find out what changed.

--
assignee: steve.dower
components: Windows
messages: 362931
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Update Windows release build machines to latest versions
versions: 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



[issue39789] Update Windows release build machines to latest versions

2020-02-28 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

You're welcome. If you are ok with that, I'd be happy to prepare a PR for the 
source deps for sqlite3 v3.31.1, and update GH-18678 as soon as it is tagged.

--

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PRs.  If we're going to update now as we should, why not to 
3.31.1 which is current?

--

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Yes, we need the tag for the Windows build, so the PR currently fails the 
Windows checks. (Tagging must be done explicitly by the maintainers, IIRC.) I 
also forgot to add a NEWS entry, so I'll do another push to add those (and kick 
off the CI) when the tag arrives.

--

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith


hwgdb Smith  added the comment:

Sorry, the Gmail web is correctly.

--

___
Python tracker 

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



[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Eric V. Smith


Eric V. Smith  added the comment:

I strongly disagree. Even if I thought it was a good idea (I don't), we'd break 
too much code by making this change now.

--
nosy: +eric.smith

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I'm a bit uncertain if the previous patch can handle the emit() case correctly. 
Proposed improvement in attached patch (0002-Improve-emit.patch).

--
Added file: https://bugs.python.org/file48934/0002-Improve-emit.patch

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith


hwgdb Smith  added the comment:

And i just send a mail to my Gmail. I view it using web, it is incorrectly!

--

___
Python tracker 

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



[issue38380] Update SQLite to 3.30 in Windows and macOS installer builds

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

We still need the tag added to the cpython-source-deps repo, and I still can't 
complete a clone right now (something is strange with SSL to GitHub on my 
(temporary) internet connection).

Zach - can you tag it? https://github.com/python/cpython-source-deps/pull/17

--

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith


hwgdb Smith  added the comment:

https://litmus.com/blog/infographic-the-2019-email-client-market-share

And there is a survey about email client market share. You see outlook is top 3.

--

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


Added file: 
https://bugs.python.org/file48933/0001-bpo-38780-Harden-socket-use-in-logging.handlers.patch

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-02-28 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


Removed file: 
https://bugs.python.org/file48932/0001-bpo-38780-Harden-socket-use-in-logging.handlers.patch

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread hwgdb Smith


hwgdb Smith  added the comment:

I think program's goal is to solve problem, not solve the "standard".

OK, if you insist that "standard" has the Top priority, could you please tell 
me a way to change the default behavior of the new api to use the "=?utf-8?b?" 
parameter style. Is there a function or parameter i can use to achieve this?

If not, i think the best way to solve it is to add a "param style" parameter 
that i can choose which style i use.

And if not, i am sad about this, i had to use the legacy api.

--

___
Python tracker 

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



[issue38780] SysLogHandler crash atexit

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Attached patch is based on Ronald Oussoren's and Alan Robertson's comments: 
Initialise self.socket to None early in __init()__, and then check for None in 
close() and emit(). Passes make test on 3.9, 3.8 and 3.7.

If this solution is ok I'll add a unit test for the case that triggered this 
report and prepare a PR.

--
keywords: +patch
nosy: +erlendaasland
Added file: 
https://bugs.python.org/file48932/0001-bpo-38780-Harden-socket-use-in-logging.handlers.patch

___
Python tracker 

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



[issue39783] Optimize construction of Path from other Paths by just returning the same object?

2020-02-28 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

> Decorating __new__ with lru_cache would likely run into memory leakage 
> problems?

I think the LRU cache would be for returning the same instance when called with 
the same string. I don't think it would be needed to return the same instance 
when called with a Path instance.

> From a quick look it appears to only be settable by using the path (not the 
> actual file) as a context manager, and only serves to block further 
> filesystem methods, but I'm not even sure why?

This came up in bpo-39682 recently, I'm not sure what this flag is supposed to 
mean and I could not find it in the documentation.

Since it's uncorrelated to the file object and the physical file, I think it 
may actually be dangerous to rely on this flag. I don't know why is the purpose 
of using Path as a context manager.

--

___
Python tracker 

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



[issue39788] Exponential notation should return an int if it can

2020-02-28 Thread Marco Sulla


New submission from Marco Sulla :

(venv_3_9) marco@buzz:~/sources/python-frozendict$ python
Python 3.9.0a0 (heads/master-dirty:d8ca2354ed, Oct 30 2019, 20:25:01) 
[GCC 9.2.1 20190909] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 1E9
>>> type(a)


IMHO if the exponent is positive, and the  "base number" (1 in the example) is 
an integer, the result should be an integer.

Optionally, also if the "base number" has a number of decimal places <= the 
exponent, the result should be an integer. Example:

1.25E2 == 125

If the user wants a float, it can write

1.2500E2 == 125.0

--
components: Interpreter Core
messages: 362918
nosy: Marco Sulla
priority: normal
severity: normal
status: open
title: Exponential notation should return an int if it can
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



[issue37708] Harmonize random.choice(s) behavior with random.sample on iterators

2020-02-28 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +18055
pull_request: https://github.com/python/cpython/pull/18694

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 445152e0d3ab6e4381aef8d1404c2c17a516070f by Miss Islington (bot) 
in branch '3.8':
bpo-13790: Change 'string' to 'specification' in format doc (GH-18690)
https://github.com/python/cpython/commit/445152e0d3ab6e4381aef8d1404c2c17a516070f


--

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 5157506e043f75f49caecae1c6afee8517a7bbb0 by Miss Islington (bot) 
in branch '3.7':
bpo-13790: Change 'string' to 'specification' in format doc (GH-18690)
https://github.com/python/cpython/commit/5157506e043f75f49caecae1c6afee8517a7bbb0


--

___
Python tracker 

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



[issue39787] test_ssl and test_urllib2_localnet failing with new OpenSSL

2020-02-28 Thread Matheus Castanho


New submission from Matheus Castanho :

test_ssl and test_urllib2_localnet are failing when Python is built against 
top-of-tree OpenSSL. I'm attaching the output of: `regrtest.py test_ssl 
test_urllib2_localnet -W`

The output is from a powerpc64le machine with Python 3.8.2+ (1bbb81b251bc) and 
OpenSSL master (db943f43a60d1b).

A git bisect showed the problems started with the following OpenSSL commit:

commit db943f43a60d1b5b1277e4b5317e8f288e7a0a3a
Author: Matt Caswell 
Date:   Fri Jan 17 17:39:19 2020 +

Detect EOF while reading in libssl

If we hit an EOF while reading in libssl then we will report an error
back to the application (SSL_ERROR_SYSCALL) but errno will be 0. We add
an error to the stack (which means we instead return SSL_ERROR_SSL) and
therefore give a hint as to what went wrong.

Contains a partial fix for #10880

Reviewed-by: Tomas Mraz 
Reviewed-by: Dmitry Belyavskiy 
(Merged from https://github.com/openssl/openssl/pull/10882)

This also looks similar to: https://bugs.python.org/issue28689

--
assignee: christian.heimes
components: SSL, Tests
files: test-output.txt
messages: 362915
nosy: christian.heimes, mscastanho
priority: normal
severity: normal
status: open
title: test_ssl and test_urllib2_localnet failing with new OpenSSL
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48931/test-output.txt

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18054
pull_request: https://github.com/python/cpython/pull/18693

___
Python tracker 

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken


Change by Pete Wicken :


--
pull_requests: +18053
pull_request: https://github.com/python/cpython/pull/18691

___
Python tracker 

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken


Change by Pete Wicken :


--
pull_requests:  -18050

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +18052
pull_request: https://github.com/python/cpython/pull/18692

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 916895f93905f8b8dad677cceff501833f5a633a by Terry Jan Reedy in 
branch 'master':
bpo-13790: Change 'string' to 'specification' in format doc (GH-18690)
https://github.com/python/cpython/commit/916895f93905f8b8dad677cceff501833f5a633a


--

___
Python tracker 

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



[issue39710] "will be returned as unicode" reminiscent from Python 2

2020-02-28 Thread Pete Wicken


Change by Pete Wicken :


--
nosy: +Wicken
nosy_count: 3.0 -> 4.0
pull_requests: +18050
pull_request: https://github.com/python/cpython/pull/18691

___
Python tracker 

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



[issue36516] Python Launcher can not recognize pyw file as Python GUI Script file type correctly.

2020-02-28 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I might have missed something, but I thought .pyw files were a Windows specific 
thing.

--
nosy: +erlendaasland

___
Python tracker 

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



[issue37266] Daemon threads must be forbidden in subinterpreters

2020-02-28 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Also cc'ing Kyle for the concurrent.futures issue.

--
nosy: +aeros

___
Python tracker 

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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

PR-18690 makes the approved change of 'string' to 'specification'.  After 
merging, I will re-review the other changes in i13790b.diff and possibly make 
another PR for review.

--
versions: +Python 3.9 -Python 2.7, Python 3.6

___
Python tracker 

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



[issue39786] Have the heaps library support max heap

2020-02-28 Thread signing_agreement


New submission from signing_agreement :

For numeric types, I can negate the numeric argument for max heaps, but if I 
have strings, I cannot go about negating them.

--
components: Library (Lib)
messages: 362909
nosy: signing_agreement
priority: normal
severity: normal
status: open
title: Have the heaps library support max heap
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



[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +18049
pull_request: https://github.com/python/cpython/pull/18690

___
Python tracker 

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



[issue28686] py.exe ignored PATH when using python3 shebang

2020-02-28 Thread fireattack


fireattack  added the comment:

Just copy/paste a related issue reported in issue39785:

When run a python script with "#!/usr/bin/python" shebang with py.exe, it will 
always use python2 instead of python3 on Win 10, despite the default being set 
to py3 already (so does the PATH).

According to https://docs.python.org/3/using/windows.html#shebang-lines, 
`#!/usr/bin/python` should use the default python, not just python 2.

--
nosy: +fireattack

___
Python tracker 

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



[issue8824] Improve documentation of exec

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I decided that the alternate addition in #13557 is enough.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
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



[issue39757] EmailMessage bad encoding for international domain

2020-02-28 Thread R. David Murray


R. David Murray  added the comment:

This is not actually a duplicate of 11783.  Rereading (parts of) that issue, we 
decided we currently have no good way to do automatic conversion between 
unicode and internationalized domains, so the user of the library has to do it 
themselves.  This means that the bug *here* is that the new email API is 
*wrongly* encoding the non-ascii in the domain by using an encoded word.  I'm 
surprised at that; I thought I'd guarded against it.

What should be happening here is that an error should be raised when that 
header is set (or possibly when it is accessed/serialized, but when set would 
be better I think) saying that there is non-ascii in the domain part.

--
resolution: duplicate -> 
stage: resolved -> needs patch
status: closed -> open
superseder: email parseaddr and formataddr should be IDNA aware -> 
title: EmailMessage wrong encoding for international domain -> EmailMessage bad 
encoding for international domain

___
Python tracker 

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



[issue14678] Update zipimport to support importlib.invalidate_caches()

2020-02-28 Thread Brett Cannon


Brett Cannon  added the comment:

It looks like it hasn't been done, else 
https://github.com/python/cpython/blob/master/Lib/zipimport.py would have some 
definition of a invalidate_caches() method. And specifically the finder lacks 
that method so it can be called by 
https://github.com/python/cpython/blob/c705fd1e89ccb8f6d414ec817b4616546147d877/Lib/importlib/_bootstrap_external.py#L1245-L1257.

--

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


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



[issue39704] Disable code coverage

2020-02-28 Thread Brett Cannon


Brett Cannon  added the comment:

I don't know if backporting will be needed; probably depends on the CI and 
whether they always pull from master or the branch that was affected. But I 
just tried backporting regardless and there's conflicts, so it will have to be 
done manually.

--

___
Python tracker 

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



[issue39771] EmailMessage.add_header doesn't work

2020-02-28 Thread R. David Murray


R. David Murray  added the comment:

Since Outlook is one of the mailers that generates the non-RFC-compliant 
headers, it doesn't surprise me all that much that it can't interpret the RFC 
compliant headers correctly.

I'm not sure there is anything we can do here.

I suppose someone could do a survey of mail clients and document which ones can 
handle which style of parameter encoding.  If it turns out more handle the 
"wrong" way than handle the "right" way, we could consider adopting to the 
de-facto standard, although I won't like it much :)

(There is also a possibility there is a bug in our RFC compliance, but this is 
the first problem report I've seen.)

--

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset 846ca4961da24669e6e0c901986e66ff485917b2 by Miss Islington (bot) 
in branch '3.8':
bpo-39781: Do not jump when select in IDLE codecontext (GH-18683)
https://github.com/python/cpython/commit/846ca4961da24669e6e0c901986e66ff485917b2


--

___
Python tracker 

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



[issue28686] py.exe ignored PATH when using python3 shebang

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

So we're missing two things to move this forward:

1. A clear specification (and user-facing explanation) of the behaviour of 
py.exe in the presence of all possible shebangs and PATH settings
2. Someone willing to update the code

Given the current behaviour is described in PEP 397, step one probably requires 
a new PEP (unless it turns out to be a single sentence explanation, which so 
far, it has not). I'd be happy to sponsor such a PEP, but I don't feel the need 
for it and so I'm not inclined to write it myself.

Also worth noting is that the Microsoft Store package of Python *does* include 
versioned executables (because we're able to provide them without causing 
excessive clutter on PATH), but it does not include py.exe (because the 
versioning of that would get broken really quickly).

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

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread miss-islington


miss-islington  added the comment:


New changeset f4198aee4c288ce47c5803e87a461e31f81a0138 by Miss Islington (bot) 
in branch '3.7':
bpo-39781: Do not jump when select in IDLE codecontext (GH-18683)
https://github.com/python/cpython/commit/f4198aee4c288ce47c5803e87a461e31f81a0138


--

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This change needs to be discussed first on Python-ideas, and ideally needs a 
PEP (and a sponsor). So you should post it on Python-ideas mailing list or 
discuss.python.org Ideas section.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
Removed message: https://bugs.python.org/msg362898

___
Python tracker 

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



[issue39784] Tuple comprehension

2020-02-28 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

This change needs to be discussed first on Python-ideas, and ideally needs a 
PEP (and a sponsor). So you should post it on Python-ideas mailing list or 
discuss.python.org Ideas section.

--
nosy: +Batuhan Taskaya

___
Python tracker 

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



[issue34274] Python launcher behavior with "#!/usr/bin/env python" shebang

2020-02-28 Thread Steve Dower


Change by Steve Dower :


--
superseder:  -> py.exe ignored PATH when using python3 shebang

___
Python tracker 

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



[issue34274] Python launcher behavior with "#!/usr/bin/env python" shebang

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

This is not strictly a duplicate of issue28686, but it's close enough, so let's 
keep the discussion of changing the original shebang behaviour over on that 
issue.

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



[issue39785] #!/usr/bin/python shebang doesn't use default python (3) on Windows

2020-02-28 Thread Steve Dower


Steve Dower  added the comment:

This is not strictly a duplicate of issue28686, but it's close enough, so let's 
keep the discussion of changing the original shebang behaviour over no that 
issue.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> py.exe ignored PATH when using python3 shebang

___
Python tracker 

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



[issue39785] #!/usr/bin/python shebang doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


fireattack  added the comment:

Interestingly, I can't seem to reproduce this bug on my another Win7 machine 
with similar setup.

--

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +18048
pull_request: https://github.com/python/cpython/pull/18689

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 2.0 -> 3.0
pull_requests: +18047
pull_request: https://github.com/python/cpython/pull/18688

___
Python tracker 

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



[issue39781] IDLE: Do not jump when select in codecontext

2020-02-28 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset c705fd1e89ccb8f6d414ec817b4616546147d877 by Terry Jan Reedy in 
branch 'master':
bpo-39781: Do not jump when select in IDLE codecontext (GH-18683)
https://github.com/python/cpython/commit/c705fd1e89ccb8f6d414ec817b4616546147d877


--

___
Python tracker 

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



[issue39785] #!/usr/bin/python shebang doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


Change by fireattack :


--
title: usr/bin/python doesn't use default python (3) on Windows -> 
#!/usr/bin/python shebang doesn't use default python (3) on Windows

___
Python tracker 

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



[issue39785] usr/bin/python doesn't use default python (3) on Windows

2020-02-28 Thread fireattack


fireattack  added the comment:

I've searched and found some related issue, but none is specific for this. 

For example, Segev Finer mentioned that "[..] "#!/usr/bin/python" which will 
prefer Python 2" in issue 34274 but didn't mention why it would/should.

--

___
Python tracker 

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



  1   2   >