Skip to content

Conversation

@offbyone
Copy link
Contributor

This fixes a compatibility issue between code changes from PR #3510 and the docutils dependency specification.

Background

On Oct 9, 2025 (commit 5acf155 / PR #3510), code in pelican/readers.py was changed to pass string arguments directly to the docutils.core.Publisher() constructor instead of using set_components() method. This change requires docutils >= 0.22.

On Oct 15, 2025 (commit yxtmxopu), the pyproject.toml requirement was reverted from >=0.22.2 back to >=0.20.1 due to dependency conflicts with Sphinx, BUT the code changes were NOT reverted. This left the codebase in an inconsistent state where the code required docutils 0.22+ but the dependency spec allowed 0.20.1.

Testing

  • All 303 tests pass with docutils 0.22.4
  • Documentation builds successfully with tox -e docs

Pull Request Checklist

Resolves: #issue-number-here

  • Ensured tests pass and (if applicable) updated functional test output
  • Conformed to code style guidelines by running appropriate linting tools
  • Added tests for changed code
  • Updated documentation for changed code

This fixes a compatibility issue between code changes from PR getpelican#3510 and
the docutils dependency specification.

## Background

On Oct 9, 2025 (commit 5acf155 / PR getpelican#3510), code in pelican/readers.py
was changed to pass string arguments directly to the docutils.core.Publisher()
constructor instead of using set_components() method. This change requires
docutils >= 0.22.

On Oct 15, 2025 (commit yxtmxopu), the pyproject.toml requirement was
reverted from >=0.22.2 back to >=0.20.1 due to dependency conflicts with
Sphinx, BUT the code changes were NOT reverted. This left the codebase
in an inconsistent state where the code required docutils 0.22+ but the
dependency spec allowed 0.20.1.

## Changes

1. **pyproject.toml**:
   - Updated docutils requirement from >=0.20.1 to >=0.22.2
   - Removed Sphinx, sphinxext-opengraph, and furo from dev dependencies
     (they remain in requirements/docs.pip for documentation builds)
   - Rationale: Sphinx < 9.0 requires docutils < 0.22, but Sphinx >= 9.0
     requires Python >= 3.12 (conflicts with Pelican's support for Python >= 3.10)

2. **requirements/docs.pip**:
   - Added 'roman' package to fix Sphinx 7.x dependency issue

3. **pelican/tests/output/**:
   - Regenerated all expected test output files using docutils 0.22.4
   - Changes reflect new XML formatting (self-closing tags) and HTML
     formatting (whitespace handling in syntax-highlighted code blocks)

4. **regenerate_test_output.py**:
   - Added utility script for regenerating test fixtures
   - Fixed path issue where script was using wrong content directory

## Testing

- All 303 tests pass with docutils 0.22.4
- Documentation builds successfully with tox -e docs
@offbyone offbyone closed this Dec 31, 2025
@offbyone offbyone deleted the push-sqytpkqomkvr branch December 31, 2025 22:52
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.

1 participant