mirror of https://github.com/devine-dl/devine.git
Drop support for Python 3.8
This commit is contained in:
parent
f21aa5aac5
commit
c1f716cb6c
|
@ -12,7 +12,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11']
|
python-version: ['3.9', '3.10', '3.11']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<img src="https://github.com/devine-dl/devine/actions/workflows/ci.yml/badge.svg" alt="Build status">
|
<img src="https://github.com/devine-dl/devine/actions/workflows/ci.yml/badge.svg" alt="Build status">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://python.org">
|
<a href="https://python.org">
|
||||||
<img src="https://img.shields.io/badge/python-3.8.6%2B-informational" alt="Python version">
|
<img src="https://img.shields.io/badge/python-3.9.0%2B-informational" alt="Python version">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://deepsource.io/gh/devine-dl/devine/?ref=repository-badge">
|
<a href="https://deepsource.io/gh/devine-dl/devine/?ref=repository-badge">
|
||||||
<img src="https://deepsource.io/gh/devine-dl/devine.svg/?label=active+issues&token=1ADCbjJ3FPiGT_s0Y0rlugGU" alt="DeepSource">
|
<img src="https://deepsource.io/gh/devine-dl/devine.svg/?label=active+issues&token=1ADCbjJ3FPiGT_s0Y0rlugGU" alt="DeepSource">
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
import logging
|
import logging
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import click
|
import click
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import ast
|
import ast
|
||||||
import contextlib
|
import contextlib
|
||||||
import importlib.util
|
import importlib.util
|
||||||
|
@ -22,12 +20,6 @@ from devine.core.config import config
|
||||||
from devine.core.constants import LANGUAGE_MAX_DISTANCE
|
from devine.core.constants import LANGUAGE_MAX_DISTANCE
|
||||||
|
|
||||||
|
|
||||||
def is_relative_to_backport(base: Path, path_: Union[Path, str]) -> bool:
|
|
||||||
"""Same as Path.is_relative_to, but back-ported to 3.8.x."""
|
|
||||||
path_ = Path(path_)
|
|
||||||
return path_ == base or path_ in base.parents
|
|
||||||
|
|
||||||
|
|
||||||
def import_module_by_path(path: Path) -> ModuleType:
|
def import_module_by_path(path: Path) -> ModuleType:
|
||||||
"""Import a Python file by Path as a Module."""
|
"""Import a Python file by Path as a Module."""
|
||||||
if not path:
|
if not path:
|
||||||
|
@ -38,7 +30,7 @@ def import_module_by_path(path: Path) -> ModuleType:
|
||||||
raise ValueError("Path does not exist")
|
raise ValueError("Path does not exist")
|
||||||
|
|
||||||
# compute package hierarchy for relative import support
|
# compute package hierarchy for relative import support
|
||||||
if is_relative_to_backport(path, config.directories.core_dir):
|
if path.is_relative_to(config.directories.core_dir):
|
||||||
name = []
|
name = []
|
||||||
_path = path.parent
|
_path = path.parent
|
||||||
while _path.stem != config.directories.core_dir.stem:
|
while _path.stem != config.directories.core_dir.stem:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from typing import Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
from typing import Iterator, Optional, Union
|
from typing import Iterator, Optional, Union
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
from typing import Any, Iterator, Optional, Union
|
from typing import Any, Iterator, Optional, Union
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
from typing import Iterator, Optional, Union
|
from typing import Iterator, Optional, Union
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import threading
|
import threading
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
|
@ -1722,5 +1722,5 @@ multidict = ">=4.0"
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = ">=3.8.6,<3.12"
|
python-versions = ">=3.9.0,<3.12"
|
||||||
content-hash = "a5ae30165f979359df7f0a2ff60822904261657d7c89acd5f5fba94643325e64"
|
content-hash = "cb2c53f75ffcbfcbea3341e1300a1e054c87b85343fa21e606287518ad5c142d"
|
||||||
|
|
|
@ -23,7 +23,7 @@ classifiers = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = ">=3.8.6,<3.12"
|
python = ">=3.9.0,<3.12"
|
||||||
appdirs = "^1.4.4"
|
appdirs = "^1.4.4"
|
||||||
Brotli = "^1.0.9"
|
Brotli = "^1.0.9"
|
||||||
click = "^8.1.3"
|
click = "^8.1.3"
|
||||||
|
|
Loading…
Reference in New Issue