<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Modules/_decimal, branch master</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>bpo-45332: Fix broken Decimal test and benchmark (GH-28680)</title>
<updated>2021-10-01T13:49:46+00:00</updated>
<author>
<name>Dong-hee Na</name>
<email>donghee.na@python.org</email>
</author>
<published>2021-10-01T13:49:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=9eed75fde226cec5a02301cfac1dc8039b5a183e'/>
<id>9eed75fde226cec5a02301cfac1dc8039b5a183e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)</title>
<updated>2021-05-31T11:10:31+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-05-31T11:10:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=142e5c5445c019542246d93fe2f9e195d3131686'/>
<id>142e5c5445c019542246d93fe2f9e195d3131686</id>
<content type='text'>
* _testcapi.heapgctype: implement a traverse function since the type
  is defined with Py_TPFLAGS_HAVE_GC.
* _decimal: PyDecSignalDictMixin_Type is no longer defined with
  Py_TPFLAGS_HAVE_GC since it has no traverse function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* _testcapi.heapgctype: implement a traverse function since the type
  is defined with Py_TPFLAGS_HAVE_GC.
* _decimal: PyDecSignalDictMixin_Type is no longer defined with
  Py_TPFLAGS_HAVE_GC since it has no traverse function.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43475:  Fix worst case collision behavior for NaN instances (GH-25493)</title>
<updated>2021-04-22T15:34:57+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>rhettinger@users.noreply.github.com</email>
</author>
<published>2021-04-22T15:34:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a07da09ad5bd7d234ccd084a3a0933c290d1b592'/>
<id>a07da09ad5bd7d234ccd084a3a0933c290d1b592</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41369: Finish updating the vendored libmpdec to version 2.5.1 (GH-24962)</title>
<updated>2021-03-30T16:11:06+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>antoine@python.org</email>
</author>
<published>2021-03-30T16:11:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=73b20ae2fb7a5c1374aa5c3719f64c53d29fa0d2'/>
<id>73b20ae2fb7a5c1374aa5c3719f64c53d29fa0d2</id>
<content type='text'>
Complete the update to libmpdec-2.5.1.

Co-authored-by: Stefan Krah &lt;skrah@bytereef.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Complete the update to libmpdec-2.5.1.

Co-authored-by: Stefan Krah &lt;skrah@bytereef.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43422: Revert _decimal C API addition (GH-24960)</title>
<updated>2021-03-21T16:27:54+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>antoine@python.org</email>
</author>
<published>2021-03-21T16:27:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=cdddc2b742750e3f289305cf276433a8170c32c1'/>
<id>cdddc2b742750e3f289305cf276433a8170c32c1</id>
<content type='text'>
Stefan Krah requested the reversal of these (unreleased) changes, quoting him:
&gt; The capsule API does not meet my testing standards, since I've focused
on the upstream mpdecimal in the last couple of months.
&gt; Additionally, I'd like to refine the API, perhaps together with the
Arrow community.

Automerge-Triggered-By: GH:pitrou</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stefan Krah requested the reversal of these (unreleased) changes, quoting him:
&gt; The capsule API does not meet my testing standards, since I've focused
on the upstream mpdecimal in the last couple of months.
&gt; Additionally, I'd like to refine the API, perhaps together with the
Arrow community.

Automerge-Triggered-By: GH:pitrou</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-41798: Allocate _decimal extension module C API on the heap (GH-24117)</title>
<updated>2021-01-06T11:47:28+00:00</updated>
<author>
<name>Erlend Egeberg Aasland</name>
<email>erlend.aasland@innova.no</email>
</author>
<published>2021-01-06T11:47:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=fe9f446afe46bd716592eda9fa2af8d9f46bbce4'/>
<id>fe9f446afe46bd716592eda9fa2af8d9f46bbce4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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-42006: Stop using PyDict_GetItem, PyDict_GetItemString and _PyDict_GetItemId. (GH-22648)</title>
<updated>2020-10-26T06:43:39+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-10-26T06:43:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=fb5db7ec58624cab0797b4050735be865d380823'/>
<id>fb5db7ec58624cab0797b4050735be865d380823</id>
<content type='text'>
These functions are considered not safe because they suppress all internal errors
and can return wrong result.  PyDict_GetItemString and _PyDict_GetItemId can
also silence current exception in rare cases.

Remove no longer used _PyDict_GetItemId.
Add _PyDict_ContainsId and rename _PyDict_Contains into
_PyDict_Contains_KnownHash.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions are considered not safe because they suppress all internal errors
and can return wrong result.  PyDict_GetItemString and _PyDict_GetItemId can
also silence current exception in rare cases.

Remove no longer used _PyDict_GetItemId.
Add _PyDict_ContainsId and rename _PyDict_Contains into
_PyDict_Contains_KnownHash.</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>
