Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
Rebase on graphitesender (#17)
Browse files Browse the repository at this point in the history
* Rebase on graphitesender

Issue: #15

* Include graphitesender in install_requires
  • Loading branch information
shapiy authored and ramnes committed Jun 3, 2019
1 parent 053274e commit 48f0fee
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/source/configuration.rst
Expand Up @@ -28,7 +28,7 @@ NAME Default Description
================================== ============== =============================================================================================================

.. hint::
Any parameter accepted by `the graphitesend client`_ is also valid when
Any parameter accepted by `the graphitesender client`_ is also valid when
prefixed with ``FLASK_GRAPHITE_``.

.. _`the graphitesend client`: https://github.com/daniellawrence/graphitesend
.. _`the graphitesender client`: https://github.com/Shir0kamii/graphitesender
7 changes: 3 additions & 4 deletions flask_graphite/__init__.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
import logging

from graphitesend.graphitesend import GraphiteClient, GraphiteSendException
from graphitesend import GraphiteClient, GraphiteSendException

from .hooks import MetricHook
from .request_hooks import default_hooks
Expand Down Expand Up @@ -45,10 +45,9 @@ def init_app(self, app):
try:
app.graphite = GraphiteClient(**config)
except GraphiteSendException as e:
logger.error("can't instanciate graphite client: {}".format(e))
logger.error("can't instantiate graphite client: {}".format(e))
else:
logger.info("graphite client instantiated with config: %s",
config)
logger.info("graphite client instantiated with config: %s", config)
for hook in default_hooks:
hook.register_into(app)

Expand Down
2 changes: 1 addition & 1 deletion flask_graphite/hooks.py
@@ -1,7 +1,7 @@
import logging

from flask import current_app
from graphitesend.graphitesend import GraphiteSendException
from graphitesend import GraphiteSendException

from .utils import get_request_metric_prefix

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,5 +1,5 @@
flask
graphitesend
graphitesender

flake8
flake8-isort
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -21,7 +21,7 @@ def get_description():
platform='any',
install_requires=[
'Flask>=0.12',
'graphitesend>=0.10.0'
'graphitesender>=0.11.2'
],
classifiers=[
'Environment :: Web Environment',
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
@@ -1,5 +1,5 @@
import flask
import graphitesend.graphitesend
import graphitesend
import pytest

from flask_graphite import FlaskGraphite
Expand Down Expand Up @@ -30,6 +30,6 @@ def mocked_app(mocker, plugged_app):

@pytest.fixture
def graphitesend_client(mocker):
client = graphitesend.graphitesend.GraphiteClient(dryrun=True)
client = graphitesend.GraphiteClient(dryrun=True)
mocker.patch.object(client, "send")
return client

0 comments on commit 48f0fee

Please sign in to comment.