Scrapy, a fast high-level web crawling & scraping framework for Python.
Remove elluding six occurrences
Eugenio Lacuesta00b793dc59a3
diff --git a/scrapy/robotstxt.py b/scrapy/robotstxt.pyindex 397924110..0a9af3a62 100644--- a/scrapy/robotstxt.py+++ b/scrapy/robotstxt.py@@ -1,12 +1,13 @@import sysimport loggingfrom abc import ABCMeta, abstractmethod-from six import with_metaclassfrom scrapy.utils.python import to_unicode+logger = logging.getLogger(__name__)+def decode_robotstxt(robotstxt_body, spider, to_native_str_type=False):try:if to_native_str_type:@@ -23,7 +24,8 @@ def decode_robotstxt(robotstxt_body, spider, to_native_str_type=False):robotstxt_body = ''return robotstxt_body-class RobotParser(with_metaclass(ABCMeta)):++class RobotParser(metaclass=ABCMeta):@classmethod@abstractmethoddef from_crawler(cls, crawler, robotstxt_body):diff --git a/tests/test_contracts.py b/tests/test_contracts.pyindex b2e358700..582e3d052 100644--- a/tests/test_contracts.py+++ b/tests/test_contracts.py@@ -1,6 +1,5 @@from unittest import TextTestResult-from six import get_unbound_functionfrom twisted.internet import deferfrom twisted.python import failurefrom twisted.trial import unittest@@ -395,8 +394,8 @@ class ContractsManagerTest(unittest.TestCase):with MockServer() as mockserver:contract_doc = '@url {}'.format(mockserver.url('/status?n=200'))- get_unbound_function(TestSameUrlSpider.parse_first).__doc__ = contract_doc- get_unbound_function(TestSameUrlSpider.parse_second).__doc__ = contract_doc+ TestSameUrlSpider.parse_first.__doc__ = contract_doc+ TestSameUrlSpider.parse_second.__doc__ = contract_doccrawler = CrawlerRunner().create_crawler(TestSameUrlSpider)yield crawler.crawl()diff --git a/tests/test_pipeline_files.py b/tests/test_pipeline_files.pyindex dede4bf12..52f2b554e 100644--- a/tests/test_pipeline_files.py+++ b/tests/test_pipeline_files.py@@ -1,12 +1,12 @@import osimport randomimport time+from io import BytesIOfrom tempfile import mkdtempfrom shutil import rmtreefrom unittest import mockfrom urllib.parse import urlparse-from six import BytesIOfrom twisted.trial import unittestfrom twisted.internet import deferdiff --git a/tests/test_utils_curl.py b/tests/test_utils_curl.pyindex c5655df7e..50e1bfd5f 100644--- a/tests/test_utils_curl.py+++ b/tests/test_utils_curl.py@@ -1,7 +1,6 @@import unittestimport warnings-from six import assertRaisesRegexfrom w3lib.http import basic_auth_headerfrom scrapy import Request@@ -177,8 +176,7 @@ class CurlToRequestKwargsTest(unittest.TestCase):self.assertEqual(curl_to_request_kwargs(curl_command), expected_result)def test_too_few_arguments_error(self):- assertRaisesRegex(- self,+ self.assertRaisesRegex(ValueError,r"too few arguments|the following arguments are required:\s*url",lambda: curl_to_request_kwargs("curl"),@@ -194,8 +192,7 @@ class CurlToRequestKwargsTest(unittest.TestCase):self.assertEqual(curl_to_request_kwargs(curl_command), expected_result)# case 2: ignore_unknown_options=False (raise exception):- assertRaisesRegex(- self,+ self.assertRaisesRegex(ValueError,"Unrecognized options:.*--bar.*--baz",lambda: curl_to_request_kwargs(