We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8224381 commit 56d72afCopy full SHA for 56d72af
sphinx_json_schema_spec/__init__.py
@@ -2,6 +2,7 @@
2
from datetime import datetime
3
from pathlib import Path
4
from urllib.parse import urljoin
5
+import ssl
6
import urllib.request
7
8
try:
@@ -11,7 +12,6 @@
11
12
13
from docutils import nodes
14
from lxml import html
-import certifi
15
16
BASE_URL = "https://json-schema.org/draft/2020-12/"
17
VOCABULARIES = {
@@ -80,7 +80,8 @@ def fetch_or_load(cache_path, url):
80
headers["If-Modified-Since"] = date
81
82
request = urllib.request.Request(url, headers=headers)
83
- response = urllib.request.urlopen(request, cafile=certifi.where())
+ context = ssl.create_default_context()
84
+ response = urllib.request.urlopen(request, context=context)
85
86
if response.code == 200:
87
with cache_path.open("w+b") as out:
0 commit comments