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

Avoid RemovedInSphinx80Warning in path-manipulation code. #977

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

gareth-rees
Copy link
Contributor

@gareth-rees gareth-rees commented Mar 31, 2024

In recent versions of Sphinx, code that treats Sphinx application paths such as Sphinx.confdir and Sphinx.doctreedir as strings emits the warning "Sphinx 8 will drop support for representing paths as strings".

This commit updates path-manipulation code to use functions in the os.path module, which accept path-like objects as well as strings.

Note that you will need pull request #976 in order for tests to pass, due to issue #975.

In recent versions of Sphinx, code that treats Sphinx application
paths such as `Sphinx.confdir` and `Sphinx.doctreedir` as strings
emits the warning "Sphinx 8 will drop support for representing paths
as strings".

This commit updates path-manipulation code to use functions in the
`os.path` module, which accept path-like objects as well as strings.

This fixes issue breathe-doc#974.
# Conflicts:
#	breathe/project.py
@AA-Turner AA-Turner merged commit acb59b4 into breathe-doc:main Jul 30, 2024
20 of 38 checks passed
@gareth-rees
Copy link
Contributor Author

@AA-Turner Thanks for merging this and #976: much appreciated.

@AA-Turner
Copy link
Collaborator

No worries! Per #990 (comment) I'm happy to review other PRs if you have them, but I'm unlikey to be writing much (any) new stuff for breathe myself.

A

jpthiele added a commit to instatdealii/idealii that referenced this pull request Mar 10, 2025
Bumps [breathe](https://github.com/breathe-doc/breathe) from 4.35.0 to
4.36.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/breathe-doc/breathe/releases">breathe's
releases</a>.</em></p>
<blockquote>
<h2>Breathe v4.36.0</h2>
<p><a
href="https://pypi.org/project/breathe/4.36.0/">https://pypi.org/project/breathe/4.36.0/</a></p>
<h2>What's Changed</h2>
<ul>
<li>Fix mistake in spelling of inheritance by <a
href="https://github.com/michaeljones"><code>@​michaeljones</code></a>
in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/914">breathe-doc/breathe#914</a></li>
<li>Remove python 2 code by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/949">breathe-doc/breathe#949</a></li>
<li>Update <code>test_renderer</code> so that tests pass with Sphinx
7.2. by <a
href="https://github.com/gareth-rees"><code>@​gareth-rees</code></a> in
<a
href="https://redirect.github.com/breathe-doc/breathe/pull/976">breathe-doc/breathe#976</a></li>
<li>Fix PosixPath issue with Sphinx 7.2 by <a
href="https://github.com/scottamain"><code>@​scottamain</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/964">breathe-doc/breathe#964</a></li>
<li>Avoid <code>RemovedInSphinx80Warning</code> in path-manipulation
code. by <a
href="https://github.com/gareth-rees"><code>@​gareth-rees</code></a> in
<a
href="https://redirect.github.com/breathe-doc/breathe/pull/977">breathe-doc/breathe#977</a></li>
<li>Move project metadata to pyproject.toml, clean-up by <a
href="https://github.com/mwtoews"><code>@​mwtoews</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/883">breathe-doc/breathe#883</a></li>
<li>Fix README: Bump Python to &gt;= 3.7 by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/946">breathe-doc/breathe#946</a></li>
<li>Add make.bat for building on Windows by <a
href="https://github.com/hwhsu1231"><code>@​hwhsu1231</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/971">breathe-doc/breathe#971</a></li>
<li>fix(ci): reorder <code>sphinx</code> installation by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/953">breathe-doc/breathe#953</a></li>
<li>.github/workflows/unit_tests.yml: Update it by <a
href="https://github.com/t-b"><code>@​t-b</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/887">breathe-doc/breathe#887</a></li>
<li>Update GH Action to current release by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/954">breathe-doc/breathe#954</a></li>
<li>Add documentation on writing tests for Breathe by <a
href="https://github.com/emilydolson"><code>@​emilydolson</code></a> in
<a
href="https://redirect.github.com/breathe-doc/breathe/pull/931">breathe-doc/breathe#931</a></li>
<li>Update dependencies &amp; GH Actions by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/955">breathe-doc/breathe#955</a></li>
<li>Resolve full title for doxygenpage and doxygengroup and allow for
omitting the title all together by <a
href="https://github.com/RaumZeit"><code>@​RaumZeit</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/939">breathe-doc/breathe#939</a></li>
<li>Do not re-assign <code>nodes</code> variable in
renderer/sphinxrenderer.py by <a
href="https://github.com/RaumZeit"><code>@​RaumZeit</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/938">breathe-doc/breathe#938</a></li>
<li>Insert signature name for use with Sphinx ToC by <a
href="https://github.com/scottamain"><code>@​scottamain</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/959">breathe-doc/breathe#959</a></li>
<li>Remove outdated list of supported targets from documentation by <a
href="https://github.com/saraedum"><code>@​saraedum</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1001">breathe-doc/breathe#1001</a></li>
<li>feat(ci): Add python 3.13 and Sphinx 8.1 by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1006">breathe-doc/breathe#1006</a></li>
<li>Fix test suite under Sphinx 7.4+ by <a
href="https://github.com/yut23"><code>@​yut23</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1007">breathe-doc/breathe#1007</a></li>
<li>Fix building documentation in CI by <a
href="https://github.com/yut23"><code>@​yut23</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1008">breathe-doc/breathe#1008</a></li>
<li>Fix linter warnings by <a
href="https://github.com/yut23"><code>@​yut23</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1009">breathe-doc/breathe#1009</a></li>
<li>Fix test failure with latest Sphinx master by <a
href="https://github.com/yut23"><code>@​yut23</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1010">breathe-doc/breathe#1010</a></li>
<li>Fix: typos in docs and error msg by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1011">breathe-doc/breathe#1011</a></li>
<li>chore: move mypy config to <code>pyproject.toml</code> by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1014">breathe-doc/breathe#1014</a></li>
<li>Enable dependabot for GitHub Actions by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1015">breathe-doc/breathe#1015</a></li>
<li>Remove travis from docs by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1017">breathe-doc/breathe#1017</a></li>
<li>chore: improve lint tools by <a
href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1016">breathe-doc/breathe#1016</a></li>
<li>Fix errors in template specialization with qualified arguments by <a
href="https://github.com/yut23"><code>@​yut23</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1012">breathe-doc/breathe#1012</a></li>
<li>Add GitHub Actions release workflow for Trusted Publishing by <a
href="https://github.com/AA-Turner"><code>@​AA-Turner</code></a> in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1023">breathe-doc/breathe#1023</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Rotzbua"><code>@​Rotzbua</code></a> made
their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/949">breathe-doc/breathe#949</a></li>
<li><a
href="https://github.com/gareth-rees"><code>@​gareth-rees</code></a>
made their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/976">breathe-doc/breathe#976</a></li>
<li><a
href="https://github.com/scottamain"><code>@​scottamain</code></a> made
their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/964">breathe-doc/breathe#964</a></li>
<li><a href="https://github.com/mwtoews"><code>@​mwtoews</code></a> made
their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/883">breathe-doc/breathe#883</a></li>
<li><a href="https://github.com/hwhsu1231"><code>@​hwhsu1231</code></a>
made their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/971">breathe-doc/breathe#971</a></li>
<li><a
href="https://github.com/emilydolson"><code>@​emilydolson</code></a>
made their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/931">breathe-doc/breathe#931</a></li>
<li><a href="https://github.com/RaumZeit"><code>@​RaumZeit</code></a>
made their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/939">breathe-doc/breathe#939</a></li>
<li><a href="https://github.com/saraedum"><code>@​saraedum</code></a>
made their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1001">breathe-doc/breathe#1001</a></li>
<li><a href="https://github.com/yut23"><code>@​yut23</code></a> made
their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1007">breathe-doc/breathe#1007</a></li>
<li><a href="https://github.com/AA-Turner"><code>@​AA-Turner</code></a>
made their first contribution in <a
href="https://redirect.github.com/breathe-doc/breathe/pull/1023">breathe-doc/breathe#1023</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/breathe-doc/breathe/compare/v4.35.0...v4.36.0">https://github.com/breathe-doc/breathe/compare/v4.35.0...v4.36.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/breathe-doc/breathe/blob/main/CHANGELOG.rst">breathe's
changelog</a>.</em></p>
<blockquote>
<h2>Change Log</h2>
<p>Inspired by <code>Keepachangelog.com
&lt;https://keepachangelog.com/&gt;</code>__.</p>
<ul>
<li>
<p>2025-02-22 - <strong>Breathe v4.36.0</strong></p>
<ul>
<li>Update <code>test_renderer</code> so that tests pass with Sphinx
7.2.
<code>[#976](breathe-doc/breathe#976)
&lt;https://github.com/breathe-doc/breathe/pull/976&gt;</code>__</li>
<li>Fix PosixPath issue with Sphinx 7.2.
<code>[#964](breathe-doc/breathe#964)
&lt;https://github.com/breathe-doc/breathe/pull/964&gt;</code>__</li>
<li>Avoid <code>RemovedInSphinx80Warning</code> in path-manipulation
code.
<code>[#977](breathe-doc/breathe#977)
&lt;https://github.com/breathe-doc/breathe/pull/977&gt;</code>__</li>
<li>Require Sphinx 7.2 or later, Python 3.9 or later,
and  Doxygen 1.9.2 or later.
<code>[#887](breathe-doc/breathe#887)
&lt;https://github.com/breathe-doc/breathe/pull/887&gt;</code><strong>,
<code>[#946](breathe-doc/breathe#946)
&lt;https://github.com/breathe-doc/breathe/pull/946&gt;</code></strong>
<code>[#955](breathe-doc/breathe#955)
&lt;https://github.com/breathe-doc/breathe/pull/955&gt;</code>__</li>
<li>Begin to use pathlib.</li>
<li>Resolve full title for doxygenpage and doxygengroup
and allow for omitting the title all together
<code>[#939](breathe-doc/breathe#939)
&lt;https://github.com/breathe-doc/breathe/pull/939&gt;</code>__</li>
<li>Insert signature name for use with Sphinx Table of Contents
<code>[#959](breathe-doc/breathe#959)
&lt;https://github.com/breathe-doc/breathe/pull/959&gt;</code>__</li>
<li>Fix test failure with latest Sphinx master.
<code>[#1010](breathe-doc/breathe#1010)
&lt;https://github.com/breathe-doc/breathe/pull/1010&gt;</code>__</li>
<li>Fix error in template specialization with qualified arguments
<code>[#1010](breathe-doc/breathe#1010)
&lt;https://github.com/breathe-doc/breathe/pull/1012&gt;</code>__</li>
</ul>
</li>
<li>
<p>2023-02-28 - <strong>Breathe v4.35.0</strong></p>
<ul>
<li>Pull lone literal blocks in paragraphs up to produce correct
doctree.
<code>[#833](breathe-doc/breathe#833)
&lt;https://github.com/breathe-doc/breathe/pull/833&gt;</code>__</li>
<li>Fix tests for changes in Sphinx 5.3.
<code>[#865](breathe-doc/breathe#865)
&lt;https://github.com/breathe-doc/breathe/pull/865&gt;</code>__</li>
<li>Bump Python requirement to 3.7.
<code>[#866](breathe-doc/breathe#866)
&lt;https://github.com/breathe-doc/breathe/pull/866&gt;</code>__</li>
<li>Support Sphinx 6.
<code>[#885](breathe-doc/breathe#885)
&lt;https://github.com/breathe-doc/breathe/pull/885&gt;</code>__</li>
<li>Support <code>:sort:</code> option to sort sections by name.
<code>[#879](breathe-doc/breathe#879)
&lt;https://github.com/breathe-doc/breathe/pull/879&gt;</code>__</li>
</ul>
</li>
<li>
<p>2022-06-20 - <strong>Breathe v4.34.0</strong></p>
<ul>
<li>Treat .unparsed as plain text.
<code>[#806](breathe-doc/breathe#806)
&lt;https://github.com/breathe-doc/breathe/pull/806&gt;</code>__</li>
<li>Remove unneeded type: ignore annotations.
<code>[#813](breathe-doc/breathe#813)
&lt;https://github.com/breathe-doc/breathe/pull/813&gt;</code>__</li>
<li>Fix internal <code>NodeFinder</code> visitor for when non-Docutils
nodes are
present in the content of a directive.</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/breathe-doc/breathe/commit/ea1f7537ae8d84a8d6612f9811596e0091291c90"><code>ea1f753</code></a>
Release v4.36.0</li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/ce675266ad18bb97e5ef6fa08b34441d3c96abe4"><code>ce67526</code></a>
Add GitHub Actions release workflow for Trusted Publishing (<a
href="https://redirect.github.com/breathe-doc/breathe/issues/1023">#1023</a>)</li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/d6377643aeb7124e4bacd31dbb916ed12ac74d0a"><code>d637764</code></a>
Enable flake8-tidy-imports in Ruff</li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/a535b4be8c34a202115971dcb4f27fa812d7c8f9"><code>a535b4b</code></a>
Use the <code>sphinx.testing.fixtures</code> pytest plugin</li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/5f76cc869c55125a2975514640bf439e714f0eb1"><code>5f76cc8</code></a>
Run mypy on the configured <code>mypy.files</code></li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/6c55c1d46876b338482dac91b7fdc05f6f628c99"><code>6c55c1d</code></a>
Resolve most per-file ignores in Ruff</li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/36f41e759fb749ae03139a7dd3a145d305fa15c5"><code>36f41e7</code></a>
Install Doxygen from GitHub releases</li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/f98c45b6058afe66a2d7e823455e72b629df7ae5"><code>f98c45b</code></a>
Convert links to HTTPS</li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/1ccac0b475a147c3f0498ee3f1988f85404231ee"><code>1ccac0b</code></a>
Simplify <code>conf.py</code></li>
<li><a
href="https://github.com/breathe-doc/breathe/commit/3079797b5bdf9eea3382839b8c5932393e3a1b7e"><code>3079797</code></a>
Require Doxygen 1.9.2 or later</li>
<li>Additional commits viewable in <a
href="https://github.com/breathe-doc/breathe/compare/v4.35.0...v4.36.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=breathe&package-manager=pip&previous-version=4.35.0&new-version=4.36.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
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.

4 participants