[issue35177] Add missing dependencies between AST/parser header files

2018-11-22 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, I fixed the "Yield warning" again.

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

___
Python tracker 

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



[issue35177] Add missing dependencies between AST/parser header files

2018-11-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3bb183d7fb83ad6a84ec13dea90f95d67be35c69 by Victor Stinner in 
branch 'master':
bpo-35177, Python-ast.h: Fix "Yield" compiler warning (GH-10664)
https://github.com/python/cpython/commit/3bb183d7fb83ad6a84ec13dea90f95d67be35c69


--

___
Python tracker 

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



[issue35177] Add missing dependencies between AST/parser header files

2018-11-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9917
stage: resolved -> patch review

___
Python tracker 

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



[issue35177] Add missing dependencies between AST/parser header files

2018-11-12 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, the Yield warning made its come back :-( Example:

  import.c
c:\program files (x86)\windows kits\10\include\10.0.17134.0\um\winbase.h(102): 
warning C4005: 'Yield': macro redefinition 
[C:\projects\cpython\PCbuild\pythoncore.vcxproj]
  c:\projects\cpython\include\python-ast.h(549): note: see previous definition 
of 'Yield'

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

___
Python tracker 

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



[issue35177] Add missing dependencies between AST/parser header files

2018-11-11 Thread STINNER Victor


STINNER Victor  added the comment:

This change doesn't try to fix "all dependencies issues", but it fix a few of 
them :-) See bpo-35197 for another example of funny header issue.

Please open a new issues if you see other header dependencies issues. I close 
this one since the initial bug has been fixed.

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

___
Python tracker 

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



[issue35177] Add missing dependencies between AST/parser header files

2018-11-11 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5f2df88b63e50d23914e97ec778861a52abdeaad by Victor Stinner in 
branch 'master':
bpo-35177: Add dependencies between header files (GH-10361)
https://github.com/python/cpython/commit/5f2df88b63e50d23914e97ec778861a52abdeaad


--

___
Python tracker 

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



[issue35177] Add missing dependencies between AST/parser header files

2018-11-06 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +9661
stage:  -> patch review

___
Python tracker 

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



[issue35177] Add missing dependencies between AST/parser header files

2018-11-06 Thread STINNER Victor


New submission from STINNER Victor :

Currently, there are *implicit* dependencies between AST/parser header files. 
For example, ast.h uses node and mod_ty types but don't include node.h nor 
Python-ast.h. And parsetok.h uses node and grammer but don't include nor 
grammar.h.

Because of that, C files have to include header files in the "correct order" 
and need to include header files even if they don't use directly.

At the end, we get something like pythonrun.c:

#include "Python-ast.h"
#include "pycore_state.h"
#include "grammar.h"
#include "node.h"
#include "token.h"
#include "parsetok.h"
#include "errcode.h"
#include "code.h"
#include "symtable.h"
#include "ast.h"
#include "marshal.h"
#include "osdefs.h"
#include 

whereas most header files are useless, pythonrun.c still compiles with:

#include "pycore_state.h"
#include "token.h"  /* INDENT in err_input() */
#include "parsetok.h"   /* PyParser_ParseFileObject() */
#include "errcode.h"/* E_EOF */
#include "symtable.h"   /* PySymtable_BuildObject() */
#include "ast.h"/* PyAST_FromNodeObject() */
#include "marshal.h"/* PyMarshal_ReadLongFromFile */
#include 

I propose to add explicit dependencies in header files directly, rather than 
using black magic in C files.

Attached PR fix this issue.

--
components: Interpreter Core
messages: 329359
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add missing dependencies between AST/parser header files
versions: Python 3.8

___
Python tracker 

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