Skip to content

Commit

Permalink
chg: Remove python 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Nov 5, 2024
1 parent b7adeee commit 3f53c31
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 274 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ repos:
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ strict = True
warn_return_any = False
show_error_context = True
pretty = True
python_version = 3.9

[mypy-docs.source.*]
ignore_errors = True
12 changes: 5 additions & 7 deletions playwrightcapture/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from io import BytesIO
from logging import LoggerAdapter, Logger
from tempfile import NamedTemporaryFile
from typing import Any, TypedDict, Literal, TYPE_CHECKING, MutableMapping, Generator
from typing import Any, TypedDict, Literal, TYPE_CHECKING
from collections.abc import MutableMapping, Generator
from urllib.parse import urlparse, unquote, urljoin, urlsplit, urlunsplit
from zipfile import ZipFile

Expand All @@ -38,11 +39,8 @@

from .exceptions import UnknownPlaywrightBrowser, UnknownPlaywrightDevice, InvalidPlaywrightParameter

if sys.version_info < (3, 9):
from pytz import all_timezones_set
else:
from zoneinfo import available_timezones
all_timezones_set = available_timezones()
from zoneinfo import available_timezones
all_timezones_set = available_timezones()

if sys.version_info < (3, 11):
from async_timeout import timeout
Expand Down Expand Up @@ -104,7 +102,7 @@ def process(self, msg: str, kwargs: MutableMapping[str, Any]) -> tuple[str, Muta
class PCStealthConfig(StealthConfig): # type: ignore[misc]

@property
def enabled_scripts(self) -> Generator[str, None, None]:
def enabled_scripts(self) -> Generator[str]: # type: ignore[type-arg]
self.chrome_app = True
self.chrome_csi = True
self.chrome_runtime = True
Expand Down
Loading

0 comments on commit 3f53c31

Please sign in to comment.