kivy porting to python3 phase1

This commit is contained in:
surbhicis 2021-08-25 15:32:49 +05:30
parent 4421b4509c
commit f6a6d96a07
Signed by untrusted user: surbhicis
GPG Key ID: 48A8C2D218DE7B0B
2 changed files with 13 additions and 8 deletions

View File

@ -303,7 +303,7 @@ def check_openssl():
' OpenSSL 0.9.8b or later with AES, Elliptic Curves (EC),' ' OpenSSL 0.9.8b or later with AES, Elliptic Curves (EC),'
' ECDH, and ECDSA enabled.') ' ECDH, and ECDSA enabled.')
return False return False
matches = cflags_regex.findall(openssl_cflags) matches = cflags_regex.findall(openssl_cflags.decode('utf-8', "ignore"))
if matches: if matches:
logger.error( logger.error(
'This OpenSSL library is missing the following required' 'This OpenSSL library is missing the following required'
@ -418,11 +418,15 @@ def check_dependencies(verbose=False, optional=False):
'PyBitmessage requires Python 2.7.4 or greater' 'PyBitmessage requires Python 2.7.4 or greater'
' (but not Python 3+)') ' (but not Python 3+)')
has_all_dependencies = False has_all_dependencies = False
if sys.hexversion >= 0x3000000: # if sys.hexversion >= 0x3000000:
logger.error( # logger.error(
'PyBitmessage does not support Python 3+. Python 2.7.4' # 'PyBitmessage does not support Python 3+. Python 2.7.4'
' or greater is required. Python 2.7.18 is recommended.') # ' or greater is required. Python 2.7.18 is recommended.')
sys.exit() # sys.exit()
# FIXME: This needs to be uncommented when more of the code is python3 compatible
# if sys.hexversion >= 0x3000000 and sys.hexversion < 0x3060000:
# print("PyBitmessage requires python >= 3.6 if using python 3")
check_functions = [check_ripemd160, check_sqlite, check_openssl] check_functions = [check_ripemd160, check_sqlite, check_openssl]
if optional: if optional:

View File

@ -1,7 +1,8 @@
""" """
Announce addresses as they are received from other hosts Announce addresses as they are received from other hosts
""" """
import Queue from six.moves import queue
import state import state
from helper_random import randomshuffle from helper_random import randomshuffle
@ -22,7 +23,7 @@ class AddrThread(StoppableThread):
try: try:
data = addrQueue.get(False) data = addrQueue.get(False)
chunk.append(data) chunk.append(data)
except Queue.Empty: except queue.Empty:
break break
if chunk: if chunk: