[issue40268] Reorganize pycore_pystate.h header

2020-04-15 Thread STINNER Victor


STINNER Victor  added the comment:

> It exposes too many internals whereas most consumers only need basic 
> functions like _PyThreadState_GET().

That's basically done: pycore_pystate.h no longer defines PyInterpreterState 
structure. pycore_interp.h must now be included explicitly. It's now included 
by the following files:

* Modules/gcmodule.c
* Modules/_io/textio.c
* Modules/main.c
* Modules/_threadmodule.c
* Objects/codeobject.c
* Objects/interpreteridobject.c
* Objects/longobject.c
* Objects/moduleobject.c
* Objects/unicodeobject.c
* Parser/listnode.c
* Python/codecs.c
* Python/dynload_shlib.c
* Python/import.c
* Python/initconfig.c
* Python/pythonrun.c
* Python/_warnings.c

I also pushed many cleanup changes. I think that it's now enough, I close the 
issue ;-)

--
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



[issue40268] Reorganize pycore_pystate.h header

2020-04-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5eca75df031d3cbe577c75dd87734b48c787e7f6 by Victor Stinner in 
branch 'master':
bpo-40268: Reformat posixmodule.c includes (GH-19536)
https://github.com/python/cpython/commit/5eca75df031d3cbe577c75dd87734b48c787e7f6


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18884
pull_request: https://github.com/python/cpython/pull/19536

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4f98f465f14e7258c5b18a62c5aa114dbe1174d8 by Victor Stinner in 
branch 'master':
bpo-40268: Remove unused imports in pylifecycle.c (GH-19533)
https://github.com/python/cpython/commit/4f98f465f14e7258c5b18a62c5aa114dbe1174d8


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18883
pull_request: https://github.com/python/cpython/pull/19533

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 361dcdcefc80f5729ed18ac0ef73327794fbf400 by Victor Stinner in 
branch 'master':
bpo-40268: Remove unused osdefs.h includes (GH-19532)
https://github.com/python/cpython/commit/361dcdcefc80f5729ed18ac0ef73327794fbf400


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18882
pull_request: https://github.com/python/cpython/pull/19532

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d9ea5cae1d07e1ee8b03540a9367c26205e0e360 by Victor Stinner in 
branch 'master':
bpo-40268: Remove unused pycore_pymem.h includes (GH-19531)
https://github.com/python/cpython/commit/d9ea5cae1d07e1ee8b03540a9367c26205e0e360


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18881
pull_request: https://github.com/python/cpython/pull/19531

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4a21e57fe55076c77b0ee454e1994ca544d09dc0 by Victor Stinner in 
branch 'master':
bpo-40268: Remove unused structmember.h includes (GH-19530)
https://github.com/python/cpython/commit/4a21e57fe55076c77b0ee454e1994ca544d09dc0


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18880
pull_request: https://github.com/python/cpython/pull/19530

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 62183b8d6d49e59c6a98bbdaa65b7ea1415abb7f by Victor Stinner in 
branch 'master':
bpo-40268: Remove explicit pythread.h includes (#19529)
https://github.com/python/cpython/commit/62183b8d6d49e59c6a98bbdaa65b7ea1415abb7f


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-2897: Deprecate structmember.h.

--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18879
pull_request: https://github.com/python/cpython/pull/19529

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e560f90602870601945ea7a4f7770827608817d2 by Victor Stinner in 
branch 'master':
bpo-40268: Move struct _gc_runtime_state to pycore_gc.h (GH-19515)
https://github.com/python/cpython/commit/e560f90602870601945ea7a4f7770827608817d2


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18867
pull_request: https://github.com/python/cpython/pull/19515

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e5014be0497d06d78343623588a80f491a6f7b74 by Victor Stinner in 
branch 'master':
bpo-40268: Remove a few pycore_pystate.h includes (GH-19510)
https://github.com/python/cpython/commit/e5014be0497d06d78343623588a80f491a6f7b74


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18863
pull_request: https://github.com/python/cpython/pull/19510

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 81a7be3fa22c983209cc0ffb3537b92b0370f83c by Victor Stinner in 
branch 'master':
bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509)
https://github.com/python/cpython/commit/81a7be3fa22c983209cc0ffb3537b92b0370f83c


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18862
pull_request: https://github.com/python/cpython/pull/19509

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4a3fe0835310643193ea45529ab0fb45c5f8f2fd by Victor Stinner in 
branch 'master':
bpo-40268: Include explicitly pycore_interp.h (GH-19505)
https://github.com/python/cpython/commit/4a3fe0835310643193ea45529ab0fb45c5f8f2fd


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18855
pull_request: https://github.com/python/cpython/pull/19505

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-13 Thread STINNER Victor


STINNER Victor  added the comment:

New changeset 0c13e1f96a9487e0efe63c3d3a05ff9738bd7dac by Victor Stinner in 
branch 'master':
bpo-40241: Add pycore_interp.h header (GH-19499)
https://github.com/python/cpython/commit/0c13e1f96a9487e0efe63c3d3a05ff9738bd7dac

--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1c4cbdf94dbb4a6ac1093d2fa7a75efa802b25bc by Victor Stinner in 
branch 'master':
bpo-40268: Add pycore_runtime.h header file (GH-19493)
https://github.com/python/cpython/commit/1c4cbdf94dbb4a6ac1093d2fa7a75efa802b25bc


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-12 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset da7933ecc30e37b119756cb02b89a6ad99db22e0 by Victor Stinner in 
branch 'master':
bpo-40268: Add _PyInterpreterState_GetConfig() (GH-19492)
https://github.com/python/cpython/commit/da7933ecc30e37b119756cb02b89a6ad99db22e0


--

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-12 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18846
pull_request: https://github.com/python/cpython/pull/19493

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-12 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40268] Reorganize pycore_pystate.h header

2020-04-12 Thread STINNER Victor


New submission from STINNER Victor :

Over the time, pycore_pystate.h header file becomes more and more complex. It 
exposes too many internals whereas most consumers only need basic functions 
like _PyThreadState_GET().

I plan to use this issue as a placeholder for changes to reorganize 
pycore_pystate.h. I'm working on multiple pull requests.

--
components: Interpreter Core
messages: 366274
nosy: vstinner
priority: normal
severity: normal
status: open
title: Reorganize pycore_pystate.h header
versions: Python 3.9

___
Python tracker 

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