From e458e8c3c5313c10b18bf8dcb2d68571bdce331f Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Sun, 5 Jan 2014 08:12:00 -0500 Subject: [PATCH] MAINT: Use explicit relative pathing for Python 3 compatibility. Python 3 requires submodules to have more explicit pathing, so use the dot syntax to declare submodules which are in the same directory as another module. --- tests/risk/test_risk_cumulative.py | 2 +- zipline/finance/risk/period.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/risk/test_risk_cumulative.py b/tests/risk/test_risk_cumulative.py index 97be2f7b..16fb3a9a 100644 --- a/tests/risk/test_risk_cumulative.py +++ b/tests/risk/test_risk_cumulative.py @@ -23,7 +23,7 @@ from zipline.utils import factory from zipline.finance.trading import SimulationParameters -import answer_key +from . import answer_key ANSWER_KEY = answer_key.ANSWER_KEY diff --git a/zipline/finance/risk/period.py b/zipline/finance/risk/period.py index e002165d..08882672 100644 --- a/zipline/finance/risk/period.py +++ b/zipline/finance/risk/period.py @@ -26,7 +26,7 @@ from zipline.finance import trading import pandas as pd -import risk +from . import risk from . risk import ( alpha, check_entry,