Author: Matti Picus <matti.pi...@gmail.com> Branch: py3.5 Changeset: r93687:a7d7fd1b9931 Date: 2018-01-19 17:00 +0200 http://bitbucket.org/pypy/pypy/changeset/a7d7fd1b9931/
Log: fix merge diff --git a/pypy/interpreter/timeutils.py b/pypy/interpreter/timeutils.py --- a/pypy/interpreter/timeutils.py +++ b/pypy/interpreter/timeutils.py @@ -22,7 +22,7 @@ def timestamp_w(space, w_secs): if space.isinstance_w(w_secs, space.w_float): secs = space.float_w(w_secs) - if rfloat.isnan(secs): + if math.isnan(secs): raise oefmt(space.w_ValueError, "timestamp is nan") result_float = math.ceil(secs * SECS_TO_NS) try: diff --git a/pypy/module/cmath/interp_cmath.py b/pypy/module/cmath/interp_cmath.py --- a/pypy/module/cmath/interp_cmath.py +++ b/pypy/module/cmath/interp_cmath.py @@ -215,8 +215,8 @@ # sign would otherwise have an infinite relative tolerance. # Two infinities of the same sign are caught by the equality check # above. - if (rfloat.isinf(ax) or rfloat.isinf(ay) or - rfloat.isinf(bx) or rfloat.isinf(by)): + if (math.isinf(ax) or math.isinf(ay) or + math.isinf(bx) or math.isinf(by)): return space.w_False # # now do the regular computation diff --git a/pypy/module/cpyext/cdatetime.py b/pypy/module/cpyext/cdatetime.py --- a/pypy/module/cpyext/cdatetime.py +++ b/pypy/module/cpyext/cdatetime.py @@ -79,8 +79,6 @@ return space.is_true( space.appexec([w_obj], """(obj): from datetime import %s as datatype - if not isinstance(obj, datatype): - print datatype return isinstance(obj, datatype) """ % (type_name,))) except OperationError: diff --git a/pypy/module/math/interp_math.py b/pypy/module/math/interp_math.py --- a/pypy/module/math/interp_math.py +++ b/pypy/module/math/interp_math.py @@ -355,8 +355,8 @@ v = hi del partials[added:] if v != 0.0: - if not rfloat.isfinite(v): - if rfloat.isfinite(original): + if not math.isinf(v): + if math.isinf(original): raise oefmt(space.w_OverflowError, "intermediate overflow") if math.isinf(original): inf_sum += original @@ -473,7 +473,7 @@ # sign would otherwise have an infinite relative tolerance. # Two infinities of the same sign are caught by the equality check # above. - if rfloat.isinf(a) or rfloat.isinf(b): + if math.isinf(a) or math.isinf(b): return space.w_False # # now do the regular computation diff --git a/pypy/objspace/std/floatobject.py b/pypy/objspace/std/floatobject.py --- a/pypy/objspace/std/floatobject.py +++ b/pypy/objspace/std/floatobject.py @@ -7,7 +7,7 @@ from rpython.rlib.rarithmetic import int_between from rpython.rlib.rbigint import rbigint from rpython.rlib.rfloat import ( - DTSF_ADD_DOT_0, INFINITY, NAN, copysign, + DTSF_ADD_DOT_0, INFINITY, NAN, float_as_rbigint_ratio, formatd, isfinite) from rpython.rlib.rstring import ParseStringError from rpython.rlib.unroll import unrolling_iterable @@ -918,6 +918,6 @@ # finite x, and ndigits is not unreasonably large z = rfloat.round_double(x, ndigits, half_even=True) - if rfloat.isinf(z): + if math.isinf(z): raise oefmt(space.w_OverflowError, "overflow occurred during round") return space.newfloat(z) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit