-
-
Notifications
You must be signed in to change notification settings - Fork 89
Skip zipp.Path when it is not a file - [merged] #203
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 @asottile on Jun 4, 2019, 22:04 added 1 commit
|
In GitLab by @codecov on Jun 4, 2019, 22:11 Codecov Report
@@ Coverage Diff @@
## master #75 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 2 2
Lines 191 194 +3
Branches 18 19 +1
=====================================
+ Hits 191 194 +3
Continue to review full report at Codecov.
|
In GitLab by @warsaw on Jun 7, 2019, 20:45 Commented on importlib_metadata/init.py line 9 I generally prefer not to import |
In GitLab by @warsaw on Jun 7, 2019, 20:47 Commented on importlib_metadata/init.py line 370 Since this is a little icky, and it's not obvious from the code why it's being done, and because it's motivated by a bug in PyPy, could you please as a comment with a reference URL? |
In GitLab by @asottile on Jun 7, 2019, 20:47 Commented on importlib_metadata/init.py line 9 afaik it's an implementation detail that |
In GitLab by @asottile on Jun 7, 2019, 20:48 Commented on importlib_metadata/init.py line 370 sure! I was hoping the contents in the PR description would be enough to link it to this change (and not clutter the code) but I can put that inline as well |
In GitLab by @asottile on Jun 7, 2019, 20:50 added 1 commit
|
In GitLab by @warsaw on Jun 7, 2019, 20:55 Commented on importlib_metadata/init.py line 9
|
In GitLab by @jaraco on Jun 7, 2019, 20:57 One reason I used the I feel like the workaround is not well-placed here. Does this change imply that every attempt to try-open a file path should first check for is_file? I don't think so, but that's what it does. If this change is to be accepted, I'd prefer for it to be more selective - to only run on PyPy versions that have the defect. What do you think about having a function in _compat that is a no-op except on affected versions... and then the Python 3.8 port could omit the call for that function, as it's not needed in the stdlib? |
In GitLab by @jaraco on Jun 7, 2019, 20:57 Commented on importlib_metadata/init.py line 9 I would agree with @asottile on this point for any module except |
In GitLab by @asottile on Jun 7, 2019, 21:00 Commented on importlib_metadata/init.py line 9 "Special cases aren't special enough to break the rules" "There should be one-- and preferably only one --obvious way to do it." (except for I'm fine changing it 😆 |
In GitLab by @asottile on Jun 7, 2019, 21:00 this one hasn't been merged yet, that's the other one ;) |
In GitLab by @asottile on Jun 7, 2019, 21:03
I don't think this should be ported to stdlib since pypy won't be using that. I also don't think this creates any race conditions, it simply pre-checks that it's a file first to prevent the warning explosion I don't think the change implies that every |
In GitLab by @warsaw on Jun 7, 2019, 21:03 D'oh! ;) |
In GitLab by @asottile on Jun 7, 2019, 21:05 Commented on importlib_metadata/init.py line 9 changed this line in version 4 of the diff |
In GitLab by @asottile on Jun 7, 2019, 21:05 added 1 commit
|
In GitLab by @warsaw on Jun 7, 2019, 21:06 Commented on importlib_metadata/init.py line 9 Yeah, that's the 20th ZoP! :) |
In GitLab by @asottile on Jun 7, 2019, 22:14 Commented on importlib_metadata/init.py line 370 changed this line in version 5 of the diff |
In GitLab by @asottile on Jun 7, 2019, 22:14 added 1 commit
|
In GitLab by @asottile on Jun 7, 2019, 22:14 I've gone ahead and gated the check to only occur in pypy on affected versions |
In GitLab by @jaraco on Jun 8, 2019, 24:32 What do you think of |
In GitLab by @asottile on Jun 8, 2019, 04:42 idk, kinda like my version more since there's less indirection and the constant better explains what is going on -- fine with that though if that's what you'd like -- another plus, my version avoids the extra function call and is 5 fewer lines 🤷 |
In GitLab by @asottile on Jun 8, 2019, 04:43 the pragma is |
In GitLab by @jaraco on Jun 9, 2019, 17:38 approved this merge request |
In GitLab by @jaraco on Jun 9, 2019, 17:38 merged |
In GitLab by @asottile on Jun 11, 2019, 16:11 Thanks! Looking forward to the 0.18 release :) |
In GitLab by @warsaw on Jun 11, 2019, 17:32 |
…tion of resources from adjacent modules, even those not found in a package. Fixes #203.
In GitLab by @asottile on Jun 4, 2019, 21:59
Merges skip_zipp_not_a_file -> master
pypy3 has a file-descriptor leak with
open('directory')
whichzipp.Path(...)
triggers. This preempts passing a directory and ticklingthat.
More information:
The text was updated successfully, but these errors were encountered: