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

Update dependencies to their latest versions. #16

Merged
merged 3 commits into from
Jan 8, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
lib
lib64
bin
include
man
Expand All @@ -8,3 +9,5 @@ tokenserver.egg-info
loadtest/*.xml*
loadtest/assertions.py
loadtest/html
nosetests.xml
.channel
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ COVERAGE = bin/coverage
PYLINT = bin/pylint
SERVER = dev-auth.services.mozilla.com
SCHEME = https
PYPI = http://c.pypi.python.org/simple
PYPI2 = http://c.pypi.python.org/packages
PYPI = https://pypi.python.org/simple
PYPI2RPM = bin/pypi2rpm.py --index=$(PYPI)
PYPIOPTIONS = -i $(PYPI)
CHANNEL = dev
Expand Down Expand Up @@ -65,8 +64,6 @@ build:
$(INSTALL) wsgi_intercept
$(INSTALL) pyzmq==2.1.11
bin/easy_install `bin/python ezm2c.py`
bin/easy_install `bin/python ezgevent.py`
bin/easy_install `bin/python ezgeventzmq.py`
$(CURDIR)/ezpylibmc.sh
$(BUILDAPP) -t $(TIMEOUT) -c $(CHANNEL) $(PYPIOPTIONS) $(DEPS)

Expand Down Expand Up @@ -96,7 +93,7 @@ build_rpms2:
PYTHONPATH=$(CURDIR)/lib/*/site-packages bin/pypi2rpm.py ${BUILD_TMP}/master.zip --dist-dir=$(RPMDIR)
wget -O ${BUILD_TMP}/nose-0.11.4.tar.gz http://pypi.python.org/packages/source/n/nose/nose-0.11.4.tar.gz
bin/pypi2rpm.py ${BUILD_TMP}/nose-0.11.4.tar.gz --dist-dir=$(RPMDIR)
cd ${BUILD_TMP} && wget $(PYPI2)/source/M/M2Crypto/M2Crypto-0.21.1.tar.gz#md5=f93d8462ff7646397a9f77a2fe602d17
cd ${BUILD_TMP} && wget $(PYPI)/source/M/M2Crypto/M2Crypto-0.21.1.tar.gz#md5=f93d8462ff7646397a9f77a2fe602d17
cd ${BUILD_TMP} && tar -xzvf M2Crypto-0.21.1.tar.gz && cd M2Crypto-0.21.1 && sed -i -e 's/opensslconf\./opensslconf-x86_64\./' SWIG/_ec.i && sed -i -e 's/opensslconf\./opensslconf-x86_64\./' SWIG/_evp.i && SWIG_FEATURES=-cpperraswarn $(PYTHON) setup.py --command-packages=pypi2rpm.command bdist_rpm2 --binary-only --dist-dir=$(RPMDIR) --name=python26-m2crypto
rm -rf ${BUILD_TMP}/M2Crypto*
wget -O $(BUILD_TMP)/certifi-0.0.8.tar.gz http://pypi.python.org/packages/source/c/certifi/certifi-0.0.8.tar.gz
Expand Down
78 changes: 40 additions & 38 deletions dev-reqs.txt
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
venusian==1.0a3
cornice==0.10
SQLAlchemy==0.7.6
Chameleon==2.5.3
Jinja2==2.6
Mako==0.5
MarkupSafe==0.15
venusian==1.0a8
cornice==0.16.2
SQLAlchemy==0.9.1
Chameleon==2.14
Jinja2==2.7.1
Mako==0.9.1
MarkupSafe==0.18
Paste==1.7.5.1
PasteDeploy==1.5
PasteDeploy==1.5.2
PasteScript==1.7.5
WebOb==1.2b3
pyramid==1.3
pyramid_jinja2==1.2
pyramid_debugtoolbar==0.9.4
repoze.lru==0.4
simplejson==2.2.1
WebOb==1.3.1
pyramid==1.4.3
pyramid_jinja2==1.9
pyramid_debugtoolbar==1.0.9
repoze.lru==0.6
simplejson==3.3.1
translationstring==1.1
wsgi_intercept==0.5.1
zope.component==3.11
zope.deprecation==3.5
zope.event==3.5.1
zope.interface==3.8
psutil==0.4.1
wsgi_intercept==0.6
zope.component==4.1.0
zope.deprecation==4.1.0
zope.event==4.0.2
zope.interface==4.0.5
psutil==1.2.1
ordereddict==1.1
unittest2==0.5.1
WebTest==1.3.3
Sphinx==1.1.2
docutils==0.8.1
coverage==3.5.1
greenlet==0.3.4
Pygments==1.4
cef==0.3
PyMySQL==0.5
WebTest==2.0.11
Sphinx==1.2
docutils==0.11
coverage==3.7.1
greenlet==0.4.1
Pygments==1.6
cef==0.5
PyMySQL==0.6.1
pymysql_sa==1.0
protobuf==2.4.1
gevent==0.13.7
pylibmc==1.2.2
requests==0.11.1
chardet==1.0.1
metlog-py==0.9.5
wimms==0.3
protobuf==2.5
gevent==1.0
pylibmc==1.2.3
requests==2.1
chardet==2.2.1
metlog-py==0.10
/home/rfk/repos/mozilla/services/wimms
powerhose==0.7
tokenlib==0.1
mozsvc==0.6
PyBrowserID==0.8
tokenlib==0.2
mozsvc==0.7
PyBrowserID==0.9.1
argparse==1.2.1
pyzmq==14.0.1
circus==0.10
20 changes: 0 additions & 20 deletions ezgevent.py

This file was deleted.

22 changes: 0 additions & 22 deletions ezgeventzmq.py

This file was deleted.

4 changes: 2 additions & 2 deletions ezpylibmc.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if [ -e "/opt/local/include/libmemcached/memcached.h" ]
then
LIBMEMCACHED=/opt/local/ bin/pip install pylibmc==1.2.2
LIBMEMCACHED=/opt/local/ bin/pip install pylibmc==1.2.3
else
bin/pip install pylibmc==1.2.2
bin/pip install pylibmc==1.2.3
fi
51 changes: 38 additions & 13 deletions tokenserver/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,48 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.

import sys

runner = sys.argv[0]
if runner.endswith('nosetests'):

def monkey_patch_gevent():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this monkeypatching should go somewhere else (like in util?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, sounds like a good idea, as long as we don't have to import any monkey-patchable things in order to import util module. I'll try it and see.

"""Monkey-patch gevent into core and zmq."""
try:
from gevent import monkey
from gevent_zeromq import monkey_patch
monkey.patch_all()
monkey_patch()
except ImportError:
pass
return
monkey.patch_all()
try:
import zmq
import zmq.eventloop
import zmq.eventloop.ioloop
import zmq.eventloop.zmqstream
import zmq.green
import zmq.green.eventloop
import zmq.green.eventloop.ioloop
import zmq.green.eventloop.zmqstream
except ImportError:
return
TO_PATCH = ((zmq, zmq.green),
(zmq.eventloop, zmq.green.eventloop),
(zmq.eventloop.ioloop, zmq.green.eventloop.ioloop),
(zmq.eventloop.zmqstream, zmq.green.eventloop.zmqstream))
for (red, green) in TO_PATCH:
for name in dir(red):
redval = getattr(red, name)
if name.startswith('__') or type(redval) is type(zmq):
continue
try:
greenval = getattr(green, name)
except AttributeError:
continue
if redval is not greenval:
setattr(red, name, greenval)


runner = sys.argv[0]
if runner.endswith('nosetests'):
monkey_patch_gevent()


import logging
Expand All @@ -31,13 +62,7 @@


def includeme(config):
try:
from gevent import monkey
from gevent_zeromq import monkey_patch
monkey.patch_all()
monkey_patch()
except ImportError:
pass
monkey_patch_gevent()

config.include("cornice")
config.include("mozsvc")
Expand Down
3 changes: 2 additions & 1 deletion tokenserver/tests/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,5 @@ def get_assertion(email, audience="*", issuer='browserid.org',
kwargs['email_keypair'] =\
get_keypair(hostname="not-the-right-host.com")

return make_assertion(email, audience, issuer=issuer, **kwargs)
assertion = make_assertion(email, audience, issuer=issuer, **kwargs)
return assertion.encode('ascii')
2 changes: 1 addition & 1 deletion tokenserver/tests/test_powerhose.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from logging.config import fileConfig
from ConfigParser import NoSectionError

from cornice.tests import CatchErrors
from cornice.tests.support import CatchErrors
from mozsvc.config import load_into_settings
from mozsvc.plugin import load_and_register, load_from_settings

Expand Down
4 changes: 2 additions & 2 deletions tokenserver/tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from webtest import TestApp
from pyramid import testing

from cornice.tests import CatchErrors
from cornice.tests.support import CatchErrors
from mozsvc.config import load_into_settings
from mozsvc.plugin import load_and_register, load_from_settings

Expand Down Expand Up @@ -60,7 +60,7 @@ def tearDown(self):
def _getassertion(self):
email = 'tarek@mozilla.com'
url = 'http://tokenserver.services.mozilla.com'
return make_assertion(email, url)
return make_assertion(email, url).encode('ascii')

def test_unknown_app(self):
headers = {'Authorization': 'Browser-ID %s' % self._getassertion()}
Expand Down