Skip to content

Conversation

@oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Nov 12, 2025

  • Resolves Python warnings about unclosed sockets and contexts.
  • Particularly important for commands which repeatably open clients such as cylc scan --ping and cylc gui.

To see the warning for yourself, try:

$ PYTHONWARNINGS=all cylc scan --ping # with at least one workflow running

It is possible that this may be a memory leak for Cylc GUI / Tui processes, although I can't confirm that, tracemalloc did identify some zmq entries during investigation of cylc/cylc-uiserver#732, so it's possible.

I'm uncertain over whether this should go into a bugfix or not. It is a bugfix, however, it's not clear if this is causing issues ATM and the diff has the potential to cause issues if not tested thoroughly.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

* Resolves Python warnings about unclosed sockets and contexts.
* Particularly important for commands which repeatably open clients such
  as `cylc scan --ping` and `cylc gui`.
@oliver-sanders oliver-sanders added this to the 8.7.0 milestone Nov 12, 2025
@oliver-sanders oliver-sanders self-assigned this Nov 12, 2025
@dwsutherland dwsutherland self-requested a review November 13, 2025 04:11
Copy link
Member

@dwsutherland dwsutherland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

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