Scrapy, a fast high-level web crawling & scraping framework for Python.
Merge remote-tracking branch 'origin/master' into crawler-process-reactor-later
Andrey Rakhmatullin3577c005694b
diff --cc tests/test_crawler.pyindex e7d5c8132,7bc4fba40..8f6227109--- a/tests/test_crawler.py+++ b/tests/test_crawler.py@@@ -4,9 -4,9 +4,8 @@@ import platforimport subprocessimport sysimport warnings- from unittest import skipIffrom pytest import raises, mark-from testfixtures import LogCapturefrom twisted import version as twisted_versionfrom twisted.internet import deferfrom twisted.python.versions import Version@@@ -360,30 -372,6 +350,21 @@@ class CrawlerProcessSubprocess(ScriptRuself.assertIn("Spider closed (finished)", log)self.assertIn("Using reactor: twisted.internet.asyncioreactor.AsyncioSelectorReactor", log)- # https://twistedmatrix.com/trac/ticket/9766- @skipIf(platform.system() == 'Windows' and sys.version_info >= (3, 8),- "the asyncio reactor is broken on Windows when running Python ≥ 3.8")+ def test_reactor_asyncio_custom_settings(self):+ log = self.run_script("twisted_reactor_custom_settings.py")+ self.assertIn("Spider closed (finished)", log)+ self.assertIn("Using reactor: twisted.internet.asyncioreactor.AsyncioSelectorReactor", log)+- # https://twistedmatrix.com/trac/ticket/9766- @skipIf(platform.system() == 'Windows' and sys.version_info >= (3, 8),- "the asyncio reactor is broken on Windows when running Python ≥ 3.8")+ def test_reactor_asyncio_custom_settings_same(self):+ log = self.run_script("twisted_reactor_custom_settings_same.py")+ self.assertIn("Spider closed (finished)", log)+ self.assertIn("Using reactor: twisted.internet.asyncioreactor.AsyncioSelectorReactor", log)+- # https://twistedmatrix.com/trac/ticket/9766- @skipIf(platform.system() == 'Windows' and sys.version_info >= (3, 8),- "the asyncio reactor is broken on Windows when running Python ≥ 3.8")+ def test_reactor_asyncio_custom_settings_conflict(self):+ log = self.run_script("twisted_reactor_custom_settings_conflict.py")+ self.assertIn("Using reactor: twisted.internet.selectreactor.SelectReactor", log)+ self.assertIn("(twisted.internet.selectreactor.SelectReactor) does not match the requested one", log)+@mark.skipif(sys.implementation.name == 'pypy', reason='uvloop does not support pypy properly')@mark.skipif(platform.system() == 'Windows', reason='uvloop does not support Windows')@mark.skipif(twisted_version == Version('twisted', 21, 2, 0), reason='https://twistedmatrix.com/trac/ticket/10106')