diff --git a/graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/hpymodule.h b/graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/hpymodule.h index 4231e7dad3..4badb12cfa 100644 --- a/graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/hpymodule.h +++ b/graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/hpymodule.h @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. + * Copyright (c) 2020, 2024, Oracle and/or its affiliates. * Copyright (c) 2019 pyhandle * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -143,7 +143,7 @@ typedef struct { * structure that will serve as a specification of the module that should be * created by the interpreter. HPy supports only multi-phase module * initialization (PEP 451). Any module initialization code can be added - * to the HPy_mod_execute slot of the module if needed. + * to the HPy_mod_exec slot of the module if needed. * * Example: * diff --git a/graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/version.h b/graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/version.h index 6bb488a6c1..eb57b14570 100644 --- a/graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/version.h +++ b/graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/version.h @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. + * Copyright (c) 2020, 2024, Oracle and/or its affiliates. * Copyright (c) 2019 pyhandle * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -23,5 +23,5 @@ */ // automatically generated by setup.py:get_scm_config() -#define HPY_VERSION "0.9.0rc2" -#define HPY_GIT_REVISION "5ddcbc8d" +#define HPY_VERSION "0.9.0" +#define HPY_GIT_REVISION "f6114734" diff --git a/graalpython/com.oracle.graal.python.hpy.test/src/hpytest/test_hpyimport.py b/graalpython/com.oracle.graal.python.hpy.test/src/hpytest/test_hpyimport.py index c7c6769e28..bf9b2edb55 100644 --- a/graalpython/com.oracle.graal.python.hpy.test/src/hpytest/test_hpyimport.py +++ b/graalpython/com.oracle.graal.python.hpy.test/src/hpytest/test_hpyimport.py @@ -1,18 +1,18 @@ # MIT License -# -# Copyright (c) 2021, 2023, Oracle and/or its affiliates. +# +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Copyright (c) 2019 pyhandle -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/graalpython/lib-graalpython/modules/hpy.egg-info/PKG-INFO b/graalpython/lib-graalpython/modules/hpy.egg-info/PKG-INFO index 70bf3bcaa1..716a50197c 100644 --- a/graalpython/lib-graalpython/modules/hpy.egg-info/PKG-INFO +++ b/graalpython/lib-graalpython/modules/hpy.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hpy -Version: 0.9.0rc2 +Version: 0.9.0 Summary: UNKNOWN Home-page: UNKNOWN License: UNKNOWN diff --git a/graalpython/lib-graalpython/modules/hpy/devel/src/runtime/structseq.c b/graalpython/lib-graalpython/modules/hpy/devel/src/runtime/structseq.c index 210bdec1c2..df79ab79e7 100644 --- a/graalpython/lib-graalpython/modules/hpy/devel/src/runtime/structseq.c +++ b/graalpython/lib-graalpython/modules/hpy/devel/src/runtime/structseq.c @@ -1,6 +1,6 @@ /* MIT License * - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. * Copyright (c) 2019 pyhandle * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -248,7 +248,15 @@ HPyStructSequence_New(HPyContext *ctx, HPy type, HPy_ssize_t nargs, HPy *args) tp = (PyTypeObject *)_h2py(type); name = PyUnicode_FromStringAndSize(s_n_fields, sizeof(s_n_fields)); // CPython also accesses the dict directly - v = PyDict_GetItemWithError(tp->tp_dict, name); +#if PY_VERSION_HEX >= 0x030C0000 + PyObject *dict = PyType_GetDict(tp); +#else + PyObject *dict = tp->tp_dict; +#endif + v = PyDict_GetItemWithError(dict, name); +#if PY_VERSION_HEX >= 0x030C0000 + Py_DECREF(dict); +#endif Py_DECREF(name); if (v == NULL && !PyErr_Occurred()) { goto type_error; diff --git a/graalpython/lib-graalpython/modules/hpy/devel/version.py b/graalpython/lib-graalpython/modules/hpy/devel/version.py index 6b9ef6a996..a24768ea89 100644 --- a/graalpython/lib-graalpython/modules/hpy/devel/version.py +++ b/graalpython/lib-graalpython/modules/hpy/devel/version.py @@ -1,6 +1,6 @@ # MIT License # -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. # Copyright (c) 2019 pyhandle # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -22,5 +22,5 @@ # SOFTWARE. # automatically generated by setup.py:get_scm_config() -__version__ = "0.9.0rc2" -__git_revision__ = "5ddcbc8d" +__version__ = "0.9.0" +__git_revision__ = "f6114734" diff --git a/mx.graalpython/mx_graalpython.py b/mx.graalpython/mx_graalpython.py index 31cb7a7bcf..4e6eedea47 100644 --- a/mx.graalpython/mx_graalpython.py +++ b/mx.graalpython/mx_graalpython.py @@ -3241,8 +3241,8 @@ def exclude_files(*files): tracker_file_dest = join(jni_project_dir, "src", "ctx_tracker.c") import_file(tracker_file_src, tracker_file_dest) - # tests go to 'com.oracle.graal.python.hpy.test/src/test' - test_files_dest = _hpy_test_root() + # tests go to 'com.oracle.graal.python.hpy.test/src/hpytest' + test_files_dest = join(mx.dependency(HPY_TEST_PROJECT).dir, "src", "hpytest") import_files(hpy_repo_test_dir, test_files_dest) remove_inexistent_files(hpy_repo_test_dir, test_files_dest)