Skip to content

Update dependency Pyjoyment to >=0.4.0 - #25

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pyjoyment-0.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pyjoyment-0.x

Conversation

@renovate

@renovate renovate Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
Pyjoyment (changelog) >=0.3.0 → >=0.4.0 age confidence

Release Notes

pyjoyment/Pyjoyment (Pyjoyment)

v0.4.0

Compare Source

Pyjoyment 0.4.0 is about running applications in production. Routes of long requests, as to a language model, get their timeouts, a heartbeat and the cancellation of an action whose client has gone. An access log, logs of a file per day, precompressed and cached static files, and a guide to run a Django project on the servers of Pyjoyment in the place of gunicorn come with it.

pip install -U Pyjoyment
uv add 'Pyjoyment>=0.4.0'

Long requests

  • Cancellation. An async def action is cancelled when its connection closes before its response ends, as when the client goes away or the inactivity timeout passes, with the request of the user agent that it waits for, so a request to a slow service does not go on for nobody. An action that has rendered its response runs to its end. cancel() of a promise of the user agent closes its connection, and Pyjo.Promise.new(cancel=...) gives a promise a cancellation of its own. (#​611)

  • Timeouts of a route. inactivity_timeout and request_timeout of a route, or of a group of under, are set before its first action. After the deadline of request_timeout, the action is cancelled and the client gets a 504. The helper request_timeout sets it in an action. (#​612)

  • Heartbeat. The helper heartbeat, or heartbeat of a route, sends a comment every few seconds in a stream of Server-Sent Events, and pings in a WebSocket, which closes the connection of a peer that does not answer, so that proxies and load balancers keep a stream that waits. (#​614)

    # Ten minutes of silence, and two minutes to the end of the response at most
    r.post('/chat', {'inactivity_timeout': 600, 'request_timeout': 120}).to('chat#reply')
    
    # A stream of events with a comment every 15 seconds
    r.get('/events', {'heartbeat': 15}).to('chat#events')
  • Long requests in the cookbook: a user agent for a slow service, and the timeouts of what is in front of the application, nginx, Caddy, the load balancers of AWS and Google Cloud, CloudFront, Cloud Run, the Gateway API of Kubernetes, API Gateway and AWS Lambda, against the ones of a route. (#​615)

Logs

  • Access log. The plugin AccessLog writes a line for each response, the static files, the mounted applications and the 404 of the router too, in the combined format by default, common, any LogFormat of Apache, or JSON with the fields of Cloud Logging. It takes the client from a header of a gateway, leaves out the endpoints of Health, logs 499 for a client that closed the connection, as nginx does, and writes each line at once, so the workers of prefork do not mix them. (#​596, #​598)

    app.plugin('AccessLog')
    app.plugin('AccessLog', format='json', client='X-Envoy-External-Address', status=400)
    app.plugin('AccessLog', log='/var/log/myapp/access-%Y-%m-%d.log', tz='UTC')
  • A file of each period. A path of Pyjo.Log with the directives of strftime, as /var/log/myapp/%Y-%m-%d.log, is a new file of each day, which the workers of a server share. tz is the time zone of the name of the file and of the time of the messages, local time by default. (#​597)

Static files

  • Precompressed variants. Pyjoyment.Static serves the .br, .zst and .gz file next to a static file to a client that takes its encoding, with Vary: Accept-Encoding, as gzip_static of nginx does. app.static.encodings = {} turns it off. --compress of generate dockerfile and generate lambda-zip writes the variants in the image or the ZIP file, and --compress-encoding limits them to the encodings that the deployment serves, as br and gzip behind CloudFront. (#​586, #​590)

  • Cache-Control. app.static.cache_control sets the header of the static files, a string or a function of the path, and the files whose path matches app.static.immutable are cached for a year as immutable, as the assets with a hash in their names. (#​589)

    app.static.cache_control = 'public, max-age=60'
    app.static.immutable = r'^assets/.+\.[0-9a-f]{8,}\.[^/]+$'
  • The static files of a mounted application. A favicon.ico in the static paths comes before the bundled one, so a mounted application on / serves its own. (#​589)

Django and other WSGI applications

  • Synchronous WSGI on asyncio. Pyjo.App.WSGI runs a synchronous application, as Django with its ORM, on the reactor of asyncio, the default one, as a WSGI server does, with Pyjo.IOLoop.blocking, which runs blocking code without the running loop of asyncio, also outside a mounted application, as in a check of Health. (#​603)
  • The guide Django, with a project, runs a Django project as it is on prefork of Pyjoyment, with its static files, probes, access log and tests in manage.py test. The guide From gunicorn has the table of the options of gunicorn and what prefork has for them. (#​599, #​609)
  • unittest. Pyjo.Test and Pyjo.Test.Pyjo work in the tests of unittest.TestCase, run by python -m unittest, manage.py test and pytest, with enterModuleContext(Pyjo.Test.raise_failures()) and enterClassContext(Pyjo.Test.Pyjo.new(...)). (#​608)
  • Health. generate kubernetes --liveness-probe <port> puts the liveness probe on tcpSocket, which waits for no busy worker of prefork -c 1, and --grace-period sets the budget of a stop. healthz=None leaves /healthz to a mounted application that has it. (#​610)

Development server

  • reload command. ./myapp.py reload and python -m MyApp reload run the application on the server that restarts it when a file changes, as pyjo-reload ./myapp.py does. (#​584)

AWS Lambda

  • Layers. The layer of generate lambda-zip has the files of Pyjoyment only, so another distribution of the namespace Pyjo, as Pyjo-MCP, stays in the function. --layer-package moves one to the layer, as the public layers do with Pyjo-AWS. (#​591)
  • Graceful stop. TERM stops daemon and prefork with a mounted event function of Lambda, which kept the event loop running after its first invocation. (#​593)
  • Examples. The examples of Lambda take the public layers of a version of Pyjoyment, with pyjoyment_version, and a profile of AWS, with aws_profile. (#​617, #​618)

Changes in behaviour

  • An async def action is cancelled when its client goes away, where it ran to its end, as in Mojolicious. (#​611)
  • A static file with a .br, .zst or .gz file next to it is served as that variant to a client that takes it. (#​586)
  • Pyjo.App.CGI and Pyjo.App.FastCGI do not start a server when their scripts are in the static paths of the application, which served the source of the scripts, as public/index.php with the configuration of its database, instead of running them. public_source=True allows it, for files that are public on purpose. (#​595)
  • generate lambda-zip, generate dockerfile and generate kubernetes fail at once for a script without dependencies, with the command that adds them, where they failed in the build or in the pod. (#​592)

Fixes

  • Templates. % else: after the % end of a nested block closes the branch of the outer block, where it continued the inner one. (#​576) The documentation of Pyjo.Template says that a template of HTML sets auto_escape, as the renderer ep does. (#​579)
  • Mount. The page of 404 of a path that a mounted application of another framework does not take links the assets of the root. (#​594)
  • Streamed responses of WSGI. A streamed response of Flask, and of an application under the server of a blocking request, ends with its last chunk, where its connection closed before it. (#​616)
  • pyjo-prove with PYTHONDEVMODE=1 no longer writes the slow callbacks of its own event loop among the standard error of the tests. (#​606)
  • Bootstrap of the bundled pages is 5.3.9. (#​620)

Mojolicious 9.54

The port is synchronized with Mojolicious 9.54: a response that its connection closes before it is complete is a premature connection close in Pyjo.UserAgent, Pyjo.Server.Daemon emits the finish events of the transactions of the connections that it removes, and an empty method of the environment is kept. (#​616)

Supply chain

The wheel and the sdist come with an SBOM in SPDX and with attestations of their build provenance:

gh attestation verify pyjoyment-0.4.0.tar.gz -R pyjoyment/Pyjoyment

Full Changelog: pyjoyment/Pyjoyment@0.3.0...0.4.0


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the renovate label Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Tests

Job Tests Passed ✅ Skipped ⚠️ Failed ❌ Log
prove (python 3.12) 7183 7108 73 2 ❌ 135152850540
prove (python 3.13) 7183 7108 73 2 ❌ 135152850193
prove (python 3.14) 7214 7144 68 2 ❌ 135152850365
prove (python 3.15) 7214 7146 68 0 ✅ 135152850270
prove (python 3.15t) 7214 7146 68 0 ✅ 135152850215
All 36008 35652 350 6 ❌
Job Script Test Message
prove (python 3.12) t/docs/guides_gunicorn.py 1 - Options
prove (python 3.12) t/docs/guides_gunicorn.py No plan found in TAP output
prove (python 3.13) t/docs/guides_gunicorn.py 1 - Options
prove (python 3.13) t/docs/guides_gunicorn.py No plan found in TAP output
prove (python 3.14) t/docs/guides_gunicorn.py 1 - Options
prove (python 3.14) t/docs/guides_gunicorn.py No plan found in TAP output

The run of the workflow

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants