Skip to content

Commit 691cb58

Browse files
committed
[GR-52015] Update to HPy 0.9.0
PullRequest: graalpython/3188
2 parents ddf8e67 + 8e2417b commit 691cb58

File tree

7 files changed

+26
-18
lines changed

7 files changed

+26
-18
lines changed

graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/hpymodule.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* MIT License
22
*
3-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates.
3+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
44
* Copyright (c) 2019 pyhandle
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -143,7 +143,7 @@ typedef struct {
143143
* structure that will serve as a specification of the module that should be
144144
* created by the interpreter. HPy supports only multi-phase module
145145
* initialization (PEP 451). Any module initialization code can be added
146-
* to the HPy_mod_execute slot of the module if needed.
146+
* to the HPy_mod_exec slot of the module if needed.
147147
*
148148
* Example:
149149
*

graalpython/com.oracle.graal.python.hpy.llvm/include/hpy/version.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* MIT License
22
*
3-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates.
3+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
44
* Copyright (c) 2019 pyhandle
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -23,5 +23,5 @@
2323
*/
2424

2525
// automatically generated by setup.py:get_scm_config()
26-
#define HPY_VERSION "0.9.0rc2"
27-
#define HPY_GIT_REVISION "5ddcbc8d"
26+
#define HPY_VERSION "0.9.0"
27+
#define HPY_GIT_REVISION "f6114734"

graalpython/com.oracle.graal.python.hpy.test/src/hpytest/test_hpyimport.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# MIT License
2-
#
3-
# Copyright (c) 2021, 2023, Oracle and/or its affiliates.
2+
#
3+
# Copyright (c) 2021, 2024, Oracle and/or its affiliates.
44
# Copyright (c) 2019 pyhandle
5-
#
5+
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal
88
# in the Software without restriction, including without limitation the rights
99
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1010
# copies of the Software, and to permit persons to whom the Software is
1111
# furnished to do so, subject to the following conditions:
12-
#
12+
#
1313
# The above copyright notice and this permission notice shall be included in all
1414
# copies or substantial portions of the Software.
15-
#
15+
#
1616
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1717
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1818
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

graalpython/lib-graalpython/modules/hpy.egg-info/PKG-INFO

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: hpy
3-
Version: 0.9.0rc2
3+
Version: 0.9.0
44
Summary: UNKNOWN
55
Home-page: UNKNOWN
66
License: UNKNOWN

graalpython/lib-graalpython/modules/hpy/devel/src/runtime/structseq.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* MIT License
22
*
3-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates.
3+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates.
44
* Copyright (c) 2019 pyhandle
55
*
66
* 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)
248248
tp = (PyTypeObject *)_h2py(type);
249249
name = PyUnicode_FromStringAndSize(s_n_fields, sizeof(s_n_fields));
250250
// CPython also accesses the dict directly
251-
v = PyDict_GetItemWithError(tp->tp_dict, name);
251+
#if PY_VERSION_HEX >= 0x030C0000
252+
PyObject *dict = PyType_GetDict(tp);
253+
#else
254+
PyObject *dict = tp->tp_dict;
255+
#endif
256+
v = PyDict_GetItemWithError(dict, name);
257+
#if PY_VERSION_HEX >= 0x030C0000
258+
Py_DECREF(dict);
259+
#endif
252260
Py_DECREF(name);
253261
if (v == NULL && !PyErr_Occurred()) {
254262
goto type_error;

graalpython/lib-graalpython/modules/hpy/devel/version.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020, 2023, Oracle and/or its affiliates.
3+
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
44
# Copyright (c) 2019 pyhandle
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -22,5 +22,5 @@
2222
# SOFTWARE.
2323

2424
# automatically generated by setup.py:get_scm_config()
25-
__version__ = "0.9.0rc2"
26-
__git_revision__ = "5ddcbc8d"
25+
__version__ = "0.9.0"
26+
__git_revision__ = "f6114734"

mx.graalpython/mx_graalpython.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3241,8 +3241,8 @@ def exclude_files(*files):
32413241
tracker_file_dest = join(jni_project_dir, "src", "ctx_tracker.c")
32423242
import_file(tracker_file_src, tracker_file_dest)
32433243

3244-
# tests go to 'com.oracle.graal.python.hpy.test/src/test'
3245-
test_files_dest = _hpy_test_root()
3244+
# tests go to 'com.oracle.graal.python.hpy.test/src/hpytest'
3245+
test_files_dest = join(mx.dependency(HPY_TEST_PROJECT).dir, "src", "hpytest")
32463246
import_files(hpy_repo_test_dir, test_files_dest)
32473247
remove_inexistent_files(hpy_repo_test_dir, test_files_dest)
32483248

0 commit comments

Comments
 (0)