Created
November 23, 2010 05:26
-
-
Save srid/711310 to your computer and use it in GitHub Desktop.
six 1.0 changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/pypm/builder/mason.py | |
=================================================================== | |
--- src/pypm/builder/mason.py (revision 59138) | |
+++ src/pypm/builder/mason.py (working copy) | |
@@ -18,7 +18,7 @@ | |
from contextlib import contextmanager | |
from datetime import datetime | |
-import six.strdata | |
+import six | |
from six.objects import callable | |
from applib import sh, log | |
from applib.misc import xjoin | |
@@ -192,12 +192,12 @@ | |
'builder', | |
'{0.full_name} build FAILed on {1}/{2}'.format( | |
bpkg, pyenv.pyver, PLATNAME), | |
- six.strdata.u(e)) | |
+ six.u(e)) | |
elif isinstance(e, sh.RunTimedout): | |
send_notification( | |
'pypm-builder', | |
'{0.full_name} build timed out on {1}'.format(bpkg, PLATNAME), | |
- six.strdata.u(e)) | |
+ six.u(e)) | |
raise SetupPyBuildFailed(e) | |
log.info(stdout) | |
Index: src/pypm/common/util.py | |
=================================================================== | |
--- src/pypm/common/util.py (revision 59138) | |
+++ src/pypm/common/util.py (working copy) | |
@@ -21,7 +21,7 @@ | |
from datetime import datetime | |
from pkg_resources import Requirement, resource_filename | |
-import six.const | |
+import six | |
from applib import sh, _cmdln as cmdln | |
import pypm | |
@@ -187,7 +187,7 @@ | |
def existing(path): | |
"""Return path, but assert its presence first""" | |
- assert isinstance(path, (six.const.string_types, six.const.text_type)), \ | |
+ assert isinstance(path, (six.string_types, six.text_type)), \ | |
'not of string type: %s <%s>' % (path, type(path)) | |
assert exists(path), 'file/directory not found: %s' % path | |
return path | |
@@ -255,7 +255,7 @@ | |
-class BareDateTime(six.const.text_type): | |
+class BareDateTime(six.text_type): | |
"""Wrapper around the DateTime object with our own standard string | |
representation | |
""" | |
Index: src/pypm/common/backport.py | |
=================================================================== | |
--- src/pypm/common/backport.py (revision 59138) | |
+++ src/pypm/common/backport.py (working copy) | |
@@ -12,8 +12,8 @@ | |
__all__ = ['utf8_cat'] | |
-from six.const import PY3 | |
-from six._moves import _Module, _Attribute, MovedItems | |
+from six import PY3 | |
+from six import _Module, _Attribute, _MovedItems | |
attributes = [ | |
@@ -26,7 +26,7 @@ | |
_Attribute('urlparse', 'urlparse', 'urllib.parse'), | |
] | |
for attr in attributes: | |
- setattr(MovedItems, attr.name, attr) | |
+ setattr(_MovedItems, attr.name, attr) | |
del attr | |
del attributes | |
Index: src/pypm/common/net.py | |
=================================================================== | |
--- src/pypm/common/net.py (revision 59138) | |
+++ src/pypm/common/net.py (working copy) | |
@@ -19,7 +19,6 @@ | |
from hashlib import md5 | |
import six | |
-import six.strdata | |
import six.moves | |
if six.PY3: | |
from base64 import encodebytes | |
@@ -284,7 +283,7 @@ | |
def _create_http_basicauth_header(username, password): | |
s = '{0}:{1}'.format(username, password) | |
base64string = encodebytes(s.encode('utf8'))[:-1] | |
- authheader = six.strdata.b('Basic ') + base64string | |
+ authheader = six.b('Basic ') + base64string | |
return authheader | |
Index: src/pypm/client/fixer.py | |
=================================================================== | |
--- src/pypm/client/fixer.py (revision 59138) | |
+++ src/pypm/client/fixer.py (working copy) | |
@@ -9,7 +9,6 @@ | |
import logging | |
import six | |
-import six.strdata | |
from pypm.common.util import concise_path | |
from pypm.client.base import ImagePythonEnvironment | |
Index: src/pypm/client/command.py | |
=================================================================== | |
--- src/pypm/client/command.py (revision 59138) | |
+++ src/pypm/client/command.py (working copy) | |
@@ -11,8 +11,7 @@ | |
import collections | |
import activestate | |
-import six.const | |
-import six.strdata | |
+import six | |
from pkg_resources import Requirement | |
from applib import sh, log, textui, _cmdln as cmdln | |
from applib.misc import require_option | |
@@ -59,7 +58,7 @@ | |
depgraph = installer.PyPMDepGraph(pypmenv) | |
for rs in requirements: | |
rs = pje_let_go(rs) | |
- r = Requirement.parse(six.strdata.u(rs)) | |
+ r = Requirement.parse(six.u(rs)) | |
try: | |
added = depgraph.add_requirement(r, nodeps=nodeps) | |
if not added and not hint_upgrade: | |
@@ -430,7 +429,7 @@ | |
with self.bootstrapped(): | |
depgraph = installer.PyPMDepGraph(self.pypmenv) | |
for name in names: | |
- name = six.strdata.u(name) | |
+ name = six.u(name) | |
if opts.remove: | |
depgraph.remove_package(name) | |
else: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment