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

Remove drf as a dependency #91

Merged
merged 2 commits into from
Aug 27, 2019
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
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