diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0c37e03c..f5868e17 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: - '1.0' - '1.6' - '~1.7.0-rc1' - # - 'nightly' # TODO: reenable + - 'nightly' exclude: - os: ubuntu-latest architecture: x86 diff --git a/src/julia/core.py b/src/julia/core.py index 98d72c0c..9d54d108 100644 --- a/src/julia/core.py +++ b/src/julia/core.py @@ -564,6 +564,11 @@ def _is_unboxable_as(self, pointer, c_type): actual = self.api.jl_typeof(pointer) return actual == desired + # `_unbox_as` was added for communicating with Julia runtime before + # initializing PyCal: + # * Fail with a helpful message if separate cache is not supported + # https://github.com/JuliaPy/pyjulia/pull/186 + # However, this is not used anymore at the moment. Maybe clean this up? def _unbox_as(self, pointer, c_type): self._check_unboxable(c_type) jl_unbox = getattr(self.api, 'jl_unbox_{}'.format(c_type)) diff --git a/src/julia/libjulia.py b/src/julia/libjulia.py index 27a6433d..fb06693c 100644 --- a/src/julia/libjulia.py +++ b/src/julia/libjulia.py @@ -64,8 +64,14 @@ def setup_libjulia(libjulia): ), ) - libjulia.jl_typeof.argtypes = [c_void_p] - libjulia.jl_typeof.restype = c_void_p + # This does not exist in Julia 1.8 anymore: + try: + jl_typeof = libjulia.jl_typeof + except AttributeError: + pass + else: + jl_typeof.argtypes = [c_void_p] + jl_typeof.restype = c_void_p libjulia.jl_exception_clear.restype = None libjulia.jl_stderr_obj.argtypes = [] diff --git a/src/julia/tests/test_sysimage.py b/src/julia/tests/test_sysimage.py index 9c79834b..67eb9a63 100644 --- a/src/julia/tests/test_sysimage.py +++ b/src/julia/tests/test_sysimage.py @@ -16,6 +16,11 @@ def skip_early_julia_versions(juliainfo): pytest.skip("Julia < 1.3.1 is not supported") +def skip_julia_nightly(juliainfo): + if juliainfo.version_info >= (1, 8): + pytest.skip("custom sysimage with Julia >= 1.8 (nightly) is not supported") + + def assert_sample_julia_code_runs(juliainfo, sysimage_path): very_random_string = "4903dc03-950f-4a54-98a3-c57a354b62df" proc = runcode( @@ -48,6 +53,7 @@ def assert_sample_julia_code_runs(juliainfo, sysimage_path): @pytest.mark.parametrize("with_pycall_cache", [False, True]) def test_build_and_load(tmpdir, juliainfo, with_pycall_cache): skip_early_julia_versions(juliainfo) + skip_julia_nightly(juliainfo) if with_pycall_cache: build_pycall(julia=juliainfo.julia) @@ -75,6 +81,7 @@ def test_build_and_load(tmpdir, juliainfo, with_pycall_cache): @skip_in_apple def test_build_with_basesysimage_and_load(tmpdir, juliainfo): skip_early_julia_versions(juliainfo) + skip_julia_nightly(juliainfo) sysimage_path = str(tmpdir.join("sys.so")) base_sysimage_path = juliainfo.sysimage