braintree/braintree_python — pull request #36 by pmcnr (2014-01-22 10:23:09+00:00)
Title: Declare package version in 'setup.py' to enable installing 'requests' as a dependency

Importing the {{braintree.version}} module in {{setup.py}} will import the {{braintree}} package which in turn, by importing all its modules into its namespace will end in the chain of imports attempt to import {{requests}}. This prevents {{setup.py}} from working correctly if {{requests}} hasn't been previously installed manually.

The proposed change, by moving the package version declaration to {{setup.py}} and then reading that in {{braintree.version}} avoids this problem and enables the automatic install of {requests}} as a dependency.