bpo-43723: Deprecate camelCase aliases from threading (GH-25174)

The snake_case names have existed since Python 2.6, so there is
no reason to keep the old camelCase names around. One similar
method, threading.Thread.isAlive, was already removed in
Python 3.9 (bpo-37804).
This commit is contained in:
Jelle Zijlstra 2021-04-12 01:42:53 -07:00 committed by GitHub
parent cc2ffcdfd7
commit 9825bdfbd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 159 additions and 20 deletions

View file

@ -319,11 +319,11 @@ Here's a trivial example::
try:
arg = q.get(block=False)
except queue.Empty:
print('Worker', threading.currentThread(), end=' ')
print('Worker', threading.current_thread(), end=' ')
print('queue empty')
break
else:
print('Worker', threading.currentThread(), end=' ')
print('Worker', threading.current_thread(), end=' ')
print('running with argument', arg)
time.sleep(0.5)