plain 0.80.0__py3-none-any.whl → 0.81.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of plain might be problematic. Click here for more details.

plain/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # plain changelog
2
2
 
3
+ ## [0.81.0](https://github.com/dropseed/plain/releases/plain@0.81.0) (2025-10-22)
4
+
5
+ ### What's changed
6
+
7
+ - Removed support for category-specific error template fallbacks like `4xx.html` and `5xx.html` ([9513f7c4fa](https://github.com/dropseed/plain/commit/9513f7c4fa))
8
+
9
+ ### Upgrade instructions
10
+
11
+ - If you have `4xx.html` or `5xx.html` error templates, rename them to specific status code templates (e.g., `404.html`, `500.html`) or remove them if you prefer the plain HTTP response fallback
12
+
3
13
  ## [0.80.0](https://github.com/dropseed/plain/releases/plain@0.80.0) (2025-10-22)
4
14
 
5
15
  ### What's changed
plain/views/README.md CHANGED
@@ -257,7 +257,7 @@ HTTP errors are rendered using templates. Create templates for the errors users
257
257
  - `templates/403.html` - Forbidden
258
258
  - `templates/500.html` - Server error
259
259
 
260
- Plain looks for `{status_code}.html`, then `{category}.html` (e.g., `4xx.html`), then returns a plain HTTP response. Most apps only need the three specific templates above.
260
+ Plain looks for `{status_code}.html` templates, then returns a plain HTTP response if not found. Most apps only need the three specific templates above.
261
261
 
262
262
  Templates receive `status_code` and `exception` in context.
263
263
 
plain/views/errors.py CHANGED
@@ -29,10 +29,8 @@ class ErrorView(TemplateView):
29
29
  return context
30
30
 
31
31
  def get_template_names(self) -> list[str]:
32
- # Try specific status code first (e.g. "404.html")
33
- # Then fall back to category (e.g. "4xx.html" or "5xx.html")
34
- category = f"{str(self.status_code)[0]}xx"
35
- return [f"{self.status_code}.html", f"{category}.html"]
32
+ # Try specific status code template (e.g. "404.html")
33
+ return [f"{self.status_code}.html"]
36
34
 
37
35
  def get_request_handler(self) -> Callable[[], Any]:
38
36
  return self.get # All methods (post, patch, etc.) will use the get()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain
3
- Version: 0.80.0
3
+ Version: 0.81.0
4
4
  Summary: A web framework for building products with Python.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-File: LICENSE
@@ -1,5 +1,5 @@
1
1
  plain/AGENTS.md,sha256=As6EFSWWHJ9lYIxb2LMRqNRteH45SRs7a_VFslzF53M,1046
2
- plain/CHANGELOG.md,sha256=CZJXaqSX2G0nv_Bp-_VKzIuVGgDlwtFdD_cEek6ajpg,31725
2
+ plain/CHANGELOG.md,sha256=X4IioATkhRixLtoG5oftPX7QJ5NmVUyywMqmUIGBTck,32215
3
3
  plain/README.md,sha256=VvzhXNvf4I6ddmjBP9AExxxFXxs7RwyoxdgFm-W5dsg,4072
4
4
  plain/__main__.py,sha256=GK39854Lc_LO_JP8DzY9Y2MIQ4cQEl7SXFJy244-lC8,110
5
5
  plain/debug.py,sha256=C2OnFHtRGMrpCiHSt-P2r58JypgQZ62qzDBpV4mhtFM,855
@@ -179,17 +179,17 @@ plain/utils/text.py,sha256=teav7elbqEtGnhKG3ajf-V9Hb-Gsg8uqDrogqWizqjI,10094
179
179
  plain/utils/timesince.py,sha256=a_-ZoPK_s3Pt998CW4rWp0clZ1XyK2x04hCqak2giII,5928
180
180
  plain/utils/timezone.py,sha256=M_I5yvs9NsHbtNBPJgHErvWw9vatzx4M96tRQs5gS3g,6823
181
181
  plain/utils/tree.py,sha256=rj_JpZ2kVD3UExWoKnsRdVCoRjvzkuVOONcHzREjSyw,4766
182
- plain/views/README.md,sha256=Kuw6tMfFp0-fu2aDFM0iCKV-FzgZmkPwd78cYKDXaUA,7438
182
+ plain/views/README.md,sha256=F6RuNm2viDM3EGHCuy9rbmQaW-lrCVipdOfTEdWcEqY,7418
183
183
  plain/views/__init__.py,sha256=a-N1nkklVohJTtz0yD1MMaS0g66HviEjsKydNVVjvVc,392
184
184
  plain/views/base.py,sha256=yWh6S68PsYcH1dvRdibQIanBYkjo2iJ8IAbR2PTWQrk,4419
185
- plain/views/errors.py,sha256=og20lx5WGDiQ-thOAYtWNsfjuZiLLVydpk94k810j6A,1632
185
+ plain/views/errors.py,sha256=fV9rGV1RSo10_0P9J-uIFprhrO5lDVlcJKpfyFV22gY,1495
186
186
  plain/views/exceptions.py,sha256=-YKH1Jd9Zm_yXiz797PVjJB6VWaPCTXClHIUkG2fq78,198
187
187
  plain/views/forms.py,sha256=ESZOXuo6IeYixp1RZvPb94KplkowRiwO2eGJCM6zJI0,2400
188
188
  plain/views/objects.py,sha256=5y0PoPPo07dQTTcJ_9kZcx0iI1O7regsooAIK4VqXQ0,5579
189
189
  plain/views/redirect.py,sha256=mIpSAFcaEyeLDyv4Fr6g_ektduG4Wfa6s6L-rkdazmM,2154
190
190
  plain/views/templates.py,sha256=9LgDMCv4C7JzLiyw8jHF-i4350ukwgixC_9y4faEGu0,1885
191
- plain-0.80.0.dist-info/METADATA,sha256=jweqjIZtRoFGSJ0YCjb5dF9bcOAsPZaGbrdTCB4ktY4,4516
192
- plain-0.80.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
193
- plain-0.80.0.dist-info/entry_points.txt,sha256=1Ys2lsSeMepD1vz8RSrJopna0RQfUd951vYvCRsvl6A,45
194
- plain-0.80.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
195
- plain-0.80.0.dist-info/RECORD,,
191
+ plain-0.81.0.dist-info/METADATA,sha256=dkk1DwWeDQbFb9gvY4x_JKN2p5bzCFkx2nKm7xqf9po,4516
192
+ plain-0.81.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
193
+ plain-0.81.0.dist-info/entry_points.txt,sha256=1Ys2lsSeMepD1vz8RSrJopna0RQfUd951vYvCRsvl6A,45
194
+ plain-0.81.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
195
+ plain-0.81.0.dist-info/RECORD,,
File without changes