bpo-41056: Use the fildes converter for fd to please Coverity.#21011
bpo-41056: Use the fildes converter for fd to please Coverity.#21011miss-islington merged 2 commits into
Conversation
there are a bunch of other fd: int uses in this file, I expect many if not all of them would be better off using the fildes converter. This particular one was flagged by Coverity as it presumably flags fpathconf as not accepting negative fds. I'd expect the other fd's to have been flagged as well otherwise.
|
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
Sorry, something went wrong.
|
Sorry, @gpshead, I could not cleanly backport this to |
Sorry, something went wrong.
|
Sorry @gpshead, I had trouble checking out the |
Sorry, something went wrong.
|
@gpshead Coverity is generally very picky when it comes to negative ints in file functions. I tend to flag them as invalid because they are harmless and Coverity does not understand our safe guards. |
Sorry, something went wrong.
|
Using the
I think it is a new feature, and therefore it should not be backported. Before merging it we perhaps need to add support of objects with the You can just add an explicit check for negative |
Sorry, something went wrong.
|
I'm wondering why anyone would ever pass an object with an anyways agreed about not backporting; this wasn't a major bug given it is the os module. |
Sorry, something went wrong.
|
Would you mind to add to the NEWS entry that |
Sorry, something went wrong.
…nGH-21011) There are a bunch of other fd: int uses in this file, I expect many if not all of them would be better off using the fildes converter. This particular one was flagged by Coverity as it presumably flags fpathconf as not accepting negative fds. I'd expect the other fd's to have been flagged as well otherwise. I'm marking this one as skip news as it really is a no-op.
There are a bunch of other fd: int uses in this file, I expect many if not
all of them would be better off using the fildes converter. This particular
one was flagged by Coverity as it presumably flags fpathconf as not accepting
negative fds. I'd expect the other fd's to have been flagged as well
otherwise.
I'm marking this one as skip news as it really is a no-op.
https://bugs.python.org/issue41056
Automerge-Triggered-By: @tiran