From c51cbcfe813a655f47da30af2c760a32991e02d3 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Mon, 22 Jul 2019 14:53:17 -0300 Subject: [PATCH 1/2] Fix ConfigParser import in py2 --- scrapy/utils/conf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scrapy/utils/conf.py b/scrapy/utils/conf.py index 26d66eaf8..fb7ca3310 100644 --- a/scrapy/utils/conf.py +++ b/scrapy/utils/conf.py @@ -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 From 77beab37968b2347f1e06fa63ed8881681330b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Chaves?= Date: Tue, 23 Jul 2019 12:04:26 +0200 Subject: [PATCH 2/2] Cover Scrapy 1.7.2 in the release notes --- docs/news.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/news.rst b/docs/news.rst index a0f0c5697..d79844ed2 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -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) -------------------------