diff --git a/pyproject.toml b/pyproject.toml index 4904c3a..543c874 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,21 +24,22 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" attrs = ">=17.4.0" -structlog = "^20.1.0" +structlog = "^24" aiohttp = ">=3" +packaging = ">=23" [tool.poetry.dev-dependencies] jinja2 = "^3.1.2" -pytest = "^6.0.1" +pytest = "^8" pytest-asyncio = "^0.14.0" sphinx = "^5.2.3" pytest-cov = "^2.10.1" asyncio-extras = "^1.3.2" pre-commit = "^2.7.1" black = "^22.10.0" -Pillow = "^8.1.0" +Pillow = "^9" [tool.poetry.scripts] arsenic-check-ie11 = "arsenic.helpers:check_ie11_environment_cli" diff --git a/src/arsenic/services.py b/src/arsenic/services.py index 44c7e18..03142c9 100644 --- a/src/arsenic/services.py +++ b/src/arsenic/services.py @@ -2,7 +2,7 @@ import asyncio import re import sys -from distutils.version import StrictVersion +from packaging import version from functools import partial from typing import List, TextIO, Optional @@ -91,11 +91,11 @@ async def _check_version(self): "disable version checking, set `version_check` to " "`False`." ) - version_str = match.group(1) - version = StrictVersion(version_str) - if version < StrictVersion("0.16.1"): + binary_version_str = match.group(1) + binary_version = version.parse(binary_version_str) + if binary_version < version.parse("0.16.1"): raise ValueError( - f"Geckodriver version {version_str} is too old. 0.16.1 or " + f"Geckodriver version {binary_version_str} is too old. 0.16.1 or " f"higher is required. To disable version checking, set " f"`version_check` to `False`." )