Skip to content

Re-add removed helpers#566

Open
stephenfin wants to merge 3 commits intotesting-cabal:masterfrom
stephenfin:restore-compat-helpers
Open

Re-add removed helpers#566
stephenfin wants to merge 3 commits intotesting-cabal:masterfrom
stephenfin:restore-compat-helpers

Conversation

@stephenfin
Copy link
Contributor

@stephenfin stephenfin commented Feb 17, 2026

These were dropped in 7d62575 and a21157f but that should have resulted in a major release since it was an API break. Re-add them temporarily until we release a v3.0.0.

We also add a testtools.matchers.test module to allow end-users to continue using the test harness previously found in testtools.tests.matches.helpers.

@stephenfin
Copy link
Contributor Author

Example breakage mtreinish/stestr#377

@stephenfin stephenfin force-pushed the restore-compat-helpers branch from 26e7ac7 to 81db8ab Compare February 17, 2026 16:27
@stephenfin
Copy link
Contributor Author

I think this should form part of v2.7.4. To be clear, I'm happy to remove these things but we shouldn't do it in a patch release (so let's wait for v2.8.0)

@stephenfin stephenfin changed the title Re-add removed compat helpers Re-add removed helpers Feb 17, 2026
These were dropped in 7d62575
but that should have resulted in a major release since it was
an API break. Re-add them temporarily until we release a v3.0.0.

Signed-off-by: Stephen Finucane <stephen@that.guru>
These are part of our public API and should not be removed in a patch
release. We do however deprecate them and skip type checks.

Signed-off-by: Stephen Finucane <stephen@that.guru>
@stephenfin stephenfin force-pushed the restore-compat-helpers branch from 10c7d9d to 6953ff2 Compare February 17, 2026 17:08
@stephenfin
Copy link
Contributor Author

I've also re-added the testtools.tests.helpers and testttools.tests.matchers.helpers modules since these are part of the public API. For example, https://github.com/openstack/nova uses them and we see failures with the new version:

tox -e py312

...

=========================
Failures during discovery
=========================
--- stdout ---
2026-02-17 13:47:10.028 6902 INFO oslo_service.periodic_task [None req-6b3a82ef-6878-4ae2-a366-241b49fc5782 - - - - - -] Skipping periodic task _heal_instance_info_cache because its interval is negative
2026-02-17 13:47:13.329 6902 INFO oslo_service.periodic_task [None req-b193b0d3-16cf-4d1b-ab26-c776549c4fe5 fake_user 6a6a9c9eee154e9cb8cec487b98d36ab - - - -] Skipping periodic task _discover_hosts_in_cells because its interval is negative
2026-02-17 13:47:13.462 6902 ERROR stevedore.extension [None req-b193b0d3-16cf-4d1b-ab26-c776549c4fe5 fake_user 6a6a9c9eee154e9cb8cec487b98d36ab - - - -] Could not load 'oslo_cache.memcache_pool': No module named 'memcache': ModuleNotFoundError: No module named 'memcache'
--- import errors ---
Failed to import test module: nova.tests.unit.test_matchers
Traceback (most recent call last):
  File "/usr/lib/python3.12/unittest/loader.py", line 394, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/unittest/loader.py", line 337, in _get_module_from_name
    __import__(name)
  File "/home/zuul/src/opendev.org/openstack/nova/nova/tests/unit/test_matchers.py", line 18, in <module>
    from testtools.tests.matchers import helpers
ModuleNotFoundError: No module named 'testtools.tests'

End users can provide their own matchers. It is helpful
to provide a test harness for them to use to test this.

Signed-off-by: Stephen Finucane <stephen@that.guru>
@stephenfin stephenfin requested a review from jelmer February 17, 2026 18:26
github-merge-queue bot pushed a commit to qiskit-community/qiskit-experiments that referenced this pull request Feb 18, 2026
tox 4.36.0 started enforcing the constraint that a `package_env`
environment only installs what is listed in `build-system.requires`. We
use `pypa/build` to build the wheel from the sdist instead of building
the wheel directly. `pypa/build` is used as an external command so it
was not listed in `build-system/requires` and was just listed as an
extra tox environment dependency. Now listing an extra dependency is not
allowed so we install `pypa/build` in the packaging environment's
commands until a cleaner solution is found.

See tox-dev/tox#3687 (comment)

Additionally:

* A pylint disable comment was added to `numpy.finfo.eps` since 
  this was also needed for the CI to pass.
* testtools 2.8.3 was excluded from the test dependencies to avoid
  incompatibility with stestr. The hope is the next release of stestr or
  testtools will address the incompatibility. See:
  testing-cabal/testtools#566
github-merge-queue bot pushed a commit to qiskit-community/qiskit-experiments that referenced this pull request Feb 18, 2026
This change started as a fix for a change in behavior in tox but evolved
into
a set of three unrelated small fixes that are all needed to get the CI
to pass
again:

* Set a minimum version for `tox` of 4.38.0 so that we pick up
  tox-dev/tox#3730 which addresses
  tox-dev/tox#3687 (comment).
Additionally, `tox-uv` is added as a tox dependency for consistency
since
that is used in CI (but actually set it to !=4.36,!=4.37 since 4.38.0
requires
  Python >=3.10 and this change is a precursor to the one that drops
  Python 3.9).
* A pylint disable comment was added to `numpy.finfo.eps` since 
  this was also needed for the CI to pass.
* testtools 2.8.3 was excluded from the test dependencies to avoid
  incompatibility with stestr. The hope is the next release of stestr or
  testtools will address the incompatibility. See:
  testing-cabal/testtools#566
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

Comments