From 852ccbe273bc4ee86285f325069e36c08128e52b Mon Sep 17 00:00:00 2001 From: Lukas Vik <2767848-LukasVik@users.noreply.gitlab.com> Date: Thu, 13 Jan 2022 12:12:31 +0100 Subject: [PATCH] Make symbolator_sphinx work with newer sphinx verions ENOENT, EPIPE, EINVAL no longer exist in sphinx.util.osutil (since 4.0.0). However taking them from the official source in errno seems more correct anyway. --- symbolator_sphinx/symbolator_sphinx.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/symbolator_sphinx/symbolator_sphinx.py b/symbolator_sphinx/symbolator_sphinx.py index 05003bd..4e50c50 100644 --- a/symbolator_sphinx/symbolator_sphinx.py +++ b/symbolator_sphinx/symbolator_sphinx.py @@ -15,6 +15,7 @@ import re import codecs import posixpath +from errno import ENOENT, EPIPE, EINVAL from os import path from subprocess import Popen, PIPE from hashlib import sha1 @@ -30,7 +31,7 @@ from sphinx.locale import _, __ from sphinx.util import logging from sphinx.util.i18n import search_image_for_language -from sphinx.util.osutil import ensuredir, ENOENT, EPIPE, EINVAL +from sphinx.util.osutil import ensuredir if False: # For type annotation