diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 44bd7b6e..5c6d028a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.5.1 +current_version = 2.5.2 [bumpversion:file:.env] diff --git a/.env b/.env index 76bc30c5..457e14ba 100644 --- a/.env +++ b/.env @@ -11,7 +11,7 @@ fi export PROJECT_NAME=$OPEN_PROJECT_NAME export PROJECT_DIR="$PWD" -export PROJECT_VERSION="2.5.1" +export PROJECT_VERSION="2.5.2" if [ ! -d "venv" ]; then if ! hash pyvenv 2>/dev/null; then diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f221963..d3c2b929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,11 @@ pip3 install hug --upgrade Ideally, within a virtual environment. - Changelog ========= +### 2.5.2 hotfix - May 10, 2019 +- Fixed issue #790 - Set Falcon defaults to pre 2.0.0 version to avoid breaking changes for Hug users until a Hug 3.0.0 release. The new default Falcon behaviour can be defaulted before hand by setting `__hug__.future = True`. + ### 2.5.1 hotfix - May 9, 2019 - Fixed issue #784 - POST requests broken on 2.5.0 - Optimizations and simplification of async support, taking advantadge of Python3.4 deprecation. diff --git a/hug/_version.py b/hug/_version.py index 4274d84a..666034b8 100644 --- a/hug/_version.py +++ b/hug/_version.py @@ -21,4 +21,4 @@ """ from __future__ import absolute_import -current = "2.5.1" +current = "2.5.2" diff --git a/hug/api.py b/hug/api.py index 3dfd405f..0a6c35b1 100644 --- a/hug/api.py +++ b/hug/api.py @@ -357,7 +357,11 @@ def version_router( def server(self, default_not_found=True, base_url=None): """Returns a WSGI compatible API server for the given Hug API module""" falcon_api = self.falcon = falcon.API(middleware=self.middleware) - falcon_api.req_options.keep_blank_qs_values = False + if not self.api.future: + falcon_api.req_options.keep_blank_qs_values = False + falcon_api.req_options.auto_parse_qs_csv = True + falcon_api.req_options.strip_url_path_trailing_slash = True + default_not_found = self.documentation_404() if default_not_found is True else None base_url = self.base_url if base_url is None else base_url @@ -510,10 +514,11 @@ class API(object, metaclass=ModuleSingleton): "started", "name", "doc", + "future", "cli_error_exit_codes", ) - def __init__(self, module=None, name="", doc="", cli_error_exit_codes=False): + def __init__(self, module=None, name="", doc="", cli_error_exit_codes=False, future=False): self.module = module if module: self.name = name or module.__name__ or "" @@ -523,6 +528,7 @@ def __init__(self, module=None, name="", doc="", cli_error_exit_codes=False): self.doc = doc self.started = False self.cli_error_exit_codes = cli_error_exit_codes + self.future = future def directives(self): """Returns all directives applicable to this Hug API""" diff --git a/setup.py b/setup.py index 8feea514..6980eeba 100755 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ def list_modules(dirname): setup( name="hug", - version="2.5.1", + version="2.5.2", description="A Python framework that makes developing APIs " "as simple as possible, but no simpler.", long_description=long_description,