gunicorn
gunicorn copied to clipboard
Python 3.4+: use os.set_inheritable + os.set_blocking in place of unreadable fcntl calls
We should cleanup those rather unreadable low-level fcntl calls. The stdlib provides single-call functions for these now.
(Replacement is not 100% equivalent, as they might call ioctl(.., FIO.., NULL)
instead, but I see no reason we should care.)
- Fixes: #2742
- Related: #1170
Suggested order:
- Merge #3211 before this one
- Merge before #3127 - alternatively verify
.fileno()
suffixes that might to be dropped
Not disagreeing about this change but this must be validated on BSD. I think we need to add FreeBSD to our test platform to ensure it works there. (an dmaybe other OpenBSD).
@benoitc Happy with pulling Neil Pang's vm images?
Those work with very little setup required for FreeBSD, OpenBSD and illumos (no prebuilt gevent though). Though the Github file still needs review by someone more proficient with that:
- I did not know how to express "whatever python3 version you usually do" on those images
- I did not know if/how mixing GitHub CI secrets with running arbitrary untrusted code in another CI workflow can be done safely.
-
The actual test I meant to run did not run on those systems yet (thats what the- my current nginx test does not produce very nice messages when failings
intests/test_nginx.py s
indicates) - afaict, OmniOS does not ship gevent, so setup including compilation
is rather slow/does not work because libev believes it is on linux and tries to prepare for the existingneeds some autoconf override in the CI workflowinotify.h
with two-argumentstatfs()