Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade sphinx to 8 #23157

Merged
merged 7 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/content/api/modules.json.gz
Binary file not shown.
Binary file modified docs/content/api/searchindex.json.gz
Binary file not shown.
Binary file modified docs/content/api/sections.json.gz
Binary file not shown.
Binary file modified docs/next/public/objects.inv
Binary file not shown.
9 changes: 5 additions & 4 deletions docs/sphinx/_ext/dagster-sphinx/dagster_sphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from sphinx.environment import BuildEnvironment
from sphinx.ext.autodoc import (
ClassDocumenter,
ObjectMembers, # type: ignore # (bad stubs)
ObjectMember,
Options as AutodocOptions,
)
from sphinx.util import logging
Expand Down Expand Up @@ -86,7 +86,7 @@ class DagsterClassDocumenter(ClassDocumenter):

objtype = "class"

def get_object_members(self, want_all: bool) -> Tuple[bool, ObjectMembers]:
def get_object_members(self, want_all: bool) -> Tuple[bool, List[ObjectMember]]:
# the @record transform creates a new outer class, so redirect
# sphinx to target the original class for scraping members out of __dict__
if is_record(self.object):
Expand All @@ -99,10 +99,11 @@ def get_object_members(self, want_all: bool) -> Tuple[bool, ObjectMembers]:
filtered_members = [
m
for m in unfiltered_members
if m[0] in self.object.__dict__ and self._is_member_public(self.object.__dict__[m[0]])
if m.__name__ in self.object.__dict__
and self._is_member_public(self.object.__dict__[m.__name__])
]
for member in filtered_members:
check_public_method_has_docstring(self.env, member[0], member[1])
check_public_method_has_docstring(self.env, member.__name__, member.object)
return False, filtered_members

def _is_member_public(self, member: object) -> bool:
Expand Down
13 changes: 9 additions & 4 deletions docs/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ skipsdist = True

[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN AWS_SECRET_ACCESS_KEY AWS_ACCESS_KEY_ID BUILDKITE*
passenv = CI_*
COVERALLS_REPO_TOKEN
AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID
BUILDKITE*

allowlist_externals =
make
uv
install_command = uv pip install {opts} {packages}

[testenv:sphinx]
deps =
sphinx==5.0.2
sphinx-click==4.3.0
sphinx>=8,<9
sphinx-click
sphinx_toolbox
sphinxcontrib-serializinghtml<1.1.6 # pin away new version that manifests TypeError
sphinxcontrib-serializinghtml
-e sphinx/_ext/dagster-sphinx

# Can't stub deps because processed by sphinx-click
Expand Down