From 3447e18d8ed7c2353db7e7610c600439b051223d Mon Sep 17 00:00:00 2001 From: LilSpazJoekp <15524072+LilSpazJoekp@users.noreply.github.com> Date: Tue, 4 Jul 2023 12:01:31 -0500 Subject: [PATCH 1/2] Switch to furo theme (cherry picked from commit praw-dev/praw@2e8cc27713f461b99179b8180cff89033b87bc08) --- docs/_static/theme_override.css | 43 --------------------------------- docs/conf.py | 15 +----------- setup.py | 5 ++-- 3 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 docs/_static/theme_override.css diff --git a/docs/_static/theme_override.css b/docs/_static/theme_override.css deleted file mode 100644 index 7ca1fb5e..00000000 --- a/docs/_static/theme_override.css +++ /dev/null @@ -1,43 +0,0 @@ -/* Table text wrapping CSS fix from -https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html */ - -/* override table width restrictions */ -@media screen and (min-width: 767px) { - - .wy-table-responsive table td { - /* !important prevents the common CSS stylesheets from overriding - this as on RTD they are loaded after this stylesheet */ - white-space: normal !important; - } - - .wy-table-responsive { - overflow: visible !important; - } -} - -table.center-table-items, table.center-table-items th { - text-align: center; -} - -html[data-theme='dark'] a.btn-neutral, -html[data-theme='dark'] a.btn-neutral:visited { - background-color: #363636ff !important; - color: var(--dark-text-color) !important; -} - -html[data-theme='dark'].writer-html4 .rst-content dl:not(.docutils) .descclassname, -html[data-theme='dark'].writer-html4 .rst-content dl:not(.docutils) .descname, -html[data-theme='dark'].writer-html4 .rst-content dl:not(.docutils) .sig-name, -html[data-theme='dark'].writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .descclassname, -html[data-theme='dark'].writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .descname, -html[data-theme='dark'].writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .sig-name { - color: var(--dark-text-color); -} - -html[data-theme='dark'] a:visited { - color: #9b59b6 !important; -} - -html[data-theme="dark"] a.btn-neutral:hover { - background-color: #1f1f1f !important; -} diff --git a/docs/conf.py b/docs/conf.py index 420d32de..9170abf8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,3 @@ -import os import sys from datetime import datetime @@ -13,13 +12,9 @@ extensions = [ "sphinx.ext.autodoc", "sphinx.ext.intersphinx", - "sphinx_rtd_dark_mode", - "sphinx_rtd_theme", "sphinxcontrib_trio", ] -html_static_path = ["_static"] -html_theme = "sphinx_rtd_theme" -html_theme_options = {"collapse_navigation": True} +html_theme = "furo" htmlhelp_basename = "Async PRAW" intersphinx_mapping = {"python": ("https://docs.python.org/3", None)} master_doc = "index" @@ -37,13 +32,6 @@ version = ".".join(__version__.split(".", 2)[:2]) -# Use RTD theme locally -if not os.environ.get("READTHEDOCS"): - import sphinx_rtd_theme - - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - - def skip(app, what, name, obj, skip, options): if name in { "__call__", @@ -59,4 +47,3 @@ def skip(app, what, name, obj, skip, options): def setup(app): app.connect("autodoc-skip-member", skip) - app.add_css_file("theme_override.css") diff --git a/setup.py b/setup.py index 4792b627..aeb8cf1d 100644 --- a/setup.py +++ b/setup.py @@ -17,9 +17,8 @@ "dev": ["packaging"], "lint": ["pre-commit"], "readthedocs": [ + "furo", "sphinx", - "sphinx-rtd-dark-mode", - "sphinx_rtd_theme", "sphinxcontrib-trio", ], "test": [ @@ -59,7 +58,7 @@ ], description=( 'Async PRAW, an abbreviation for "Asynchronous Python Reddit API Wrapper", is a' - " python package that allows for simple access to Reddit's API." + " Python package that allows for simple access to Reddit's API." ), extras_require=extras, install_requires=[ From 9d4e1afad94421bd38d7423c31b02342edcfede9 Mon Sep 17 00:00:00 2001 From: LilSpazJoekp <15524072+LilSpazJoekp@users.noreply.github.com> Date: Fri, 20 Oct 2023 21:48:09 -0500 Subject: [PATCH 2/2] Fix python 3.12 and bump aiofiles --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index aeb8cf1d..a1611662 100644 --- a/setup.py +++ b/setup.py @@ -62,8 +62,9 @@ ), extras_require=extras, install_requires=[ - "aiofiles <1", - "aiohttp <4", + "aiofiles ==23.*", + "aiohttp <4; python_version < '3.12'", + "aiohttp==3.9.0b0; python_version == '3.12'", "aiosqlite <=0.17.0", "asyncprawcore >=2.1, <3", "update_checker >=0.18",