From 3be879590d1d64c2b451a675d696a0422a2cffd2 Mon Sep 17 00:00:00 2001 From: Ben Bangert Date: Fri, 7 Oct 2016 09:27:30 -0700 Subject: [PATCH 1/3] chore: tag 1.19.0 release (#685) --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ autopush/__init__.py | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 688e4a13..95bb6e51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,33 @@ + +## 1.19.0 (2016-10-07) + + +#### Features + +* move Message and Registration handlers to own validated class ([ea3b48c2](https://github.com/mozilla-services/autopush/commit/ea3b48c2fa9c3fa1c554f78fe5e367935b7aa10d)) +* handle provisioned errors gracefully (#682) ([8e5f52ad](https://github.com/mozilla-services/autopush/commit/8e5f52ad36f754013ea7fb4739b94bf5634ed7f7), closes [#658](https://github.com/mozilla-services/autopush/issues/658)) +* add user record cleanup script (#677) ([9e5a95f9](https://github.com/mozilla-services/autopush/commit/9e5a95f9004046e5195273c3d4ab7b12eaa7f63c), closes [#645](https://github.com/mozilla-services/autopush/issues/645)) +* include timestamps in tests' logs (#675) ([a3c3b82a](https://github.com/mozilla-services/autopush/commit/a3c3b82a38ed3ffe07c5e07855a009232eff8b1f)) +* add a new client_certs endpoint config option ([58e0cbbd](https://github.com/mozilla-services/autopush/commit/58e0cbbd3ebd83cff149d59281a81123a01ac428)) +* add webpush topics ([0fe241bb](https://github.com/mozilla-services/autopush/commit/0fe241bb8be36aefbdaa0a4e71549fb2355f40cd), closes [#643](https://github.com/mozilla-services/autopush/issues/643)) +* Switch to new http2 based APNS protocol ([15fea87d](https://github.com/mozilla-services/autopush/commit/15fea87d4ebe2f95f226eb4dfac6296d62fff04b)) + +#### Chore + +* remove the wsaccel dependency on pypy (#683) ([aa047f36](https://github.com/mozilla-services/autopush/commit/aa047f36f7d13c9a9094183cfaee9a289ccd8920)) +* fix travis' virtualenv giving us an older python (#664) ([f47b7435](https://github.com/mozilla-services/autopush/commit/f47b7435429771372a3d0ab2487fe5915129686e)) + +#### Bug Fixes + +* assertRaises -> assert_raises ([e417325c](https://github.com/mozilla-services/autopush/commit/e417325cfa740067414f87752ee2a855d59179aa)) +* assertTrue -> eq_ ([c01eb4de](https://github.com/mozilla-services/autopush/commit/c01eb4de19f0e9fe11f24d9028950b225e3ee383)) +* assertTrue -> ok_ ([db4e6dca](https://github.com/mozilla-services/autopush/commit/db4e6dca82ad38db66d27b5221ff6dbc5e1c5d7d)) +* adapt asserts to ok/eq_ ([e9fd8a1c](https://github.com/mozilla-services/autopush/commit/e9fd8a1c1ea9ac7e50af08136c7f352fed90aea4)) +* assert -> ok_ ([9b83d9c6](https://github.com/mozilla-services/autopush/commit/9b83d9c6d577437386380eaf688b6249d892d7fc)) +* remove extra jws_err handler which caused extra write after finish ([65c7a3a5](https://github.com/mozilla-services/autopush/commit/65c7a3a5c8216c759207df6fef599446b2c7491a)) + + + ## 1.18.0 (2016-09-20) diff --git a/autopush/__init__.py b/autopush/__init__.py index a8113692..4a9c0b7a 100644 --- a/autopush/__init__.py +++ b/autopush/__init__.py @@ -1 +1 @@ -__version__ = '1.18.0' # pragma: nocover +__version__ = '1.19.0' # pragma: nocover From de1aeb6219655a59285dc67e54780ebf0ef2063f Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Thu, 6 Oct 2016 16:25:18 -0700 Subject: [PATCH 2/3] chore: kill unneeded deps: o mccabe, pyflakes (flake8, moved to tests) o funcsigs, pbr (mock, moved to tests) o pympler (noseplugin, moved to tests) o flask/jinja2/werkzeug/markupsafe/itsdangerous/docutils (sphinx) o pluggy (tox) o characteristic, greenlet, httpretty, translationstring, xmltodict, zope.deprecation (who knows) o virtualenv (not really needed in there) --- base-requirements.txt | 19 ------------------- test-requirements.txt | 5 +++++ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/base-requirements.txt b/base-requirements.txt index 822b6159..b18a60b9 100644 --- a/base-requirements.txt +++ b/base-requirements.txt @@ -1,10 +1,5 @@ ConfigArgParse==0.10.0 -Flask==0.11.1 -Jinja2==2.8 -MarkupSafe==0.23 -Pympler==0.4.3 Twisted==16.4.0 -Werkzeug==0.11.10 apns==2.0.1 attrs==16.1.0 autobahn[twisted]==0.16.0 @@ -12,38 +7,28 @@ boto==2.42.0 boto3==1.4.0 botocore==1.4.50 cffi==1.7.0 -characteristic==14.3.0 click==6.6 contextlib2==0.5.4 cryptography==1.5 cyclone==1.1 datadog==0.13.0 decorator==4.0.10 -docutils==0.12 ecdsa==0.13 enum34==1.1.6 -funcsigs==1.0.2 future==0.15.2 futures==3.0.5 gcm-client==0.1.4 -greenlet==0.4.10 -httpretty==0.8.14 hyper==0.6.2 idna==2.1 ipaddress==1.0.16 -itsdangerous==0.24 jmespath==0.9.0 marshmallow==2.10.2 -mccabe==0.5.2 -pbr==1.10.0 -pluggy==0.3.1 pyOpenSSL==16.1.0 pyasn1==0.1.9 pyasn1-modules==0.0.8 pycparser==2.14 pycrypto==2.6.1 pyfcm==1.0.4 -pyflakes==1.2.3 python-dateutil==2.5.3 python-jose==1.3.2 raven==5.25.0 @@ -51,12 +36,8 @@ requests==2.11.0 service-identity==16.0.0 simplejson==3.8.2 six==1.10.0 -translationstring==1.3 typing==3.5.2.2 -e git+https://github.com/habnabit/txstatsd.git@157ef85fbdeafe23865c7c4e176237ffcb3c3f1f#egg=txStatsD-master txaio==2.5.1 ua_parser==0.7.1 -virtualenv==15.0.3 -xmltodict==0.10.2 -zope.deprecation==4.1.2 zope.interface==4.3.1 diff --git a/test-requirements.txt b/test-requirements.txt index 7affe932..5e2b4c76 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,8 +2,13 @@ nose coverage mock>=1.0.1 +funcsigs==1.0.2 +pbr==1.10.0 -e git+https://github.com/habnabit/txstatsd.git@master#egg=txStatsD -e git+https://github.com/bbangert/moto.git@3bdb75a961148ea5aa526f0e88d9e7835a30df3a#egg=moto flake8==3.0.4 +mccabe==0.5.2 +pyflakes==1.2.3 psutil websocket-client +Pympler==0.4.3 From dbbd0816b474e47d25e1566cf101f90c9ef4f393 Mon Sep 17 00:00:00 2001 From: jr conlin Date: Fri, 7 Oct 2016 16:12:21 -0700 Subject: [PATCH 3/3] bug: validated methods ignore raw arguments fixes: #687 --- autopush/web/health.py | 4 ++-- autopush/web/log_check.py | 2 +- autopush/web/registration.py | 6 +++--- autopush/web/simplepush.py | 2 +- autopush/web/webpush.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/autopush/web/health.py b/autopush/web/health.py index b981654b..b29ba7f5 100644 --- a/autopush/web/health.py +++ b/autopush/web/health.py @@ -14,7 +14,7 @@ class HealthHandler(BaseWebHandler): """HTTP Health Handler""" @cyclone.web.asynchronous - def get(self): + def get(self, *args, **kwargs): """HTTP Get Returns basic information about the version and how many clients are @@ -83,7 +83,7 @@ def authenticate_peer_cert(self): """skip authentication checks""" pass - def get(self): + def get(self, *args, **kwargs): """HTTP Get Returns that this node is alive, and the version. diff --git a/autopush/web/log_check.py b/autopush/web/log_check.py index 678cda5a..4576554c 100644 --- a/autopush/web/log_check.py +++ b/autopush/web/log_check.py @@ -21,7 +21,7 @@ def authenticate_peer_cert(self): pass @threaded_validate(LogCheckSchema) - def get(self, err_type=None): + def get(self, err_type=None, *args, **kwargs): """HTTP GET Generate a dummy error message for logging diff --git a/autopush/web/registration.py b/autopush/web/registration.py index 7adb8c40..47b35a74 100644 --- a/autopush/web/registration.py +++ b/autopush/web/registration.py @@ -127,7 +127,7 @@ class RegistrationHandler(BaseWebHandler): # Cyclone HTTP Methods ############################################################# @threaded_validate(RegistrationSchema) - def post(self, *args): + def post(self, *args, **kwargs): """HTTP POST Endpoint generation and optionally router type/data registration. @@ -173,7 +173,7 @@ def post(self, *args): d.addErrback(self._response_err) @threaded_validate(RegistrationSchema) - def put(self, *args): + def put(self, *args, **kwargs): """HTTP PUT Update router type/data for a UAID. @@ -214,7 +214,7 @@ def _register_channel(self, router_data=None): return endpoint, router_data @threaded_validate(RegistrationSchema) - def delete(self, *args): + def delete(self, *args, **kwargs): """HTTP DELETE Delete all pending records for the given channel or UAID diff --git a/autopush/web/simplepush.py b/autopush/web/simplepush.py index e23b3584..382e89f5 100644 --- a/autopush/web/simplepush.py +++ b/autopush/web/simplepush.py @@ -15,7 +15,7 @@ class SimplePushHandler(BaseWebHandler): cors_methods = "PUT" @threaded_validate(SimplePushRequestSchema) - def put(self, api_ver="v1", token=None): + def put(self, *args, **kwargs): sub = self.valid_input["subscription"] user_data = sub["user_data"] router = self.ap_settings.routers[user_data["router_type"]] diff --git a/autopush/web/webpush.py b/autopush/web/webpush.py index 34a59767..3ad0cd63 100644 --- a/autopush/web/webpush.py +++ b/autopush/web/webpush.py @@ -18,7 +18,7 @@ class WebPushHandler(BaseWebHandler): cors_response_headers = ("location", "www-authenticate") @threaded_validate(WebPushRequestSchema) - def post(self, api_ver="v1", token=None): + def post(self, *args, **kwargs): # Store Vapid info if present jwt = self.valid_input.get("jwt") if jwt: