tumblr / collins

groovy kind of love
tumblr.github.com/collins
Apache License 2.0
570 stars 99 forks source link

python collins_clients -> python3; v1.0.0 #599

Closed dkarivalis closed 5 years ago

dkarivalis commented 5 years ago

what

updates collinsclient to python 3 ^^ tested with python 3.6 and 3.7

test results

confirmed our readme example still produces valid requests:

python 2.7 with collins_client=0.1.1:

➜  ~ nc -l 8080
GET /api/assets?attribute=HOSTNAME%3Bexample.tumblr.net&attribute=PRIMARY_ROLE%3BTUMBLR_APP HTTP/1.1
Accept-Encoding: identity
Host: 127.0.0.1:8080
Connection: close
Authorization: Basic ZGF2ZTp0ZXN0
User-Agent: Python-urllib/2.7

python 3.6 with collins_client=1.0.0:

➜  ~ nc -l 8080
GET /api/assets?attribute=HOSTNAME%3Bexample.tumblr.net&attribute=PRIMARY_ROLE%3BTUMBLR_APP HTTP/1.1
Accept-Encoding: identity
Host: 127.0.0.1:8080
User-Agent: Python-urllib/3.6
Authorization: Basic ZGF2ZTp0ZXN0
Connection: close

python 3.7 with collins_client=1.0.0:

➜  ~ nc -l 8080
GET /api/assets?attribute=HOSTNAME%3Bexample.tumblr.net&attribute=PRIMARY_ROLE%3BTUMBLR_APP HTTP/1.1
Accept-Encoding: identity
Host: 127.0.0.1:8080
User-Agent: Python-urllib/3.7
Authorization: Basic ZGF2ZTp0ZXN0
Connection: close

@tumblr/collins @defect @komapa