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