Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: remove Python 3.7 support and Python 3.11 #75

Merged
merged 1 commit into from
Jul 18, 2023
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
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"
jd marked this conversation as resolved.
Show resolved Hide resolved
- "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