Skip to content

Commit

Permalink
Remove drf as a dependency (#91)
Browse files Browse the repository at this point in the history
* Remove drf as a dependency

* Linting
  • Loading branch information
andrewgy8 authored Aug 27, 2019
1 parent c87244f commit ff80626
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rele/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logger = logging.getLogger(__name__)

USE_EMULATOR = True if os.environ.get("PUBSUB_EMULATOR_HOST") else False
DEFAULT_ENCODER_PATH = "rest_framework.utils.encoders.JSONEncoder"
DEFAULT_ENCODER_PATH = "json.JSONEncoder"


class Subscriber:
Expand Down
1 change: 0 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
django
djangorestframework
google-cloud-pubsub
tabulate
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ def get_version(*file_paths):
url="https://github.com/mercadona/rele",
packages=find_packages(exclude=("tests",)),
include_package_data=True,
install_requires=[
"django",
"djangorestframework",
"google-cloud-pubsub",
"tabulate",
],
install_requires=["django", "google-cloud-pubsub", "tabulate"],
license="Apache Software License 2.0",
zip_safe=False,
keywords="rele",
Expand Down
5 changes: 3 additions & 2 deletions tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json

import pytest
from rest_framework.utils.encoders import JSONEncoder

from rele.config import load_subscriptions_from_paths, Config
from rele import sub
Expand Down Expand Up @@ -60,4 +61,4 @@ def test_sets_defaults(self):
assert config.gc_project_id is None
assert config.credentials is None
assert config.middleware == ["rele.contrib.LoggingMiddleware"]
assert config.encoder == JSONEncoder
assert config.encoder == json.JSONEncoder

0 comments on commit ff80626

Please sign in to comment.