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

Commit

Permalink
chore: update twisted per CVE-2019-12855
Browse files Browse the repository at this point in the history
also rename non-Test classes to hide from py.test capture

Issue #1358
  • Loading branch information
pjenvey committed Feb 14, 2020
1 parent 74af3ca commit 97dcdf1
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion autopush/tests/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


@implementer(ILogObserver)
class TestingLogObserver(object):
class _TestingLogObserver(object):
def __init__(self):
self._events = []

Expand Down
4 changes: 2 additions & 2 deletions autopush/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from autopush.tests.client import Client


class TestHandler(RequestHandler):
class _TestHandler(RequestHandler):
def get(self):
self.write("Something")

Expand Down Expand Up @@ -61,7 +61,7 @@ def post(self):

def mock_app_builder():
return Application([
(r'/testing/', TestHandler),
(r'/testing/', _TestHandler),
(r'/deferred_testing/', DeferredTestHandler),
(r'/cookie_testing/', CookieTestHandler),
], cookie_secret="insecure")
Expand Down
6 changes: 3 additions & 3 deletions autopush/tests/test_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from autopush.http import EndpointHTTPFactory
from autopush.logging import begin_or_register
from autopush.tests.client import Client
from autopush.tests.support import TestingLogObserver
from autopush.tests.support import _TestingLogObserver
from autopush.web.health import HealthHandler, StatusHandler
from autopush.web.dockerflow import LBHeartbeatHandler, VersionHandler
import autopush.tests
Expand All @@ -38,7 +38,7 @@ def setUp(self):
db.setup_tables()

# ignore logging
logs = TestingLogObserver()
logs = _TestingLogObserver()
begin_or_register(logs)
self.addCleanup(globalLogPublisher.removeObserver, logs)

Expand Down Expand Up @@ -114,7 +114,7 @@ def setUp(self):
)

# ignore logging
logs = TestingLogObserver()
logs = _TestingLogObserver()
begin_or_register(logs)
self.addCleanup(globalLogPublisher.removeObserver, logs)

Expand Down
4 changes: 2 additions & 2 deletions autopush/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
from autopush.utils import base64url_encode, normalize_id
from autopush.metrics import SinkMetrics, DatadogMetrics
import autopush.tests
from autopush.tests.support import TestingLogObserver
from autopush.tests.support import _TestingLogObserver
from autopush.websocket import PushServerFactory

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -351,7 +351,7 @@ class IntegrationBase(unittest.TestCase):
)

def setUp(self):
self.logs = TestingLogObserver()
self.logs = _TestingLogObserver()
begin_or_register(self.logs)
self.addCleanup(globalLogPublisher.removeObserver, self.logs)

Expand Down
4 changes: 2 additions & 2 deletions autopush/tests/test_log_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from autopush.http import EndpointHTTPFactory
from autopush.logging import begin_or_register
from autopush.tests.client import Client
from autopush.tests.support import TestingLogObserver
from autopush.tests.support import _TestingLogObserver
from autopush.web.log_check import LogCheckHandler


Expand All @@ -23,7 +23,7 @@ def setUp(self):
statsd_host=None,
)

self.logs = TestingLogObserver()
self.logs = _TestingLogObserver()
begin_or_register(self.logs, discardBuffer=True)
self.addCleanup(globalLogPublisher.removeObserver, self.logs)

Expand Down
20 changes: 12 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ datadog==0.34.0
decorator==4.4.1 # via datadog
docutils==0.15.2 # via botocore
ecdsa==0.15 # via python-jose
enum34==1.1.6 # via cryptography, h2
enum34==1.1.6 # via cryptography, grpcio, h2
firebase-admin==3.2.1
futures==3.3.0 # via google-api-core, s3transfer
futures==3.3.0 # via google-api-core, grpcio, s3transfer
gcm-client==0.1.4
google-api-core==1.16.0 # via google-cloud-core
google-api-core[grpc]==1.16.0 # via firebase-admin, google-cloud-core, google-cloud-firestore
google-api-python-client==1.7.11 # via firebase-admin
google-auth-httplib2==0.0.3 # via google-api-python-client
google-auth==1.11.0 # via google-api-core, google-api-python-client, google-auth-httplib2, google-cloud-storage
google-cloud-core==1.3.0 # via google-cloud-storage
google-cloud-core==1.3.0 # via google-cloud-firestore, google-cloud-storage
google-cloud-firestore==1.6.2 # via firebase-admin
google-cloud-storage==1.25.0 # via firebase-admin
google-resumable-media==0.5.0 # via google-cloud-storage
googleapis-common-protos==1.51.0 # via google-api-core
graphviz==0.13.2 # via objgraph
grpcio==1.27.2 # via google-api-core
h2==2.6.2 # via hyper
hpack==3.0.0 # via h2
httplib2==0.17.0 # via google-api-python-client, google-auth-httplib2, oauth2client
Expand All @@ -51,27 +53,29 @@ objgraph==3.4.1
protobuf==3.11.3 # via google-api-core, googleapis-common-protos
pyasn1-modules==0.2.8 # via google-auth, oauth2client, service-identity
pyasn1==0.4.8
pycparser==2.19 # via cffi
pyfcm==1.4.7
pyhamcrest==1.10.1 # via twisted
pyopenssl==19.0.0
python-dateutil==2.8.1 # via botocore
python-jose==3.1.0
pytz==2019.3 # via google-api-core
pytz==2019.3 # via google-api-core, google-cloud-firestore
raven==6.10.0
requests==2.22.0
rsa==4.0 # via google-auth, oauth2client, python-jose
s3transfer==0.3.2 # via boto3
service-identity==18.1.0
simplejson==3.17.0
six==1.14.0 # via autobahn, automat, cryptography, ecdsa, firebase-admin, google-api-core, google-api-python-client, google-auth, google-resumable-media, marshmallow-polyfield, oauth2client, protobuf, pyhamcrest, pyopenssl, python-dateutil, python-jose, treq, txaio
six==1.14.0 # via autobahn, automat, cryptography, ecdsa, firebase-admin, google-api-core, google-api-python-client, google-auth, google-resumable-media, grpcio, marshmallow-polyfield, oauth2client, protobuf, pyhamcrest, pyopenssl, python-dateutil, python-jose, treq, txaio
treq==18.6.0
twisted[tls]==19.2.1
twisted[tls]==19.10.0
txaio==18.8.1 # via autobahn
typing==3.7.4.1
ua-parser==0.9.0
uritemplate==3.0.1 # via google-api-python-client
urllib3==1.25.8 # via botocore, requests
wsaccel==0.6.2 ; platform_python_implementation == "CPython"
zope.interface==4.7.1

# The following packages are considered to be unsafe in a requirements file:
# setuptools==44.0.0 # via google-api-core, google-auth, protobuf, zope.interface
# setuptools

0 comments on commit 97dcdf1

Please sign in to comment.