Deprecate environment variables being loaded as settings
See original GitHub issueScrapy reads the following environment variables into settings named after them without the SCRAPY_
prefix:
SCRAPY_CHECK
SCRAPY_PICKLED_SETTINGS_TO_OVERRIDE
SCRAPY_PROJECT
SCRAPY_PYTHON_SHELL
SCRAPY_SETTINGS_MODULE
This is an unintended behavior, due to the (deprecated) feature that allows defining settings through environment variables not filtering out these environment variables that are not meant to generate settings.
I’ve seen cases where some of the resulting settings are used (settings.get('SETTINGS_MODULE')
), so we need to deprecate this usage first, before we can eventually stop loading these environment variables into settings.
It may be tricky to do properly, because we need to avoid issuing a deprecation warning if same-name settings are defined without an environment variable. So, for example, if a project is using settings.get('SETTINGS_MODULE')
but that project defines such a setting, we should not warn about it.
See #4375 for more context.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top GitHub Comments
Sorry, @joybhallaa, but let’s wait for someone from the maintainers team to clarify this - I could be wrong about it.
I’m taking this issue.