-
Notifications
You must be signed in to change notification settings - Fork 52
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
Moving to Python3 #547
Moving to Python3 #547
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small issues. Okay otherwise.
@@ -324,7 +324,7 @@ def datelocation(self): | |||
end_date=schedule_end_at_date.strftime("%d %b"), | |||
year=schedule_end_at_date.year, | |||
) | |||
return u', '.join(filter(None, [daterange, self.location])) | |||
return ', '.join([_f for _f in [daterange, self.location] if _f]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an accurate replacement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems so.
funnel/models/proposal.py
Outdated
@@ -532,7 +532,7 @@ def url_id_name(self): | |||
likely never be called directly on an instance. It exists for the SQL | |||
comparator that will be called to load the instance. | |||
""" | |||
return unicode(self.url_id) | |||
return self.url_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return str(self.url_id)
as it's an integer.
funnel/views/proposal.py
Outdated
@@ -188,7 +188,7 @@ def view(self): | |||
delcommentform = DeleteCommentForm() | |||
|
|||
links = [ | |||
Markup(linkify(unicode(escape(l)))) | |||
Markup(linkify(escape(l))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be str()
as escape
returns a HTML string.
funnel/views/schedule.py
Outdated
dict( | ||
{'delete_url': session.url_for('delete')} if with_delete_url else {} | ||
).items() | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ugly block should be replaced with a single dict and two update operations.
* 2to3 changes * bumped python version on travis * added flask-babel2 to requirements * str and dict fix * requests response need to be decoded * Add record key to cypress * remove unicodecsv * qrcode svg needs to be string and not bytes * removed babel2 from requirements Co-authored-by: Vidya Ramakrishnan <vidya@hasgeek.in>
Related to hasgeek/hgapp#39