Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish_testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python_v: ['3.8', '3.9', '3.10', '3.12', '3.13', '3.14', '3.14t']
python_v: ['3.9', '3.10', '3.12', '3.13', '3.14', '3.14t']
# chrome_v: ['-1']
name: Build and Test
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .python_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8
3.9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a reason for choosing 3.9 here? It is also EOL already :(

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ where X.Y.Z is the semver of the most recent choreographer release.
- Add `proxy_server` browser configuration with a `CHOREO_PROXY_SERVER` environment fallback [[#304](https://github.com/plotly/choreographer/pull/304)], with thanks to @ColumbusLabs for the contribution!
- Send `Runtime.callFunctionOn` commands in chunks when they are too big for Chrome's 100MiB devtools buffer [[#306](https://github.com/plotly/choreographer/pull/306)]

### Removed
- Drop support for Python 3.8 [[#294](https://github.com/plotly/choreographer/pull/294)]

### Fixed
- Improve platform architecture detection for arm on Linux and Windows [[#290](https://github.com/plotly/choreographer/pull/290)], with thanks to @juliabeliaeva for the contribution!
- Fix license file and add a valid SPDX identifier to project settings [[#294](https://github.com/plotly/choreographer/pull/294)], with thanks to @ecederstrand for the contribution!
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ choreographer = ['resources/last_known_good_chrome.json']
name = "choreographer"
description = "Devtools Protocol implementation for chrome."
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = "MIT"
license-files = [ "LICENSE.md" ]
dynamic = ["version"]
Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/_brokers/_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# afrom choreographer.channels import ChannelClosedError

if TYPE_CHECKING:
from typing import Any, MutableMapping
from collections.abc import MutableMapping
from typing import Any

from choreographer.browser_async import Browser
from choreographer.channels._interface_type import ChannelInterface
Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/browser_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
from .utils._kill import kill

if TYPE_CHECKING:
from collections.abc import Generator, MutableMapping
from pathlib import Path
from types import TracebackType
from typing import Any, Generator, MutableMapping
from typing import Any

from typing_extensions import Self # 3.9 needs this, could be from typing in 3.10

Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/browser_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
from .utils._kill import kill

if TYPE_CHECKING:
from collections.abc import MutableMapping
from pathlib import Path
from types import TracebackType
from typing import Any, MutableMapping
from typing import Any

from typing_extensions import Self # 3.9 needs this, could be from typing in 3.10

Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/browsers/_interface_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

if TYPE_CHECKING:
import logging
from collections.abc import Mapping, MutableMapping, Sequence
from pathlib import Path
from typing import Any, Mapping, MutableMapping, Sequence
from typing import Any

from choreographer.channels._interface_type import ChannelInterface

Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/browsers/chromium.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

if TYPE_CHECKING:
import logging
from typing import Any, Mapping, MutableMapping, Sequence
from collections.abc import Mapping, MutableMapping, Sequence
from typing import Any

from choreographer.channels._interface_type import ChannelInterface

Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/channels/_interface_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from typing import TYPE_CHECKING, Protocol

if TYPE_CHECKING:
from typing import Any, Mapping, Sequence
from collections.abc import Mapping, Sequence
from typing import Any

from choreographer.protocol import BrowserResponse

Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/channels/pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
)

if TYPE_CHECKING:
from typing import Any, Mapping, Sequence
from collections.abc import Mapping, Sequence
from typing import Any

from choreographer.protocol import BrowserResponse

Expand Down
5 changes: 3 additions & 2 deletions src/choreographer/protocol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@

from __future__ import annotations

from collections.abc import MutableMapping
from enum import Enum
from typing import Any, MutableMapping, NewType, Optional, Tuple, cast
from typing import Any, NewType, Optional, cast

BrowserResponse = NewType("BrowserResponse", MutableMapping[str, Any])
"""The type for a response from the browser. Is really a `dict()`."""
BrowserCommand = NewType("BrowserCommand", MutableMapping[str, Any])
"""The type for a command to the browser. Is really a `dict()`."""

MessageKey = NewType("MessageKey", Tuple[str, Optional[int]])
MessageKey = NewType("MessageKey", tuple[str, Optional[int]])
"""The type for id'ing a message/response. It is `tuple(session_id, message_id)`."""


Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/protocol/_chunking.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
from . import DevtoolsProtocolError

if TYPE_CHECKING:
from typing import Any, MutableMapping
from collections.abc import MutableMapping
from typing import Any

from . import BrowserCommand, BrowserResponse
from .devtools_async import Session
Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/protocol/devtools_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

if TYPE_CHECKING:
import asyncio
from typing import Any, Callable, Coroutine, Literal, MutableMapping
from collections.abc import Coroutine, MutableMapping
from typing import Any, Callable, Literal

from choreographer._brokers import Broker

Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/protocol/devtools_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from choreographer import protocol

if TYPE_CHECKING:
from typing import Any, MutableMapping
from collections.abc import MutableMapping
from typing import Any

from choreographer._brokers import BrokerSync

Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/utils/_tmpfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
import logistro

if TYPE_CHECKING:
from typing import Any, Callable, MutableMapping, Sequence
from collections.abc import MutableMapping, Sequence
from typing import Any, Callable

_logger = logistro.getLogger(__name__)

Expand Down
3 changes: 2 additions & 1 deletion src/choreographer/utils/_which.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
_logger = logistro.getLogger()

if TYPE_CHECKING:
from collections.abc import Sequence
from pathlib import Path
from typing import Any, Sequence
from typing import Any


def _is_exe(path: str | Path) -> bool:
Expand Down
9 changes: 6 additions & 3 deletions tests/test_get_chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ def create_mock_zip_response():
return zip_buffer

# Patch json.load to return our mock data (avoid broad Path.read_text patch)
with patch("json.loads", return_value=mock_last_known_good_json), patch(
"urllib.request.urlopen",
side_effect=lambda url: create_mock_zip_response(), # noqa: ARG005
with (
patch("json.loads", return_value=mock_last_known_good_json),
patch(
"urllib.request.urlopen",
side_effect=lambda url: create_mock_zip_response(), # noqa: ARG005
),
):
# a) First call without force - should return existing, no download
result = get_chrome_sync(arch="linux64", path=tmp_path, force=False)
Expand Down
Loading
Loading