From b0fd2158abbcf97e43f8387e018c53f3607dadef Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 11 Jan 2023 10:49:08 -0500 Subject: [PATCH 1/4] Remove build-time field to avoid changing all pages on each build We are re-uploading all pages even if they didn't change anything because on each build we inject a different date-time. --- readthedocs_ext/readthedocs.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/readthedocs_ext/readthedocs.py b/readthedocs_ext/readthedocs.py index dfaf4c0..f099484 100644 --- a/readthedocs_ext/readthedocs.py +++ b/readthedocs_ext/readthedocs.py @@ -7,11 +7,9 @@ import os import re import types -from datetime import datetime from packaging.version import Version import sphinx -from sphinx import package_dir from sphinx.util.console import bold @@ -159,7 +157,6 @@ def rtd_render(self, template, render_context): 'api_host': ctx.get('api_host', ''), 'commit': ctx.get('commit', ''), 'ad_free': ctx.get('ad_free', ''), - 'build_date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'), 'global_analytics_code': ctx.get('global_analytics_code'), 'user_analytics_code': ctx.get('user_analytics_code'), 'subprojects': dict(ctx.get('subprojects', [])), From fdcfbd3a6f77ae2595b24c2024c09f177141ec49 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 11 Jan 2023 11:13:36 -0500 Subject: [PATCH 2/4] Fix tox --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 21e40b1..4bdb4e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,8 +11,8 @@ commands: default: "21,22,23,24,30,31,32,33,34,35,40,41,42,43,44,latest" steps: - checkout - - run: pip install --user tox - - run: tox -e "<>-sphinx{<>}" + - run: pip install --user 'tox<5' + - run: tox run -e "<>-sphinx{<>}" jobs: py27: From a46f5ca05c7c8ec7ec30b44cc724ac334ce91a38 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 11 Jan 2023 11:28:49 -0500 Subject: [PATCH 3/4] Pin tox to 3.x --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4bdb4e6..6891d0b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,8 +11,10 @@ commands: default: "21,22,23,24,30,31,32,33,34,35,40,41,42,43,44,latest" steps: - checkout - - run: pip install --user 'tox<5' - - run: tox run -e "<>-sphinx{<>}" + # NOTE: update tox to tox<5 when https://github.com/tox-dev/tox/issues/2850 + # is fixed. + - run: pip install --user 'tox<4' + - run: tox -e "<>-sphinx{<>}" jobs: py27: From 3f50fcdacb864c0c93277156eb34652150422762 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 25 May 2023 11:52:03 -0500 Subject: [PATCH 4/4] Remove commit --- readthedocs_ext/readthedocs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/readthedocs_ext/readthedocs.py b/readthedocs_ext/readthedocs.py index f099484..6243893 100644 --- a/readthedocs_ext/readthedocs.py +++ b/readthedocs_ext/readthedocs.py @@ -155,7 +155,6 @@ def rtd_render(self, template, render_context): 'source_suffix': ctx.get('source_suffix', ''), 'page': ctx.get('pagename', ''), 'api_host': ctx.get('api_host', ''), - 'commit': ctx.get('commit', ''), 'ad_free': ctx.get('ad_free', ''), 'global_analytics_code': ctx.get('global_analytics_code'), 'user_analytics_code': ctx.get('user_analytics_code'),