This repository was archived by the owner on Jan 20, 2020. It is now read-only.
This repository was archived by the owner on Jan 20, 2020. It is now read-only.
python3 support #7
Open
Description
The library doesn't seem to work with python3. A lot of people have moved away from python2, so it'd be nice to add support for python3 to take advantage of the library.
Python 3.5.1 (default, Dec 26 2015, 18:11:22)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import dockercloud
>>>
>>> dockercloud.Action.list()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../venv3/lib/python3.5/site-packages/dockercloud/api/base.py", line 149, in list
json = send_request('GET', detail_uri, params=kwargs)
File ".../venv3/lib/python3.5/site-packages/dockercloud/api/http.py", line 37, in send_request
url = urljoin(dockercloud.rest_host.rstrip("/"), path.strip("/").encode("ascii", "ignore"))
File ".../python3.5/urllib/parse.py", line 415, in urljoin
base, url, _coerce_result = _coerce_args(base, url)
File ".../python3.5/urllib/parse.py", line 111, in _coerce_args
raise TypeError("Cannot mix str and non-str arguments")
TypeError: Cannot mix str and non-str arguments
I've tested the same code with python 2.7.10, and it works just fine.
Metadata
Metadata
Assignees
Labels
No labels