Merge pull request #3898 from Gallaecio/1.7

Changes and release notes for 1.7.2
This commit is contained in:
Mikhail Korobov 2019-07-23 15:54:48 +05:00 committed by GitHub
commit d0288da221
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -6,6 +6,12 @@ Release notes
.. note:: Scrapy 1.x will be the last series supporting Python 2. Scrapy 2.0,
planned for Q4 2019 or Q1 2020, will support **Python 3 only**.
Scrapy 1.7.2 (2019-07-23)
-------------------------
Fix Python 2 support (:issue:`3889`, :issue:`3893`, :issue:`3896`).
Scrapy 1.7.1 (2019-07-18)
-------------------------

View File

@ -1,10 +1,13 @@
import os
import sys
import numbers
import configparser
from operator import itemgetter
import six
if six.PY2:
from ConfigParser import SafeConfigParser as ConfigParser
else:
from configparser import ConfigParser
from scrapy.settings import BaseSettings
from scrapy.utils.deprecate import update_classpath
@ -94,7 +97,7 @@ def init_env(project='default', set_syspath=True):
def get_config(use_closest=True):
"""Get Scrapy config file as a ConfigParser"""
sources = get_sources(use_closest)
cfg = configparser.ConfigParser()
cfg = ConfigParser()
cfg.read(sources)
return cfg