FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

readers: add MultiplexedPath.paths by FFY00 · Pull Request #310 · python/importlib_resources · GitHub

Repository navigation

readers: add MultiplexedPath.paths - #310

Open
FFY00 wants to merge 1 commit into
python:mainfrom
FFY00:expose-multiplexedpath-paths
Open

FFY00 wants to merge 1 commit into
python:mainfrom
FFY00:expose-multiplexedpath-paths

Conversation

FFY00 commented May 28, 2024 •
edited
Loading

Copy link
Copy Markdown
Member

Fixes #309

Signed-off-by: Filipe Laíns <lains@riseup.net>

FFY00 commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

@jaraco what do you think of this?

jaraco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Seems reasonable to me. We should add some tests to ensure the use-case is covered. And should we include type annotations?


@property
def paths(self):
return self._paths.copy()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If we type-annotate this property to be a non-mutable Sequence, and because self._paths is not mutated internally (also treated like a non-mutable Sequence), there's no need to make a copy. But I'm okay either way.

jaraco commented Apr 12, 2026

Copy link
Copy Markdown
Member

@FFY00 - do you still want to pursue this change? At this stage, I think type annotations would be preferred.

henryiii added a commit to scikit-build/scikit-build-core that referenced this pull request Sep 16, 2026
Add a public `paths` attribute to every loader the editable finders hand
out, listing the package's search locations (its `__path__` entries) so a
package can find the CMake install tree at runtime. Add a matching
read-only `paths` property to `_SkbuildMultiplexedPath`, mirroring
python/importlib_resources#310.

Addresses the second part of #1565.

Assisted-by: ClaudeCode:claude-fable-5-1
henryiii added a commit to scikit-build/scikit-build-core that referenced this pull request Sep 17, 2026
* feat(editable): expose search paths on redirect loaders

Add a public `paths` attribute to every loader the editable finders hand
out, listing the package's search locations (its `__path__` entries) so a
package can find the CMake install tree at runtime. Add a matching
read-only `paths` property to `_SkbuildMultiplexedPath`, mirroring
python/importlib_resources#310.

Addresses the second part of #1565.

Assisted-by: ClaudeCode:claude-fable-5-1

* Apply suggestion from @henryiii

* docs: use pathlib over os.path in editable docs

Assisted-by: opencode:NRP/deepseek-v4-flash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Expose base paths of MultiplexedPath

2 participants


Back | FazBrowse Home | New Git URL