Skip to content

Commit

Permalink
Support python 3.11 in CI (#2461)
Browse files Browse the repository at this point in the history
This PR makes a change to the task state enum so that it renders the same across all Python versions, the same as pre-3.11. Python 3.11 changes how enumerations are rendered by default by __str__ to support a usecase that is not relevant here (to support porting from int constants to enums).
  • Loading branch information
benclifford committed Mar 27, 2023
1 parent 73eeb3a commit 345efbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
main-test-suite:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
runs-on: ubuntu-20.04
timeout-minutes: 30

Expand Down
3 changes: 3 additions & 0 deletions parsl/dataflow/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class States(IntEnum):
anything about task success or failure, merely that the wrapper
ran long enough to record it as finished."""

def __str__(self) -> str:
return self.__class__.__name__ + "." + self.name


FINAL_STATES = [States.exec_done, States.memo_done, States.failed, States.dep_fail]
"""States from which we will never move to another state, because the job has
Expand Down

0 comments on commit 345efbf

Please sign in to comment.