Skip to content

Commit

Permalink
there's a bug in typeshed:
Browse files Browse the repository at this point in the history
python/typeshed#8799

that gives this error:

parsl/executors/workqueue/executor.py:674: error: "SynchronizedBase[c_bool]" has no attribute "value"  [attr-defined]


this patch ignores that, until a fix becomes available upstream
  • Loading branch information
benclifford committed Apr 4, 2023
1 parent 729efa5 commit 899134f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions parsl/executors/workqueue/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,6 @@ def initialize_scaling(self):
# Start scaling in/out
logger.debug("Starting WorkQueueExecutor with provider: %s", self.provider)
self._patch_providers()

if hasattr(self.provider, 'init_blocks'):
try:
self.scale_out(blocks=self.provider.init_blocks)
Expand Down Expand Up @@ -697,7 +696,9 @@ def shutdown(self, *args, **kwargs):
collector thread, which shuts down the Work Queue system submission.
"""
logger.debug("Work Queue shutdown started")
self.should_stop.value = True
self.should_stop.value = True # type: ignore[attr-defined]
# issue https://github.com/python/typeshed/issues/8799
# from mypy 0.981 onwards

# Remove the workers that are still going
kill_ids = [self.blocks[block] for block in self.blocks.keys()]
Expand All @@ -719,7 +720,9 @@ def _collect_work_queue_results(self):
"""
logger.debug("Starting Collector Thread")
try:
while not self.should_stop.value:
while not self.should_stop.value: # type: ignore[attr-defined]
# issue https://github.com/python/typeshed/issues/8799
# from mypy 0.981 onwards
if not self.submit_process.is_alive():
raise ExecutorError(self, "Workqueue Submit Process is not alive")

Expand Down

0 comments on commit 899134f

Please sign in to comment.