gunicorn
gunicorn copied to clipboard
CI: Pylint 3.x
Included:
- pylint 3.0.0 workarounds (because 3.x is what we want for Python 3.12)
- removing references to ancient Debian releases (updating which is not helpful as long as the versions distributed remain the same)
Removed:
- everything already merged in https://github.com/benoitc/gunicorn/pull/3131
Not included:
- Arbiter.SIG_NAMES (stdlib since 3.5 provides signal.Signals Enum) and related comments
Suggested order: Merge https://github.com/benoitc/gunicorn/pull/3148 or equivalent first, possibly eradicating the identifier clash in a simpler manner.
This branch has git conflicts that must be resolved
@pajod I'm happy to review the linting-related changes in this PR or separate, your choice. Let's just get the pypy version fixed up and I think we're good to go.
Is there a timeline when this will be merged?
@tilgovi Care to give this another look? Updated a bit after extracting #3131 into a separate PR.
@pajod why a change to the reloadedr is part of this change?
@benoitc 2nd attempt for comment marked "outdated" above. I want newer pylint versions to stop suggesting that inotify might be undefined in the separate conditional, without suppressing that (generally useful!) detection too much:
gunicorn/reloader.py:69:22: E0601: Using variable 'inotify' before assignment (used-before-assignment)
gunicorn/reloader.py:79:28: E0606: Possibly using variable 'Inotify' before assignment (possibly-used-before-assignment)
The previous version you commented on moved the alternate reloader implementation to an extra file, so the imports are seen as unconditional (within that file) to static analysis.
Most recent rebased version is the simple solution without extra file again by duplicating the import: much smaller diff for typically similar cost.
To fix those two pylint errors, you can change
https://github.com/benoitc/gunicorn/blob/7268a610996eee15e328fce3daf8bf8e748f1627/gunicorn/reloader.py#L63
to read
inotify = None