Skip to content

Commit 7bff609

Browse files
committed
chore(deps): combine and fix up dependabot bumps (black 26, mypy 2, pytest 9.1)
Combines dependabot PRs #267, #269, #270: - black 25.* -> 26.* (#267) - mypy 1.19.* -> 2.1.* (#269) - pytest 9.0.* -> 9.1.* (#270) black 26 and mypy 2 dropped Python 3.9 (require >=3.10). Pinned via environment markers so the 3.9 CI job keeps the last 3.9-compatible versions while 3.10+ gets the upgraded majors (matching the existing pytest marker pattern). Applied black 26 reformatting. pytest 9.1 reworked log capture for non-propagating loggers (pytest changelog #3697). The mock_getLogger fixture patched the global logging.getLogger, which broke caplog's handler installation on 9.1 and caused 7 test_entrypoint.py failures. Fixed by patching EntryPoint._init_loggers instead, which works on both pytest 8.4 (py3.9) and 9.1 (py3.10+). Verified: ruff, black, mypy 2.1.0, and 475 unit tests pass. Signed-off-by: David Leong <116610336+leongdl@users.noreply.github.com>
1 parent 3c03830 commit 7bff609

14 files changed

Lines changed: 16 additions & 10 deletions

File tree

‎.github/scripts/get_latest_changelog.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
3030
```
3131
"""
32+
3233
import re
3334

3435
h2 = r"^##\s.*$"

‎hatch_version_hook.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
88
from typing import Any, Optional
99

10-
1110
_logger = logging.Logger(__name__, logging.INFO)
1211
_stdout_handler = logging.StreamHandler(sys.stdout)
1312
_stdout_handler.addFilter(lambda record: record.levelno <= logging.INFO)

‎requirements-testing.txt‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
coverage[toml] == 7.*
22
coverage-conditional-plugin == 0.9.0
3-
pytest == 9.0.*; python_version >= '3.10'
3+
pytest == 9.1.*; python_version >= '3.10'
44
pytest == 8.4.*; python_version < '3.10'
55
pytest-cov == 7.1.*
66
pytest-timeout == 2.4.*
77
pytest-xdist == 3.8.*
8-
black == 25.*
8+
black == 26.*; python_version >= '3.10'
9+
black == 25.*; python_version < '3.10'
910
ruff == 0.15.*
10-
mypy == 1.19.*
11+
mypy == 2.1.*; python_version >= '3.10'
12+
mypy == 1.19.*; python_version < '3.10'
1113
psutil == 7.2.*
1214
types-PyYAML ~= 6.0

‎src/openjd/adaptor_runtime/_background/backend_named_pipe_server.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from ..adaptors import AdaptorRunner
1818
from .log_buffers import LogBuffer
1919

20-
2120
_logger = logging.getLogger(__name__)
2221

2322

‎src/openjd/adaptor_runtime/_named_pipe/named_pipe_request_handler.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
from openjd.adaptor_runtime._osname import OSName
2222

23-
2423
_logger = logging.getLogger(__name__)
2524

2625

‎src/openjd/adaptor_runtime/_named_pipe/named_pipe_server.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
from abc import ABC, abstractmethod
3434

35-
3635
_logger = logging.getLogger(__name__)
3736

3837

‎src/openjd/adaptor_runtime/adaptors/_validator.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import yaml
1010
from typing import Any
1111

12-
1312
_logger = logging.getLogger(__name__)
1413

1514

‎src/openjd/adaptor_runtime/process/_logging_subprocess.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22

33
"""Module for the LoggingSubprocess class"""
4+
45
from __future__ import annotations
56

67
import logging

‎src/openjd/adaptor_runtime/process/_managed_process.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22

33
"""Module for the ManagedProcess class"""
4+
45
from __future__ import annotations
56

67
from abc import ABC as ABC, abstractmethod

‎src/openjd/adaptor_runtime/process/_stream_logger.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22

33
"""Module for the StreamLogger class"""
4+
45
from __future__ import annotations
56

67
import logging

0 commit comments

Comments
 (0)