hypothesis / pyramid-sanity Goto Github PK
View Code? Open in Web Editor NEWSensible defaults to catch bad behavior
License: BSD 2-Clause "Simplified" License
Sensible defaults to catch bad behavior
License: BSD 2-Clause "Simplified" License
For: hypothesis/product-backlog#1199
This looks mostly plain sailing, but we might want to have a crack at getting webtest
up to 3.9
Both webtest
and webob
have unreleased 3.9 support in the works:
From my testing the latest versions available both support 3.8. webtest
supports 3.9, but webob
does not. As webtest
is our direct dependency I think we can ignore it.
Pyramid actually raises a specific URLDecodeError
when there's a badly-encoded path component, but by default it 500s because there isn't a builtin exception view for URLDecodeError
. Apps or extensions can register a custom exception view to catch this and turn it into a 400:
@view_config(context=URLDecodeError)
def url_decode_error(request):
return HTTPBadRequest()
This is simpler than our current invalid_path_info_tween_factory()
and is also the right solution according to the Pyramid docs for URLDecodeError
and multiple GitHub comments from Pyramid maintainers.
Unfortunately Pyramid does not raise URLDecodeError
for badly encoded query params, so that one will still have to be fixed by a tween.
See Pylons/pyramid#312 (comment) (and there are also several other maintainer comments on GitHub telling people to use an exception view for this)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.