Allow using a custom requests Session instance.
Support Python 3.