1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive()

This commit is contained in:
Zdenek Dohnal 2020-07-29 07:28:29 +02:00
parent aecb84c039
commit 9f437c9892
2 changed files with 104 additions and 1 deletions

View File

@ -0,0 +1,93 @@
diff --git a/copier/copier.py b/copier/copier.py
index a595baa..7794f48 100644
--- a/copier/copier.py
+++ b/copier/copier.py
@@ -73,13 +73,13 @@ class PMLCopyDevice(device.Device):
def isCopyActive(self):
if self.copy_thread is not None:
- return self.copy_thread.isAlive()
+ return self.copy_thread.is_alive()
else:
return False
def waitForCopyThread(self):
if self.copy_thread is not None and \
- self.copy_thread.isAlive():
+ self.copy_thread.is_alive():
self.copy_thread.join()
diff --git a/fax/fax.py b/fax/fax.py
index 3d69226..0878a64 100644
--- a/fax/fax.py
+++ b/fax/fax.py
@@ -478,13 +478,13 @@ class FaxDevice(device.Device):
def isSendFaxActive(self):
if self.send_fax_thread is not None:
- return self.send_fax_thread.isAlive()
+ return self.send_fax_thread.is_alive()
else:
return False
def waitForSendFaxThread(self):
if self.send_fax_thread is not None and \
- self.send_fax_thread.isAlive():
+ self.send_fax_thread.is_alive():
try:
self.send_fax_thread.join()
diff --git a/fax/pmlfax.py b/fax/pmlfax.py
index b68ff6a..b1020d0 100644
--- a/fax/pmlfax.py
+++ b/fax/pmlfax.py
@@ -179,13 +179,13 @@ class PMLFaxDevice(FaxDevice):
def isUploadLogActive(self):
if self.upload_log_thread is not None:
- return self.upload_log_thread.isAlive()
+ return self.upload_log_thread.is_alive()
else:
return False
def waitForUploadLogThread(self):
if self.upload_log_thread is not None and \
- self.upload_log_thread.isAlive():
+ self.upload_log_thread.is_alive():
self.upload_log_thread.join()
diff --git a/scan/sane.py b/scan/sane.py
index b6c4acd..e8f8db8 100755
--- a/scan/sane.py
+++ b/scan/sane.py
@@ -378,14 +378,14 @@ class ScanDevice:
def isScanActive(self):
if self.scan_thread is not None:
- return self.scan_thread.isAlive() and self.scan_thread.scan_active
+ return self.scan_thread.is_alive() and self.scan_thread.scan_active
else:
return False
def waitForScanDone(self):
if self.scan_thread is not None and \
- self.scan_thread.isAlive() and \
+ self.scan_thread.is_alive() and \
self.scan_thread.scan_active:
try:
@@ -398,9 +398,9 @@ class ScanDevice:
#time.sleep(0.5)
if self.scan_thread is not None:
while True:
- #print self.scan_thread.isAlive()
+ #print self.scan_thread.is_alive()
#print self.scan_thread.scan_active
- if self.scan_thread.isAlive() and \
+ if self.scan_thread.is_alive() and \
self.scan_thread.scan_active:
return

View File

@ -7,7 +7,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.20.6
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2+ and MIT and BSD and IJG and Public Domain and GPLv2+ with exceptions and ISC
Url: https://developers.hp.com/hp-linux-imaging-and-printing
@ -156,6 +156,11 @@ Patch55: hplip-clean-ldl.patch
# - it will cause malfunction of printing and scanning for them
# https://bugs.launchpad.net/hplip/+bug/1883898
Patch56: hplip-revert-plugins.patch
# python3.9 removes threading.Thread.isAlive() and it is substituted
# by threading.Thread.is_alive()
# https://bugzilla.redhat.com/show_bug.cgi?id=1861055
# reported upstream https://bugs.launchpad.net/fedora/+bug/1889280
Patch57: hplip-thread-isalive-removed.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@ -425,6 +430,8 @@ rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h
# 1833308 - hp-clean cannot clean HP PSC1410 - Device I/O error
%patch55 -p1 -b .clean-ldl
%patch56 -p1 -b .revert-plugins
# 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive()
%patch57 -p1 -b .thread-isalive-removed
sed -i.duplex-constraints \
-e 's,\(UIConstraints.* \*Duplex\),//\1,' \
@ -725,6 +732,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
%changelog
* Tue Jul 28 2020 Zdenek Dohnal <zdohnal@redhat.com> - 3.20.6-5
- 1861055 - hplip: remove threading.Thread.isAlive method calls - use threading.Thread.is_alive()
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.20.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild