Skip to content

🐛 fix(soft): escape a marker's hostname in lock messages - #1090

Merged
gaborbernat merged 4 commits into
tox-dev:mainfrom
radhika1314:soft-holder-host-name-escape
Nov 20, 2026
Merged

gaborbernat merged 4 commits into
tox-dev:mainfrom
radhika1314:soft-holder-host-name-escape

Conversation

@radhika1314

@radhika1314 radhika1314 commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Timeout messages and StrictSoftFileLock.lock_path_occupant escape hostnames read from lock files so control characters cannot alter terminal output. Both preserve the ?xx escapes written since #709.

owner.hostname returns the recorded value. Use repr(owner.hostname) when printing it.

@gaborbernat
gaborbernat marked this pull request as draft November 20, 2026 15:34
@gaborbernat
gaborbernat marked this pull request as ready for review November 20, 2026 17:31
@gaborbernat
gaborbernat marked this pull request as draft November 20, 2026 20:22
@gaborbernat
gaborbernat marked this pull request as ready for review November 20, 2026 20:24
A legacy marker can record an empty hostname, which a Timeout message
rendered as "pid N on ,". It now shows the bare ? that host_name()
writes for an empty name.

host_name() and describe_host_name() share one escape helper.

The how-to says that messages escape a recorded hostname, and that
owner.hostname is the marker's raw text.
@gaborbernat
gaborbernat marked this pull request as draft November 20, 2026 20:54
@gaborbernat gaborbernat changed the title fix(soft): escape a marker's hostname in lock messages 🐛 fix(soft): escape a marker's hostname in lock messages Nov 20, 2026
@gaborbernat
gaborbernat marked this pull request as ready for review November 20, 2026 21:47
@gaborbernat
gaborbernat marked this pull request as draft November 20, 2026 22:00
@gaborbernat
gaborbernat marked this pull request as ready for review November 20, 2026 22:00
@gaborbernat
gaborbernat merged commit f09ab4d into tox-dev:main Nov 20, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants