Mark Shannon added the comment:
PEP 651 would prevent any crashes, although some of the tests might still fail
with a StackOverflowException, if they weren't expecting a RecursionError.
--
___
Python tracker
<https://bugs.python.org/issue43
Mark Shannon added the comment:
New changeset 7a7ba3d343d360a03a34bc3901628f9f40a58307 by tomKPZ in branch
'master':
bpo-43495 : Push missing frame block in compile.c (GH-24865)
https://github.com/python/cpython/commit/7a7ba3d343d360a03a34bc3901628f9f40a58307
--
nosy: +Mark.Shannon
Mark Shannon added the comment:
I implemented it ages ago :)
https://github.com/python/cpython/pull/24417
I need to be better at closing issues.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Pytho
Mark Shannon added the comment:
New changeset 11e0b295dee235dd6fd66a10d4823b0dcb014dc4 by Mark Shannon in
branch 'master':
bpo-43846: Use less stack for large literals and calls (GH-25403)
https://github.com/python/cpython/commit/11e0b295dee235dd6fd66a10d4823b0dcb014dc4
Mark Shannon added the comment:
This is a significant change to the language.
There should be a PEP, or at the very least a discussion on Python Dev.
There may well be a very good reason why static methods have not been made
callable before that you have overlooked.
Changing static methods
Mark Shannon added the comment:
Are you asking why breaking backwards compatibility is an issue?
Or how it breaks backwards compatibility?
pydoc could be changed to produce the proposed output, it doesn't need this
change.
We don't know what this change will break, but we do know
Mark Shannon added the comment:
New changeset 9e7b2076fb4380987ad0262c4c0ca900b06475ad by Mark Shannon in
branch 'master':
bpo-43760: Speed up check for tracing in interpreter dispatch (#25276)
https://github.com/python/cpython/commit/9e7b2076fb4380987ad0262c4c0ca900b06475ad
New submission from Mark Shannon :
Large literals or function calls with many arguments can consume a lot of stack
space.
This will be a problem for any future work to use a contiguous stack for data
and possibly eliminate frame objects for most calls.
It is also possible (I haven't
Change by Mark Shannon :
--
nosy: +pablogsal
___
Python tracker
<https://bugs.python.org/issue43846>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +24136
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/25403
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
I've not measured performance, as the sort of large literals it would impact
are very rare, and the sort of calls it would change are almost non-existent.
I'd be surprised if any performance difference could be reliably detected with
our current performance
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
The changes to pyc format aren't user visible so shouldn't matter,
but what about the dis output?
Consider this program:
def f():
try:
1/0
except:
return "fail"
Currently it compiles to:
2 0 SETUP_FINALLY
Mark Shannon added the comment:
New changeset 28d28e053db6b69d91c2dfd579207cd8ccbc39e7 by Mark Shannon in
branch 'master':
bpo-43760: Streamline dispatch sequence for machines without computed gotos.
(GH-25244)
https://github.com/python/cpython/commit
Change by Mark Shannon :
--
pull_requests: +24013
pull_request: https://github.com/python/cpython/pull/25276
___
Python tracker
<https://bugs.python.org/issue43
Mark Shannon added the comment:
Why do you think the distinction between category 1 and 2 is not clear?
If the struct if not produced, or initialized, by an API function, then it
cannot be accessed in the first place. If you can't access the struct in the
first place, then you can't access
Mark Shannon added the comment:
You need to define __builtins__ in the globals dictionary.
def func(s):
return len(s)
text = "abc"
print(func(text))
FuncType = type(func)
func_globals = {"__builtins__":__builtins__.__dict__}
code = func.__code__
func2 = FuncTyp
Mark Shannon added the comment:
I don't think PR 24559 will be sufficient to fix this.
Pickled functions need to share the builtins dict, not just have a copy of it.
Adding a "builtins" parameter to types.FunctionType() should be be enough.
So:
function(code, globals, name=Non
Mark Shannon added the comment:
Do you have a reproducer that does not use cloudpickle?
Pickling functions seems to work correctly.
>>> import pickle
>>> def func():
... return len([])
...
>>> func2 = pickle.loads(pickle.dumps(func))
>>>
>&g
Mark Shannon added the comment:
In Python 3.9 the binding is more late-ish binding, than true late binding.
Because globals['__builtins__'] is cached for each function activation,
executing functions don't see updates.
Example:
>>> def f():
... print(len("test")
Mark Shannon added the comment:
Thanks for putting in the effort to find this.
I think the first step to fixing this is to formalize the semantics of
`tp_version_tag`. Initially it was designed just for the method cache, but we
have started using it as a unique identifier for the state
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26247
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27773
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
PyType_ClearCache() is documented as:
Clear the internal lookup cache. Return the current version tag.
Modifying it to do what it is documented to do fixes this bug :)
--
___
Python tracker
<ht
Change by Mark Shannon :
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
I guess this will be resolved when the great PEP 563/649 debate is concluded.
No need for another issue.
--
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
___
Python tracke
Mark Shannon added the comment:
I'd like to close this, as the exception handling is all done and working
correctly.
Is there a separate issue for how we are handling CodeType()?
--
___
Python tracker
<https://bugs.python.org/issue40
Mark Shannon added the comment:
Duplicate of https://bugs.python.org/issue40116
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue40116>
___
___
Python-bugs-list mailing list
Unsubscribe:
Mark Shannon added the comment:
Ned, is this still an issue with the release candidate of 3.10?
--
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
I believe this to be fixed.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
New changeset 96346cb6d0593ef9ec122614347ccb053cd63433 by Ken Jin in branch
'main':
bpo-44889: Specialize LOAD_METHOD with PEP 659 adaptive interpreter (GH-27722)
https://github.com/python/cpython/commit/96346cb6d0593ef9ec122614347ccb053cd63433
Mark Shannon added the comment:
refleak.py seems to run forever for me. Got bored after 6000 iterations.
Which O/S and configure options are needed for refleak.py to fail?
--
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
New changeset d3eaf0cc5b311ad023fd13e367f817d528403306 by Mark Shannon in
branch 'main':
bpo-44945: Specialize BINARY_ADD (GH-27967)
https://github.com/python/cpython/commit/d3eaf0cc5b311ad023fd13e367f817d528403306
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Mark Shannon :
The two plausible layouts from evaluation stack frames are described here:
https://github.com/faster-cpython/ideas/issues/31#issuecomment-844263795
We opted for layout A, although it is a bit more complex to manage and slightly
more expensive in terms
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26382
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27933
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
stage: resolved ->
___
Python tracker
<https://bugs.python.org/issue44945>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
I don't recall, but...
You can't modify any builtin modules. Freezing modules effectively makes them
builtin from a user's perspective. There are plenty of modules that can't be
modified:
>>> sys.builtin_module_names
('_abc', '_ast', '_codecs', '_co
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26414
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27967
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset f9242d50b18572ef0d584a1c815ed08d1a38e4f4 by Mark Shannon in
branch 'main':
bpo-44990: Change layout of evaluation frames. "Layout B" (GH-27933)
https://github.com/python/cpython/commit/f9242d50b18572ef0d584a1c815ed0
Mark Shannon added the comment:
New changeset 15d50d7ed8afd3ab26b00210b5b4feaaadd5af51 by Mark Shannon in
branch 'main':
bpo-44946: Streamline operators and creation of ints for common case of single
'digit'. (GH-27832)
https://github.com/python/cpython/commit
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
No significant change in performance
https://gist.github.com/markshannon/34a780d65e69b5a573a83f3fdb0139aa
I think this merely indicates that there are little to no f-strings in the
pyperformance benchmark suite
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
resolution: -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder: -> tp_version_tag is not unique when test runs with -R :
___
Python tracker
<https://bugs.python
Mark Shannon added the comment:
New changeset 1a511dc92dd10ee8fc2e5da9f52f795924bdc89a by Mark Shannon in
branch 'main':
bpo-44914: Maintain invariants of type version tags. (GH-27773)
https://github.com/python/cpython/commit/1a511dc92dd10ee8fc2e5da9f52f795924bdc89a
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
New changeset 4f51fa9e2d3ea9316e674fb9a9f3e3112e83661c by Mark Shannon in
branch 'main':
bpo-44900: Add five superinstructions. (GH-27741)
https://github.com/python/cpython/commit/4f51fa9e2d3ea9316e674fb9a9f3e3112e83661c
Mark Shannon added the comment:
New changeset d84d2c4985457733602d46dc4ee77290da4e9539 by Ken Jin in branch
'main':
bpo-44914: Add tests for some invariants of tp_version_tag (GH-27774)
https://github.com/python/cpython/commit/d84d2c4985457733602d46dc4ee77290da4e9539
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26296
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27832
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
If the problem is that methodcaller is not faster than a lambda, then why not
use a lambda?
Lambdas are just Python functions and calling them will get faster.
We aren't going to spend time optimizing calls to methodcaller, so you might as
well use a lambda
New submission from Mark Shannon :
Specializing BINARY_ADD is worthwhile for two reasons:
Specializing for ints, floats and strings may give us some small speedup.
It removes the complex checks for the special case of extending a string, `s =
s + ...` from the normal instruction
New submission from Mark Shannon :
"Medium" integers are those with a single internal digit or zero.
Medium integers are integers in the range -2**30 to +2**30 on 64 bit machines.
"Small" integers, -5 to 256 are cached, but are represented as medium integers
in
Mark Shannon added the comment:
I'm somewhat surprised by that. After all, the only change in control flow was
the change from a break to a goto in exception handling.
I would have expected PR27726 to have made much more difference.
There are a few possibilities, including:
1. It's just
Mark Shannon added the comment:
It is not `PyCode_Addr2Line()` that has changed, but `frame->f_lasti`.
If you call
`PyCode_Addr2Line(frame->f_code, 8)` in 3.9
you get the same behavior as calling
`PyCode_Addr2Line(frame->f_code, 8)` in 3.10.
Assuming the bytecode is
Mark Shannon added the comment:
This looks like a duplicate of https://bugs.python.org/issue42951
--
nosy: +Mark.Shannon
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
A recursion limit of 30 is effectively infinite.
With a debug build of 3.11, the time to execute grows very fast indeed,
probably super-exponentially.
mark@nero:~/repos/cpython$ time ./python ~/test/test.py 15
real0m1.107s
user0m1.099s
sys
Mark Shannon added the comment:
Just changes to longobject.c.
There are still various minor inefficiencies in testing to see whether an int
is a medium value, and then throwing away size information before creating
result objects.
I'm not expecting this to make much difference, but every
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26766
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28352
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 11cdf2a6702639571554cbf3f69f57d688564540 by Mark Shannon in
branch 'main':
bpo-45203: Cleanup stats gathering code for LOAD_METHOD (GH-28352)
https://github.com/python/cpython/commit/11cdf2a6702639571554cbf3f69f57d688564540
New submission from Mark Shannon :
The stats for BINARY_SUBSCR and to a lesser amount LOAD_METHOD don't tell us
much about what isn't being specialized.
We should refine the stats to give us a better idea of what to optimize for.
--
assignee: Mark.Shannon
components: Interpreter Core
Mark Shannon added the comment:
New changeset c2f1e953371c25f6c42b599ba3d8797effbb503e by Irit Katriel in
branch 'main':
bpo-45152: Add HAS_CONST macro and get_const_value() function and useā¦ (#28262)
https://github.com/python/cpython/commit/c2f1e953371c25f6c42b599ba3d8797effbb503e
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26802
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28389
___
Python tracker
<https://bugs.python.org/issu
Mark Shannon added the comment:
New changeset 064464fc38269e70f7e3a34cb25fc9085ab85782 by Mark Shannon in
branch 'main':
bpo-45219: Factor dictkey indexing (GH-28389)
https://github.com/python/cpython/commit/064464fc38269e70f7e3a34cb25fc9085ab85782
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Mark Shannon :
Currently, if a dictionary is split, then the dictionary owns the memory for
the values. Unless the values is the unique empty-values array.
In order to support lazily created dictionaries for objects (see
https://github.com/faster-cpython/ideas/issues/72
Mark Shannon added the comment:
An alternative placement for the flag bits:
Stride bits in the dictkeys.
Ownership bits in the low bits of ma_used.
This would still allow us to remove the version tag at some point.
--
___
Python tracker
<ht
New submission from Mark Shannon :
Specialization and other optimizations rely on shared dictionary key properties
(version number, no deletions, etc).
However checking those properties during specialization is tricky and rather
clunky as the dict-keys can only be tested indirectly through
Change by Mark Shannon :
--
pull_requests: -25653
___
Python tracker
<https://bugs.python.org/issue44570>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Mark Shannon :
--
keywords: +patch
nosy: +Mark.Shannon
nosy_count: 1.0 -> 2.0
pull_requests: +25654
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27109
___
Python tracker
<https://bugs.python.org/i
Mark Shannon added the comment:
Thanks Ned, you're doing a fantastic job of finding these issues.
Sorry for keeping you so busy with this.
This one was a latent bug, exposed by fixing https://bugs.python.org/issue44570.
--
___
Python tracker
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +25655
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27109
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
pull_requests: -25654
___
Python tracker
<https://bugs.python.org/issue44614>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Mark Shannon :
--
pull_requests: +25653
pull_request: https://github.com/python/cpython/pull/27109
___
Python tracker
<https://bugs.python.org/issue44
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
New changeset f333ab0f2edec26a769ed558263ac662e5475451 by Mark Shannon in
branch 'main':
bpo-44622: Set line number of END_ASYNC_FOR to match that of iterator.
(GH-27160)
https://github.com/python/cpython/commit/f333ab0f2edec26a769ed558263ac662e5475451
Change by Mark Shannon :
--
pull_requests: +25700
pull_request: https://github.com/python/cpython/pull/27163
___
Python tracker
<https://bugs.python.org/issue44
Mark Shannon added the comment:
https://github.com/python/cpython/pull/18334 assumes that since all loops will
contain a backwards edge, checking for interrupts on JUMP_ABSOLUTE should be
sufficient.
However, https://github.com/python/cpython/pull/23743 changed the back edges in
while
Mark Shannon added the comment:
New changeset 641345d636320a6fca04a5271fa4c4c5ba3e5437 by Irit Katriel in
branch 'main':
bpo-26280: Port BINARY_SUBSCR to PEP 659 adaptive interpreter (GH-27043)
https://github.com/python/cpython/commit/641345d636320a6fca04a5271fa4c4c5ba3e5437
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +25697
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27160
___
Python tracker
<https://bugs.python.org/issu
New submission from Mark Shannon :
class C:
def __init__(self, cond):
if cond:
self.a = 1
self.b = 2
c1 = C(True)
c2 = C(False)
In Python 3.5, the dictionary keys are shared
-
>>> sys.getsize
Mark Shannon added the comment:
New changeset e5c8ddb1714fb51ab1defa24352c98e0f01205dc by Serhiy Storchaka in
branch 'main':
bpo-44707: Fix an undefined behavior of the null pointer arithmetic (GH-27292)
https://github.com/python/cpython/commit/e5c8ddb1714fb51ab1defa24352c98e0f01205dc
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
This isn't a bug. Although PEP 626 is not at all clear about this.
The key word in the PEP is "executed".
Because compound and multi-line constants are constants, the parts of them are
not "executed", but computed at compile time.
Ha
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Mark Shannon added the comment:
New changeset ac75f6bdd4748b3378dd321f862d13aa1898f77a by Mark Shannon in
branch 'main':
bpo-44826: Specialize STORE_ATTR (GH-27590)
https://github.com/python/cpython/commit/ac75f6bdd4748b3378dd321f862d13aa1898f77a
Mark Shannon added the comment:
New changeset b854557b49083d8625a433eb36aacb0c87d67c52 by Mark Shannon in
branch 'main':
bpo-44840: Compiler: Move duplication of exit blocks with no line numbers to
after CFG optimization. (GH-27656)
https://github.com/python/cpython/commit
Change by Mark Shannon :
--
pull_requests: +26161
pull_request: https://github.com/python/cpython/pull/27673
___
Python tracker
<https://bugs.python.org/issue44
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> performance
___
Python tracker
<https://bugs.python
Change by Mark Shannon :
--
pull_requests: +26193
pull_request: https://github.com/python/cpython/pull/27708
___
Python tracker
<https://bugs.python.org/issue44
New submission from Mark Shannon :
On entering the interpreter (_PyEval_EvalFrameDefault) we need to check for
tracing in order to record the call.
However, we don't do this cleanly resulting in slow dispatch to the
non-quickened instruction on every call/next.
--
assignee
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26150
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27656
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26199
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27715
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
pull_requests: +26205
pull_request: https://github.com/python/cpython/pull/27725
___
Python tracker
<https://bugs.python.org/issue44
New submission from Mark Shannon :
PEP 659 quickening provides a mechanism for replacing instructions.
We should exploit this to implement superinstructions when quickening.
See https://github.com/faster-cpython/ideas/issues/16
--
messages: 399444
nosy: Mark.Shannon
priority: normal
Change by Mark Shannon :
--
keywords: +patch
pull_requests: +26220
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27741
___
Python tracker
<https://bugs.python.org/issu
Change by Mark Shannon :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
701 - 800 of 1194 matches
Mail list logo