Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Take out configure_payments hack #2232

Merged
merged 7 commits into from
Apr 2, 2014
Merged

Take out configure_payments hack #2232

merged 7 commits into from
Apr 2, 2014

Conversation

chadwhitacre
Copy link
Contributor

With the upgrade to the balanced library in #2036 we no longer need this workaround for balanced/balanced-python#5. Removing at this point because I'm ripping out all of our direct os.environ usage and this applies.

Chain: #2226 #2227 #2228 #2229 #2230 #2231

I factored out a new library called environment.py to manage
configuration from environment variables. This commit replaces our
former usage of the envvar function with environment. The next step is
ot replace all of our direct os.environ access.
On #2226 I added a wireup._env function and used it under the hood in
wireup to replace some older code. This commit brings configure-aspen
into the mix. By introducing the env object into configure-aspen I'm
setting us up to replace os.environ calls in other wireup functions with
the env object.
This was a little complicated because in test_hooks we do a dance with
canonical, and I had to update that to work with env instead of
os.environ directly.
This removes the instances of os.environ that are actually in
configure-aspen.py. There are still instances in wireup that are called
from configure-aspen.
With the upgrade to the balanced library in #2036 we no longer need this
workaround for balanced/balanced-python#5.
Removing at this point because I'm ripping out all of our direct
os.environ usage and this applies.
@rummik
Copy link
Contributor

rummik commented Apr 2, 2014

Am I correct in assuming all that's necessary to test is linking a card? :)

@chadwhitacre
Copy link
Contributor Author

@rummik Linking a credit card would be a worthwhile test, yes, but the original bug we were working around is a little more subtle: balanced wasn't configured on all threads, so if your request was served from the main thread then you were fine but if from another thread that hadn't been configured then you weren't.

I did double check that thread.locals is no longer in use in the version of the Balanced library we're now using.

rummik added a commit that referenced this pull request Apr 2, 2014
@rummik rummik merged commit 9a5f931 into master Apr 2, 2014
@rummik rummik deleted the un-configure_payments branch April 2, 2014 21:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants