Skip to content

The imp module was removed from python 3.12 #1457

@mohsen0

Description

@mohsen0

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions