Closed ghost closed 7 years ago
type(x)
and x.__class__
behave same for new style classes.
I like API endpoint names to start with /
. And the behavior is documented in https://github.com/nuclear-foss/bitport.py/blob/995fb9514166905aa2b4d84c211ab072464936e1/putiopy.py#L180
@nuclear-foss thank you for the contribution but I don't want to merge this PR.
Your preference is non-intuitive. If you can't follow standards then you won't be receiving anymore PRs from me.
Good luck with that. :+1:
Requests, by Kenneth Reitz, doesn't officially support python < 2.6 and, judging by the package classifiers, putio.py doesn't claim to support python < 2.7. As such, I think using the builtin
type
instead of__class__
is better than chaining underscored attributes.urljoin
provides a standard to way to handle thepath
argument ofClient.request
: https://url.spec.whatwg.org/#syntax-url-path-relativeAs of right now the
Client.request
method expects a path-absolute-URL string that is handled in a non-standard way.I would expect /files to resolve to https://api.put.io/files and not https://api.putio/v2/files because /files is a path-absolute-URL.
This PR addresses the aforementioned.