Skip to content

Commit 5f8e362

Browse files
committed
GR-26584: fix importlib metadata api - re-enable unittests
- style fixes
1 parent 0a2786d commit 5f8e362

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,21 +187,21 @@ public static final Assumption singleContextAssumption() {
187187

188188
@Specialization(assumptions = "singleContextAssumption()")
189189
public PBytes runCachedSingleContext(@SuppressWarnings("unused") VirtualFrame frame,
190-
@Cached(value = "getMagicNumberPBytes(frame, toBytesNode, pol)", weak = true) PBytes magicBytes) {
190+
@Cached(value = "getMagicNumberPBytes(frame)", weak = true) PBytes magicBytes) {
191191
return magicBytes;
192192
}
193193

194194
@Specialization(replaces = "runCachedSingleContext")
195195
public PBytes run(@SuppressWarnings("unused") VirtualFrame frame,
196-
@Cached(value = "getMagicNumberBytes(frame, toBytesNode, pol)", dimensions = 1) byte[] magicBytes) {
196+
@Cached(value = "getMagicNumberBytes(frame)", dimensions = 1) byte[] magicBytes) {
197197
return factory().createBytes(magicBytes);
198198
}
199199

200-
protected PBytes getMagicNumberPBytes(VirtualFrame frame, IntBuiltins.ToBytesNode toBytesNode, PythonObjectLibrary pol) {
201-
return factory().createBytes(getMagicNumberBytes(frame, toBytesNode, pol));
200+
protected PBytes getMagicNumberPBytes(VirtualFrame frame) {
201+
return factory().createBytes(getMagicNumberBytes(frame));
202202
}
203203

204-
protected byte[] getMagicNumberBytes(VirtualFrame frame, IntBuiltins.ToBytesNode toBytesNode, PythonObjectLibrary pol) {
204+
protected byte[] getMagicNumberBytes(VirtualFrame frame) {
205205
try {
206206
PBytes magic = toBytesNode.execute(frame, MAGIC_NUMBER, 2, "little", false);
207207
byte[] magicBytes = pol.getBufferBytes(magic);

graalpython/lib-python/3/test/test_importlib/test_metadata_api.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
Distribution, PackageNotFoundError, distribution,
1010
entry_points, files, metadata, requires, version,
1111
)
12-
from test.support import impl_detail
1312

1413

1514
class APITests(
@@ -97,7 +96,6 @@ def test_requires_egg_info_file(self):
9796
requirements = requires('egginfo-file')
9897
self.assertIsNone(requirements)
9998

100-
@impl_detail("GR-26584: fix metadata api", graalvm=False)
10199
def test_requires_egg_info(self):
102100
deps = requires('egginfo-pkg')
103101
assert len(deps) == 2
@@ -113,7 +111,6 @@ def test_requires_dist_info(self):
113111
assert 'wheel >= 1.0' in deps
114112
assert "pytest; extra == 'test'" in deps
115113

116-
@impl_detail("GR-26584: fix metadata api", graalvm=False)
117114
def test_more_complex_deps_requires_text(self):
118115
requires = textwrap.dedent("""
119116
dep1

0 commit comments

Comments
 (0)