MAINT: Removes the ability to reference a global TradingEnvironment

This commit removes the ability to reference a shared TradingEnvironment through the zipline.finance.trading module. In place, the classes that require a TradingEnvironment, or its child AssetFinder, contain their own references to those objects.

This commit also adds serialization utilities that allow for the pickling/unpickling of objects without unintentionally their TradingEnvironments or AssetFinders.
This commit is contained in:
jfkirk
2015-09-10 11:53:28 -04:00
parent 661314ce49
commit dc964a7e7d
45 changed files with 1484 additions and 1173 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ def gather_bad_dicts(state):
class SerializationTestCase(TestCase):
@classmethod
def setUpClass(cls):
cls.env = TradingEnvironment.instance()
cls.env = TradingEnvironment()
@parameterized.expand(object_serialization_cases())
def test_object_serialization(self,