Replacement for `com.jetbrains.python.testing.pyTestFixtures` recently marked internal

I develop the pytest imp plugin, which, among other features, provides proper fixture references from all the scope pytest supports (e.g. outer classes, conftest.py files, plugins from installed packages, plugins listed in config file, plugins declared in root pytest_plugins list, etc). To ensure pytest imp merely adds new functionality (and avoids altering/interfering with existing behaviour), utils and classes from the com.jetbrains.python.testing.pyTestFixtures have been used for its entire 5-year life.

For some reason I don’t understand, the entire com.jetbrains.python.testing.pyTestFixtures package has been marked @ApiStatus.Internal. It’s one of only two such annotations in com.jetbrains.python.testing, and the other is a util method on a doctest run config class (com.jetbrains.python.testing.doctest.PythonDocTestRunConfiguration#createTargetEnvFunction).

Without access to, at the very least, the PyTestFixtureReference class (to perform identity checks on element references), I must either cripple the plugin’s ability to provide fixture lookups/metadata (such as typing); or unload PyCharm’s built-in pytest fixture extensions to replace with only the plugin’s functionality. I would like to avoid the latter (so users actually do get the latest and greatest when they upgrade PyCharm), but I also can’t push a crippled update.

Can someone illuminate the reasoning behind marking *.pyTestFixtures internal? Is there any replacement for using the PyTestFixtureReference class?

Thanks

1 Like

Hello,

We are trying to close all symbols that were never intended to be a public API, but this one can, of course, be opened.
I will push the fix to the master and 251 branch soon.

Ilya.