Dennis Sweeney added the comment:
This is the top of the stacktrace I got on Windows in Visual Studio:
ucrtbased.dll!7ff9096d8ea8()Unknown
ucrtbased.dll!7ff9096d727c()Unknown
ucrtbased.dll!7ff9096d6f69()Unknown
ucrtbased.dll
Dennis Sweeney added the comment:
This was fixed by https://github.com/python/cpython/pull/30143
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Dennis Sweeney :
--
pull_requests: +28414
pull_request: https://github.com/python/cpython/pull/30193
___
Python tracker
<https://bugs.python.org/issue45
Dennis Sweeney added the comment:
I have https://github.com/python/cpython/pull/27828 open already to add
vectorcall to itemgetter and attrgetter
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
Bisected to here:
13bc13960cc83dbd1cb5701d9a59ac9b9144b205 is the first bad commit
commit 13bc13960cc83dbd1cb5701d9a59ac9b9144b205
Author: Mark Shannon
Date: Thu Jan 23 09:25:17 2020 +
bpo-39320: Handle unpacking of *values in compiler (GH-17984
Dennis Sweeney added the comment:
I was trying to figure out how code like this could ever *not* raise an
exception, and here is one case that runs to completion on 3.6--3.8, but it
raises `TypeError: 'str' object is not callable` on 3.9--3.11.
class I(int):
def __in
Dennis Sweeney added the comment:
Try right-clicking the installer and choosing "run as administrator". Then
hopefully that checkbox should be available.
It's not enough to be logged in as an admin, you also have to run this
particular program with admin permissions.
Dennis Sweeney added the comment:
Can you describe more about your use-case for this?
You can already do something like this now with something like the following:
def random_subset(sequence):
source = random.randbytes(len(sequence))
return [x for x, r in zip(sequence
Dennis Sweeney added the comment:
For completeness:
def random_subset_with_counts(sequence, counts):
result = []
for x, k in zip(sequence, counts):
result.extend([x] * random.getrandbits(k).bit_count())
return result
Change by Dennis Sweeney :
--
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
With the advent of zero-cost exception handling in Python 3.10, there is no
block stack, neither for exceptions nor for loops. These were always regarded
as an implementation detail of the compiler. If you have any new ideas for a
feature like this, I would
Dennis Sweeney added the comment:
Kind of like what's mentioned at
https://github.com/faster-cpython/ideas/discussions/131 , it may be interesting
to explore implementing min()/max() in Pure python, considering recent
specializations to COMPARE_OP, and potential future specializatio
Dennis Sweeney added the comment:
Another option would be to use globals:
>>> BREAKPOINTS = [60, 70, 80, 90]
>>> GRADES = "FDCBA"
>>> def grade(score):
... i = bisect(BREAKPOINTS, score)
... return GRADES[i]
...
>>> [grade(score) for sc
Change by Dennis Sweeney :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue46224>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Dennis Sweeney :
Some benchmarks for this change are below. The case with the largest speedup,
`[None] * 1`, is the case that I would consider the most important:
initializing counters of the form `[0] * N` is very common in my experience.
The following were taken
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +28558
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30346
___
Python tracker
<https://bugs.python.org/issu
Dennis Sweeney added the comment:
# benchmarking script
from pyperf import Runner
runner = Runner()
for n in [2, 10, 100, 10_000]:
for A in [
'[None]',
'["Python", "Perl"]',
'list(range(10))',
'list(ra
Change by Dennis Sweeney :
--
pull_requests: +28560
pull_request: https://github.com/python/cpython/pull/27828
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
I believe this change accidentally affected the API of
PyFunction_GetAnnotations: previously it would only return dict or NULL, now it
can also return a tuple. See bpo-46236
--
nosy: +Dennis Sweeney
___
Python
Change by Dennis Sweeney :
--
nosy: +methane
___
Python tracker
<https://bugs.python.org/issue46236>
___
___
Python-bugs-list mailing list
Unsubscribe:
Dennis Sweeney added the comment:
Hm... the effects are completely different on GCC. This is with
--enable-optimizations and GCC on WSL:
Slower (29):
- tuple(range(100)) * 10: 1.22 us +- 0.02 us -> 2.29 us +- 0.05 us: 1.87x slower
- tuple(range(100)) * 2: 345 ns +- 7 ns -> 629 ns +
Dennis Sweeney added the comment:
Benchmarks are definitively better with the most recent change (in which the
major data-copying loop is between parts of the same buffer):
-- MSVC
Slower (3):
- (None,) * 2: 54.0 ns +- 0.7 ns -> 63.4 ns +- 2.5 ns: 1.17x slo
Dennis Sweeney added the comment:
Pablo, should this be a release blocker?
--
nosy: +Dennis Sweeney, pablogsal
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
I'm getting this:
Traceback (most recent call last):
File "/mnt/c/Users/sween/Source/Repos/cpython2/cpython/delbug.py", line 65,
in
conn = psycopg.connect('dbname=cuny_curriculum')
File "/home/sween/.local/lib/py
Dennis Sweeney added the comment:
I think this might require something like PEP 533 in order to be safe.
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
What you typed is already valid syntax, it's just that `a, b, c` makes a tuple,
not a list. Changing that now would be backwards-incompatible.
Is this a request for some kind of tweak to some documentation, or is this a
request for a different beh
Dennis Sweeney added the comment:
Would there be any value in spelling this as sys.active_exception() or
sys.current_exception() or sys.get_exception() or sys.exception_in_flight() or
similar?
My only worry is confusion between sys.exception() versus builtins.Exception.
--
nosy
Change by Dennis Sweeney :
--
components: -Installation
nosy: -jacobmartin717
resolution: -> not a bug
stage: -> resolved
status: open -> closed
title: Steps To Do Arlo Setup -> Spam
type: security ->
versions: -Python 3.8
___
Dennis Sweeney added the comment:
"Removing tuples" would be highly backwards-incompatible, as millions of
programs rely on tuples, and we can't break them for no reason.
> Lists have everything tuples have and more.
Not true: tuples are hashable, so they can be used as
Dennis Sweeney added the comment:
There's also the hacky expression {*()} to get an empty set
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/is
Dennis Sweeney added the comment:
bisected to here:
631f9938b1604d4f893417ec339b9e0fa9196fb1 is the first new commit
commit 631f9938b1604d4f893417ec339b9e0fa9196fb1
Author: Eric Snow
Date: Mon Jun 7 16:52:00 2021 -0600
bpo-43693: Add the MAKE_CELL opcode and interleave fast locals
Dennis Sweeney added the comment:
Another option to consider would be a table lookup of a pre-computed table of
[1 << i for i in range(64)].
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/i
Change by Dennis Sweeney :
--
components: Interpreter Core
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Use NOTRACE_DISPATCH in specialized opcodes
type: performance
versions: Python 3.11
___
Python tracker
<ht
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +28853
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30652
___
Python tracker
<https://bugs.python.org/issu
Change by Dennis Sweeney :
--
title: 3.11.0a3 vs 3.11.0a4 -> Cython Build: '_PyErr_StackItem’ has no member
named ‘exc_traceback’
___
Python tracker
<https://bugs.python.org
Dennis Sweeney added the comment:
This seems to be the standard confusion people have with mutable defaults, just
with namedtuple defaults rather than function defaults.
Similar behavior elsewhere in Python:
>>> def f(x, y=[]):
... y.append(x)
... print(y)
...
...
&g
Dennis Sweeney added the comment:
> It's not obvious if the "predecessor" should be the start or the end point of
> the edge
https://en.wikipedia.org/wiki/Directed_graph#Basic_terminology :
"""If a path leads from x to y, then y is said to be a successor
Dennis Sweeney added the comment:
I think I can summarize:
Tim + Current Docs:
* static_order to return [A, B]
* Conceptual/abstract directed graph direction is A --> B
* A is a predecessor of B
* predecessor mapping to be passed is {B: [A]}
David suggests:
* static_order returns [A
New submission from Dennis Sweeney :
GCC --enable-optimizations --with-lto on WSL:
Slower (7):
- json_dumps: 12.8 ms +- 0.2 ms -> 13.1 ms +- 0.3 ms: 1.02x slower
- meteor_contest: 106 ms +- 2 ms -> 109 ms +- 3 ms: 1.02x slower
- telco: 6.50 ms +- 0.17 ms -> 6.58 ms +- 0.18 ms: 1.0
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +29052
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30872
___
Python tracker
<https://bugs.python.org/issu
Dennis Sweeney added the comment:
This attempts to avoid the dispatch dance of
Py_DECREF(op) :: Py_TYPE(op)->tp_dealloc(op) :: Py_TYPE(op)->tp_free((PyObject
*)op);
I suspect this earns the most speedup from floats, where freelist manipulation
can be inlined. This might make a single
Change by Dennis Sweeney :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
I believe this is a duplicate of bpo-45899
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
See also
https://stackoverflow.com/questions/13905741/accessing-class-variables-from-a-list-comprehension-in-the-class-definition
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_
Dennis Sweeney added the comment:
Is this similar to https://bugs.python.org/issue3451 ?
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
Why? Callee-borrowing-from-caller is the established norm across the C API. You
mention use-after-free, but can you elaborate on how that can happen in
practice?
https://docs.python.org/3/extending/extending.html?highlight=borrowed#ownership-rules
says
Dennis Sweeney added the comment:
Minor nit: I think swaptimize() should check the for PyMem_Malloc returning
NULL here.
// Create an array with elements {0, 1, 2, ..., depth - 1}:
int *stack = PyMem_Malloc(depth * sizeof(int));
for (int i = 0; i < depth; i++) {
stac
Dennis Sweeney added the comment:
Hi Max,
My apologies -- my first message was probably too dismissive.
Is there any way to make the existing code crash with pure Python, and can we
then add such a test case? If not with pure Python, then perhaps with some
minimal reproducible example
Change by Dennis Sweeney :
--
pull_requests: +29223
pull_request: https://github.com/python/cpython/pull/31040
___
Python tracker
<https://bugs.python.org/issue45
New submission from Dennis Sweeney :
Maybe related to https://bugs.python.org/issue8420
Somewhat obscure, but using only standard Python, and no frame- or gc-hacks, it
looks like we can get a use-after-free:
from random import random
BADNESS = 0.0
class Bad:
def __eq__(self, other
Dennis Sweeney added the comment:
replacing `return True` with `return random() < 0.5` makes *all* of the
operations crash, except for `|` and `|=`.
--
___
Python tracker
<https://bugs.python.org/issu
Change by Dennis Sweeney :
--
title: Segfault in set intersection (&) and difference (-) -> Use-after-free by
mutating set during set operations
___
Python tracker
<https://bugs.python.org/
Dennis Sweeney added the comment:
set1.isdisjoint(set2) also crashes
--
___
Python tracker
<https://bugs.python.org/issue46615>
___
___
Python-bugs-list mailin
Dennis Sweeney added the comment:
It looks like usages of the PyDict_Next API assume the resulting references are
borrowed and so INCREF them.
Usages of set_next do not, but should.
It should hopefully be a straightforward fix of adding INCREF/DECREFs
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +29301
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31120
___
Python tracker
<https://bugs.python.org/issu
Dennis Sweeney added the comment:
Similar changes at bpo-40679 accidentally broke Cython when it was assumed that
co_qualname was non-null, which was then fixed by defaulting to co_name in that
case. I don't know if Cython still produces cases like that, but we should make
sure n
Dennis Sweeney added the comment:
https://stackoverflow.com/ or https://discuss.python.org/c/users/ are better
places for this question.
--
nosy: +Dennis Sweeney
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_
Change by Dennis Sweeney :
--
nosy: +rhettinger, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46705>
___
___
Python-bugs-list mailin
New submission from Dennis Sweeney :
I'm closing this -- if you found a bug in Python, please be sure to describe
thoroughly what bug you found, steps to reproduce the bug, and what behavior
you expected.
--
nosy: +Dennis Sweeney
resolution: -> not a bug
stage: -> reso
Dennis Sweeney added the comment:
New changeset 0a145069e807fdafd1fa0315b9bc22da363d2d39 by Dennis Sweeney in
branch 'main':
bpo-44953: Add vectorcall for itemgetter and attrgetter instances (GH-27828)
https://github.com/python/cpython/commit/0a145069e807fdafd1fa0315b9bc22
Change by Dennis Sweeney :
--
pull_requests: +29431
pull_request: https://github.com/python/cpython/pull/31265
___
Python tracker
<https://bugs.python.org/issue44
Dennis Sweeney added the comment:
New changeset 035414a878a772d1d293cdecdc4470bcce5e5d7a by Dennis Sweeney in
branch 'main':
bpo-44953: Add newline at end of NEWS entry (GH-31265)
https://github.com/python/cpython/commit/035414a878a772d1d293cdecdc4470
Dennis Sweeney added the comment:
I reproduced as far back as Python 3.6 with this:
---
import gc
exc = Exception()
deltas = []
for i in range(2, 15):
ref1 = len(gc.get_objects())
for j in range(2**i):
try:
raise exc
except
Change by Dennis Sweeney :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
New changeset 4a66615ba736f84eadf9456bfd5d32a94cccf117 by Dennis Sweeney in
branch 'main':
bpo-46615: Don't crash when set operations mutate the sets (GH-31120)
https://github.com/python/cpython/commit/4a66615ba736f84eadf9456bf
Dennis Sweeney added the comment:
Go ahead and open a PR -- it makes it easier to discuss particular changes.
Regarding backwards-compatibility, error messages improvements are fair game
for Python 3.11, we just shouldn't backport them to earlier versions.
We can also consider includin
Change by Dennis Sweeney :
--
pull_requests: +29473
pull_request: https://github.com/python/cpython/pull/31312
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
See https://bugs.python.org/issue46722 for a concern about this change.
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue34
Dennis Sweeney added the comment:
New changeset 96084f4256d2d523b0a4d7d900322b032326e3ed by Zackery Spytz in
branch 'main':
bpo-46747: Add missing key parameters in the bisect docs (GH-31323)
https://github.com/python/cpython/commit/96084f4256d2d523b0a4d7d900322b032326e3ed
-
Change by Dennis Sweeney :
--
pull_requests: +29485
pull_request: https://github.com/python/cpython/pull/31329
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
New changeset 841c77d802e9ee8845fa3152700474021efe03fd by Dennis Sweeney in
branch '3.10':
[3.10] bpo-46747: Add missing key parameters in the bisect docs (GH-31323)
(GH-31329)
https://github.com/python/cpyt
Dennis Sweeney added the comment:
Thanks for the report, Stefan!
Thanks for the PR, Zackery!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Dennis Sweeney :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
Thanks for the PR!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
New changeset 9e06d03672547041239812efe4901c06da6cbd2f by Christian Heimes in
branch 'main':
bpo-46730: Fix refleak and tighten NULL checks (GH-31389)
https://github.com/python/cpython/commit/9e06d03672547041239812efe4901c
Dennis Sweeney added the comment:
It does look like there are some pickle situations that crash. Attached is a
randomized crasher. I haven't done too much careful reasoning about it, but
adding INCREFs everywhere seems to fix most of the issues.
--
Added file:
Change by Dennis Sweeney :
--
pull_requests: +29562
pull_request: https://github.com/python/cpython/pull/31427
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
Possible duplicate of https://bugs.python.org/issue29753
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue46
New submission from Dennis Sweeney :
See https://github.com/faster-cpython/ideas/discussions/291
--
messages: 413692
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Add LOAD_FAST__LOAD_ATTR_INSTACE_VALUE combined opcode
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +29617
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31484
___
Python tracker
<https://bugs.python.org/issu
Change by Dennis Sweeney :
--
nosy: +Dennis Sweeney
nosy_count: 2.0 -> 3.0
pull_requests: +29749
pull_request: https://github.com/python/cpython/pull/31625
___
Python tracker
<https://bugs.python.org/issu
Dennis Sweeney added the comment:
PR 31625 is an alternative proposal.
It uses the Crochemore and Perrin's Two-Way algorithm that @benrg references
(see Objects/stringlib/fastsearch.h and
Objects/stringlib/stringlib_find_two_way_notes.txt), and is
platform-indepe
Dennis Sweeney added the comment:
Bisected to here:
c3f52b4d707a78eb342372a2be00f3eb846a05b9 is the first bad commit
commit c3f52b4d707a78eb342372a2be00f3eb846a05b9
Author: Mark Shannon
Date: Wed Jun 23 10:00:43 2021 +0100
bpo-44486: Make sure that modules always have a dictionary
Change by Dennis Sweeney :
--
nosy: +Mark.Shannon
___
Python tracker
<https://bugs.python.org/issue46891>
___
___
Python-bugs-list mailing list
Unsubscribe:
Dennis Sweeney added the comment:
New changeset 6ddb09f35b922a3bbb59e408a3ca7636a6938468 by Dennis Sweeney in
branch 'main':
bpo-46848: Use stringlib/fastsearch in mmap (GH-31625)
https://github.com/python/cpython/commit/6ddb09f35b922a3bbb59e408a3ca76
Dennis Sweeney added the comment:
Thanks for the report!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> performance
___
Python tracker
<https://bugs.python
Dennis Sweeney added the comment:
a8b9350964f43cb648c98c179c8037fbf3ff8a7d is the first bad commit
commit a8b9350964f43cb648c98c179c8037fbf3ff8a7d
Author: Mark Shannon
Date: Wed Oct 13 14:19:34 2021 +0100
bpo-45340: Don't create object dictionaries unless actually needed
(GH-
Change by Dennis Sweeney :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
This might be something that rapidfuzz can fix, rather than CPython. In
whatever import process rapidfuzz uses, it populates sys.modules with a module
named `Levenshtein` in addition to 'rapidfuzz.distance.Levenshtein'. You might
be able to re
Dennis Sweeney added the comment:
In the future, please copy and paste the relevant code and errors as text.
Images of code are harder for screen-readers for the visually impaired, harder
to copy-and-paste to verify, and are more likely to be perceived as spam.
Your code is essentially this
Change by Dennis Sweeney :
--
pull_requests: +29833
pull_request: https://github.com/python/cpython/pull/31718
___
Python tracker
<https://bugs.python.org/issue46
Dennis Sweeney added the comment:
Should this be backported to make the 3.8 Buildbots happy?
--
___
Python tracker
<https://bugs.python.org/issue45806>
___
___
Dennis Sweeney added the comment:
pip is maintained externally at https://github.com/pypa/pip , so that is likely
a better place to open an issue about pip.
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue46
Change by Dennis Sweeney :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
Related to Matt's idea is https://bugs.python.org/issue43574
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/is
Dennis Sweeney added the comment:
A curiosity: have you considered watching dict keys rather than whole dicts?
That way, changing global values would not have to de-optimize, only adding new
global keys would.
Indexing into dict values array wouldn't be as efficient as embedding d
Change by Dennis Sweeney :
--
components: -Build
resolution: -> not a bug
stage: -> resolved
status: open -> closed
title: Master piece -> Spam
type: security ->
___
Python tracker
<https://bugs.pyt
Dennis Sweeney added the comment:
I believe the issue is the usage of the x_divrem function.
x_divrem always returns fresh ints, never cached small ints. This behavior is
relied upon in the long_true_divide function, as it mutates the returned
quotient at the line """x->
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +29942
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31843
___
Python tracker
<https://bugs.python.org/issu
1 - 100 of 516 matches
Mail list logo