Skip to content

Commit

Permalink
squashmerge PR #2812
Browse files Browse the repository at this point in the history
commit fa66de4
Merge: 46f0a5f c39700b
Author: Ben Clifford <[email protected]>
Date:   Thu Jul 20 08:15:14 2023 +0000

    Merge remote-tracking branch 'origin/master' into benc-typeguard-4

commit 46f0a5f
Author: Ben Clifford <[email protected]>
Date:   Wed Jul 19 15:10:34 2023 +0000

    Remote unused from __future__ import

commit b8e5cb9
Author: Ben Clifford <[email protected]>
Date:   Wed Jul 19 14:23:51 2023 +0000

    Upgrade typeguard, because TypeCheckError is new in typeguard 4

commit b452efd
Author: Ben Clifford <[email protected]>
Date:   Wed Jul 19 13:02:32 2023 +0000

    Expect a different type error in tests with typeguard 4.0.0

commit 177f1e4
Merge: 70e0879 b9f2ca3
Author: Ben Clifford <[email protected]>
Date:   Wed Jul 19 12:54:16 2023 +0000

    Merge remote-tracking branch 'origin/master' into benc-typeguard-4

commit 70e0879
Merge: acde393 a001fe2
Author: Ben Clifford <[email protected]>
Date:   Tue Jul 18 15:00:08 2023 +0200

    Merge branch 'master' into benc-typeguard-4

commit acde393
Author: Ben Clifford <[email protected]>
Date:   Wed Jul 12 08:03:59 2023 +0000

    Loosen typeguard upper bound to allow major version 4
  • Loading branch information
benclifford committed Nov 13, 2023
1 parent 111860a commit 8cc3ea2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
11 changes: 10 additions & 1 deletion parsl/monitoring/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,16 @@ def start(self, run_id: str, run_dir: str) -> int:
self.logger.debug("Initializing ZMQ Pipes to client")
self.monitoring_hub_active = True

comm_q: Queue[Union[Tuple[int, int], str]]
# Typechecking note:
# Queue is not a type at runtime - it's a method that looks like
# a type. mypy seems happy enough with this, but Python
# doesn't like subscripting a method like this, which is needed at
# runtime for typeguard 4.0.0. So this type is left here for
# documentation and perhaps later re-specialisation.
# The other queues defined here are attributes on self, not local
# variables, and so apparently typeguard 4.0.0 checks them less hard.
# comm_q: Queue[Union[Tuple[int, int], str]]
comm_q: Queue
comm_q = SizedQueue(maxsize=10)

self.exception_q: Queue[Tuple[str, str]]
Expand Down
3 changes: 2 additions & 1 deletion parsl/tests/test_bash_apps/test_stdout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import typeguard

import pytest

Expand Down Expand Up @@ -44,7 +45,7 @@ def test_bad_stdout_specs(spec):
try:
fn.result()
except Exception as e:
assert isinstance(e, TypeError) or isinstance(e, perror.BadStdStreamFile), "Exception is wrong type"
assert isinstance(e, (typeguard.TypeCheckError, TypeError, perror.BadStdStreamFile)), "Exception is wrong type"
else:
assert False, "Did not raise expected exception"

Expand Down
10 changes: 9 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
pyzmq>=17.1.2
typeguard>=2.10,<3
typeguard==4.0.0
# typeguard 4.0.1 just released as I write this message
# breaks with this error:
#
# def __init__(self, config: Config = Config()) -> None:
# parsl/config.py:80: in __init__
# Literal['task_exit'],
# E NameError: name 'task_exit' is not defined

typing-extensions>=4.6,<5
six
globus-sdk
Expand Down

0 comments on commit 8cc3ea2

Please sign in to comment.