') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); DNM Add RunWithSubprocess by chromy · Pull Request #470 · getsentry/launchpad · GitHub
Skip to content

DNM Add RunWithSubprocess - #470

Open
chromy wants to merge 1 commit into
mainfrom
chromy/2025-11-10-add-subprocess
Open

DNM Add RunWithSubprocess#470
chromy wants to merge 1 commit into
mainfrom
chromy/2025-11-10-add-subprocess

Conversation

@chromy

Copy link
Copy Markdown
Contributor

No description provided.

@codecov

codecovBot commented Nov 12, 2025

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completedFailedPassedSkipped
33513341
View the top 1 failed test(s) by shortest run time
tests.integration.test_kafka::test_benchmark_job
Stack Traces | 0.006s run time
benchmark = <pytest_benchmark.fixture.BenchmarkFixture object at 0x7f8b7bd7b770>
def test_benchmark_job(benchmark):
log_queue = multiprocessing.Queue()
def do_job():
job = Job(return_hello_world, log_queue, Message(make_value(KafkaPayload(None, None, []))))
while True:
r = job.poll()
if r is not None:
return r
time.sleep(0.01)
> final = benchmark(do_job)
^^^^^^^^^^^^^^^^^
tests/integration/test_kafka.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .../local/lib/python3.13....../site-packages/pytest_benchmark/fixture.py:184: in __call__
return self._raw(function_to_benchmark, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../local/lib/python3.13....../site-packages/pytest_benchmark/fixture.py:248: in _raw
function_result = function_to_benchmark(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/integration/test_kafka.py:202: in do_job
job = Job(return_hello_world, log_queue, Message(make_value(KafkaPayload(None, None, []))))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.../src/launchpad/kafka.py:70: in __init__
self.__process.start()
.../local/lib/python3.13/multiprocessing/process.py:121: in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
.../local/lib/python3.13/multiprocessing/context.py:301: in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
.../local/lib/python3.13/multiprocessing/popen_forkserver.py:35: in __init__
super().__init__(process_obj)
.../local/lib/python3.13/multiprocessing/popen_fork.py:20: in __init__
self._launch(process_obj)
.../local/lib/python3.13/multiprocessing/popen_forkserver.py:47: in _launch
reduction.dump(process_obj, buf)
.../local/lib/python3.13/multiprocessing/reduction.py:60: in dump
ForkingPickler(file, protocol).dump(obj)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Lock(owner=None)>
def __getstate__(self):
context.assert_spawning(self)
sl = self._semlock
if sys.platform == 'win32':
h = context.get_spawning_popen().duplicate_for_child(sl.handle)
else:
if self._is_fork_ctx:
> raise RuntimeError('A SemLock created in a fork context is being '
'shared with a process in a spawn context. This is '
'not supported. Please use the same context to create '
'multiprocessing objects and Process.')
E RuntimeError: A SemLock created in a fork context is being shared with a process in a spawn context. This is not supported. Please use the same context to create multiprocessing objects and Process.
.../local/lib/python3.13/multiprocessing/synchronize.py:107: RuntimeError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@chromy
chromyforce-pushed the chromy/2025-11-10-add-subprocess branch from 23cb118 to 015fc6aCompareNovember 12, 2025 15:01
@chromychromy changed the title Add RunWithSubprocessDNM Add RunWithSubprocessNov 12, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@chromy