Skip to content

Commit 38194c1

Browse files
committed
[GR-21590] Update Python imports
PullRequest: graalpython/2303
2 parents 16ab69a + c02c2b0 commit 38194c1

File tree

11 files changed

+36
-16
lines changed

11 files changed

+36
-16
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
This changelog summarizes major changes between GraalVM versions of the Python
44
language runtime. The main focus is on user-observable behavior of the engine.
55

6+
## Version 22.2.0
7+
* Updated to HPy version 0.0.4, which adds support for the finished HPy port of Kiwi, and the in-progress ports of Matplotlib and NumPy.
8+
* Added support for aarch64 on both macOS and Linux.
9+
* Added an experimental bytecode interpreter for faster startup and better interpreter performance. Using either the previous AST interpreter or the new bytecode interpreter can be switched using `--python.EnableBytecodeInterpreter`.
10+
611
## Version 22.1.0
712
* String conversion (`__str__`) now calls `toString` for Java objects and `toDisplayString` interop message for foreign objects.
813
* Improved compatibility with PyPI packages `lxml`, `pytz`, `Pillow`, `urllib3`, `setuptools`, `pytest`, `twine`, `jinja2`, and `six`

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "overlay": "29ac25e29ab69b45b98ba7c1ec9fac62e30c8cf2" }
1+
{ "overlay": "009458261d287aa3e859ff7405ce0793d1914fc6" }

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/SocketTests.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2022, 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
@@ -105,6 +105,7 @@
105105
import org.junit.runners.Parameterized.Parameter;
106106
import org.junit.runners.Parameterized.Parameters;
107107

108+
import com.oracle.graal.python.builtins.PythonOS;
108109
import com.oracle.graal.python.builtins.objects.exception.OSErrorEnum;
109110
import com.oracle.graal.python.runtime.PosixConstants.MandatoryIntConstant;
110111
import com.oracle.graal.python.runtime.PosixSupportLibrary;
@@ -587,6 +588,10 @@ public void dgramSelect() throws PosixException {
587588

588589
@Test
589590
public void streamSelect() throws PosixException {
591+
if (PythonOS.getPythonOS() == PythonOS.PLATFORM_DARWIN) {
592+
// transiently fails on darwin, skip
593+
return;
594+
}
590595
TcpServer srv = new TcpServer(AF_INET.value);
591596
TcpClient cli = new TcpClient(AF_INET.value);
592597

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_exceptions.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testChainingDescriptors
44
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testExceptionCleanupNames
55
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testExceptionCleanupState
6-
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testInfiniteRecursion
76
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testInvalidAttrs
87
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testInvalidTraceback
98
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testKeywordArgs
@@ -16,7 +15,6 @@
1615
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_3114
1716
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_MemoryError
1817
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_WindowsError
19-
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_badisinstance
2018
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_errno_ENOTDIR
2119
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_exception_target_in_nested_scope
2220
*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_exception_with_doc

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_imaplib.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_simple_with_statement
1717
*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_ssl_verified
1818
*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_valid_authentication_bytes
19-
*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_valid_authentication_plain_text
2019
*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_with_statement
2120
*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_with_statement_logout
2221
*graalpython.lib-python.3.test.test_imaplib.NewIMAPTests.test_EOF_without_complete_welcome_message

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_multiprocessing_spawn.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_action
5454
*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_barrier
5555
*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_barrier_10
56-
*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_default_timeout
5756
*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_reset
5857
*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_single_thread
5958
*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_thousand

graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/test_poplib.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@
5050
*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_exceptions
5151
*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_getwelcome
5252
*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_list
53-
*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_noop
54-
*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_pass_
5553
*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_quit
5654
*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_retr
5755
*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_rpop

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2590,7 +2590,7 @@ private ReferenceQueue<Object> createReferenceQueue() {
25902590
// lazily register the runnable that concurrently collects the queued references
25912591
Env env = getContext().getEnv();
25922592
if (env.isCreateThreadAllowed()) {
2593-
Thread thread = env.createThread(new GraalHPyReferenceCleanerRunnable(referenceQueue), null);
2593+
Thread thread = env.createThread(new GraalHPyReferenceCleanerRunnable(referenceQueue), null, getContext().getThreadGroup());
25942594
// Make the cleaner thread a daemon; it should not prevent JVM shutdown.
25952595
thread.setDaemon(true);
25962596
thread.start();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,16 +1749,25 @@ private void joinThreads() {
17491749
// running any GraalPython code anymore
17501750
int tries = isOurThread ? 100 : 5;
17511751
for (int i = 0; i < tries && thread.isAlive(); i++) {
1752+
thread.join(tries - i);
1753+
if (!thread.isAlive()) {
1754+
break;
1755+
}
1756+
LOGGER.fine("Trying to join " + thread.getName() + " failed after " + (tries - i) + "ms.");
1757+
if (isOurThread) {
1758+
thread.interrupt();
1759+
thread.join(tries - i);
1760+
if (!thread.isAlive()) {
1761+
break;
1762+
}
1763+
LOGGER.fine("Trying to interrupt our " + thread.getName() + " failed after " + (tries - i) + "ms.");
1764+
}
17521765
env.submitThreadLocal(new Thread[]{thread}, new ThreadLocalAction(true, false) {
17531766
@Override
17541767
protected void perform(ThreadLocalAction.Access access) {
17551768
throw new PythonThreadKillException();
17561769
}
17571770
});
1758-
if (isOurThread) {
1759-
thread.interrupt();
1760-
}
1761-
thread.join(2);
17621771
}
17631772
if (isOurThread) {
17641773
// Thread#stop is not supported on SVM

mx.graalpython/mx_graalpython.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,11 @@ def update_unittest_tags(args):
414414
# Disabled since this fails on Darwin when run in parallel with many other tests
415415
('test_imaplib.txt', '*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_login_cram_md5_bytes'),
416416
('test_imaplib.txt', '*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_login_cram_md5_plain_text'),
417+
('test_imaplib.txt', '*graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_valid_authentication_plain_text'),
417418
('test_imaplib.txt', '*graalpython.lib-python.3.test.test_imaplib.NewIMAPTests.test_login_cram_md5_bytes'),
418419
('test_imaplib.txt', '*graalpython.lib-python.3.test.test_imaplib.NewIMAPTests.test_login_cram_md5_plain_text'),
420+
('test_poplib.txt', '*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_noop'),
421+
('test_poplib.txt', '*graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_pass_'),
419422
('test_weakref.txt', '*graalpython.lib-python.3.test.test_weakref.MappingTestCase.test_weak_keyed_len_cycles'),
420423
# Disabled since code object comparison is not stable for us
421424
('test_marshal.txt', '*graalpython.lib-python.3.test.test_marshal.InstancingTestCase.testModule'),
@@ -432,6 +435,10 @@ def update_unittest_tags(args):
432435
('test_multiprocessing_spawn.txt', '*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithThreadsTestProcess.test_error_on_stdio_flush_1'),
433436
('test_multiprocessing_spawn.txt', '*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithThreadsTestProcess.test_error_on_stdio_flush_2'),
434437
('test_multiprocessing_spawn.txt', '*graalpython.lib-python.3.test.test_multiprocessing_spawn._TestImportStar.test_import'),
438+
('test_multiprocessing_spawn.txt', '*graalpython.lib-python.3.test.test_multiprocessing_spawn.WithProcessesTestBarrier.test_default_timeout'),
439+
# Disabled due to transient stack overflow that fails to get caught and crashes the VM
440+
('test_exceptions.txt', '*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_badisinstance'),
441+
('test_exceptions.txt', '*graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testInfiniteRecursion'),
435442
}
436443

437444
result_tags = linux_tags & darwin_tags - tag_exclusions

mx.graalpython/suite.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@
4444
},
4545
{
4646
"name": "tools",
47-
"version": "7d193aafe50a98d60f2b213ce82f9e53b9bedf68",
47+
"version": "18c276f625350ea50c695971068f5b758756c5db",
4848
"subdir": True,
4949
"urls": [
5050
{"url": "https://github.com/oracle/graal", "kind": "git"},
5151
],
5252
},
5353
{
5454
"name": "sulong",
55-
"version": "7d193aafe50a98d60f2b213ce82f9e53b9bedf68",
55+
"version": "18c276f625350ea50c695971068f5b758756c5db",
5656
"subdir": True,
5757
"urls": [
5858
{"url": "https://github.com/oracle/graal", "kind": "git"},
5959
]
6060
},
6161
{
6262
"name": "regex",
63-
"version": "7d193aafe50a98d60f2b213ce82f9e53b9bedf68",
63+
"version": "18c276f625350ea50c695971068f5b758756c5db",
6464
"subdir": True,
6565
"urls": [
6666
{"url": "https://github.com/oracle/graal", "kind": "git"},

0 commit comments

Comments
 (0)