gunicorn icon indicating copy to clipboard operation
gunicorn copied to clipboard

CI: Pylint 3.x

Open pajod opened this issue 1 year ago • 7 comments

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.

pajod avatar Dec 08 '23 01:12 pajod

This branch has git conflicts that must be resolved

cclauss avatar Dec 28 '23 08:12 cclauss

@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.

tilgovi avatar Dec 28 '23 09:12 tilgovi

Is there a timeline when this will be merged?

iM-GeeKy avatar Jan 14 '24 15:01 iM-GeeKy

@tilgovi Care to give this another look? Updated a bit after extracting #3131 into a separate PR.

pajod avatar Aug 07 '24 17:08 pajod

@pajod why a change to the reloadedr is part of this change?

benoitc avatar Aug 10 '24 08:08 benoitc

@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.

pajod avatar Aug 12 '24 15:08 pajod

To fix those two pylint errors, you can change https://github.com/benoitc/gunicorn/blob/7268a610996eee15e328fce3daf8bf8e748f1627/gunicorn/reloader.py#L63 to read inotify = None

cclauss avatar Aug 12 '24 16:08 cclauss