Skip to content

Commit 501af4a

Browse files
committed
Keep forever deprecated aliases for mpc/mpf_log()
1 parent 6887127 commit 501af4a

3 files changed

Lines changed: 2 additions & 16 deletions

File tree

mpmath/libmp/libelefun.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -737,10 +737,7 @@ def mpf_ln(x, prec, rnd=round_fast):
737737
m -= n*ln2_fixed(wp)
738738
return from_man_exp(m, -wp, prec, rnd)
739739

740-
def mpf_log(x, prec, rnd=round_fast):
741-
warnings.warn("mpf_log is deprecated, use mpf_ln",
742-
DeprecationWarning)
743-
return mpf_ln(x, prec, rnd)
740+
mpf_log = mpf_ln # deprecated alias
744741

745742
def mpf_log1p(x, prec, rnd=round_fast):
746743
"""

mpmath/libmp/libmpc.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44

55
import sys
6-
import warnings
76

87
from .backend import MPZ
98
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):
436435
im = mpc_arg(z, prec, rnd)
437436
return re, im
438437

439-
def mpc_log(x, prec, rnd=round_fast):
440-
warnings.warn("mpc_log is deprecated, use mpc_ln",
441-
DeprecationWarning)
442-
return mpc_ln(x, prec, rnd)
438+
mpc_log = mpc_ln # deprecated alias
443439

444440
def mpc_cos(z, prec, rnd=round_fast):
445441
"""Complex cosine. The formula used is cos(a+bi) = cos(a)*cosh(b) -

mpmath/tests/test_basic_ops.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -707,13 +707,6 @@ def test_issue_985():
707707
assert mpc(-1) in {1, -1}
708708

709709

710-
def test_mpfmpc_log_deprecation():
711-
with pytest.deprecated_call():
712-
mpmath.libmp.mpf_log(mpf(123)._mpf_, 53)
713-
with pytest.deprecated_call():
714-
mpmath.libmp.mpc_log(mpc(123)._mpc_, 53)
715-
716-
717710
def test_issue_975():
718711
def worker():
719712
mp = mpmath.MPContext()

0 commit comments

Comments
 (0)