Upgrades minimal Python version to 3.8

3.7 is EOL
pull/574/head
Tpt 1 year ago committed by Thomas Tanon
parent 8e770fbb5d
commit 00f179058e
  1. 4
      .github/workflows/artifacts.yml
  2. 6
      .github/workflows/tests.yml
  3. 2
      python/Cargo.toml
  4. 5
      python/generate_stubs.py
  5. 3
      python/pyproject.toml
  6. 2
      python/requirements.dev.txt

@ -177,7 +177,7 @@ jobs:
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.10" python-version: "3.11"
cache: pip cache: pip
cache-dependency-path: '**/requirements.dev.txt' cache-dependency-path: '**/requirements.dev.txt'
- run: pip install -r python/requirements.dev.txt - run: pip install -r python/requirements.dev.txt
@ -211,7 +211,7 @@ jobs:
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.10" python-version: "3.11"
cache: pip cache: pip
cache-dependency-path: '**/requirements.dev.txt' cache-dependency-path: '**/requirements.dev.txt'
- run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse - run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse

@ -254,7 +254,7 @@ jobs:
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.10" python-version: "3.11"
cache: pip cache: pip
cache-dependency-path: '**/requirements.dev.txt' cache-dependency-path: '**/requirements.dev.txt'
- run: pip install -r python/requirements.dev.txt - run: pip install -r python/requirements.dev.txt
@ -288,7 +288,7 @@ jobs:
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.7" python-version: "3.8"
cache: pip cache: pip
cache-dependency-path: '**/requirements.dev.txt' cache-dependency-path: '**/requirements.dev.txt'
- run: pip install -r python/requirements.dev.txt - run: pip install -r python/requirements.dev.txt
@ -308,7 +308,7 @@ jobs:
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4 - uses: actions/setup-python@v4
with: with:
python-version: "3.10" python-version: "3.11"
cache: pip cache: pip
cache-dependency-path: '**/requirements.dev.txt' cache-dependency-path: '**/requirements.dev.txt'
- run: pip install "maturin~=1.0" - run: pip install "maturin~=1.0"

@ -16,7 +16,7 @@ name = "pyoxigraph"
doctest = false doctest = false
[features] [features]
abi3 = ["pyo3/abi3-py37"] abi3 = ["pyo3/abi3-py38"]
[dependencies] [dependencies]
oxigraph = { version = "0.4.0-alpha.1-dev", path="../lib", features = ["http_client"] } oxigraph = { version = "0.4.0-alpha.1-dev", path="../lib", features = ["http_client"] }

@ -473,7 +473,7 @@ def build_doc_comment(doc: str) -> Optional[ast.Expr]:
def format_with_black(code: str) -> str: def format_with_black(code: str) -> str:
result = subprocess.run( result = subprocess.run(
["python", "-m", "black", "-t", "py37", "--pyi", "-"], ["python", "-m", "black", "-t", "py38", "--pyi", "-"],
input=code.encode(), input=code.encode(),
capture_output=True, capture_output=True,
) )
@ -498,9 +498,6 @@ if __name__ == "__main__":
) )
args = parser.parse_args() args = parser.parse_args()
stub_content = ast.unparse(module_stubs(importlib.import_module(args.module_name))) stub_content = ast.unparse(module_stubs(importlib.import_module(args.module_name)))
stub_content = stub_content.replace(
", /", ""
) # TODO: remove when targeting Python 3.8+
if args.black: if args.black:
stub_content = format_with_black(stub_content) stub_content = format_with_black(stub_content)
args.out.write(stub_content) args.out.write(stub_content)

@ -11,7 +11,6 @@ classifiers = [
"License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: Apache Software License",
"License :: OSI Approved :: MIT License", "License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
@ -20,7 +19,7 @@ classifiers = [
"Topic :: Database :: Database Engines/Servers", "Topic :: Database :: Database Engines/Servers",
"Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Libraries :: Python Modules",
] ]
requires-python = ">=3.7" requires-python = ">=3.8"
[project.urls] [project.urls]
Changelog = "https://github.com/oxigraph/oxigraph/blob/main/CHANGELOG.md" Changelog = "https://github.com/oxigraph/oxigraph/blob/main/CHANGELOG.md"

@ -3,4 +3,4 @@ furo
maturin~=1.0 maturin~=1.0
mypy~=1.0 mypy~=1.0
ruff~=0.0.255 ruff~=0.0.255
sphinx~=5.3 sphinx~=7.0

Loading…
Cancel
Save