Skip to content

Commit

Permalink
Update requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Grennith committed Jan 14, 2024
1 parent 25bf18d commit f6a9650
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 81 deletions.
2 changes: 1 addition & 1 deletion mapadroid/websocket/communicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ async def get_external_ip(self) -> Optional[str]:
try:
# Regex ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$ from
# https://stackoverflow.com/questions/5284147/validating-ipv4-addresses-with-regexp
found = re.search('(((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\\b){4})', res)
found = re.search(r'(((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\\b){4})', res)
if found:
ip_address_found = found.group(1)
except Exception as e:
Expand Down
4 changes: 2 additions & 2 deletions mapadroid/websocket/dummy_debug_rgc.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ async def hello(websocket, path):
start_server = websockets.serve(hello, '0.0.0.0', port)

print("Starting to serve ws://%s:%s" % (socket.gethostbyname(socket.gethostname()), port))
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()
asyncio.new_event_loop().run_until_complete(start_server)
asyncio.new_event_loop().run_forever()
67 changes: 33 additions & 34 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
aiocache==0.12.1
aiofile==3.8.7
aiohttp==3.8.5
aiocache==0.12.2
aiofile==3.8.8
aiohttp==3.9.1
aiohttp-remotes==1.2.0
aiohttp-jinja2==1.5.1
aiohttp-jinja2==1.6
aiohttp-session==2.12.0
aiomysql==0.2.0
aiounittest==1.4.2
alembic==1.11.1
alembic==1.13.1
APKMirror-Search==1.0.1
apkutils==1.5.1
apkutils==1.5.3
asyncio-rlock==0.1.0
bitstring==4.0.2
cachetools==5.3.1
ConfigArgParse==1.5.5
dataclasses==0.6
geopy==2.3.0
bitstring==4.1.4
cachetools==5.3.2
ConfigArgParse==1.7
geopy==2.4.1
gpxdata==1.2.1
grpcio==1.56.2
grpcio==1.60.0
ImageHash==4.3.1
imutils==0.5.4
Jinja2==3.1.2
loguru==0.7.0
matplotlib==3.7.2
msgpack==1.0.5
Jinja2==3.1.3
loguru==0.7.2
matplotlib==3.8.2
msgpack==1.0.7
multidict==6.0.4
mysql-connector==2.2.9
mysqlclient==2.2.0
numpy==1.25.1
opencv-python==4.8.0.74
orjson==3.9.2
Pillow==10.0.0
protobuf==4.23.4
psutil==5.9.5
mysqlclient==2.2.1
numpy==1.26.3
opencv-python==4.9.0.80
orjson==3.9.10
Pillow==10.2.0
protobuf==4.25.2
psutil==5.9.7
PyMySQL==1.1.0
pytesseract==0.3.10
pytz==2023.3
requests==2.31.0
s2sphere==0.2.5
SQLAlchemy==2.0.19
SQLAlchemy==2.0.25
timezonefinder==6.2.0
ujson==5.8.0
urllib3==2.0.4
uvloop==0.17.0
websockets==11.0.3
Werkzeug==2.3.6
yarl==1.9.2
ujson==5.9.0
urllib3==2.1.0
uvloop==0.19.0
websockets==12.0
Werkzeug==3.0.1
yarl==1.9.4
beautifulsoup4==4.12.2
marshmallow-dataclass==8.5.14
marshmallow-dataclass==8.6.0
marshmallow-enum==1.5.1
typeguard==4.0.0
redis==4.6.0
hiredis==2.2.3
typeguard==4.1.5
redis==5.0.1
hiredis==2.3.2
13 changes: 3 additions & 10 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Optional

from aiohttp import web
from redis import Redis
from redis import asyncio as aioredis

from mapadroid.account_handler import setup_account_handler
from mapadroid.account_handler.AbstractAccountHandler import \
Expand Down Expand Up @@ -238,8 +238,8 @@ async def start():
# storage_manager.shutdown()
if db_exec is not None:
logger.debug("Calling db_pool_manager shutdown")
cache: Redis = await db_wrapper.get_cache()
await cache.close()
cache: aioredis.Redis = await db_wrapper.get_cache()
await cache.aclose()
await db_exec.shutdown()
logger.debug("Done shutting down db_pool_manager")
if pogo_win_manager:
Expand All @@ -260,15 +260,8 @@ async def start():
setup_loggers()
logger = get_logger(LoggerEnums.system)

loop = asyncio.get_event_loop()
# signal.signal(signal.SIGINT, signal_handler)
# signal.signal(signal.SIGTERM, signal_handler)

loop_being_run = loop
try:
# loop.run_until_complete(start())
asyncio.run(start(), debug=True)
except (KeyboardInterrupt, Exception) as e:
# shutdown(loop_being_run)
logger.info(f"Shutting down. {e}")
logger.exception(e)
13 changes: 3 additions & 10 deletions start_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from asyncio import CancelledError, Task
from typing import Optional

from redis import Redis
from redis import asyncio as aioredis

from mapadroid.account_handler import setup_account_handler
from mapadroid.account_handler.AbstractAccountHandler import \
Expand Down Expand Up @@ -221,8 +221,8 @@ async def start():
event_task.cancel()
if db_exec is not None:
logger.debug("Calling db_pool_manager shutdown")
cache: Redis = await db_wrapper.get_cache()
await cache.close()
cache: aioredis.Redis = await db_wrapper.get_cache()
await cache.aclose()
await db_exec.shutdown()
logger.debug("Done shutting down db_pool_manager")
except Exception:
Expand All @@ -241,15 +241,8 @@ async def start():
setup_loggers()
logger = get_logger(LoggerEnums.system)

loop = asyncio.get_event_loop()
# signal.signal(signal.SIGINT, signal_handler)
# signal.signal(signal.SIGTERM, signal_handler)

loop_being_run = loop
try:
# loop.run_until_complete(start())
asyncio.run(start(), debug=True)
except (KeyboardInterrupt, Exception) as e:
# shutdown(loop_being_run)
logger.info(f"Shutting down. {e}")
logger.exception(e)
7 changes: 0 additions & 7 deletions start_mitmmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,8 @@ async def start():
setup_loggers()
logger = get_logger(LoggerEnums.system)

loop = asyncio.get_event_loop()
# signal.signal(signal.SIGINT, signal_handler)
# signal.signal(signal.SIGTERM, signal_handler)

loop_being_run = loop
try:
# loop.run_until_complete(start())
asyncio.run(start(), debug=True)
except (KeyboardInterrupt, Exception) as e:
# shutdown(loop_being_run)
logger.info(f"Shutting down. {e}")
logger.exception(e)
13 changes: 3 additions & 10 deletions start_mitmreceiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Optional

from aiohttp import web
from redis import Redis
from redis import asyncio as aioredis

from mapadroid.account_handler import setup_account_handler
from mapadroid.account_handler.AbstractAccountHandler import \
Expand Down Expand Up @@ -134,8 +134,8 @@ async def start():
await mitm_mapper_connector.close()
if db_exec is not None:
logger.debug("Calling db_pool_manager shutdown")
cache: Redis = await db_wrapper.get_cache()
await cache.close()
cache: aioredis.Redis = await db_wrapper.get_cache()
await cache.aclose()
await db_exec.shutdown()
except Exception:
logger.opt(exception=True).critical("An unhandled exception occurred during shutdown!")
Expand All @@ -151,15 +151,8 @@ async def start():
setup_loggers()
logger = get_logger(LoggerEnums.system)

loop = asyncio.get_event_loop()
# signal.signal(signal.SIGINT, signal_handler)
# signal.signal(signal.SIGTERM, signal_handler)

loop_being_run = loop
try:
# loop.run_until_complete(start())
asyncio.run(start(), debug=True)
except (KeyboardInterrupt, Exception) as e:
# shutdown(loop_being_run)
logger.info(f"Shutting down. {e}")
logger.exception(e)
7 changes: 0 additions & 7 deletions start_statshandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,8 @@ async def start():
setup_loggers()
logger = get_logger(LoggerEnums.system)

loop = asyncio.get_event_loop()
# signal.signal(signal.SIGINT, signal_handler)
# signal.signal(signal.SIGTERM, signal_handler)

loop_being_run = loop
try:
# loop.run_until_complete(start())
asyncio.run(start(), debug=True)
except (KeyboardInterrupt, Exception) as e:
# shutdown(loop_being_run)
logger.info(f"Shutting down. {e}")
logger.exception(e)

0 comments on commit f6a9650

Please sign in to comment.