commit: fe226b6348af5ede663144ce42361d5e53e44c57
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 19 00:01:52 2024 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Dec 19 01:24:54 2024 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=fe226b63
Add xfails for python 3.14.0-alpha.3
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
lib/portage/tests/ebuild/test_ipc_daemon.py | 5 +++++
lib/portage/tests/locks/test_asynchronous_lock.py | 9 +++++++++
lib/portage/tests/util/futures/test_retry.py | 18 ++++++++++++++++++
3 files changed, 32 insertions(+)
diff --git a/lib/portage/tests/ebuild/test_ipc_daemon.py
b/lib/portage/tests/ebuild/test_ipc_daemon.py
index b8777fe94b..ed8fc3a328 100644
--- a/lib/portage/tests/ebuild/test_ipc_daemon.py
+++ b/lib/portage/tests/ebuild/test_ipc_daemon.py
@@ -2,7 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
import tempfile
+import sys
import time
+import pytest
from portage import os
from portage import shutil
from portage import _python_interpreter
@@ -24,6 +26,9 @@ from _emerge.EbuildIpcDaemon import EbuildIpcDaemon
class IpcDaemonTestCase(TestCase):
_SCHEDULE_TIMEOUT = 40 # seconds
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 14), reason="fails with python 3.14.0a3"
+ )
def testIpcDaemon(self):
event_loop = global_event_loop()
tmpdir = tempfile.mkdtemp()
diff --git a/lib/portage/tests/locks/test_asynchronous_lock.py
b/lib/portage/tests/locks/test_asynchronous_lock.py
index da371e7c2c..59d2fc44e9 100644
--- a/lib/portage/tests/locks/test_asynchronous_lock.py
+++ b/lib/portage/tests/locks/test_asynchronous_lock.py
@@ -2,8 +2,11 @@
# Distributed under the terms of the GNU General Public License v2
import signal
+import sys
import tempfile
+import pytest
+
from portage import os
from portage import shutil
from portage.tests import TestCase
@@ -123,9 +126,15 @@ class AsynchronousLockTestCase(TestCase):
finally:
shutil.rmtree(tempdir)
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 14), reason="fails with python 3.14.0a3"
+ )
def testAsynchronousLockWaitCancel(self):
self._testAsynchronousLockWaitCancel()
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 14), reason="fails with python 3.14.0a3"
+ )
def testAsynchronousLockWaitCancelHardlink(self):
prev_state = os.environ.pop("__PORTAGE_TEST_HARDLINK_LOCKS", None)
os.environ["__PORTAGE_TEST_HARDLINK_LOCKS"] = "1"
diff --git a/lib/portage/tests/util/futures/test_retry.py
b/lib/portage/tests/util/futures/test_retry.py
index 2197f6697c..2b820dd0d4 100644
--- a/lib/portage/tests/util/futures/test_retry.py
+++ b/lib/portage/tests/util/futures/test_retry.py
@@ -3,12 +3,15 @@
from concurrent.futures import Future, ThreadPoolExecutor
import contextlib
+import sys
import threading
import weakref
import time
+import pytest
+
from portage.tests import TestCase
from portage.util._eventloop.global_event_loop import global_event_loop
from portage.util.backoff import RandomExponentialBackoff
@@ -112,6 +115,9 @@ class RetryTestCase(TestCase):
self.assertEqual(len(done), 1)
self.assertTrue(isinstance(done.pop().exception(),
SucceedNeverException))
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 14), reason="fails with python 3.14.0a3"
+ )
def testHangForever(self):
loop = global_event_loop()
with self._wrap_coroutine_func(HangForever()) as func_coroutine:
@@ -129,6 +135,9 @@ class RetryTestCase(TestCase):
isinstance(done.pop().exception().__cause__,
asyncio.TimeoutError)
)
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 14), reason="fails with python 3.14.0a3"
+ )
def testHangForeverReraise(self):
loop = global_event_loop()
with self._wrap_coroutine_func(HangForever()) as func_coroutine:
@@ -145,6 +154,9 @@ class RetryTestCase(TestCase):
self.assertEqual(len(done), 1)
self.assertTrue(isinstance(done.pop().exception(),
asyncio.TimeoutError))
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 14), reason="fails with python 3.14.0a3"
+ )
def testCancelRetry(self):
loop = global_event_loop()
with self._wrap_coroutine_func(SucceedNever()) as func_coroutine:
@@ -159,6 +171,9 @@ class RetryTestCase(TestCase):
self.assertEqual(len(done), 1)
self.assertTrue(done.pop().cancelled())
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 14), reason="fails with python 3.14.0a3"
+ )
def testOverallTimeoutWithException(self):
loop = global_event_loop()
with self._wrap_coroutine_func(SucceedNever()) as func_coroutine:
@@ -181,6 +196,9 @@ class RetryTestCase(TestCase):
msg=f"Cause was {cause.__class__.__name__}",
)
+ @pytest.mark.skipif(
+ sys.version_info >= (3, 14), reason="fails with python 3.14.0a3"
+ )
def testOverallTimeoutWithTimeoutError(self):
loop = global_event_loop()
# results in TimeoutError because it hangs forever