[issue39673] Map errno==ETIME to TimeoutError

2020-05-19 Thread Zackery Spytz


Change by Zackery Spytz :


--
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue39673] Map errno==ETIME to TimeoutError

2020-05-19 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 2.0 -> 3.0
pull_requests: +19538
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20253

___
Python tracker 

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



[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-19 Thread SilentGhost


Change by SilentGhost :


--
components: +Library (Lib)
nosy: +pitrou
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.7

___
Python tracker 

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



[issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw()

2020-05-19 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

I just filed a related issue to this that's also similar to issue 29587:
https://bugs.python.org/issue40694

--

___
Python tracker 

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



[issue40694] gen.throw() with multiple yield froms skips intermediate exceptions

2020-05-19 Thread Chris Jerdonek


New submission from Chris Jerdonek :

Here is another gen.throw() exception chain example similar to the examples in 
issue 29587: https://bugs.python.org/issue29587

def f():
yield

def g():
try:
raise RuntimeError('a')
except Exception as exc:
print(f'handling: {exc!r}')
yield from f()

def h():
try:
raise RuntimeError('b')
except Exception as exc:
print(f'handling: {exc!r}')
yield from g()

gen = h()
gen.send(None)
gen.throw(ValueError)

Output:

handling: RuntimeError('b')
handling: RuntimeError('a')
Traceback (most recent call last):
  File "/.../test.py", line 13, in h
raise RuntimeError('b')
RuntimeError: b

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/.../test.py", line 20, in 
gen.throw(ValueError)
  File "/.../test.py", line 16, in h
yield from g()
  File "/.../test.py", line 9, in g
yield from f()
  File "/.../test.py", line 2, in f
yield
ValueError

The issue is that "RuntimeError: a" is skipped. It should also appear in the 
exception chain.

I believe this has the same root cause as issue 29590: 
https://bugs.python.org/issue29590

--
components: Interpreter Core
messages: 369416
nosy: chris.jerdonek
priority: normal
severity: normal
status: open
title: gen.throw() with multiple yield froms skips intermediate exceptions
versions: Python 3.10

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 12fa658d0565c6c53d25f464f29ef596a0df5e2a by Miss Islington (bot) 
in branch '3.9':
bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)
https://github.com/python/cpython/commit/12fa658d0565c6c53d25f464f29ef596a0df5e2a


--

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 550f30c8f33a2ba844db2ce3da8a897b3e882c9a by karl ding in branch 
'master':
bpo-40291: Mention socket.CAN_J1939 in What's New (GH-20248)
https://github.com/python/cpython/commit/550f30c8f33a2ba844db2ce3da8a897b3e882c9a


--

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19537
pull_request: https://github.com/python/cpython/pull/20249

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread Karl Ding


Karl Ding  added the comment:

Should this be added to the What's New for 3.9? I see a smaller change that 
exposes the CAN_RAW_JOIN_FILTERS constant mentioned.

I've created https://github.com/python/cpython/pull/20248 if this is needed.

--

___
Python tracker 

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



[issue40291] socket library support for CAN_J1939

2020-05-19 Thread Karl Ding


Change by Karl Ding :


--
pull_requests: +19536
pull_request: https://github.com/python/cpython/pull/20248

___
Python tracker 

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



[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-19 Thread Y Ono


Y Ono  added the comment:

It's the same as when executing `os.path.abspath`.

--

___
Python tracker 

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



[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2020-05-19 Thread Irv Kalb


Irv Kalb  added the comment:

If possible, I would like to raise the priority of this issue.  I teach Python 
and I use IDLE every day.  This bug makes using IDLE for teaching extremely 
difficult.

Hopefully new information:

I have just bought a new Mac, which is running Catalina (MacOS 10.15).  I am 
using Python/IDLE 3.7.3, and I am seeing the same issue.  And it does seem to 
behave differently depending on if I created the file(s) on my computer (fails) 
vs downloading files from the internet (opens just fine). 

(For background info, I have used IDLE for years on my older Mac with MacOS 
10.12 without seeing this problem.)

I have my Mac Finder set to open all ".py" files using IDLE.app in the Python 
3.7 folder.

In the Finder, if I select one or more files and double click, each file opens 
in an editor window in IDLE.  But after that, with IDLE still open, double 
clicking on any other .py file is ignored.  I can edit and save any open file, 
but I can no longer open additional files by double clicking in the Finder, or 
by dragging a file to the IDLE icon in my Dock.

Further info:  If I am in IDLE and have an editing window open, then I choose 
to open a different file using File -> Open File, and navigate to another 
Python file, then the open file closes, and the new file opens - even if I have 
not saved any changed in the first file.

I never use the command line.  I just double click on Python files, and want to 
see them open in IDLE.  That's how I teach my students, and I typically have 
multiple small sample files open at the same time.  This bug makes it 
impossible to teach and work this way.

If it would help, I would be happy to create a small movie demonstrating this 
problem.

--
nosy: +IrvKalb

___
Python tracker 

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



[issue40693] pathlib.Path will be broken with os.chdir command.

2020-05-19 Thread Y Ono


New submission from Y Ono :

```
import os
from pathlib import Path

os.chdir(Path(__file__).parent)
print(Path(__file__).absolute())
```
I put the code into a file in `/tmp/test.py`, and execute it from `/tmp/` 
directory like below. Then the output showed `/tmp/scripts/scripts/test.py`.

```
$ python scripts/test.py
/tmp/scripts/scripts/test.py
```


After executing `os.chdir`, pathlib's path handling is completely broken.

--
components: C API
messages: 369410
nosy: Y Ono
priority: normal
severity: normal
status: open
title: pathlib.Path will be broken with os.chdir command.
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



[issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior

2020-05-19 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The parts that are supposed to be stable are the seeding and the output of 
calls to random().  The sessions shown below show that this working as intended.

The downstream algorithms such as randrange() are not protected by the 
reproducibility guarantees.  While we try not to change them unnecessarily, 
they are allowed to change and to generate different sequences.  

At some point in Python 3's history, we changed randrange() so that it often 
gives different results than before.  The reason for the change is that the old 
algorithm wasn't as evenly distributed as it should have been.

-- Sessions showing that the output of random() is stable --

Python 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 16:24:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> import random
>>> random.seed('superman123')
>>> [random.random() for i in range(5)]
[0.6740635277890739, 0.3455289115553195, 0.6883176146073614, 
0.3824266890084288, 0.9839811707434662]

Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> import random
>>> random.seed('superman123', version=1)
>>> [random.random() for i in range(5)]
[0.6740635277890739, 0.3455289115553195, 0.6883176146073614, 
0.3824266890084288, 0.9839811707434662]

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



[issue32309] Implement asyncio.run_in_executor shortcut

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

Note for myself: Python 3.9 release manager (Lukasz) approved adding the 
feature to Python 3.9.0 beta2:
https://github.com/python/cpython/pull/20212#pullrequestreview-414278938

--
nosy: +vstinner
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0509c4547fc95cc32a91ac446a26192c3bfdf157 by Victor Stinner in 
branch 'master':
bpo-40521: Fix update_slot() when INTERN_NAME_STRINGS is not defined (#20246)
https://github.com/python/cpython/commit/0509c4547fc95cc32a91ac446a26192c3bfdf157


--

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.10

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The #if 0 was added by Guido in 43ff8683fe68424b9c179ee4970bb865e11036d6 in 
1998, before the tcl/tk clip fix for Windows.

* Temporarily get rid of the registration of Tcl_Finalize() as a
low-level Python exit handler.  This can attempt to call Python code
at a point that the interpreter and thread state have already been
destroyed, causing a Bus Error.  Given the intended use of
Py_AtExit(), I'm not convinced that it's a good idea to call it
earlier during Python's finalization sequence...  (Although this is
the only use for it in the entire distribution.)

The code has a comment that was part of a multifile svn merge, so author 
unknown.

/* This was not a good idea; through  bindings,
   Tcl_Finalize() may invoke Python code but at that point the
   interpreter and thread state have already been destroyed! */

Calling Tcl_Finalize() within Tk.destroy avoids this as .destroy is called 
while python is running, either explicitly or when the associated window is 
closed.

However, it is possible to have more than 1 Tk instance, either accidentally or 
on purpose*, each with its own .tk, which I presume is the 'associated tcl 
interpreter' instance.  So Tk.destroy may be called more than once and each 
call must not disable other Tk instances.  To test: Create 2 roots and two Tk 
windows, destroy 1.  Does the other window disappear? Does root2.withdraw 
raise? Does adding widgets raise?

If yes, we would either need to count working Tk instances or try calling less 
shutdown stuff.

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19535
pull_request: https://github.com/python/cpython/pull/20247

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Thanks! I think it does.

Also, I see now that using the __qualname__ is better than including the 
object's type for locating the method because you can have cases like 
super().foo() or even--

class A:
def foo(self):
pass

def bar():
pass

A.foo = bar

--

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 6ed37430d31e915103ab5decd14d757eb2d159d5 by Miss Islington (bot) 
in branch '3.9':
bpo-40645: restrict HMAC key len to INT_MAX (GH-20238)
https://github.com/python/cpython/commit/6ed37430d31e915103ab5decd14d757eb2d159d5


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19534
pull_request: https://github.com/python/cpython/pull/20246

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19533
pull_request: https://github.com/python/cpython/pull/20245

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset aca4670ad695d4b01c7880fe3d0af817421945bd by Christian Heimes in 
branch 'master':
bpo-40645: restrict HMAC key len to INT_MAX (GH-20238)
https://github.com/python/cpython/commit/aca4670ad695d4b01c7880fe3d0af817421945bd


--
nosy: +miss-islington

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 059279d8706074489144f6ba8ccc8723e0b85007 by Miss Islington (bot) 
in branch '3.9':
bpo-38870: invalid escape sequence (GH-20240)
https://github.com/python/cpython/commit/059279d8706074489144f6ba8ccc8723e0b85007


--

___
Python tracker 

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



[issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9512ad74b0fcaff023c1ade75313dc8e249aef78 by Victor Stinner in 
branch '3.9':
[3.9] bpo-40514: Remove --with-experimental-isolated-subinterpreters in 3.9 
(GH-20228)
https://github.com/python/cpython/commit/9512ad74b0fcaff023c1ade75313dc8e249aef78


--

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 381ceeaa5980643fa1f958f112f373d7a197e6e8 by Miss Islington (bot) 
in branch '3.8':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/381ceeaa5980643fa1f958f112f373d7a197e6e8


--

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset 67bbb5d4381b6121a4f61ba945c58056e5894846 by Miss Islington (bot) 
in branch '3.7':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/67bbb5d4381b6121a4f61ba945c58056e5894846


--

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset dd74b6fde31aff9aa46c4fc2a830c569764e1b63 by Batuhan Taskaya in 
branch 'master':
bpo-38870: invalid escape sequence (GH-20240)
https://github.com/python/cpython/commit/dd74b6fde31aff9aa46c4fc2a830c569764e1b63


--

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19532
pull_request: https://github.com/python/cpython/pull/20244

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread Steve Dower


Change by Steve Dower :


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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19529
pull_request: https://github.com/python/cpython/pull/20241

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19530
pull_request: https://github.com/python/cpython/pull/20242

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread miss-islington


Change by miss-islington :


--
pull_requests: +19531
pull_request: https://github.com/python/cpython/pull/20243

___
Python tracker 

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



[issue39631] Fix file association MIME type on Windows

2020-05-19 Thread Steve Dower


Steve Dower  added the comment:


New changeset 92327a9913150f5bb55b2727a2c5d50f9b7b6e55 by Steve Dower in branch 
'master':
bpo-39631: Adds NEWS entry (GH-20227)
https://github.com/python/cpython/commit/92327a9913150f5bb55b2727a2c5d50f9b7b6e55


--

___
Python tracker 

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



[issue40684] make install doesn't respect configure --with-platlibdir=lib64

2020-05-19 Thread Ned Deily


Change by Ned Deily :


--
nosy: +ned.deily

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-05-19 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +19528
pull_request: https://github.com/python/cpython/pull/20240

___
Python tracker 

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



[issue40667] [Windows] Add global python and python3 commands

2020-05-19 Thread Steve Dower


Steve Dower  added the comment:

> To avoid this, process() can set a flag based on the image name that prevents 
> calling maybe_handle_shebang(). 

Or the other solution, which is stop treating "usr/bin/env" as "search PATH" - 
I'm sure there's another issue open somewhere saying this is the best approach.

At the same time, one other gap is that this would leave the global Scripts 
folder off of PATH. On one hand, good (for all the same reasons). But on the 
other hand, people legitimately complain about it and we don't yet have a 
workaround.

Since the whole point of this exercise is to minimise complaining, it's looking 
better to just leave people with the devil they know...

--

___
Python tracker 

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



[issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing

2020-05-19 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 4.0 -> 5.0
pull_requests: +19527
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20239

___
Python tracker 

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



[issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior

2020-05-19 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

3.5 and 3.6 are now only accepting security fixes.

Only the stability of random.random is guaranteed across versions, but you are 
calling randrange:

https://docs.python.org/3/library/random.html#notes-on-reproducibility

So I am pretty sure that this will not be considered a bug (unless it is a 
design bug).

Personally I think that the lack of reproducibility of the full range of random 
methods is a rather large annoyance: if you care about reproducibility, 
including doctests, you cannot use anything in the module except random.random, 
but have to write your own implementation (possibly by copying and pasting).

I don't have a good solution for this though.

--
nosy: +steven.daprano
versions:  -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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

After reporting my experiments above, msg369334, I made further failing efforts 
to simulate pasting into another process, as in 3 and 4.  It might be that a 
concrete key event is needed.  So I strongly suspect that the solution for IDLE 
is indeed a tkinter solution, and it seems that patching _tkinter.c is needed.  
(And a solution only for IDLE would not help other tkinter users.)  Please 
continue.

--

___
Python tracker 

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



[issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing

2020-05-19 Thread Asheesh Laroia


New submission from Asheesh Laroia :

Some parts of test_concurrent_futures make sense to run even on Python builds 
where multiprocessing.synchronize is absent. At the moment, 
test_concurrent_futures.py skips all tests in the file if 
multiprocessing.synchronize is missing from the Python build. I have a patch to 
enable more tests, which I'll submit as a GitHub pull request.

The reason I want this patch is while working on CPython on Android, I saw that 
test_concurrent_futures refused to run its test suite, and I became very afraid 
that this meant that asyncio on CPython on Android was doomed. In fact, I was 
afraid for no reason. I want future people porting CPython to be less scared 
than I was. :)

I discovered that the only part of concurrent.futures that requires 
multiprocessing.synchronize is concurrent.futures.ProcessPoolExecutor.

concurrent.futures.ProcessPoolExecutor already has a way to check at runtime if 
it can work on the host system, so this patch leans on that.

This patch fixes a few other tests to skip themselves in the case that 
ProcessPoolExecutor cannot function.

I tested this by building CPython (with my patch) with adding a configure flag 
on macOS:

$ ./configure --with-pydebug --with-openssl=$(brew --prefix openssl) 
ac_cv_posix_semaphores_enabled=no

Why multiprocessing.synchronize is missing
--

multiprocessing.synchronize imports _multiprocessing.SemLock, which is based on 
a libc function called sem_open(), which implements named semaphores, which 
allows the creation of lock-esque counters that can be used from multiple 
processes. multiprocessing.c currently only creates the SemLock property if 
sem_open() is considered "working" through a check in ./configure; I've 
short-circuited that check above to be a "no".

On Android, sem_open() exists but simply returns ENOSYS; see its implementation 
here: 
https://android.googlesource.com/platform/external/pthreads/+/master/sem_open.c

Android isn't the only platform missing sem_open()

Past work
-

issue3770 is an older conversation about a related issue. issue3770 has also 
attracted comments from someone who wants CPython's test suite to run to 
completion on their platform lacking sem_open() and therefore lacking 
multiprocessing.synchronize. This patch should solve their problem, I hope.

Future work
---

Automated testing: In order to prevent regressions, I'm interested in hosting a 
buildbot for at least one year, hopefully in perpetuity, on which we call 
./configure with ac_cv_posix_semaphores_enabled=no.

I'd like to improve the error message when the user imports 
multiprocessing.synchronize so it points at some new documentation text that I 
(or someone) adds to CPython, rather than the issue number. I'm OK taking on 
the work of writing those docs in a follow-up issue if we merge this.

Thanks
--

Thanks to Zachary Ware for discussing this with me in an CPython contributor 
office hours time slot before I filed the issue. Thanks to Dr. Russell 
Keith-Magee, Glyph Lefkowitz, Nathaniel Smith, and Geoffrey Thomas for informal 
conversations and technical research.

--
components: Tests, asyncio
messages: 369393
nosy: asheesh, asvetlov, yselivanov, zach.ware
priority: normal
severity: normal
status: open
title: Adjust test_concurrent_futures to run more of its tests if 
multiprocessing.synchronize is missing
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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Tal Einat


Tal Einat  added the comment:

epaine, if you'd like to create a new PR based on these findings, I'd be happy 
to review it!

--

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Tal Einat


Tal Einat  added the comment:

Indeed, adding a simple _tkinter.destroy() method which invokes Tcl_Finalize, 
and calling it in the Tk.destroy() method, makes copied text remain available 
after closing IDLE!

I did the above to test my hypothesis, but I'm not sure it would be a proper 
fix.

--

___
Python tracker 

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



[issue40691] misleading output from difflib unified_diff

2020-05-19 Thread Chris Danis


New submission from Chris Danis :

When difflib.unified_diff is asked to produce a diff of inputs a.txt and b.txt 
(attached), with 10 context lines, it produces the following:

--- codfw/groupLoadsBySection live
+++ codfw/groupLoadsBySection generated
@@ -90,37 +90,31 @@
 },
 "s4": {
 "api": {
 "db2106": 300,
 "db2110": 100
 },
 "contributions": {
 "db2084:3314": 100,
 "db2091:3314": 100
 },
-"dump": {
-"db2073": 100
-},
-"logpager": {
-"db2084:3314": 100,
-"db2091:3314": 100
-},
-"recentchanges": {
-"db2084:3314": 100,
-"db2091:3314": 100
-},
-"recentchangeslinked": {
-"db2084:3314": 100,
-"db2091:3314": 100
-},
-"vslow": {
-"db2073": 100
+"logpager": {
+"db2084:3314": 100,
+"db2091:3314": 100
+},
+"recentchanges": {
+"db2084:3314": 100,
+"db2091:3314": 100
+},
+"recentchangeslinked": {
+"db2084:3314": 100,
+"db2091:3314": 100
 },
 "watchlist": {
 "db2084:3314": 100,
 "db2091:3314": 100
 }
 },
 "s5": {
 "api": {
 "db2075": 300,
 "db2128": 100


However, this could simply and much more readably be rendered as:

@@ -90,38 +90,32 @@
   },
   "s4": {
 "api": {
   "db2106": 3,
   "db2110": 1
 },
 "contributions": {
   "db2084:3314": 1,
   "db2091:3314": 1
 },
-"dump": {
-  "db2073": 1
-},
 "logpager": {
   "db2084:3314": 1,
   "db2091:3314": 1
 },
 "recentchanges": {
   "db2084:3314": 1,
   "db2091:3314": 1
 },
 "recentchangeslinked": {
   "db2084:3314": 1,
   "db2091:3314": 1
 },
-"vslow": {
-  "db2073": 1
-},
 "watchlist": {
   "db2084:3314": 1,
   "db2091:3314": 1
 }
   },
   "s5": {
 "api": {
   "db2059": 1,
   "db2066": 1
 },

(This is what diff -u10 produces.)

--
components: Library (Lib)
files: a.txt
messages: 369390
nosy: cdanis
priority: normal
severity: normal
status: open
title: misleading output from difflib unified_diff
versions: Python 3.7
Added file: https://bugs.python.org/file49171/a.txt

___
Python tracker 

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



[issue40691] misleading output from difflib unified_diff

2020-05-19 Thread Chris Danis


Change by Chris Danis :


Added file: https://bugs.python.org/file49172/b.txt

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Tal Einat


Tal Einat  added the comment:

During finalization, TkFinalizeThread would call DeleteWindowsExitProc 
(registered via TkCreateThreadExitHandler). This in turn is set as a 
thread-exit handler via Tcl_CreateThreadExitHandler upon the first call to 
TkCreateThreadExitHandler.

Now we're out of Tk and into Tcl itself. TkFinalizeThread would be called by 
Tcl's Tck_FinalizeThread. This, in turn, is called by Tcl_Finalize (for thread 
number zero?). And _tkinter sets an atexit handler to call Tcl_Finalize.

Ah, but no! That handler is actually not set, due to the "#if 0" before it! So 
the Tcl/Tk finalization is actually skipped, causing this issue.

--

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks, Victor!

--

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +19526
pull_request: https://github.com/python/cpython/pull/20238

___
Python tracker 

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



[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-19 Thread Vitalii


Change by Vitalii :


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

___
Python tracker 

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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread Tal Einat


Tal Einat  added the comment:

Indeed, you've got that pretty much correct. The call chain is:

Tk.__init__
_tkinter_create_impl (called as _tkinter.create() from Python)
Tkapp_New

Tkapp_New does a lot of things. In particular, it calls Tcl_CreateInterp and 
later Tcl_AppInit. Tcl_AppInit (apparently a local copy is usually  used!) 
calls Tcl_Init and later Tk_Init.

At this point the call chain enters tcl/tk code. Tk_Init calls Initialize 
(except on cygwin - I'm ignoring this). The inline comment for Initialize says 
"The core of the initialization code for Tk, called from Tk_Init and 
Tk_SafeInit." And at the very end of Initialize, we find the call 
TkCreateThreadExitHandler(DeleteWindowsExitProc, tsdPtr).

--

___
Python tracker 

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



[issue40690] unittest: if FunctionTestCase is imported, the loader loads "tests" from it

2020-05-19 Thread Vitalii


New submission from Vitalii :

In [2]: from unittest import FunctionTestCase   

   

In [3]: loader.loadTestsFromTestCase(FunctionTestCase)  


Out[3]: ]>

In [4]: test = _._tests[0]; test 
Out[4]: 

In [5]: test._testFunc  

  
Out[5]: 'runTest'

In [6]: test._testFunc.__name__ 

  
*** AttributeError: 'str' object has no attribute '__name__'

--
components: Tests
messages: 369386
nosy: pwtail
priority: normal
severity: normal
status: open
title: unittest: if FunctionTestCase is imported, the loader loads "tests" from 
it
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



[issue40667] [Windows] Add global python and python3 commands

2020-05-19 Thread Eryk Sun


Eryk Sun  added the comment:

If .py files are associated with py.exe, handling the shebang "#!/usr/bin/env 
python[3]" might spawn the python[3].exe launcher recursively if it handles 
shebangs (see bpo-40687). To avoid this, process() can set a flag based on the 
image name that prevents calling maybe_handle_shebang(). 

I still think it would be for the best if the python3.exe launcher ran as "py 
-3", and the python.exe launcher ran as "py", based simply on checking the 
image name. Also, I think these two launchers should drop all command-line 
option support, i.e. -h, --help, --list, --list-paths, -0[p], and 
-X[.Y][-32|-64]. This keeps the command-line interface for the "python" command 
consistent across the board. PY_PYTHON3 would set the default for the 
"python3.exe" launcher, and PY_PYTHON would set the default for the 
"python.exe" launcher. For whatever reason, PY_PYTHON could be set to 2 to make 
the python.exe launcher run 2.x. (Even in Ubuntu I install the 
python-is-python3 package, but sadly some people are stuck maintaining 2.x 
code.)

--

___
Python tracker 

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



[issue40689] The only supported minidom attribute iteration (NamedNodeMap) is O(n^2)

2020-05-19 Thread Niels Thykier

New submission from Niels Thykier :

Hi,

The only official supported iteration over all attributes on an element via the 
minidom XML API require an O(n²) iterator.  It happens because the `item` 
method generates a list of all attribute names, look up the attribute name at 
the given index and then throws away the list (only to recompute it on next 
lookup).

There are also a `.values()` method that looks very promising, only it has 
"strings-attached" in the form of the following disclaimer:

"""There are also experimental methods that give this class more mapping 
behavior. [...]"""  
(source: https://docs.python.org/3/library/xml.dom.html)

The word "experimental" makes it hard for me to ask projects to migrate to 
`.values()` because I have to convince them to accept the risk of adopting the 
"unsupported APIs".


For me, any of the following would solve the issue:

 * Bless the mapping based API as supported to the same extend as `item` + 
`length` in the DOM API.

 * Optimize `item` to avoid the performance issue.

 * Provide an alternative (but supported) way of iterating over all attributes. 
 Preferably one that enables you to get the node directly without having to use 
`Element.getAttributeNode()` or similar.



The code in question highlighting the problematic code in the minidom API:

```
class NamedNodeMap(object):

[...]

def item(self, index):
try:
return self[list(self._attrs.keys())[index]]
except IndexError:
return None
```

--
components: XML
messages: 369384
nosy: nthykier
priority: normal
severity: normal
status: open
title: The only supported minidom attribute iteration (NamedNodeMap) is O(n^2)
type: performance
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



[issue40452] Tkinter/IDLE: preserve clipboard on closure

2020-05-19 Thread E. Paine


E. Paine  added the comment:

I'm (sadly) not particularly familiar with C, though I have tried to trace the 
calls of TkClipCleanup. As @taleinat mentioned, it is called by the 
TkCloseDisplay, though, in turn, I believe this method is called by the 
DeleteWindowsExitProc method. The name "DeleteWindowsExitProc" is passed, in 
the Initialize method, to the TkCreateThreadExitHandler method (I assume method 
references work in a similar-enough way to Python?) along with the tsdPtr 
object.

I stopped tracing it at this point, and instead worked from the Python end. The 
Tkapp_New method calls the Tcl_CreateInterp method and I have three questions 
about this (each only applicable depending on the answer to the previous one):
1. Is the Tkapp_New method the correct one to be looking at for tcl/tk 
initialisation (I can't find where _tkinter.create is implemented)?
2. Is there a reason why the call is to tcl rather than tk?
3. Would changing this to tk cause the fix in tk to be applied?

--

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

The attached PR isn't exactly what you requested, but it's a very minimal code 
change that uses the existing __qualname__ functionality to change the message 
to

TypeError: A.foo() takes 1 positional argument but 2 were given

Does that address those problems?

--

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
keywords: +patch
nosy: +Dennis Sweeney
nosy_count: 2.0 -> 3.0
pull_requests: +19523
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20236

___
Python tracker 

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



[issue40688] PEG Generator: Fix scripts to always use the correct parser

2020-05-19 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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

___
Python tracker 

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



[issue40688] PEG Generator: Fix scripts to always use the correct parser

2020-05-19 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

All the scripts in Tools/peg_generator/scripts need to be updated, since they 
mostly assume that ast.parse and compile use the old parser. We can use the 
_peg_parser extension module instead, but it well need some enhancements so 
that it also supports compilation to bytecode.

--
assignee: lys.nikolaou
components: Demos and Tools
messages: 369381
nosy: gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: PEG Generator: Fix scripts to always use the correct parser
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue13248] deprecated in 3.2/3.3, should be removed in 3.5 or ???

2020-05-19 Thread Benjamin Peterson


Change by Benjamin Peterson :


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



[issue27501] Add typing.py class describing a PEP 3118 buffer object

2020-05-19 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue40684] make install doesn't respect configure --with-platlibdir=lib64

2020-05-19 Thread Arfrever Frehtes Taifersar Arahesis


Change by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim

2020-05-19 Thread Steve Dower


Steve Dower  added the comment:

If someone remembers where the other "shebangs on Windows don't make sense" 
issue is, I think we can close this one in favour of that.

Though it's also an important point for issue40667 - if "python.exe" becomes 
the launcher, then this will get stuck in an infinite loop (and process memory 
exhaustion is the worst kind of hang on Windows).

--
versions: +Python 3.10, Python 3.9 -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



[issue40028] Math module method to find prime factors for non-negative int n

2020-05-19 Thread Mark Dickinson


Change by Mark Dickinson :


--
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue40679] show class name in method invocation TypeError

2020-05-19 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim

2020-05-19 Thread Ben Spiller


Change by Ben Spiller :


--
type:  -> behavior

___
Python tracker 

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



[issue32604] [subinterpreters] PEP 554 implementation: add interpreters module

2020-05-19 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:


New changeset 9d17cbf33df7cfb67ca0f37f6463ba5c18676641 by Joannah Nanjekye in 
branch 'master':
bpo-32604: PEP 554 for use in test suite (GH-19985)
https://github.com/python/cpython/commit/9d17cbf33df7cfb67ca0f37f6463ba5c18676641


--

___
Python tracker 

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



[issue40687] Windows py.exe launcher interacts badly with Windows store python.exe shim

2020-05-19 Thread Ben Spiller


New submission from Ben Spiller :

The py.exe launcher doc states "If no relevant options are set, the commands 
python and python2 will use the latest Python 2.x version installed" ... which 
was indeed working reliably until Microsoft added their weird python.exe shim 
(which either terminates with no output or brings up the Microsoft Store page) 
as part of 
https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/

Now, I find scripts that start with "#!/usr/bin/env python" cause py.exe to run 
the Windows python.exe shim which confusingly terminates with no output (unless 
run with no arguments). 

I think to stop lots of developers banging theirs heads against this brick 
wall, py.exe should include some logic to ignore the 
C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe shim, since for 
someone with py.exe installed, running that is _never_ what you'd want. (or 
alternatively, work with Microsoft to get this decision reversed, but that may 
be harder!)

Lots of people are hitting this e.g. 
https://superuser.com/questions/1437590/typing-python-on-windows-10-version-1903-command-prompt-opens-microsoft-stor
 , 
https://stackoverflow.com/questions/57485491/python-python3-executes-in-command-prompt-but-does-not-run-correctly

Here's the output:

py myscript.py
launcher build: 32bit
launcher executable: Console
File 'C:\Users\XXX\AppData\Local\py.ini' non-existent
Using global configuration file 'C:\WINDOWS\py.ini'
Called with command line: apama-build\build.py   -h
maybe_handle_shebang: read 256 bytes
maybe_handle_shebang: BOM not found, using UTF-8
parse_shebang: found command: python
searching PATH for python executable
Python on path: C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe
located python on PATH: 
C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe
run_child: about to run 
'C:\Users\XXX\AppData\Local\Microsoft\WindowsApps\python.exe myscript.py'
child process exit code: 9009

>py -0
Installed Pythons found by py Launcher for Windows
 -3.8-64 *
 -3.7-64
 -3.6-64
 -2.7-64

(nb: was surprising that it didn't run any of those installed versions!)

--
components: Windows
messages: 369379
nosy: benspiller, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows py.exe launcher interacts badly with Windows store python.exe 
shim
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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread Paul Ganssle

Paul Ganssle  added the comment:

No worries Łukasz, I figured it would be worth bringing up because normally the 
releases aren't so broken that they aren't usable in the common case. That 
said, this won't break any *existing* code, it'll just prevent people on Linux 
machines from using zoneinfo.

I don't think waiting 3 weeks is a big deal. I'm planning to release a backport 
soon anyway, and I expect people probably won't adopt new-in-3.9 modules 
without a backport during the beta period *anyway*, since they can't deploy any 
code using that feature to prod.

I'm going to resolve this issue. Thanks for the quick response Łukasz and for 
the quick review Victor!

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

___
Python tracker 

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



[issue37616] [3.10 prep] zip path incorrect

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Interpreter Core
resolution:  -> fixed
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread Łukasz Langa

Łukasz Langa  added the comment:

The beta releases are every three weeks now because of the release schedule 
being adjusted to allow Linux distributions to release the new version in the 
Autumn distributions.

I understand that you're eager to have your feature up and running. I feel like 
shipping the fixed version in beta2 will be sufficient. If we released a 
beta1.5 later in the week, that would be overkill given the already aggressive 
schedule as you'd then have a beta2 two weeks later, no?

--

___
Python tracker 

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



[issue40645] Use OpenSSL's HMAC API

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

Compiler warning on 64-bit Windows:

c:\vstinner\python\3.9\modules\_hashopenssl.c(1427): warning C4244: 'function': 
conversion from 'Py_ssize_t' to 'int', possible loss of data

--
nosy: +vstinner

___
Python tracker 

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



[issue40686] Compiler warnings in _zoneinfo.c on Windows build in 64-bit

2020-05-19 Thread STINNER Victor


New submission from STINNER Victor :

c:\vstinner\python\3.9\modules\_zoneinfo.c(903): warning C4267: '=': conversion 
from 'size_t' to 'unsigned int', possible loss of data 
[C:\vstinner\python\3.9\PCbuild\_ 
zoneinfo.vcxproj]
c:\vstinner\python\3.9\modules\_zoneinfo.c(904): warning C4267: '=': conversion 
from 'size_t' to 'unsigned int', possible loss of data 
[C:\vstinner\python\3.9\PCbuild\_ 
zoneinfo.vcxproj]
c:\vstinner\python\3.9\modules\_zoneinfo.c(1224): warning C4068: unknown pragma 
[C:\vstinner\python\3.9\PCbuild\_zoneinfo.vcxproj]
c:\vstinner\python\3.9\modules\_zoneinfo.c(1225): warning C4068: unknown pragma 
[C:\vstinner\python\3.9\PCbuild\_zoneinfo.vcxproj]
c:\vstinner\python\3.9\modules\_zoneinfo.c(1227): warning C4068: unknown pragma 
[C:\vstinner\python\3.9\PCbuild\_zoneinfo.vcxproj]
c:\vstinner\python\3.9\modules\_zoneinfo.c(1770): warning C4244: '=': 
conversion from 'ssize_t' to 'uint8_t', possible loss of data 
[C:\vstinner\python\3.9\PCbuild\_zon 
einfo.vcxproj]
c:\vstinner\python\3.9\modules\_zoneinfo.c(2408): warning C4028: formal 
parameter 2 different from declaration 
[C:\vstinner\python\3.9\PCbuild\_zoneinfo.vcxproj]

--
components: Build
messages: 369374
nosy: p-ganssle, vstinner
priority: normal
severity: normal
status: open
title: Compiler warnings in _zoneinfo.c on Windows build in 64-bit
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread Paul Ganssle

Paul Ganssle  added the comment:

Victor has confirmed that this is working on Windows, so I think the current 
state of the 3.9 and master branches is now fixed.

The last question remaining is whether this justifies a quick b2 release (or if 
there's another mechanism for a "fixup" release like b1.post0). Łukasz, what do 
you think?

--

___
Python tracker 

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



[issue37616] [3.10 prep] zip path incorrect

2020-05-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 2a561b5f6830aee39cf05dc70c24e26c3558dda0 by Pablo Galindo in 
branch 'master':
bpo-37616: Handle version information more gracefully in getpath.c (GH-20214)
https://github.com/python/cpython/commit/2a561b5f6830aee39cf05dc70c24e26c3558dda0


--

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread miss-islington


miss-islington  added the comment:


New changeset b5bd4358fc2dea2e7c84d0c56974627fc43217cd by Miss Islington (bot) 
in branch '3.9':
bpo-40683: Add zoneinfo to LIBSUBDIRS (GH-20229)
https://github.com/python/cpython/commit/b5bd4358fc2dea2e7c84d0c56974627fc43217cd


--

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread Paul Ganssle


Paul Ganssle  added the comment:


New changeset 2abededbc4165d2daa14ae9d74b1f33cce0593d7 by Paul Ganssle in 
branch 'master':
bpo-40683: Add zoneinfo to LIBSUBDIRS (#20229)
https://github.com/python/cpython/commit/2abededbc4165d2daa14ae9d74b1f33cce0593d7


--

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

We have multiple "install" buildbot which only run tests on the *installed* 
Python. I understand that we missed the issue because not only the 
implementation was broken by "make install", but the whole test was missing as 
well :-p

> Victor: Might be worth updating your notes to indicate that any subdirectory 
> (not just test subdirectories) need to go into LIBSUBDIRS.

Done.

--

___
Python tracker 

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



[issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE

2020-05-19 Thread Michał Górny

Michał Górny  added the comment:

> Can you please propose a different wording? English is not my first language.

Mine neither but I'll try.  How about:

'Name of the platform-specific library directory. It is used to build the path 
of the standard library and C extension modules of the standard library.'

--

___
Python tracker 

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



[issue40685] IDLE not working

2020-05-19 Thread Eric V. Smith


Eric V. Smith  added the comment:

This is almost surely a problem in your environment, and not a bug in python. 
This bug tracker is for reporting bugs in python.

I suggest you look for help elsewhere, such as the python-list mailing list 
(https://mail.python.org/mailman/listinfo/python-list) or the python-tutor 
mailing list (https://mail.python.org/mailman/listinfo/tutor).

But even if this is a bug in python, you've given us no information to use to 
help you. Given what you've told us, how would you expect us to respond? You'll 
need to provide a lot more information before we can even begin to guess what 
problem you're having.

--
nosy: +eric.smith
status: open -> pending

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo or test_zoneinfo

2020-05-19 Thread Paul Ganssle


Paul Ganssle  added the comment:

Victor: Might be worth updating your notes to indicate that any subdirectory 
(not just test subdirectories) need to go into LIBSUBDIRS. zoneinfo uses a 
subdirectory for both the tests and the zoneinfo module, and *neither* were 
included in the installation in this case.

--
title: Beta release does not distribute test_zoneinfo -> Beta release does not 
distribute zoneinfo or test_zoneinfo

___
Python tracker 

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



[issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-40684: make install doesn't respect configure 
--with-platlibdir=lib64.

--

___
Python tracker 

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



[issue40685] IDLE not working

2020-05-19 Thread Code436


New submission from Code436 :

Randomlly Python IDLE doesn't launch (not even the editor)

--
assignee: terry.reedy
components: IDLE
messages: 369364
nosy: Coder436, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE not working
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



[issue40684] make install doesn't respect configure --with-platlibdir=lib64

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

The Fedora package is built using --libdir=/usr/lib64 --with-platlibdir=lib64 
which works around the issue:

+ /builddir/build/BUILD/Python-3.9.0b1/configure 
--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu 
--program-prefix= --disable-dependency-tracking --prefix=/usr 
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc 
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 
--libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib 
--mandir=/usr/share/man --infodir=/usr/share/info --with-platlibdir=lib64 
--enable-ipv6 --enable-shared --with-computed-gotos=yes 
--with-dbmliborder=gdbm:ndbm:bdb --with-system-expat --with-system-ffi 
--enable-loadable-sqlite-extensions --with-dtrace --with-lto 
--with-ssl-default-suites=openssl --with-valgrind --without-ensurepip 
--enable-optimizations

--

___
Python tracker 

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



[issue40684] make install doesn't respect configure --with-platlibdir=lib64

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
versions: +Python 3.10

___
Python tracker 

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



[issue40684] make install doesn't respect configure --with-platlibdir=lib64

2020-05-19 Thread STINNER Victor


New submission from STINNER Victor :

bpo-1294959 added --with-platlibdir option to configure, but "make install" 
doesn't fully respect it. Example:

./configure --prefix /opt/py39b1 --with-platlibdir=lib64
make
make install

I get:

/opt/py39b1/lib/python3.9/lib-dynload/readline.cpython-39-x86_64-linux-gnu.so

whereas Python doesn't use this directory:

$ /opt/py39b1/bin/python3.9 -m site
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
sys.path = [
'/home/vstinner/Python-3.9.0b1',
'/opt/py39b1/lib64/python39.zip',
'/opt/py39b1/lib64/python3.9',
'/opt/py39b1/lib64/lib-dynload',
'/home/vstinner/.local/lib/python3.9/site-packages',
'/opt/py39b1/lib64/python3.9/site-packages',
]
USER_BASE: '/home/vstinner/.local' (exists)
USER_SITE: '/home/vstinner/.local/lib/python3.9/site-packages' (exists)
ENABLE_USER_SITE: True


Python looks into /opt/py39b1/lib64/lib-dynload ("lib64")

make install writes into /opt/py39b1/lib/python3.9/lib-dynload/ ("lib")

--
components: Build
messages: 369362
nosy: vstinner
priority: normal
severity: normal
status: open
title: make install doesn't respect configure --with-platlibdir=lib64
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



[issue1294959] Add sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and SuSE

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
title: Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE -> Add 
sys.platlibdir and configure --with-platlibdir to use /usr/lib64 on Fedora and 
SuSE

___
Python tracker 

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



[issue40683] Beta release does not distribute test_zoneinfo

2020-05-19 Thread Paul Ganssle


Change by Paul Ganssle :


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

___
Python tracker 

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



[issue40683] Beta release does not distribute test_zoneinfo

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
title: Beta release does not distribute zoneinfo -> Beta release does not 
distribute test_zoneinfo

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

FYI my notes about adding new files and directories in Python:
https://pythondev.readthedocs.io/files.html

--
nosy: +vstinner

___
Python tracker 

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



[issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:

> Can we clarify the wording to clearly indicate it's to be used only for 
> Python modules/extensions and not system dynamic libs?

Sure. Can you please propose a different wording? English is not my first 
language.

--

___
Python tracker 

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



[issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior

2020-05-19 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue40683] Beta release does not distribute zoneinfo

2020-05-19 Thread Paul Ganssle


Paul Ganssle  added the comment:

I think I found the problem: these directories are not included in the 
Makefile.pre.in LIBSUBDIRS variable: 
https://github.com/python/cpython/blob/a355a06fcc7ef2232736dceb012ae623335cd7ab/Makefile.pre.in#L1373

PR incoming.

--

___
Python tracker 

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



[issue37790] subprocess.Popen() is sometimes slower in python3 under illumos

2020-05-19 Thread John Levon


John Levon  added the comment:

I checked, and the supposition this is due to lack of closefrom() doesn't seem 
to be correct. Running the test case and looking at 'truss' output, there is no 
large number of close() that one would expect if this was the issue.

I don't see Alexander's 2-time speedup however:

root@piano:/export/src/cpython# /export/python3/bin/python3 ./1.py
11.679689645767212
root@piano:/export/src/cpython# vi 1.p^C
root@piano:/export/src/cpython# /export/python3/bin/python3 ./1.py foo
10.402687549591064
root@piano:/export/src/cpython# python2.7 ./1.py 
10.0434100628

Any difference doesn't seem to be distinguishable from noise on my system.

If I run this:

from __future__ import print_function
import os
import sys
import time

def getoutput(cmd):
# Hand-crafted variant
if len(sys.argv) >1:
import shlex, tempfile
f, fpath = tempfile.mkstemp()
status = os.system("{ " + cmd + "; } >" +
shlex.quote(fpath) + " 2>&1")
with os.fdopen(f, "r") as tfile:
output = tfile.read()
os.unlink(fpath)
if output[-1:] == '\n':
output = output[:-1]
return output
else:
import subprocess
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, 
stderr=None, close_fds=True)
return p.communicate()[0]


t = time.time()
for file in getoutput("find /usr/bin -type f 2>/dev/null").decode().split('\n'):
diff = getoutput("/usr/bin/objdump '%s' 2>/dev/null" % file)


then I get more variation than can be measured by changing close_fds.

Running something similar (no decode()) under python 2.7 is *slower* than 
python3.


So, something other than closefrom() is going on here.

--
title: subprocess.Popen() is extremely slow (with close_fds=True which is the 
default) on Illumos -> subprocess.Popen() is sometimes slower in python3 under 
illumos

___
Python tracker 

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



[issue40683] Beta release does not distribute zoneinfo

2020-05-19 Thread Paul Ganssle


New submission from Paul Ganssle :

Apparently something is wrong with make install for beta 1 and the `zoneinfo` 
module is not installed with it (only _zoneinfo).

When I run a local build `./python -c "import zoneinfo"` works, but when I do 
`make install` I get ImportError:

  $ bin/python3 -c "import zoneinfo"
  Traceback (most recent call last):
File "", line 1, in 
  ModuleNotFoundError: No module named 'zoneinfo'

I assume this wasn't caught earlier because Lib/test/test_zoneinfo is *also* 
not being installed.

The C extension, _zoneinfo, is installed properly. I don't know if it is 
working on Windows.

--
assignee: p-ganssle
messages: 369357
nosy: lukasz.langa, p-ganssle
priority: critical
severity: normal
stage: needs patch
status: open
title: Beta release does not distribute zoneinfo
type: compile error
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



[issue40682] random.Random.seed() with version=1 does not consistently match Python 2 behavior

2020-05-19 Thread Micah R Ledbetter

New submission from Micah R Ledbetter :

When using the random.Random class, using the .seed() method with version=1 
does not always reproduce the same results as the .seed() method did in Python 
2.

>From the docs, I did expect this, but on closer inspection, I can't tell 
>whether I made a bad assumption or whether there is a bug in the module.

The docs state an intention of compatibility with older versions of Python:
https://docs.python.org/3.9/library/random.html#notes-on-reproducibility

> Most of the random module’s algorithms and seeding functions are subject to 
> change across Python versions, but two aspects are guaranteed not to change:
>
> If a new seeding method is added, then a backward compatible seeder will be 
> offered.
>
> The generator’s random() method will continue to produce the same sequence 
> when the compatible seeder is given the same seed.

It's not clear from the docstring in the code whether this is intended to cover 
Python 2.7 behavior:
https://github.com/python/cpython/blob/3.9/Lib/random.py#L134

> For version 2 (the default), all of the bits are used if *a* is a str,
> bytes, or bytearray.  For version 1 (provided for reproducing random
> sequences from older versions of Python), the algorithm for str and
> bytes generates a narrower range of seeds.

But the results I've spot checked sometimes do match the Python 2 results, and 
sometimes are the Python 2 result +1.



I wrote a python script that calls the .seed() method with version=1 under 
Python 3, and without a version= argument under Python 2. It uses a wordlist I 
happen to have in /usr/share/dict that I copied to $PWD.

#!/usr/bin/env python
import os, random, sys
mydir = os.path.dirname(os.path.abspath(__file__))
r = random.Random()
maxidx = None
with open('{}/web2'.format(mydir)) as webdict:
  for idx, raw_word in enumerate(webdict.readlines()):
word = raw_word.strip()
if sys.version_info[0] == 2:
  r.seed(word)
elif sys.version_info[0] == 3:
  r.seed(word, version=1)
else:
  raise Exception("Unexpected python version")
print("{}: {}".format(word, r.randrange(0, 65535, 1)))
if maxidx != None and idx >= maxidx:
  break



I also wrote a shell script to run my Python script with the Python versions I 
happen to have installed locally, along with Python 2.7 and 3.4-3.9 in the 
ci-image Docker container linked from the Python download page.

#!/bin/sh
set -eux
mkdir -p results
/usr/bin/python test.py > results/macos10.15.4.system.python2.7.16
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 test.py > 
results/macos10.15.4.system.python3.8.2
docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh 
-c 'python3.9 /testpy/test.py > /testpy/results/ci-image.python3.9'
docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh 
-c 'python3.8 /testpy/test.py > /testpy/results/ci-image.python3.8'
docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh 
-c 'python3.7 /testpy/test.py > /testpy/results/ci-image.python3.7'
docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh 
-c 'python3.6 /testpy/test.py > /testpy/results/ci-image.python3.6'
docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh 
-c 'python3.5 /testpy/test.py > /testpy/results/ci-image.python3.5'
docker run -v $PWD:/testpy:rw -u root -it --rm quay.io/python-devs/ci-image sh 
-c 'python2.7 /testpy/test.py > /testpy/results/ci-image.python2.7'



I've made a github repo that contains both scripts and the results:
https://github.com/mrled/random-Random-seed-version-testing

I ran the script on my Mac, which means I used the system installed Python 
binaries that came with macOS x86_64, but the ci-image Python versions are 
running under an x86_64 Linux virtual machine (because of how Docker for Mac 
works).
 
To summarize the results:

* The Python 2.7 on my Mac works the same as the Python 2.7 on the ci-image
* The Python 3.8 on my Mac works the same as Pythons 3.5-3.9 on the ci-image
* Python 3.4 is different from both (although it is now unsupported anyway)

A sample of the results. I haven't programmatically analyzed them, but from my 
spot checks, they all appear to be like this:

> head results.ci-image.python2.7  |  > head results.ci-image.python3.9
A: 8866|  A: 8867
a: 56458   |  a: 56459
aa: 29724  |  aa: 29724
aal: 11248 |  aal: 11248
aalii: 16623   |  aalii: 16623
aam: 62302 |  aam: 62303
Aani: 31381|  Aani: 31381
aardvark: 6397 |  aardvark: 6397
aardwolf: 32525|  aardwolf: 32526
Aaron: 32019   |  Aaron: 32019

--
components: Library (Lib)
messages: 369356
nosy: mrled
priority: normal
severity: normal
status: open
title: random.Random.seed() with 

[issue40668] Catastrophic loss of precision in colorsys module

2020-05-19 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is correct. Colorspaces for RGB an YIQ are different. Not all RGB colors can 
be represented in YIQ and vice versa. For YIQ color (0, 1, 0) you need RGB 
color (0.9468822170900693, -0.27478764629897834, -1.1085450346420322), but the 
G and B components are out of the range [0, 1]. So yiq_to_rgb() returns the 
closes RGB color to the original code, and it is (0.9468822170900693, 0, 0). It 
is the best that you can get.

--

___
Python tracker 

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



[issue1294959] Add sys.platlibdir to use /usr/lib64 on Fedora and SuSE

2020-05-19 Thread Michał Górny

Michał Górny  added the comment:

Can we clarify the wording to clearly indicate it's to be used only for Python 
modules/extensions and not system dynamic libs?

--

___
Python tracker 

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



[issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19519
pull_request: https://github.com/python/cpython/pull/20228

___
Python tracker 

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



  1   2   >