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

make_deb.py errors on python 2 #61

Closed
cryslith opened this issue Jul 21, 2019 · 2 comments
Closed

make_deb.py errors on python 2 #61

cryslith opened this issue Jul 21, 2019 · 2 comments
Labels

Comments

@cryslith
Copy link

cryslith commented Jul 21, 2019

It seems that the recent change to fix flag encoding on python3 breaks on python2, since os.fsencode doesn't exist.

flagvalue = os.fsencode(flagvalue).decode('utf-8')

  File "[...]/bazel-out/host/bin/external/rules_pkg/make_deb.runfiles/rules_pkg/make_deb.py", line 397, in <module>
    main(FLAGS(sys.argv))
  File "[...]/bazel-out/host/bin/external/rules_pkg/make_deb.runfiles/rules_pkg/make_deb.py", line 370, in main
    description=GetFlagValue(FLAGS.description),
  File "[...]/bazel-out/host/bin/external/rules_pkg/make_deb.runfiles/rules_pkg/make_deb.py", line 343, in GetFlagValue
    flagvalue = os.fsencode(flagvalue).decode('utf-8')
AttributeError: 'module' object has no attribute 'fsencode'
@aiuto
Copy link
Collaborator

aiuto commented Jul 26, 2019

What invocation are you doing to use Python2? Are you forcing something on the command line, or do you not have a Python 3 environment at all.

We are actively trying to move to Python 3 for all this code, so I want to understand the need for the backwards compatibility.

@aiuto aiuto added the wontfix label Sep 6, 2019
@aiuto
Copy link
Collaborator

aiuto commented May 19, 2020

We are now more actively discontinuing python2.

@aiuto aiuto closed this as completed May 19, 2020
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