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

MAINT: Fix for Sphinx 7.2 #1176

Merged
merged 2 commits into from
Aug 17, 2023
Merged

MAINT: Fix for Sphinx 7.2 #1176

merged 2 commits into from
Aug 17, 2023

Conversation

larsoner
Copy link
Contributor

Closes #1175

@larsoner larsoner enabled auto-merge (squash) August 17, 2023 16:41
@larsoner larsoner merged commit 966d1b0 into sphinx-gallery:master Aug 17, 2023
13 of 14 checks passed
@larsoner larsoner deleted the ci branch August 17, 2023 17:08
@pllim
Copy link
Contributor

pllim commented Aug 17, 2023

Hi! Does this patch also fix this error I am seeing downstream with Sphinx 7.2.2 and sphinx-gallery 0.13.0 ?

Traceback (most recent call last):
  File "sphinx/events.py", line 96, in emit
    results.append(listener.handler(self.app, *args))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "sphinx_gallery/docs_resolv.py", line 471, in embed_code_links
    _embed_code_links(app, gallery_conf, gallery_dir)
  File "sphinx_gallery/docs_resolv.py", line 324, in _embed_code_links
    doc_resolvers[this_module] = SphinxDocLinkResolver(
                                 ^^^^^^^^^^^^^^^^^^^^^^
  File "sphinx_gallery/docs_resolv.py", line 146, in __init__
    if doc_url.startswith(('http://', 'https://')):
       ^^^^^^^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute 'startswith'

Example log: https://readthedocs.org/projects/astropy/builds/21642243/ (from astropy/astropy#15185)

@larsoner
Copy link
Contributor Author

Nope, but I can open a quick PR for you to test

@larsoner
Copy link
Contributor Author

... actually it looks like that was fixed before this PR, so master should work already

@pllim
Copy link
Contributor

pllim commented Aug 17, 2023

In that case, what is the timeline to release sphinx-gallery?

@larsoner
Copy link
Contributor Author

None at the moment. In theory we should release given the breakages I guess! You can use for example pip install git+https://github.com/sphinx-gallery/sphinx-gallery.git@309e5be03088410e495c32272edd09cc9548e50c to work around 7.2 errors for now

@larsoner
Copy link
Contributor Author

@lucyleeow WDYT about cutting a release?

@pllim pllim mentioned this pull request Aug 17, 2023
2 tasks
@pllim
Copy link
Contributor

pllim commented Aug 17, 2023

I want to avoid pinning our infrastructure to unreleased sphinx-gallery if possible, so I can pin sphinx<7.2 until a new release is available.

@pllim
Copy link
Contributor

pllim commented Aug 17, 2023

Just to report back that using the dev version of sphinx-gallery + sphinx 7.2.2 , I got a green RTD build, so I am looking forward to your release. Thanks!

xref astropy/astropy#15184

@lucyleeow
Copy link
Contributor

Thanks @larsoner ! I was wondering how the docname change came about but could not find a specific source, maybe it was part of the move from str to Path?

@lucyleeow
Copy link
Contributor

@lucyleeow WDYT about cutting a release?

Sorry I don't think I will have time for that. I will fix my PRs though so they get in.

@pllim
Copy link
Contributor

pllim commented Aug 18, 2023

From the looks of https://github.com/sphinx-gallery/sphinx-gallery/blob/master/.github/workflows/release.yml , anyone with maintainer access should be able to release?

p.s. You don't need to upload/download artifact unless you are building architecture specific wheels, which I don't think you are.

@lucyleeow lucyleeow added the bug label Aug 18, 2023
@lucyleeow
Copy link
Contributor

@larsoner I've done some labelling to make release easier for you. Thank you 🙏

@larsoner
Copy link
Contributor Author

I saw that on your PRs, much appreciated :)

I'll look into releasing now, indeed with the release.yml I think it's pretty quick I think...

@larsoner
Copy link
Contributor Author

clrpackages pushed a commit to clearlinux-pkgs/pypi-sphinx_gallery that referenced this pull request Aug 22, 2023
… to version 0.14.0

v0.14.0
-------

**Implemented enhancements:**

-  MAINT Update backreferences docs and add tests `#1154 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1154>`__ (`lucyleeow <https://github.com/lucyleeow>`__)
-  Remove extra spaces in reported running time `#1147 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1147>`__ (`stefanv <https://github.com/stefanv>`__)

**Fixed bugs:**

-  MAINT: Fix for Sphinx 7.2 `#1176 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1176>`__ (`larsoner <https://github.com/larsoner>`__)
-  updated mpl gui warning catcher to new error message `#1160 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1160>`__ (`story645 <https://github.com/story645>`__)
-  Ensure consistent encoding for md5sum generation `#1159 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1159>`__ (`sdhiscocks <https://github.com/sdhiscocks>`__)
-  Maint: Fix ``app.builder.outdir`` as Sphinx now using pathlib `#1155 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1155>`__ (`lucyleeow <https://github.com/lucyleeow>`__)
-  Make \_LoggingTee compatible with TextIO `#1151 <https://github.com/sphinx-gallery/sphinx-gallery/pull/1151>`__ (`o-laurent <https://github.com/o-laurent>`__)

(NEWS truncated at 15 lines)
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.

BUG Sphinx docname from source-read event is sometimes None
3 participants