[Python-Dev] Re: Compiling of ast.Module in Python 3.10 and co_firstlineno behavior

2022-02-18 Thread Mark Shannon
Hi Fabio, On 17/02/2022 7:30 pm, Fabio Zadrozny wrote: Em qui., 17 de fev. de 2022 às 16:05, Mark Shannon mailto:m...@hotpy.org>> escreveu: Hi Fabio, This happened as part of implementing PEP 626. The previous behavior isn't very robust w.r.t doc strings and compiler optimizat

[Python-Dev] Re: Compiling of ast.Module in Python 3.10 and co_firstlineno behavior

2022-02-18 Thread Fabio Zadrozny
Em qui., 17 de fev. de 2022 às 17:55, Gabriele escreveu: > Hi Fabio > > Does the actual function object get re-created as well during the > recompilation process that you have described? Perhaps it might help > to note that the __code__ attribute of a function object f can be > mutated and that f

[Python-Dev] Re: Compiling of ast.Module in Python 3.10 and co_firstlineno behavior

2022-02-17 Thread Gabriele
Hi Fabio Does the actual function object get re-created as well during the recompilation process that you have described? Perhaps it might help to note that the __code__ attribute of a function object f can be mutated and that f is hashable? Cheers, Gabriele On Thu, 17 Feb 2022 at 19:33, Fabio Z

[Python-Dev] Re: Compiling of ast.Module in Python 3.10 and co_firstlineno behavior

2022-02-17 Thread Fabio Zadrozny
Em qui., 17 de fev. de 2022 às 16:05, Mark Shannon escreveu: > Hi Fabio, > > This happened as part of implementing PEP 626. > The previous behavior isn't very robust w.r.t doc strings and > compiler optimizations. > > OOI, why would you want to revert to the old behavior? > > Hi Mark, The issue

[Python-Dev] Re: Compiling of ast.Module in Python 3.10 and co_firstlineno behavior

2022-02-17 Thread Mark Shannon
Hi Fabio, This happened as part of implementing PEP 626. The previous behavior isn't very robust w.r.t doc strings and compiler optimizations. OOI, why would you want to revert to the old behavior? Cheers, Mark. On 17/02/2022 5:52 pm, Fabio Zadrozny wrote: Hi all, I'm stumbling with an issue