From 8cc4af950eb92522f9f83f6b84fe399aab602c99 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 8 Feb 2026 11:35:39 -0600 Subject: [PATCH 1/2] fix: run web app via uvicorn/ASGI by default just seems faster --- pyproject.toml | 3 ++- src/wuttafarm/templates/install/web.conf.mako | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 48faefd..19d7982 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,8 @@ dependencies = [ "farmOS", "psycopg2", "pyramid_exclog", - "WuttaWeb[continuum]>=0.27.3", + "uvicorn[standard]", + "WuttaWeb[continuum]>=0.27.4", ] diff --git a/src/wuttafarm/templates/install/web.conf.mako b/src/wuttafarm/templates/install/web.conf.mako index 4d2b3c7..11824ab 100644 --- a/src/wuttafarm/templates/install/web.conf.mako +++ b/src/wuttafarm/templates/install/web.conf.mako @@ -13,6 +13,8 @@ ${self.section_wutta_config()} +${self.section_wutta_web()} + <%text>############################## # pyramid @@ -39,15 +41,23 @@ ${self.sectiongroup_logging()} require = %(here)s/wutta.conf +<%def name="section_wutta_web()"> +[wutta.web] +app.runner = uvicorn +app.spec = ${pkg_name}.web.app:make_asgi_app +app.factory = true +app.interface = asgi3 +app.port = ${pyramid_port} + + <%def name="section_app_main()"> [app:main] -#use = egg:wuttaweb use = egg:${egg_name} pyramid.reload_templates = true pyramid.debug_all = true pyramid.default_locale_name = en -#pyramid.includes = pyramid_debugtoolbar +#pyramid.includes = pyramid_debugtoolbar pyramid_exclog beaker.session.type = file beaker.session.data_dir = %(here)s/cache/sessions/data From 1327d1f7b2b67b310ae439d89be231a135c64578 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 8 Feb 2026 11:36:38 -0600 Subject: [PATCH 2/2] =?UTF-8?q?bump:=20version=200.2.0=20=E2=86=92=200.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++++ pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eabe9f0..c971ac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to WuttaFarm will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## v0.2.1 (2026-02-08) + +### Fix + +- run web app via uvicorn/ASGI by default + ## v0.2.0 (2026-02-08) ### Feat diff --git a/pyproject.toml b/pyproject.toml index 19d7982..e22ef70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "hatchling.build" [project] name = "WuttaFarm" -version = "0.2.0" +version = "0.2.1" description = "Web app to integrate with and extend farmOS" readme = "README.md" authors = [