Skip to content

Conversation

@hugovk
Copy link
Contributor

@hugovk hugovk commented Dec 11, 2023

Feature or Bugfix

  • Bugfix

Purpose

  • Fix the CI

Detail

Since Python 3.11.7, 3.12.0 and 3.13.0a2, "list of weak references to the object (if defined)" was changed to "list of weak references to the object".

Add a version check to decide text to assert.

Before: https://github.com/sphinx-doc/sphinx/actions/runs/7158385030?pr=11791

image

After: https://github.com/sphinx-doc/sphinx/actions/runs/7166386276?pr=11793

image

("Docutils HEAD" fails because https://repo.or.cz/docutils.git/ is 403 -- see PR #11794 -- and Windows fails with test_gettext_dont_rebuild_mo.)


Also in Ruff v0.1.0:

The --format option has been removed from ruff check, use --output-format instead

So use that option for "Lint with latest Ruff" to prevent error: unexpected argument '--format' found.

https://github.com/astral-sh/ruff/releases/tag/v0.1.0

Relates

@AlexWaygood
Copy link

Sorry for the breakage from CPython! It was my decision to backport, and I probably should have thought more carefully about the possible impact on documentation tools like Sphinx.

Thanks so much @hugovk for filing the PR to fix things!

Copy link
Contributor

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

I propose simplifing this check.

@hugovk
Copy link
Contributor Author

hugovk commented Dec 13, 2023

See also PR #11774 and issue #11775 which were opened earlier.

@AA-Turner AA-Turner merged commit 7d4ca9c into sphinx-doc:master Dec 26, 2023
@hugovk hugovk deleted the fix-weakrefs-if-defined branch December 26, 2023 04:32
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants