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 isrcsubmit at least partially python3-compliant before the 2.0 fork #45

Closed
3 tasks done
JonnyJD opened this issue Jan 26, 2013 · 0 comments
Closed
3 tasks done
Assignees
Milestone

Comments

@JonnyJD
Copy link
Owner

JonnyJD commented Jan 26, 2013

To keep backporting easy, we should try to make obvious fixes to the 1.0 branch to work mostly in python3 before we fork 1.0 to work on 2.0.

That includes:

  • print "as a function" (in python2 with only 1 argument = no actual tuple/arglist, be aware of newlines!)
  • except Error AS err
  • raw_input -> input (try input = raw_input except: pass)

note: python-musicbrainz2 only works with Python 2 (though it imports fine), so this won't help isrcsubmit 1.0 to work with Python 2. We should test that anyways.

JonnyJD added a commit that referenced this issue Jan 26, 2013
This makes it easier to backport things when we fork 1.0 to work on 2.0
print x can be written as print(x) even in Python 2,
because this is just taken as additional parentheses around x.

print x, y can be written with print("%s %s" % (x, y)).

print can be written as print(""). print() would print "()" on python 2.

This doesn't work easily when we don't want a newline after the ouput.
So no change is made for these cases.
JonnyJD added a commit that referenced this issue Jan 26, 2013
Python 3 has input = raw_input and no raw_input anymore.
On Python 2 we will have problems with empty input on "input",
so we have user_input which chooses the method accordingly.
@ghost ghost assigned JonnyJD Jan 26, 2013
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

1 participant