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

PY3: fix xmlrpclib and email imports #801

Merged
merged 2 commits into from
Jul 14, 2014
Merged

Conversation

felixonmars
Copy link
Contributor

Two minor fixes, should work out of box.

In the next PR I'll deal with StringIO, maybe add some encoding too (if needed).


from email.utils import COMMASPACE, formatdate
if six.PY2:
from email.MIMEMultipart import MIMEMultipart
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay :)

Just added a commit to use six as much as possible. Will go open a PR for six soon too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to the PR for six, for reference: https://bitbucket.org/gutworth/six/pull-request/44

@kmike
Copy link
Member

kmike commented Jul 14, 2014

Great, thanks!

kmike added a commit that referenced this pull request Jul 14, 2014
PY3: fix xmlrpclib and email imports
@kmike kmike merged commit 91387b6 into scrapy:master Jul 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants