Skip to content

Commit 2eda668

Browse files
committed
ignore deprecation warnings for object model for now
1 parent 34d790c commit 2eda668

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/common/DynamicObjectStorage.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public final class DynamicObjectStorage extends HashingStorage {
9090
protected final DynamicObject store;
9191
private final MroSequenceStorage mro;
9292

93+
@SuppressWarnings("deprecation")
9394
public DynamicObjectStorage() {
9495
this(LAYOUT.newInstance(EMPTY_SHAPE), null);
9596
}
@@ -361,6 +362,7 @@ private static Object runNode(DynamicObjectStorage self, Object key, Object acc,
361362
}
362363
}
363364

365+
@SuppressWarnings("deprecation")
364366
@Override
365367
@ExportMessage
366368
@TruffleBoundary
@@ -370,6 +372,7 @@ public HashingStorage clear() {
370372
return this;
371373
}
372374

375+
@SuppressWarnings("deprecation")
373376
@Override
374377
@ExportMessage
375378
@TruffleBoundary

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/method/AbstractMethodBuiltins.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ Object getModule(PythonObject self, Object value,
213213
return PNone.NONE;
214214
}
215215

216+
@SuppressWarnings("deprecation")
216217
@Specialization(guards = "!isNoValue(value)")
217218
Object getModule(PBuiltinMethod self, Object value) {
218219
CompilerDirectives.transferToInterpreter();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/PythonObject.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public static void setSingle(PythonObject self, Object cls,
8282
PythonObjectLayoutImpl.INSTANCE.setLazyPythonClass(self.storage, cls);
8383
}
8484

85+
@SuppressWarnings("deprecation")
8586
@Specialization
8687
public static void setMultiContext(PythonObject self, Object cls) {
8788
self.storedPythonClass = cls;
@@ -138,17 +139,20 @@ public final DynamicObject getStorage() {
138139
return storage;
139140
}
140141

142+
@SuppressWarnings("deprecation")
141143
@TruffleBoundary
142144
public final Object getAttribute(Object key) {
143145
return getStorage().get(key, PNone.NO_VALUE);
144146
}
145147

148+
@SuppressWarnings("deprecation")
146149
@TruffleBoundary
147150
public void setAttribute(Object name, Object value) {
148151
CompilerAsserts.neverPartOfCompilation();
149152
getStorage().define(name, value);
150153
}
151154

155+
@SuppressWarnings("deprecation")
152156
@TruffleBoundary
153157
public List<String> getAttributeNames() {
154158
ArrayList<String> keyList = new ArrayList<>();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/attributes/ReadAttributeFromDynamicObjectNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected Object readDirect(DynamicObject dynamicObject, Object key,
131131
}
132132
}
133133

134-
@SuppressWarnings("unused")
134+
@SuppressWarnings({"unused", "deprecation"})
135135
@Specialization(guards = {
136136
"dynamicObject.getShape() == cachedShape",
137137
"!layoutAssumption.isValid()"
@@ -145,6 +145,7 @@ protected Object updateShapeAndRead(DynamicObject dynamicObject, Object key,
145145
return nextNode.execute(dynamicObject, key);
146146
}
147147

148+
@SuppressWarnings("deprecation")
148149
@TruffleBoundary
149150
@Specialization(replaces = {"readDirect", "readDirectFinal", "updateShapeAndRead"})
150151
protected static Object readIndirect(DynamicObject dynamicObject, Object key) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/attributes/WriteAttributeToDynamicObjectNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected static boolean compareKey(Object cachedKey, Object key) {
7676
return cachedKey == key;
7777
}
7878

79-
@SuppressWarnings("unused")
79+
@SuppressWarnings({"unused", "deprecation"})
8080
@Specialization(guards = {
8181
"dynamicObject.getShape() == cachedShape",
8282
"!layoutAssumption.isValid()"
@@ -148,6 +148,7 @@ protected boolean defineDirect(DynamicObject dynamicObject, Object key, Object v
148148
return true;
149149
}
150150

151+
@SuppressWarnings("deprecation")
151152
@TruffleBoundary
152153
@Specialization(replaces = {"doDirect", "defineDirect", "updateShapeAndWrite"})
153154
protected static boolean doIndirect(DynamicObject dynamicObject, Object key, Object value) {

0 commit comments

Comments
 (0)