summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2022-04-25 10:56:40 -0400
committerJeff Forcier <jeff@bitprophet.org>2022-04-25 10:56:40 -0400
commit5540514928474956c25936ab48f7fa0b59755bb1 (patch)
treed8927adc8594faa6b0571ba270a3e3dbc1234dae
parent47529be4385cffba6851f10e505f5683290d116e (diff)
parent3929166413343f0acdba44694da7bf8ee44600bb (diff)
downloadparamiko-5540514928474956c25936ab48f7fa0b59755bb1.tar.gz
Merge branch '2.9' into 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 69445c97..e8f98714 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 72f65012..5f314361 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 0104d857..57e04175 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 83cedbf6..77d32a85 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 21117b8f..7d5e81f6 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.
- :bug:`1964` (via :issue:`2024` as also reported in :issue:`2023`)
`~paramiko.pkey.PKey` instances' ``__eq__`` did not have the usual safety
guard in place to ensure they were being compared to another ``PKey`` object,
diff --git a/tests/loop.py b/tests/loop.py
index dd1f5a0c..40179a64 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 2eb95b31..fa7a3c1a 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()