You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/09/09 19:01:04 UTC
[airflow] 02/06: Fix building documentation broken by upgrade of
dnspython (#18046)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit ecae2ae9b21ea890b2d6e4044fb4ad759d4cef22
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon Sep 6 20:44:11 2021 +0200
Fix building documentation broken by upgrade of dnspython (#18046)
The automated upgrade of dependencies in main broken building of
Airflow documentation in main build.
After a lot of experimentation, It has been narrowed down
to upgrade of dnspython from 1.16.0 to 2.+ which was brought
by upgrading eventlet to 0.32.0.
This PR limits the dnspython library to < 2.0.0. An issue
has been opened:
https://github.com/rthalley/dnspython/issues/681
(cherry picked from commit 022b4e0bccb91c2ed829adf9e5e6b83dbf352673)
---
docs/exts/exampleinclude.py | 6 ++++++
setup.py | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/docs/exts/exampleinclude.py b/docs/exts/exampleinclude.py
index 8bf395d..097ec7c 100644
--- a/docs/exts/exampleinclude.py
+++ b/docs/exts/exampleinclude.py
@@ -20,6 +20,7 @@
"""Nice formatted include for examples"""
+import traceback
from os import path
from docutils import nodes
@@ -150,6 +151,11 @@ def register_source(app, env, modname):
logger.info(
"Module \"%s\" could not be loaded. Full source will not be available. \"%s\"", modname, ex
)
+ # We cannot use regular warnings or exception methods because those warnings are interpreted
+ # by running python process and converted into "real" warnings, so we need to print the
+ # traceback here at info level
+ tb = traceback.format_exc()
+ logger.info("%s", tb)
env._viewcode_modules[modname] = False
return False
diff --git a/setup.py b/setup.py
index f35ff83..33cb4f9 100644
--- a/setup.py
+++ b/setup.py
@@ -188,6 +188,12 @@ apache_beam = [
]
asana = ['asana>=0.10', 'cached-property>=1.5.2']
async_packages = [
+ # DNS Python 2.0.0 and above breaks building documentation on Sphinx. When dnspython 2.0.0 is installed
+ # building documentation fails with trying to import google packages with
+ # TypeError("unsupported operand type(s) for +: 'SSL_VERIFY_PEER' and
+ # 'SSL_VERIFY_FAIL_IF_NO_PEER_CERT'")
+ # The issue is opened for it https://github.com/rthalley/dnspython/issues/681
+ 'dnspython<2.0.0',
'eventlet>= 0.9.7',
'gevent>=0.13',
'greenlet>=0.4.9',