From 5bded894666d0c57ab7445c7439ce97caf752d2b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 6 Jul 2017 16:25:29 -0500 Subject: [PATCH] Replace occurrences of `execfile()` --- docs/conf.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index a6e5dbad..c998d5fc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,7 +3,7 @@ # Tailbone documentation build configuration file, created by # sphinx-quickstart on Sat Feb 15 23:15:27 2014. # -# This file is execfile()d with the current directory set to its +# This file is exec()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this @@ -15,7 +15,7 @@ import sys import os -execfile(os.path.join(os.pardir, 'tailbone', '_version.py')) +exec(open(os.path.join(os.pardir, 'tailbone', '_version.py')).read()) # If extensions (or modules to document with autodoc) are in another directory, diff --git a/setup.py b/setup.py index 5a87683e..16b4dac1 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) -execfile(os.path.join(here, 'tailbone', '_version.py')) +exec(open(os.path.join(here, 'tailbone', '_version.py')).read()) README = open(os.path.join(here, 'README.rst')).read()