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 Nov 1, 2023
1 parent dbdf2f5 commit 8bb0587
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parsl/executors/workqueue/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,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 @@ -699,6 +698,8 @@ def shutdown(self, *args, **kwargs):
"""
logger.debug("Work Queue shutdown started")
self.should_stop.value = True
# 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 @@ -721,6 +722,8 @@ def _collect_work_queue_results(self):
logger.debug("Starting Collector Thread")
try:
while not self.should_stop.value:
# 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 8bb0587

Please sign in to comment.