#5456·OctoPrint

[Task] replace use of `os.path.*` with use of `pathlib` where it makes sense

Author: fooselCreated Sep 22, 2026Updated Sep 22, 2026
Labelstask

The task

There's still a ton of manual path joining with os.path.join, existence checks etc going on all across OctoPrint's code base.

It would make a ton of sense to switch to the use of pathlib where it makes sense, as that allows for a much nicer API for path management.

pathlib is available from Python 3.4 onward.

Verification

  • I'm a maintainer or collaborator of OctoPrint and allowed to use this issue type