[issue43723] Deprecate camelCase aliases from threading.py

STINNER Victor report at bugs.python.org
Tue Apr 6 10:10:00 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

Raymond Hettinger:
> I don't think there is any advantage in doing this. It will just break code that has worked for a very long time.

Do you mean code written for Python 2? Right, it's unfortunate that it became harder to write a single code base working on Python 2 and Python 2. But Python 2 had officially reached end of life in January 2020, and Python 3.0 changed threading method names 13 years ago (2008).

Deprecating and removing aliases are two different things. IMO deprecating is non-controversial, especially because DeprecationWarning is hidden by default.

Removing requires to estimate how many projects are impacted. On the top 4000 PyPI projects, I count 80 projects which still call currentThread() for example: that's significant. Example of projects: Twisted, pyuwsgi, PyQt5_sip, mod_wsgi, mercurial, lockfile, jupyterlab, gevent, etc. I didn't check if these projects call current_thread() on Python 3.

I would suggest to wait until the most popular PyPI projects no longer call deprecated methods before removing them.

I suggest to restrict the PR to deprecatation, and not plan removal yet.

----------
nosy: +vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43723>
_______________________________________


More information about the Python-bugs-list mailing list