diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 74c6dab20..6ea7c98c4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -28,6 +28,7 @@ This document describes changes between each past release. - Move generic API schemas (e.g TimeStamps and HeaderFields) from `kinto.core.resource.schema` to a sepate file on `kinto.core.schema`. (#1054) - Upgraded the kinto-admin to version 1.9.0 (#1086) +- Upgrade to Pyramid 1.8 (#1087) 5.3.2 (2017-01-31) diff --git a/kinto/core/__init__.py b/kinto/core/__init__.py index c64ac7481..d447840d2 100644 --- a/kinto/core/__init__.py +++ b/kinto/core/__init__.py @@ -20,7 +20,6 @@ # Module version, as defined in PEP-0396. __version__ = pkg_resources.get_distribution('kinto').version # FIXME? - DEFAULT_SETTINGS = { 'backoff': None, 'batch_max_requests': 25, diff --git a/kinto/core/authentication.py b/kinto/core/authentication.py index 76bfdbb72..56fb1d576 100644 --- a/kinto/core/authentication.py +++ b/kinto/core/authentication.py @@ -24,7 +24,7 @@ def effective_principals(self, request): def unauthenticated_userid(self, request): settings = request.registry.settings - credentials = self._get_credentials(request) + credentials = base_auth.extract_http_basic_credentials(request) if credentials: username, password = credentials if not username: diff --git a/setup.py b/setup.py index a6b6176bb..4ad35ef2a 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def read_file(filename): 'jsonschema', 'jsonpatch', 'python-dateutil', - 'pyramid >1.7,<1.8', + 'pyramid > 1.8', 'pyramid_multiauth >= 0.8', # User on policy selected event. 'ruamel.yaml', 'transaction', diff --git a/tests/core/test_initialization.py b/tests/core/test_initialization.py index e27862b36..a9edf9f64 100644 --- a/tests/core/test_initialization.py +++ b/tests/core/test_initialization.py @@ -93,7 +93,7 @@ def test_specified_default_settings_are_overriden_by_application(self): self.assertEqual(config.registry.settings['paginate_by'], 5) def test_backends_are_not_instantiated_by_default(self): - config = Configurator(settings=kinto.core.DEFAULT_SETTINGS) + config = Configurator(settings={**kinto.core.DEFAULT_SETTINGS}) kinto.core.initialize(config, '0.0.1', 'project_name') self.assertFalse(hasattr(config.registry, 'storage')) self.assertFalse(hasattr(config.registry, 'cache')) @@ -430,7 +430,7 @@ def test_http_host_overrides_the_request_headers(self): class PluginsTest(unittest.TestCase): def test_kinto_core_includes_are_included_manually(self): - config = Configurator(settings=kinto.core.DEFAULT_SETTINGS) + config = Configurator(settings={**kinto.core.DEFAULT_SETTINGS}) config.add_settings({'includes': 'elastic history'}) config.route_prefix = 'v2' @@ -442,7 +442,7 @@ def test_kinto_core_includes_are_included_manually(self): config.include.assert_any_call('history') def make_app(self): - config = Configurator(settings=kinto.core.DEFAULT_SETTINGS) + config = Configurator(settings={**kinto.core.DEFAULT_SETTINGS}) config.add_settings({ 'permission_backend': 'kinto.core.permission.memory', 'includes': 'tests.core.testplugin'