[issue12575] add a AST validator

2021-03-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset eec8e61992fb654d4cf58de4d727c18622b8303e by Victor Stinner in 
branch 'master':
bpo-43244: Remove the PyAST_Validate() function (GH-24911)
https://github.com/python/cpython/commit/eec8e61992fb654d4cf58de4d727c18622b8303e


--

___
Python tracker 

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



[issue12575] add a AST validator

2021-03-17 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner
nosy_count: 8.0 -> 9.0
pull_requests: +23674
pull_request: https://github.com/python/cpython/pull/24911

___
Python tracker 

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



[issue12575] add a AST validator

2011-08-09 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 4090dfdf91a4 by Benjamin Peterson in branch 'default':
add a AST validator (closes #12575)
http://hg.python.org/cpython/rev/4090dfdf91a4

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-29 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

It'd be nice to get this in soon, so phase 2 can begin.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-22 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

From a top level view, the patch adds PyAST_Validate (with helpers) to ast.c 
and one call to PyAST_Validate in bltinmodule.c in builtin_compile(). The 
added tests do every silly thing you can think of.

Does PyAST_Validate get invoked for all calls to compile() or just those with 
an ast as input. To put it another way, does it validate *all* asts, including 
those generated by the code parser, or just user-constructed asts. If just the 
latter now, it seems that turning it on for parser asts at least temporarily 
could test that it does not invalidate valid code and could be used to test an 
ast-level optimizer.

Two obvious questions: 1) does this address a real problem that has happened in 
the field or something that just *might* happen; 2) what is the time penalty 
(compared to the time of compilation). I guess these amount to Is the 
maintenance burden on developers and speed burden on users worth the benefit?. 
In theory, I am in favor of anything that prevents segfaults. Would that ctypes 
use could be similarly validated (yes, this is a joke;-).

A last question, whose answer might depend on those above: given that the new 
function is not exposed to users, why not validate as part of compilation, to 
avoid walking the tree twice?

--
nosy: +terry.reedy
stage:  - patch review
type:  - feature request

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-22 Thread Alex Gaynor

Alex Gaynor alex.gay...@gmail.com added the comment:

1) Yes, it address a real concern that arose during Armin's GSOC project which 
has been developing a unified template compilation architecture (via the AST 
module) for Django and Jinja2.
2) Asking speed questions about this is silly IMO, if compiling functions is 
your bottleneck, your application design is very very broken.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-22 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy:  -terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-19 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-17 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-17 Thread Andreas Stührk

Changes by Andreas Stührk andy-pyt...@hammerhartes.de:


--
nosy: +Trundle

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-16 Thread Benjamin Peterson

New submission from Benjamin Peterson benja...@python.org:

The goal of this patch to keep people doing silly things like producing a Try 
with no finalbody or excepthandlers and segfaulting the compiler in unpleasant 
ways.

--
components: Interpreter Core
files: ast_validator.patch
keywords: patch
messages: 140505
nosy: benjamin.peterson, ncoghlan
priority: normal
severity: normal
status: open
title: add a AST validator
versions: Python 3.3
Added file: http://bugs.python.org/file22678/ast_validator.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-16 Thread Armin Ronacher

Armin Ronacher armin.ronac...@active-4.com added the comment:

I see what you did there :P

--
nosy: +aronacher

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-16 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
nosy: +alex

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12575] add a AST validator

2011-07-16 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

2011/7/16 Armin Ronacher rep...@bugs.python.org:

 Armin Ronacher armin.ronac...@active-4.com added the comment:

 I see what you did there :P

Is that a message of approval? :)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12575
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com