Skip to content

Commit 215ed99

Browse files
committed
[GR-21590] Update imports
PullRequest: graalpython/3387
2 parents 6536717 + 6c597af commit 215ed99

File tree

8 files changed

+17
-98
lines changed

8 files changed

+17
-98
lines changed

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "68d2386ceb05a9094862df57e8912a1207499e89" }
1+
{ "overlay": "dc352e586d680255c4bd4f68f90efe48f990679e" }

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinConstructors.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@
109109
import com.oracle.graal.python.builtins.Python3Core;
110110
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
111111
import com.oracle.graal.python.builtins.PythonBuiltins;
112-
import com.oracle.graal.python.builtins.modules.WarningsModuleBuiltins.WarnNode;
113112
import com.oracle.graal.python.builtins.modules.BuiltinConstructorsFactory.FloatNodeFactory.NonPrimitiveFloatNodeGen;
114113
import com.oracle.graal.python.builtins.modules.BuiltinConstructorsFactory.ObjectNodeFactory.ReportAbstractClassNodeGen;
114+
import com.oracle.graal.python.builtins.modules.WarningsModuleBuiltins.WarnNode;
115115
import com.oracle.graal.python.builtins.objects.PNone;
116116
import com.oracle.graal.python.builtins.objects.PNotImplemented;
117117
import com.oracle.graal.python.builtins.objects.buffer.PythonBufferAccessLibrary;
@@ -1081,7 +1081,6 @@ static Object reversed(VirtualFrame frame, Object cls, Object sequence,
10811081
// float([x])
10821082
@Builtin(name = J_FLOAT, minNumOfPositionalArgs = 1, maxNumOfPositionalArgs = 2, constructsClass = PythonBuiltinClassType.PFloat, doc = "Convert a string or number to a floating point number, if possible.")
10831083
@GenerateNodeFactory
1084-
@ReportPolymorphism
10851084
abstract static class FloatNode extends PythonBinaryBuiltinNode {
10861085

10871086
@Child NonPrimitiveFloatNode nonPrimitiveFloatNode;
@@ -1874,7 +1873,6 @@ private static String newString(byte[] bytes, int offset, int length) {
18741873
The builtins True and False are the only two instances of the class bool.
18751874
The class bool is a subclass of the class int, and cannot be subclassed.""")
18761875
@GenerateNodeFactory
1877-
@ReportPolymorphism
18781876
public abstract static class BoolNode extends PythonBinaryBuiltinNode {
18791877
@Specialization
18801878
public static boolean bool(VirtualFrame frame, @SuppressWarnings("unused") Object cls, Object obj,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/WarningsModuleBuiltins.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@
134134
import com.oracle.truffle.api.dsl.GenerateNodeFactory;
135135
import com.oracle.truffle.api.dsl.NeverDefault;
136136
import com.oracle.truffle.api.dsl.NodeFactory;
137-
import com.oracle.truffle.api.dsl.ReportPolymorphism;
138137
import com.oracle.truffle.api.dsl.Specialization;
139138
import com.oracle.truffle.api.frame.Frame;
140139
import com.oracle.truffle.api.frame.VirtualFrame;
@@ -983,7 +982,6 @@ private static TruffleString getSourceLine(Node node, PDict globals, int lineno)
983982
}
984983
}
985984

986-
@ReportPolymorphism
987985
@Builtin(name = J_WARN, minNumOfPositionalArgs = 2, parameterNames = {"$mod", "message", "category", "stacklevel", "source"}, declaresExplicitSelf = true, alwaysNeedsCallerFrame = true)
988986
@ArgumentClinic(name = "category", defaultValue = "PNone.NONE")
989987
@ArgumentClinic(name = "stacklevel", conversion = ClinicConversion.Int, defaultValue = "1")
@@ -1013,7 +1011,6 @@ public static WarnBuiltinNode create() {
10131011

10141012
}
10151013

1016-
@ReportPolymorphism
10171014
@Builtin(name = J_WARN_EXPLICIT, minNumOfPositionalArgs = 5, //
10181015
parameterNames = {"$mod", "message", "category", "filename", "lineno", "module", "registry", "module_globals", "source"}, declaresExplicitSelf = true)
10191016
@ArgumentClinic(name = "lineno", conversion = ClinicConversion.Int)

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/special/LookupAndCallNonReversibleBinaryNode.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -57,15 +57,13 @@
5757
import com.oracle.truffle.api.dsl.Cached.Exclusive;
5858
import com.oracle.truffle.api.dsl.ImportStatic;
5959
import com.oracle.truffle.api.dsl.NeverDefault;
60-
import com.oracle.truffle.api.dsl.ReportPolymorphism;
6160
import com.oracle.truffle.api.dsl.ReportPolymorphism.Megamorphic;
6261
import com.oracle.truffle.api.dsl.Specialization;
6362
import com.oracle.truffle.api.frame.VirtualFrame;
6463
import com.oracle.truffle.api.nodes.Node;
6564
import com.oracle.truffle.api.strings.TruffleString;
6665

6766
@ImportStatic(PythonOptions.class)
68-
@ReportPolymorphism
6967
abstract class LookupAndCallNonReversibleBinaryNode extends LookupAndCallBinaryNode {
7068
protected final SpecialMethodSlot slot;
7169
protected final TruffleString name;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/special/LookupAndCallReversibleBinaryNode.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -62,7 +62,6 @@
6262
import com.oracle.truffle.api.dsl.Cached;
6363
import com.oracle.truffle.api.dsl.Cached.Exclusive;
6464
import com.oracle.truffle.api.dsl.ImportStatic;
65-
import com.oracle.truffle.api.dsl.ReportPolymorphism;
6665
import com.oracle.truffle.api.dsl.ReportPolymorphism.Megamorphic;
6766
import com.oracle.truffle.api.dsl.Specialization;
6867
import com.oracle.truffle.api.frame.VirtualFrame;
@@ -76,7 +75,6 @@
7675
//
7776
// [*] only when v->ob_type != w->ob_type && w->ob_type is a subclass of v->ob_type
7877
@ImportStatic(PythonOptions.class)
79-
@ReportPolymorphism
8078
abstract class LookupAndCallReversibleBinaryNode extends LookupAndCallBinaryNode {
8179

8280
protected final SpecialMethodSlot slot;

graalpython/lib-graalpython/patches/torch/torch-2.2.1.patch

Lines changed: 7 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -174,81 +174,22 @@ index 6e358034..0edf7770 100644
174174
class TestWrapperSubclassAliasing(TestCase):
175175

176176
diff --git a/third_party/pybind11/include/pybind11/detail/common.h b/third_party/pybind11/include/pybind11/detail/common.h
177-
index 31a54c77..a2d2a519 100644
177+
index 31a54c77..aafeb9c8 100644
178178
--- a/third_party/pybind11/include/pybind11/detail/common.h
179179
+++ b/third_party/pybind11/include/pybind11/detail/common.h
180-
@@ -291,6 +291,9 @@ PYBIND11_WARNING_DISABLE_MSVC(4505)
181-
#if defined(PYPY_VERSION) && !defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)
182-
# define PYBIND11_SIMPLE_GIL_MANAGEMENT
180+
@@ -288,7 +288,7 @@ PYBIND11_WARNING_DISABLE_MSVC(4505)
181+
# undef copysign
183182
#endif
184-
+#ifdef GRAALVM_PYTHON
185-
+# define PYBIND11_SIMPLE_GIL_MANAGEMENT
186-
+#endif
187183

188-
#if defined(_MSC_VER)
189-
# if defined(PYBIND11_DEBUG_MARKER)
190-
diff --git a/third_party/pybind11/include/pybind11/detail/internals.h b/third_party/pybind11/include/pybind11/detail/internals.h
191-
index aaa7f868..855fbaf1 100644
192-
--- a/third_party/pybind11/include/pybind11/detail/internals.h
193-
+++ b/third_party/pybind11/include/pybind11/detail/internals.h
194-
@@ -186,7 +186,7 @@ struct internals {
195-
PyTypeObject *static_property_type;
196-
PyTypeObject *default_metaclass;
197-
PyObject *instance_base;
198-
-#if defined(WITH_THREAD)
199-
+#if defined(WITH_THREAD) && !defined(GRAALVM_PYTHON)
200-
// Unused if PYBIND11_SIMPLE_GIL_MANAGEMENT is defined:
201-
PYBIND11_TLS_KEY_INIT(tstate)
202-
# if PYBIND11_INTERNALS_VERSION > 4
203-
@@ -300,7 +300,7 @@ struct type_info {
184+
-#if defined(PYPY_VERSION) && !defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)
185+
+#if (defined(PYPY_VERSION) || defined(GRAALVM_PYTHON)) && !defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)
186+
# define PYBIND11_SIMPLE_GIL_MANAGEMENT
204187
#endif
205188

206-
#ifndef PYBIND11_INTERNALS_KIND
207-
-# if defined(WITH_THREAD)
208-
+# if defined(WITH_THREAD) && !defined(GRAALVM_PYTHON)
209-
# define PYBIND11_INTERNALS_KIND ""
210-
# else
211-
# define PYBIND11_INTERNALS_KIND "_without_thread"
212-
@@ -508,7 +508,7 @@ PYBIND11_NOINLINE internals &get_internals() {
213-
}
214-
auto *&internals_ptr = *internals_pp;
215-
internals_ptr = new internals();
216-
-#if defined(WITH_THREAD)
217-
+#if defined(WITH_THREAD) && !defined(GRAALVM_PYTHON)
218-
219-
PyThreadState *tstate = PyThreadState_Get();
220-
// NOLINTNEXTLINE(bugprone-assignment-in-if-condition)
221-
@@ -544,7 +544,7 @@ PYBIND11_NOINLINE internals &get_internals() {
222-
struct local_internals {
223-
type_map<type_info *> registered_types_cpp;
224-
std::forward_list<ExceptionTranslator> registered_exception_translators;
225-
-#if defined(WITH_THREAD) && PYBIND11_INTERNALS_VERSION == 4
226-
+#if defined(WITH_THREAD) && !defined(GRAALVM_PYTHON) && PYBIND11_INTERNALS_VERSION == 4
227-
228-
// For ABI compatibility, we can't store the loader_life_support TLS key in
229-
// the `internals` struct directly. Instead, we store it in `shared_data` and
230189
diff --git a/third_party/pybind11/include/pybind11/detail/type_caster_base.h b/third_party/pybind11/include/pybind11/detail/type_caster_base.h
231-
index 16387506..2ea0fb76 100644
190+
index 16387506..53e20b48 100644
232191
--- a/third_party/pybind11/include/pybind11/detail/type_caster_base.h
233192
+++ b/third_party/pybind11/include/pybind11/detail/type_caster_base.h
234-
@@ -36,7 +36,7 @@ private:
235-
loader_life_support *parent = nullptr;
236-
std::unordered_set<PyObject *> keep_alive;
237-
238-
-#if defined(WITH_THREAD)
239-
+#if defined(WITH_THREAD) && !defined(GRAALVM_PYTHON)
240-
// Store stack pointer in thread-local storage.
241-
static PYBIND11_TLS_KEY_REF get_stack_tls_key() {
242-
# if PYBIND11_INTERNALS_VERSION == 4
243-
@@ -55,7 +55,7 @@ private:
244-
// Use single global variable for stack.
245-
static loader_life_support **get_stack_pp() {
246-
static loader_life_support *global_stack = nullptr;
247-
- return global_stack;
248-
+ return &global_stack;
249-
}
250-
static loader_life_support *get_stack_top() { return *get_stack_pp(); }
251-
static void set_stack_top(loader_life_support *value) { *get_stack_pp() = value; }
252193
@@ -484,7 +484,7 @@ PYBIND11_NOINLINE handle get_object_handle(const void *ptr, const detail::type_i
253194
}
254195

@@ -271,21 +212,6 @@ index bd5f981f..c25f036b 100644
271212
template <eval_mode mode = eval_statements>
272213
object eval_file(str, object, object) {
273214
pybind11_fail("eval_file not supported in PyPy3. Use eval");
274-
diff --git a/third_party/pybind11/include/pybind11/gil.h b/third_party/pybind11/include/pybind11/gil.h
275-
index 570a5581..feb1f95c 100644
276-
--- a/third_party/pybind11/include/pybind11/gil.h
277-
+++ b/third_party/pybind11/include/pybind11/gil.h
278-
@@ -173,8 +173,8 @@ public:
279-
if (disassoc) {
280-
// Python >= 3.7 can remove this, it's an int before 3.7
281-
// NOLINTNEXTLINE(readability-qualified-auto)
282-
- auto key = detail::get_internals().tstate;
283-
- PYBIND11_TLS_REPLACE_VALUE(key, tstate);
284-
+ // auto key = detail::get_internals().tstate;
285-
+ // PYBIND11_TLS_REPLACE_VALUE(key, tstate);
286-
}
287-
}
288-
289215
diff --git a/third_party/pybind11/include/pybind11/pybind11.h b/third_party/pybind11/include/pybind11/pybind11.h
290216
index 818115cc..b4b3bf93 100644
291217
--- a/third_party/pybind11/include/pybind11/pybind11.h

mx.graalpython/mx_graalpython_python_benchmarks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989

9090
SKIPPED_PANDAS_BENCHMARKS = [
9191
"replace.ReplaceDict.time_replace_series", # Times out
92+
"replace.ReplaceList.time_replace_list", # OOM, WIP msimacek
93+
"replace.ReplaceList.time_replace_list_one_match", # OOM, WIP msimacek
9294
"reshape.Crosstab.time_crosstab_normalize_margins", # Times out
9395
"reshape.Cut.peakmem_cut_interval", # Times out
9496
"reshape.Cut.time_cut_interval", # Times out

mx.graalpython/suite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,31 @@
4545
},
4646
{
4747
"name": "sdk",
48-
"version": "0517eeebe74567d9f7e92dd1018b6b0276d39d1a",
48+
"version": "e716a715f9887e63a57b01052ac0ac73eb68f1b3",
4949
"subdir": True,
5050
"urls": [
5151
{"url": "https://github.com/oracle/graal", "kind": "git"},
5252
]
5353
},
5454
{
5555
"name": "tools",
56-
"version": "0517eeebe74567d9f7e92dd1018b6b0276d39d1a",
56+
"version": "e716a715f9887e63a57b01052ac0ac73eb68f1b3",
5757
"subdir": True,
5858
"urls": [
5959
{"url": "https://github.com/oracle/graal", "kind": "git"},
6060
],
6161
},
6262
{
6363
"name": "sulong",
64-
"version": "0517eeebe74567d9f7e92dd1018b6b0276d39d1a",
64+
"version": "e716a715f9887e63a57b01052ac0ac73eb68f1b3",
6565
"subdir": True,
6666
"urls": [
6767
{"url": "https://github.com/oracle/graal", "kind": "git"},
6868
]
6969
},
7070
{
7171
"name": "regex",
72-
"version": "0517eeebe74567d9f7e92dd1018b6b0276d39d1a",
72+
"version": "e716a715f9887e63a57b01052ac0ac73eb68f1b3",
7373
"subdir": True,
7474
"urls": [
7575
{"url": "https://github.com/oracle/graal", "kind": "git"},

0 commit comments

Comments
 (0)