Skip to content

Commit

Permalink
Merge branch '2.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Apr 25, 2022
2 parents f325261 + 5540514 commit f2b4be8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions paramiko/buffered_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def feed(self, data):
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()

Expand Down Expand Up @@ -203,7 +203,7 @@ def close(self):
self._lock.acquire()
try:
self._closed = True
self._cv.notifyAll()
self._cv.notify_all()
if self._event is not None:
self._event.set()
finally:
Expand Down
4 changes: 2 additions & 2 deletions paramiko/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ def _window_adjust(self, m):
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()

Expand Down Expand Up @@ -1230,7 +1230,7 @@ def _set_closed(self):
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()
Expand Down
2 changes: 1 addition & 1 deletion paramiko/sftp_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def _start_prefetch(self, chunks):
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):
Expand Down
2 changes: 1 addition & 1 deletion paramiko/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def __init__(
)
# 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.
Expand Down
5 changes: 5 additions & 0 deletions sites/www/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
2 changes: 1 addition & 1 deletion tests/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def __feed(self, data):
self.__lock.acquire()
try:
self.__in_buffer += data
self.__cv.notifyAll()
self.__cv.notify_all()
finally:
self.__lock.release()

Expand Down
4 changes: 2 additions & 2 deletions tests/test_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def __init__(self, chan, iterations, done_event):
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
Expand All @@ -780,7 +780,7 @@ def __init__(self, chan, done_event):
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()
Expand Down

0 comments on commit f2b4be8

Please sign in to comment.