Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using httpbin without flasgger #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mgorny
Copy link

@mgorny mgorny commented Feb 3, 2024

Make the dependency on flasgger optional. The dependency has been added relatively recently (i.e. before the original package was abandoned but after its last release), and it is only used to provide a more dynamic landing page. This is unnecessary for use of httpbin for testing, and it introduces an indirect dependency on Rust that is problematic.

With this change, flasgger is no longer installed by default. It can be enabled via "[flasgger]" extra. When flasgger is not available, httpbin redirects to the "legacy" index page.

@mgorny
Copy link
Author

mgorny commented Feb 15, 2024

Hmm, 302 response for / breaks the test suite of httpcore. I'm going to change this later today to instead serve the old index without the redirect.

Make the dependency on flasgger optional.  The dependency has been added
relatively recently (i.e. before the original package was abandoned but
after its last release), and it is only used to provide a more dynamic
landing page.  This is unnecessary for use of httpbin for testing,
and it introduces an indirect dependency on Rust that is problematic.

With this change, flasgger is no longer installed by default.  It can be
enabled via "[flasgger]" extra.  When flasgger is not available, httpbin
redirects to the "legacy" index page.
mgorny added a commit to mgorny/vcrpy that referenced this pull request Feb 16, 2024
Make the tests slightly more flexible to match both the flasgger-based
and legacy httpbin index.  This is needed for compatibility with
psf/httpbin#44 when flasgger is not installed
(e.g. on architectures that are not supported by Rust).
@ml31415
Copy link

ml31415 commented Apr 10, 2024

Seems to be a duplicate of #32 . But either way, would be great to see flasgger removed as dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants