Comments (6)
Now, I also see that #1718 lacks certain implementation details about the transport layer. I'm going to update it soon
from schemathesis.
and there seems to be a transition to httpx so your code would be more interoperable
from schemathesis.
everyone has his own library preferences ;). It is just my recommendation.
from schemathesis.
There is a long-running plan to switch to httpx (specifically in #1718 and previously discussed in some more issues) for multiple reasons, the main one for me is the cancellation in CLI.
While I agree with the reasoning you provided, I feel that this is more like a duplicate of #1718 that suggests providing multiple transports instead of a complete switch (it also will unblock alternative transports that could be something useful for future gRPC support). A complete switch would be backward-incompatible for many users who would be forced to switch to using httpx in their tests and with pluggable transports such a transition would be smoothened.
It is completely fine to switch rapidly for apps, but for a library on which many users rely on, I'd prefer to take a more flexible way.
As a side note, what kind of boilerplate did you mention? I am genuinely interested in reducing the amount of boilerplate, but I'd like to have some actionable inputs and clearly see how httpx will help to avoid it - it will also help me to provide a better API from the Schemathesis side for all users.
from schemathesis.
thanks! And sorry for the duplicate
Found another frustrating bug: requests.Session is incompatible with asgi/wsgi
from schemathesis.
an idea:
you have the method get_requests_kwargs. Check if the class is requests.Session or httpx.Session and transform the arguments accordingly or remove if not supported.
This way httpx Session can be used by default (and the boilerplate code removed) and requests.Session only if explicitly specified (it doesn't supports wsgi/asgi calls anyway as far as I know)
from schemathesis.
Related Issues (20)
- [FEATURE] Running incompatible checks for GraphQL should not fail the whole test run
- [BUG] Error in exception handling HOT 3
- Avoid using deprecated `cgi` module
- [FEATURE] upgrade tox, pre-commit basepython to 3.10 or 3.11 HOT 3
- [BUG] tests fail when the terminal has a different amount of columns than 80 HOT 1
- [BUG] documentation how to use graphql schemas in unittests HOT 1
- [BUG] documentation how cool hooks are HOT 3
- [BUG] filter_query hook isn't called with graphql schema HOT 2
- [FEATURE] allow selecting Type as strategy for graphql schemas HOT 2
- [BUG] as_strategy on schema doubles url HOT 4
- [QUESTION] very specific checks / unusual deps HOT 1
- [BUG] hypothesis.errors.InvalidDefinition: Type APIWorkflow defines no rules HOT 6
- [FEATURE] graphql not required handling HOT 1
- bug: Permission denied error when trying to specify junit-xml HOT 4
- [BUG] JSON parsing of responses containing goofy Unicode characters fails HOT 3
- [QUESTION] Schemathesis only ran a single POST test and marked as success, when a failure would be expected HOT 2
- [BUG] config allow_x00=False doesn't work HOT 1
- [BUG] false invalid schema HOT 7
- [BUG] False positive error message if the hooks file itself raises `ModuleNotFound`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schemathesis.