Skip to content

fix: cap reportlab below 5.1.0 on Python 3.9 - #48

Merged
joamag merged 1 commit into
masterfrom
fix/reportlab-python-3.9
Oct 26, 2026
Merged

joamag merged 1 commit into
masterfrom
fix/reportlab-python-3.9

Conversation

@joamag

@joamag joamag commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • reportlab 5.1.0 (released 2026-10-22) bumped __min_python_version__ to (3,10) in its __init__.py, but its package metadata still declares requires_python >=3.9. Pip on 3.9 installs it and import reportlab then raises ImportError: reportlab requires 3.10+, breaking test collection for test/node.py and test/printing/pdf.py (e.g. run 40146745150).
  • Adds a reportlab<5.1.0 range for Python 3.9 in both requirements.txt and setup.py, following the existing per-version caps, and moves the uncapped entry to >= 3.10.

Testing

Ran the CI install and ADAPTER=tiny pytest steps in containers:

Image reportlab Result
python:3.9 5.0.1 289 passed, 5 skipped
pypy:3.9 5.0.1 289 passed, 5 skipped
python:3.10 5.1.0 289 passed, 5 skipped

- reportlab 5.1.0 requires Python 3.10+ at import time
- its metadata still allows 3.9, so pip installs it there anyway
Copilot AI balanced review requested due to automatic review settings October 26, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T08:39:16.290000Z 5630b98 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@claude

claude Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Claude finished @joamag's task in 1m 45s —— View job


Review of PR #48

  • Read the diff
  • Read AGENTS.md and the files around the change
  • Check line endings, the other places reportlab is pinned, the CHANGELOG
  • Post findings

I found no bugs or regressions. There's one documentation nit, posted inline.

Findings by severity

  • Nit (docs): CHANGELOG.md:20 says "the latest reportlab release". That stops being accurate once reportlab ships another version. It should name 5.1.0 and link fix: cap reportlab below 5.1.0 on Python 3.9 #48, like the entry for the earlier caps at line 172. I left a suggestion inline.

What I checked (confidence: high)

  • Markers, requirements.txt: every Python version matches exactly one reportlab line:
    • 3.6–3.8 → <4.4.3
    • 3.9 → <5.1.0
    • 3.10+ → uncapped
    • 2.7 uses requirements.py2.txt, which this PR doesn't change.
  • Markers, setup.py: same coverage:
    • 2.7 → uncapped (the same as before)
    • 3.9 → <5.1.0
    • 3.10+ → uncapped
  • Comparing "3.9" with "3.10": these markers are compared as versions, not as text, by the pip versions this matrix uses. That includes the pip<21 of the Windows XP build on 2.7. The < "3.10" bound is safe.
  • CI coverage: the Main Workflow tests CPython 3.9 and PyPy 3.9 with pip install -r requirements.txt, so CI checks the new range. The Windows builds (3.14.8 and 2.7.18), the E2E run (3.12) and the Docker image (hivesolutions/python:latest) don't hit the 3.9 marker, so they're unaffected.
  • AGENTS.md rules:
    • The version in setup.py wasn't bumped.
    • Line endings are kept: CRLF in setup.py and requirements.txt, LF in CHANGELOG.md, as on master.
    • The entry is in the Unreleased section.
    • No Python source changed, so the black, 2.7/3.13 and comment-style rules don't apply.
  • Tests and security: this is a dependency-only change with nothing new to test, and it touches no secrets, payloads or file paths.

What I couldn't check

  • I couldn't reach PyPI from the runner, so I didn't confirm the 5.1.0 metadata (requires_python >=3.9 while the code needs 3.10) myself. I relied on the linked failing run and the test table in the PR description.
  • The Main, E2E, Windows and Docker workflows for this PR were still running when I finished. Only the Admin Workflow had finished (it passed).

@joamag joamag left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LGTM

@joamag
joamag merged commit 62cdaf3 into master Oct 26, 2026
53 of 54 checks passed
@joamag
joamag deleted the fix/reportlab-python-3.9 branch October 26, 2026 08:39
Comment thread CHANGELOG.md
### Fixed

*
* PDF support on Python 3.9 after the latest reportlab release

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit (docs): "the latest reportlab release" won't make sense once reportlab ships another version, and someone reading this later won't know which release broke 3.9. The entry for the earlier caps (line 172) names the failure and links the reference. Something like this would match it:

Suggested change
* PDF support on Python 3.9 after the latest reportlab release
* PDF generation failing on Python 3.9 with reportlab 5.1.0, which requires Python 3.10 - [#48](https://github.com/hivesolutions/colony-print/pull/48)

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.

2 participants