Commit Graph

1250 Commits

Author SHA1 Message Date
Kurt Griffiths cf011c7c8f test(bench): Add Django benchmark (#1087)
* test(bench): Add Django benchmark

* chore: Fix pep8 in django app
2017-07-20 08:40:23 -05:00
Kurt Griffiths b51d4e9a35 feat(Request): Add support for several proxy "forwarded" headers (#1083)
Add support for some "forwarded" headers, included several new
attributes and a reworking of some of the existing code to better
facilitate sharing and performance.

Also clean up a couple tiny nits in the docstrings for the sake of
consistency.
2017-07-17 16:43:06 -05:00
Kurt Griffiths c50a89d428 fix(routing): Fix field converter argstr going past closing paren (#1085) 2017-07-14 13:05:13 -05:00
Kurt Griffiths b70ae05c2d feat(routing): Add ABC for URI template field converters (#1084)
Also rename "fragment" to "value" to be consistent with the terminology
used in the docstrings.
2017-07-12 23:21:53 -05:00
Kurt Griffiths 5c2d118fe9 feat(routing): Add UUIDConverter (#1082) 2017-07-07 14:11:10 -05:00
Kurt Griffiths adc22e1a43 refactor(print_routes): Clean up test code and DRY traverse() (#1080) 2017-07-07 09:03:43 -05:00
Kurt Griffiths 60fa5f0327 docs: Updating to reflect the move to Gitter 2017-07-06 20:53:44 -05:00
Munir Contractor 826febdce6 refactor: Make the CompiledRouter pickleable (#1077)
The CompiledRouter is not pickle-able because the default responder uses
function within functions. As a result, the CompiledRouter cannot be
shared between processes using IPC mechanisms, which utilize pickles
internally. Replace the function within functions with partials of
module level functions so that the CompiledRouter can be pickled. Also,
change the traverse method to use the function wrapped by the partial to
preserve existing functionality.
2017-07-06 13:38:48 -06:00
Kurt Griffiths c50be6f3b4 feat(routing): Add DateTimeConverter (#1079)
* feat(routing): Add DateTimeConverter

* fix(routing): Remove unused slot param
2017-07-05 22:22:42 -05:00
Kurt Griffiths 72c634e8f7 doc: Rework introductory text in docs and README (#1078)
* doc: Rework introductory text in docs and README

* doc: Further improvements to intro text
2017-07-05 21:32:03 -05:00
Kurt Griffiths 25e0c3873b doc(errors): Fix RFC links (#1076) 2017-06-30 23:35:57 -05:00
Kurt Griffiths a946638c30 doc(errors): Index new error classes (#1075) 2017-06-30 19:42:11 -05:00
Kurt Griffiths eb81a2155c fix(HTTPError): Remove extra headers entry in docstring (#1074) 2017-06-30 19:19:07 -05:00
John Vrbanac 4767b07ba8 docs(errors): Removing extra "headers" entries from error docstrings (#1072)
Fixes: #1071
2017-06-30 16:16:35 -06:00
John Vrbanac 0ec653486b chore(travis): Adding gitter notification for Travis (#1073) 2017-06-30 15:47:48 -06:00
Kurt Griffiths f6ca886324 feat(API): Foundational support for URI template field converters (#1067)
Provides an initial converter (int) along with relevant plumbing and
tests. Additional converters and docs to come in future PRs.
2017-06-27 22:25:15 -05:00
wssbck fe1dfd0fad feat: Add 5xx error classes (#1066)
* feat: Add 501 Not Implemented error class

* feat: Add 504 Gateway Timeout class

* feat: Add 505 Version Not Supported class

* refactor: Update tests to rebase on master

* doc: Remove duplicates from docstrings
2017-06-27 09:15:27 -05:00
Ritesh Kadmawala ef03f4c880 Added a get_param_as_datetime() method to fetch query param as datetime (#1053)
* feat(Requests): Added a get_param_as_datetime() method to fetch query param as datetime

* fix(Request): Require UTC timezone designator

* test(Request): Require UTC timezone designator
2017-06-15 09:43:32 -05:00
Kurt Griffiths 975565ba53 test: Use 3.6 instead of 3.5 and remove xdist since it is buggy with py3 (#1069) 2017-06-15 00:02:33 -06:00
John Vrbanac 3495344ff4 feat: Request and Response media-type handling (#1050)
This is a first pass at a non-breaking change that'll allow for a customizable media handling system. This approach combines many of the suggestions brought up by the community in #145.

One the thing that is left out of this PR is handling full content negotiation (i.e. connecting the request's accept header to the response's content-type). Unfortunately, this is a harder problem to solve in a backwards compatible fashion that doesn't affect performance. However, especially as we move towards v2, I think that would be a great opportunity to revisit full negotiation. In the meantime, there are several easy workarounds for people needing this functionality.

Closes #145
2017-06-14 23:38:47 -06:00
John Vrbanac 7e31c65b9a test: DRY up test_error and removing wrapper classes for router and dep tests (#1065) 2017-05-26 10:59:27 -07:00
John Vrbanac 5da8aad15b test: Clean up hook and print api tests (#1064) 2017-05-25 11:27:14 -07:00
Serge 04d73f5256 refactor(tests): Migrate to pytest (#1057)
Convert tests to pytest
Remove ddt and testtols dependencies

Closes falconry/falcon#844
2017-05-25 10:32:55 -07:00
mayurmahajan b7cc80b8ed feat: Add referer attribute to request (#1063)
Fixes #933
2017-05-24 17:22:47 -07:00
mayurmahajan 4578017def feat: Make it easier to set content-type (#1058)
Add constants for common media types.
2017-05-24 15:29:58 -07:00
John Vrbanac f7849a8ac5 fix: Resolve PyTest and linting errors on the build (#1060) 2017-05-23 12:12:17 -07:00
Kurt Griffiths f1597d77e6 feat(CompiledRouter): Add an intermediate AST step to the compiler (#1040)
Rather than compiling the routing tree directly to Python code,
first generate an AST and then use it to produce the code. This
provides several benefits, including:

    * It makes the compilation process easier to reason about.
    * It makes it easier to keep track of indentation and whitespace.
    * It sets us up for being able to make transformations that we
      will need to do to support URI template filters, etc. in the
      future.
2017-05-17 10:47:10 -05:00
Kurt Griffiths e0abfcfc64 feat: Add CPython 3.6 support (#1048) 2017-05-10 22:39:35 -05:00
Naveen Yadav c2a6999186 feat: Add __repr__ for Request, Response, and HTTPError (#1041)
Closes #1025
2017-05-10 18:38:08 -06:00
Kurt Griffiths 403170fbb4 doc(FAQ): How to access form params (#1045) 2017-05-08 09:55:45 -05:00
Kurt Griffiths 67ca1ad679 test: Add Hug test and reorganize scripts and requirements (#1042)
Add a hug ecosystem test to validate Falcon against the most recent
Hug release, to ensure we aren't breaking anything over there. Along
the way, reorganize test scripts and requirement files since the
addition of the Hug tests would make the old structure even more
confusing than it already was.
2017-05-07 23:00:31 -05:00
Kurt Griffiths 1ae0a68dd2 doc: Move FAQ (#1044) 2017-05-07 22:48:07 -05:00
Kurt Griffiths 27a14e5458 Open 1.3.0 development 2017-05-01 17:19:45 -06:00
Kurt Griffiths f375729cbd chore: Remove build tag 2017-05-01 17:05:49 -06:00
Kurt Griffiths a648dd1c7a chore: Note Response.delete_header() in changelog (#1039) 2017-04-27 17:10:59 -05:00
Kurt Griffiths 77b5afafe3 chore: Update changelog (#1021) 2017-04-27 00:38:01 -05:00
Kurt Griffiths 097cc93aa1 doc: Clarify warning banner text (#1035) 2017-04-27 00:16:47 -05:00
Kurt Griffiths 62a3fa46d3 doc(Response): "Sets..." ---> "Set..." (#1036) 2017-04-27 00:06:23 -05:00
Ron Rothman 7b22daa3a6 Response header delete (#1032)
* added Response.delete_header()

* feat(Response): add Response.delete_header()

Previously, `Response` had methods to get and set headers, but no way to
delete them, once set. We came across a need to delete response headers
that had been set upstream, and without a `delete_header` method we've
had to resort to directly manipulating `Response._headers`. This PR
alleviates that abstraction-violation.
2017-04-26 21:59:04 -05:00
Kurt Griffiths 0b792f3891 doc(Request): Improve auto_parse_form_urlencoded docstring (#1038) 2017-04-26 21:30:53 -05:00
Kurt Griffiths 333e5164be chore: Disable Jython travis job (#1023) 2017-04-25 11:25:49 -06:00
Kurt Griffiths 14a9c05654 chore: Tag build as RC1 2017-04-21 15:49:30 -06:00
Kurt Griffiths b1517e8104 fix: URI template field parsing bugs (#1019)
Fix the following bugs:

    * Only the '.' special character is properly handled, even though
      some URL schemas, such as OData, make use of other characters,
      like parens.
    * Using duplicate field names leads to a nasty re error being
      raised in the case of them being contained to the same
      path segment, and a silent overwriting of param values in the
      case of field values being duplicated across multiple segments.
2017-04-20 09:41:55 -05:00
Kurt Griffiths 082dca5991 chore: Use pytest-xdist (#1018) 2017-04-14 15:41:45 -06:00
Kurt Griffiths 661c77a901 doc: Rework the tutorial (#1009)
Rework the tutorial to be more consistent, and to better explain
certain principles that drive Falcon's design.

Along the way, polish a few other areas of the docs where someone
might land during or immediate after walking through the tutorial.
2017-04-14 11:53:03 -05:00
Kurt Griffiths 77907f1548 doc: Improve errors documentation, esp. re serialization (#1012) 2017-04-13 23:04:23 -05:00
Kurt Griffiths b1e5e2c6f5 chore(tox): Cleanup tox.ini (#1017) 2017-04-13 17:41:05 -06:00
Kurt Griffiths 9cb4b24c83 test: Migrate URI template and router testing to pytest (#1016)
Note that some tests were moved from test_uri_templates to
test_default_router.
2017-04-13 17:12:36 -06:00
Kurt Griffiths da9c4fd943 fix: Broken paths in MANIFEST.in (#1015) 2017-04-13 16:59:07 -06:00
Joshua Adelman 506b39036e Add LICENSE to MANIFEST.in (#1014) 2017-04-10 17:20:01 -06:00