summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2022-04-25 10:56:57 -0400
committerJeff Forcier <jeff@bitprophet.org>2022-04-25 10:56:57 -0400
commitf2b4be883adad4cb80a39312cf45a6d3248432a6 (patch)
tree3e75d83a6009066a911faf69eca465758949a837
parentf325261699a1989d7aef1a62e3b3dab96f25d237 (diff)
parent5540514928474956c25936ab48f7fa0b59755bb1 (diff)
Merge branch '2.10'
-rw-r--r--paramiko/buffered_pipe.py4
-rw-r--r--paramiko/channel.py4
-rw-r--r--paramiko/sftp_file.py2
-rw-r--r--paramiko/transport.py2
-rw-r--r--sites/www/changelog.rst5
-rw-r--r--tests/loop.py2
-rw-r--r--tests/test_transport.py4
7 files changed, 14 insertions, 9 deletions
diff --git a/paramiko/buffered_pipe.py b/paramiko/buffered_pipe.py
index c29ac91e..aa7c06ce 100644
--- a/paramiko/buffered_pipe.py
+++ b/paramiko/buffered_pipe.py
@@ -101,7 +101,7 @@ class BufferedPipe(object):
if self._event is not None:
self._event.set()
self._buffer_frombytes(b(data))
- self._cv.notifyAll()
+ self._cv.notify_all()
finally:
self._lock.release()
@@ -203,7 +203,7 @@ class BufferedPipe(object):
self._lock.acquire()
try:
self._closed = True
- self._cv.notifyAll()
+ self._cv.notify_all()
if self._event is not None:
self._event.set()
finally:
diff --git a/paramiko/channel.py b/paramiko/channel.py
index 592ddcd2..fb703c31 100644
--- a/paramiko/channel.py
+++ b/paramiko/channel.py
@@ -1066,7 +1066,7 @@ class Channel(ClosingContextManager):
if self.ultra_debug:
self._log(DEBUG, "window up {}".format(nbytes))
self.out_window_size += nbytes
- self.out_buffer_cv.notifyAll()
+ self.out_buffer_cv.notify_all()
finally:
self.lock.release()
@@ -1230,7 +1230,7 @@ class Channel(ClosingContextManager):
self.closed = True
self.in_buffer.close()
self.in_stderr_buffer.close()
- self.out_buffer_cv.notifyAll()
+ self.out_buffer_cv.notify_all()
# Notify any waiters that we are closed
self.event.set()
self.status_event.set()
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py
index 50842b46..6c2a1336 100644
--- a/paramiko/sftp_file.py
+++ b/paramiko/sftp_file.py
@@ -527,7 +527,7 @@ class SFTPFile(BufferedFile):
self._prefetch_done = False
t = threading.Thread(target=self._prefetch_thread, args=(chunks,))
- t.setDaemon(True)
+ t.daemon = True
t.start()
def _prefetch_thread(self, chunks):
diff --git a/paramiko/transport.py b/paramiko/transport.py
index 2168032f..70c47af9 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -450,7 +450,7 @@ class Transport(threading.Thread, ClosingContextManager):
)
# okay, normal socket-ish flow here...
threading.Thread.__init__(self)
- self.setDaemon(True)
+ self.daemon = True
self.sock = sock
# we set the timeout so we can check self.active periodically to
# see if we should bail. socket.timeout exception is never propagated.
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index 62433426..0f60a3bb 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -2,6 +2,11 @@
Changelog
=========
+- :support:`1838` (via :issue:`1870`/:issue:`2028`) Update ``camelCase`` method
+ calls against the ``threading`` module to be ``snake_case``; this and related
+ tweaks should fix some deprecation warnings under Python 3.10. Thanks to
+ Karthikeyan Singaravelan for the report, ``@Narendra-Neerukonda`` for the
+ patch, and to Thomas Grainger and Jun Omae for patch workshopping.
- :feature:`1951` Add SSH config token expansion (eg ``%h``, ``%p``) when
parsing ``ProxyJump`` directives. Patch courtesy of Bruno Inec.
- :bug:`1964` (via :issue:`2024` as also reported in :issue:`2023`)
diff --git a/tests/loop.py b/tests/loop.py
index 87fb089a..6de4b164 100644
--- a/tests/loop.py
+++ b/tests/loop.py
@@ -81,7 +81,7 @@ class LoopSocket(object):
self.__lock.acquire()
try:
self.__in_buffer += data
- self.__cv.notifyAll()
+ self.__cv.notify_all()
finally:
self.__lock.release()
diff --git a/tests/test_transport.py b/tests/test_transport.py
index 8e5f8cd7..b26d36cd 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -756,7 +756,7 @@ class TransportTest(unittest.TestCase):
threading.Thread.__init__(
self, None, None, self.__class__.__name__
)
- self.setDaemon(True)
+ self.daemon = True
self.chan = chan
self.iterations = iterations
self.done_event = done_event
@@ -780,7 +780,7 @@ class TransportTest(unittest.TestCase):
threading.Thread.__init__(
self, None, None, self.__class__.__name__
)
- self.setDaemon(True)
+ self.daemon = True
self.chan = chan
self.done_event = done_event
self.watchdog_event = threading.Event()