Scrapy, a fast high-level web crawling & scraping framework for Python.
Removed hacky SCRAPY_SETTINGS_DISABLED environment variable
Pablo Hoffmana4639ffb06ff
diff --git a/bin/runtests.sh b/bin/runtests.shindex a714a208d..3c8079210 100755--- a/bin/runtests.sh+++ b/bin/runtests.sh@@ -12,9 +12,6 @@ elseexit 1fi-# disable custom settings for running tests in a neutral environment-export SCRAPY_SETTINGS_DISABLED=1-# use vsftpd (if available) for testing ftp feed storageif type vsftpd >/dev/null 2>&1; thenvsftpd_conf=$(mktemp /tmp/vsftpd-XXXX)diff --git a/scrapy/conf.py b/scrapy/conf.pyindex c47c38626..795c8d7c0 100644--- a/scrapy/conf.py+++ b/scrapy/conf.py@@ -34,7 +34,4 @@ def get_project_settings():return settings-if os.environ.get('SCRAPY_SETTINGS_DISABLED'):- settings = CrawlerSettings()-else:- settings = get_project_settings()+settings = get_project_settings()diff --git a/scrapy/tests/test_cmdline/__init__.py b/scrapy/tests/test_cmdline/__init__.pyindex 3588436b9..d08f266f1 100644--- a/scrapy/tests/test_cmdline/__init__.py+++ b/scrapy/tests/test_cmdline/__init__.py@@ -10,7 +10,6 @@ class CmdlineTest(unittest.TestCase):def setUp(self):self.env = os.environ.copy()self.env['PYTHONPATH'] = os.path.dirname(scrapy.__path__[0])- self.env.pop('SCRAPY_SETTINGS_DISABLED', None)self.env['SCRAPY_SETTINGS_MODULE'] = 'scrapy.tests.test_cmdline.settings'def _execute(self, *new_args, **kwargs):diff --git a/scrapy/tests/test_commands.py b/scrapy/tests/test_commands.pyindex 47f67338a..e2b671d19 100644--- a/scrapy/tests/test_commands.py+++ b/scrapy/tests/test_commands.py@@ -61,7 +61,6 @@ class CommandTest(ProjectTest):super(CommandTest, self).setUp()self.call('startproject', self.project_name)self.cwd = join(self.temp_path, self.project_name)- self.env.pop('SCRAPY_SETTINGS_DISABLED', None)self.env['SCRAPY_SETTINGS_MODULE'] = '%s.settings' % self.project_namediff --git a/scrapyd/eggutils.py b/scrapyd/eggutils.pyindex 27e661cd0..c507f0be5 100644--- a/scrapyd/eggutils.py+++ b/scrapyd/eggutils.py@@ -18,7 +18,6 @@ def get_spider_list_from_eggfile(eggfile, project):env = os.environ.copy()env['SCRAPY_PROJECT'] = projectenv['SCRAPY_EGGFILE'] = f.name- env.pop('SCRAPY_SETTINGS_DISABLED', None)proc = Popen(pargs, stdout=PIPE, cwd=tmpdir, env=env)out = proc.communicate()[0]return out.splitlines()