未验证 提交 d0288da2 编写于 作者: M Mikhail Korobov 提交者: GitHub

Merge pull request #3898 from Gallaecio/1.7

Changes and release notes for 1.7.2
...@@ -6,6 +6,12 @@ Release notes ...@@ -6,6 +6,12 @@ Release notes
.. note:: Scrapy 1.x will be the last series supporting Python 2. Scrapy 2.0, .. 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**. 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) Scrapy 1.7.1 (2019-07-18)
------------------------- -------------------------
......
import os import os
import sys import sys
import numbers import numbers
import configparser
from operator import itemgetter from operator import itemgetter
import six import six
if six.PY2:
from ConfigParser import SafeConfigParser as ConfigParser
else:
from configparser import ConfigParser
from scrapy.settings import BaseSettings from scrapy.settings import BaseSettings
from scrapy.utils.deprecate import update_classpath from scrapy.utils.deprecate import update_classpath
...@@ -94,7 +97,7 @@ def init_env(project='default', set_syspath=True): ...@@ -94,7 +97,7 @@ def init_env(project='default', set_syspath=True):
def get_config(use_closest=True): def get_config(use_closest=True):
"""Get Scrapy config file as a ConfigParser""" """Get Scrapy config file as a ConfigParser"""
sources = get_sources(use_closest) sources = get_sources(use_closest)
cfg = configparser.ConfigParser() cfg = ConfigParser()
cfg.read(sources) cfg.read(sources)
return cfg return cfg
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册