Dennis Sweeney added the comment:
Possibly related to the new atomic grouping support from GH-31982?
--
nosy: +Dennis Sweeney, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue47
Dennis Sweeney added the comment:
Buildbots are passing, so I'm closing this. Thanks for the catch and fix!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
New submission from Dennis Sweeney :
What error message?
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue47226>
___
___
Python-bug
Dennis Sweeney added the comment:
For reference, chaining is about 1.18x slower in this microbenchmark on GCC:
./python -m pyperf timeit -s "x = 100" "if 10 < x < 30: print('no')"
--duplicate=10
.
Mean +- std dev: 21.3 ns +- 0.2 ns
.
Dennis Sweeney added the comment:
https://bugs.python.org/issue47221 was opened as a duplicate of this.
Unless there are any new ideas for getting around the concerns here, I think
this can be closed.
--
status: open -> pending
___
Python trac
Dennis Sweeney added the comment:
Feel free to comment on that issue if you have any ideas about how to address
the concerns there.
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Using multiple comparison operators can cause perfor
Change by Dennis Sweeney :
--
title: Bug or bad performance -> chained comparisons slower than using `and`
___
Python tracker
<https://bugs.python.org/issu
Dennis Sweeney added the comment:
I believe this is a duplicate of this issue: https://bugs.python.org/issue45542
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue47
Dennis Sweeney added the comment:
https://docs.python.org/3/library/inspect.html#inspect.isfunction says this:
"""
inspect.isfunction(object)
Return True if the object is a Python function, which includes functions
created by a lambda expression.
"""
Emphasis o
Change by Dennis Sweeney :
--
pull_requests: +30310
pull_request: https://github.com/python/cpython/pull/32239
___
Python tracker
<https://bugs.python.org/issue47
Dennis Sweeney added the comment:
> depends on an already-yielded node
I mean "creates a new not-yet-yielded dependency for an already-yielded node".
--
___
Python tracker
<https://bugs.pytho
Dennis Sweeney added the comment:
Out of curiosity, what are the use cases for adding nodes after get_ready has
already produced nodes?
I was wondering about avoiding the need to call prepare() by having it
automatically do the cycle-checking at the first get_ready() call and then
raising
Dennis Sweeney added the comment:
see also https://bugs.python.org/issue44931
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue47
Dennis Sweeney added the comment:
New changeset 788154919c2d843a0a995994bf2aed2d074761ec by Dennis Sweeney in
branch 'main':
bpo-47053: Refactor BINARY_OP_INPLACE_ADD_UNICODE (GH-32122)
https://github.com/python/cpython/commit/788154919c2d843a0a995994bf2aed
Dennis Sweeney added the comment:
New changeset 850687df47b03e98c1433e6e70e71a8921eb4454 by Pieter Eendebak in
branch 'main':
bpo-47070: Add _PyBytes_Repeat() (GH-31999)
https://github.com/python/cpython/commit/850687df47b03e98c1433e6e70e71a
Change by Dennis Sweeney :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue47132>
___
___
Python-bugs-list mailing list
Unsubscribe:
Dennis Sweeney added the comment:
Thanks!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
New changeset c23ddf5ec229b7302437a1cf32d366df5cc5b837 by Pieter Eendebak in
branch 'main':
bpo-47116: use _PyLong_FromUnsignedChar instead of PyLong_FromLong (GH-32110)
https://github.com/python/cpython/commit/c23ddf5ec229b7302437a1cf32d366
Change by Dennis Sweeney :
--
pull_requests: +30202
pull_request: https://github.com/python/cpython/pull/32122
___
Python tracker
<https://bugs.python.org/issue47
Dennis Sweeney added the comment:
Possible duplicate of https://bugs.python.org/issue44080
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue47
Dennis Sweeney added the comment:
New changeset bd1cf6ecee76bcdce87b4f69567b95756ecf5a4c by Kumar Aditya in
branch 'main':
bpo-47012: speed up iteration of bytes and bytearray (GH-31867)
https://github.com/python/cpython/commit/bd1cf6ecee76bcdce87b4f69567b95756ecf5a4c
-
Dennis Sweeney added the comment:
The help text says this:
>>> help(list.index)
Help on method_descriptor:
index(self, value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
Dennis Sweeney added the comment:
New changeset 1ea055bd53ccf976e88018983a3c13447c4502be by penguin_wwy in branch
'main':
bpo-47067: Optimize calling GenericAlias objects (GH-31996)
https://github.com/python/cpython/commit/1ea055bd53ccf976e88018983a3c13
Dennis Sweeney added the comment:
In bpo-47067, there was concern about the addition of the makefile target from
PR 31637:
regen-global-objects: regen-deepfreeze
After a new `&_Py_ID(__orig_class__)` is added to Objects/genericaliasobject.c,
running `make regen-global-objects` st
Dennis Sweeney added the comment:
I profiled dict[str, int](a=1, b=2), and it looks like a decent chunk of time
comes from PyUnicode_New as used by PyObject_SetAttrString.
You could also try replacing PyObject_SetAttrString with PyObject_SetAttr and
adding "__orig_class__" to
Dennis Sweeney added the comment:
I'd bet we could add a couple of utility functions that could be used in
multiple places, to keep the "trick" all in one place. Something like
void
_PyBytes_RepeatInPlace(char **buffer, size_t start_len, size_t end_len)
{
// Repeatedly dou
Change by Dennis Sweeney :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
Thanks for the contribution -- that's a really nice speedup.
--
___
Python tracker
<https://bugs.python.org/is
Dennis Sweeney added the comment:
New changeset ac8308d3eaf2526318c1bbf13d4a214fd24605d2 by Pieter Eendebak in
branch 'main':
bpo-47005: Improve performance of bytearray_repeat and bytearray_irepeat
(GH-31856)
https://github.com/python/cpython/commit/ac8308d3eaf2526318c1bbf13d4a21
Change by Dennis Sweeney :
--
type: security -> performance
___
Python tracker
<https://bugs.python.org/issue47053>
___
___
Python-bugs-list mailing list
Un
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +30058
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31318
___
Python tracker
<https://bugs.python.org/issu
New submission from Dennis Sweeney :
There was a discussion here:
https://github.com/faster-cpython/ideas/discussions/269
Checking for whether the assignment target is the left-hand side, rather than
just checking for the right refcount, is more stable and reduces the number of
Dennis Sweeney added the comment:
In particular, it's one ascii character:
>>> b'abracadabra'.hex('😋')
ValueError: sep must be ASCII.
I wouldn't be completely opposed to allowing longer strings, but since there
are easy enough ways to do it
Dennis Sweeney added the comment:
Would there be substantial benefit of a new feature over using the existing
feature and then calling str.replace()?
>>> b = b'abracadabra'
>>> "0x" + b.hex(":").replace(":", ", 0x"
Dennis Sweeney added the comment:
indeed, bisected to
2cf7f865f099db11cc6903b334d9c376610313e8 is the first bad commit
commit 2cf7f865f099db11cc6903b334d9c376610313e8
Author: Christian Heimes
Date: Tue Mar 15 11:41:04 2022 +0200
bpo-46587: Skip tests if strftime does not support glibc
Dennis Sweeney added the comment:
https://bugs.python.org/issue45469 is similar. Thanks for the report, but I'll
go ahead and close this.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python t
Dennis Sweeney added the comment:
There's an FAQ entry here:
https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result
--
___
Python tracker
<https://bugs.py
Dennis Sweeney added the comment:
This is because i is not captured by the function definition. `lambda x: x**i`
always makes the "input to the ith power" function, never the "input to the 3rd
power" function, even if i happens to be 3 right now.
Consider replacing `
Change by Dennis Sweeney :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Dennis Sweeney added the comment:
The attached _PyList_AppendTakeRef.diff has the ceval.c, but this
implementation:
int
_PyList_AppendTakeRef(PyListObject *self, PyObject *newitem)
{
assert(self != NULL && newitem != NULL);
assert(PyList_Check(self));
Py_ssi
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +29962
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31864
___
Python tracker
<https://bugs.python.org/issu
New submission from Dennis Sweeney :
list_resize is a long function that probably won't get inlined. But for the
vast majority of cases in list.append, we just need to check whether the list
is big enough (not whether it's small enough, or whether it's null or the wrong
typ
Dennis Sweeney added the comment:
I made a copy/paste error, it should be:
Lib/site-packages/*
!Lib/site-packages/README.txt
--
___
Python tracker
<https://bugs.python.org/issue47
Change by Dennis Sweeney :
--
keywords: +patch
pull_requests: +29960
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31862
___
Python tracker
<https://bugs.python.org/issu
New submission from Dennis Sweeney :
It would be nice to add the following to .gitignore, so that I can `./python -m
pip install [whatever]` without overwhelming the output of `git status`.
Lib/site-packages/*
!Lib/test/data/README.txt
--
messages: 415114
nosy: Dennis Sweeney
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
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 :
--
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:
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
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
Change by Dennis Sweeney :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Dennis Sweeney added the comment:
Should this be backported to make the 3.8 Buildbots happy?
--
___
Python tracker
<https://bugs.python.org/issue45806>
___
___
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:
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
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
Change by Dennis Sweeney :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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-
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:
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
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:
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
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
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
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
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
Dennis Sweeney added the comment:
Possible duplicate of https://bugs.python.org/issue29753
--
nosy: +Dennis Sweeney
___
Python tracker
<https://bugs.python.org/issue46
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:
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:
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:
Thanks for the PR!
--
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 report, Stefan!
Thanks for the PR, Zackery!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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 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
-
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
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:
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
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
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 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
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
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 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
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
Change by Dennis Sweeney :
--
nosy: +rhettinger, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46705>
___
___
Python-bugs-list mailin
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
_
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
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:
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
Dennis Sweeney added the comment:
set1.isdisjoint(set2) also crashes
--
___
Python tracker
<https://bugs.python.org/issue46615>
___
___
Python-bugs-list mailin
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:
replacing `return True` with `return random() < 0.5` makes *all* of the
operations crash, except for `|` and `|=`.
--
___
Python tracker
<https://bugs.python.org/issu
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
Change by Dennis Sweeney :
--
pull_requests: +29223
pull_request: https://github.com/python/cpython/pull/31040
___
Python tracker
<https://bugs.python.org/issue45
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
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:
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
1 - 100 of 571 matches
Mail list logo