-
Notifications
You must be signed in to change notification settings - Fork 4
Description
In testing some cgap-portal code under github actions, I saw this DeprecationWarning:
/home/runner/.cache/pypoetry/virtualenvs/encoded-e-hjmLy7-py3.6/lib/python3.6/site-packages/subprocess_middleware/worker.py:124: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
log.warn('Retrying: %r\n%s', e, errout)
The file https://github.com/lrowe/subprocess_middleware/blob/master/src/subprocess_middleware/worker.py#L124 does indeed appear to have a call to log.warn that should presumably be log.warning, according to logging doc, which says (in the entry for logging.warning:
Note: There is an obsolete function
warnwhich is functionally identical towarning. Aswarnis deprecated, please do not use it - usewarninginstead.
I didn't test such a fix, but I did check that indeed logging.warning exists in Python 2.7. I'm using Python 3.6 and it's there as well. I can't speak to Python 3.4, but I imagine it's there. It looks like you're better set up to test this properly, but it sounds like a safe substitution to me.