Repository navigation
DependencyTable: requirements are resolved by pyTooling's Resolver - #62
Merged
Merged
Conversation
pyTooling 10.0.0rc4 ships 'pyTooling.Dependency.Resolver'; the directive's own resolution goes: 'DependencyCollector.Project'/'Details' and their caches, '_PublishedRequirements', '_SelectRelease', and the depth and cycle handling of the dependency trees. A table resolves its requirements with the strategy 'Eager' and its ':depth:' as the limit, so every level is downloaded in parallel before rendering; the rows and trees render the 'ResolvedRequirement's - 'Cycle' is left out, 'LimitReached' becomes the limit marker. A package entrypoint asks 'Resolver.ResolvePackages' with limit 0. All tables share the collector's 'PythonPackageIndex', which keeps what it downloaded. 'ResolutionCount' replaces 'RequestCount', as requests are no longer counted one by one. An 'UnknownLicenseWarning' naming its project (pyTooling/pyTooling#608) is recorded by 'ProjectName'; one that doesn't - pyTooling 10.0.0rc4 - is reported as a Sphinx warning with its notes. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | -23 |
| Duplication | 2 |
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.
Merged
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #62 +/- ##
==========================================
+ Coverage 85.46% 85.51% +0.04%
==========================================
Files 24 24
Lines 4886 4854 -32
Branches 786 776 -10
==========================================
- Hits 4176 4151 -25
+ Misses 598 594 -4
+ Partials 112 109 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Oct 20, 2026
Merged
…ound. rc5 is on PyPI, so the floor rises to it and the getattr fallback and the test's warning subclass are no longer needed. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
dependency-tabledirective resolved requirements with its own code; pyTooling v10.0.0-rc4 shipspyTooling.Dependency.Resolver, which does the same - in parallel per level, with statuses for what couldn't be resolved. The directive now renders what the resolver returns.Changes
pyTooling.Sphinx.DependencyTable:Resolver(index, strategy=ResolutionStrategy.Eager, limit=...)::depth:is the resolver's limit (0, the default, is unlimited), and every level is downloaded in parallel before the table is rendered. Rows and trees render theResolvedRequirements: a dependency closing a cycle (ResolutionStatus.Cycle) isn't listed, dependencies below the limit (LimitReached) become the marker … N more dependencies not expanded, and a requirement not resolved to a release (unknown project, no matching release, undescribed release, index failure) shows not evaluated, as before.pyTooling[pypi]listsaiohttp,packagingandrequests, where it listed none.{"package": "pyTooling[yaml]"}) is read withResolver.ResolvePackages; an unknown package, a package without a release and an unknown extra are reported with pyTooling's messages, the known extras included.DependencyCollector: newResolve(requirements, limit)andPublishedRequirements(packages);Project(),Details()and their caches are removed - the sharedPythonPackageIndexkeeps every project and release it downloaded.ResolutionCountreplacesRequestCount: the stopwatch measures each resolution, as the requests are no longer sent one by one. The build's final log line says N resolution(s) against the package index.UnknownLicenseWarningnaming its project (ProjectName, Dependency: release warnings carry the project name and version pyTooling#608) is recorded inUnresolvedLicenses; every other warning is a Sphinx warning, as before._OneLevelDown,_PublishedRequirements,_SelectRelease. New:_SelectedRelease,DependencyTable._Dependencies.Bug Fixes
pyTooling.Sphinx.DependencyTable: a tree could show the requirements of an old release instead of the newest matching one. In a build of the tablesrequirements.txtandpyTooling[pypi],aiohttp ≥3.12was listed withchardetandidna-ssl(aiohttp 3.7's requirements) and caused a license-override report forchardet; it now lists aiohttp 3.14.5'saiohappyeyeballs,aiosignal,frozenlist,propcache, ... The cause in the removed code wasn't traced.Documentation
doc/News.rst: entry under v0.1.0.Unit Tests
tests/unit/DependencyTable.py:Resolved,Cycle,LimitReached) instead of a table faking_SelectRelease; new Not resolved.DependencyCollector._ReportWarnings: two spellings are one entry; a warning without a project name is logged; a broken requirement and a critical warning are logged.dev.requirements.txtwith:depth: 2,pyTooling[pypi]) renders the same rows as before except the two changes above; 2.8 s instead of 4.8 s.Others
requirements.txt:pyTooling[pypi] >= 10.0.0rc5(was rc4), forUnknownLicenseWarning.ProjectName.Related Issues and Pull-Requests
pyTooling.Dependency.Resolver, in pyTooling v10.0.0-rc4.UnknownLicenseWarning.ProjectName, in pyTooling v10.0.0-rc5.