From 24488f849ff23e2b7679a4f98f689e2e780a6102 Mon Sep 17 00:00:00 2001 From: josher19 Date: Mon, 10 Sep 2012 13:43:01 +0800 Subject: [PATCH 1/3] Update httpbin/core.py 302 instead of 301 redirect in docs for def relative_redirect_n_times --- httpbin/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpbin/core.py b/httpbin/core.py index c13f339..ad7c516 100644 --- a/httpbin/core.py +++ b/httpbin/core.py @@ -162,7 +162,7 @@ def redirect_n_times(n): @app.route('/relative-redirect/') def relative_redirect_n_times(n): - """301 Redirects n times.""" + """302 Redirects n times.""" assert n > 0 From dd7730bef7ad54c38228045c10362c6501245f7a Mon Sep 17 00:00:00 2001 From: Piotr Dobrogost Date: Wed, 24 Oct 2012 11:51:30 +0200 Subject: [PATCH 2/3] remove empty file httpbin/templates/... which is not a valid file's name under Windows. fixes issue 70 --- httpbin/templates/... | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 httpbin/templates/... diff --git a/httpbin/templates/... b/httpbin/templates/... deleted file mode 100644 index e69de29..0000000 From ee0644b1885a6f1de35d330daea0b3b1faee60c4 Mon Sep 17 00:00:00 2001 From: Piotr Dobrogost Date: Sat, 27 Oct 2012 23:58:25 +0200 Subject: [PATCH 3/3] Removed unused and/or undocumented dependencies. Fixes issue #69 --- httpbin/core.py | 7 ------- httpbin/helpers.py | 2 +- httpbin/runner.py | 2 +- requirements.txt | 6 ------ setup.py | 3 --- 5 files changed, 2 insertions(+), 18 deletions(-) diff --git a/httpbin/core.py b/httpbin/core.py index ad7c516..1f21b2d 100644 --- a/httpbin/core.py +++ b/httpbin/core.py @@ -12,10 +12,7 @@ import json import os import time -import newrelic.agent - from flask import Flask, Response, request, render_template, redirect, jsonify, make_response -from raven.contrib.flask import Sentry from werkzeug.datastructures import WWWAuthenticate from . import filters @@ -36,10 +33,6 @@ ENV_COOKIES = ( app = Flask(__name__) -# Setup error collection -sentry = Sentry(app) -newrelic.agent.initialize() - # ------ # Routes # ------ diff --git a/httpbin/helpers.py b/httpbin/helpers.py index ea45924..1c4986c 100644 --- a/httpbin/helpers.py +++ b/httpbin/helpers.py @@ -8,7 +8,7 @@ This module provides helper functions for httpbin. """ import base64 -import simplejson as json +import json from hashlib import md5 from werkzeug.http import parse_authorization_header diff --git a/httpbin/runner.py b/httpbin/runner.py index b004e97..aa32a46 100755 --- a/httpbin/runner.py +++ b/httpbin/runner.py @@ -5,7 +5,7 @@ httpbin.runner ~~~~~~~~~~~~~~ This module serves as a command-line runner for httpbin, powered by -gunicorn. +gevent. """ diff --git a/requirements.txt b/requirements.txt index bf31477..7eb0e98 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,15 +2,9 @@ Flask==0.8 Flask-Script==0.3.1 Jinja2==2.5.5 Werkzeug==0.8.1 -argparse==1.2.1 -blinker==1.2 decorator==3.3.2 distribute==0.6.15 eventlet==0.9.16 greenlet==0.3.1 gunicorn==0.13.4 -newrelic==1.2.1.265 -raven==1.9.3 -simplejson==2.4.0 -wsgiref==0.1.2 gevent \ No newline at end of file diff --git a/setup.py b/setup.py index 7525bbf..a24160e 100755 --- a/setup.py +++ b/setup.py @@ -20,11 +20,8 @@ deps = [ 'Flask-Script==0.3.1', 'Jinja2==2.5.5', 'Werkzeug==0.8.1', - 'argparse==1.2.1', 'distribute==0.6.15', - 'wsgiref==0.1.2', 'decorator==3.3.2', - 'omnijson==0.1.2', 'gevent' ]