Skip to content

Conversation

@scottkmaxwell
Copy link

Change all has_key() to "key in container" form
Catch exception from gettype() in HTTPMessage and try get_content_type since this object completely changed in Py3K
Change print to a function
Fix pickle import so it works on Py2 and Py3
Import httplib or http.client for required exception classes
Change pickle files to binary
Use temp file.TemporaryFile instead of os.tmpfile on Py3K

cakebread and others added 16 commits February 5, 2012 22:04
Merge patch from https://bitbucket.org/dbinit/yolk/
that modifies urllib2.addinfourl to add getheader() method
needed to avoid AttributeError in xmlrpclib
Classes should inherit from object
Change all has_key() to "key in container" form
Catch exception from gettype() in HTTPMessage and try get_content_type since this object completely changed in Py3K
Change print to a function
Fix pickle import so it works on Py2 and Py3
Import httplib or http.client for required exception classes
Change pickle files to binary
Use temp file.TemporaryFile instead of os.tmpfile on Py3K
@airstrike
Copy link

As per the changes listed in the 3.1+ docs under Library Changes[0], I believe the code should be:

    import pickle

rather than

    import cPickle as pickle

[0] http://docs.python.org/3.3/whatsnew/3.0.html#library-changes

@scottkmaxwell
Copy link
Author

Updated to support Python 3.4

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.

4 participants