Description
Bug report
Bug description:
There are two backends for the decimal
module, one from libmpdec
(_decimal
) and the other being a native re-implementation in Python (_pydecimal
).
The signatures of methods like Decimal.__add__
take a named context
argument when imported from _pydecimal
, but cannot accept that argument when imported from _decimal
.
mpdecimal
is not bundled with Python installations on all platforms, and my understanding is that there are even more changes to how it's packaged incoming as per #115119. The difference between the two backends has caused cross-platform incompatibility for at least one project, and I'd argue it's very difficult for anyone who encounters this problem to understand the issue because the error messages mention nothing about an external dependency being required.
Would it be possible to remove the context
argument from the _pydecimal
backend, or to add it to the _decimal
backend even if it's unused, to resolve the incompatibility?
CPython versions tested on:
3.11
Operating systems tested on:
Linux