Browse documentation

Documentation overview

Tutorial

Reference

Project

Release notes & upgrading

The changes that matter when updating an app. Version numbers are identifiers, even when Python packaging gives your leading zero a stern talking-to.

0.10: query is a cached property

Request.query now uses cached_property, matching Request.headers. It parses on first access and returns the same cached dict on later accesses. Blank values, repeated-key handling, strict UTF-8 decoding, and body-reading behavior are unchanged.

This is a breaking API change from published Wred 0.9: remove the call parentheses in handlers. No await is needed. The old call form tries to call a dict and raises TypeError, which is the dictionary's entirely reasonable objection to being treated as a function.

Migration from Wred 0.9
# Wred 0.9
query = request.query()

# Wred 0.10
query = request.query
name = request.query.get('name', 'world')

Upgrade with python -m pip install --upgrade "wred[server]==0.10", or use wred==0.10 with your own ASGI server. Version 0.10 also adds this HTML tutorial, API reference, and browser-local documentation search.

0.9: the server is optional

Wred 0.9 moves weft-server out of the required dependencies and into the server extra. The only required runtime dependency is orjson. The Python API remains imported from wred.

Your setupWhat to install
You run the weft command.python -m pip install "wred[server]==0.9"
You already install another ASGI server.python -m pip install "wred==0.9", plus that server in your application dependencies.
You run the notebook from a checkout.Install the editable server extra plus PyMongo and ServeStatic, as shown in the notebook chapter.

Record the extra in your dependency file if your app relies on Weft. Upgrading an existing environment may leave an already installed Weft package in place; a clean environment is the useful check for missing dependencies. Stale packages make excellent camouflage.

Why v0.09 corresponds to package version 0.9

The v0.09 Git tag identifies the release whose source version was 0.09. Flit normalizes that to package version 0.9 under Python’s version rules. The new v0.10 tag and source version 0.10 correspond to package version 0.10. Use the package versions in dependency requirements.

Python
from importlib.metadata import version

print(version('wred'))  # Installed distribution metadata

See the Python packaging version specification. These are version components, not decimal fractions.

Check an upgrade

  1. Install your intended version and extras in a fresh virtualenv.
  2. Run your app’s checks with its actual server and middleware stack.
  3. Exercise startup, routing, body parsing, expected errors, and protected operations.
  4. Verify proxy scheme and cookie behavior if the deployment configuration changed.

The 0.10 PyPI page provides distribution metadata. The repository history contains the source changes; this page does not invent summaries for older releases.