diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 41327d3a..1dfedb67 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: os: [ubuntu-24.04] - python-version: [pypy3.11, "graalpy-25.0", "3.x"] + python-version: [pypy3.11, "graalpy-25.1", "3.x"] steps: - uses: actions/checkout@v7 with: diff --git a/README.rst b/README.rst index 2c38eb81..425cd689 100644 --- a/README.rst +++ b/README.rst @@ -11,7 +11,7 @@ functions, compatible with the Python stdlib's submodule `math.integer `_. This module requires Python 3.11 or later versions and has been tested with -CPython 3.11 through 3.15, with PyPy3.11 7.3.23 and with GraalPy 25.0.3. +CPython 3.11 through 3.15, with PyPy3.11 7.3.23 and with GraalPy 25.1.3. Free-threading builds of the CPython are supported. Releases are available in the Python Package Index (PyPI) at diff --git a/tests/test_functions.py b/tests/test_functions.py index d89efc3c..9b4f49e7 100644 --- a/tests/test_functions.py +++ b/tests/test_functions.py @@ -236,7 +236,7 @@ def test_interfaces(): @pytest.mark.skipif(platform.python_implementation() == "GraalVM", - reason="oracle/graalpython#593") + reason="oracle/graalpython#998") def test_func_api(): for fn in ["comb", "factorial", "gcd", "isqrt", "lcm", "perm"]: f = getattr(math, fn) diff --git a/tests/test_mpz.py b/tests/test_mpz.py index ab89ca49..31b88d2f 100644 --- a/tests/test_mpz.py +++ b/tests/test_mpz.py @@ -452,10 +452,6 @@ def test_add_int_subclasses(): def test_binary_mixed(x, y): mx = mpz(x) for op in [operator.add, operator.mul, operator.sub]: - if (platform.python_implementation() == "GraalVM" - and op in [operator.add, operator.sub] - and str(y.imag) == "-0.0"): - continue # issue oracle/graalpython#585 assert str(op(mx, y)) == str(op(x, y)) assert str(op(y, mx)) == str(op(y, x)) if op != operator.sub: @@ -712,8 +708,6 @@ def test_power_errors(): pow(mpz(10**1000), 1j) with pytest.raises(TypeError): pow(object(), mpz(321)) - if platform.python_implementation() == "GraalVM": - return # issue oracle/graalpython#551 with pytest.raises(OverflowError): pow(mpz(2), mpz(1<<64)) if BITCNT_MAX < (1<<64) - 1: @@ -814,8 +808,6 @@ def test_methods(x): assert meth(mx) == meth(x) -@pytest.mark.skipif(platform.python_implementation() == "GraalVM", - reason="oracle/graalpython#883") @given(bigints(), integers(min_value=0, max_value=10000), sampled_from(["big", "little"]), booleans()) @example(0, 0, "big", False) @@ -840,6 +832,7 @@ def test_methods(x): @example(128, 1, "big", False) @example(-32383289396013590652, 0, "big", True) @example(-384, 1, "big", True) +@example(32768, 2, "big", True) def test_to_bytes_bulk(x, length, byteorder, signed): try: rx = x.to_bytes(length, byteorder, signed=signed) @@ -951,12 +944,14 @@ def test_from_bytes_interface(): @example(1<<116) @example(646541478744828163276576707651635923929979156076518566789121) @example((0xfffffffffffff8<<(242*4)) + (1<<970)) +@example(0xa<<10000) def test_to_float(x): mx = mpz(x) try: fx = float(x) except OverflowError: - pytest.raises(OverflowError, lambda: float(mx)) + with pytest.raises(OverflowError): + float(mx) else: assert str(float(mx)) == str(fx)