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

Python3 incompatibilities in module manipulations #1401

Closed
holajsh opened this issue Apr 12, 2022 · 0 comments · Fixed by #1402
Closed

Python3 incompatibilities in module manipulations #1401

holajsh opened this issue Apr 12, 2022 · 0 comments · Fixed by #1402
Labels
Milestone

Comments

@holajsh
Copy link
Contributor

holajsh commented Apr 12, 2022

Play Version (1.5.x / etc)

1.7.0

Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10)

Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)

openjdk version "11.0.14.1" 2022-02-08
OpenJDK Runtime Environment (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14.1+1-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

Expected Behavior

Running play new-module test should create the new module

Actual Behavior

Running play new-module test is failing:

$ play new-module test
~        _            _
~  _ __ | | __ _ _  _| |
~ | '_ \| |/ _' | || |_|
~ |  __/|_|\____|\__ (_)
~ |_|            |__/
~
~ play! 1.6.1, https://www.playframework.com
~
~ The new module will be created in /home/jsh/devel/play-modules/test
~
Traceback (most recent call last):
  File "/home/jsh/devel/play1/play", line 168, in <module>
    status = cmdloader.commands[play_command].execute(command=play_command, app=play_app, args=remaining_args, env=play_env, cmdloader=cmdloader)
  File "/home/jsh/devel/play1/framework/pym/play/commands/modulesrepo.py", line 61, in execute
    new(app, args, env)
  File "/home/jsh/devel/play1/framework/pym/play/commands/modulesrepo.py", line 242, in new
    replaceAll(os.path.join(app.path, 'conf/routes'), r'%MODULE_LOWERCASE%', string.lower(application_name))
AttributeError: module 'string' has no attribute 'lower'

Moreover the resources/module-skel/commands.py file should be updated to be compatible with python3.

holajsh added a commit to holajsh/play1 that referenced this issue Apr 12, 2022
xael-fry added a commit that referenced this issue Apr 12, 2022
[#1401] 🐛 Fix python3 incompatibilities in module manipulation code
@xael-fry xael-fry added this to the 1.7.1 milestone Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants