Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support python 3.11 in CI #2461

Merged
merged 11 commits into from Mar 27, 2023
Merged

Support python 3.11 in CI #2461

merged 11 commits into from Mar 27, 2023

Conversation

benclifford
Copy link
Collaborator

Type of change

  • New feature (non-breaking change that adds functionality)

@benclifford benclifford marked this pull request as draft October 28, 2022 11:59
@benclifford
Copy link
Collaborator Author

waiting for 3.11 to appear in github actions

@benclifford benclifford changed the title Add Python 3.11 to CI, after it released 4 days ago Support python 3.11 in CI Nov 17, 2022
@benclifford benclifford closed this Mar 8, 2023
@benclifford benclifford reopened this Mar 8, 2023
This is the error that was occurring.

parsl/providers/base.py:21: error: Incompatible types in assignment (expression has type "int", base class "Enum" defined the type as "Callable[[Enum], Any]")  [assignment]

I would like to understand what changed here in python (vs 3.10)
because it's not clear from the error message and that Callable
signature confuses me.
@benclifford
Copy link
Collaborator Author

The python 3.11 build/test takes a long time at the moment because there is no wheel available for the versions of pandas required by monitoring (<1.4) which are pretty old compared to eg the latest 1.5.3.

Probably it would be good to upgrade the pandas monitoring dependency in a separate PR, and then see how this python upgrade PR works.

@benclifford
Copy link
Collaborator Author

another error that has appeared here is that the rendering of task summaries has become less helpful due to a change in enumeration stringification in python 3.11:

This assertion is failing with python 3.11:

AssertionError: assert 'Tasks in state States.exec_done: 1' in 'INFO

because the output has switched to using numeric values, like this:

Tasks in state 3: 1

This is a worse way of outputting things for users to see, so it would be good to fix.

Python 3.11 changes how IntEnum, the parent class of States, shows states
using __str__, so that only the integer value is returned. This change was
made to support a usecase that is not the parsl usecase.

This new __str__ rendering is less user friendly, as users usually
probably prefer to see textual state names.

This change makes the pre-python 3.11 behaviour happen on all
Python versions, so that states continue to appear as

States.exec_done

rather than as an integer.
benclifford added a commit that referenced this pull request Mar 21, 2023
There is no pandas wheel available <1.4 for Python 3.11 so installing on Python 3.11 results in a long (eg 15 minute) addition to the build process as pandas is built locally.

This PR will attempt to make parsl able to use both pandas <1.4 (for continued Python 3.7) support and a later version (for which a Python 3.11 wheel is available).

See PR #2461 for Python 3.11 upgrade information
@benclifford benclifford marked this pull request as ready for review March 27, 2023 09:07
@benclifford benclifford merged commit 345efbf into master Mar 27, 2023
5 checks passed
@benclifford benclifford deleted the benc-python-311 branch March 27, 2023 11:47
Sign up for free to 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.

None yet

1 participant