<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Objects/longobject.c, branch enum-lost-fixes</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>[3.10] Fix a potential reference-counting bug in long_pow (GH-26690) (GH-26703)</title>
<updated>2021-06-13T07:58:32+00:00</updated>
<author>
<name>Mark Dickinson</name>
<email>mdickinson@enthought.com</email>
</author>
<published>2021-06-13T07:58:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=929dd817b3c6ebd8f2ab5d3b58af51acf292c590'/>
<id>929dd817b3c6ebd8f2ab5d3b58af51acf292c590</id>
<content type='text'>
(cherry picked from commit 59242431991794064824cf2ab70886367613f29e)

Co-authored-by: Mark Dickinson &lt;mdickinson@enthought.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 59242431991794064824cf2ab70886367613f29e)

Co-authored-by: Mark Dickinson &lt;mdickinson@enthought.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43687: Py_Initialize() creates singletons earlier (GH-25147)</title>
<updated>2021-04-02T13:28:13+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-04-02T13:28:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=442ad74fc2928b095760eb89aba93c28eab17f9b'/>
<id>442ad74fc2928b095760eb89aba93c28eab17f9b</id>
<content type='text'>
Reorganize pycore_interp_init() to initialize singletons before the
the first PyType_Ready() call. Fix an issue when Python is configured
using --without-doc-strings.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reorganize pycore_interp_init() to initialize singletons before the
the first PyType_Ready() call. Fix an issue when Python is configured
using --without-doc-strings.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42128: Structural Pattern Matching (PEP 634) (GH-22917)</title>
<updated>2021-02-26T22:51:55+00:00</updated>
<author>
<name>Brandt Bucher</name>
<email>brandtbucher@gmail.com</email>
</author>
<published>2021-02-26T22:51:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=145bf269df3530176f6ebeab1324890ef7070bf8'/>
<id>145bf269df3530176f6ebeab1324890ef7070bf8</id>
<content type='text'>
Co-authored-by: Guido van Rossum &lt;guido@python.org&gt;
Co-authored-by: Talin &lt;viridia@gmail.com&gt;
Co-authored-by: Pablo Galindo &lt;pablogsal@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Guido van Rossum &lt;guido@python.org&gt;
Co-authored-by: Talin &lt;viridia@gmail.com&gt;
Co-authored-by: Pablo Galindo &lt;pablogsal@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43268: Pass interp rather than tstate to internal functions (GH-24580)</title>
<updated>2021-02-19T14:10:45+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-02-19T14:10:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=bcb094b41f7fe4dd1686c50891d85632fcf0d481'/>
<id>bcb094b41f7fe4dd1686c50891d85632fcf0d481</id>
<content type='text'>
Pass the current interpreter (interp) rather than the current Python
thread state (tstate) to internal functions which only use the
interpreter.

Modified functions:

* _PyXXX_Fini() and _PyXXX_ClearFreeList() functions
* _PyEval_SignalAsyncExc(), make_pending_calls()
* _PySys_GetObject(), sys_set_object(), sys_set_object_id(), sys_set_object_str()
* should_audit(), set_flags_from_config(), make_flags()
* _PyAtExit_Call()
* init_stdio_encoding()
* etc.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pass the current interpreter (interp) rather than the current Python
thread state (tstate) to internal functions which only use the
interpreter.

Modified functions:

* _PyXXX_Fini() and _PyXXX_ClearFreeList() functions
* _PyEval_SignalAsyncExc(), make_pending_calls()
* _PySys_GetObject(), sys_set_object(), sys_set_object_id(), sys_set_object_str()
* should_audit(), set_flags_from_config(), make_flags()
* _PyAtExit_Call()
* init_stdio_encoding()
* etc.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577)</title>
<updated>2021-02-19T12:33:31+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-02-19T12:33:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=101bf69ff18a946fed7c274f088878aaf85174cc'/>
<id>101bf69ff18a946fed7c274f088878aaf85174cc</id>
<content type='text'>
The _Py_IsMainInterpreter() function now expects interp rather than
tstate.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The _Py_IsMainInterpreter() function now expects interp rather than
tstate.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)</title>
<updated>2020-12-01T09:37:39+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-12-01T09:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=32bd68c839adb7b42af12366ab0892303115d1d1'/>
<id>32bd68c839adb7b42af12366ab0892303115d1d1</id>
<content type='text'>
No longer use deprecated aliases to functions:

* Replace PyObject_MALLOC() with PyObject_Malloc()
* Replace PyObject_REALLOC() with PyObject_Realloc()
* Replace PyObject_FREE() with PyObject_Free()
* Replace PyObject_Del() with PyObject_Free()
* Replace PyObject_DEL() with PyObject_Free()</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No longer use deprecated aliases to functions:

* Replace PyObject_MALLOC() with PyObject_Malloc()
* Replace PyObject_REALLOC() with PyObject_Realloc()
* Replace PyObject_FREE() with PyObject_Free()
* Replace PyObject_Del() with PyObject_Free()
* Replace PyObject_DEL() with PyObject_Free()</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42161: Remove private _PyLong_Zero and _PyLong_One (GH-23003)</title>
<updated>2020-10-27T20:34:33+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-10-27T20:34:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=c310185c081110741fae914c06c7aaf673ad3d0d'/>
<id>c310185c081110741fae914c06c7aaf673ad3d0d</id>
<content type='text'>
Use PyLong_FromLong(0) and PyLong_FromLong(1) of the public C API
instead. For Python internals, _PyLong_GetZero() and _PyLong_GetOne()
of pycore_long.h can be used.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use PyLong_FromLong(0) and PyLong_FromLong(1) of the public C API
instead. For Python internals, _PyLong_GetZero() and _PyLong_GetOne()
of pycore_long.h can be used.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42161: Add _PyLong_GetZero() and _PyLong_GetOne() (GH-22993)</title>
<updated>2020-10-26T23:00:03+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-10-26T23:00:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=8e3b9f92835654943bb59d9658bb52e1b0f40a22'/>
<id>8e3b9f92835654943bb59d9658bb52e1b0f40a22</id>
<content type='text'>
Add _PyLong_GetZero() and _PyLong_GetOne() functions and a new
internal pycore_long.h header file.

Python cannot be built without small integer singletons anymore.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add _PyLong_GetZero() and _PyLong_GetOne() functions and a new
internal pycore_long.h header file.

Python cannot be built without small integer singletons anymore.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "bpo-26680: Incorporate is_integer in all built-in and standard library numeric types (GH-6121)" (GH-22584)</title>
<updated>2020-10-07T23:43:44+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>rhettinger@users.noreply.github.com</email>
</author>
<published>2020-10-07T23:43:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4e0ce820586e93cfcefb16c2a3df8eaefc54cbca'/>
<id>4e0ce820586e93cfcefb16c2a3df8eaefc54cbca</id>
<content type='text'>
This reverts commit 58a7da9e125422323f79c4ee95ac5549989d8162.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 58a7da9e125422323f79c4ee95ac5549989d8162.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-26680: Incorporate is_integer in all built-in and standard library numeric types (GH-6121)</title>
<updated>2020-10-01T16:30:08+00:00</updated>
<author>
<name>Robert Smallshire</name>
<email>robert@smallshire.org.uk</email>
</author>
<published>2020-10-01T16:30:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=58a7da9e125422323f79c4ee95ac5549989d8162'/>
<id>58a7da9e125422323f79c4ee95ac5549989d8162</id>
<content type='text'>
* bpo-26680: Adds support for int.is_integer() for compatibility with float.is_integer().

The int.is_integer() method always returns True.

* bpo-26680: Adds a test to ensure that False.is_integer() and True.is_integer() are always True.

* bpo-26680: Adds Real.is_integer() with a trivial implementation using conversion to int.

This default implementation is intended to reduce the workload for subclass
implementers. It is not robust in the presence of infinities or NaNs and
may have suboptimal performance for other types.

* bpo-26680: Adds Rational.is_integer which returns True if the denominator is one.

This implementation assumes the Rational is represented in it's
lowest form, as required by the class docstring.

* bpo-26680: Adds Integral.is_integer which always returns True.

* bpo-26680: Adds tests for Fraction.is_integer called as an instance method.

The tests for the Rational abstract base class use an unbound
method to sidestep the inability to directly instantiate Rational.
These tests check that everything works correct as an instance method.

* bpo-26680: Updates documentation for Real.is_integer and built-ins int and float.

The call x.is_integer() is now listed in the table of operations
which apply to all numeric types except complex, with a reference
to the full documentation for Real.is_integer().  Mention of
is_integer() has been removed from the section 'Additional Methods
on Float'.

The documentation for Real.is_integer() describes its purpose, and
mentions that it should be overridden for performance reasons, or
to handle special values like NaN.

* bpo-26680: Adds Decimal.is_integer to the Python and C implementations.

The C implementation of Decimal already implements and uses
mpd_isinteger internally, we just expose the existing function to
Python.

The Python implementation uses internal conversion to integer
using to_integral_value().

In both cases, the corresponding context methods are also
implemented.

Tests and documentation are included.

* bpo-26680: Updates the ACKS file.

* bpo-26680: NEWS entries for int, the numeric ABCs and Decimal.

Co-authored-by: Robert Smallshire &lt;rob@sixty-north.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bpo-26680: Adds support for int.is_integer() for compatibility with float.is_integer().

The int.is_integer() method always returns True.

* bpo-26680: Adds a test to ensure that False.is_integer() and True.is_integer() are always True.

* bpo-26680: Adds Real.is_integer() with a trivial implementation using conversion to int.

This default implementation is intended to reduce the workload for subclass
implementers. It is not robust in the presence of infinities or NaNs and
may have suboptimal performance for other types.

* bpo-26680: Adds Rational.is_integer which returns True if the denominator is one.

This implementation assumes the Rational is represented in it's
lowest form, as required by the class docstring.

* bpo-26680: Adds Integral.is_integer which always returns True.

* bpo-26680: Adds tests for Fraction.is_integer called as an instance method.

The tests for the Rational abstract base class use an unbound
method to sidestep the inability to directly instantiate Rational.
These tests check that everything works correct as an instance method.

* bpo-26680: Updates documentation for Real.is_integer and built-ins int and float.

The call x.is_integer() is now listed in the table of operations
which apply to all numeric types except complex, with a reference
to the full documentation for Real.is_integer().  Mention of
is_integer() has been removed from the section 'Additional Methods
on Float'.

The documentation for Real.is_integer() describes its purpose, and
mentions that it should be overridden for performance reasons, or
to handle special values like NaN.

* bpo-26680: Adds Decimal.is_integer to the Python and C implementations.

The C implementation of Decimal already implements and uses
mpd_isinteger internally, we just expose the existing function to
Python.

The Python implementation uses internal conversion to integer
using to_integral_value().

In both cases, the corresponding context methods are also
implemented.

Tests and documentation are included.

* bpo-26680: Updates the ACKS file.

* bpo-26680: NEWS entries for int, the numeric ABCs and Decimal.

Co-authored-by: Robert Smallshire &lt;rob@sixty-north.com&gt;</pre>
</div>
</content>
</entry>
</feed>
