Python 3 urllib with self-signed certificates
<p>I'm attempting to download some data from an internal server using Python. Since it's internal, it uses a self-signed certificate. (We don't want to pay Verisign for servers that will never appear "in the wild.") The Python 2.6 version of the code worked fine.</p>

<pre><code>response = urllib2.urlopen(URL)
data = csv.reader(response)
</code></pre>

<p>I'm now trying to update to Python 3.4 (long story, don't ask.) However, using Python 3's urllib fails:</p>

<pre><code>response = urllib.request.urlopen(URL)
</code></pre>

<p>It throws a CERTIFICATE_VERIFY_FAILED error.</p>

<pre><code>urllib.error.URLError: &lt;urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)&gt;
</code></pre>

<p>In reading around the web, apparently Python 2.6 urllib2 doesn't bother to verify certificates. Some versions of urllib allow "verify=False" to be passed to the method signature, but that doesn't appear to work in Python 3.4.</p>

<p>Does anyone know how I can get around this? I'd like to avoid using the Requests package because of corporate security guidelines.</p>