From a92647e00a4233b4976f32e0e5b7a2984bf32a51 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Fri, 9 Mar 2018 16:03:31 +0100 Subject: [PATCH 1/3] Get rid of six --- CHANGELOG.rst | 4 +++- kinto_emailer/tests/functional.py | 4 ++-- requirements.txt | 1 - setup.py | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1c3cad5..070c956 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,9 @@ This document describes changes between each past release. 1.1.0 (unreleased) ------------------ -- Nothing changed yet. +**Internal changes** + +- Get rid of ``six`` 1.0.1 (2017-11-21) diff --git a/kinto_emailer/tests/functional.py b/kinto_emailer/tests/functional.py index d48f895..88bf478 100644 --- a/kinto_emailer/tests/functional.py +++ b/kinto_emailer/tests/functional.py @@ -1,11 +1,11 @@ +import configparser import os.path import shutil from glob import glob -from six.moves.urllib.parse import urljoin +from urllib.parse import urljoin import unittest import requests -from six.moves import configparser from kinto_client import Client diff --git a/requirements.txt b/requirements.txt index 192ba2c..ce6ae3c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,7 +28,6 @@ repoze.lru==0.7 repoze.sendmail==4.4.1 requests==2.18.4 simplejson==3.12.0 -six==1.11.0 transaction==2.1.2 translationstring==1.3 ujson==1.35 diff --git a/setup.py b/setup.py index 7be7802..a8b7d5d 100644 --- a/setup.py +++ b/setup.py @@ -33,6 +33,9 @@ def read_file(filename): license='Apache License (2.0)', classifiers=[ "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "License :: OSI Approved :: Apache Software License" From d6de4267afb69f36830c7d7a71a94868b95a1b5b Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Tue, 17 Apr 2018 13:00:29 +0200 Subject: [PATCH 2/3] Fix tests --- .travis.yml | 8 +-- kinto_emailer/tests/config/kinto-7.X.ini | 66 ------------------------ setup.py | 1 - 3 files changed, 2 insertions(+), 73 deletions(-) delete mode 100644 kinto_emailer/tests/config/kinto-7.X.ini diff --git a/.travis.yml b/.travis.yml index 8ac25be..e5a9309 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python -python: 3.5 +python: 3.6 env: - - TOX_ENV=py35 + - TOX_ENV=py36 - TOX_ENV=kinto-master - TOX_ENV=flake8 install: @@ -17,7 +17,6 @@ matrix: - pip install tox - make install-kinto - pip install -U https://github.com/Kinto/kinto/tarball/master - - mv kinto_emailer/tests/config/kinto-7.X.ini kinto_emailer/tests/config/kinto.ini - make run-kinto & - env: - TOX_ENV=functional @@ -25,9 +24,6 @@ matrix: - pip install tox - make install-kinto - make run-kinto & - - python: 3.6 - env: - - TOX_ENV=py36 after_success: # Report coverage results to coveralls.io - pip install coveralls diff --git a/kinto_emailer/tests/config/kinto-7.X.ini b/kinto_emailer/tests/config/kinto-7.X.ini deleted file mode 100644 index 1b70ee1..0000000 --- a/kinto_emailer/tests/config/kinto-7.X.ini +++ /dev/null @@ -1,66 +0,0 @@ -# Created at Tue, 15 Mar 2016 14:53:28 +0100 -# Using Kinto version 2.0.0 - -[server:main] -use = egg:waitress#main -host = 0.0.0.0 -port = %(http_port)s - - -[app:main] -use = egg:kinto - -# -# Backends. -# -kinto.storage_backend = kinto.core.storage.memory -kinto.cache_backend = kinto.core.cache.memory -kinto.permission_backend = kinto.core.permission.memory - -# -# Auth configuration. -# userid_hmac_secret is made for preventing guessing the basicauth id from a login:pass -# -kinto.userid_hmac_secret = 4007422f41789c553cfcf31806ae6312d4316d1f15f8b10619d82c762101fb96 -multiauth.policies = basicauth - -# -# Plugins -# -kinto.includes = kinto.plugins.default_bucket - kinto.plugins.flush - kinto_emailer -mail.debug_mailer = true -mail.default_sender = kinto@restmail.net - - -# -# Logging configuration -# - -[loggers] -keys = root, kinto - -[handlers] -keys = console - -[formatters] -keys = generic - -[logger_root] -level = INFO -handlers = console - -[logger_kinto] -level = DEBUG -handlers = -qualname = kinto - -[handler_console] -class = StreamHandler -args = (sys.stderr,) -level = NOTSET -formatter = generic - -[formatter_generic] -format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s diff --git a/setup.py b/setup.py index a8b7d5d..142492a 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,6 @@ def read_file(filename): classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", From d75fb1e8028bb3fe4dd9ad6f0e2d1a91bf194f7c Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Tue, 17 Apr 2018 13:49:56 +0200 Subject: [PATCH 3/3] Patch autograph before creating collections --- kinto_emailer/tests/test_includeme.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kinto_emailer/tests/test_includeme.py b/kinto_emailer/tests/test_includeme.py index a115cbb..5eb8898 100644 --- a/kinto_emailer/tests/test_includeme.py +++ b/kinto_emailer/tests/test_includeme.py @@ -343,6 +343,7 @@ def get_app_settings(cls, extras=None): return settings def setUp(self): + self._patch_autograph() collection = { 'kinto-emailer': { 'hooks': [{ @@ -360,11 +361,11 @@ def setUp(self): self.app.post_json('/buckets/staging/collections/addons/records', {'data': {'age': 42}}, headers=self.headers) - self._patch_autograph() def _patch_autograph(self): # Patch calls to Autograph. patch = mock.patch('kinto_signer.signer.autograph.requests') + self.addCleanup(patch.stop) mocked = patch.start() mocked.post.return_value.json.return_value = [{ "signature": "",