File tree Expand file tree Collapse file tree 9 files changed +14
-20
lines changed
django_prometheus/tests/end2end/testapp Expand file tree Collapse file tree 9 files changed +14
-20
lines changed Original file line number Diff line number Diff line change 33## v2.4.0 - UNPUBLISHED
44
55* Add support for Django 5.0 and Python 3.12.
6+ * Replace Black and isort with Ruff for format checking
67* Drop support for Django 3.2 (Python 3.7), 4.0 and 4.1
78
89## v2.3.1 - May 2nd, 2023
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Export Django monitoring metrics for Prometheus.io
88[ ![ Build Status] ( https://github.com/korfuri/django-prometheus/actions/workflows/ci.yml/badge.svg )] ( https://github.com/korfuri/django-prometheus/actions/workflows/ci.yml )
99[ ![ Coverage Status] ( https://coveralls.io/repos/github/korfuri/django-prometheus/badge.svg?branch=master )] ( https://coveralls.io/github/korfuri/django-prometheus?branch=master )
1010[ ![ PyPi page link -- Python versions] ( https://img.shields.io/pypi/pyversions/django-prometheus.svg )] ( https://pypi.python.org/pypi/django-prometheus )
11- [ ![ Code style: black ] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
11+
1212
1313## Features
1414
Original file line number Diff line number Diff line change 22import tempfile
33
44from django import VERSION as DJANGO_VERSION
5+
56from testapp .helpers import get_middleware
67
78# SECURITY WARNING: keep the secret key used in production secret!
Original file line number Diff line number Diff line change 11import pytest
2- from testapp .views import ObjectionException
32
43from django_prometheus .testutils import (
54 assert_metric_diff ,
65 assert_metric_equal ,
76 save_registry ,
87)
8+ from testapp .views import ObjectionException
99
1010
1111def M (metric_name ):
Original file line number Diff line number Diff line change 11import pytest
22from prometheus_client import REGISTRY
33from prometheus_client .metrics import MetricWrapperBase
4- from testapp .helpers import get_middleware
5- from testapp .test_middleware import M , T
64
75from django_prometheus .middleware import (
86 Metrics ,
97 PrometheusAfterMiddleware ,
108 PrometheusBeforeMiddleware ,
119)
1210from django_prometheus .testutils import assert_metric_diff , save_registry
11+ from testapp .helpers import get_middleware
12+ from testapp .test_middleware import M , T
1313
1414EXTENDED_METRICS = [
1515 M ("requests_latency_seconds_by_view_method" ),
Original file line number Diff line number Diff line change 11import pytest
2- from testapp .models import Dog , Lawn
32
43from django_prometheus .testutils import assert_metric_diff , save_registry
4+ from testapp .models import Dog , Lawn
55
66
77def M (metric_name ):
Original file line number Diff line number Diff line change 11from django .contrib import admin
22from django .urls import include , path , re_path
3+
34from testapp import views
45
56urlpatterns = [
Original file line number Diff line number Diff line change 55from django .http import FileResponse
66from django .shortcuts import render
77from django .template .response import TemplateResponse
8+
89from testapp .models import Lawn
910
1011
Original file line number Diff line number Diff line change @@ -5,18 +5,12 @@ build-backend = "setuptools.build_meta"
55[tool .pytest .ini_options ]
66addopts = " --ignore django_prometheus/tests/end2end"
77
8- [tool .isort ]
9- multi_line_output = 3
10- line_length = 88
11- force_grid_wrap = 0
12- include_trailing_comma = true
13-
14- [tool .black ]
15- line-length = 120
16-
178[tool .ruff ]
189line-length = 120
10+ target-version = " py38"
1911
12+ [tool .ruff .lint ]
13+ select = [" I" ]
2014
2115[tool .tox ]
2216legacy_tox_ini = """
@@ -56,18 +50,14 @@ commands =
5650
5751[testenv:py39-lint]
5852deps =
59- black==23.3.0
6053 flake8
61- ruff==0.0.262
62- isort>=5.12.0,<6
54+ ruff==0.8.2
6355 flake8-debugger
6456 flake8-2020
6557 flake8-comprehensions
6658 flake8-bugbear
6759commands =
68- black --check django_prometheus/
60+ ruff format --check django_prometheus/
6961 flake8 django_prometheus
70- isort --check-only django_prometheus/
7162 ruff check django_prometheus/
72-
7363"""
You can’t perform that action at this time.
0 commit comments