Skip to content

Conversation

@p1c2u
Copy link
Owner

@p1c2u p1c2u commented Feb 2, 2026

This pull request makes significant improvements to the pathable library, focusing on enhancing its usability, documentation, and compatibility with Python's pathlib interface. The most important changes are the addition of FilesystemPath for filesystem traversal, major enhancements to the BasePath API to mimic pathlib, improved documentation and examples in README.md, and expanded test coverage for the new and updated features.

API and Feature Enhancements:

  • Added FilesystemPath class for traversing filesystem objects, with a from_path constructor and integration with the new PathAccessor. (F27fb04cL352, [1] [2]
  • Extended BasePath with many pathlib-like methods and properties, including name, parent, parents, suffix, suffixes, stem, with_name, with_suffix, as_posix, __fspath__, is_relative_to, and relative_to, for more intuitive and flexible path manipulations.
  • Improved the AccessorPath and LookupPath APIs with new stat() and open() methods for retrieving metadata and context-managed value access, as well as a public from_lookup constructor for LookupPath.

Documentation Improvements:

  • Rewrote and expanded the README.md with clearer descriptions, a new quickstart, usage examples, filesystem usage, and explanations of core concepts and compatibility.

Testing and Compatibility:

  • Added comprehensive new tests for the extended BasePath and AccessorPath APIs, including pathlib-like behavior, context management, stat functionality, and correct preservation of accessors across operations.
  • Fixed a minor bug in the test suite regarding separator usage.

Internal Refactoring:

  • Refactored internal methods to ensure state is preserved when creating new path instances, supporting the new API surface and compatibility with accessors. [1] [2]

These changes collectively make pathable more powerful, user-friendly, and compatible with familiar Python path-handling idioms.

@p1c2u p1c2u closed this Feb 11, 2026
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