Skip to content

Commit

Permalink
[GR-52015] Update to HPy 0.9.0
Browse files Browse the repository at this point in the history
PullRequest: graalpython/3188
  • Loading branch information
timfel committed Feb 13, 2024
2 parents ddf8e67 + 8e2417b commit 691cb58
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
*
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion graalpython/lib-graalpython/modules/hpy.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions graalpython/lib-graalpython/modules/hpy/devel/version.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
4 changes: 2 additions & 2 deletions mx.graalpython/mx_graalpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 691cb58

Please sign in to comment.