mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-06 22:19:01 +00:00
Compatibility with Python 10 (#509)
This commit is contained in:
+5
-2
@@ -7,8 +7,11 @@ from maigret.maigret import main
|
||||
|
||||
def run():
|
||||
try:
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(main())
|
||||
if sys.version_info.minor >= 10:
|
||||
asyncio.run(main())
|
||||
else:
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(main())
|
||||
except KeyboardInterrupt:
|
||||
print('Maigret is interrupted.')
|
||||
sys.exit(1)
|
||||
|
||||
+5
-2
@@ -719,8 +719,11 @@ async def main():
|
||||
|
||||
def run():
|
||||
try:
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(main())
|
||||
if sys.version_info.minor >= 10:
|
||||
asyncio.run(main())
|
||||
else:
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(main())
|
||||
except KeyboardInterrupt:
|
||||
print('Maigret is interrupted.')
|
||||
sys.exit(1)
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ lxml==4.9.0
|
||||
MarkupSafe==2.1.1
|
||||
mock==4.0.3
|
||||
multidict==6.0.2
|
||||
pycountry==22.3.5
|
||||
pycountry>=22.3
|
||||
PyPDF2==2.0.0
|
||||
PySocks==1.7.1
|
||||
python-bidi==0.4.2
|
||||
|
||||
Reference in New Issue
Block a user