[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-10-29 Thread Zac Hatfield-Dodds


Zac Hatfield-Dodds  added the comment:

Unfortunately I'm overcommitted for the next few weeks-months :-/

--

___
Python tracker 

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



[issue40255] Fixing Copy on Writes from reference counting

2020-10-29 Thread Inada Naoki


Inada Naoki  added the comment:

>> Fast shutdown option
>
> You can use os._exit(0).

Yes. Instagram use it as `atexit.register(os._exit, 0)`.

https://instagram-engineering.com/dismissing-python-garbage-collection-at-instagram-4dca40b29172

I think this hack can be supported in multiprocessing module in some way.

--

___
Python tracker 

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



[issue42160] unnecessary overhead in tempfile

2020-10-29 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 8e409cebad42032bb7d0f2cadd8b1e36081d98af by Eric W in branch 
'master':
bpo-42160: tempfile: Reduce overhead of pid check. (GH-22997)
https://github.com/python/cpython/commit/8e409cebad42032bb7d0f2cadd8b1e36081d98af


--
nosy: +methane

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread jason matthews


jason matthews  added the comment:

Please do not drop support. 

Python is widely used in the "Solaris" community with most people downloading 
packages from Openindiana/Hipster or Joyent/SmartOS repos. Most "Solaris" users 
are not using Solaris proper.

The download stats published in this ticket is not a good representation of 
usage. Similarly most (Free|Open|*)BSD users install from their respective 
versions of ports.

--
nosy: +jm650

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset a39068bf48766e5520e175eae8cda33531e16039 by Miss Skeleton (bot) 
in branch '3.9':
bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)
https://github.com/python/cpython/commit/a39068bf48766e5520e175eae8cda33531e16039


--

___
Python tracker 

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



[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-10-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

Good find! I see that typing.Callable has adopted this structure precisely to 
enable caching.

We should see if we can fix _collections_abc.Callable. It's still early in the 
life of 3.9 so I think this is reasonable.

We'll need a subclass of GenericAlias so that the repr() of Callable[[int, 
int], int] still comes out correctly. This is similar to how typing.Callable 
solves it.

Do you feel up to submitting a PR for this? Otherwise maybe Batuhan feels like 
contributing a fix for this?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21952
pull_request: https://github.com/python/cpython/pull/23033

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset 9129af6050b747f288baa9d4e7d43031647ed222 by kj in branch 'master':
bpo-42198: Link to GenericAlias in typing and expressions (GH-23030)
https://github.com/python/cpython/commit/9129af6050b747f288baa9d4e7d43031647ed222


--
nosy: +miss-islington

___
Python tracker 

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



[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-29 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm not an expert on singledispatch. It seems the get_type_hints() call is 
present in 3.8 as well.

Could you investigate and find a root cause? Then maybe we can fix it. (If you 
come up with a PR that would be very much appreciated.)

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



[issue42173] Drop Solaris support

2020-10-29 Thread Robert D. French


Robert D. French  added the comment:

Hello! I just want to lend my voice in favor of maintaining "Solarish" support 
as well, and offer what help I may for resolving issues.

--
nosy: +robertdfrench

___
Python tracker 

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



[issue41699] Potential memory leak with asyncio and run_in_executor

2020-10-29 Thread Kyle Stanley


Kyle Stanley  added the comment:

> Regularly calling executor.shutdown() and then instantiating a new 
> ThreadPoolExecutor in order to run an asyncio program does not seem like a 
> good API to me.

Clarification: you're typically only supposed to instantiate a single 
ThreadPoolExecutor or ProcessPoolExecutor per program (sometimes one of each 
depending on use case), and continuously submit jobs to it rather than creating 
multiple executor instances. Otherwise, it's generally unneeded overhead.

(I'll take a look at the other parts once I find the time, just wanted to 
briefly mention the above in the meantime.)

--

___
Python tracker 

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



[issue42200] Support TLS 1.3 half-closed connections

2020-10-29 Thread Dima Tisnek


New submission from Dima Tisnek :

(apologies if this was raised before, I couldn't find it in bugs, mailing lists 
or discourse).
(also apologies if I misunderstood something about the protocol)

Up to an including TLS 1.2, a single close notify terminates both upstream and 
downstream; Starting with TLS 1.3 there are separate close notify alerts for 
upstream and downstream.

This means that it's possible to have a TLS connection in half-closed state, 
e.g. to send "GET / HTTP xx; close notify" and then wait for the server 
response.

Today, that's not possible, at least in asyncio, as evidenced by 
https://bugs.python.org/issue39951 
(I did not check synchronous wrapped sockets)

--
assignee: christian.heimes
components: SSL
messages: 379908
nosy: Dima.Tisnek, christian.heimes
priority: normal
severity: normal
status: open
title: Support TLS 1.3 half-closed connections
type: enhancement
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



[issue41699] Potential memory leak with asyncio and run_in_executor

2020-10-29 Thread Sophia Wisdom


Sophia Wisdom  added the comment:

While not calling executor.shutdown() may leave some resources still used, it 
should be small and fixed. Regularly calling executor.shutdown() and then 
instantiating a new ThreadPoolExecutor in order to run an asyncio program does 
not seem like a good API to me.

You mention there appear to be both an event loop and a futures leak -- I think 
I have a good test case for the futures, without using threads at all. This 
seems to be leaking `future._result`s somehow even though their __del__ is 
called.

```
import asyncio
from concurrent.futures import Executor, Future
import gc

result_gcs = 0
suture_gcs = 0

class ResultHolder:
def __init__(self, mem_size):
self.mem = list(range(mem_size)) # so we can see the leak

def __del__(self):
global result_gcs
result_gc += 1

class Suture(Future):
   def __del__(self):
   global suture_gcs
   suture_gcs += 1

class SimpleExecutor(Executor):
def submit(self, fn):
future = Suture()
future.set_result(ResultHolder(1000))
return future

async def function():
loop = asyncio.get_running_loop()
for i in range(1):
loop.run_in_executor(SimpleExecutor(), lambda x:x)

def run():
asyncio.run(function())
print(suture_gcs, result_gcs)
```
10MB

```
> run()
1 1
```
100MB

Both result_gcs and suture_gcs are 1 every time. My best guess for why this 
would happen (for me it doesn't seem to happen without the 
loop.run_in_executor) is the conversion from a concurrent.Future to an 
asyncio.Future, which involves callbacks to check on the result, but that 
doesn't make sense, because the result itself has __del__ called on it but 
somehow it doesn't free the memory!

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread brett


brett  added the comment:

Between SmartOS, Illumos, and mainline Solaris, there is ample interest and 
support for ensuring that SunOS derivatives remain 1st class python platforms.

Platform genocide is both unnecessary and unwarranted.

--
nosy: +brett3

___
Python tracker 

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



[issue41699] Potential memory leak with asyncio and run_in_executor

2020-10-29 Thread Kyle Stanley


Kyle Stanley  added the comment:

Also note that the difference in memory is much higher when an exception occurs 
(presumably because the exception is stored on future._exception and not 
cleaned up?):
```
[aeros:~/repos/cpython]$ ./python 
~/programming/python/asyncio_run_in_exec_leak.py -n=1 --asyncio
start RSS memory:
VmRSS: 16976 kB
after 10_000 iterations of 1 element lists:
VmRSS: 64132 kB
```

--

___
Python tracker 

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



[issue37355] SSLSocket.read does a GIL round-trip for every 16KB TLS record

2020-10-29 Thread Dima Tisnek


Dima Tisnek  added the comment:

Amazing! Would you consider making a pull request out of your branch?

re: `PyErr_HasSignals` is a notable addition to the cpython API, it may need 
discussion, and (imo) documentation.

--
nosy: +Dima.Tisnek

___
Python tracker 

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



[issue41699] Potential memory leak with asyncio and run_in_executor

2020-10-29 Thread Kyle Stanley


Kyle Stanley  added the comment:

In the snippet provided, at least part of the resources are not finalized 
because executor.shutdown() was not called in the program (which should be done 
when creating a local instance of the executors, either explicitly or using the 
context manager). For the event loop's default threadpool (used w/ 
loop.run_in_executor(None, ...), I added a coroutine function 
loop.shutdown_default_executor() in 3.9+ handles this (called in asyncio.run()).

Without ever calling executor.shutdown(), the worker threads/processes and 
their associated resources are not finalized until interpreter shutdown. 
There's also some additional finalization that occurs in `_python_exit()` for 
both TPE and PPE (see 
https://github.com/python/cpython/blob/3317466061509c83dce257caab3661d52571cab1/Lib/concurrent/futures/thread.py#L23
 or 
https://github.com/python/cpython/blob/3317466061509c83dce257caab3661d52571cab1/Lib/concurrent/futures/process.py#L87),
 which is called just before all non-daemon threads are joined just before 
interpreter shutdown occurs.

However, even considering the above, there still seems to be a significant 
additional difference in RSS compared to using ThreadPoolExecutor vs 
loop.run_in_executor() that I can't seem to account for (before and after 
asyncio.run()):

```
import asyncio
import concurrent.futures as cf
import os
import gc
import argparse

from concurrent.futures.thread import _python_exit

def leaker(n):
list(range(n))

def func_TPE(n):
with cf.ThreadPoolExecutor() as executor:
for i in range(10_000):
executor.submit(leaker, n)

async def func_run_in_executor(n):
loop = asyncio.get_running_loop()
for i in range(10_000):
loop.run_in_executor(None, leaker, n)

def display_rss():
os.system(f"grep ^VmRSS /proc/{os.getpid()}/status")

def main(n=100, asyncio_=False):
try:
if asyncio_:
asyncio.run(func_run_in_executor(n))
else:
func_TPE(n)
finally:
_python_exit()
gc.collect()
print(f"after 10_000 iterations of {n} element lists:")
display_rss()

if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-n", type=int, default=100)
parser.add_argument("--asyncio", action=argparse.BooleanOptionalAction)

print("start RSS memory:")
display_rss()

args = parser.parse_args()
main(args.n, args.asyncio)
```
Results (on latest commit to master, 3.10):
asyncio -
```
[aeros:~/repos/cpython]$ ./python 
~/programming/python/asyncio_run_in_exec_leak.py -n=1 --asyncio
start RSS memory:
VmRSS: 16948 kB
after 10_000 iterations of 1 element lists:
VmRSS: 27080 kB
```
concurrent.futures -
```
[aeros:~/repos/cpython]$ ./python 
~/programming/python/asyncio_run_in_exec_leak.py -n=1 --no-asyncio
start RSS memory:
VmRSS: 17024 kB
after 10_000 iterations of 1 element lists:
VmRSS: 19572 kB
```
When using await before loop.run_in_executor(), the results are more similar to 
using ThreadPoolExecutor directly:
```
[aeros:~/repos/cpython]$ ./python 
~/programming/python/asyncio_run_in_exec_leak.py -n=1 --asyncio  
start RSS memory:
VmRSS: 16940 kB
after 10_000 iterations of 1 element lists:
VmRSS: 17756 kB
```
However, as mentioned by the OP, if stored in a container and awaited later 
(such as w/ asyncio.gather()), a substantial memory difference is present 
(increases with list size):
```
[aeros:~/repos/cpython]$ ./python 
~/programming/python/asyncio_run_in_exec_leak.py -n=1 --asyncio
start RSS memory:
VmRSS: 16980 kB
after 10_000 iterations of 1 element lists:
VmRSS: 29744 kB
```

Based on the above results, I think there may be a smaller leak occurring in 
concurrent.futures (potentially related to the linked bpo-41588) and a bit of a 
larger leak occurring in loop.run_in_executor(). So they can remain as separate 
issues IMO.

At the moment, my best guess is that there's some memory leak that occurs from 
the future not being fully cleaned up, but I'm not certain about that. This 
will likely require some further investigation.

Input from Yury and/or Andrew would definitely be appreciated. Is there 
something that I'm potentially missing here?

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Alan Coopersmith


Change by Alan Coopersmith :


--
nosy: +alanc

___
Python tracker 

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



[issue39951] Ignore specific errors when closing ssl connections

2020-10-29 Thread Dima Tisnek

Dima Tisnek  added the comment:

https://bugs.python.org/issue39953 has landed and the errors are now more 
sensible:
(that patch was not backported to 3.7, because it's not a security issue).

Python 3.7.8 [SSL: KRB5_S_INIT] application data after close notify
Python 3.8.5 [SSL: APPLICATION_DATA_AFTER_CLOSE_NOTIFY] application data after 
close notify
Python 3.9.0 [SSL: APPLICATION_DATA_AFTER_CLOSE_NOTIFY] application data after 
close notify
Python 3.10.0a1 [SSL: APPLICATION_DATA_AFTER_CLOSE_NOTIFY] application data 
after close notify

I guess I shall work on a patch to ignore this specific error when closing the 
connection.

I would appreciate guidance on half-closed state that, it seems, is possible 
since TLS 1.3 樂

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Peter Firmstone


Peter Firmstone  added the comment:

No, please continue supporting Illumos, I'm still using it.  Illumos is still 
relevant on servers.

--
nosy: +pfirmsto

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread hajma


hajma  added the comment:

Like OmniOS, Oracle Solaris provides the 'six' (and many other) module 
prepackaged.
You can review a clone of the development repository at
https://github.com/oracle/solaris-userland/tree/master/components/python/six

--
nosy: +tropikha...@gmail.com

___
Python tracker 

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



[issue42188] forkserver not reused in child processes

2020-10-29 Thread Colin


Change by Colin :


Added file: https://bugs.python.org/file49549/test.py

___
Python tracker 

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



[issue42188] forkserver not reused in child processes

2020-10-29 Thread Colin


Change by Colin :


Removed file: https://bugs.python.org/file49547/test.py

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Andy Fiddaman


Andy Fiddaman  added the comment:

Re: Downloads

OmniOS makes modules like 'six' available through its own IPS packaging system 
(which is written in Python) so installations won't show up pypi stats.

six is a core module on the platform so it is installed on 1000s of OmniOS 
machines (and then large numbers of SmartOS, OpenIndiana and tribblix ones too 
- all using the SunOS tag). The numbers aren't going to be in the same league 
as other platforms but the downloads stats definitely don't represent the 
illumos installation base and dependency on Python.

--

___
Python tracker 

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



[issue42061] Document __format__ method for IPv[46]Address

2020-10-29 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thanks for the contribution, @John-Ted!

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



[issue42173] Drop Solaris support

2020-10-29 Thread Andy Fiddaman


Andy Fiddaman  added the comment:

We at OmniOS (an illumos distribution) are in the process of upgrading to 
Python 3.9 and working on getting tests clean. We're in pretty good shape with 
a few local patches and only having to skip a few tests at the moment, and most 
of those patches should be suitable for integrating generally.

Some of the tests just need adjusting to be aware of the different platform 
(e.g. illumos does not support multiple SCM_RIGHTS messages in a single 
packet), some still need investigating to find the root cause, but the list is 
small.

--
nosy: +omnios

___
Python tracker 

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



[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-29 Thread Ryan Sobol


Ryan Sobol  added the comment:

It's worth pointing out that a similar error is produced for a 
forward-referenced return type of a registered method, but only for python3.9. 
For example:

from __future__ import annotations
from functools import singledispatchmethod


class Integer:
def __init__(self, value: int):
self.value = value

def __str__(self) -> str:
return str(self.value)

@singledispatchmethod
def add(self, other: object) -> Integer:
raise NotImplementedError(f"Unsupported type {type(other)}")

@add.register
def _(self, other: int) -> "Integer":
return Integer(self.value + other)


print(Integer(2).add(40))

This code runs without error in python3.8, and I am using this technique in 
code running in a production environment.

$ python3.8 --version
Python 3.8.6
$ python3.8 integer.py
42

However, this code throws a NameError in python3.9.

$ python3.9 --version
Python 3.9.0
$ python3.9 integer.py
Traceback (most recent call last):
  File "/Users/ryansobol/Downloads/integer.py", line 5, in 
class Integer:
  File "/Users/ryansobol/Downloads/integer.py", line 17, in Integer
def _(self, other: int) -> "Integer":
  File 
"/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py",
 line 909, in register
return self.dispatcher.register(cls, func=method)
  File 
"/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py",
 line 860, in register
argname, cls = next(iter(get_type_hints(func).items()))
  File 
"/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py",
 line 1386, in get_type_hints
value = _eval_type(value, globalns, localns)
  File 
"/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py",
 line 254, in _eval_type
return t._evaluate(globalns, localns, recursive_guard)
  File 
"/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py",
 line 497, in _evaluate
self.__forward_value__ = _eval_type(
  File 
"/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py",
 line 254, in _eval_type
return t._evaluate(globalns, localns, recursive_guard)
  File 
"/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py",
 line 493, in _evaluate
eval(self.__forward_code__, globalns, localns),
  File "", line 1, in 
NameError: name 'Integer' is not defined

I know that some may see this issue as a feature request for 3.10+. However, 
for me, it is a bug preventing my code from migrating to 3.9.

--
nosy: +ryansobol

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Joshua M. Clulow


Joshua M. Clulow  added the comment:

Hi!  I'm a member of the illumos core team, and I'm also pretty keen for us to 
keep Python support!  Some of our core OS build and packaging tooling is 
written in Python, and certainly applications like Synapse (Matrix) and Review 
Board are important to myself.

We currently provide a virtual machine for builds to the Go project that is 
wired in to their official CI/CD.  I expect we can help out with a similar 
thing here!

I know some illumos distributions (OmniOS, OpenIndiana, anything with pkgsrc, 
etc) are maintaining some patches against the stock Python to fix failing 
tests, etc.  Hopefully we can figure out how to get those things upstreamed and 
increase our participation there.

--
nosy: +jclulow

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

I am using Python 3.8 installed via pkgsrc in SmartOS with some Zones running 
Python 3.9 self compiled code.

More about the downloads stats:

4% packages in windows: I am pretty sure that most windows programmers install 
packages via conda-like tools. Surely there is more that 4% of python 
programmers on windows, even more in machine learning and data science areas, 
where windows and MacOS X rule (apparently being only 7% of PIP downloads).

Even if the PIP download stats would reflect penetration, Solaris is ahead of 
NetBSD and OpenBSD together.

--

___
Python tracker 

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



[issue42061] Document __format__ method for IPv[46]Address

2020-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset b626d2218c03127502025ccdf93d555e0487ea95 by Miss Skeleton (bot) 
in branch '3.9':
bpo-42061: Document __format__ for IP addresses (GH-23018)
https://github.com/python/cpython/commit/b626d2218c03127502025ccdf93d555e0487ea95


--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

I think Solaris Support is still important and I could invest more time on it.

About package downloads:

1. I routinely download packages in my laptop (Linux) and distribute them to a 
fleet of servers (Linux and Solaris) via ansible and similar. Many servers in 
intranets don't install packages directly via PIP.

2. Under OmniOS or SmartOS (Illumos distributions), many people use the system 
package manager to install Python packages, not "PIP". For instance, 
http://netbsd.2816.n7.nabble.com/WIP-commit-Upgrade-to-Mailman-2-1-34-td427426.html.

Buildbots: I used to manage a buildbot with OpenIndiana, but it didn't survived 
the GITHUB migration. I could provide now a SmartOS buildbot.

As a core developer, I do care about Solaris. I fully realize I have been quite 
inactive since the github migration. My fault. I could devote more time to the 
task.

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Ondřej Súkup

Ondřej Súkup  added the comment:

Oracle moved solaris 11.4 to +- rolling release mode, last SRU is 26 from 
20.10.2020 with month release cadence.

On another side, almost all informations are behind the Oracle paywall

--
nosy: +mimi.vx

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Sebastian Wiedenroth


Sebastian Wiedenroth  added the comment:

> Which Python version do you use?

Myself currently mostly python 3.8 via pkgsrc on SmartOS (one of the illumos 
distributions).

OmniOS ships 3.7: 
https://github.com/omniosorg/omnios-build/tree/master/build/python37

OpenIndiana ships at least 2.7, 3.5, 3.7.

The illumos build process also depends on python and was updated to support 3.9 
two weeks ago: https://www.illumos.org/issues/13217

--

___
Python tracker 

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



[issue42061] Document __format__ method for IPv[46]Address

2020-10-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21951
pull_request: https://github.com/python/cpython/pull/23032

___
Python tracker 

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



[issue42061] Document __format__ method for IPv[46]Address

2020-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset 3317466061509c83dce257caab3661d52571cab1 by Teugea Ioan-Teodor in 
branch 'master':
bpo-42061: Document __format__ for IP addresses (GH-23018)
https://github.com/python/cpython/commit/3317466061509c83dce257caab3661d52571cab1


--
nosy: +miss-islington

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

> We (illumos) share the same uname "SunOS" and depend on this support.

Which Python version do you use?

https://blogs.oracle.com/solaris/future-of-python-on-solaris mentions Python 
2.7 and 3.4.

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

I looked at PyPI download statistics of the "six" module over the last 180 days 
(6 months), grouped by operating system name:

* SunOS: 3,975 downloads
* TOTAL: 590,727,298 downloads

SunOS is 0.0007% of all six downloads.

For comparison, the top 4 is:

* Linux: 91% (535,804,817)
* Windows: 4% (21,053,173)
* : 3% (18,695,360)
* macOS (Darwin): 3% (14,776,993)

Raw data of the top 14:

num_downloads,system_name
535804817,Linux
21053173,Windows
18695360,
14776993,Darwin
347090,FreeBSD
9759,Qnx
5350,Java
3975,SunOS
3178,CYGWIN_NT-10.0-14393
3177,CYGWIN_NT-10.0-17763
2505,CYGWIN_NT-10.0-18363
2263,AIX
2061,NetBSD
1891,OpenBSD

--

___
Python tracker 

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



[issue42173] Drop Solaris support

2020-10-29 Thread Sebastian Wiedenroth


Sebastian Wiedenroth  added the comment:

Please don't.

Even if Oracle doesn't care anymore, the open source illumos community does.
We (illumos) share the same uname "SunOS" and depend on this support.

I have offered to host an illumos buildbot in the past and that offer is still 
valid.
At that time the testsuite did not pass and I could not figure out the fix yet.
If having this fixed is a requirement to keep illumos supported I will invest 
more time into this. I can also offer shell access to anyone interested in 
helping with this.

--
nosy: +wiedi

___
Python tracker 

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



[issue42199] bytecode_helper assertNotInBytecode fails too eagerly

2020-10-29 Thread Maxwell Bernstein


Change by Maxwell Bernstein :


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

___
Python tracker 

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



[issue42199] bytecode_helper assertNotInBytecode fails too eagerly

2020-10-29 Thread Maxwell Bernstein


New submission from Maxwell Bernstein :

assertNotInBytecode should only fail if:

* the instr matches and the arg is unspecified, or
* the instr matches, the arg is specified, and the arg matches

But right now it fails in a third case because of the dangling self.fail() 
call. The self.fail() call should be moved into the `if`/`elif`.

--
components: Tests
messages: 379885
nosy: tekknolagi
priority: normal
severity: normal
status: open
title: bytecode_helper assertNotInBytecode fails too eagerly
versions: Python 3.10, 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



[issue42197] Disable automatic update of frame locals during tracing

2020-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue41588] Potential Memory leak with concurrent.futures.ThreadPoolExecutor's map

2020-10-29 Thread Kyle Stanley


Change by Kyle Stanley :


--
nosy: +aeros, bquinlan, pitrou

___
Python tracker 

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



[issue41699] Potential memory leak with asyncio and run_in_executor

2020-10-29 Thread Sophia Wisdom


Sophia Wisdom  added the comment:

It looks like it's not specific to the ThreadPoolExecutor.

```
import asyncio
import concurrent

def leaker_func():
list(range(int(1000)))
# removed 1/0 because this causes issues with the ProcessPoolExecutor

async def function():
loop = asyncio.get_running_loop()
for i in range(1):
loop.run_in_executor(concurrent.futures.ProcessPoolExecutor(), 
leaker_func)
```
10MB at this point

then after executing this:
```
asyncio.run(function())
```
40MB. (~same as ThreadPoolExecutor in python3.10)

--

___
Python tracker 

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



[issue42180] Missing a plural in library/functions

2020-10-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue42180] Missing a plural in library/functions

2020-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b76a8400217827e604ebb543f45156f3caacd9a0 by Rafael Fontenelle in 
branch 'master':
bpo-42180: fix plural in arguments and control (GH-23015)
https://github.com/python/cpython/commit/b76a8400217827e604ebb543f45156f3caacd9a0


--
nosy: +pablogsal

___
Python tracker 

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



[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-29 Thread Steve Dower


Steve Dower  added the comment:

Unfortunately, this is deliberate, or at least deliberate enough to not 
consider it a bug.

The installer from python.org is intended to only support a single install 
per-machine.

In general, if you simply copy the installation folder to a new location it 
will be isolated from the first. However, there are some circumstances where 
this is not the case (unless you take additional steps to isolate it, such as 
adding a ._pth file).

If you can share a bit more about what you're trying to achieve, we may be able 
to suggest an alternative approach. Otherwise, you may need to find another 
distribution/installer of CPython.

--
type: behavior -> enhancement

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +21949
pull_request: https://github.com/python/cpython/pull/23030

___
Python tracker 

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



[issue42191] lib.argparse._check_value() using repr instead of str

2020-10-29 Thread paul j3


paul j3  added the comment:

Do you realize that `choices` can be a dictionary?  And since you want the user 
to supply a key, not a value, you might not want to use a type that does the 
conversion.

To illustrate consider two ways of using a simple dictionary.

import argparse

adict = {'a': [1,2,3], 'b': 'astring'}

parser = argparse.ArgumentParser()
parser.add_argument('-f', 
type = lambda x: adict.get(x,x),
choices = list(adict.values())
)
parser.add_argument('-g', choices = adict)

args =  parser.parse_args()
print(args)
print(args.f, adict[args.g])

sample runs:

valid key:

0942:~/mypy$ python3 issue42191.py -f a -g a
Namespace(f=[1, 2, 3], g='a')
[1, 2, 3] [1, 2, 3]

help:

0945:~/mypy$ python3 issue42191.py -h
usage: issue42191.py [-h] [-f {[1, 2, 3],astring}] [-g {a,b}]

optional arguments:
-h, --helpshow this help message and exit
-f {[1, 2, 3],astring}
-g {a,b}

Error cases:

0945:~/mypy$ python3 issue42191.py -f x
usage: issue42191.py [-h] [-f {[1, 2, 3],astring}] [-g {a,b}]
issue42191.py: error: argument -f: invalid choice: 'x' (choose from 
[1, 2, 3], 'astring')

0945:~/mypy$ python3 issue42191.py -g x
usage: issue42191.py [-h] [-f {[1, 2, 3],astring}] [-g {a,b}]
issue42191.py: error: argument -g: invalid choice: 'x' (choose from 
'a', 'b')

With -g, we have to perform the dictionary lookup after parsing, but choices, 
{a,b}, are clear in both the help and error.

With -f, both the help (which uses str) and the error, give wrong user choices, 
the dictionary values rather than the keys.

--

___
Python tracker 

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



[issue42191] lib.argparse._check_value() using repr instead of str

2020-10-29 Thread paul j3


paul j3  added the comment:

In the Help formatting, 

choice_strs = [str(choice) for choice in action.choices]

The use of `repr` in this check_value() error message was, I think, deliberate. 
 For simple choices like strings and numbers it doesn't matter.  But for other 
cases, it may help to know more about the identify of the choice objects, such 
as their class.

The actual parsing test is just a 'in' test.

value not in action.choices

There is the added complication that the _get_value() function has already 
applied the type function the argument string, converting it to a compatible 
object (for testing). 

Should argparse be changed, or should it be up to the developer to use a 
type/choices pairing that gives the desired help and error messages?

To improve the discussion, I think your 'self.admin' example should be replaced 
by a self contained type and class.  In the spirit of a StackOverFlow question 
I'd like concrete minimal example that I can test and play with.  I don't want 
to write a pseudo-account class.

--

___
Python tracker 

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



[issue42196] Python Windows Installation Error 0x800705aa

2020-10-29 Thread Eryk Sun


Eryk Sun  added the comment:

0x8007_05AA is ERROR_NO_SYSTEM_RESOURCES (1450, 0x05AA) returned as an HRESULT 
value. This error is usually due to a system call failing with the status code 
STATUS_INSUFFICIENT_RESOURCES. From "Pyhon39InstallLog.txt", apparently the 
installer failed to create an uninstall registry key for the current user. Can 
you successfully install other programs for just the current user 
(non-elevated)?

For the issue with `python` not doing anything, check `where.exe python`. The 
first match is the one that CMD would try to execute.

--
nosy: +eryksun

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread Ken Jin


Ken Jin  added the comment:

4. types.GenericAlias's __call__ signature of (origin, args) is not documented 
anywhere, I'll create a PR to types.rst eventually.

--

___
Python tracker 

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



[issue41699] Potential memory leak with asyncio and run_in_executor

2020-10-29 Thread Daniel Alley


Daniel Alley  added the comment:

This seems likely to be a duplicate of https://bugs.python.org/issue41588, as 
run_in_executor(None, ...) submits tasks to a ThreadPoolExecutor underneath the 
hood.

--
nosy: +dralley

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread Ken Jin


Change by Ken Jin :


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

___
Python tracker 

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



[issue42197] Disable automatic update of frame locals during tracing

2020-10-29 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +21947
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23028

___
Python tracker 

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



[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread Ken Jin


New submission from Ken Jin :

This is an umbrella issue to clean up docs for Union and GenericAlias. To-do 
(not in order):

1. Update links in typing, subscription and union to point to GenericAlias.

2. Park GenericAlias and Union under a new section 'Type Annotation Types' in 
stdtypes for 3.10. The reason is to follow with the rest of the stdtypes' doc 
convention.

3. Consistency nitpicks for Union's docs.

--
assignee: docs@python
components: Documentation
messages: 379876
nosy: docs@python, gvanrossum, kj
priority: normal
severity: normal
status: open
title: Clean up docs for Union and GenericAlias
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



[issue42111] Make the xxlimited module an example of best extension module practices

2020-10-29 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue42171] Add PEP 573 to the stable ABI

2020-10-29 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue41796] _ast module state should be made per interpreter

2020-10-29 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue42029] Remove dynload_dl.c

2020-10-29 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5776663675b48f011d428a5874cc3c79d1deb59e by Victor Stinner in 
branch 'master':
bpo-42029: Remove IRIX code (GH-23023)
https://github.com/python/cpython/commit/5776663675b48f011d428a5874cc3c79d1deb59e


--

___
Python tracker 

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



[issue42197] Disable automatic update of frame locals during tracing

2020-10-29 Thread Fabio Zadrozny


New submission from Fabio Zadrozny :

Right now, when a debugger is active, the number of local variables can affect 
the tracing speed quite a lot.

For instance, having tracing setup in a program such as the one below takes 
4.64 seconds to run, yet, changing all the variables to have the same name -- 
i.e.: change all assignments to `a = 1` (such that there's only a single 
variable in the namespace), it takes 1.47 seconds (in my machine)... the higher 
the number of variables, the slower the tracing becomes.

```
import time
t = time.time()

def call():
a = 1
b = 1
c = 1
d = 1
e = 1
f = 1

def noop(frame, event, arg):
return noop

import sys
sys.settrace(noop)

for i in range(1_000_000):
call()

print('%.2fs' % (time.time() - t,))
```

This happens because `PyFrame_FastToLocalsWithError` and `PyFrame_LocalsToFast` 
are called inside the `call_trampoline` 
(https://github.com/python/cpython/blob/master/Python/sysmodule.c#L946).

So, I'd like to simply remove those calls.

Debuggers can call  `PyFrame_LocalsToFast` when needed -- otherwise mutating 
non-current frames doesn't work anyways. As a note, pydevd already has such a 
call: 
https://github.com/fabioz/PyDev.Debugger/blob/0d4d210f01a1c0a8647178b2e665b53ab113509d/_pydevd_bundle/pydevd_save_locals.py#L57
 and PyPy also has a counterpart.

As for `PyFrame_FastToLocalsWithError`, I don't really see any reason to call 
it at all.

i.e.: something as the code below prints the `a` variable from the `main()` 
frame regardless of that and I checked all pydevd tests and nothing seems to be 
affected (it seems that accessing f_locals already does this: 
https://github.com/python/cpython/blob/cb9879b948a19c9434316f8ab6aba9c4601a8173/Objects/frameobject.c#L35,
 so, I don't see much reason to call it at all).

```
def call():
import sys
frame = sys._getframe()
print(frame.f_back.f_locals)
   
def main():
a = 1
call()
   
if __name__ == '__main__':
main()
```

So, the idea is removing those lines (I expect that I'll be able to provide a 
pull request for this).

--
components: Interpreter Core
messages: 379874
nosy: fabioz
priority: normal
severity: normal
status: open
title: Disable automatic update of frame locals during tracing
type: performance
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



[issue42196] Python Windows Installation Error 0x800705aa

2020-10-29 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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

___
Python tracker 

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



[issue42196] Python Windows Installation Error 0x800705aa

2020-10-29 Thread shakir_juolay


New submission from shakir_juolay :

I have recently changed my laptop and my Admin copied everything from 
D:\Users\sjuolay folder from the old laptop to new laptop. Both Windows 10. I 
had Python 3.8 64bit on the old laptop. I am trying to install Python 3.9 64bit 
on my new laptop. But I failed with error 0x800705aa. Attached is the log file.

Also Windows CMD is behaving strange. It does not throw any error on 'python' 
command but does nothing. It throws error on 'py' command.

Microsoft Windows [Version 10.0.19041.546]
(c) 2020 Microsoft Corporation. All rights reserved.

D:\Users\sjuolay>python

D:\Users\sjuolay>py
'py' is not recognized as an internal or external command,
operable program or batch file.

D:\Users\sjuolay>

--
components: Installation
files: Pyhon39InstallLog.txt
messages: 379873
nosy: shakir_juolay
priority: normal
severity: normal
status: open
title: Python Windows Installation Error 0x800705aa
versions: Python 3.9
Added file: https://bugs.python.org/file49548/Pyhon39InstallLog.txt

___
Python tracker 

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



[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2020-10-29 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +paul.j3, rhettinger

___
Python tracker 

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



[issue42163] _replace() no longer works on platform.uname_result objects

2020-10-29 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Please take a look at the PR. Let me know what you think about the limited 
compatibility it adds (still doesn't allow _replace on 'processor').

--

___
Python tracker 

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



[issue40255] Fixing Copy on Writes from reference counting

2020-10-29 Thread STINNER Victor


STINNER Victor  added the comment:

> Fast shutdown option

You can use os._exit(0).

--

___
Python tracker 

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



[issue42189] copy.deepcopy() no longer works on platform.uname_result objects

2020-10-29 Thread Jason R. Coombs


Change by Jason R. Coombs :


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

___
Python tracker 

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



[issue42189] copy.deepcopy() no longer works on platform.uname_result objects

2020-10-29 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Acknowledged. Thanks for the report. I'll likely address this issue alongside 
the other (same PR).

--
assignee:  -> jaraco

___
Python tracker 

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



[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2020-10-29 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +21944
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23026

___
Python tracker 

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



[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-10-29 Thread Zac Hatfield-Dodds


New submission from Zac Hatfield-Dodds :

The two ways of getting a parametrised Callable have inconsistent __args__:

>>> import collections.abc, typing
>>> typing.Callable[[int, int], int].__args__
(int, int, int)
>>> collections.abc.Callable[[int, int], int].__args__
([int, int], int)

I discovered this while working on PEP 585 support in Hypothesis [1], where it 
is easy enough to work around but carries a potentially serious performance 
cost - the list means we cannot use the type as a cache key for non-`...` 
argument types.  

https://bugs.python.org/issue40494 and https://bugs.python.org/issue40398 may 
be related.

[1] https://github.com/HypothesisWorks/hypothesis/pull/2653

--
components: Library (Lib)
messages: 379869
nosy: Zac Hatfield-Dodds, gvanrossum, levkivskyi, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Inconsistent __args__ between typing.Callable and 
collections.abc.Callable
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



[issue42194] Docs for argparse.BooleanOptionalAction missing "New in version 3.9"

2020-10-29 Thread shangxiao


shangxiao  added the comment:

Here's the section in the docs for BooleanOptionalAction: 
https://docs.python.org/3.9/library/argparse.html#action

--
title: BooleanOptionalAction missing "New in version 3.9" -> Docs for 
argparse.BooleanOptionalAction missing "New in version 3.9"

___
Python tracker 

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



[issue42156] Currency not correct for all locales

2020-10-29 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue38894] Path.glob() sometimes misses files that match

2020-10-29 Thread daniel hahler


Change by daniel hahler :


--
nosy: +blueyed
nosy_count: 4.0 -> 5.0
pull_requests: +21943
pull_request: https://github.com/python/cpython/pull/23025

___
Python tracker 

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



[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2020-10-29 Thread daniel hahler


Change by daniel hahler :


--
nosy: +blueyed
nosy_count: 7.0 -> 8.0
pull_requests: +21942
pull_request: https://github.com/python/cpython/pull/23025

___
Python tracker 

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



[issue42194] BooleanOptionalAction missing "New in version 3.9"

2020-10-29 Thread shangxiao


New submission from shangxiao :

The section that describes BooleanOptionalAction just requires a "New in 
version 3.9" tag

--
assignee: docs@python
components: Documentation
messages: 379867
nosy: docs@python, shangxiao
priority: normal
severity: normal
status: open
title: BooleanOptionalAction missing "New in version 3.9"
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



[issue41261] 3.9-dev SEGV in object_recursive_isinstance in ast.literal_eval

2020-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21940
pull_request: https://github.com/python/cpython/pull/23024

___
Python tracker 

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



[issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import

2020-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21941
pull_request: https://github.com/python/cpython/pull/23024

___
Python tracker 

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



[issue41194] Python 3.9.0b3 crash on compile() in PyAST_Check() when the _ast module is loaded more than once

2020-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21939
pull_request: https://github.com/python/cpython/pull/23024

___
Python tracker 

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



[issue41796] _ast module state should be made per interpreter

2020-10-29 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue42143] Corruptions in func_dealloc() with partially-created function object

2020-10-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 60324d26b58c89d68abb23fb42f1563d395c3910 by Miss Skeleton (bot) 
in branch '3.9':
bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creating the 
func object (GH-22953) (GH-23021)
https://github.com/python/cpython/commit/60324d26b58c89d68abb23fb42f1563d395c3910


--

___
Python tracker 

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



[issue42143] Corruptions in func_dealloc() with partially-created function object

2020-10-29 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue42029] Remove dynload_dl.c

2020-10-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21937
pull_request: https://github.com/python/cpython/pull/23023

___
Python tracker 

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



[issue42193] Improve socket.bind error message

2020-10-29 Thread flying sheep


Change by flying sheep :


--
components: +IO
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



[issue42193] Improve socket.bind error message

2020-10-29 Thread flying sheep


New submission from flying sheep :

In the end of my stack trace, I just see

  File "...", line 174, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address

It would be useful if it would tell me which socket that was in the error 
message.

--
messages: 379865
nosy: flying sheep
priority: normal
severity: normal
status: open
title: Improve socket.bind error message

___
Python tracker 

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



[issue42143] Corruptions in func_dealloc() with partially-created function object

2020-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset 9ede1b071bf5250ba5f2d04d7ba86a24c06d41a1 by Miss Skeleton (bot) 
in branch '3.8':
bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creating the 
func object (GH-22953)
https://github.com/python/cpython/commit/9ede1b071bf5250ba5f2d04d7ba86a24c06d41a1


--

___
Python tracker 

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



[issue42143] Corruptions in func_dealloc() with partially-created function object

2020-10-29 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +21935
pull_request: https://github.com/python/cpython/pull/23021

___
Python tracker 

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



[issue42143] Corruptions in func_dealloc() with partially-created function object

2020-10-29 Thread miss-islington


Change by miss-islington :


--
pull_requests: +21936
pull_request: https://github.com/python/cpython/pull/23022

___
Python tracker 

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



[issue42143] Corruptions in func_dealloc() with partially-created function object

2020-10-29 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 350526105fa9b131d8b941ae753378b741dabb2f by Yonatan Goldschmidt 
in branch 'master':
bpo-42143: Ensure PyFunction_NewWithQualName() can't fail after creating the 
func object (GH-22953)
https://github.com/python/cpython/commit/350526105fa9b131d8b941ae753378b741dabb2f


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-29 Thread Martin Gfeller


Martin Gfeller  added the comment:

Windows Version is Windows 10, version 1803 (build 17134.1726).

--

___
Python tracker 

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



[issue42189] copy.deepcopy() no longer works on platform.uname_result objects

2020-10-29 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +jaraco

___
Python tracker 

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



[issue34204] Bump the default pickle protocol in shelve

2020-10-29 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy:  -miss-islington
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



[issue34204] Bump the default pickle protocol in shelve

2020-10-29 Thread miss-islington


miss-islington  added the comment:


New changeset df59273c7a384ea8c890fa8e9b80c92825df841c by Zackery Spytz in 
branch 'master':
bpo-34204: Use pickle.DEFAULT_PROTOCOL in shelve (GH-19639)
https://github.com/python/cpython/commit/df59273c7a384ea8c890fa8e9b80c92825df841c


--
nosy: +miss-islington

___
Python tracker 

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



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The fix is ready

--

___
Python tracker 

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



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue42192] Python Windows .exe Installer ignores /TargetDir if there is an existing installation

2020-10-29 Thread Martin Gfeller


New submission from Martin Gfeller :

I would like to install Python in a new location, completely separate and not 
affecting an existing installation of the same version. 

Despite I use /TargetDir=newdir, the installer goes into the "Modify Setup" 
dialog. If I chose "Modify", it shows my TargetDir read-only in the Customize 
installation location, but then modifies the original installation. 

If I run it with /passive or /quiet, it also modifies the existing installation 
instead of creating a new one at /TargetDir (doing nothing, since there is 
nothing to modify).

If I choose repair at the prompt, it installs the Debug version (only!) into 
the TargetDir, with no library files except venv\scripts\nt (containing the 
debug .exe). 

It seems the installer checks whether there is an existing installation based 
on the registry (or by other means such peeking into the default installation 
directory). If there is an existing installation, the  /TargetDir seems to be 
ignored, except for the peculiar repair installation of the debug build (which 
I never asked for).

I believe this to be a bug in the installer; however if ignoring the /TargetDir 
once an existing installation is found (which I do not find desirable), it 
should be documented. 

The /TARGETDIR option of the old .msi installer didn't have this problem, it 
would reliably install into the target dir.

--
components: Installation, Windows
messages: 379859
nosy: Martin.Gfeller, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python Windows .exe Installer ignores /TargetDir if there is an existing 
installation
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
type:  -> crash
versions: +Python 3.10, Python 3.7

___
Python tracker 

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



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Update: the bug is present in all supported Python versions bug sometimes may 
be hidden by race conditions.

--

___
Python tracker 

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



[issue42191] lib.argparse._check_value() using repr instead of str

2020-10-29 Thread Aschwin


Change by Aschwin :


--
title: lib.argparse._check_value() using repre instead of str -> 
lib.argparse._check_value() using repr instead of str

___
Python tracker 

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



[issue42183] Stack overflow error with asyncio.all_tasks and wait_for

2020-10-29 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I cannot reproduce on 3.9 but 3.8.6 crashes on `repr`:

  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_futures.py", 
line 31 in format_cb
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_futures.py", 
line 34 in _format_callbacks
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_futures.py", 
line 57 in _future_repr_info
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_tasks.py", line 
9 in _task_repr_info
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 139 
in repr_instance
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 62 
in repr1
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 71 
in 
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 71 
in _repr_iterable
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 93 
in repr_set
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 60 
in repr1
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 52 
in repr
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_futures.py", 
line 54 in _future_repr_info
  File 
"/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/asyncio/base_tasks.py", line 
9 in _task_repr_info
  File "/home/andrew/.pyenv/versions/3.8.6/lib/python3.8/reprlib.py", line 139 
in repr_instance
... the stack tail recursively repeats

--

___
Python tracker 

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



[issue42191] lib.argparse._check_value() using repre instead of str

2020-10-29 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +paul.j3, rhettinger

___
Python tracker 

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



[issue42191] lib.argparse._check_value() using repre instead of str

2020-10-29 Thread Aschwin


New submission from Aschwin :

When using a custom type in add_argument(), the error message on an incorrect 
value uses repr instead of str, which looks ugly.

Example code:

login2account = {
c.account.login: c.account for c in self.admin.get_accounts()
}

action_add_parser.add_argument(
"--user", 
dest="user",
type=lambda x: login2account.get(x, x),
choices=list(login2account.values()), 
help="Login name of the user",
)


When using an unknown user, the output is something alike:
   action add: error: argument --assignee: invalid choice: karen (choose from 
, )

The culprit is the following line in lib.argparse._check_value():

args = {'value': value,
'choices': ', '.join(map(repr, action.choices))}

Which should be the following for prettier output:

args = {'value': value,
'choices': ', '.join(map(str, action.choices))}

--
components: Library (Lib)
messages: 379856
nosy: avdwoude
priority: normal
severity: normal
status: open
title: lib.argparse._check_value() using repre instead of str
type: enhancement
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



  1   2   >