3378 Commits

Author SHA1 Message Date
Benoit Chesneau
a7e14e16fd docs: replace sponsors section with expanded support section
Update README.md and docs homepage with detailed support messaging
including sponsorship benefits and corporate contact information.
2026-02-02 21:49:15 +01:00
Benoit Chesneau
3bf529f6c2 docs: sync news.md with 2026-news.md 2026-02-02 14:28:37 +01:00
Benoit Chesneau
1f4f245d76
Merge pull request #3478 from benoitc/feature/asgi-compliance-testbed
Add ASGI compliance test suite
2026-02-02 14:20:52 +01:00
Benoit Chesneau
e1519c0569 docs: add ASGI compliance test suite to changelog 2026-02-02 14:11:22 +01:00
Benoit Chesneau
0885005b08 fix(tests): correct assertions in ASGI compliance tests
- Fix path expectation in test_scope_path_preserved (router strips /http prefix)
- Fix lifespan state check to use scope_state instead of module_state
- Add tolerance for partial failures in proxy concurrent test
- Add retry logic with proper assertions in HTTPS proxy FastAPI test
2026-02-02 14:04:26 +01:00
Benoit Chesneau
658924c436 docs: update changelog for 25.0.1 2026-02-02 10:17:50 +01:00
Benoit Chesneau
c5b6e82277 chore: bump version to 25.0.1 2026-02-02 10:16:07 +01:00
Benoit Chesneau
ce352dc230 fix(asgi): add chunked transfer encoding for streaming responses
Add chunked transfer encoding support to the ASGI worker for HTTP/1.1
streaming responses that don't have a Content-Length header. This fixes
SSE (Server-Sent Events) connections not closing properly.

Without chunked encoding or Content-Length, HTTP/1.1 clients wait for
the connection to close to determine end-of-response, causing streaming
endpoints to hang.

Also updates the celery_alternative example to use FastAPI with the
native ASGI worker and uvloop, demonstrating async task execution with
proper SSE streaming.
2026-02-02 10:13:33 +01:00
Benoit Chesneau
29b8a3a763
Merge pull request #3476 from benoitc/dependabot/github_actions/actions/checkout-6
chore(deps): bump actions/checkout from 4 to 6
2026-02-02 00:47:56 +01:00
dependabot[bot]
791ab46e1c
chore(deps): bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 23:47:36 +00:00
Benoit Chesneau
9235b72ab8
Merge pull request #3475 from benoitc/dependabot/github_actions/actions/upload-artifact-6
chore(deps): bump actions/upload-artifact from 4 to 6
2026-02-02 00:47:05 +01:00
Benoit Chesneau
26674b2ee8
Merge pull request #3474 from benoitc/dependabot/github_actions/actions/setup-python-6
chore(deps): bump actions/setup-python from 5 to 6
2026-02-02 00:46:36 +01:00
dependabot[bot]
0d8c3abe17
chore(deps): bump actions/upload-artifact from 4 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 21:42:44 +00:00
dependabot[bot]
772e4a250b
chore(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 21:42:41 +00:00
Benoit Chesneau
be54850ff8 docs: rename example title to Celery Alternative 2026-02-01 16:54:22 +01:00
Benoit Chesneau
17ac6a5254 examples: add celery_alternative example using dirty arbiters
Demonstrates replacing Celery with Gunicorn's dirty arbiters for
background task processing. Includes:

- 4 task workers: Email, Image, Data, Scheduled
- Stateful workers with persistent connections/caches
- Streaming progress for long-running tasks
- Per-app worker allocation
- Flask API with 15+ endpoints
- Docker deployment (single container vs Celery's 4+)
- Unit tests (19 tests) and integration tests
- Migration guide from Celery
2026-02-01 16:51:48 +01:00
Benoit Chesneau
9ece4a6873 docs: add GitHub icon to header, remove header.autohide 2026-02-01 15:04:41 +01:00
Benoit Chesneau
8652aec783 docs: update news.md with complete 25.0.0 changelog 2026-02-01 14:50:02 +01:00
Benoit Chesneau
d621aa81f9 fix: add version number to homepage hero section 2026-02-01 14:47:48 +01:00
Benoit Chesneau
617a85ea91 docs: update 25.0.0 release date to 2026-02-01 2026-02-01 14:30:56 +01:00
Benoit Chesneau
ee933f2e30 fix(asgi): quick shutdown on SIGINT/SIGQUIT, graceful on SIGTERM
- SIGINT/SIGQUIT triggers immediate shutdown, skipping connection waits
- SIGTERM triggers graceful shutdown, waiting for connections
- Arbiter forwards SIGQUIT to workers if received during graceful shutdown
- Workers have 2s to exit cleanly after quick shutdown before SIGKILL
2026-02-01 10:06:23 +01:00
Benoit Chesneau
98ef198baa docs: update security policy for maintained versions 24.1.1 and 25.0.0 2026-02-01 09:27:03 +01:00
Benoit Chesneau
911e333b4e chore: replace RST with markdown, remove docs-lint and readthedocs config 2026-02-01 09:23:15 +01:00
Benoit Chesneau
7ff671bca3 chore: replace README.rst with README.md, remove modernization-plan.md 2026-02-01 09:18:11 +01:00
Benoit Chesneau
d5ab5dc6c1
Merge pull request #3473 from benoitc/feature/per-app-worker-allocation
feat(dirty): add per-app worker allocation for memory optimization
2026-02-01 09:06:05 +01:00
Benoit Chesneau
d563a7e436 chore: bump version to 25.0.0 2026-02-01 09:05:10 +01:00
Benoit Chesneau
86264ef900 docs: add per-app worker allocation to 25.0.0 changelog 2026-02-01 08:32:46 +01:00
Benoit Chesneau
c4fe116d71 docs: add per-app worker allocation documentation 2026-02-01 03:15:22 +01:00
Benoit Chesneau
1af599769f docs: regenerate settings.md 2026-02-01 03:11:42 +01:00
Benoit Chesneau
1d0df29796 feat(dirty): add class attribute workers support and e2e tests
- Add get_app_workers_attribute() to read workers class attribute
- Update _parse_app_specs() to check class attribute when no config override
- Add Docker-based e2e tests for per-app worker allocation
- Add test apps: HeavyModelApp (workers=2), LightweightApp
- Add unit tests for get_app_workers_attribute function
- Add integration tests for class attribute detection
2026-02-01 03:04:35 +01:00
Benoit Chesneau
8559854b4f feat(dirty): add per-app worker allocation for memory optimization
Allow dirty apps to specify how many workers should load them, enabling
significant memory savings for heavy applications like ML models.

- Add `workers` class attribute to DirtyApp (None = all workers)
- Add `parse_dirty_app_spec()` to parse "module:Class:N" format
- Add `DirtyNoWorkersAvailableError` for app-specific error handling
- Update DirtyArbiter with per-app worker tracking and routing
- Maintain backward compatibility when no dirty_apps configured

Example: 8 workers x 10GB model = 80GB RAM needed
With workers=2: 2 x 10GB = 20GB RAM (75% savings)

Configuration formats:
- Class attribute: `workers = 2` on DirtyApp subclass
- Config format: `module:class:N` (e.g., `myapp.ml:HugeModel:2`)
2026-02-01 02:40:09 +01:00
Benoit Chesneau
1591a6c773 fix: iPad mobile menu and documentation link warnings
- Fix mobile side menu not displaying on iPad by keeping site_nav
  content but hiding sidebar on desktop via CSS
- Fix broken links in asgi.md and guides/http2.md
- Add HTTP/2 guide to navigation
2026-01-30 01:29:45 +01:00
Benoit Chesneau
bca7c6fce9 fix: sync eventlet deprecation notice in config.py 2026-01-28 13:58:12 +01:00
Benoit Chesneau
490817d149 docs: update changelog for 25.0.0
- Add ALPN fix for gevent/eventlet workers
- Add eventlet worker deprecation notice
- Update HTTP/2 feature to mention gevent example
- Remove eventlet from HTTP/2 supported workers list
2026-01-28 13:43:54 +01:00
Benoit Chesneau
315e7bde80 fix(http2): ALPN negotiation for gevent/eventlet workers
- Add explicit do_handshake() in base_async.py before ALPN check
  when do_handshake_on_connect is False
- Mark eventlet worker as deprecated (removal in 26.0)
- Add HTTP/2 gevent example with Docker and tests
- Update documentation to reflect eventlet deprecation
- Remove eventlet websocket example (gevent version exists)

The ALPN fix ensures HTTP/2 works correctly with gevent and eventlet
workers when do_handshake_on_connect config is False (the default).
Without explicit handshake, selected_alpn_protocol() returns None.
2026-01-28 13:42:48 +01:00
Benoit Chesneau
200977bc0b docs: update 25.0.0 changelog with all changes since 24.0
- Fix PR references for HTTP/2 and Early Hints (#3468)
- Add uWSGI protocol support for ASGI worker (#3467)
- Add bug fixes: setproctitle, 100-continue, macOS segfault
- Add changes: remove obsolete Makefile targets (#3471)
2026-01-28 11:45:36 +01:00
Benoit Chesneau
d6dcb686de
Merge pull request #3468 from benoitc/feature/http2-support
Add HTTP/2 support (RFC 7540) and HTTP 103 Early Hints (RFC 8297)
2026-01-28 10:25:31 +01:00
Benoit Chesneau
fba07af47c
Merge pull request #3471 from adk-swisstopo/makefile
Remove obviously broken make targets.
2026-01-27 17:00:27 +01:00
Benoit Chesneau
6cc20d3a71 fix(http2): fix pylint errors in connection modules
- Reorder exception handlers: specific exceptions before ProtocolError
- Extract _wait_for_flow_control_window() to reduce return statements
- Refactor flow control waiting to avoid too-many-return-statements
2026-01-27 16:57:39 +01:00
Benoit Chesneau
49193223d5 docs(http2): add performance tuning section
- Add three tuning profiles: Conservative, Balanced, High Concurrency
- Document pros/cons and trade-offs for each HTTP/2 setting
- Add Linux kernel tuning parameters for high concurrency
- Add Docker-specific tuning recommendations
- Include benchmark results from h2load testing
2026-01-27 16:11:05 +01:00
Benoit Chesneau
34dc8b8fad docs(http2): add RFC compliance, security, and testing sections
- Add RFC compliance table covering RFC 7540, 9113, 7541, 8297
- Document security considerations and built-in protections
- Add recommended security-hardened configuration example
- Document compliance testing with h2spec and nghttp2 tools
- Note that Server Push is intentionally not implemented
2026-01-27 15:42:53 +01:00
Benoit Chesneau
4e3245a0df fix(http2): achieve 100% h2spec compliance (146/146 tests)
- Send GOAWAY with correct error codes for protocol violations
- Handle StreamClosedError and FlowControlError gracefully
- Return False instead of raising for missing/closed streams
- Handle flow control window overflow per RFC 7540
- Fix reader race condition and add h2 exception handling
- Wait for WINDOW_UPDATE when flow control window is zero/negative
- Use h2 exception's error_code for INITIAL_WINDOW_SIZE violations
2026-01-27 15:42:42 +01:00
Benoit Chesneau
fa5e319f15 docs(http2): add ASGI example demonstrating priority and trailers
Add complete HTTP/2 example in examples/http2_features/:
- ASGI app showing priority access and trailer sending
- Test script using raw h2 library for HTTP/2 testing
- Docker setup for easy testing
- Documentation update referencing the example

The example demonstrates:
- Reading http.response.priority extension in ASGI scope
- Sending http.response.trailers messages
- Multiple streams on the same connection
2026-01-27 13:15:36 +01:00
Benoit Chesneau
0f298e4838 feat(http2): add response trailer support 2026-01-27 12:33:12 +01:00
Benoit Chesneau
655716a181 feat(http2): add stream priority support (RFC 7540 Section 5.3) 2026-01-27 11:44:33 +01:00
Benoit Chesneau
251d8ebe51 fix(http2): validate frame size per RFC 7540 (16384-16777215) 2026-01-27 10:51:29 +01:00
Benoit Chesneau
a3185d9384 fix: update HTTP/2 settings version to 25.0.0
HTTP/2 is being released in 25.0.0, not 24.0.0
2026-01-27 10:07:42 +01:00
Benoit Chesneau
df5d7ad6d2 fix: resolve ruff lint warnings in HTTP/2 code
- Remove unused imports in test files
- Rename loop variable to avoid shadowing sock import
- Remove unused ssock variable in conftest
2026-01-27 10:03:54 +01:00
Benoit Chesneau
17b3786186 Update test to expect :authority override per RFC 9113 2026-01-27 09:59:35 +01:00
Benoit Chesneau
66d0880c74 Address PR #3468 review feedback
- Guard early_hints callback against calls after response started
- Fix :authority precedence over Host header per RFC 9113 section 8.3.1
- Add nginx early_hints documentation link
- Use standard port 443 in curl examples
2026-01-27 09:59:35 +01:00