Skip to content

infra: migrate to uv and ruff - #251

Merged
JonasKs merged 20 commits into
vibber-ai:mainfrom
rhuanbarreto:migrate-uv
Jul 2, 2026
Merged

infra: migrate to uv and ruff#251
JonasKs merged 20 commits into
vibber-ai:mainfrom
rhuanbarreto:migrate-uv

Conversation

@rhuanbarreto

@rhuanbarreto rhuanbarreto commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

Closes #210
Closes #268

@JonasKs JonasKs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh wow, tusen takk! ☺️

I'm on vacation, so I won't be able to do a proper review until late next week/early August.

Comment thread pyproject.toml Outdated
@rhuanbarreto

Copy link
Copy Markdown
Contributor Author

Hi @JonasKs . Any chance to look into it?

@JonasKs

JonasKs commented Aug 22, 2025

Copy link
Copy Markdown
Member

Hi, om so sorry, I've totally forgotten. I'll try to get to it this weekend. Thanks for the ping!

@JonasKs

JonasKs commented Aug 29, 2025

Copy link
Copy Markdown
Member

Sorry! I didn't get time to do this. I'll get to it next week!

Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml
@rhuanbarreto

Copy link
Copy Markdown
Contributor Author

I'm closing as there's little interest in the migration. Feel free to reopen if it's interesting to keep moving forward.

@JonasKs JonasKs reopened this Jul 1, 2026
JonasKs and others added 2 commits July 1, 2026 17:06
- set requires-python to >=3.11 and relock dependencies
- run the CI test matrix on Python 3.11, 3.12 and 3.13
- bump ruff target-version to py311 and add 3.12/3.13 classifiers
- point package URLs and author contact at the vibber-ai org

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	CONTRIBUTING.md
#	pyproject.toml
#	tests/multi_tenant/test_websocket.py
@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

- add Python 3.14 to the CI matrix and the classifiers
- bump the dev/test dependencies to versions with 3.13/3.14 wheels
  (pytest, pytest-asyncio, anyio, trio, openapi-spec-validator, ...) and
  drop the unused pytest-aiohttp and ipython
- constrain httpcore >=1.0.9 (older releases fail to import on 3.14) while
  keeping httpx <0.28 for the test client's app= shortcut
- reset FastAPI dependency overrides between tests so the order the suite
  runs in can no longer leak configuration between tests
- test against FastAPI 0.111.1 and 0.138.2 and default the lockfile to
  0.138.2; update the OpenAPI schema test for pydantic's additionalProperties
  and FastAPI's scoped security requirements (skipping the strict check on
  older FastAPI where the schema differs)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
JonasKs and others added 3 commits July 2, 2026 11:31
The [tool.ruff] include/exclude patterns were copied from black's regex
config, but ruff uses globs — so ruff matched zero files and every
"passing" ruff run was vacuous. Remove them in favour of ruff's defaults.

- restore import sorting (I) and syntax upgrades (UP) via ruff lint rules,
  replacing the isort and pyupgrade hooks the migration dropped, and
  delete the now-dead [tool.isort] section
- apply the resulting fixes across the codebase (PEP 604 unions, builtin
  generics, collections.abc imports, sorted imports)
- bump cryptography floor to >=48.0.1 (vibber-ai#268) so the migration doesn't
  reintroduce the vulnerable range

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- convert the test clients from the removed AsyncClient(app=...) shortcut
  to ASGITransport, unpin respx and drop the httpcore constraint that
  only existed to keep the old httpx importable on Python 3.14
- README/docs: uv is the standard installer now (drop pip/poetry
  variants), python badge 3.11+, replace black/isort badges with ruff

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fold in the open dependabot bumps: actions/checkout v5,
actions/setup-python v6, actions/setup-node v6, codeql-action v4,
requests 2.34.2. actions/cache is no longer used (setup-uv caches) and
h11 is already on 0.16.0. Also pass CODECOV_TOKEN to the codecov upload.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JonasKs and others added 2 commits July 2, 2026 11:47
The package imports pydantic v2 APIs (ConfigDict), so the advertised
fastapi>0.68.0 floor could never import — FastAPI below 0.100 pins
pydantic v1. Declare the floor CI actually tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- swap the HTTP client from httpx to httpx2 (pydantic's maintained
  continuation) in the library, demo project and tests; this also
  removes starlette's TestClient deprecation warning
- mock outbound calls with pytest-httpx2 (the respx author's httpx2
  plugin); keep the old fixture semantics of not requiring every mocked
  route to be called, and keep classic httpx.Response objects in
  side_effect lists until respx supports fork response types
  (lundberg/respx#324)
- declare pydantic>=2.6.2 explicitly — the package imports pydantic v2
  APIs directly and can't rely on FastAPI's permissive pydantic range
- version 5.2.1

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@JonasKs
JonasKs merged commit d44e1b7 into vibber-ai:main Jul 2, 2026
10 checks passed
@JonasKs

JonasKs commented Jul 2, 2026

Copy link
Copy Markdown
Member

@rhuanbarreto thanks for your work here! Sorry it took a while.

@rhuanbarreto
rhuanbarreto deleted the migrate-uv branch July 2, 2026 10:37
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.

Upgrade to cryptography >= 48.0.1 Migrate to uv, rye and ruff

4 participants