[issue47121] math.isfinite() can raise exception when called on a number

2022-03-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Most (but not all) functions in the math module implicitly convert its 
arguments to float. Here we can get an OverflowError. Do we want to add a note 
to every function that does it? Or add a general note at the top of the file 
and add exclusion notes to functions which do not convert arguments to float?

BTW, there is a general note: "Except when explicitly
noted otherwise, all return values are floats."

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue47079] Integral.denominator shouldn't return an int

2022-03-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

How would it work for bool or IntEnum?

--
nosy: +lemburg, mark.dickinson, stutzbach

___
Python tracker 

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



[issue47079] Integral.denominator shouldn't return an int

2022-03-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Raymond and Serhiy, you were the last two active devs to touch numbers.py.

--
nosy: +rhettinger, serhiy.storchaka, terry.reedy

___
Python tracker 

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



[issue32642] add support for path-like objects in sys.path

2022-03-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Are there any problems with converting a Path to string before adding it to 
sys.path? You do this one time, and any users of sys.path will not need to 
bother about conversion. It is better even for performance.

Otherwise we will need to revise and update every code that uses sys.path, and 
many bugs will left in third-party code for years. For example, in unittest the 
code

if not top_level_dir in sys.path:
sys.path.insert(0, top_level_dir)

should be replaced with more cumbersome

for path in sys.path:
if os.fsdecode(path) == top_level_dir:
break
else:
sys.path.insert(0, top_level_dir)

In multiprocessing the code

sys_path=sys.path.copy()
try:
i = sys_path.index('')
except ValueError:
pass
else:
sys_path[i] = process.ORIGINAL_DIR

should be replaced with

sys_path=sys.path.copy()
for i, path in enumerate(sys_path):
if os.fsdecode(path) == '':
sys_path[i] = process.ORIGINAL_DIR
break

It is just two examples. I did not review the whole stdlib, and there should be 
more third-party code.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue47072] Database corruption with the shelve module

2022-03-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

3.8 only gets security patches.  If you can, please test with a newer version.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2022-03-25 Thread Guido van Rossum

Guido van Rossum  added the comment:

I’m sorry, my brain hurts when trying to understand my own code for super.
Hopefully someone younger can look at this.--
--Guido (mobile)

--

___
Python tracker 

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



[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2022-03-25 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Guido, what do you think about this proposal?  

Personally, I'm dubious about changing the meaning of the arguments between 
code paths.  The callee has no way to distinguish which meaning was intended.  
And adding classmethod() support in super_descr_get() would create tight 
coupling where there should be separate concerns (no other descriptor call is 
classmethod specific).  

On StackOverflow, there has been some mild interest in the interactions between 
super() and classmethod():

* https://stackoverflow.com/questions/64637174
* https://stackoverflow.com/questions/1269217
* https://stackoverflow.com/questions/1817183

The OP's proposed use case is mildly plausible though I've never seen it the 
arise in practice.  The GoF factory pattern is typically implemented in a 
function rather than in the class itself — for example the open() function 
returns one of two different classes depending on the text or binary file mode. 
 It is rare to see __new__ used to fork off different types based on a 
parameter.  Presumably, it would be even more rare with a classmethod.  Also, 
it's not clear that the GoF pattern would mesh well with our cooperative 
super() since the upstream parent class isn't known in advance.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue47125] Explore hashlib use of the Windows Crypto API NG

2022-03-25 Thread Gregory P. Smith


New submission from Gregory P. Smith :

https://docs.microsoft.com/en-us/windows/win32/seccng/creating-a-hash-with-cng

See if these are worthwhile vs using OpenSSL for the hashlib algorithms it 
supports.  OS APIs can in theory take better advantage of HW acceleration for 
performance.  Verify this on supported architectures.  Regardless it would 
allow some things to be fast if someone wanted to use a build without OpenSSL.

I'm not a Windows or Microsoft user.  I'm filing this for completeness, someone 
else would need to do the work.

similar macOS issue: https://bugs.python.org/issue47124
similar Linux issue: https://bugs.python.org/issue47102

--
components: Extension Modules, Windows
messages: 416033
nosy: gregory.p.smith, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Explore hashlib use of the Windows Crypto API NG
type: performance

___
Python tracker 

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



[issue47124] explore hashlib use of the Apple CryptoKit macOS

2022-03-25 Thread Gregory P. Smith


New submission from Gregory P. Smith :

https://developer.apple.com/documentation/cryptokit/ in macOS 10.15+

This is a common place for platform specific hardware acceleration to be 
exposed to the user (especially on SoCs which often have non-standard hardware 
- Like Apples... which is presumably why they create this).

What they offer is limited, but when present and running on a recent enough 
macOS, using their and SHA2 and HMAC(SHA2) implementations as well as 
Insecure.SHA1 is probably better than OpenSSL's.  **Verify this.** It'd also 
allow those to be fast in a non-openssl build (as if anyone does those).

I know little about mac building and packaging and how to have something target 
an older OS and use a 10.15+ API. So if this winds up only being used from 
aarch64 macOS builds (10.15+ by definition IIRC?) that could also work.

I leave this issue for a macOS Apple API friendly person to take on.

This issue is cousin to the Linux one: https://bugs.python.org/issue47102

--
components: Extension Modules, macOS
messages: 416032
nosy: gregory.p.smith, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: explore hashlib use of the Apple CryptoKit macOS
type: enhancement

___
Python tracker 

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



[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-25 Thread Graham Dumpleton


Graham Dumpleton  added the comment:

These days I have no idea who is active on Django.

--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2022-03-25 Thread Ned Deily


Change by Ned Deily :


--
pull_requests:  -30201

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2022-03-25 Thread Ned Deily


Change by Ned Deily :


--
pull_requests:  -30200

___
Python tracker 

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



[issue47105] [Doc] grp cites pwd.h instead of grp.h

2022-03-25 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR!

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



[issue47105] [Doc] grp cites pwd.h instead of grp.h

2022-03-25 Thread Ned Deily


Ned Deily  added the comment:


New changeset b8b473e943c0d105c79a6ebe2199dec18d785966 by Miss Islington (bot) 
in branch '3.9':
bpo-47105: Cite grp.h instead of pwd.h in grp docs (GH-32091) (GH-32121)
https://github.com/python/cpython/commit/b8b473e943c0d105c79a6ebe2199dec18d785966


--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2022-03-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30201
pull_request: https://github.com/python/cpython/pull/32121

___
Python tracker 

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



[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-25 Thread Larry Hastings


Larry Hastings  added the comment:

Ooh, good one.  I don't know anybody in the Django project to contact though.  
Anybody have any leads?

--

___
Python tracker 

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



[issue47105] [Doc] grp cites pwd.h instead of grp.h

2022-03-25 Thread Ned Deily


Ned Deily  added the comment:


New changeset 48b3ae9e29545891bece874b4c0c0e394fe0f048 by Miss Islington (bot) 
in branch '3.10':
bpo-47105: Cite grp.h instead of pwd.h in grp docs (GH-32091) (GH-32120)
https://github.com/python/cpython/commit/48b3ae9e29545891bece874b4c0c0e394fe0f048


--

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2022-03-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30200
pull_request: https://github.com/python/cpython/pull/32120

___
Python tracker 

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



[issue47105] [Doc] grp cites pwd.h instead of grp.h

2022-03-25 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30199
pull_request: https://github.com/python/cpython/pull/32121

___
Python tracker 

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



[issue47105] [Doc] grp cites pwd.h instead of grp.h

2022-03-25 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue47105] [Doc] grp cites pwd.h instead of grp.h

2022-03-25 Thread Ned Deily


Ned Deily  added the comment:


New changeset ee912ad6f66bb8cf5a8a2b4a7ecd2752bf070864 by Alex Hedges in branch 
'main':
bpo-47105: Cite grp.h instead of pwd.h in grp docs (GH-32091)
https://github.com/python/cpython/commit/ee912ad6f66bb8cf5a8a2b4a7ecd2752bf070864


--
nosy: +ned.deily

___
Python tracker 

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



[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-25 Thread Graham Dumpleton


Graham Dumpleton  added the comment:

Another example in Django, albeit in a test harness.

* 
https://github.com/django/django/blob/7119f40c9881666b6f9b5cf7df09ee1d21cc8344/tests/urlpatterns_reverse/views.py#L65

--

___
Python tracker 

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



[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-25 Thread Graham Dumpleton


Graham Dumpleton  added the comment:

It is Django I would worry about and look at closely as they do stuff with 
decorators on instance methods that uses partials.

https://github.com/django/django/blob/7119f40c9881666b6f9b5cf7df09ee1d21cc8344/django/utils/decorators.py#L43

```
def _wrapper(self, *args, **kwargs):
# bound_method has the signature that 'decorator' expects i.e. no
# 'self' argument, but it's a closure over self so it can call
# 'func'. Also, wrap method.__get__() in a function because new
# attributes can't be set on bound method objects, only on functions.
bound_method = wraps(method)(partial(method.__get__(self, type(self
for dec in decorators:
bound_method = dec(bound_method)
return bound_method(*args, **kwargs)
```

--

___
Python tracker 

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



[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-03-25 Thread Larry Hastings

Larry Hastings  added the comment:

I heard back from both Samuel Colvin (Pydantic) and Sebastián Ramírez 
(FastAPI).  They said neither of them use update_wrapper with partial objects.  
They also took a peek in a bunch of other projects (FastAPI, Typer, SQLModel, 
Asyncer, SQLAlchemy, Trio, and AnyIO) and nobody was doing it.

So honestly it seems like nobody (but me!) calls update_wrapper on partial 
objects, and we can just fix it.

Graham, any final thoughts before we start pulling levers and merging PRs?  For 
now I just want to fix this bug.  I'm in favor of re-engineering the relevant 
objects so they write their own __signature__ objects, so inspect.Signature 
doesn't have to understand the internals of objects from other modules.  But 
maybe we save that for another day.

--

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-25 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

> 1. Finish writing docs (is updating library/typing.html sufficient? 
> https://github.com/python/cpython/pull/32103)

We also need to add to the What's New for 3.11. I volunteered to do that for 
all the typing PEPs.

> 2. Implement support for pickling of unpacked native tuples

Linking your GH-32119

> 3. Implement support and add tests for copy() of TypeVarTuple and unpacked 
> tuple

I believe this uses the same mechanism as pickling, so shouldn't need more work.

--

___
Python tracker 

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



[issue47062] Implement asyncio.Runner context manager

2022-03-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset bad6ffaa64eecd33f4320ca31b1201b25cd8fc91 by Andrew Svetlov in 
branch 'main':
bpo-47062: Rename factory argument to loop_factory (GH-32113)
https://github.com/python/cpython/commit/bad6ffaa64eecd33f4320ca31b1201b25cd8fc91


--

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-25 Thread Matthew Rahtz


Matthew Rahtz  added the comment:

Since things are piling up, here's a quick record of what I think the remaining 
tasks are: (in approximate order of priority)
1. Finish writing docs (is updating library/typing.html sufficient? 
https://github.com/python/cpython/pull/32103)
2. Implement support for pickling of unpacked native tuples
3. Implement support and add tests for copy() of TypeVarTuple and unpacked tuple
4. Resolve the issue of how we implement type substitution 
(https://bugs.python.org/issue47006)

--

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-25 Thread Matthew Rahtz


Change by Matthew Rahtz :


--
pull_requests: +30197
pull_request: https://github.com/python/cpython/pull/32119

___
Python tracker 

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



[issue43352] Add a Barrier object in asyncio lib

2022-03-25 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue43352] Add a Barrier object in asyncio lib

2022-03-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset d03acd7270d66ddb8e987f9743405147ecc15087 by Duprat in branch 
'main':
bpo-43352: Add a Barrier object in asyncio lib (GH-24903)
https://github.com/python/cpython/commit/d03acd7270d66ddb8e987f9743405147ecc15087


--

___
Python tracker 

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



[issue47121] math.isfinite() can raise exception when called on a number

2022-03-25 Thread Thomas Fischbacher


Thomas Fischbacher  added the comment:

The problem with PEP-484 is that if one wants to use static type analysis, 
neither of these options are good:

- Use static annotations on functions, and additionally spec
  out expectations in docstrings. Do note that the two types places
  where "float" is mentioned here refer to different concepts.
  This looks as if there were duplication, but there actually
  isn't, since the claims are different. This is confusing as hell.

def foo(x: float) -> float:
  """Foos the barbaz

  Args:
x: float, the foobar
  Returns:
float, the foofoo"""

The floats in the docstring give me a guarantee: "If I feed in a float, I am 
guaranteed to receive back a float". The floats in the static type annotation 
merely say "yeah, can be float or int, and I'd call it ok in these cases" - 
that's a very different statement.

- Just go with static annotations, drop mention of types
  from docstrings, and accept that we lose the ability to
  stringently reason about the behavior of code.

With respect to this latter option, I think we can wait for "losing the ability 
to stringently reason about the behavior of code" to cause major security 
headaches. That's basically opening up the door to many problems at the level 
of "I can crash the webserver by requesting the url http://lpt1;.

--

___
Python tracker 

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



[issue47115] Documentation inconsistency with the stable ABI

2022-03-25 Thread Ned Deily


Change by Ned Deily :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2022-03-25 Thread Ned Deily


Ned Deily  added the comment:

This really should be handled in a new issue since the original fixes for all 
affected releases are already in the field. Moreover, we should be a bit 
careful about bumping the required Sphinx version for older releases as this 
has caused problems for downstream distributors of Python in the past. Can't we 
just pin the Jinja2 version for current releases?

--

___
Python tracker 

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



[issue47062] Implement asyncio.Runner context manager

2022-03-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I believe the error is fixed by #47118

--

___
Python tracker 

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



[issue32642] add support for path-like objects in sys.path

2022-03-25 Thread Noam Cohen


Change by Noam Cohen :


--
nosy: +ncohen
nosy_count: 8.0 -> 9.0
pull_requests: +30196
pull_request: https://github.com/python/cpython/pull/32118

___
Python tracker 

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



[issue47123] ZipFile.writestr should respect SOURCE_DATE_EPOCH

2022-03-25 Thread ghost43


New submission from ghost43 :

Currently `ZipFile.writestr` writes the local time into the ZipFile.
(depends on both current time and local timezone)
See 
https://github.com/python/cpython/blob/20e6e5636a06fe5e1472062918d0a302d82a71c3/Lib/zipfile.py#L1816-L1817

This makes pip installing a package generate non-reproducible build artifacts.

Specifically, `Scripts/*.exe` files (created for packages that define 
entry_points/console_scripts) are not reproducible on Windows when installed by 
pip. This also leaks into the `*.dist-info/RECORD` files.

For example, after running `pip install wheel` or `pip install pyinstaller`,
in `wheel-0.37.1.dist-info/RECORD`, I have this line:
```
../../Scripts/wheel.exe,sha256=u9TbPw2XNs_F9uy7y2zwumuzAZDbOSB7BXjLHZ0tTHg,97103
```  
in `pyinstaller-4.10.dist-info/RECORD`, I have these lines:
```
../../Scripts/pyi-archive_viewer.exe,sha256=nC-9muPlIhUC1qvFkXHpyKJyRQqXISXxbUPXQ1XVOiM,97133
../../Scripts/pyi-bindepend.exe,sha256=udFHiAdndPpSwaIqmhmLEy36IUs1cNNoNQznSEnLJQQ,97128
../../Scripts/pyi-grab_version.exe,sha256=3ET9E841tFWujFL99aG4frzgwlP9f9pAkMgE0k2UGK0,97131
../../Scripts/pyi-makespec.exe,sha256=dJkfmITdLJhyPngmqziqqj5tH9qqfeQc5BTubeoXWUs,97127
../../Scripts/pyi-set_version.exe,sha256=sWmcOVS93fUY-wbdoz6ixBCvjy1tC4Aaw30DMmrmo-0,97130
../../Scripts/pyinstaller.exe,sha256=haInbhH0pImJn24cW4v917oUZmzXZj8OE89KFh4MO2Y,97112
```

Upon comparing multiple `Scripts/wheel.exe` files, I've found that the only 
difference is due to the above-mentioned timestamp embedded inside the exe (or 
rather, same timestamp embedded twice).

The `exe` files get created by `distlib` (vendored by pip).
Here is a traceback with an artificial exception to illustrate the codepath:
```
(env) PS C:\tmp> pip install --no-build-isolation pyinstaller
Collecting pyinstaller
  Using cached pyinstaller-4.10-py3-none-win_amd64.whl (2.0 MB)
Requirement already satisfied: setuptools in c:\tmp\env\lib\site-packages (from 
pyinstaller) (61.0.0)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in 
c:\tmp\env\lib\site-packages (from pyinstaller) (2022.3)
Requirement already satisfied: altgraph in c:\tmp\env\lib\site-packages (from 
pyinstaller) (0.17.2)
Requirement already satisfied: pefile>=2017.8.1 in c:\tmp\env\lib\site-packages 
(from pyinstaller) (2021.9.3)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in 
c:\tmp\env\lib\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: future in c:\tmp\env\lib\site-packages (from 
pefile>=2017.8.1->pyinstaller) (0.18.2)
Installing collected packages: pyinstaller
ERROR: Exception:
Traceback (most recent call last):
  File "C:\tmp\env\lib\site-packages\pip\_internal\cli\base_command.py", line 
167, in exc_logging_wrapper
status = run_func(*args)
  File "C:\tmp\env\lib\site-packages\pip\_internal\cli\req_command.py", line 
205, in wrapper
return func(self, options, args)
  File "C:\tmp\env\lib\site-packages\pip\_internal\commands\install.py", line 
405, in run
installed = install_given_reqs(
  File "C:\tmp\env\lib\site-packages\pip\_internal\req\__init__.py", line 73, 
in install_given_reqs
requirement.install(
  File "C:\tmp\env\lib\site-packages\pip\_internal\req\req_install.py", line 
769, in install
install_wheel(
  File 
"C:\tmp\env\lib\site-packages\pip\_internal\operations\install\wheel.py", line 
729, in install_wheel
_install_wheel(
  File 
"C:\tmp\env\lib\site-packages\pip\_internal\operations\install\wheel.py", line 
646, in _install_wheel
generated_console_scripts = maker.make_multiple(scripts_to_generate)
  File "C:\tmp\env\lib\site-packages\pip\_vendor\distlib\scripts.py", line 440, 
in make_multiple
filenames.extend(self.make(specification, options))
  File 
"C:\tmp\env\lib\site-packages\pip\_internal\operations\install\wheel.py", line 
427, in make
return super().make(specification, options)
  File "C:\tmp\env\lib\site-packages\pip\_vendor\distlib\scripts.py", line 429, 
in make
self._make_script(entry, filenames, options=options)
  File "C:\tmp\env\lib\site-packages\pip\_vendor\distlib\scripts.py", line 329, 
in _make_script
self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\tmp\env\lib\site-packages\pip\_vendor\distlib\scripts.py", line 263, 
in _write_script
raise Exception(f"heyheyhey2. {sha256(launcher)=}. {sha256(shebang)=}. 
{sha256(zip_data)=}. " +
Exception: heyheyhey2. sha256(launcher)='a00a877acefc'. 
sha256(shebang)='58628e924f22'. sha256(zip_data)='a423496a0482'. 
('SOURCE_DATE_EPOCH' in os.environ)=True
```
The interesting code is here:
https://github.com/pypa/distlib/blob/d0e3f49df5d1aeb9daeaaabf0391c9e13e4a6562/distlib/scripts.py#L251-L252
This calls into the cpython standard library, where `time.time()` gets written 
into the file:
https://github.com/python/cpython/blob/20e6e5636a06fe5e1472062918d0a302d82a71c3/Lib/zipfile.py#L1816-L1817

Ideally, either `distlib` or the stdlib  `zipfile` module should be changed to 

[issue47122] Fix the table of methods in the collections.abc documentation

2022-03-25 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue11339] annotation for class being defined

2022-03-25 Thread Irit Katriel


Change by Irit Katriel :


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



[issue11339] annotation for class being defined

2022-03-25 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Agree. typing.Self from PEP 673 fixes this specific case, and PEP 563 or 649 
will provide a general solution. No need to keep this issue open.

--
nosy: +JelleZijlstra
status: pending -> open

___
Python tracker 

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



[issue47122] Fix the table of methods in the collections.abc documentation

2022-03-25 Thread Géry

New submission from Géry :

This pull request makes the following changes to the table of methods in the 
[`collections.abc` 
documentation](https://docs.python.org/3/library/collections.abc.html):

- `Reversible`: add `__iter__` abstract method;
- `Generator`: replace `__iter__` with inherited mixin `Iterator` methods;
- `MutableSequence`: add clear mixin method;
- `Set`: remove `__ne__` mixin method (not defined here but in `object`), add 
`__rand__` mixin method, add `__ror__` mixin method, add `__rsub__` mixin 
method, add `__rxor__` mixin method;
- `Mapping`: remove `__ne__` mixin method (not defined here but in `object`);
- `ItemsView`: add inherited mixin `MappingView` method and inherited mixin 
`Set` methods;
- `KeysView`: add inherited mixin `MappingView` method and inherited mixin 
`Set` methods;
- `ValuesView`: add inherited mixin `MappingView` method;
- `Coroutine`: add `__await__` abstract method;
- `AsyncGenerator`: replace `__aiter__` with inherited mixin `AsyncIterator` 
methods;
- footnotes: remove footnote 2 which is a duplicate of [the description of 
`collections.abc.Iterable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable).

--
assignee: docs@python
components: Documentation
messages: 416013
nosy: docs@python, maggyero
priority: normal
pull_requests: 30195
severity: normal
status: open
title: Fix the table of methods in the collections.abc documentation
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue47118] test_run_keeps_context in test_asyncio fails

2022-03-25 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue47118] test_run_keeps_context in test_asyncio fails

2022-03-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 20e6e5636a06fe5e1472062918d0a302d82a71c3 by Andrew Svetlov in 
branch 'main':
bpo-47118: Fix asyncio.Runner tests error (32117)
https://github.com/python/cpython/commit/20e6e5636a06fe5e1472062918d0a302d82a71c3


--

___
Python tracker 

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



[issue47121] math.isfinite() can raise exception when called on a number

2022-03-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The math.isfinite() docs could be changed to something like, "coerces x to a 
float if possible and then returns True if x is neither an infinity nor a NaN, 
and False otherwise."  Or there could be a general note about which functions 
(most of them) coerce to float (which can fail).

With respect to typing and PEP-484, I don't see a bug or documentation issue.  
Types relationships are useful for verifying which methods are available, but 
they don't make promises about the range of valid values.  For example 
math.sqrt(float) -> float promises which types are acceptable but doesn't 
promise that negative inputs won't raise an exception.  Likewise, "n: int=10; 
len(range(n))" is type correct but will raise an OverflowError for "n = 
10**100".

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, rhettinger

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2022-03-25 Thread Maciej Olko


Change by Maciej Olko :


--
pull_requests: +30194
pull_request: https://github.com/python/cpython/pull/32111

___
Python tracker 

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



[issue1207613] Idle Editor: Bottom Scroll Bar

2022-03-25 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 6.0 -> 7.0
pull_requests: +30193
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/32116

___
Python tracker 

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



[issue47121] math.isfinite() can raise exception when called on a number

2022-03-25 Thread Nathaniel Manista


Change by Nathaniel Manista :


--
nosy: +Nathaniel Manista

___
Python tracker 

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



[issue47121] math.isfinite() can raise exception when called on a number

2022-03-25 Thread Thomas Fischbacher


New submission from Thomas Fischbacher :

>>> help(math.isfinite)
isfinite(x, /)
Return True if x is neither an infinity nor a NaN, and False otherwise.

So, one would expect the following expression to return `True` or `False`. We 
instead observe:

>>> math.isfinite(10**1000)
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: int too large to convert to float

(There likewise is a corresponding issue with other, similar, functions).

This especially hurts since PEP-484 states that having a Sequence[float] `xs` 
does not allow us to infer that `all(issubclass(type(x), float) for x in xs)` 
actually holds - since a PEP-484 "float" actually does also include "int" (and 
still, issubclass(int, float) == False).

Now, strictly speaking, `help(math)` states that

DESCRIPTION
This module provides access to the mathematical functions
defined by the C standard.

...but according to "man 3 isfinite", the math.h "isfinite" is a macro and not 
a function - and the man page does not show type information for that reason.

--
messages: 416010
nosy: tfish2
priority: normal
severity: normal
status: open
title: math.isfinite() can raise exception when called on a number

___
Python tracker 

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



[issue47118] test_run_keeps_context in test_asyncio fails

2022-03-25 Thread Andrew Svetlov


Change by Andrew Svetlov :


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

___
Python tracker 

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



[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-25 Thread Steve Dower


Steve Dower  added the comment:

I think this PR is "ready enough" to get in for broader testing, but in case 
anyone wants to try it first, I've attached a build from my own machine.

You may need Programs & Features to remove any existing "Python Launcher" 
before installing this MSI, and you will need to do that to remove this later 
on, but it should otherwise behave identically to a per-user installed launcher.

--
Added file: https://bugs.python.org/file50701/launcher.msi

___
Python tracker 

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



[issue47053] Reduce de-optimization in BINARY_OP_INPLACE_ADD_UNICODE

2022-03-25 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset cca43b7d64f47ea921d0f7a347ae1a839c5463c3 by Dennis Sweeney in 
branch 'main':
bpo-47053: Reduce deoptimization in BINARY_OP_INPLACE_ADD_UNICODE (GH-31318)
https://github.com/python/cpython/commit/cca43b7d64f47ea921d0f7a347ae1a839c5463c3


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue47118] test_run_keeps_context in test_asyncio fails

2022-03-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks for the report!
I read it ad 'decimal context tests modifies the environment'.
I'll update asyncio runner test to ignore external contextvars.

--

___
Python tracker 

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



[issue47117] repl segfaults on non utf-8 input

2022-03-25 Thread Jon Åslund

Jon Åslund  added the comment:

very similar back trace too

(gdb) run
Starting program: /home/jon/.pyenv/versions/3.10.4/bin/python3.10 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Python 3.10.4 (main, Mar 24 2022, 14:20:44) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> _ 

Program received signal SIGSEGV, Segmentation fault.
__strchr_avx2 () at ../sysdeps/x86_64/multiarch/strchr-avx2.S:57
57  ../sysdeps/x86_64/multiarch/strchr-avx2.S: No such file or directory.
(gdb) bt
#0  __strchr_avx2 () at ../sysdeps/x86_64/multiarch/strchr-avx2.S:57
#1  0x557d4a7a in get_error_line (lineno=lineno@entry=0, p=, p=) at Parser/pegen.c:443
#2  0x557d541b in _PyPegen_raise_error_known_location 
(p=0x77885ed0, 
errtype=0x558fe420 <_PyExc_SyntaxError>, lineno=0, col_offset=0, 
end_lineno=0, end_col_offset=-1, 
errmsg=0x558a2dd3 "(%s) %U", va=0x7fffd410) at Parser/pegen.c:499
#3  0x557d5646 in _PyPegen_raise_error (p=p@entry=0x77885ed0, 
errtype=, 
errmsg=errmsg@entry=0x558a2dd3 "(%s) %U") at Parser/pegen.c:422
#4  0x557d5839 in raise_decode_error (p=p@entry=0x77885ed0) at 
Parser/pegen.c:271
#5  0x557d6193 in initialize_token (token_type=60, end=0x0, 
start=, token=0x77a55d10, 
p=0x77885ed0) at Parser/pegen.c:720
#6  _PyPegen_fill_token (p=p@entry=0x77885ed0) at Parser/pegen.c:793
#7  0x557fec00 in statement_newline_rule (p=0x77885ed0) at 
Parser/parser.c:1080
#8  interactive_rule (p=0x77885ed0) at Parser/parser.c:1002
#9  _PyPegen_parse (p=p@entry=0x77885ed0) at Parser/parser.c:34508
#10 0x557d6c60 in _PyPegen_run_parser (p=0x77885ed0) at 
Parser/pegen.c:1342
#11 0x557d718f in _PyPegen_run_parser_from_file_pointer 
(fp=fp@entry=0x77e29980 <_IO_2_1_stdin_>, 
start_rule=start_rule@entry=256, 
filename_ob=filename_ob@entry=0x77a85670, enc=enc@entry=0x77a7c1a0 
"utf-8", 
ps1=, ps1@entry=0x1e00160 , 
ps2=ps2@entry=0xe001a0 , flags=0x7fffd7f8, 
errcode=0x7fffd724, arena=0x7792cc70) at Parser/pegen.c:1448
#12 0x5575661c in _PyParser_ASTFromFile (fp=fp@entry=0x77e29980 
<_IO_2_1_stdin_>, 
filename_ob=filename_ob@entry=0x77a85670, enc=enc@entry=0x77a7c1a0 
"utf-8", mode=mode@entry=256, 
ps1=0x1e00160 , 
ps1@entry=0x77acf960 ">>> ", 
ps2=0xe001a0 , 
ps2@entry=0x77af02e0 "... ", 
flags=, errcode=, arena=) at 
Parser/peg_api.c:26
#13 0x556cad97 in PyRun_InteractiveOneObjectEx 
(fp=fp@entry=0x77e29980 <_IO_2_1_stdin_>, 
filename=filename@entry=0x77a85670, flags=flags@entry=0x7fffd7f8) at 
Python/pythonrun.c:257
#14 0x556cba26 in _PyRun_InteractiveLoopObject 
(fp=fp@entry=0x77e29980 <_IO_2_1_stdin_>, 
filename=filename@entry=0x77a85670, flags=flags@entry=0x7fffd7f8) at 
Python/pythonrun.c:148
#15 0x556cc5ce in _PyRun_AnyFileObject (flags=, 
closeit=, filename=0x77a85670, fp=) at 
Python/pythonrun.c:84
#16 PyRun_AnyFileExFlags (fp=0x77e29980 <_IO_2_1_stdin_>, 
filename=filename@entry=0x55802103 "", closeit=closeit@entry=0, 
flags=flags@entry=0x7fffd7f8) at Python/pythonrun.c:116
#17 0x555bb5c7 in pymain_run_stdin (config=0x55932ce0) at 
Modules/main.c:502
#18 pymain_run_python (exitcode=exitcode@entry=0x7fffd930) at 
Modules/main.c:590
#19 0x555bba1f in Py_RunMain () at Modules/main.c:666
#20 pymain_main (args=0x7fffd8f0) at Modules/main.c:696
#21 Py_BytesMain (argc=, argv=) at 
Modules/main.c:720
#22 0x77c610b3 in __libc_start_main (main=0x555aedb0 , 
argc=1, argv=0x7fffda58, init=, fini=, 
rtld_fini=, stack_end=0x7fffda48)
at ../csu/libc-start.c:308
#23 0x555ba57e in _start () at ./Include/internal/pycore_pyerrors.h:14

--

___
Python tracker 

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



[issue47120] Make all jump opcodes relative

2022-03-25 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue47117] repl segfaults on non utf-8 input

2022-03-25 Thread Jon Åslund

Jon Åslund  added the comment:

Yes. I think they are the same. I can reproduce the emoji crash. This is much 
easier to reproduce. No need to have a Swedish keyboard layout.

1. Copy _
2. Start python with a non unicode locale. LC_ALL=C python3.10
3. Paste in _
4. Press backspace once. It will look like the 2 character wide emoji is 
replaced by a 1 character wide space.
6. Press return
7. Crash

--

___
Python tracker 

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



[issue47117] repl segfaults on non utf-8 input

2022-03-25 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This looks similar to https://bugs.python.org/issue46206

--
nosy: +pablogsal, xtreak

___
Python tracker 

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



[issue47120] Make all jump opcodes relative

2022-03-25 Thread Irit Katriel


Change by Irit Katriel :


--
title: Make all jumps relative -> Make all jump opcodes relative

___
Python tracker 

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



[issue47120] Make all jumps relative

2022-03-25 Thread Irit Katriel


New submission from Irit Katriel :

For some of our jump opcodes target is absolute, so it can easily require 
EXTENDED_ARGS. Our analysis [1] shows that turning all absolute jumps into 
relative jumps will eliminate almost all EXTENDED_ARGS on jumps. 

This will require a _BACK version for each jump type, which negates the oparg.

[1] 
https://github.com/faster-cpython/ideas/discussions/235#discussioncomment-2417022

--
assignee: iritkatriel
components: Interpreter Core
messages: 416003
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Make all jumps relative
type: performance
versions: Python 3.11

___
Python tracker 

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



[issue47093] Documentation Fix: Remove .bat when activating venv on windows

2022-03-25 Thread J Y


J Y  added the comment:

Do you think it's worth changing it to just activate and adding a footnote 
mentioning the variations as I've been a dev for a few years now and it stumped 
me for a minute as I work in a few different envs. 

Mainly thinking of making setting up venv's as easy as possible for new comers 
with one less roadblock on their journey.

--

___
Python tracker 

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



[issue47119] test_freeze_simple_script in test_tools fails

2022-03-25 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

$ ./python -X frozen_modules=off -m test -vuall test_tools -m 
test_freeze_simple_script
...
==
ERROR: test_freeze_simple_script (test.test_tools.test_freeze.TestFreeze)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/contextlib.py", line 155, in __exit__
self.gen.throw(typ, value, traceback)
^
  File "/home/serhiy/py/cpython/Lib/test/support/os_helper.py", line 396, in 
temp_dir
yield path
^^
  File "/home/serhiy/py/cpython/Lib/test/test_tools/test_freeze.py", line 27, 
in test_freeze_simple_script
outdir, scriptfile, python = helper.prepare(script, outdir)
 ^^
  File "/home/serhiy/py/cpython/Tools/freeze/test/freeze.py", line 134, in 
prepare
copy_source_tree(srcdir, SRCDIR)

  File "/home/serhiy/py/cpython/Tools/freeze/test/freeze.py", line 83, in 
copy_source_tree
shutil.copytree(oldroot, newroot)
^
  File "/home/serhiy/py/cpython/Lib/shutil.py", line 558, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
   ^^^
  File "/home/serhiy/py/cpython/Lib/shutil.py", line 514, in _copytree
raise Error(errors)
^^^
shutil.Error: [('/home/serhiy/py/cpython/tmp/y', 
'/tmp/tmp1swfh4ik/cpython/tmp/y', "[Errno 2] No such file or directory: 
'/home/serhiy/py/cpython/tmp/y'"), ('/home/serhiy/py/cpython/link', 
'/tmp/tmp1swfh4ik/cpython/link', "[Errno 2] No such file or directory: 
'/home/serhiy/py/cpython/link'"), 
('/home/serhiy/py/cpython/Tools/unicode/python-mappings/CP932.TXT', 
'/tmp/tmp1swfh4ik/cpython/Tools/unicode/python-mappings/CP932.TXT', "[Errno 5] 
Input/output error: 
'/home/serhiy/py/cpython/Tools/unicode/python-mappings/CP932.TXT' -> 
'/tmp/tmp1swfh4ik/cpython/Tools/unicode/python-mappings/CP932.TXT'"), 
('/home/serhiy/py/cpython/Tools/unicode/python-mappings-/CP949.TXT', 
'/tmp/tmp1swfh4ik/cpython/Tools/unicode/python-mappings-/CP949.TXT', "[Errno 5] 
Input/output error: 
'/home/serhiy/py/cpython/Tools/unicode/python-mappings-/CP949.TXT' -> 
'/tmp/tmp1swfh4ik/cpython/Tools/unicode/python-mappings-/CP949.TXT'"), 
('/home/serhiy/py/cpython/Python/y', '/tmp/tmp1swfh4ik/cpython/Python/y', 
"[Errno 2] No 
 such file or directory: '/home/serhiy/py/cpython/Python/y'"), 
('/home/serhiy/py/cpython/dl', '/tmp/tmp1swfh4ik/cpython/dl', "[Errno 2] No 
such file or directory: '/home/serhiy/py/cpython/dl'"), 
('/home/serhiy/py/cpython/issue36694/out.pickle', 
'/tmp/tmp1swfh4ik/cpython/issue36694/out.pickle', "[Errno 5] Input/output 
error: '/home/serhiy/py/cpython/issue36694/out.pickle' -> 
'/tmp/tmp1swfh4ik/cpython/issue36694/out.pickle'")]

--

--
components: Demos and Tools, Tests
messages: 416001
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: test_freeze_simple_script in test_tools fails
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue47118] test_run_keeps_context in test_asyncio fails

2022-03-25 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

$ ./python -m test -vuall test_asyncio
...
==
FAIL: test_run_keeps_context (test.test_asyncio.test_runners.RunnerTests)
--
Traceback (most recent call last):
  File "/home/serhiy/py/cpython/Lib/test/test_asyncio/test_runners.py", line 
299, in test_run_keeps_context
self.assertEqual({cvar: 2}, dict(runner.run(get_context(

AssertionError: {: 2} != {: 2, : 2}
?  ^

+ {: 2,
?  ^

+  : Context(prec=28, 
rounding=ROUND_HALF_EVEN, Emin=-99, Emax=99, capitals=1, clamp=0, 
flags=[], traps=[InvalidOperation, DivisionByZero, Overflow])}

--


When run the test separately it passes successfully.

--
components: Tests, asyncio
messages: 416000
nosy: asvetlov, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: test_run_keeps_context in test_asyncio fails
type: behavior
versions: Python 3.11

___
Python tracker 

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



[issue16958] The sqlite3 context manager does not work with isolation_level=None

2022-03-25 Thread Kodiologist

Kodiologist  added the comment:

This bit me real bad. On Python 3.8, I wrote a program with `isolation_level = 
None` and `with db: …` and spent a long time figuring out why writes were so 
slow. Turns out that `with db` doesn't actually start a transaction in this 
case, as the documentation suggests it should. This issue is approaching the 
age of 10, so if there's still uncertainty about how the implementation or the 
interface should change, the docs should be clarified in the meantime.

I always thought the Python library turning off autocommit by default, contrary 
to SQLite's command-line interface, was needlessly surprising. I think it 
contributed to this problem because the docs about context managers seem to 
assume you have autocommit off.

--
nosy: +Kodiologist

___
Python tracker 

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



[issue40421] [C API] Add public getter functions for the internal PyFrameObject structure

2022-03-25 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +30190
pull_request: https://github.com/python/cpython/pull/32114

___
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

2022-03-25 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset d7163bb35d1ed46bde9affcd4eb267dfd0b703dd by Mark Shannon in 
branch 'main':
bpo-42197: Don't create `f_locals` dictionary unless we actually need it. 
(GH-32055)
https://github.com/python/cpython/commit/d7163bb35d1ed46bde9affcd4eb267dfd0b703dd


--

___
Python tracker 

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



[issue44036] asyncio SSL server can be DOSed, event loop gets blocked: busy loops and uses 100% CPU

2022-03-25 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Could you check Python 3.11?
It has a new asyncio SSL implementation rewritten from scratch.

--

___
Python tracker 

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



[issue47062] Implement asyncio.Runner context manager

2022-03-25 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +30189
pull_request: https://github.com/python/cpython/pull/32113

___
Python tracker 

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



[issue1554] socketmodule cleanups: allow the use of keywords in socket functions

2022-03-25 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
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



[issue13197] subprocess: move shell arguments to a separate keyword param

2022-03-25 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Popen should raise ValueError if pass a string when shell=False 
or a list when shell=True

___
Python tracker 

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



[issue47075] test_multiprocessing_spawn leaks QueueManager dangling processes

2022-03-25 Thread STINNER Victor


STINNER Victor  added the comment:

> BaseManager._finalize_manager() timeout should be configurable

I proposed GH-32112 for that.

--

___
Python tracker 

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



[issue18535] termios.tcgetattr should return namedtuple

2022-03-25 Thread Irit Katriel


Irit Katriel  added the comment:

The patch has no tests, the use case is not clear and it's been 9 years. 
Closing.

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



[issue47075] test_multiprocessing_spawn leaks QueueManager dangling processes

2022-03-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +30188
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/32112

___
Python tracker 

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



[issue8891] shutil: sort files before archiving for consistency

2022-03-25 Thread Irit Katriel


Irit Katriel  added the comment:

distutils is deprecated now, so there won't be any more enhancements to it.

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

___
Python tracker 

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



[issue8891] shutil: sort files before archiving for consistency

2022-03-25 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Distutils -Library (Lib)
nosy: +dstufft

___
Python tracker 

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



[issue42917] Block stack size for frame objects should be dynamically sizable

2022-03-25 Thread Mark Shannon


Mark Shannon  added the comment:

With the introduction of zero cost exceptions, there is no block stack.

--
resolution:  -> out of date
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



[issue47117] repl segfaults on non utf-8 input

2022-03-25 Thread Jon Åslund

New submission from Jon Åslund :

Some bytes that are non utf-8 segfaults python repl in 3.10 and later on linux. 
Example:

$ python3.10
Python 3.10.4 (main, Mar 24 2022, 14:20:44) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> �
Segmentation fault (core dumped)

It is treated correctly in Python 3.9 and earlier

$ python3.9
Python 3.9.12 (main, Mar 24 2022, 14:21:53) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> �
  File "", line 0

SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb6 in position 
0: invalid start byte

How to reproduce:

In Gnome on Ubuntu 20.04 with the Swedish keyboard layout, holding left alt and 
pressing the ö key enters the byte 0xb6 into the terminal.

I have only been able to make it crash the repl. I can't make it crash the 
parser. For instance trying to eval the byte.

--
messages: 415992
nosy: jooon
priority: normal
severity: normal
status: open
title: repl segfaults on non utf-8 input
type: crash
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue47116] Use _PyLong_FromUnsignedChar in bytearrayobject.c

2022-03-25 Thread Pieter Eendebak


Change by Pieter Eendebak :


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

___
Python tracker 

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



[issue47116] Use _PyLong_FromUnsignedChar in bytearrayobject.c

2022-03-25 Thread Pieter Eendebak


New submission from Pieter Eendebak :

In https://github.com/python/cpython/pull/31867 the method 
_PyLong_FromUnsignedChar was introduced for faster conversion of byteaarray 
elements.

We can use the method in more places

--
components: Interpreter Core
messages: 415991
nosy: pieter.eendebak
priority: normal
severity: normal
status: open
title: Use _PyLong_FromUnsignedChar in bytearrayobject.c
versions: Python 3.11

___
Python tracker 

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



[issue45618] Documentation builds fail with Sphinx 3.2.1

2022-03-25 Thread Maciej Olko


Change by Maciej Olko :


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

___
Python tracker 

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



[issue47062] Implement asyncio.Runner context manager

2022-03-25 Thread Kumar Aditya


Kumar Aditya  added the comment:

With this change, Github Actions fails first time and it passes in the second 
rerun of running asyncio tests.

See https://github.com/python/cpython/runs/5682275663?check_suite_focus=true 
and main branch.

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue47115] Documentation inconsistency with the stable ABI

2022-03-25 Thread Jeremiah Gabriel Pascual


New submission from Jeremiah Gabriel Pascual :

In https://docs.python.org/3/c-api/typeobj.html#static-types, it says that 
PyTypeObject isn't part of the stable ABI. Yet, in 
https://docs.python.org/3/c-api/type.html#c.PyTypeObject, it says that 
PyTypeObject IS part of the stable ABI. Which is true?

--
assignee: docs@python
components: Documentation
messages: 415989
nosy: Crowthebird, docs@python
priority: normal
severity: normal
status: open
title: Documentation inconsistency with the stable ABI

___
Python tracker 

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



[issue46429] Merge all deepfrozen files into one

2022-03-25 Thread Kumar Aditya


Change by Kumar Aditya :


--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue46429] Merge all deepfrozen files into one

2022-03-25 Thread Kumar Aditya


Change by Kumar Aditya :


--
pull_requests: +30185
pull_request: https://github.com/python/cpython/pull/32107

___
Python tracker 

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