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

Fix type_annotation_transforms for Sphinx 6 #181

Merged
merged 7 commits into from
Jan 3, 2023

Conversation

jbms
Copy link
Owner

@jbms jbms commented Oct 30, 2022

No description provided.

@jbms jbms requested a review from 2bndy5 October 30, 2022 05:31
setup.py Show resolved Hide resolved
@jbms jbms force-pushed the fix-type_annotation_transforms-sphinx6 branch 2 times, most recently from 0f704a2 to 7faeee7 Compare January 1, 2023 07:25
@jbms jbms force-pushed the fix-type_annotation_transforms-sphinx6 branch from 7faeee7 to 2837128 Compare January 2, 2023 05:17
jbms added 5 commits January 1, 2023 21:35
Instead of intercepting the call to `ast.parse`, we now parse,
transform, and then unparse.

This also drops support for Python 3.7, since Sphinx 6 also drops
Python 3.7 support.
Previously, mypy issued the following warning regarding _render_body:

By default the bodies of untyped functions are not checked, consider
using --check-untyped-defs [annotation-unchecked]
@jbms jbms force-pushed the fix-type_annotation_transforms-sphinx6 branch from 2837128 to fa5aac8 Compare January 2, 2023 05:35
@jbms jbms force-pushed the fix-type_annotation_transforms-sphinx6 branch from fa5aac8 to 47c3bc5 Compare January 2, 2023 05:44
@jbms
Copy link
Owner Author

jbms commented Jan 2, 2023

I think I've fixed all of the typing issues now. Unfortunately the setup-graphviz seems to be failing now on macOS, not sure how we can work around that.

@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 2, 2023

There seems to be a conflict between the installed python and the python homebrew tries to install. Although I can't clearly tell what the problem is. My instinct is to setup-graphviz before setup-python in the CI.

@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 2, 2023

We might be able to get graphviz through conda-forge instead of OS-specific pkg managers (like the current action does).

@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 3, 2023

Damn. I still have no idea what the problem is based on the homebrew output.

@jbms jbms force-pushed the fix-type_annotation_transforms-sphinx6 branch from 5540102 to 1621013 Compare January 3, 2023 05:25
@jbms jbms force-pushed the fix-type_annotation_transforms-sphinx6 branch from 1621013 to 6a4fe0b Compare January 3, 2023 06:16
@jbms
Copy link
Owner Author

jbms commented Jan 3, 2023

I think this is a general issue with using homebrew on github actions. Reordering the graphviz step before the Python setup step did not fix the issue, but skipping brew update seems to avoid the issue.

ts-graphviz/setup-graphviz#457

@jbms jbms merged commit 0570ead into main Jan 3, 2023
@jbms jbms deleted the fix-type_annotation_transforms-sphinx6 branch January 3, 2023 07:17
@jbms
Copy link
Owner Author

jbms commented Jan 3, 2023

Perhaps we should tag a new version with Sphinx 6 support?

@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 3, 2023

sure, but I was thinking a patch bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants