-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
feat: python2 to 3 #569
feat: python2 to 3 #569
Conversation
@@ -230,6 +235,7 @@ def handle_data(self, text): | |||
text = text.replace('<', '') | |||
_BaseHTMLProcessor.handle_data(self, text) | |||
|
|||
# TODO(py2to3): we need to replace `mx` and `tidy` here |
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.
would appreciate some insight here, im out of my zone
@@ -1726,6 +1741,7 @@ def handle_data(self, text): | |||
if not self.unacceptablestack: | |||
_BaseHTMLProcessor.handle_data(self, text) | |||
|
|||
# TODO(py2to3): replace tidy and mx |
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.
also here
"(%d) %s" % (filename, errno, errstr) | ||
except IOError as e: | ||
raise TemplateError("IO error while reading template '%s': " \ | ||
"(%d) %s" % (filename, e.errno, e.errstr)) |
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.
Automated conversion has failed ya a bit here. If you have a misconfiguration, with a missing template file, you'll hit this and get:
File "/Users/offby1/projects/planet-python/code/planet/htmltmpl.py", line 981, in compile
tokens = self.parse(self.read(file))
File "/Users/offby1/projects/planet-python/code/planet/htmltmpl.py", line 1032, in read
"(%d) %s" % (filename, e.errno, e.errstr))
AttributeError: 'FileNotFoundError' object has no attribute 'errstr'
Closing in favor of #577 |
What
Probably the best changeset is at bc58d1c and before.
How
Ran
2to3
->[email protected]
->removed 2to3.bak
files-> manually went through (large amount of) remaining issuesIssues
planet
to Ubuntu 24.04 - Requires updating toPython3
#568Todo
(These have high usages of sgbmlib and other HTML stuff, pretty lost.)
sanitize.py
feedparser.py
File "/planet/code/planet/feedparser.py", line 2947:
_LOCALTZONES` no longer exists (?)