Giter Site home page Giter Site logo

Comments (6)

Stranger6667 avatar Stranger6667 commented on June 14, 2024 1

Now, I also see that #1718 lacks certain implementation details about the transport layer. I'm going to update it soon

from schemathesis.

devkral avatar devkral commented on June 14, 2024

and there seems to be a transition to httpx so your code would be more interoperable

from schemathesis.

devkral avatar devkral commented on June 14, 2024

everyone has his own library preferences ;). It is just my recommendation.

from schemathesis.

Stranger6667 avatar Stranger6667 commented on June 14, 2024

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.

devkral avatar devkral commented on June 14, 2024

thanks! And sorry for the duplicate

Found another frustrating bug: requests.Session is incompatible with asgi/wsgi

from schemathesis.

devkral avatar devkral commented on June 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.