From a278b1465661a5dcedbd0ea5e1fbd1b9ee6d00e5 Mon Sep 17 00:00:00 2001 From: y-p Date: Tue, 4 Feb 2014 13:06:31 +0200 Subject: [PATCH 1/2] BLD/DOC: fix conf.py on PY3 --- doc/source/conf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 642a4438f4a3b..ee007e3489e3a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -13,7 +13,7 @@ import sys import os import re -from pandas.compat import u +from pandas.compat import u, PY3 # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -78,7 +78,10 @@ if ds: print("I'm about to DELETE the following:\n%s\n" % list(sorted(ds))) sys.stdout.write("WARNING: I'd like to delete those to speed up processing (yes/no)? ") - answer = raw_input() + if PY3: + answer = input() + else: + answer = raw_input() if answer.lower().strip() in ('y','yes'): for f in ds: From 07731611462a845516186452b202597f9f0b54c8 Mon Sep 17 00:00:00 2001 From: y-p Date: Tue, 4 Feb 2014 13:22:39 +0200 Subject: [PATCH 2/2] BLD/DOC: fix ipython_directive to workaround ipython/4504 --- doc/sphinxext/ipython_directive.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/sphinxext/ipython_directive.py b/doc/sphinxext/ipython_directive.py index ff2379eb7b9eb..3f9be95609874 100644 --- a/doc/sphinxext/ipython_directive.py +++ b/doc/sphinxext/ipython_directive.py @@ -344,7 +344,11 @@ def process_input_line(self, line, store_history=True): splitter.push(line) more = splitter.push_accepts_more() if not more: - source_raw = splitter.source_raw_reset()[1] + try: + source_raw = splitter.source_raw_reset()[1] + except: + # recent ipython #4504 + source_raw = splitter.raw_reset() self.IP.run_cell(source_raw, store_history=store_history) finally: sys.stdout = stdout