[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-11-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I may not know the what is the average airspeed velocity of a laden swallow, 
but I know the average speed of adding a LOAD_METHOD opcode cache as in PR 
23503 (measured with PGO + LTO + CPU isolation):

+-+--+---+
| Benchmark   | 2020-11-24_18-08-master-0ec34cab9dd4 | 
2020-11-24_19-41-load_method-0c43ca99644b |
+=+==+===+
| pidigits| 266 ms   | 233 ms: 
1.14x faster (-12%)   |
+-+--+---+
| regex_v8| 32.7 ms  | 30.4 ms: 
1.07x faster (-7%)   |
+-+--+---+
| unpickle| 17.7 us  | 17.1 us: 
1.04x faster (-4%)   |
+-+--+---+
| scimark_sparse_mat_mult | 6.21 ms  | 5.99 ms: 
1.04x faster (-3%)   |
+-+--+---+
| go  | 283 ms   | 274 ms: 
1.03x faster (-3%)|
+-+--+---+
| mako| 20.4 ms  | 19.9 ms: 
1.03x faster (-3%)   |
+-+--+---+
| pickle_pure_python  | 546 us   | 531 us: 
1.03x faster (-3%)|
+-+--+---+
| logging_simple  | 9.58 us  | 9.34 us: 
1.03x faster (-3%)   |
+-+--+---+
| telco   | 8.21 ms  | 8.03 ms: 
1.02x faster (-2%)   |
+-+--+---+
| regex_effbot| 3.97 ms  | 3.88 ms: 
1.02x faster (-2%)   |
+-+--+---+
| regex_dna   | 267 ms   | 261 ms: 
1.02x faster (-2%)|
+-+--+---+
| pathlib | 21.2 ms  | 21.7 ms: 
1.02x slower (+2%)   |
+-+--+---+
| xml_etree_iterparse | 129 ms   | 132 ms: 
1.02x slower (+2%)|
+-+--+---+
| xml_etree_parse | 186 ms   | 193 ms: 
1.03x slower (+3%)|
+-+--+---+

Not significant (46): scimark_fft; nbody; pickle; pickle_list; pickle_dict; 
logging_format; scimark_lu; deltablue; chaos; meteor_contest; 
sqlalchemy_imperative; scimark_sor; raytrace; scimark_monte_carlo; 
sympy_integrate; unpickle_pure_python; dulwich_log; logging_silent; nqueens; 
json_loads; crypto_pyaes; hexiom; django_template; sympy_str; regex_compile; 
sympy_expand; xml_etree_generate; unpack_sequence; spectral_norm; 
xml_etree_process; sqlite_synth; genshi_xml; pyflate; json_dumps; 
python_startup_no_site; 2to3; python_startup; genshi_text; unpickle_list; 
fannkuch; sympy_sum; sqlalchemy_declarative; chameleon; float; richards; 
tornado_http;

--

___
Python tracker 
<https://bugs.python.org/issue42115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-11-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22392
pull_request: https://github.com/python/cpython/pull/23503

___
Python tracker 
<https://bugs.python.org/issue42115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42454] Move slice creation to the compiler for constants

2020-11-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Unless we see something fundamentally broken with the hashability, I am +1 on 
this. Even if it does not show in macro benchmarks over the 3% mark, the 
microbenchmarks are positive and the code changes are very scoped, so there is 
not a maintainability problem IMHO

--

___
Python tracker 
<https://bugs.python.org/issue42454>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 87c87b5bd6f6a5924b485398f353308410f9d8c1 by Pablo Galindo in 
branch '3.9':
[3.9] bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332) 
(GH-2)
https://github.com/python/cpython/commit/87c87b5bd6f6a5924b485398f353308410f9d8c1


--

___
Python tracker 
<https://bugs.python.org/issue42381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks a lot Victor

--

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22245
pull_request: https://github.com/python/cpython/pull/23351

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22244
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23350

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset fa96608513b6eafe48777f1a5504134939dcbebc by Pablo Galindo in 
branch 'master':
bpo-41625: Add versionadded to os.splice() constants (GH-23340)
https://github.com/python/cpython/commit/fa96608513b6eafe48777f1a5504134939dcbebc


--

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +22231
pull_request: https://github.com/python/cpython/pull/23340

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Do you mean "Linux kernel >= 2.6.17 and glibc >= 2.5" ?

My understanding is that glibc provides emulation for glibc >= 2.5

The section from the manpage says:

   The splice() system call first appeared in Linux 2.6.17; library
   support was added to glibc in version 2.5.

Not sure how to interpret that. You want to change the "or" to "and"?

--

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40939] Remove the old parser

2020-11-17 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> This code is non-trivial :-( Should we provide a *new* C function doing that?

We could discuss adding a new C function, but IMHO that code is not especially 
horrible or unreadable. I agree it could be simpler, though.

--

___
Python tracker 
<https://bugs.python.org/issue40939>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +1
pull_request: https://github.com/python/cpython/pull/2

___
Python tracker 
<https://bugs.python.org/issue42381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b0aba1fcdc3da952698d99aec2334faa79a8b68c by Pablo Galindo in 
branch 'master':
bpo-42381: Allow walrus in set literals and set comprehensions (GH-23332)
https://github.com/python/cpython/commit/b0aba1fcdc3da952698d99aec2334faa79a8b68c


--

___
Python tracker 
<https://bugs.python.org/issue42381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-16 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41625] Add splice() to the os module

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset a57b3d30f66c90f42da751bf82256b9b22961ed0 by Pablo Galindo in 
branch 'master':
bpo-41625: Expose the splice() system call in the os module (GH-21947)
https://github.com/python/cpython/commit/a57b3d30f66c90f42da751bf82256b9b22961ed0


--

___
Python tracker 
<https://bugs.python.org/issue41625>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

> Nagging question — is there sufficient difference between {x := y} and {x: y} 
> ?

I think there is enough distinction, yes. It will also be a bit odd if is 
allowed in list and list comps but not set and set comps

--

___
Python tracker 
<https://bugs.python.org/issue42381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The only question left is that if we should allow this on dict literals and 
dict comprehensions as well (because these constructs have a ":" in the middle 
that can be noisy if there are walrus, the answer isn't immediately obvious to 
me).

--

___
Python tracker 
<https://bugs.python.org/issue42381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Apparently we currently don't allow walruses in set literals either:

>>> {y := 4, 4**2, 3**3}
  File "", line 1
{y := 4, 4**2, 3**3}
   ^
SyntaxError: invalid syntax

But they should be allowed as well per PEP 572 (as the pep mentions all 
comprehensions):

There is one special case: an assignment expression occurring in a list, set or 
dict comprehension or in a generator expression (below collectively referred to 
as "comprehensions") binds the target in ...

--

___
Python tracker 
<https://bugs.python.org/issue42381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +0
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23332

___
Python tracker 
<https://bugs.python.org/issue42381>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40939] Remove the old parser

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> The removals are documented, but the developers who are affected have no clue 
> what to do. What do you think?

Here is difficult to recommend a canonical Path because as I mentioned, there 
is no replacement for these functions because that functions returned CST nodes 
and those not exist anymore.

--

___
Python tracker 
<https://bugs.python.org/issue40939>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40939] Remove the old parser

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Pablo, have you already started on this? I didn't see your comment earlier 
> and I've got a PR ready.

Yeah, but don't worry: submit your PR and I will review it :)

--

___
Python tracker 
<https://bugs.python.org/issue40939>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42373] PEP 626 does not specify behavior of tracing for keywords.

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Mark, could you kindly create a proposed update to the PEP in the form of a PR 
so I can evaluate it and we can iterate directly over the final specification?

--

___
Python tracker 
<https://bugs.python.org/issue42373>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40939] Remove the old parser

2020-11-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I will submit a PR today

--

___
Python tracker 
<https://bugs.python.org/issue40939>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40939] Remove the old parser

2020-11-12 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> By the way, is there a replacement for this function? The unbound project 
> uses it to display a SyntaxError when PyRun_SimpleFile() fails.

There is no replacement for the function because that function returned CST 
nodes and those not exist anymore.

--

___
Python tracker 
<https://bugs.python.org/issue40939>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Hummm, I think the gains of having the .o over the .a are very very small as 
you can almost recreate anything you want with the .o using the .a and a small 
initialization function unless I am missing something.

--

___
Python tracker 
<https://bugs.python.org/issue42307>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/

2020-11-10 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> But... does any user really build Python manually after Python is installed? 
> The Python build system couldn't handle that as part of the regular build? 
> Maybe using a new configure --enable-static flag?

Embedding? But they should use the .a not any of the .o. Object files should 
not be packaged IMHO.

--

___
Python tracker 
<https://bugs.python.org/issue42307>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26389] Expand traceback module API to accept just an exception as an argument

2020-11-05 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue26389>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26389] Expand traceback module API to accept just an exception as an argument

2020-11-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 91e93794d5dd1aa91fbe142099c2955e0c4c1660 by Zackery Spytz in 
branch 'master':
bpo-26389: Allow passing an exception object in the traceback module (GH-22610)
https://github.com/python/cpython/commit/91e93794d5dd1aa91fbe142099c2955e0c4c1660


--
nosy: +pablogsal

___
Python tracker 
<https://bugs.python.org/issue26389>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-05 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 80449f243b13311d660eab3a751648029bcdd833 by Pablo Galindo in 
branch 'master':
bpo-42266: Handle monkey-patching descriptors in LOAD_ATTR cache (GH-23157)
https://github.com/python/cpython/commit/80449f243b13311d660eab3a751648029bcdd833


--

___
Python tracker 
<https://bugs.python.org/issue42266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +22068
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23157

___
Python tracker 
<https://bugs.python.org/issue42266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

s/the attribute itself is a class/the attribute itself is in the class/

--

___
Python tracker 
<https://bugs.python.org/issue42266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We could also store the tag of the type object if is a descriptor and compare 
against that on the cache hit to check that our assumptions are valid. The 
price here would be an extra pointer on the cache per opcode that may not even 
be used most of the time.

--

___
Python tracker 
<https://bugs.python.org/issue42266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yury, any preference here?

--
nosy: +yselivanov

___
Python tracker 
<https://bugs.python.org/issue42266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Given that having attributes that are classes is quite uncommon, I think we can 
not optimize of the attribute itself is a class instead of checking for 
descriptors on every hit, hurting the performance gains

--

___
Python tracker 
<https://bugs.python.org/issue42266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42266] LOAD_ATTR cache does not fully replicate PyObject_GetAttr behavior

2020-11-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Good catch, Kevin! Would you like to submit a PR for fixing this?

--

___
Python tracker 
<https://bugs.python.org/issue42266>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35455] Solaris: thread_time doesn't work with current implementation

2020-11-04 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:


New changeset a12f459ec2a31b96a21c735eb18f3d0fd19e99ff by Jakub Kulík in branch 
'3.8':
[3.8] bpo-35455: Fix thread_time for Solaris OS (GH-8). (GH-23145)
https://github.com/python/cpython/commit/a12f459ec2a31b96a21c735eb18f3d0fd19e99ff


--

___
Python tracker 
<https://bugs.python.org/issue35455>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35455] Solaris: thread_time doesn't work with current implementation

2020-11-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 72bb4c6c1fc5f5209819a2e62d55475ddc888192 by Miss Skeleton (bot) 
in branch '3.9':
bpo-35455: Fix thread_time for Solaris OS (GH-8) (GH-23130)
https://github.com/python/cpython/commit/72bb4c6c1fc5f5209819a2e62d55475ddc888192


--

___
Python tracker 
<https://bugs.python.org/issue35455>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42251] Add threading.gettrace and threading.getprofile

2020-11-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 0001a1b69ecda47b0406daa88c2943877580bcae by Mario Corchero in 
branch 'master':
bpo-42251: Add gettrace and getprofile to threading (GH-23125)
https://github.com/python/cpython/commit/0001a1b69ecda47b0406daa88c2943877580bcae


--
nosy: +pablogsal

___
Python tracker 
<https://bugs.python.org/issue42251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42251] Add threading.gettrace and threading.getprofile

2020-11-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42251>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42246] Implement PEP 626

2020-11-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Dead code elimination will remove the `secret_debugging_code()`, but leave 
> the test. The peephole optimiser can then reduce it to a NOP, but won't 
> eliminate it as it is the only instruction for line 1.

Gotcha. I am pretty sure that this will have a similar problem as the coverage 
people were claiming when we were not properly removing all dead code (slightly 
less coverage percentage). This is not a problem of course, but we should ping 
the coverage folks so they are aware of this.

--

___
Python tracker 
<https://bugs.python.org/issue42246>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42250] test_ast leaked [23640, 23636, 23640] references

2020-11-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
components: +Tests
nosy: +BTaskaya, vstinner -pablogsal
versions: +Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42250>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42250] test_ast leaked [23640, 23636, 23640] references

2020-11-03 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
assignee:  -> vstinner

___
Python tracker 
<https://bugs.python.org/issue42250>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42250] test_ast leaked [23640, 23636, 23640] references

2020-11-03 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/205/builds/83

OK
..
test_ast leaked [23640, 23636, 23640] references, sum=70916
test_ast leaked [7932, 7930, 7932] memory blocks, sum=23794
1 test failed again:
test_ast

--
messages: 380269
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_ast leaked [23640, 23636, 23640] references

___
Python tracker 
<https://bugs.python.org/issue42250>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42180] Missing a plural in library/functions

2020-11-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 6b7a90db362253d67201c2a438a3f38f1ec6180c by Miss Skeleton (bot) 
in branch '3.9':
bpo-42180: fix plural in arguments and control (GH-23015) (GH-23114)
https://github.com/python/cpython/commit/6b7a90db362253d67201c2a438a3f38f1ec6180c


--

___
Python tracker 
<https://bugs.python.org/issue42180>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35455] Solaris: thread_time doesn't work with current implementation

2020-11-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue35455>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35455] Solaris: thread_time doesn't work with current implementation

2020-11-02 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:


New changeset 9568622c9983b682b2a2a7bacfd3c341028ea099 by Jakub Kulík in branch 
'master':
bpo-35455: Fix thread_time for Solaris OS (GH-8)
https://github.com/python/cpython/commit/9568622c9983b682b2a2a7bacfd3c341028ea099


--
nosy: +pablogsal

___
Python tracker 
<https://bugs.python.org/issue35455>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42246] Implement PEP 626

2020-11-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm happy that we are removing BEGIN_DO_NOT_EMIT_BYTECODE and 
END_DO_NOT_EMIT_BYTECODE but could you elaborate how this is related? These 
macros protect the compiler from emitting bytecode that corresponds to deaf 
code and by definition, unreachable. Could you give an example of a situation 
in which they create something that messes up the line numbers? Is this 
something to be with cleanup blocks in dead code or something similar?

--

___
Python tracker 
<https://bugs.python.org/issue42246>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2020-11-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset aca67da4fe68d5420401ac1782203d302875eb27 by Jason R. Coombs in 
branch 'master':
Revert "bpo-37193: remove thread objects which finished process its request 
(GH-13893)" (GH-23107)
https://github.com/python/cpython/commit/aca67da4fe68d5420401ac1782203d302875eb27


--

___
Python tracker 
<https://bugs.python.org/issue37193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37193] Memory leak while running TCP/UDPServer with socketserver.ThreadingMixIn

2020-11-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Commit c41559021213cfc9dc62a83fc63306b3bdc3e64b has introduced reference leaks:

--
Ran 202 tests in 21.654s
OK (skipped=1)
..
test_logging leaked [20, 20, 20] references, sum=60
test_logging leaked [20, 20, 20] memory blocks, sum=60
2 tests failed again:
test_logging test_socketserver
== Tests result: FAILURE then FAILURE ==

Example buildbot failure:

https://buildbot.python.org/all/#/builders/562/builds/79/steps/5/logs/stdio

As there is a release of 3.10 alpha 2 tomorrow I would be great if this could 
be fixed by tomorrow.

--
nosy: +pablogsal

___
Python tracker 
<https://bugs.python.org/issue37193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42190] global declarations affect too much inside exec or compile

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> Maybe someone can bisect and find when this started happening?

As far as I understand, this has been the case since Python 2 at least:

$cat code.py
gdict = {}
ldict = {}
exec('''
x = 1
def f(): global x''', gdict, ldict)
print(('x' in gdict, 'x' in ldict))


gdict = {}
ldict = {}
exec('''
x = 1
def f(): pass''', gdict, ldict)
print(('x' in gdict, 'x' in ldict))


$ python2 code.py
(True, False)
(False, True)

$ python3.9 code.py
(True, False)
(False, True)

--

___
Python tracker 
<https://bugs.python.org/issue42190>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ddcd57e3ea75ab0ad370bbaaa6b76338edbca395 by Pablo Galindo in 
branch '3.9':
[3.9] bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the 
barry_as_flufl rule (GH-23048) (GH-23051)
https://github.com/python/cpython/commit/ddcd57e3ea75ab0ad370bbaaa6b76338edbca395


--

___
Python tracker 
<https://bugs.python.org/issue42214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +21970
pull_request: https://github.com/python/cpython/pull/23051

___
Python tracker 
<https://bugs.python.org/issue42214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 06f8c3328dcd81c84d1ee2b3a57b5381dcb38482 by Pablo Galindo in 
branch 'master':
bpo-42214: Fix check for NOTEQUAL token in the PEG parser for the 
barry_as_flufl rule (GH-23048)
https://github.com/python/cpython/commit/06f8c3328dcd81c84d1ee2b3a57b5381dcb38482


--

___
Python tracker 
<https://bugs.python.org/issue42214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42214] Parser/pegen.c:68: _PyPegen_check_barry_as_flufl: Assertion `t->type == NOTEQUAL' failed

2020-10-30 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +21966
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23048

___
Python tracker 
<https://bugs.python.org/issue42214>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42173] Drop Solaris support

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Discussions are happening in this thread, including the requirements for 
supported platforms going forward:

https://mail.python.org/archives/list/python-...@python.org/thread/VDD7NMEDFXMOP4S74GEYJUHJRJPK2UR3/

--

___
Python tracker 
<https://bugs.python.org/issue42173>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42042] sphinx3 renders diffrently docs.python.org for 3.10

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> I would like to suggest as release bloker, if you don't agree you can change 
> it ;)

This is indeed a release blocker, but likely for the beta/release candidate 
phases.

--

___
Python tracker 
<https://bugs.python.org/issue42042>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3af4b585527743e455145d294049c46b7c823ed9 by Batuhan Taskaya in 
branch 'master':
bpo-42206: Propagate and raise errors from PyAST_Validate in the parser 
(GH-23035)
https://github.com/python/cpython/commit/3af4b585527743e455145d294049c46b7c823ed9


--

___
Python tracker 
<https://bugs.python.org/issue42206>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This will slow down the parser massively. The reason we went' with the assert 
is so we only do the check in debug mode. We could propagate if you want, but 
it needs to be surrounded by debug preprocessor checks.

--

___
Python tracker 
<https://bugs.python.org/issue42206>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42206] Pegen: Raise errors occurred by the AST validator

2020-10-30 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> This will slow down the parser massively. The reason we went' with the assert 
> is so we only do the check in debug mode. We could propagate if you want, but 
> it needs to be surrounded by debug preprocessor checks.

Oh, I just checked and it currently is surrounded. Nevermind

--

___
Python tracker 
<https://bugs.python.org/issue42206>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42180] Missing a plural in library/functions

2020-10-29 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42180>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42180] Missing a plural in library/functions

2020-10-29 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b76a8400217827e604ebb543f45156f3caacd9a0 by Rafael Fontenelle in 
branch 'master':
bpo-42180: fix plural in arguments and control (GH-23015)
https://github.com/python/cpython/commit/b76a8400217827e604ebb543f45156f3caacd9a0


--
nosy: +pablogsal

___
Python tracker 
<https://bugs.python.org/issue42180>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42164] Python fails to compile in the Fedora Stable LTO buildbots

2020-10-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> With LTO, compile.o requires an undefined _Py_Mangle symbol:


Yeah, now try to compile with LTO and CFLAGS='-O0'

--

___
Python tracker 
<https://bugs.python.org/issue42164>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42164] Python fails to compile in the Fedora Stable LTO buildbots

2020-10-26 Thread Pablo Galindo Salgado

New submission from Pablo Galindo Salgado :

I have been trying to diagnose this failure:

https://buildbot.python.org/all/#/builders/271/builds/710/steps/3/logs/stdio

it happens on these buildbots:

x86_64 fedora stable
ppc64le fedora stable (so 32 now)

It seems that CPython cannot be compiled with --with-lto regardless of the 
version:

https://buildbot.python.org/all/#/builders/336/builds/2145
https://buildbot.python.org/all/#/builders/426/builds/641
https://buildbot.python.org/all/#/builders/294/builds/986

This seems to indicate that something has changed in these buildbots somehow. 
Maybe the gcc installation is broken?

In my investigation, it seems that Python/compile.o is miscompiled.For example

FEDORA BUILDBOT with LTO:

[buildbot@python-builder2-rawhide cpython]$ nm Python/compile.o  | grep 
_Py_Mangle
In function ‘assemble_lnotab’,
inlined from ‘assemble_emit’ at Python/compile.c:5696:25,
inlined from ‘assemble’ at Python/compile.c:6038:18:
Python/compile.c:5650:19: warning: writing 1 byte into a region of size 0 
[-Wstringop-overflow=]
 5650 | *lnotab++ = k;
  |   ^
 U _Py_Mangle


MY ARCH LINUX SYSTEM:

❯ nm Python/compile.o  | grep _Py_Mangle
 T _Py_Mangle

It seems that the _Py_Mangle is not included in the object file. Is this a gcc 
bug? I have not been able to diagnose exactly where does this problem. It seems 
that the gcc version is "10.2.1" but I can correctly build CPython with LTO in 
my arch Linux machine with gcc 10.2.0.

Given that these are stable buildbots, could you investigate what is going on 
or report this to the gcc folks ar RedHat/Fedora? 



More interesting data:

Compiling with -O0 does not have a problem, but doing it with -O3 does.

With -O0:

[buildbot@python-builder2-rawhide cpython]$ nm Python/compile.o  | grep 
_Py_Mangle
 T _Py_Mangle

With -O3:

[buildbot@python-builder2-rawhide cpython]$ nm Python/compile.o  | grep 
_Py_Mangle
 U _Py_Mangle

--
components: Build
messages: 379696
nosy: cstratak, hroncok, pablogsal, petr.viktorin, vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Python fails to compile in the Fedora Stable LTO buildbots
type: compile error
versions: Python 3.10, Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue42164>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

My particular opinion is that I would advise against having more branching, 
especially for code that is rare: it augments the possibilities of branch 
mispredictions, the changes of untested code paths, and the possibilities of 
unknown interactions. In this case, I agree that the code is simple enough, but 
I still feel that the cost may not be worth the extra maintenance needs of 
those branches.

--

___
Python tracker 
<https://bugs.python.org/issue42147>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42150] Buffer overflow in bad_single_statement (Parser/pegen.c)

2020-10-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42150>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42150] Buffer overflow in bad_single_statement (Parser/pegen.c)

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e68c67805e6a4c4ec80bea64be0e8373cc02d322 by Pablo Galindo in 
branch 'master':
bpo-42150: Avoid buffer overflow in the new parser (GH-22978)
https://github.com/python/cpython/commit/e68c67805e6a4c4ec80bea64be0e8373cc02d322


--

___
Python tracker 
<https://bugs.python.org/issue42150>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42150] Buffer overflow in bad_single_statement (Parser/pegen.c)

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Check the errors in this new builder I have prepared:

https://buildbot.python.org/all/#/builders/582/builds/200/steps/5/logs/stdio

--
stage: patch review -> 

___
Python tracker 
<https://bugs.python.org/issue42150>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42150] Buffer overflow in bad_single_statement (Parser/pegen.c)

2020-10-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +21895
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22978

___
Python tracker 
<https://bugs.python.org/issue42150>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42150] Buffer overflow in bad_single_statement (Parser/pegen.c)

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The problem seems to be that when we do

const char *cur = strchr(p->tok->buf, '\n');
...

*(cur - 1) == '\\'

we don't check if "cur" is before at p->tok->buf (and therefore we cannot check 
the previous char)

--

___
Python tracker 
<https://bugs.python.org/issue42150>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42150] Buffer overflow in bad_single_statement (Parser/pegen.c)

2020-10-25 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Building Python with the address sanitizer and executing ./python -m test 
test_repl -v shows this:

===
==26216==ERROR: AddressSanitizer: heap-buffer-overflow on address 
0x6023990f at pc 0x5625406527b2 bp 0x7ffe8d621910 sp 0x7ffe8d621900
READ of size 1 at 0x6023990f thread T0
#0 0x5625406527b1 in bad_single_statement Parser/pegen.c:993
#1 0x5625406527b1 in _PyPegen_run_parser Parser/pegen.c:1136
#2 0x5625406529b8 in _PyPegen_run_parser_from_file_pointer 
Parser/pegen.c:1179
#3 0x5625403f1945 in PyRun_InteractiveOneObjectEx Python/pythonrun.c:208
#4 0x5625403f3cd9 in PyRun_InteractiveLoopFlags Python/pythonrun.c:115
#5 0x5625403f4e3f in PyRun_AnyFileExFlags Python/pythonrun.c:74
#6 0x562540181792 in pymain_run_stdin Modules/main.c:512
#7 0x562540181792 in pymain_run_python Modules/main.c:601
#8 0x562540182904 in Py_RunMain Modules/main.c:677
#9 0x562540182904 in pymain_main Modules/main.c:707
#10 0x562540182904 in Py_BytesMain Modules/main.c:731
#11 0x7f25297aa151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
#12 0x56254017f0bd in _start 
(/home/pablogsal/github/python/master/python+0x1640bd)

0x6023990f is located 1 bytes to the left of 2-byte region 
[0x60239910,0x60239912)
allocated by thread T0 here:
#0 0x7f2529b70459 in __interceptor_malloc 
/build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x562540553416 in tok_nextc Parser/tokenizer.c:872
#2 0x562540554eb7 in tok_get Parser/tokenizer.c:1190
#3 0x562540559590 in PyTokenizer_Get Parser/tokenizer.c:1839
#4 0x56254064f6dd in _PyPegen_fill_token Parser/pegen.c:584
#5 0x5625406934a7 in statement_newline_rule Parser/parser.c:1296
#6 0x5625406934a7 in interactive_rule Parser/parser.c:769
#7 0x5625406934a7 in _PyPegen_parse Parser/parser.c:24823
#8 0x562540652382 in _PyPegen_run_parser Parser/pegen.c:
#9 0x5625406529b8 in _PyPegen_run_parser_from_file_pointer 
Parser/pegen.c:1179
#10 0x5625403f1945 in PyRun_InteractiveOneObjectEx Python/pythonrun.c:208
#11 0x5625403f3cd9 in PyRun_InteractiveLoopFlags Python/pythonrun.c:115
#12 0x5625403f4e3f in PyRun_AnyFileExFlags Python/pythonrun.c:74
#13 0x562540181792 in pymain_run_stdin Modules/main.c:512
#14 0x562540181792 in pymain_run_python Modules/main.c:601
#15 0x562540182904 in Py_RunMain Modules/main.c:677
#16 0x562540182904 in pymain_main Modules/main.c:707
#17 0x562540182904 in Py_BytesMain Modules/main.c:731
#18 0x7f25297aa151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)

SUMMARY: AddressSanitizer: heap-buffer-overflow Parser/pegen.c:993 in 
bad_single_statement
Shadow bytes around the buggy address:
  0x0c0472d0: fa fa 00 04 fa fa 00 01 fa fa 00 04 fa fa 00 04
  0x0c0472e0: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa 00 04
  0x0c0472f0: fa fa 00 04 fa fa 00 04 fa fa 00 04 fa fa 00 07
  0x0c047300: fa fa 00 04 fa fa 00 04 fa fa 06 fa fa fa 00 fa
  0x0c047310: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
=>0x0c047320: fa[fa]02 fa fa fa fd fa fa fa fd fa fa fa fd fa
  0x0c047330: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047340: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047350: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047360: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c047370: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:   fa
  Freed heap region:   fd
  Stack left redzone:  f1
  Stack mid redzone:   f2
  Stack right redzone: f3
  Stack after return:  f5
  Stack use after scope:   f8
  Global redzone:  f9
  Global init order:   f6
  Poisoned by user:f7
  Container overflow:  fc
  Array cookie:ac
  Intra object redzone:bb
  ASan internal:   fe
  Left alloca redzone: ca
  Right alloca redzone:cb
  Shadow gap:  cc
==26216==ABORTING

--
components: Interpreter Core
messages: 379607
nosy: lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Buffer overflow in bad_single_statement (Parser/pegen.c)
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42150>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42147] Micro optimization for longrange iteration if step is 1

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I concur with Serhiy

--
nosy: +pablogsal

___
Python tracker 
<https://bugs.python.org/issue42147>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41919] Modify test_codecs to use the new codecs.unregister() function

2020-10-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue41919>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42145] test_io is leaking references

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for the quick fix, hai shi

--

___
Python tracker 
<https://bugs.python.org/issue42145>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42145] test_io is leaking references

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Fixed by https://github.com/python/cpython/pull/22973

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42145>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41919] Modify test_codecs to use the new codecs.unregister() function

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 14cdc215aa952d280c18626005d3aff967901d92 by Hai Shi in branch 
'master':
bpo-41919: Avoid resource leak in test_io (GH-22973)
https://github.com/python/cpython/commit/14cdc215aa952d280c18626005d3aff967901d92


--

___
Python tracker 
<https://bugs.python.org/issue41919>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41919] Modify test_codecs to use the new codecs.unregister() function

2020-10-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +21877
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/22961

___
Python tracker 
<https://bugs.python.org/issue41919>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41919] Modify test_codecs to use the new codecs.unregister() function

2020-10-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

AS this is masking other issues in the build bots, we need to revert the commit 
unless is fixed in 24 hours per the buildbot workflow

--

___
Python tracker 
<https://bugs.python.org/issue41919>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41919] Modify test_codecs to use the new codecs.unregister() function

2020-10-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution: fixed -> 
status: closed -> open

___
Python tracker 
<https://bugs.python.org/issue41919>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42145] test_io is leaking references

2020-10-25 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Commit c9f696cb96d1c362d5cad871f61da520572d9b08 introduced a reference leak in 
the test suite. See https://bugs.python.org/issue42145:

c9f696cb96d1c362d5cad871f61da520572d9b08 is the first bad commit
commit c9f696cb96d1c362d5cad871f61da520572d9b08
Author: Hai Shi 
Date:   Fri Oct 16 16:34:15 2020 +0800

bpo-41919, test_codecs: Move codecs.register calls to setUp() (GH-22513)

Reverting the commit eliminates the problem:

rences, sum=12
test_io leaked [1, 1, 1, 1] memory blocks, sum=4
test_io failed

== Tests result: FAILURE ==

1 test failed:
test_io

Total duration: 397 ms
Tests result: FAILURE
g
~/github/python/master master|bisect*
❯ git revert c9f696cb96d1c362d5cad871f61da520572d9b08
Auto-merging Lib/test/test_codecs.py
[master f3de7c00b4] Revert "bpo-41919, test_codecs: Move codecs.register calls 
to setUp() (GH-22513)"
 7 files changed, 112 insertions(+), 16 deletions(-)

~/github/python/master master|bisect* ⇡
❯ make -j -s
 CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-g -Og -Wall'   
_TCLTK_INCLUDES='' _TCLTK_LIBS=''   ./python -E ./setup.py -q build

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  atexitpwd
time


~/github/python/master master|bisect* ⇡
❯ ./python -m test test_io -m 
test.test_io.CTextIOWrapperTest.test_read_one_by_one -R :
0:00:00 load avg: 2.57 Run tests sequentially
0:00:00 load avg: 2.57 [1/1] test_io
beginning 9 repetitions
123456789
.

== Tests result: SUCCESS ==

1 test OK.

Total duration: 455 ms
Tests result: SUCCESS

* Move the codecs' (un)register operation to testcases.
* Remove _codecs._forget_codec() and _PyCodec_Forget()

 Lib/test/test_charmapcodec.py|  7 +--
 Lib/test/test_codecs.py  | 25 +++--
 Lib/test/test_io.py  |  7 +++
 Lib/test/test_unicode.py |  5 -
 Modules/_codecsmodule.c  | 20 
 Modules/clinic/_codecsmodule.c.h | 39 +--
 Python/codecs.c  | 25 -
 7 files changed, 16 insertions(+), 112 deletions(-)

--

___
Python tracker 
<https://bugs.python.org/issue42145>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41919] Modify test_codecs to use the new codecs.unregister() function

2020-10-25 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Commit c9f696cb96d1c362d5cad871f61da520572d9b08 introduced a reference leak in 
the test suite. See https://bugs.python.org/issue42145:

c9f696cb96d1c362d5cad871f61da520572d9b08 is the first bad commit
commit c9f696cb96d1c362d5cad871f61da520572d9b08
Author: Hai Shi 
Date:   Fri Oct 16 16:34:15 2020 +0800

bpo-41919, test_codecs: Move codecs.register calls to setUp() (GH-22513)

Reverting the commit eliminates the problem:

rences, sum=12
test_io leaked [1, 1, 1, 1] memory blocks, sum=4
test_io failed

== Tests result: FAILURE ==

1 test failed:
test_io

Total duration: 397 ms
Tests result: FAILURE
g
~/github/python/master master|bisect*
❯ git revert c9f696cb96d1c362d5cad871f61da520572d9b08
Auto-merging Lib/test/test_codecs.py
[master f3de7c00b4] Revert "bpo-41919, test_codecs: Move codecs.register calls 
to setUp() (GH-22513)"
 7 files changed, 112 insertions(+), 16 deletions(-)

~/github/python/master master|bisect* ⇡
❯ make -j -s
 CC='gcc -pthread' LDSHARED='gcc -pthread -shared' OPT='-g -Og -Wall'   
_TCLTK_INCLUDES='' _TCLTK_LIBS=''   ./python -E ./setup.py -q build

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  atexitpwd
time


~/github/python/master master|bisect* ⇡
❯ ./python -m test test_io -m 
test.test_io.CTextIOWrapperTest.test_read_one_by_one -R :
0:00:00 load avg: 2.57 Run tests sequentially
0:00:00 load avg: 2.57 [1/1] test_io
beginning 9 repetitions
123456789
.

== Tests result: SUCCESS ==

1 test OK.

Total duration: 455 ms
Tests result: SUCCESS

* Move the codecs' (un)register operation to testcases.
* Remove _codecs._forget_codec() and _PyCodec_Forget()

 Lib/test/test_charmapcodec.py|  7 +--
 Lib/test/test_codecs.py  | 25 +++--
 Lib/test/test_io.py  |  7 +++
 Lib/test/test_unicode.py |  5 -
 Modules/_codecsmodule.c  | 20 
 Modules/clinic/_codecsmodule.c.h | 39 +--
 Python/codecs.c  | 25 -
 7 files changed, 16 insertions(+), 112 deletions(-)

--
nosy: +pablogsal

___
Python tracker 
<https://bugs.python.org/issue41919>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42145] test_io is leaking references

2020-10-24 Thread Pablo Galindo Salgado

New submission from Pablo Galindo Salgado :

❯ ./python -m test test_io -m 
test.test_io.CTextIOWrapperTest.test_read_one_by_one -R :
0:00:00 load avg: 1.59 Run tests sequentially
0:00:00 load avg: 1.59 [1/1] test_io
beginning 9 repetitions
123456789
.
test_io leaked [3, 3, 3, 3] references, sum=12
test_io leaked [1, 1, 1, 1] memory blocks, sum=4
test_io failed

== Tests result: FAILURE ==

1 test failed:
test_io

Total duration: 398 ms
Tests result: FAILURE

--
components: Tests
messages: 379564
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_io is leaking references
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42145>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-22 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +21838
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22907

___
Python tracker 
<https://bugs.python.org/issue42115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24165] Free list for single-digits ints

2020-10-22 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Inada-san, you can run pyperformance with this workaround:

python -m pip install pyperformance==1.0.0

We are fixing the error soon after 
https://discuss.python.org/t/pep-641-using-an-underscore-in-the-version-portion-of-python-3-10-compatibility-tags/5513
 lands

--
nosy: +pablogsal

___
Python tracker 
<https://bugs.python.org/issue24165>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> - Rewriting code objects in place is wrong, IMO: you always need to have a 
> way to deoptimize the entire thing, so you need to keep the original one. It 
> might be that you have well defined and static types for the first 1 
> invocations and something entirely different on 10001. So IMO we need a 
> SpecializedCode object with the necessary bailout guards.

Imagine that we have a secondary copy of the bytecode in the cache inside the 
code object and we mutate that instead. The key difference with the current 
cache infrastructure is that we don't accumulate all the optimizations on the 
same opcode, which can be very verbose. Instead, we change the generic opcode 
to a more specialised to optimize and we change it back to deoptimize. The 
advantage is that BINARY_SUBSCRIPT for example won't be this gigantic block of 
text that will do different things depending if is specialising for dicts or 
lists or tuples, but we will have a different opcode for every of them, which I 
think is much easier to manage.

--

___
Python tracker 
<https://bugs.python.org/issue42115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Also, many of these ideas are not new, and many of them are inspired or taken 
from Yury's email 
(https://mail.python.org/pipermail/python-dev/2016-January/142945.html) but I 
wanted to add that I think that with some coordination between us we can 
achieve some excellent speedups for Python 3.10!

--

___
Python tracker 
<https://bugs.python.org/issue42115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

To clarify what I mean with:

> - We could also do the same for operations like "some_container[]" if the 
> container is some builtin. We can substitute/specialize the opcode for 
> someone that directly uses built-in operations instead of the generic 
> BINARY_SUBSCR.

If a given function has a BINARY_SUBSCR opcode and when executing it a given 
number of times we see that the object to get the subscript is always a list, 
we change the BINARY_SUBSCR to BINARY_SUBSCR_FOR_LISTS and it that opcode we do 
a quick check for PyList_CheckExact and if is correct we call 
"Objects/listobject.c:list_subscript" directly and if is false we put back a 
BINARY_SUBSCR.

--

___
Python tracker 
<https://bugs.python.org/issue42115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2020-10-21 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

After https://bugs.python.org/issue42093 and https://bugs.python.org/issue26219 
is being clear that we can leverage some cache for different information in the 
evaluation loop to speed up CPython. This observation is also based on the fact 
that although Python is dynamic, there is plenty of code that does not exercise 
said dynamism and therefore factoring out the "dynamic" parts of the execution 
by using a cache mechanism can yield excellent results. 

So far we have two big improvements in performance for caching LOAD_ATTR and 
LOAD_GLOBAL (in some cases up to 10-14%) but I think we can do much much more. 
Here are some observations of what I think we can do:

* Instead of adding more caches using the current mechanism, which adds some 
inlined code in every opcode in the evaluation loop, we can try to formalize 
some kind of caching mechanism that has some better API that will allow adding 
more opcodes in the future. Having the code inline in ceval.c is going to 
become difficult to maintain if we keep adding more stuff directly there.

* Instead of handling the specialization in the same opcode as the original one 
(LOAD_ATTR is doing the slow and the fast path) we could mutate the original 
code object and replacing the slow and generic opcodes for the more specialized 
ones and these will also be in charge of changing it back to the generic and 
slow ones if the assumptions that activated them appear.

Obviously, mutating code objects is scary, so we could have some "specialized" 
version of the bytecode in the cache and use that if is present. Ideas that we 
could do with this cached stuff:

- For binary operators, we can grab both operands, resolve the addition 
function and cache that together with the types and the version tags and if the 
types and the version tags are the same, use directly the addition function 
instead of resolving it.

- For loading methods, we could cache the bound method as proposed by Yury 
originally here: 
https://mail.python.org/pipermail/python-dev/2016-January/142945.html.

- We could also do the same for operations like "some_container[]" if the 
container is some builtin. We can substitute/specialize the opcode for someone 
that directly uses built-in operations instead of the generic BINARY_SUBSCR.

The plan will be:

- Making some infrastructure/framework for the caching that allows us to 
optimize/deoptimize individual opcodes.
- Refactor the existing specialization for LOAD_GLOBAL/LOAD_ATTR to use said 
infrastructure.
- Thinking of what operations could benefit from specialization and start 
adding them one by one.

--
components: C API
messages: 379272
nosy: Mark.Shannon, methane, nascheme, pablogsal, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: Caching infrastructure for the evaluation loop: specialised opcodes
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue42115>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b451b0e9a772f009f4161f7a46476190d0d17ac1 by Pablo Galindo in 
branch 'master':
bpo-38980: Add -fno-semantic-interposition when building with optimizations 
(GH-22862)
https://github.com/python/cpython/commit/b451b0e9a772f009f4161f7a46476190d0d17ac1


--

___
Python tracker 
<https://bugs.python.org/issue38980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue38980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-21 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Victor is on vacation for some weeks, so I am creating a PR to push this 
forward.

--

___
Python tracker 
<https://bugs.python.org/issue38980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38980] Compile libpython with -fno-semantic-interposition

2020-10-21 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +21804
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22862

___
Python tracker 
<https://bugs.python.org/issue38980>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42093] Add opcode cache for LOAD_ATTR

2020-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue42093>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42093] Add opcode cache for LOAD_ATTR

2020-10-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 109826c8508dd02e06ae0f1784f1d202495a8680 by Pablo Galindo in 
branch 'master':
bpo-42093: Add opcode cache for LOAD_ATTR (GH-22803)
https://github.com/python/cpython/commit/109826c8508dd02e06ae0f1784f1d202495a8680


--

___
Python tracker 
<https://bugs.python.org/issue42093>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42093] Add opcode cache for LOAD_ATTR

2020-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +yselivanov

___
Python tracker 
<https://bugs.python.org/issue42093>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42093] Add opcode cache for LOAD_ATTR

2020-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +21760
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22803

___
Python tracker 
<https://bugs.python.org/issue42093>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42093] Add opcode cache for LOAD_ATTR

2020-10-19 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

>From the creators of "opcode cache for LOAD_GLOBAL" 
>(https://bugs.python.org/issue26219) now it's time for "opcode cache for 
>LOAD_ATTR: the revenge". This issue/PR builds on top of Yury's original patch 
>in the same way https://bugs.python.org/issue26219 did for LOAD_GLOBAL. 

These are the benchmark results for the pyperformance test suite with 
PGO/LTO/CPU ISOLATION in a tuned system with pyperf:

+-+--+-+
| Benchmark   | 2020-10-20_01-18-master-de73d432bb29 | 
2020-10-20_02-28-cache-68f931f6938a |
+=+==+=+
| go  | 407 ms   | 349 ms: 
1.17x faster (-14%) |
+-+--+-+
| raytrace| 822 ms   | 730 ms: 
1.13x faster (-11%) |
+-+--+-+
| unpickle_pure_python| 497 us   | 447 us: 
1.11x faster (-10%) |
+-+--+-+
| scimark_sor | 311 ms   | 280 ms: 
1.11x faster (-10%) |
+-+--+-+
| hexiom  | 15.4 ms  | 14.0 ms: 
1.10x faster (-9%) |
+-+--+-+
| logging_silent  | 302 ns   | 276 ns: 
1.10x faster (-9%)  |
+-+--+-+
| chaos   | 176 ms   | 163 ms: 
1.08x faster (-7%)  |
+-+--+-+
| pyflate | 1.01 sec | 948 ms: 
1.06x faster (-6%)  |
+-+--+-+
| scimark_lu  | 246 ms   | 232 ms: 
1.06x faster (-6%)  |
+-+--+-+
| pickle_pure_python  | 712 us   | 674 us: 
1.06x faster (-5%)  |
+-+--+-+
| regex_effbot| 4.49 ms  | 4.26 ms: 
1.05x faster (-5%) |
+-+--+-+
| scimark_monte_carlo | 160 ms   | 153 ms: 
1.05x faster (-5%)  |
+-+--+-+
| richards| 120 ms   | 115 ms: 
1.05x faster (-4%)  |
+-+--+-+
| 2to3| 458 ms   | 442 ms: 
1.04x faster (-4%)  |
+-+--+-+
| regex_v8| 33.7 ms  | 32.5 ms: 
1.04x faster (-3%) |
+-+--+-+
| scimark_sparse_mat_mult | 7.16 ms  | 6.93 ms: 
1.03x faster (-3%) |
+-+--+-+
| deltablue   | 12.1 ms  | 11.7 ms: 
1.03x faster (-3%) |
+-+--+-+
| regex_dna   | 268 ms   | 261 ms: 
1.03x faster (-3%)  |
+-+--+-+
| meteor_contest  | 152 ms   | 148 ms: 
1.03x faster (-3%)  |
+-+--+-+
| genshi_xml  | 89.0 ms  

[issue40484] Document existing compiler flags under ast

2020-10-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue40484>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >