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

The imp module was removed from python 3.12 #1457

Closed
mohsen0 opened this issue Oct 27, 2023 · 5 comments
Closed

The imp module was removed from python 3.12 #1457

mohsen0 opened this issue Oct 27, 2023 · 5 comments

Comments

@mohsen0
Copy link

mohsen0 commented Oct 27, 2023

Play Version : 1.7.1

Operating System: Ubuntu 22.04

JDK: not related

Expected Behavior

To be able to run the play cli using python 3.12

Actual Behavior

/opt/hostedtoolcache/play-1.7.1/play deps --verbose --sync --forProd 
Traceback (most recent call last):
  File "/opt/hostedtoolcache/play-1.7.1/play", line 13, in <module>
    from play.cmdloader import CommandLoader
  File "/opt/hostedtoolcache/play-1.7.1/framework/pym/play/cmdloader.py", line 2, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
make: *** [Makefile:68: deps] Error 1
Deprecated since version 3.4, will be removed in version 3.12: The imp module is deprecated in favor of importlib.

https://docs.python.org/3.11/library/imp.html

Reproducible Test Case

Try running play using python 3.12

@tazmaniax
Copy link
Collaborator

tazmaniax commented Nov 21, 2023

Is the simple solution to fix the Python version in the GitHub Actions to 3.11.x before the removal in 3.12?

@ath0mas
Copy link

ath0mas commented Nov 21, 2023

Possibly yes to bypass the issue for the actions, but here the problem is more general and like running play on a dev computer.

@tazmaniax
Copy link
Collaborator

Agreed, the removal of the dependency on imp, if that is possible, is the more strategic fix that will benefit everyone.

@tazmaniax
Copy link
Collaborator

@ath0mas @mohsen0 possible longer-term solution here #1460

xael-fry added a commit to xael-fry/play that referenced this issue Feb 11, 2024
- checkout from v2 to v4
- setup-python from v3 to v4
- setup-java from v2 to v3
xael-fry added a commit to xael-fry/play that referenced this issue Feb 11, 2024
xael-fry added a commit to xael-fry/play that referenced this issue Feb 26, 2024
xael-fry added a commit to xael-fry/play that referenced this issue Feb 26, 2024
xael-fry added a commit to xael-fry/play that referenced this issue Feb 26, 2024
@xael-fry
Copy link
Member

xael-fry commented Mar 1, 2024

merge ad fix in #1465

@xael-fry xael-fry closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants