Skip to content

Releases: jpsca/proper

0.44.0

Choose a tag to compare

@jpsca jpsca released this 21 Oct 18:35
9611640

0.43.0

Choose a tag to compare

@jpsca jpsca released this 19 Oct 22:34
4ed9113

0.42.1

Choose a tag to compare

@jpsca jpsca released this 16 Oct 19:11
9394511

0.42.0

Choose a tag to compare

@jpsca jpsca released this 16 Oct 17:53
cec7b5b

0.41.0

Choose a tag to compare

@jpsca jpsca released this 15 Oct 20:34
1646dd3

0.40.0

Choose a tag to compare

@jpsca jpsca released this 11 Oct 22:27
2352aae

0.34

Choose a tag to compare

@jpsca jpsca released this 04 Oct 02:09
244c937

Added

  • app.around_request(func): registers a function that wraps the whole run
    of every request, called as func(request, response, call_next). If the
    request failed, response.error has the exception, even after the error
    page was rendered. Meant for monitoring integrations (timing, tracing,
    error reporting).

Full Changelog: 0.33...0.34

0.33

Choose a tag to compare

@jpsca jpsca released this 03 Oct 18:19
7b62d04

⚠️ Upgrading: move the uploaded files

The Disk storage service now stores each file at
<root>/<id[:2]>/<id[2:4]>/<id>/<filename> instead of
<root>/<id[:2]>/<id[2:4]>/<filename>.

The files saved by older versions stay at the old path, and this version
doesn't look for them there: until they are moved, every existing upload
of the app is "not found"
. Run this once, right after upgrading, in every
app that uses Disk storage:

from myapp.models import Attachment

for attachment in Attachment.select():
    service = attachment.service
    if hasattr(service, "move_from_legacy_path"):
        service.move_from_legacy_path(attachment)

move_from_legacy_path skips the files already moved, so it can run again.
Apps that only use S3 storage don't need it.

Fixed

  • Disk: two attachments with the same filename whose ids start with the
    same four characters shared a file, and one overwrote the other. Every
    variant was named variant.<ext>, so it happened often with variants and
    pages showed the wrong images. The full id is now part of the path (see
    above), and purge also removes the empty folders.
  • A request whose Accept header lists other formats before */* (e.g.
    application/json, text/plain, */*, what many HTTP libraries send) failed
    with a 500 when the action only had an HTML template. */* now falls back
    to the default format after the listed ones.
  • When an action has a template but none in a format the client accepts,
    the response is now 406 Not Acceptable with an empty body, instead of a
    500. An error page keeps its status (e.g. a 404 stays a 404). An action
    without a template in the default format still raises
    ComponentNotFoundError, because that's a missing view.
  • The blueprint's public/index, public/not_found and public/error
    templates have format-less names (.jx, not .html.jx), so new apps
    render them whatever the client accepts.
  • Pagination: a missing page number no longer logs an
    "invalid page number: None" warning.

Changed

  • Image variants are named after the original file
    (<original name>.<ext>) instead of variant.<ext>.

Added

  • Disk.move_from_legacy_path(attachment), to move a file stored by an
    older version to its current path.

Full Changelog: 0.32...0.33

0.32

Choose a tag to compare

@jpsca jpsca released this 02 Oct 15:48
3043ea8

Breaking

  • "assets" folder moved to the same level as the "storage" and "db" folder

Changes

  • Fix generators: a controller that works without a model, with partial actons and in a namespace
  • Fix storage: the file inputs don't fail after an upload that didn't validate
  • Blueprint: read the .env file of the project, fix the assets of the nginx config, and raise the body limit
  • SqliteCache: each cache has its own model
  • Test client: send the name of an uploaded file, not its path

Full Changelog: 0.31...0.32

0.31

Choose a tag to compare

@jpsca jpsca released this 02 Oct 04:17
2b0e3ac

Changes

  • db prepare migrates every database
  • Add proper jx compile and use the compiled views at startup
  • Auth: save the upgraded password hash, and only hash when needed
  • Blueprint:
    • compile the views when the image is built
    • fix the assets of the nginx config, and raise the body limit
    • read the .env file of the project
  • Generators: a controller that works without a model, with partial actions and in a namespace
  • Rich text: sanitize the documents when they are rendered
  • Skill: the template of an email doesn't have the _email suffix
  • SqliteCache:
    • creates its table when it's missing
    • don't fail with "database is locked" under concurrent use
    • each cache has its own model
  • Storage: the file inputs don't fail after an upload that didn't validate
  • Test client: send the name of an uploaded file, not its path

Full Changelog: 0.30...0.31