Keep forever deprecated aliases for mpc/mpf_log()

This commit is contained in:
Sergey B Kirpichev
2026-03-01 08:38:17 +03:00
parent 6887127ae9
commit 501af4a7c7
3 changed files with 2 additions and 16 deletions
+1 -4
View File
@@ -737,10 +737,7 @@ def mpf_ln(x, prec, rnd=round_fast):
m -= n*ln2_fixed(wp)
return from_man_exp(m, -wp, prec, rnd)
def mpf_log(x, prec, rnd=round_fast):
warnings.warn("mpf_log is deprecated, use mpf_ln",
DeprecationWarning)
return mpf_ln(x, prec, rnd)
mpf_log = mpf_ln # deprecated alias
def mpf_log1p(x, prec, rnd=round_fast):
"""
+1 -5
View File
@@ -3,7 +3,6 @@ Low-level functions for complex arithmetic.
"""
import sys
import warnings
from .backend import MPZ
from .libelefun import (mpf_acos, mpf_acosh, mpf_asin, mpf_atan, mpf_atan2,
@@ -436,10 +435,7 @@ def mpc_ln(z, prec, rnd=round_fast):
im = mpc_arg(z, prec, rnd)
return re, im
def mpc_log(x, prec, rnd=round_fast):
warnings.warn("mpc_log is deprecated, use mpc_ln",
DeprecationWarning)
return mpc_ln(x, prec, rnd)
mpc_log = mpc_ln # deprecated alias
def mpc_cos(z, prec, rnd=round_fast):
"""Complex cosine. The formula used is cos(a+bi) = cos(a)*cosh(b) -
-7
View File
@@ -707,13 +707,6 @@ def test_issue_985():
assert mpc(-1) in {1, -1}
def test_mpfmpc_log_deprecation():
with pytest.deprecated_call():
mpmath.libmp.mpf_log(mpf(123)._mpf_, 53)
with pytest.deprecated_call():
mpmath.libmp.mpc_log(mpc(123)._mpc_, 53)
def test_issue_975():
def worker():
mp = mpmath.MPContext()