Skip to content

Vendor LoggingFixture and make fixtures, testresources hard requirements for testing#595

Merged
jelmer merged 2 commits intotesting-cabal:masterfrom
stephenfin:fixtures-fix
Apr 21, 2026
Merged

Vendor LoggingFixture and make fixtures, testresources hard requirements for testing#595
jelmer merged 2 commits intotesting-cabal:masterfrom
stephenfin:fixtures-fix

Conversation

@stephenfin
Copy link
Copy Markdown
Contributor

@stephenfin stephenfin commented Mar 26, 2026

Split out from #593.

Note that we are not making these hard dependencies at runtime, only for the test suite (which is no longer packaged).

@jelmer
Copy link
Copy Markdown
Member

jelmer commented Mar 26, 2026

This LGTM.

ISTR the dependencies on fixtures and testresources were optional for a reason, but I can't remember what it was. Circular dependencies? @rbtcollins or @jml , do you remember?

@stephenfin
Copy link
Copy Markdown
Contributor Author

This LGTM.

ISTR the dependencies on fixtures and testresources were optional for a reason, but I can't remember what it was. Circular dependencies? @rbtcollins or @jml , do you remember?

Circular dependencies would be a valid concern historically: both fixtures and testresources depend on testtools for their own test suites. However, as I've noted, we no longer package our tests in testtools (or in fixtures for that matter, though testresources still needs to be addressed) and packaging has evolved significantly in the past 15 years, so I don't believe this is a concern any more.

@jelmer jelmer self-requested a review April 17, 2026 08:34
This was removed from fixtures recently [1]. While it has been re-added
[2], the fixture is small enough that we can just vendor it here.

A future change will make fixtures a hard requirement of our test suite,
since that's trivially doable now that we no longer package our tests.

[1] testing-cabal/fixtures#114
[2] testing-cabal/fixtures#122

Signed-off-by: Stephen Finucane <stephen@that.guru>
The tests are no longer packaged, so circular imports are less of a
concern than previously. Note that this does not affect testtools
itself, where both packages remain optional.

Signed-off-by: Stephen Finucane <stephen@that.guru>
@jelmer
Copy link
Copy Markdown
Member

jelmer commented Apr 19, 2026

If we're going to add a dependency on fixtures, any reason we can't import LoggingFixture from there?

@stephenfin
Copy link
Copy Markdown
Contributor Author

stephenfin commented Apr 21, 2026

If we're going to add a dependency on fixtures, any reason we can't import LoggingFixture from there?

No reason, beyond the fact that there are a few releases in the wild with the fixture missing (we need both testing-cabal/fixtures@53f7068 and testing-cabal/fixtures@f3f574a included to fix it), plus the fixtures.tests module we were relying on is now deprecated so we'd need a conditional import or would have to bump the minimum version of fixtures. Given all of this, it seemed easier to just vendor and continue working with all versions of fixtures

@jelmer jelmer merged commit a507df0 into testing-cabal:master Apr 21, 2026
9 checks passed
@stephenfin stephenfin deleted the fixtures-fix branch April 21, 2026 16:45
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