-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-96192: fix os.ismount() to use a path that is str or bytes #96194
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
Conversation
Co-authored-by: Eryk Sun <[email protected]> Signed-off-by: Christoph Anton Mitterer <[email protected]>
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
Hi @calestyo , Would you like to add a test for this? |
@orsenthil Well I could at least try, but two issues here:
but one cannot yield |
Without this patch, I would expect this
to fail or behavior differently than with this patch. What might I be missing? |
That I don't understand… as far as I understand it, it should have worked previously with both |
Misc/NEWS.d/next/Library/2022-08-23-03-13-18.gh-issue-96192.TJywOF.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a test that passes a bytes path-like to ismount()
?
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
Co-authored-by: Jelle Zijlstra <[email protected]> Signed-off-by: Christoph Anton Mitterer <[email protected]>
@orsenthil @JelleZijlstra … I've added a test using |
I have made the requested changes; please review again |
Thanks for making the requested changes! @JelleZijlstra: please review the changes made to this pull request. |
The tests are failing. |
Uagh... seems
but it doesn't really, but only such that use strings. Isn't that yet another bug? Anyway... I don't know how to do a proper test then. Is there any other PathLike object type in the library? The only I'd know is Any ideas? |
Oh and is a test here really worth it? The fix is trivial, should someone ever remove it, the check could also just be removed by accident as well. As I've already said above, to which noone replied,... it would IMO only make sense, if all these functions could be tested for whether they accept the right types, at once. |
The problem in your test is that
You can use
Yes, every bugfix needs an associated test. |
Co-authored-by: Jelle Zijlstra <[email protected]> Signed-off-by: Christoph Anton Mitterer <[email protected]>
thx... still fails on one platform though... no idea why |
Looks spurious, I retried it. |
Thanks @calestyo for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
GH-99455 is a backport of this pull request to the 3.11 branch. |
…ythonGH-96194) (cherry picked from commit 367f552) Co-authored-by: Christoph Anton Mitterer <[email protected]> Signed-off-by: Christoph Anton Mitterer <[email protected]> Co-authored-by: Eryk Sun <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
GH-99456 is a backport of this pull request to the 3.10 branch. |
…ythonGH-96194) (cherry picked from commit 367f552) Co-authored-by: Christoph Anton Mitterer <[email protected]> Signed-off-by: Christoph Anton Mitterer <[email protected]> Co-authored-by: Eryk Sun <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
(cherry picked from commit 367f552) Co-authored-by: Christoph Anton Mitterer <[email protected]> Signed-off-by: Christoph Anton Mitterer <[email protected]> Co-authored-by: Eryk Sun <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
…H-96194) (#99456) gh-96192: fix os.ismount() to use a path that is str or bytes (GH-96194) (cherry picked from commit 367f552) Signed-off-by: Christoph Anton Mitterer <[email protected]> Co-authored-by: Christoph Anton Mitterer <[email protected]> Co-authored-by: Eryk Sun <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Eryk Sun [email protected]
Signed-off-by: Christoph Anton Mitterer [email protected]