PY3: fix xmlrpclib and email imports #801
Merged
Conversation
scrapy/mail.py
Outdated
|
||
from email.utils import COMMASPACE, formatdate | ||
if six.PY2: | ||
from email.MIMEMultipart import MIMEMultipart |
kmike
Jul 14, 2014
Member
Some of these modules seems to be supported in six - check https://bitbucket.org/gutworth/six/src/ea90cb31658b09b82b4ea376467ce8593dbb9605/six.py?at=default#cl-250. Could we use six versions?
It'd be also great to submit a PR to six with missing modules (no need to wait for PR to be merged - we may keep the if six.PY2
in Scrapy source code).
Some of these modules seems to be supported in six - check https://bitbucket.org/gutworth/six/src/ea90cb31658b09b82b4ea376467ce8593dbb9605/six.py?at=default#cl-250. Could we use six versions?
It'd be also great to submit a PR to six with missing modules (no need to wait for PR to be merged - we may keep the if six.PY2
in Scrapy source code).
felixonmars
Jul 14, 2014
Author
Contributor
Okay :)
Just added a commit to use six as much as possible. Will go open a PR for six soon too.
Okay :)
Just added a commit to use six as much as possible. Will go open a PR for six soon too.
felixonmars
Jul 14, 2014
Author
Contributor
Link to the PR for six, for reference: https://bitbucket.org/gutworth/six/pull-request/44
Link to the PR for six, for reference: https://bitbucket.org/gutworth/six/pull-request/44
Great, thanks! |
kmike
added a commit
that referenced
this pull request
Jul 14, 2014
PY3: fix xmlrpclib and email imports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Two minor fixes, should work out of box.
In the next PR I'll deal with StringIO, maybe add some encoding too (if needed).