-
-
Notifications
You must be signed in to change notification settings - Fork 49
Introduce the 'tree' module to allow traversal of packages for resources in namespace packages - [merged] #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In GitLab by @jaraco on May 29, 2019, 14:09 I'll try to spend a few hours on this in the next two days. |
In GitLab by @jaraco on May 29, 2019, 18:00 So the reason the Python 2 code is failing is because I never applied the changes for _py3 to _py2. :( 2020 can't come fast enough. |
In GitLab by @jaraco on May 30, 2019, 09:28 After reviewing the code, I'm surprised that the Python 2 functionality was affected, as only the _py3 module was changed. The only file implicated in the Python 2 behavior was the test fixture - a zip file with folder entries, but with zipp 0.4 and later, those aren't necessary, so I've removed those and now the Python 2 tests pass again. It's not a proper fix, but it should at least establish a baseline functionality for the Python 3 code. @warsaw How do you feel about releasing this functionality for Python 3 only. Python 2 keeps the old implementation? |
In GitLab by @jaraco on May 30, 2019, 09:29 added 9 commits
|
In GitLab by @codecov on May 30, 2019, 09:33 Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
=======================================
Coverage ? 100%
=======================================
Files ? 2
Lines ? 147
Branches ? 12
=======================================
Hits ? 147
Misses ? 0
Partials ? 0
Continue to review full report at Codecov.
|
In GitLab by @jaraco on May 30, 2019, 09:48 I just re-read #68. I'm glad I documented my thoughts there because I'd forgotten what remains to be done:
The first task is a big one, and the first two are what are needed to get to a feature for |
In GitLab by @jaraco on May 31, 2019, 10:39 added 1 commit
|
In GitLab by @jaraco on May 31, 2019, 10:51 (nevermind, found solution in bfaee17) @warsaw, do you have any idea why the tests are failing here? Error message is:
But this sort of import technique is used in Any idea what accounts for the difference? |
In GitLab by @jaraco on May 31, 2019, 12:00 Additionally, something I want to do:
|
In GitLab by @jaraco on Jun 2, 2019, 10:49 As you can see, in this last commit, I've started work on having path rely on the The test |
In GitLab by @jaraco on Jun 2, 2019, 11:40 I estimate there's only a small chance I'm going to have this work done today. |
In GitLab by @jaraco on Jun 2, 2019, 12:16 As implemented in this latest commit, the "new, public API" for retrieving Path objects is More importantly, I have a new concern. As I've been working on the port for I'm beginning to think now that what is needed is a |
In GitLab by @jaraco on Jan 16, 2020, 19:18 added 15 commits
|
In GitLab by @jaraco on Jan 17, 2020, 20:37 unmarked as a Work In Progress |
In GitLab by @jaraco on Jan 18, 2020, 10:37 added 7 commits
|
In GitLab by @jaraco on Feb 14, 2020, 08:47 I'd like to proceed with merging this change as proposed and iterate from there. If no objection, I'll plan to do that Sunday. |
In GitLab by @warsaw on Feb 14, 2020, 17:41 Commented on importlib_resources/trees.py line 48
|
In GitLab by @warsaw on Feb 14, 2020, 17:41 Commented on importlib_resources/trees.py line 18 I guess |
In GitLab by @warsaw on Feb 14, 2020, 17:42 LGTM, with some comments. |
In GitLab by @jaraco on Feb 14, 2020, 19:09 Commented on importlib_resources/trees.py line 18
|
In GitLab by @jaraco on Feb 14, 2020, 19:34 Commented on importlib_resources/trees.py line 48
|
In GitLab by @jaraco on Feb 14, 2020, 19:34 resolved all threads |
In GitLab by @jaraco on Feb 16, 2020, 13:40 Today, I decided to update the documentation to reflect a preference for this new
However, this new This creates an awkward deviation of behavior. If you want to support packages that are hosted by arbitrary loaders, you need to use the old API, but if you want to support package resources not directly contained by a package, you need to use the I'd like for this new I don't think this issue can be addressed in short order, so here's what I'm going to recommend:
Thoughts? |
In GitLab by @jaraco on Feb 17, 2020, 09:10 added 2 commits |
In GitLab by @jaraco on Feb 17, 2020, 09:10 I believe this updated documentation and implementation are the best available and we need to get these changes in to keep the ball rolling. |
In GitLab by @jaraco on Feb 17, 2020, 09:12 canceled the automatic merge |
In GitLab by @jaraco on Feb 17, 2020, 09:14 merged |
In GitLab by @warsaw on Feb 17, 2020, 13:50
I guess my question is, will it be possible for people to customize and extend the package resource loading mechanism, and if so, how? If we got that wrong, so be it. But I think the basic concept of extensibility, allowing other systems to play along, is important to keep. For example, how would something like PyOxidizer support resource loading in sub-non-package directories? |
In GitLab by @jaraco on Feb 17, 2020, 14:39
Good question. I think we'll want to ask loaders to implement a new interface to supersede the
I called the method |
In GitLab by @warsaw on Feb 17, 2020, 14:45 Yes, something like that. Have to think about whether |
In GitLab by @jaraco on May 6, 2019, 15:55
Merges feature/traversable -> master
Ref #68. May also address #58.
The text was updated successfully, but these errors were encountered: