Skip to content

Remove stopit imports, references, and dependency#1391

Open
reevesc7 wants to merge 1 commit intoEpistasisLab:mainfrom
reevesc7:remove-stopit
Open

Remove stopit imports, references, and dependency#1391
reevesc7 wants to merge 1 commit intoEpistasisLab:mainfrom
reevesc7:remove-stopit

Conversation

@reevesc7
Copy link

@reevesc7 reevesc7 commented Mar 6, 2026

What does this PR do?

This PR removes stopit as a dependency and all (non-archived) references to it.

Removed code references include tpot.utils.eval_utils.optimize_objective() and tpot.utils.eval_utils.parallel_optimize_objective().

Where should the reviewer start?

  • Altered code: tpot/utils/eval_utils.py
  • Altered dependencies: pyproject.toml
  • Altered reported dependencies: README.md

How should this PR be tested?

A fresh install and standard tests may be appropriate to validate that the dependencies resolve properly.

The removed references to stopit were not referenced anywhere else within TPOT, but their removal would cause incompatibilities with any external scripts calling tpot.utils.eval_utils.optimize_objective() or tpot.utils.eval_utils.parallel_optimize_objective().
...Maybe a deprecation warning would be appropriate, but as I describe below, there was already a deprecation warning being printed related to these functions.

Any background context you want to provide?

stopit imports pkg_resources, which was deprecated and is now removed.
For some time, pkg_resources printed a deprecation warning stating that the module would be removed in the near future.
That future has come, and now fresh installations may no longer function due to stopit still attempting to import pkg_resources.
In fact, I discovered that pkg_resources has been removed when freshly installing TPOT to make a different pull request.

Unfortunately, stopit is no longer maintained.
The last update to its repository occurred 3 years ago.
The fix for the pkg_resources issue is simple, and the stopit repository has the fix waiting in a pull request.
However, the request has remained open for a year and a half.

Given that stopit is unlikely to regain functionality in the near future and that the TPOT internals do not utilize the module, I figured it would be best to remove the dependency.

Alternatively, spraakbanken/stopit2 is a fork of stopit which implements the pkg_resources fix.
If maintainers desire to keep stopit-like functionality within TPOT, stopit2 may be a fitting choice.

What are the relevant issues?

None that I found during a quick search.

Questions:

  • Do the docs need to be updated? No, they do not mention stopit
  • Does this PR add new (Python) dependencies? No, but it removes a dependency

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