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 "
New submission from Thomas MK :
The dataclass transformation ignores attributes that are annotated as ClassVar.
I think it should also ignore attributes that are annotated as TypeAlias.
Specifically, I have this usecase in mind:
class RunMode(Enum):
release = auto()
debug = auto
New submission from Thomas Fischbacher :
Here is a major general problem with python-static-typing as it is
described by PEP-484: The approach described in
https://peps.python.org/pep-0484/#the-numeric-tower negatively impacts
our ability to reason about the behavior of code with stringency.
I
Thomas MK added the comment:
There is of course no hard reason for not using the global scope. I just often
have enums (or other types) that are very closely linked to one class. And it
makes sense to me then to have a TypeAlias in that class so that I don't have
to import the
Thomas Grainger added the comment:
the problem is multiprocessing/process is calling threading._shutdown which
tries to join its own thread, because concurrent.futures.thread._threads_queues
contains the main thread in the subprocess
File
"/home/graingert/miniconda3/envs
Thomas Fischbacher added the comment:
This is not a partial duplicate of https://bugs.python.org/issue47121 about
math.isfinite().
The problem there is about a specific function on which the documentation may
be off -
I'll comment separately on that.
The problem here is: There
Thomas Fischbacher added the comment:
Tim, the problem may well be simply due to the documentation of math.isfinite()
being off here.
This is what we currently have:
https://docs.python.org/3/library/math.html#math.isfinite
===
math.isfinite(x)
Return True if x is neither an infinity nor a
Thomas Fischbacher added the comment:
Re AlexWaygood:
If these PEP-484 related things were so obvious that they would admit a compact
description of the problem in 2-3 lines, these issues would likely have been
identified much earlier. We would not be seeing them now, given that Python by
New submission from Thomas Caswell :
Changing faulthandler to only allocate it's stack when use causes python to
segfault with
import faulthandler
faulthandler.cancel_dump_traceback_later()
https://bugs.python.org/issue37851 https://github.com/python/cpython/pull/15358
--
compo
Change by Thomas Caswell :
--
components: +Extension Modules -Library (Lib)
___
Python tracker
<https://bugs.python.org/issue37933>
___
___
Python-bugs-list m
Change by Thomas Caswell :
--
keywords: +patch
pull_requests: +15133
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15440
___
Python tracker
<https://bugs.python.org/issu
New submission from Thomas Güttler :
if you google for "python pth" you get to the "sites" docs.
It would be very nice if you could create a direct URL to the docs of pth files.
This makes it easier to point new comers into the right direction if you answer
questions
New submission from Thomas Caswell :
In python37, numpy1.17 the following runs without warning.
import numpy as np
sorted([1, 2], reverse=np.bool_(True))
with python38 this emits a
DeprecationWarning: In future, it will be an error for 'np.bool_' scalars to be
interpreted as a
Change by Thomas Caswell :
Added file: https://bugs.python.org/file48569/python_bisect.sh
___
Python tracker
<https://bugs.python.org/issue37980>
___
___
Python-bug
Change by Thomas Caswell :
Added file: https://bugs.python.org/file48570/test.py
___
Python tracker
<https://bugs.python.org/issue37980>
___
___
Python-bugs-list mailin
Thomas Caswell added the comment:
xref numpy issue https://github.com/numpy/numpy/issues/14397
--
___
Python tracker
<https://bugs.python.org/issue37
Change by Thomas Caswell :
--
components: +Library (Lib)
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue37980>
___
___
Python-bugs-list m
Change by Thomas Wouters :
--
keywords: +patch
pull_requests: +15410
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15757
___
Python tracker
<https://bugs.python.org/issu
Thomas Wouters added the comment:
New changeset b4612f5d54aced5bc37f1b85bf50b4cafa2480f0 by T. Wouters in branch
'master':
bpo-37589: Add a few missing dependencies on .h files in the Makefile.
(GH-15757)
https://github.com/python/cpython/commit/b4612f5d54aced5bc37f1b85bf50b4
Change by Thomas Wouters :
--
pull_requests: +15422
pull_request: https://github.com/python/cpython/pull/15769
___
Python tracker
<https://bugs.python.org/issue37
Change by Thomas Wouters :
--
assignee: -> twouters
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python
Thomas Wouters added the comment:
New changeset 3cbc23aa229bc5ec04845053df78eae5f54e0497 by T. Wouters (Greg
Price) in branch 'master':
bpo-37758: Cut always-constant conditionals on sys.maxunicode. (GH-15302)
https://github.com/python/cpython/commit/3cbc23aa229bc5ec04845053df78ea
Thomas Wouters added the comment:
New changeset 682107cf458578ee6bd92b7cc6862113034a4fad by T. Wouters (Zackery
Spytz) in branch 'master':
bpo-36279: Ensure os.wait3() rusage is initialized (GH-15111)
https://github.com/python/cpython/commit/682107cf458578ee6bd92b7cc68621
Thomas Wouters added the comment:
New changeset 92709a263e9cec0bc646ccc1ea051fc528800d8d by T. Wouters (Sergey
Fedoseev) in branch 'master':
bpo-37840: Fix handling of negative indices in bytearray_getitem() (GH-15250)
https://github.com/python/cpyt
Thomas Wouters added the comment:
New changeset ccaea525885e41c5f1e566bb68698847faaa82ca by T. Wouters (Victor
Stinner) in branch '3.8':
Revert "bpo-33418: Add tp_clear for function object (GH-8058)" (GH-15826)
https://github.com/python/cpython/commit/ccaea525885e41c5f1e5
Thomas Wouters added the comment:
New changeset 43c9731334470573209464b7f67914d386457efc by T. Wouters (Serhiy
Storchaka) in branch 'master':
bpo-38083: Minor improvements in asdl_c.py and Python-ast.c. (GH-15824)
https://github.com/python/cpyt
Thomas Wouters added the comment:
This doesn't feel like a change that's worth backporting to 3.8 at this point.
Do you agree? Is there anything left to do for this bug?
--
___
Python tracker
<https://bugs.python.o
Thomas Wouters added the comment:
New changeset 4f384af067d05b16a554bfd976934fca9f87a1cf by T. Wouters (Dino
Viehland) in branch 'master':
bpo-38076: Make struct module PEP-384 compatible (#15805)
https://github.com/python/cpython/commit/4f384af067d05b16a554bfd976934f
Thomas Wouters added the comment:
New changeset a1ffad07195b8b976f8c371a92028240946d4e76 by T. Wouters (Dino
Viehland) in branch 'master':
bpo-38074: Make zlib extension module PEP-384 compatible (GH-15792)
https://github.com/python/cpython/commit/a1ffad07195b8b976f8c371a920282
New submission from Thomas Wouters :
New changeset bd0c7a12d9e28ce74bfc16244d7694aca906838c by T. Wouters (Dino
Viehland) in branch 'master':
bpo-38071: Make termios PEP-384 compatible (GH-15785)
https://github.com/python/cpython/commit/bd0c7a12d9e28ce74bfc16244d7694
New submission from Thomas Wouters :
New changeset 40a5313edfc18173d136bb5e19495880934b7d83 by T. Wouters (Dino
Viehland) in branch 'master':
bpo-38072: PEP-384 grpmodule (GH-15788)
https://github.com/python/cpython/commit/40a5313edfc18173d136bb5e19495880934b7d83
--
nosy:
Thomas Wouters added the comment:
New changeset f1c19031fd5f4cf6faad539e30796b42954527db by T. Wouters (Benjamin
Peterson) in branch 'master':
bpo-38068: Clean up gettimeofday configure logic. (GH-15775)
https://github.com/python/cpython/commit/f1c19031fd5f4cf6faad539e30796b
Thomas Wouters added the comment:
New changeset 57ea33560662e0f20a3b0334bb20065771edf4da by T. Wouters (Jeroen
Demeyer) in branch 'master':
bpo-37619: update_one_slot() should not ignore wrapper descriptors for wrong
type (GH-14836)
https://github.com/python/cpyt
Thomas Wouters added the comment:
New changeset eb1bc48c74f4f8af88b5276729f9652201e46324 by T. Wouters (Miss
Islington (bot)) in branch '3.8':
bpo-37619: update_one_slot() should not ignore wrapper descriptors for wrong
type (GH-15838)
https://github.com/python/cpyt
Thomas Wouters added the comment:
I don't think this should be backported to 3.7 at this point; if you disagree
feel free to reopen the bug.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python t
Thomas Wouters added the comment:
New changeset a9b6033179b64b985394ad351501089a6a94fc9d by T. Wouters (Ben
Harper) in branch 'master':
bpo-36253: Remove use after free reference in ctypes test suite (GH-12257)
https://github.com/python/cpython/commit/a9b6033179b64b985394ad35150108
Thomas Wouters added the comment:
New changeset 3f4db4a0bab073b768fae958e93288bd5d24eadd by T. Wouters (Gregory
P. Smith) in branch 'master':
bpo-28494: Test existing zipfile working behavior. (GH-15853)
https://github.com/python/cpython/commit/3f4db4a0bab073b768fae958e93288
Thomas Wouters added the comment:
New changeset 580d2782f70f8e0bed7ec20abb03d740cb83b5da by T. Wouters (Gregory
P. Smith) in branch 'master':
bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)
https://github.com/python/cpyt
New submission from Thomas Wouters :
The peephole optimizer in Python 2.7 and later (and probably a *lot* earlier)
has a bug where if the optimizer entirely optimizes away the last line(s) of a
function, the lnotab references invalid bytecode offsets:
>>> def f(cond1, cond2):
...
Thomas Wouters added the comment:
There's also a bug where the optimizer may bail out on optimizing a code object
*after* updating the lnotab (the last 'goto exitUnchanged' in
Python/peephole.c). That bug has existed since Python 3.6, but it's not clear
to me how much t
Change by Thomas Wouters :
--
pull_requests: +15603
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15970
___
Python tracker
<https://bugs.python.org/issu
Thomas Wouters added the comment:
New changeset 5209e586b7cac9a43b2c44349a26b1b0af06ead3 by T. Wouters (Daniel
Abrahamsson) in branch 'master':
bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15330)
https://github.com/python
Thomas Wouters added the comment:
New changeset 63eefc35674ec12ab4d00af4feaf21de4cb1c91c by T. Wouters (Miss
Islington (bot)) in branch '3.8':
bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15973)
https://github.com/python
Thomas Wouters added the comment:
New changeset d126fbddc960afd93ff070bc34209be256152943 by T. Wouters (Miss
Islington (bot)) in branch '3.7':
bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15974)
https://github.com/python
Thomas Wouters added the comment:
Thanks, fix merged.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Thomas Wouters added the comment:
New changeset c9bc49c5f6e26a7c958307c2ac338951a7534d9a by T. Wouters (Christian
Heimes) in branch 'master':
bpo-34001: Fix test_ssl with LibreSSL (GH-13783)
https://github.com/python/cpython/commit/c9bc49c5f6e26a7c958307c2ac338951a7534d9a
-
Thomas Wouters added the comment:
As mentioned in the PR (GH-15970), I don't think we should fix this bug. We
can, but it involves replacing PyCode_Optimize() (which is public but
undocumented, with confusing refcount effects) with a stub, and very careful
surgery on the code o
Change by Thomas Wouters :
--
pull_requests: +15672
pull_request: https://github.com/python/cpython/pull/16050
___
Python tracker
<https://bugs.python.org/issue38
Change by Thomas Wouters :
--
keywords: +patch
pull_requests: +15701
pull_request: https://github.com/python/cpython/pull/16079
___
Python tracker
<https://bugs.python.org/issue38
Thomas Wouters added the comment:
Setting Py_SIZE of the bytes object is possible, but gross and not how you're
supposed to operate on bytes.
I'm also not entirely convinced lnotab isn't reused in ways it shouldn't. The
peephole optimizer already does gross thi
Thomas Wouters added the comment:
New changeset 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f by T. Wouters (Dino
Viehland) in branch 'master':
bpo-38075: Port _randommodule.c to PEP-384 (GH-15798)
https://github.com/python/cpython/commit/04f0bbfbedf8d2bb69b012f853de6648b1a9f27f
-
Thomas Wouters added the comment:
New changeset 693aa80a434590ea7dcd35c000209e53d01b9425 by T. Wouters (Gregory
P. Smith) in branch 'master':
bpo-36046: Fix buildbot failures (GH-16091)
https://github.com/python/cpython/commit/693aa80a434590ea7dcd35c000209e53d01b9425
-
Thomas Grainger added the comment:
I think assertPermutation (without the "is") would be the best name
--
___
Python tracker
<https://bugs.python.o
Change by Thomas Grainger :
--
pull_requests: +15826
pull_request: https://github.com/python/cpython/pull/16228
___
Python tracker
<https://bugs.python.org/issue27
New submission from Thomas Knox :
Trying to compile 3.8.0b4 on an raspberry pi 3B+ and 4 running:
pi@pi4b:~/Downloads/Python-3.8.0b4 $ uname -a
Linux pi4b 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux
Using arguments:
./configure --disable-shared --enable-optimizations
Thomas Knox added the comment:
pi@pi4b:~ $ gcc --version
gcc (Raspbian 8.3.0-6+rpi1) 8.3.0
pi@pi4b:~ $ ld --version
GNU ld (GNU Binutils for Raspbian) 2.31.1
--
___
Python tracker
<https://bugs.python.org/issue38
Thomas Knox added the comment:
I'll be more than happy to buy you an RPi to do testing on.
--
___
Python tracker
<https://bugs.python.org/issue38204>
___
___
Thomas Knox added the comment:
I updated binutils:
pi@pi4b:~/Downloads/Python-3.8.0b4 $ ld --version
GNU ld (GNU Binutils) 2.32
Same problem.
--
___
Python tracker
<https://bugs.python.org/issue38
Thomas Grainger added the comment:
While it may not appear to be a permutation, python already considers it one:
graingert@onomastic:~$ cat test_assert_permutation.py
import itertools
import unittest
from decimal import Decimal
from fractions import Fraction
class
Thomas Wouters added the comment:
New changeset faca8553425c231d867dcabf6a69a9dd21118b6c by T. Wouters (Victor
Stinner) in branch 'master':
bpo-36046: posix_spawn() doesn't support uid/gid (GH-16384)
https://github.com/python/cpython/commit/faca8553425c231d867dcabf6
Thomas Wouters added the comment:
As mentioned in the code review for Victor's fix, it feels like the big
conditional on the use of self._posix_spawn in Popen._execute_child should
perhaps be pulled into _posix_spawn, or at least refactored so it's closer to
_posix_spawn,
New submission from Thomas Haller :
The line number for the frame object changed behaviour in 3.8.
I am seeing this on Fedora rawhide, which ships "3.8.0~b4-1.fc32" package.
That happens when wrapping lines for calling functions.
Before, the line number sys._getframe(1).f_lineno in
Change by Thomas Haller :
--
components: +Interpreter Core
type: -> behavior
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issu
Thomas Haller added the comment:
Do you have a reference to the discussion about that?
--
___
Python tracker
<https://bugs.python.org/issue38283>
___
___
Pytho
Thomas Haller added the comment:
OK, I see. Thanks for the references.
FWIW, I think such changes in behavior are really bad. The issue should be
fixed without changing existing API.
--
___
Python tracker
<https://bugs.python.org/issue38
Thomas Haller added the comment:
> We could keep f_lineno unchanged, despite the fact that its value can be wrong
It was not completely wrong. It was seemingly good enough for the past 20+
years.
The change in behaviour is one thing. It's also inconvenient that, even when
being
Change by Thomas Wouters :
--
keywords: +patch
pull_requests: +16183
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16594
___
Python tracker
<https://bugs.python.org/issu
Thomas Wouters added the comment:
The problem is _PyUnicode_CheckConsistency switched from being only defined
when Py_DEBUG is set, to being defined unconditionally. That was a good change,
but it made the API-compatibility hack of #defining _PyUnicode_CheckConsistency
in Include
Thomas Wouters added the comment:
I'm pretty sure you meant nascheme, not nnorwitz.
--
nosy: +nascheme, twouters -nnorwitz
___
Python tracker
<https://bugs.python.org/is
Change by Teddy Thomas :
--
nosy: +tthoma24
___
Python tracker
<https://bugs.python.org/issue38014>
___
___
Python-bugs-list mailing list
Unsubscribe:
Thomas Caswell added the comment:
Any update on resolving this?
--
___
Python tracker
<https://bugs.python.org/issue37980>
___
___
Python-bugs-list mailin
Thomas Caswell added the comment:
I believe this can be closed, the regression has been fixed and there is now a
test to prevent it from coming back.
--
___
Python tracker
<https://bugs.python.org/issue37
New submission from Thomas Anderson :
The runtime pushes a frame block in SETUP_FINALLY, so the compiler needs to
account for that, otherwise the runtime block stack may overflow.
--
components: Interpreter Core
messages: 388696
nosy: tomkpz
priority: normal
severity: normal
status
Thomas Anderson added the comment:
IIRC, some transpilers for functional languages create deeply nested code. In
particular for things like haskell's do notation.
Anyway, when I wrote the PR, it was initially to reduce the frame size. Then
once I had dynamic block stack sizing worki
New submission from Thomas Wamm :
Comparing performance of a Tkinter graphics program with Python 3.9.2 on an M1
Mac Mini, I find it to be slower than earlier versions, and much slower than
the same program running on other computers such as a Raspberry Pi 3B (Python
3.7.3).
Initial
Thomas Wamm added the comment:
An easy demo of the performance problem is to compare the execution speed of
the single command:
>>> help('modules')
in a python3 shell in a terminal window (it's real fast),
vs. inside the IDLE3 shell (it's terribly slow).
I u
Thomas Wamm added the comment:
I spent a few hours running numerous configurations (M1 Mac Mini, iMac24-2007,
Win10 on i5-8250U, Raspberry Pi 4B, various Pythons from 3.7.3 to 3.10.0a6). It
can get confusing.
The primary interesting result is that Python 3.9.2 and 3.10.0a6 arm64 versions
Thomas Wamm added the comment:
Summary: "poor tkinter performance correlates with failed self-tests"
I'm an amateur hobbyist noobie programmer, so sophisticated testing is a
challenge for me. I raised this issue because I noticed Python graphics thru
tkinter is especiall
Thomas Wamm added the comment:
Failed tkinter tests were already noted in Issue 42507.
No mention of failures correlating with much slower testing.
--
___
Python tracker
<https://bugs.python.org/issue43
Change by Thomas Kluyver :
--
nosy: +takluyver
nosy_count: 4.0 -> 5.0
pull_requests: +23755
pull_request: https://github.com/python/cpython/pull/24997
___
Python tracker
<https://bugs.python.org/issu
Thomas Wamm added the comment:
I ran the bench.py and bench.tcl programs from E. Paine (epaine) on my M1 Mac
Mini. Attached is a commented Terminal transcript.
The tl;dr summary again is that Python 3.10.0a6 arm64 for Apple silicon is 3 to
100 times SLOWER than earlier pythons compiled for
Thomas Wamm added the comment:
tkinter performance on Windows 10 looks okay, no obvious problems.
Attached is a transcript showing bench.py results for Pythons 3.8.2, 3.9.2, and
3.10.0a6 on Windows 10 on a Dell laptop with an Intel i5-8250U CPU (medium good
speed, a good comparison to Apple
New submission from Thomas Cavalli :
The Division (/) section example uses the commented variable "result" without
it being defined. I am counting 4 numbers, (5.6667, 5, 2, 17), that are called
result. The correct result can be implied but its poor documentation. So,
either chan
Change by Thomas Cavalli :
--
nosy: thomaspcavalli
priority: normal
severity: normal
status: open
title: Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no "/"
ques
___
Python tracker
<https://bugs.python.o
New submission from Thomas Cavalli :
The last sentence of this section seems wrong to me:
"If there is no / in the function definition, there are no positional-only
parameters."
Should this better be:
"If there is no / in the function definition, there are only positional-o
Change by Thomas Cavalli :
--
title: Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no "/"
ques -> Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no
"/" question
___
Python tracker
&
Change by Thomas Cavalli :
--
title: Tutorial Documentation for 4.7.3.2. Positional-Only Parameters, no "/"
question -> Tutorial Documentation for 4.7.3.2. Positional-Only Parameters,
no "/" question?
___
Thomas Wamm added the comment:
I have forked my TerraLunar graphics program to make a simpler more portable
version, called "TerraLunar-tkbench.py" to facilitate testing of the tkinter
stack for graphics performance. The project folder is at:
https://github.com/ThomasWamm/
Change by Thomas Cavalli :
--
resolution: -> works for me
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Reuben Thomas :
Example session:
$ mkdir foo
$ cd foo
$ ln -s .. bar
$ ln -s .. baz
$ python3.9
Python 3.9.0+ (default, Oct 20 2020, 08:43:38)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more informa
Change by Reuben Thomas :
--
components: +Library (Lib)
versions: +Python 3.9
___
Python tracker
<https://bugs.python.org/issue43875>
___
___
Python-bugs-list m
Change by Reuben Thomas :
--
title: path.glob with ** does not always detect symlink loops -> glob.glob with
** does not always detect symlink loops
___
Python tracker
<https://bugs.python.org/issu
New submission from Thomas Buhrmann :
When mixing code that spawns subprocesses with code that creates event loops,
Python appears to deadlock.
In the attached example, when WORKERS = 16 and ASYNC_WORKERS = 8, Python will
sometimes (50% of the time?) deadlock, never exiting, with no
New submission from Reuben Thomas :
The documentation seems very clear on this subject:
"RawTextHelpFormatter maintains whitespace for all sorts of help text,
including argument descriptions. However, multiple new lines are replaced with
one."
But consider the following code:
Reuben Thomas added the comment:
(Tested with Python 3.9.4.)
--
___
Python tracker
<https://bugs.python.org/issue43942>
___
___
Python-bugs-list mailin
Reuben Thomas added the comment:
D'oh! Sorry for the noise. And congratulations to the author/designer of
`RawDescriptionHelpFormatter` for designing/implementing exactly what I wanted
all along!
--
resolution: -> not a bug
stage: -> resolved
status: ope
New submission from Thomas Grainger :
create a asyncio.from_thread shortcut to run async functions from a thread
started with asyncio.to_thread
```
def from_thread(async_func, /, *args, **kwargs):
"""Synchronously run function *async_func* in the event loop thread.
Thomas Grainger added the comment:
"""High-level support for working with threads in asyncio"""
import functools
import contextvars
from . import events
from . import tasks
__all__ = "to_thread", "from_thread"
class _Local(threading
Thomas Jollans added the comment:
I think I know what's going on here.
The way you're using tempfile.TemporaryFile() is, shall we say, unusual.
TemporaryFile() already gives you an open file, there's really no reason why
you'd call open() again. In practice you
Thomas Jollans added the comment:
I cannot reproduce this on my OpenSUSE (glibc 2.33, Linux 5.12.4) or Ubuntu
20.04 (glibc 2.31, Linux 5.4.0) machines, but I can reproduce it on an old
Debian Stretch VM I happened to have lying around (glibc 2.24, Linux 4.9.0).
(FreeBSD 12.2 and Windows 10
601 - 700 of 1791 matches
Mail list logo