<p dir="auto">I'm using <code class="notranslate">unittest</code> to create tests for my spiders. Internally, I use <code class="notranslate">CrawlerRunner</code> to invoke callbacks.</p>
<p dir="auto">But every time I launch tests, I get several deprecation warnings.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/lib/python3.6/site-packages/scrapy/utils/conf.py:97: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
  cfg = SafeConfigParser()"><pre class="notranslate"><code class="notranslate">/usr/local/lib/python3.6/site-packages/scrapy/utils/conf.py:97: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead.
  cfg = SafeConfigParser()
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/lib/python3.6/site-packages/scrapy/core/downloader/webclient.py:4: DeprecationWarning: twisted.web.client.HTTPClientFactory was deprecated in Twisted 16.7.0: please use https://pypi.org/project/treq/ or twisted.web.client.Agent instead
  from twisted.web.client import HTTPClientFactory"><pre class="notranslate"><code class="notranslate">/usr/local/lib/python3.6/site-packages/scrapy/core/downloader/webclient.py:4: DeprecationWarning: twisted.web.client.HTTPClientFactory was deprecated in Twisted 16.7.0: please use https://pypi.org/project/treq/ or twisted.web.client.Agent instead
  from twisted.web.client import HTTPClientFactory
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/usr/local/lib/python3.6/site-packages/scrapy/core/downloader/contextfactory.py:51: DeprecationWarning: Passing method to twisted.internet.ssl.CertificateOptions was deprecated in Twisted 17.1.0. Please use a combination of insecurelyLowerMinimumTo, raiseMinimumTo, and lowerMaximumSecurityTo instead, as Twisted will correctly configure the method.
  acceptableCiphers=DEFAULT_CIPHERS)"><pre class="notranslate"><code class="notranslate">/usr/local/lib/python3.6/site-packages/scrapy/core/downloader/contextfactory.py:51: DeprecationWarning: Passing method to twisted.internet.ssl.CertificateOptions was deprecated in Twisted 17.1.0. Please use a combination of insecurelyLowerMinimumTo, raiseMinimumTo, and lowerMaximumSecurityTo instead, as Twisted will correctly configure the method.
  acceptableCiphers=DEFAULT_CIPHERS)
</code></pre></div>
<p dir="auto">However, I don't see any of these warning when using any of the <code class="notranslate">scrapy</code> commands.</p>
<p dir="auto">May you do a little modification to avoid these two warnings?</p>
<blockquote>
<p dir="auto">[py.warnings] WARNING: /.../scrapy/core/downloader/webclient.py:4: DeprecationWarning: twisted.web.client.HTTPClientFactory was deprecated in Twisted 16.7.0: please use <a href="https://pypi.org/project/treq/" rel="nofollow">https://pypi.org/project/treq/</a> or twisted.web.client.Agent instead<br>
from twisted.web.client import HTTPClientFactory</p>
</blockquote>
<blockquote>
<p dir="auto">[py.warnings] WARNING: /.../scrapy/core/downloader/contextfactory.py:51: DeprecationWarning: Passing method to twisted.internet.ssl.CertificateOptions was deprecated in Twisted 17.1.0. Please use a combination of insecurelyLowerMinimumTo, raiseMinimumTo, and lowerMaximumSecurityTo instead, as Twisted will correctly configure the method.<br>
acceptableCiphers=DEFAULT_CIPHERS)</p>
</blockquote>