Skip to content

Commit

Permalink
Merge pull request #75 from jd/add-py311
Browse files Browse the repository at this point in the history
ci: remove Python 3.7 support and Python 3.11
  • Loading branch information
jd authored Jul 18, 2023
2 parents a31956f + 1b5e068 commit e0f5ad4
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
test:
strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10"]
python: ["3.8", "3.9", "3.10", "3.11"]

runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
Expand All @@ -29,15 +29,15 @@ jobs:
run: tox -e py$(echo ${{ matrix.python }} | tr -d .)

pep8:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout 🛎️
uses: actions/[email protected]

- name: Setup Python 🔧
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install tox
run: pip install tox
Expand Down
23 changes: 13 additions & 10 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@ pull_request_rules:
- name: automatic merge
conditions:
- base=main
- "#approved-reviews-by>=1"
- and: &CheckRuns
- "check-success=pep8"
- "check-success=test (3.7)"
- "check-success=test (3.8)"
- "check-success=test (3.9)"
- "check-success=test (3.10)"

actions:
queue:
name: default

- name: dismiss reviews
conditions: []
Expand All @@ -22,4 +13,16 @@ pull_request_rules:

queue_rules:
- name: default
conditions: []
queue_conditions:
- "#approved-reviews-by>=1"
- "check-success=pep8"
- "check-success=test (3.8)"
- "check-success=test (3.9)"
- "check-success=test (3.10)"
- "check-success=test (3.11)"
merge_conditions:
- "check-success=pep8"
- "check-success=test (3.8)"
- "check-success=test (3.9)"
- "check-success=test (3.10)"
- "check-success=test (3.11)"
6 changes: 3 additions & 3 deletions daiquiri/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def format(self, record: logging.LogRecord) -> str:
return s


class DatadogFormatter(jsonlogger.JsonFormatter): # type: ignore[misc]
class DatadogFormatter(jsonlogger.JsonFormatter):
def __init__(self) -> None:
super(DatadogFormatter, self).__init__(timestamp=True)
super(DatadogFormatter, self).__init__(timestamp=True) # type: ignore[no-untyped-call]

def add_fields(
self,
Expand All @@ -183,5 +183,5 @@ def add_fields(


TEXT_FORMATTER = ColorExtrasFormatter(fmt=DEFAULT_EXTRAS_FORMAT)
JSON_FORMATTER = jsonlogger.JsonFormatter()
JSON_FORMATTER = jsonlogger.JsonFormatter() # type: ignore[no-untyped-call]
DATADOG_FORMATTER = DatadogFormatter()
2 changes: 1 addition & 1 deletion daiquiri/tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def test_datadog(self) -> None:
1 / 0
except ZeroDivisionError:
logger = daiquiri.getLogger("saymyname")
logger.error("backtrace", exc_info=True)
logger.exception("backtrace")
socket_instance.connect.assert_called_once_with(("127.0.0.1", 10518))
socket_instance.sendall.assert_has_calls(
[
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
target-version = ['py37', 'py38', 'py39', 'py310']
target-version = ['py38', 'py39', 'py310', 'py311']

[tool.mypy]
files = "daiquiri"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ classifier =
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11

[options]
install_requires =
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tox]
envlist = py37,py38,py39,p310,pep8,docs
envlist = py38,py39,py310,py311,pep8,docs

[testenv]
whitelist_externals = sh
allowlist_externals = sh
deps = -e.[test]
commands =
pytest {posargs}
Expand Down

0 comments on commit e0f5ad4

Please sign in to comment.