gh-96192: fix os.ismount() to use a path that is str or bytes#96194
gh-96192: fix os.ismount() to use a path that is str or bytes#96194JelleZijlstra merged 3 commits intopython:mainfrom calestyo:fix-path-in-os.ismount
Conversation
Co-authored-by: Eryk Sun <eryksun@gmail.com> Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
|
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
JelleZijlstra
left a comment
There was a problem hiding this comment.
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 <jelle.zijlstra@gmail.com> Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
@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 <jelle.zijlstra@gmail.com> Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
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 <calestyo@scientia.org> Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
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 <calestyo@scientia.org> Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 367f552) Co-authored-by: Christoph Anton Mitterer <calestyo@scientia.org> Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…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 <mail@christoph.anton.mitterer.name> Co-authored-by: Christoph Anton Mitterer <calestyo@scientia.org> Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Eryk Sun eryksun@gmail.com
Signed-off-by: Christoph Anton Mitterer mail@christoph.anton.mitterer.name