Skip to content

Commit c50f227

Browse files
Merge pull request #792 from hugapi/develop
2.5.2
2 parents 610b1ed + 676fd02 commit c50f227

File tree

6 files changed

+15
-7
lines changed

6 files changed

+15
-7
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.5.1
2+
current_version = 2.5.2
33

44
[bumpversion:file:.env]
55

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111

1212
export PROJECT_NAME=$OPEN_PROJECT_NAME
1313
export PROJECT_DIR="$PWD"
14-
export PROJECT_VERSION="2.5.1"
14+
export PROJECT_VERSION="2.5.2"
1515

1616
if [ ! -d "venv" ]; then
1717
if ! hash pyvenv 2>/dev/null; then

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ pip3 install hug --upgrade
99

1010
Ideally, within a virtual environment.
1111

12-
1312
Changelog
1413
=========
14+
### 2.5.2 hotfix - May 10, 2019
15+
- 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`.
16+
1517
### 2.5.1 hotfix - May 9, 2019
1618
- Fixed issue #784 - POST requests broken on 2.5.0
1719
- Optimizations and simplification of async support, taking advantadge of Python3.4 deprecation.

hug/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
"""
2222
from __future__ import absolute_import
2323

24-
current = "2.5.1"
24+
current = "2.5.2"

hug/api.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,11 @@ def version_router(
357357
def server(self, default_not_found=True, base_url=None):
358358
"""Returns a WSGI compatible API server for the given Hug API module"""
359359
falcon_api = self.falcon = falcon.API(middleware=self.middleware)
360-
falcon_api.req_options.keep_blank_qs_values = False
360+
if not self.api.future:
361+
falcon_api.req_options.keep_blank_qs_values = False
362+
falcon_api.req_options.auto_parse_qs_csv = True
363+
falcon_api.req_options.strip_url_path_trailing_slash = True
364+
361365
default_not_found = self.documentation_404() if default_not_found is True else None
362366
base_url = self.base_url if base_url is None else base_url
363367

@@ -510,10 +514,11 @@ class API(object, metaclass=ModuleSingleton):
510514
"started",
511515
"name",
512516
"doc",
517+
"future",
513518
"cli_error_exit_codes",
514519
)
515520

516-
def __init__(self, module=None, name="", doc="", cli_error_exit_codes=False):
521+
def __init__(self, module=None, name="", doc="", cli_error_exit_codes=False, future=False):
517522
self.module = module
518523
if module:
519524
self.name = name or module.__name__ or ""
@@ -523,6 +528,7 @@ def __init__(self, module=None, name="", doc="", cli_error_exit_codes=False):
523528
self.doc = doc
524529
self.started = False
525530
self.cli_error_exit_codes = cli_error_exit_codes
531+
self.future = future
526532

527533
def directives(self):
528534
"""Returns all directives applicable to this Hug API"""

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def list_modules(dirname):
7878

7979
setup(
8080
name="hug",
81-
version="2.5.1",
81+
version="2.5.2",
8282
description="A Python framework that makes developing APIs "
8383
"as simple as possible, but no simpler.",
8484
long_description=long_description,

0 commit comments

Comments
 (0)