diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 020b8cd..c63d267 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,4 +44,4 @@ repos: - types-aiofiles - typing-extensions<5; python_version < "3.11" - tomli<3; python_version < "3.11" - - uvloop<0.20; platform_python_implementation == "CPython" and (sys_platform == "darwin" or sys_platform == "linux") + - uvloop<0.20; implementation_name == "cpython" and (sys_platform == "darwin" or sys_platform == "linux") diff --git a/poetry.lock b/poetry.lock index 49c075d..f4912b0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1282,4 +1282,4 @@ termux = [] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "4e9ed735edd49c4e3fd13e3b61aab06e290edbf29069994f399277e675a0ca07" +content-hash = "f15afce60a11a55270abf068ea841832d01bdeb6b64ed0b480d6cbe95e2f7c06" diff --git a/proxy_scraper_checker/__main__.py b/proxy_scraper_checker/__main__.py index 85c3fac..9eb7355 100644 --- a/proxy_scraper_checker/__main__.py +++ b/proxy_scraper_checker/__main__.py @@ -2,7 +2,6 @@ from __future__ import annotations import asyncio import logging -import platform import sys from typing import TYPE_CHECKING, Dict, Mapping @@ -37,7 +36,7 @@ logger = logging.getLogger(__name__) def set_event_loop_policy() -> None: if sys.platform == "win32": asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) - elif platform.python_implementation() == "CPython" and sys.platform in { + elif sys.implementation.name == "cpython" and sys.platform in { "darwin", "linux", }: diff --git a/pyproject.toml b/pyproject.toml index c282b4f..4c791c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,8 +14,8 @@ aiofiles = ">=0.8" aiohttp = "^3.8.6" aiohttp-socks = ">=0.7,<0.9" attrs = ">=22.2" -brotli = { version = "^1", markers = "platform_python_implementation == 'CPython'" } -brotlicffi = { version = "<2", markers = "platform_python_implementation != 'CPython'" } +brotli = { version = "^1", markers = "implementation_name == 'cpython'" } +brotlicffi = { version = "<2", markers = "implementation_name != 'cpython'" } certifi = "*" charset-normalizer = ">=2,<4" maxminddb = ">=1.3,<3" @@ -23,7 +23,7 @@ platformdirs = "<5" rich = ">=12.3,<14" tomli = { version = "<3", python = "<3.11" } typing-extensions = { version = "^4.4", python = "<3.11" } -uvloop = { version = ">=0.14,<0.20", optional = true, markers = "platform_python_implementation == 'CPython' and (sys_platform == 'darwin' or sys_platform == 'linux')" } +uvloop = { version = ">=0.14,<0.20", optional = true, markers = "implementation_name == 'cpython' and (sys_platform == 'darwin' or sys_platform == 'linux')" } [tool.poetry.extras] non-termux = ["aiodns", "uvloop"]