[Python-Dev] Summary of Python tracker Issues

2019-09-20 Thread Python tracker
ACTIVITY SUMMARY (2019-09-13 - 2019-09-20) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open7043 (+12) closed 42945 (+60) total 49988 (+72) Open issues wi

[Python-Dev] When writing a PEP, please use the template from PEP 12

2019-09-20 Thread Brett Cannon
https://www.python.org/dev/peps/pep-0012/#suggested-sections This applies even to folks who have written a PEP before as that template gets updated on occasion. For instance, there's a new copyright notice and the last couple proposed PEPs didn't catch it because they copy and pasted from old PEPs

[Python-Dev] static variables in CPython - duplicated _Py_IDENTIFIERs?

2019-09-20 Thread Vinay Sajip via Python-Dev
I just ran an analysis of static variable definitions in CPython code, using clang, on Ubuntu and Windows. The results should be available here: https://cpython.red-dove.com/ As I understand it, _Py_IDENTIFIER instances are supposed to hold constant strings that are used in Python - e.g. "__cla

[Python-Dev] Re: static variables in CPython - duplicated _Py_IDENTIFIERs?

2019-09-20 Thread Andrew Svetlov
>From my understanding, _Py_IDENTIFIER was designed for static usage. The overhead is quite low; keeping it as a private (static) module-level internal variable helps to decouple things. This target is very important for keeping public API as small as possible. On Fri, Sep 20, 2019 at 10:32 PM Vin

[Python-Dev] Re: static variables in CPython - duplicated _Py_IDENTIFIERs?

2019-09-20 Thread Serhiy Storchaka
20.09.19 22:19, Vinay Sajip via Python-Dev пише: I just ran an analysis of static variable definitions in CPython code, using clang, on Ubuntu and Windows. The results should be available here: https://cpython.red-dove.com/ As I understand it, _Py_IDENTIFIER instances are supposed to hold cons

[Python-Dev] Re: static variables in CPython - duplicated _Py_IDENTIFIERs?

2019-09-20 Thread Vinay Sajip via Python-Dev
> From my understanding, _Py_IDENTIFIER was designed for static usage. > The overhead is quite low; keeping it as a private (static) > module-level internal variable helps to decouple things. I understand the importance of decoupling in general, but meanings of __name__, __dict__ etc. aren't goin

[Python-Dev] Re: static variables in CPython - duplicated _Py_IDENTIFIERs?

2019-09-20 Thread Nathaniel Smith
On Fri, Sep 20, 2019 at 1:00 PM Andrew Svetlov wrote: > This target is very important for keeping public API as small as possible. Right, I'm pretty sure that right now Python doesn't have any way to share symbols between .c files without also exposing them in the C API. This is fixable using "s

[Python-Dev] Re: static variables in CPython - duplicated _Py_IDENTIFIERs?

2019-09-20 Thread Vinay Sajip via Python-Dev
> > Right, I'm pretty sure that right now Python doesn't have any way to > share symbols between .c files without also exposing them in the C > API. On other C projects I've worked on, the public API is expressed in one set of header files, and internal APIs that need to be exposed across modules

[Python-Dev] Re: static variables in CPython - duplicated _Py_IDENTIFIERs?

2019-09-20 Thread Nathaniel Smith
On Fri, Sep 20, 2019 at 2:58 PM Vinay Sajip via Python-Dev wrote: > > > > Right, I'm pretty sure that right now Python doesn't have any way to > > share symbols between .c files without also exposing them in the C > > API. > > On other C projects I've worked on, the public API is expressed in one