Closed vytas7 closed 3 years ago
An alternative is to just support it for 3.6+ in v3. Personally I don't think it makes much sense to do something special for 3.5, since it's very marginal at this point
@vytas7 created a PR that should handle this issue.
It already works, as you mentioned. The fix for py3.5 is a trivial cast to str()
, so having it does not leave any significant technical debt imho.
Included a simple test with a Path
directory (without the str()
cast it breaks in py3.5, as expected).
It has become trendy to support
pathlib.Path
objects in addition to, or even instead of,str
where the argument in question denotes a filesystem path.We could support and document directory of type
Path
inApp.add_static_route(...)
.It currently already works implicitly via our invocation of
os.path.normpath
in Python 3.6+, but explodes on 3.5.We could either fix this for 3.5, or wait for Falcon 4.0 which will presumably drop 3.5 support, and then just document the implicit support, backed by unit tests.