Skip to content

DependencyTable: warnings from loading a project are reported, not raised - #52

Merged
Paebbels merged 3 commits into
devfrom
claude/collect-project-warnings
Oct 18, 2026
Merged

Paebbels merged 3 commits into
devfrom
claude/collect-project-warnings

Conversation

@pytooling-claude

@pytooling-claude pytooling-claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

pyTooling will report a release whose version its parser can't read (pytz' 2004d … 2013d) as a critical UnsupportedVersionWarning instead of printing it (pyTooling/pyTooling#581). DependencyCollector.Project downloads a project without a WarningCollector, so that warning would escalate to UnhandledCriticalWarningError and abort the documentation build for any table reaching such a package.

Bug Fixes

  • DependencyCollector.Project collects what PythonPackageIndex.DownloadProject reports and logs each warning as a Sphinx warning ([dependency-table] ..., notes on their own lines), as Details already does for a release. The project is still returned.
  • Works with pyTooling 10.0.0rc2 (which prints, nothing is collected) and with the change, so this can merge first.

Unit Tests

  • tests/unit/DependencyTable.py: new testsuite Reporting project warnings - an index whose project download reports a critical warning; the project is returned and the warning logged once. Fails without the fix (UnhandledCriticalWarningError).
  • 425 passed against pyTooling dev and against the pyTooling branch.

Related Issues and Pull-Requests

…ised.

- 'DependencyCollector.Project' collects what 'DownloadProject' reports with a 'WarningCollector' and logs each warning
  as a Sphinx warning, as 'Details' does for a release.
- pyTooling will report a release whose version can't be parsed (e.g. pytz' '2004d') as a critical warning instead of
  printing it; without a collector, the Sphinx build would abort.
- Test: an index whose project download reports a critical warning; the project is returned, the warning logged once.

Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
@codacy-production

codacy-production Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.12%. Comparing base (8194a39) to head (76b7761).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #52      +/-   ##
==========================================
+ Coverage   84.89%   85.12%   +0.23%     
==========================================
  Files          24       24              
  Lines        4879     4882       +3     
  Branches      785      786       +1     
==========================================
+ Hits         4142     4156      +14     
+ Misses        626      613      -13     
- Partials      111      113       +2     
Flag Coverage Δ
unittests 85.12% <100.00%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Comment thread pyTooling/Sphinx/DependencyTable.py Resolved
Applies the review suggestion: the separate declaration 'project: Nullable[Project]' above the 'with' block is folded
into the first assignment inside the 'try' block.

Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
@pytooling-claude
pytooling-claude Bot requested a review from Paebbels October 18, 2026 00:08
Same as for 'project' in the previous commit: the separate declaration 'values: tuple[str, ...]' in 'readEntrypoints'
is folded into the first assignment.

Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
@Paebbels
Paebbels merged commit a8d753b into dev Oct 18, 2026
26 of 41 checks passed
@Paebbels
Paebbels deleted the claude/collect-project-warnings branch October 18, 2026 00:28
@pytooling-claude pytooling-claude Bot mentioned this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants