Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
33c0378
SG-38851: Use tk-ci-tools branch that targets tk-core segfault fix
julien-lang Feb 9, 2026
ad16887
Tests
julien-lang Feb 9, 2026
407ebf9
skip this one for now
julien-lang Feb 9, 2026
aa089db
SG-38851: Fix segfault by explicitly disconnecting Qt signals in tear…
julien-lang Feb 9, 2026
bd9e1a7
tests
julien-lang Feb 10, 2026
37f1b44
Fix tearDown to check for real Qt signals vs mocks
julien-lang Feb 10, 2026
52132a8
Fix production code: disconnect Qt signals in shut_down()
julien-lang Feb 10, 2026
879b432
tests
julien-lang Feb 10, 2026
e0c8f83
Remove tk-ci-tools branch dependency to minimize diff
julien-lang Feb 10, 2026
9946c47
more tests
julien-lang Feb 10, 2026
fe9686f
revert
julien-lang Feb 10, 2026
a0fda61
black
julien-lang Feb 10, 2026
1db004c
Add hasattr checks for mocked signals in shut_down()
julien-lang Feb 10, 2026
96fb27d
Move signal disconnection fix to test-only code
julien-lang Feb 10, 2026
eb71b99
Fix hasattr checks - verify parent object has attribute first
julien-lang Feb 10, 2026
3adcd0d
Skip disconnect for _MockedSignal instances
julien-lang Feb 10, 2026
7db82ec
tests
julien-lang Feb 10, 2026
7849910
black
julien-lang Feb 10, 2026
6df3e16
Increase schema cache test timeout for Python 3.13
julien-lang Feb 10, 2026
2f33030
SG-38851: Increase timeout for Python 3.13+ background tasks
julien-lang Feb 10, 2026
9fb4739
fixup! SG-38851: Increase timeout for Python 3.13+ background tasks
julien-lang Feb 10, 2026
81cb464
Cleanups
julien-lang Feb 10, 2026
f7a105c
fixup! Cleanups
julien-lang Feb 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/external_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,15 @@ def setUp(self):

def tearDown(self):
"""
Cleanup
Cleanup - release references before calling super().tearDown().

Setting instance variables to None releases references to Qt objects,
allowing them to be destroyed in a controlled order before the parent
tearDown runs. This prevents random segmentation faults during CI test
runs with PySide6 6.8.3+ where Qt signal auto-disconnection can access
freed memory during object destruction.
"""

self.external_config_loader = None
self.bg_task_manager = None
super().tearDown()
8 changes: 7 additions & 1 deletion tests/shotgun_model/test_cached_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# agreement to the Shotgun Pipeline Toolkit Source Code License. All rights
# not expressly granted therein are reserved by Shotgun Software Inc.

import sys
import time

from unittest import mock
Expand Down Expand Up @@ -138,11 +139,16 @@ def _trigger_cache_load(self):

# The schema is loaded by a background thread, so we'll have to process events so the results can more in.
Comment thread
julien-lang marked this conversation as resolved.
before = time.time()
Comment thread
julien-lang marked this conversation as resolved.

timeout = 5 if sys.version_info >= (3, 13) else 2
# Python 3.13+ has different threading/GIL behavior that can make background
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

# tasks slower on some platforms (especially macOS).

while (
self._cached_schema._is_schema_loaded() is False
or self._cached_schema._is_status_loaded() is False
):
self._qapp.processEvents()
Comment thread
julien-lang marked this conversation as resolved.
assert (
before + 2 > time.time()
before + timeout > time.time()
Comment thread
julien-lang marked this conversation as resolved.
), "Timeout, schema shouldn't take this long to load from Mockgun."