From 1d3a8759bc43b692cc3c2834047f405ede8dda3b Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Thu, 2 Oct 2014 14:12:55 -0400 Subject: [PATCH] MAINT: Remove use of deprecated getchildren method on xml element Rather than calling getchildren on xml.etree.ElementTree elements, we're now supposed to just itegrate over the elements. --- zipline/data/treasuries.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zipline/data/treasuries.py b/zipline/data/treasuries.py index d0e96889..a23c34c3 100644 --- a/zipline/data/treasuries.py +++ b/zipline/data/treasuries.py @@ -119,8 +119,7 @@ http://data.treasury.gov/feed.svc/DailyTreasuryYieldCurveRateData\ if tag == "entry": properties = element.find(properties_xpath[0]) datum = {get_localname(node): node.text - for node in properties.getchildren() - if ET.iselement(node)} + for node in properties if ET.iselement(node)} # clear the element after we've dealt with it: element.clear() yield datum