Skip to content

Conversation

@ojxio
Copy link
Contributor

@ojxio ojxio commented Oct 22, 2025

This PR completes the httpx bump to version ^0.28.0 by updating the lock file, which was missing from a previous attempt by #320 .

Changes

  • Bump httpx version: ^0.27.0^0.28.0 in pyproject.toml
  • Bump respx version: ^0.21.1^0.22.0
  • Update poetry lock file to reflect the version change

Context

A previous PR (#320 ) updated the version constraint but didn't regenerate the lock file, which caused CI failures in practice. This PR addresses that by running the lock file update.

Summary by CodeRabbit

  • Chores
    • Tightened HTTP client dependency constraints to handle Python 3.8 separately, improving compatibility and reducing installation/runtime issues.
    • Split a development/test dependency into Python-version-specific releases so tooling selects the appropriate release per Python runtime, keeping tests and dev tools current and compatible.

@CLAassistant
Copy link

CLAassistant commented Oct 22, 2025

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link

coderabbitai bot commented Oct 22, 2025

Walkthrough

Updated pyproject.toml: adjusted httpx entries by changing the Python selector on the older entry from <=3.7<3.8 and bumping the ^3.8 entry from ^0.27.0^0.28.0; replaced the single respx dev entry with per-Python-version entries (^0.21.1 for <3.8, ^0.22.0 for ^3.8).

Changes

Cohort / File(s) Summary
Dependency manifest
pyproject.toml
httpx entries: { version = "^0.24.0", python = "<=3.7" }{ version = "^0.24.0", python = "<3.8" } and { version = "^0.27.0", python = "^3.8" }{ version = "^0.28.0", python = "^3.8" }. respx dev dependency: respx = "^0.21.1" → multi-entry list: { version = "^0.21.1", python = "<3.8" } and { version = "^0.22.0", python = "^3.8" }.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 I nibbled toml lines, nudged versions with glee,
httpx hopped up and respx split by Python degree.
A tidy little change, sorted by version and day —
I thumped a carrot, then bounded away. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The pull request title "chore: Upgrade httpx to ^0.28.0 and respx to ^0.22.0 for Python 3.8+" directly and clearly describes the primary changes in the changeset. The raw_summary confirms that httpx was upgraded from ^0.27.0 to ^0.28.0 for Python 3.8+ and that respx was updated from a single version to a matrix with ^0.22.0 for Python 3.8+, matching what the title states. The title is concise, specific, and avoids vague terminology or noise, making it immediately clear to teammates reviewing history what the main changes are.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ojxio ojxio force-pushed the chore/bump-up-httpx branch from afd76bb to c7f8f55 Compare October 22, 2025 07:56
@ojxio ojxio closed this Oct 22, 2025
@ojxio
Copy link
Contributor Author

ojxio commented Oct 22, 2025

Resolved the httpx upgrade compatibility issues:

  • The tests were failing because respx version 0.21.1 was not compatible with httpx 0.28.0 that was recently upgraded in the project.
  • Upgraded respx from version 0.21.1 to 0.22.0.

@ojxio ojxio reopened this Oct 22, 2025
@ojxio ojxio mentioned this pull request Oct 22, 2025
- Upgraded respx from 0.21.1 to 0.22.0 to resolve compatibility issues with httpx 0.28.0
- All tests now pass with the updated httpx version
@ojxio ojxio force-pushed the chore/bump-up-httpx branch from 48860ce to 3f78a6a Compare October 22, 2025 09:30
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
pyproject.toml (1)

31-34: Respx matrix is logically correct; minor formatting inconsistency.

The respx version matrix (^0.21.1 for Python ≤3.7, ^0.22.0 for Python ^3.8) properly aligns with the httpx 0.28.0 compatibility requirement mentioned in the PR.

However, there's a minor formatting inconsistency: the respx entries use {version = ... while the httpx matrix above uses { version = ... (note the space after the opening brace).

Apply this diff to align spacing with the httpx matrix:

 respx = [
-    {version =  "^0.21.1", python = "<=3.7" },
-    {version =  "^0.22.0", python = "^3.8" },
+    { version = "^0.21.1", python = "<=3.7" },
+    { version = "^0.22.0", python = "^3.8" },
 ]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 48860ce and 3f78a6a.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml (2 hunks)
🔇 Additional comments (1)
pyproject.toml (1)

13-16: httpx version matrix update looks good.

The constraint maintains backward compatibility for Python 3.7 (keeping ^0.24.0) while bumping to ^0.28.0 for Python 3.8+, aligning with the respx compatibility requirements noted in the PR. The matrix structure is consistent with how other conditional dependencies are specified.

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.29%. Comparing base (2eb77d5) to head (3f78a6a).

@@            Coverage Diff             @@
##             main     #326      +/-   ##
==========================================
- Coverage   91.53%   91.29%   -0.24%     
==========================================
  Files          92       92              
  Lines        8646     8619      -27     
==========================================
- Hits         7914     7869      -45     
- Misses        732      750      +18     

see 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chyroc
Copy link
Collaborator

chyroc commented Oct 22, 2025

Run poetry run ruff check cozepy
All checks passed!
159 files already formatted
cozepy/config.py:1: error: Cannot find implementation or library stub for module named "httpx"  [import]
cozepy/model.py:23: error: Cannot find implementation or library stub for module named "httpx"  [import]
cozepy/model.py:296: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
cozepy/model.py:297: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
cozepy/model.py:379: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
cozepy/model.py:490: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
cozepy/model.py:491: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
cozepy/model.py:572: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
cozepy/model.py:680: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
cozepy/model.py:771: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs  [annotation-unchecked]
cozepy/request.py:14: error: Cannot find implementation or library stub for module named "httpx"  [import]
cozepy/chat/__init__.py:6: error: Cannot find implementation or library stub for module named "httpx"  [import]
cozepy/chat/__init__.py:6: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
cozepy/workflows/runs/__init__.py:4: error: Cannot find implementation or library stub for module named "httpx"  [import]
Found 5 errors in 5 files (checked 55 source files)
Error: Process completed with exit code 1.

@chyroc chyroc added the bug Something isn't working label Oct 22, 2025
@ojxio ojxio force-pushed the chore/bump-up-httpx branch from cf0a56e to cf584ce Compare October 22, 2025 12:31
@ojxio
Copy link
Contributor Author

ojxio commented Oct 22, 2025

Hi @chyroc , sorry about that, I was just able to have a python3.7 environment to run the unit tests. Now I fixed this, please take another look~

@chyroc chyroc added chore Project maintenance work not related to features and bug fixes and removed bug Something isn't working labels Oct 22, 2025
@chyroc chyroc changed the title chore: bump httpx to ^0.28.0 and update lock file chore: Upgrade httpx to ^0.28.0 and respx to ^0.22.0 for Python 3.8+ Oct 22, 2025
@chyroc chyroc merged commit 8ea0367 into coze-dev:main Oct 22, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Project maintenance work not related to features and bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants