Skip to content

Deprecate backend_webagg.ServerThread. #24208

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

Merged
merged 1 commit into from
Oct 18, 2022
Merged

Deprecate backend_webagg.ServerThread. #24208

merged 1 commit into from
Oct 18, 2022

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Oct 18, 2022

It is clearly just for internal use, can be replaced by a plain Thread(target=...), and removing it gets rid of a large block in the webagg api docs that just restates the standard Thread docstring (https://matplotlib.org/devdocs/api/backend_webagg_api.html#matplotlib.backends.backend_webagg.ServerThread).

PR Summary

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@anntzer anntzer added this to the v3.7.0 milestone Oct 18, 2022
It is clearly just for internal use, can be replaced by a plain
Thread(target=...), and removing it gets rid of a large block in the
webagg api docs that just restates the standard Thread docstring.
@tacaswell
Copy link
Member

The docs failure looks unrelated?

@oscargus
Copy link
Member

I think so as well. Isn't there a theoretical risk of that happening when building in parallel and now it happened to trigger?

@tacaswell
Copy link
Member

Yes, but I do not have a good theory as to how a race condition could cause errors that look like:

Traceback (most recent call last):
  File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/cmd/build.py", line 281, in build_main
    app.build(args.force_all, args.filenames)
  File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/application.py", line 347, in build
    self.builder.build_update()
  File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 310, in build_update
    self.build(to_build,
  File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 326, in build
    updated_docnames = set(self.read())
  File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 431, in read
    self._read_parallel(docnames, nproc=self.app.parallel)
  File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 487, in _read_parallel
    tasks.join()
  File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/util/parallel.py", line 105, in join
    if not self._join_one():
  File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/util/parallel.py", line 126, in _join_one
    raise SphinxParallelError(*result)
sphinx.errors.SphinxParallelError: ValueError: gallery/pyplots/dollar_ticks is already noted as redirecting to gallery/ticks/dollar_ticks

Sphinx parallel build error:
ValueError: gallery/pyplots/dollar_ticks is already noted as redirecting to gallery/ticks/dollar_ticks

@tacaswell
Copy link
Member

I restarted the job

✔ 11:32:43 $ ack "redirect-from" | grep ticks
examples/ticks/date_index_formatter.py:6:.. redirect-from:: /gallery/text_labels_and_annotations/date_index_formatter
examples/ticks/date_index_formatter.py:7:.. redirect-from:: /gallery/ticks/date_index_formatter2
examples/ticks/dollar_ticks.py:8:.. redirect-from:: /gallery/pyplots/dollar_ticks
examples/ticks/fig_axes_customize_simple.py:8:.. redirect-from:: /gallery/pyplots/fig_axes_customize_simple

says there is nothing wrong so maybe two workers got examples/ticks/dollar_ticks.py and then it collided with itself? I also do not see any other failures on cricle so lets hope the restart "fixes" this and worry about tracking down transient errors when they become more common.

@timhoffm
Copy link
Member

I vaguely remember to have seen that Sphinx error before. Anyway, it's not related to this code and we can deal with it if it hits again.

@timhoffm timhoffm merged commit a39c9e6 into matplotlib:main Oct 18, 2022
@anntzer anntzer deleted the st branch October 18, 2022 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants