Skip to content

Commit f55b7c1

Browse files
authored
Merge pull request #203 from asherf/dups
Prepare 2.0.0 release.
2 parents 5749afa + 5de3d05 commit f55b7c1

File tree

4 files changed

+34
-21
lines changed

4 files changed

+34
-21
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
## v2.0.0 - Jan 20, 2020
4+
5+
* Added support for newer Django and Python versions
6+
* Added an extensibility that applications to add their own labels to middleware (request/response) metrics
7+
* Allow overriding and setting custom bucket values for request/response latency histogram metric
8+
* Internal improvements:
9+
* use tox
10+
* Use pytest
11+
* use Black
12+
* Automate pre-releases on every commit ot master
13+
* Fix flaky tests.
14+
15+
## v1.1.0 - Sep 28, 2019
16+
17+
* maintenance release that updates this library to support recent and supported version of python & Django

django_prometheus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
__all__ = ["middleware", "models", "pip_prometheus"]
1212

13-
__version__ = "2.0.0.dev"
13+
__version__ = "2.0.0"
1414

1515
# Import pip_prometheus to export the pip metrics automatically.
1616
try:

setup.py

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,37 @@
11
import re
22
from setuptools import find_packages, setup
33

4-
LONG_DESCRIPTION = """Django-Prometheus
4+
with open("README.md") as fl:
5+
LONG_DESCRIPTION = fl.read()
56

6-
This library contains code to expose some monitoring metrics relevant
7-
to Django internals so they can be monitored by Prometheus.io.
8-
9-
See https://github.com/korfuri/django-prometheus for usage
10-
instructions.
11-
"""
127

138
def get_version():
14-
version_file = open('django_prometheus/__init__.py', 'r').read()
15-
version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.MULTILINE)
9+
version_file = open("django_prometheus/__init__.py", "r").read()
10+
version_match = re.search(
11+
r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.MULTILINE
12+
)
1613
if version_match:
1714
return version_match.group(1)
18-
raise RuntimeError('Unable to find version string.')
15+
raise RuntimeError("Unable to find version string.")
16+
1917

2018
setup(
2119
name="django-prometheus",
2220
version=get_version(),
2321
author="Uriel Corfa",
2422
author_email="[email protected]",
25-
description=(
26-
"Django middlewares to monitor your application with Prometheus.io."),
23+
description=("Django middlewares to monitor your application with Prometheus.io."),
2724
license="Apache",
2825
keywords="django monitoring prometheus",
2926
url="http://github.com/korfuri/django-prometheus",
30-
packages=find_packages(),
27+
packages=find_packages(exclude=["tests",]),
3128
test_suite="django_prometheus.tests",
3229
long_description=LONG_DESCRIPTION,
33-
tests_require=['pytest', 'pytest-django'],
30+
long_description_content_type="text/markdown",
31+
tests_require=["pytest", "pytest-django"],
3432
setup_requires=["pytest-runner"],
3533
options={"bdist_wheel": {"universal": "1"}},
36-
install_requires=[
37-
"prometheus-client>=0.7",
38-
],
34+
install_requires=["prometheus-client>=0.7",],
3935
classifiers=[
4036
"Development Status :: 5 - Production/Stable",
4137
"Intended Audience :: Developers",

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ deps =
1111
-rrequirements.txt
1212
skip_missing_interpreters=true
1313

14-
changedir =
14+
changedir =
1515
end2end: {toxinidir}/django_prometheus/tests/end2end
1616
setenv =
1717
end2end: PYTHONPATH = {toxinidir}
18-
end2end: DJANGO_SETTINGS_MODULE=testapp.settings
18+
end2end: DJANGO_SETTINGS_MODULE=testapp.settings
1919
commands =
2020
end2end: coverage run --source=django_prometheus -m pytest testapp/
2121
unittests: coverage run --source=django_prometheus setup.py test
2222
unittests: python setup.py sdist bdist_wheel
2323

2424
[testenv:py37-lint]
25-
deps =
25+
deps =
2626
black
2727
flake8
2828
isort

0 commit comments

Comments
 (0)