falconry / falconry/falcon

Roadmap: 4.x

Open
#2,073 0 comments 3 reactions 0 assignees View on GitHub
community needs contributor
Dominant language
Python
Stars
9.8k
Forks
1k
Avg merge
5d 13h
Merged PRs (30d)
7

Description

# Roadmap for 4.x

## Themes

### ASGI

* Refine the implementation
* Affordances to support common SSE, WebSocket patterns (e.g., detecting closed SSE connection)
* Ecosystem integrations. https://github.com/falconry/falcon/discussions/1932

### Frequently requested "missing" features

* AuthN/Z: Affordances to support JWT, OAuth2 workflows and POLP/RBAC. Provide building blocks that can be composed to provide custom auth, Okta flows, Google OAuth2, etc. (with accompanying documented recipes (see also: https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/ and https://developer.okta.com/docs/concepts/oauth-openid/ and https://portswigger.net/research/hidden-oauth-attack-vectors and https://www.torocloud.com/podcast/oauth-web-api-security-matthias-biehl)
* Routing: Revise feature requests from the community. Add affordances to match multiple path segments? Routing to sub-applications? (See also [this discussion](https://github.com/falconry/falcon/discussions/1818).) https://github.com/falconry/falcon/issues/1950
* REST: resource representation creation and consumption; [url_for](https://github.com/falconry/falcon/issues/1264) and perhaps also opt-in pydantic support?
* Affordances to support API description format generators and frontends (e.g, OpenAPI, API Blueprint) -- check community project(s) already available for Falcon?
* Better typing (mypy) support -- add type hints or stubs to the code base, and documentation examples: https://github.com/falconry/falcon/issues/1350 & https://github.com/falconry/falcon/issues/1820. See also: [PEP 484](https://www.python.org/dev/peps/pep-0484/).
* CLI: scaffolding tool?

### Docs

* Recipes: Things like how to deploy in production, how to spawn background tasks, how to make use of ASGI lifecycle events, how to do AuthN/Z, and how to handle the DAL (SQLAlchemy, [asyncpg](https://docs.sqlalchemy.org/en/14/orm/extensions/asyncio.html), but perhaps we can also document piccolo, et al.). What else?
* Recipes: Serverless deployments (see also: https://github.com/falconry/falcon/issues/1552)
* How to make recipes easier to find? Try to link from reference docs in more places?
* ~~Update Dash docs for 3.x~~ (**won't fix**)
* Recorded talk re: Intro to Falcon? Encourage people to check out doc recipes in "where to go from here" at the end of the talk.

### Performance

* Test: Benchmarking improvements (CI gate, ASGI, etc.)
* Performance: https://github.com/falconry/falcon/issues/1664 -- also for ASGI explore if it is possible to exploit cythonization to get a slight performance bump. See also: https://github.com/falconry/falcon/pull/1860#issue-571338714 -- although cythonization offered a moderate improvement in isolated benchmarks, the actual ASGI servers seem to wrap the app in a way that degrades performance to worse than pure-Python.

## 4.0.0

- [x] CPython 3.11, 3.12 & 3.13 support
- [x] Drop 3.5, 3.6 & 3.7
- [x] Path converter
- [x] Type annotations
- [x] Mimeparse reimplementation
- [x] CHIPS support

## 4.1.0

- [x] Static route improvements
- [x] Revise cythonization process
- [x] WebSocket sink tuning & fixes

## 4.2.0

- [x] Generic `App` types
- [x] Improved performance of percent-encoding of URIs
- [x] Free-threaded wheels for CPython 3.14

## 4.3.0

- [x] New OpenAPI-focused `req.get_param_*` methods
- [x] Allow to override the default responders via `on_request()`

## 4.4.0

- [ ] Log all errors
- [ ] Ability to execute logic after the response is fully streamed

## 4.5.0

- [ ] Native OpenTelemetry integration (prototype)
- [ ] Revamp benchmarking system
- [ ] Update benchmarks on falconframework.org

## 4.6.0 and beyond

TBD: Include 1-2 doc improvements, and one "missing feature" such as url_for or basic JWT/OAuth2 affordances that can be expanded upon in future releases. Potentially also include Trio support if decided to do it and is ready.

- [ ] Docs: Additional recipes, make recipes easier to find
- [ ] Features: OpenAPI spec
- [ ] Features: url_for
- [ ] Features: full resp content type negotiation
- [ ] Performance: Basic WSGI perf gate - https://github.com/falconry/falcon/pull/1825
- [ ] Performance: Basic ASGI perf gate
- [ ] Features: Baseline JWT/OAuth2 affordances and recipes

Contributor guide

Open the contributing guide

Research direction

This issue is a broad 4.x roadmap rather than a scoped task. Start by reviewing the unchecked items under 4.4.0, 4.5.0, and 4.6.0, then follow the linked issues, pull requests, and discussions for the relevant proposal. Done would require selecting and separately scoping one roadmap item with a clear implementation target.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, python, sqlalchemy
Domain
backend-api-design, cli, databases, devops, documentation, performance, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.