Skip to content

Pin numpydoc to 0.8.0 (fix double autoescape) - #5961

Merged
jrbourbeau merged 1 commit into
dask:masterfrom
gforsyth:pin_numpydoc
Feb 28, 2020
Merged

jrbourbeau merged 1 commit into
dask:masterfrom
gforsyth:pin_numpydoc

Conversation

@gforsyth

@gforsyth gforsyth commented Feb 28, 2020 •

Copy link
Copy Markdown
Contributor

This is a temporary fix for the doubly escaped *s that are present in
the current dask docs (and pandas, and scipy...).
This issue started with numpydoc=0.9.0 when numpydoc started
escaping *args and **kwargs. sphinx autosummary also escapes
*args and **kwargs, so in conjunction, they end up double-escaped:

Client.run(self, function, \*args, \*\*kwargs)

There are a couple of different ways to fix this TheRightWay™ but this
will make the docs prettier for now. Also a quickfix for a typo in the docs on master

  • Tests added / passed
  • Passes black dask / flake8 dask

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @gforsyth!

Comment thread docs/requirements-docs.txt Resolved
@jrbourbeau

Copy link
Copy Markdown
Member

Also, I suspect there's probably similar things happening over in dask/distributed. Any interest in doing something similar over there?

@gforsyth

Copy link
Copy Markdown
Contributor Author

Also, I suspect there's probably similar things happening over in dask/distributed. Any interest in doing something similar over there?

Will do. Also testing out a potential fix in numpydoc, I'll keep folks posted.

This is a temporary fix for the doubly escaped `*`s that are present in
the current dask docs (and `pandas`, and `scipy`...).
This issue started with `numpydoc=0.9.0` when `numpydoc` started
escaping `*args` and `**kwargs`.  sphinx autosummary _also_ escapes
`*args` and `**kwargs`, so in conjunction, they end up double-escaped:

```
Client.run(self, function, \*args, \*\*kwargs)
```

There are a couple of different ways to fix this TheRightWay™ but this
will make the docs prettier for now.
@gforsyth

Copy link
Copy Markdown
Contributor Author

This is ready for another look @jrbourbeau !

@jrbourbeau jrbourbeau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gforsyth! This is in

@jrbourbeau
jrbourbeau merged commit fcc500c into dask:master Feb 28, 2020
@jrbourbeau

Copy link
Copy Markdown
Member

Also, I noticed this was your first PR to this repository. Welcome : )

@gforsyth
gforsyth deleted the pin_numpydoc branch February 28, 2020 21:17
@gforsyth

Copy link
Copy Markdown
Contributor Author

Long time listener, first time caller. Thanks @jrbourbeau !

gforsyth added a commit to gforsyth/distributed that referenced this pull request Feb 28, 2020
Similar to dask/dask#5961, recent changes to `numpydoc` lead to function
signatures displayed using `autosummary` to have doubly-escaped `*`s.

This commit swaps out `numpydoc` in favor of `napoleon` -- there are a
couple of benefits:
* no more double-escaped function signatures
* one less dependency for docs (napoleon is shipped with sphinx)

I've added a make target to automatically generate API docs using
`sphinx-apidoc` but this isn't required for `autosummary` compatibility.
It can always be added as a requirement of the `html` target at a later
time.
gforsyth added a commit to gforsyth/distributed that referenced this pull request Mar 14, 2020
Similar to dask/dask#5961, recent changes to `numpydoc` lead to function
signatures displayed using `autosummary` to have doubly-escaped `*`s.

This pins `numpydoc` to version 0.8.0 to avoid the regression until a
patch is merged upstream.

Also small changes to avoid a sphinx timeout looking for an intersphinx
inventory, and a fixed a misformatted code-block
jrbourbeau pushed a commit to dask/distributed that referenced this pull request Mar 14, 2020
Similar to dask/dask#5961, recent changes to `numpydoc` lead to function
signatures displayed using `autosummary` to have doubly-escaped `*`s.

This pins `numpydoc` to version 0.8.0 to avoid the regression until a
patch is merged upstream.

Also small changes to avoid a sphinx timeout looking for an intersphinx
inventory, and a fixed a misformatted code-block
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