[issue46961] Caching/interning of small ints sometimes fails

2022-03-13 Thread Alex Waygood
Change by Alex Waygood : -- nosy: -AlexWaygood ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46961] Caching/interning of small ints sometimes fails

2022-03-13 Thread 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 ___

[issue46961] Caching/interning of small ints sometimes fails

2022-03-12 Thread Dennis Sweeney
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->ob_digit[0] = low &

[issue46961] Caching/interning of small ints sometimes fails

2022-03-08 Thread Brandt Bucher
Brandt Bucher added the comment: Related, except this seems to be happening in long_pow. I’ll take a look at it today. -- assignee: -> brandtbucher ___ Python tracker ___

[issue46961] Caching/interning of small ints sometimes fails

2022-03-08 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46961] Caching/interning of small ints sometimes fails

2022-03-08 Thread Alex Waygood
Alex Waygood added the comment: I think this might be a duplicate of Issue46361? -- nosy: +AlexWaygood ___ Python tracker ___ ___

[issue46961] Caching/interning of small ints sometimes fails

2022-03-08 Thread Steven D'Aprano
New submission from Steven D'Aprano : I'm reluctant to call this a bug, as small int interning/caching is an implementation detail and there are no hard guarantees made. But on the other hand, it seems that the intention is that small ints such as 0, 1 and 2 should be cached. Here are some