<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cpython.git/Python/clinic, branch v3.13.0a1</title>
<subtitle>https://github.com/python/cpython.git</subtitle>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/'/>
<entry>
<title>gh-109595: Add -Xcpu_count=&lt;n&gt; cmdline for container users (#109667)</title>
<updated>2023-10-10T10:00:09Z</updated>
<author>
<name>Donghee Na</name>
<email>donghee.na@python.org</email>
</author>
<published>2023-10-10T10:00:09Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=0362cbf908aff2b87298f8a9422e7b368f890071'/>
<id>0362cbf908aff2b87298f8a9422e7b368f890071</id>
<content type='text'>

---------

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;
Co-authored-by: Gregory P. Smith [Google LLC] &lt;greg@krypto.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

---------

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;
Co-authored-by: Gregory P. Smith [Google LLC] &lt;greg@krypto.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-108753: Enhance pystats (#108754)</title>
<updated>2023-09-06T15:54:59Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2023-09-06T15:54:59Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=a0773b89dfe5cd2190d539905dd89e7f6455668e'/>
<id>a0773b89dfe5cd2190d539905dd89e7f6455668e</id>
<content type='text'>
Statistics gathering is now off by default. Use the "-X pystats"
command line option or set the new PYTHONSTATS environment variable
to 1 to turn statistics gathering on at Python startup.

Statistics are no longer dumped at exit if statistics gathering was
off or statistics have been cleared.

Changes:

* Add PYTHONSTATS environment variable.
* sys._stats_dump() now returns False if statistics are not dumped
  because they are all equal to zero.
* Add PyConfig._pystats member.
* Add tests on sys functions and on setting PyConfig._pystats to 1.
* Add Include/cpython/pystats.h and Include/internal/pycore_pystats.h
  header files.
* Rename '_py_stats' variable to '_Py_stats'.
* Exclude Include/cpython/pystats.h from the Py_LIMITED_API.
* Move pystats.h include from object.h to Python.h.
* Add _Py_StatsOn() and _Py_StatsOff() functions. Remove
  '_py_stats_struct' variable from the API: make it static in
  specialize.c.
* Document API in Include/pystats.h and Include/cpython/pystats.h.
* Complete pystats documentation in Doc/using/configure.rst.
* Don't write "all zeros" stats: if _stats_off() and _stats_clear()
  or _stats_dump() were called.
* _PyEval_Fini() now always call _Py_PrintSpecializationStats() which
  does nothing if stats are all zeros.

Co-authored-by: Michael Droettboom &lt;mdboom@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Statistics gathering is now off by default. Use the "-X pystats"
command line option or set the new PYTHONSTATS environment variable
to 1 to turn statistics gathering on at Python startup.

Statistics are no longer dumped at exit if statistics gathering was
off or statistics have been cleared.

Changes:

* Add PYTHONSTATS environment variable.
* sys._stats_dump() now returns False if statistics are not dumped
  because they are all equal to zero.
* Add PyConfig._pystats member.
* Add tests on sys functions and on setting PyConfig._pystats to 1.
* Add Include/cpython/pystats.h and Include/internal/pycore_pystats.h
  header files.
* Rename '_py_stats' variable to '_Py_stats'.
* Exclude Include/cpython/pystats.h from the Py_LIMITED_API.
* Move pystats.h include from object.h to Python.h.
* Add _Py_StatsOn() and _Py_StatsOff() functions. Remove
  '_py_stats_struct' variable from the API: make it static in
  specialize.c.
* Document API in Include/pystats.h and Include/cpython/pystats.h.
* Complete pystats documentation in Doc/using/configure.rst.
* Don't write "all zeros" stats: if _stats_off() and _stats_clear()
  or _stats_dump() were called.
* _PyEval_Fini() now always call _Py_PrintSpecializationStats() which
  does nothing if stats are all zeros.

Co-authored-by: Michael Droettboom &lt;mdboom@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-107603: Argument Clinic: Only include pycore_gc.h if needed (#108726)</title>
<updated>2023-08-31T21:42:34Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2023-08-31T21:42:34Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=ad73674283978a8bf8f1983bfd69150e60e6225f'/>
<id>ad73674283978a8bf8f1983bfd69150e60e6225f</id>
<content type='text'>
Argument Clinic now only includes pycore_gc.h if PyGC_Head is needed,
and only includes pycore_runtime.h if _Py_ID() is needed.

* Add 'condition' optional argument to Clinic.add_include().
* deprecate_keyword_use() includes pycore_runtime.h when using
  the _PyID() function.
* Fix rendering of includes: comments start at the column 35.
* Mark PC/clinic/_wmimodule.cpp.h and
  "Objects/stringlib/clinic/*.h.h" header files as generated in
  .gitattributes.

Effects:

* 42 header files generated by AC no longer include the internal C
  API, instead of 4 header files before. For example,
  Modules/clinic/_abc.c.h no longer includes the internal C API.
* Fix _testclinic_depr.c.h: it now always includes pycore_runtime.h
  to get _Py_ID().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Argument Clinic now only includes pycore_gc.h if PyGC_Head is needed,
and only includes pycore_runtime.h if _Py_ID() is needed.

* Add 'condition' optional argument to Clinic.add_include().
* deprecate_keyword_use() includes pycore_runtime.h when using
  the _PyID() function.
* Fix rendering of includes: comments start at the column 35.
* Mark PC/clinic/_wmimodule.cpp.h and
  "Objects/stringlib/clinic/*.h.h" header files as generated in
  .gitattributes.

Effects:

* 42 header files generated by AC no longer include the internal C
  API, instead of 4 header files before. For example,
  Modules/clinic/_abc.c.h no longer includes the internal C API.
* Fix _testclinic_depr.c.h: it now always includes pycore_runtime.h
  to get _Py_ID().</pre>
</div>
</content>
</entry>
<entry>
<title>gh-106320: Remove private AC converter functions (#108505)</title>
<updated>2023-08-26T02:05:17Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2023-08-26T02:05:17Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=8ba47146111d714c7b61825d43b52311d9be366d'/>
<id>8ba47146111d714c7b61825d43b52311d9be366d</id>
<content type='text'>
Move these private functions to the internal C API
(pycore_abstract.h):

* _Py_convert_optional_to_ssize_t()
* _PyNumber_Index()

Argument Clinic now emits #include "pycore_abstract.h" when these
functions are used.

The parser of the c-analyzer tool now uses a list of files which use
the limited C API, rather than a list of files using the internal C
API.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move these private functions to the internal C API
(pycore_abstract.h):

* _Py_convert_optional_to_ssize_t()
* _PyNumber_Index()

Argument Clinic now emits #include "pycore_abstract.h" when these
functions are used.

The parser of the c-analyzer tool now uses a list of files which use
the limited C API, rather than a list of files using the internal C
API.</pre>
</div>
</content>
</entry>
<entry>
<title>gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)</title>
<updated>2023-08-24T22:51:22Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2023-08-24T22:51:22Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8'/>
<id>4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8</id>
<content type='text'>
Argument Clinic now uses the new public PyLong_AsInt(), rather than
the old name _PyLong_AsInt().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Argument Clinic now uses the new public PyLong_AsInt(), rather than
the old name _PyLong_AsInt().</pre>
</div>
</content>
</entry>
<entry>
<title>gh-107526: Revert "gh-100357: Convert several functions in bltinsmodule to AC" (#107542)</title>
<updated>2023-08-21T00:54:10Z</updated>
<author>
<name>Nikita Sobolev</name>
<email>mail@sobolevn.me</email>
</author>
<published>2023-08-21T00:54:10Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=db6dc6ce41f42ec2cb4fdfbc0a099114f42e888f'/>
<id>db6dc6ce41f42ec2cb4fdfbc0a099114f42e888f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-92536: Argument Clinic no longer emits PyUnicode_READY() (#105208)</title>
<updated>2023-06-01T23:31:58Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2023-06-01T23:31:58Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=cbb9ba844f15f2b8127028e6dfd4681b2cb2376f'/>
<id>cbb9ba844f15f2b8127028e6dfd4681b2cb2376f</id>
<content type='text'>
Since Python 3.12, PyUnicode_READY() does nothing and always
returns 0.

Argument Clinic now also checks for .cpp files (PC/_wmimodule.cpp).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since Python 3.12, PyUnicode_READY() does nothing and always
returns 0.

Argument Clinic now also checks for .cpp files (PC/_wmimodule.cpp).</pre>
</div>
</content>
</entry>
<entry>
<title>gh-105069: Add a readline-like callable to the tokenizer to consume input iteratively (#105070)</title>
<updated>2023-05-30T21:43:34Z</updated>
<author>
<name>Pablo Galindo Salgado</name>
<email>Pablogsal@gmail.com</email>
</author>
<published>2023-05-30T21:43:34Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=9216e69a87d16d871625721ed5a8aa302511f367'/>
<id>9216e69a87d16d871625721ed5a8aa302511f367</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-102856: Python tokenizer implementation for PEP 701 (#104323)</title>
<updated>2023-05-21T00:03:02Z</updated>
<author>
<name>Marta Gómez Macías</name>
<email>mgmacias@google.com</email>
</author>
<published>2023-05-21T00:03:02Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=6715f91edcf6f379f666e18f57b8a0dcb724bf79'/>
<id>6715f91edcf6f379f666e18f57b8a0dcb724bf79</id>
<content type='text'>
This commit replaces the Python implementation of the tokenize module with an implementation
that reuses the real C tokenizer via a private extension module. The tokenize module now implements
a compatibility layer that transforms tokens from the C tokenizer into Python tokenize tokens for backward
compatibility.

As the C tokenizer does not emit some tokens that the Python tokenizer provides (such as comments and non-semantic newlines), a new special mode has been added to the C tokenizer mode that currently is only used via
the extension module that exposes it to the Python layer. This new mode forces the C tokenizer to emit these new extra tokens and add the appropriate metadata that is needed to match the old Python implementation.

Co-authored-by: Pablo Galindo &lt;pablogsal@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit replaces the Python implementation of the tokenize module with an implementation
that reuses the real C tokenizer via a private extension module. The tokenize module now implements
a compatibility layer that transforms tokens from the C tokenizer into Python tokenize tokens for backward
compatibility.

As the C tokenizer does not emit some tokens that the Python tokenizer provides (such as comments and non-semantic newlines), a new special mode has been added to the C tokenizer mode that currently is only used via
the extension module that exposes it to the Python layer. This new mode forces the C tokenizer to emit these new extra tokens and add the appropriate metadata that is needed to match the old Python implementation.

Co-authored-by: Pablo Galindo &lt;pablogsal@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-84436: Implement Immortal Objects (gh-19474)</title>
<updated>2023-04-22T19:39:37Z</updated>
<author>
<name>Eddie Elizondo</name>
<email>eduardo.elizondorueda@gmail.com</email>
</author>
<published>2023-04-22T19:39:37Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=ea2c0016502472aa8baa3149050ada776d17a009'/>
<id>ea2c0016502472aa8baa3149050ada776d17a009</id>
<content type='text'>
This is the implementation of PEP683

Motivation:

The PR introduces the ability to immortalize instances in CPython which bypasses reference counting. Tagging objects as immortal allows up to skip certain operations when we know that the object will be around for the entire execution of the runtime.

Note that this by itself will bring a performance regression to the runtime due to the extra reference count checks. However, this brings the ability of having truly immutable objects that are useful in other contexts such as immutable data sharing between sub-interpreters.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the implementation of PEP683

Motivation:

The PR introduces the ability to immortalize instances in CPython which bypasses reference counting. Tagging objects as immortal allows up to skip certain operations when we know that the object will be around for the entire execution of the runtime.

Note that this by itself will bring a performance regression to the runtime due to the extra reference count checks. However, this brings the ability of having truly immutable objects that are useful in other contexts such as immutable data sharing between sub-interpreters.</pre>
</div>
</content>
</entry>
</feed>
