From 2bdb2427abd0765a73e22c6e8210494d98cb6407 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 25 Mar 2024 11:05:32 -0500 Subject: [PATCH 1/2] Thoroughly lock doc build requirements This ensures doc builds are reproducible on Read the Docs --- .readthedocs.yaml | 14 ++++++++++++++ docs/requirements.txt | 28 +++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..e0baab2 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,14 @@ +version: 2 + +build: + os: 'ubuntu-22.04' + tools: + python: '3.12' + +sphinx: + configuration: 'docs/conf.py' + fail_on_warning: false + +python: + install: + - requirements: 'docs/requirements.txt' diff --git a/docs/requirements.txt b/docs/requirements.txt index d83a393..2fb0194 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,27 @@ -sphinxcontrib-httpdomain==1.7.0 \ No newline at end of file +alabaster==0.7.13 ; python_version >= "3.8" +babel==2.14.0 ; python_version >= "3.8" +certifi==2024.2.2 ; python_version >= "3.8" +charset-normalizer==3.3.2 ; python_version >= "3.8" +colorama==0.4.6 ; python_version >= "3.8" and sys_platform == "win32" +docutils==0.20.1 ; python_version >= "3.8" +idna==3.6 ; python_version >= "3.8" +imagesize==1.4.1 ; python_version >= "3.8" +importlib-metadata==7.0.1 ; python_version < "3.10" and python_version >= "3.8" +jinja2==3.1.3 ; python_version >= "3.8" +markupsafe==2.1.5 ; python_version >= "3.8" +packaging==23.2 ; python_version >= "3.8" +pygments==2.17.2 ; python_version >= "3.8" +pytz==2024.1 ; python_version < "3.9" and python_version >= "3.8" +requests==2.31.0 ; python_version >= "3.8" +snowballstemmer==2.2.0 ; python_version >= "3.8" +sphinx==7.1.2 ; python_version >= "3.8" +sphinx-rtd-theme==2.0.0 ; python_version >= "3.8" +sphinxcontrib-applehelp==1.0.4 ; python_version >= "3.8" +sphinxcontrib-devhelp==1.0.2 ; python_version >= "3.8" +sphinxcontrib-htmlhelp==2.0.1 ; python_version >= "3.8" +sphinxcontrib-httpdomain==1.8.1 ; python_version >= "3.8" +sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.8" +sphinxcontrib-qthelp==1.0.3 ; python_version >= "3.8" +sphinxcontrib-serializinghtml==1.1.5 ; python_version >= "3.8" +urllib3==2.2.1 ; python_version >= "3.8" +zipp==3.17.0 ; python_version < "3.10" and python_version >= "3.8" From 00519b9068964a674b2808af3c05a58ab85a43b6 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 25 Mar 2024 11:13:03 -0500 Subject: [PATCH 2/2] Resolve two warnings emitted by Sphinx when building docs --- docs/conf.py | 2 +- flask_cors/extension.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 5401d47..fd6e625 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -255,4 +255,4 @@ # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} +intersphinx_mapping = {'py': ('http://docs.python.org/', None)} diff --git a/flask_cors/extension.py b/flask_cors/extension.py index c00cbff..6f76995 100644 --- a/flask_cors/extension.py +++ b/flask_cors/extension.py @@ -70,9 +70,11 @@ class CORS(object): The origin(s) may be regular expressions, case-sensitive strings, or else an asterisk. - :note: origins must include the schema and the port (if not port 80), - e.g., - `CORS(app, origins=["http://localhost:8000", "https://example.com"])`. + .. note:: + + origins must include the schema and the port (if not port 80), + e.g., + `CORS(app, origins=["http://localhost:8000", "https://example.com"])`. Default : '*' :type origins: list, string or regex