Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs_update-release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Install dependencies
run: |
uv pip install --system httpx
uv pip install --system httpx2

- name: Run update_releases.py script
run: python ./docs/update_releases.py
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ plugins:
- https://docs.python.org/3/objects.inv
options:
preload_modules:
- httpx
- httpx2
- starlette
- fastapi
filters:
Expand Down
4 changes: 2 additions & 2 deletions docs/update_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pathlib import Path
from typing import List, Sequence, Tuple

import httpx
import httpx2


def find_metablock(lines: List[str]) -> Tuple[List[str], List[str]]:
Expand All @@ -28,7 +28,7 @@ def find_header(lines: List[str]) -> Tuple[str, List[str]]:

def get_github_releases() -> Sequence[Tuple[str, str]]:
# Get the latest version from GitHub releases
response = httpx.get("https://api.github.com/repos/ag2ai/FastStream/releases")
response = httpx2.get("https://api.github.com/repos/ag2ai/FastStream/releases")
row_data = response.json()
try:
return ((x["tag_name"], x["body"]) for x in reversed(row_data))
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ docs = [
"mkdocs-glightbox==0.5.2", # img zoom
"pillow", # required for mkdocs-glightbox
"cairosvg", # required for mkdocs-glightbox
"httpx==0.28.1", # using in CI
"httpx2==2.14.0", # using in CI
]

lint = [
Expand All @@ -132,7 +132,7 @@ lint = [

test-core = [
"dirty-equals==0.11",
"httpx==0.28.1",
"httpx2==2.14.0",
"pytest==9.0.3",
"pytest-asyncio==1.3.0",
"pytest-rerunfailures>=15.1",
Expand Down
6 changes: 3 additions & 3 deletions tests/cli/test_asyncapi_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from collections.abc import Callable
from typing import Any, TextIO

import httpx
import httpx2
import pytest
import yaml

Expand Down Expand Up @@ -217,7 +217,7 @@ def test_serve_asyncapi_docs_from_app(
cli.wait_for_stderr("Please, do not use it in production.")

try:
response = httpx.get("http://0.0.0.0:8000")
response = httpx2.get("http://0.0.0.0:8000")
except Exception as e:
raise RuntimeError(cli.stderr) from e

Expand Down Expand Up @@ -273,7 +273,7 @@ def test_serve_asyncapi_docs_from_file(
cli.wait_for_stderr("Please, do not use it in production.")

try:
response = httpx.get("http://0.0.0.0:8000")
response = httpx2.get("http://0.0.0.0:8000")
except Exception as e:
raise RuntimeError(cli.stderr) from e

Expand Down
12 changes: 6 additions & 6 deletions tests/cli/test_run_asgi.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import random
import time

import httpx
import httpx2
import psutil
import pytest

Expand Down Expand Up @@ -59,17 +59,17 @@ async def start(test: int, port: int) -> None:
),
):
# Test liveness
response = httpx.get(f"http://127.0.0.1:{port}/liveness")
response = httpx2.get(f"http://127.0.0.1:{port}/liveness")
assert response.text == "hello world"
assert response.status_code == 200

# Test documentation
response = httpx.get(f"http://127.0.0.1:{port}/docs")
response = httpx2.get(f"http://127.0.0.1:{port}/docs")
assert response.text.strip().startswith("<!DOCTYPE html>")
assert len(response.text) > 1200

# Test extra context
response = httpx.get(f"http://127.0.0.1:{port}/context")
response = httpx2.get(f"http://127.0.0.1:{port}/context")
assert response.json() == {"test": extra_param, "port": port}
assert response.status_code == 200

Expand Down Expand Up @@ -101,7 +101,7 @@ def test_single_worker(
"1",
),
):
response = httpx.get("http://127.0.0.1:8000/liveness")
response = httpx2.get("http://127.0.0.1:8000/liveness")
assert response.text == "hello world"
assert response.status_code == 200

Expand Down Expand Up @@ -172,6 +172,6 @@ def app_factory():
"--factory",
),
):
response = httpx.get("http://127.0.0.1:8000/liveness")
response = httpx2.get("http://127.0.0.1:8000/liveness")
assert response.text == "hello world"
assert response.status_code == 200
80 changes: 49 additions & 31 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading