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.12 #1233

Open
douglas-raillard-arm opened this issue Aug 23, 2023 · 4 comments
Open

Support Python 3.12 #1233

douglas-raillard-arm opened this issue Aug 23, 2023 · 4 comments
Labels

Comments

@douglas-raillard-arm
Copy link
Contributor

douglas-raillard-arm commented Aug 23, 2023

Distutils module has now been removed from Python 3.12 (to be released in 2023), so wa needs to stop using it.

We also need to remove uses of "imp" module that has also been removed.

https://peps.python.org/pep-0632/#migration-advice

@douglas-raillard-arm douglas-raillard-arm changed the title Remove use of distutils Support Python 3.12 Oct 4, 2023
@Ablu
Copy link

Ablu commented Feb 15, 2024

While direct dependencies to imp seem to be gone since 77ebefb, there still seem to be indirect dependencies through future:

  File "/home/ablu/projects/lisa/lisa/wa/__init__.py", line 30, in <module>
    from wa import discover_wa_outputs, Status
  File "/home/ablu/projects/lisa/external/workload-automation/wa/__init__.py", line 27, in <module>
    from wa.framework.output import RunOutput, discover_wa_outputs
  File "/home/ablu/projects/lisa/external/workload-automation/wa/framework/output.py", line 36, in <module>
    from wa.framework.configuration.execution import CombinedConfig
  File "/home/ablu/projects/lisa/external/workload-automation/wa/framework/configuration/execution.py", line 19, in <module>
    from future.moves.itertools import zip_longest
  File "/home/ablu/projects/lisa/.lisa-venv-3.12/lib64/python3.12/site-packages/future/moves/__init__.py", line 5, in <module>
    from future.standard_library import import_top_level_modules
  File "/home/ablu/projects/lisa/.lisa-venv-3.12/lib64/python3.12/site-packages/future/standard_library/__init__.py", line 65, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'

Patches are posted in various PRs: https://github.com/PythonCharmers/python-future/pulls. However it looks like future is unmaintained.

@douglas-raillard-arm
Copy link
Contributor Author

@marcbonnici Looks like we will need to remove dependency on "future" as well then (I think it provides the "past" module we use)

@douglas-raillard-arm
Copy link
Contributor Author

Ubuntu 24.04 LTS will have Python 3.12 shipped by default: https://packages.ubuntu.com/noble/python3

@douglas-raillard-arm
Copy link
Contributor Author

"future" seems to now support Python 3.12, and wa --help runs fine on Python 3.12. Once users confirmed that 3.12 is properly supported, we can close that ticket. It would still be a good idea to stop depending on "future" though, as we can surely do without and so it does not hold us back at each Python release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants