plain 0.72.2__py3-none-any.whl → 0.74.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.
plain/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # plain changelog
2
2
 
3
+ ## [0.74.0](https://github.com/dropseed/plain/releases/plain@0.74.0) (2025-10-08)
4
+
5
+ ### What's changed
6
+
7
+ - The `plain agent request` command now displays request ID in the response output ([4a20cfa3fc](https://github.com/dropseed/plain/commit/4a20cfa3fc))
8
+ - Request headers are now included in OpenTelemetry tracing baggage for improved observability ([08a3376d06](https://github.com/dropseed/plain/commit/08a3376d06))
9
+
10
+ ### Upgrade instructions
11
+
12
+ - No changes required
13
+
14
+ ## [0.73.0](https://github.com/dropseed/plain/releases/plain@0.73.0) (2025-10-07)
15
+
16
+ ### What's changed
17
+
18
+ - Internal preflight result handling updated to use `model_options` instead of `_meta` for model label retrieval ([73ba469](https://github.com/dropseed/plain/commit/73ba469ba0))
19
+
20
+ ### Upgrade instructions
21
+
22
+ - No changes required
23
+
3
24
  ## [0.72.2](https://github.com/dropseed/plain/releases/plain@0.72.2) (2025-10-06)
4
25
 
5
26
  ### What's changed
@@ -72,9 +72,6 @@ def request(
72
72
  try:
73
73
  user = User.query.get(id=user_id)
74
74
  client.force_login(user)
75
- click.secho(
76
- f"Authenticated as user {user_id}", fg="green", dim=True
77
- )
78
75
  except User.DoesNotExist:
79
76
  click.secho(f"User {user_id} not found", fg="red", err=True)
80
77
  return
@@ -134,23 +131,28 @@ def request(
134
131
  return
135
132
 
136
133
  # Display response information
137
- click.secho(
138
- f"HTTP {response.status_code}",
139
- fg="green" if response.status_code < 400 else "red",
140
- bold=True,
141
- )
134
+ click.secho("Response:", fg="yellow", bold=True)
142
135
 
143
- # Show additional response info first
144
- if hasattr(response, "user"):
145
- click.secho(f"Authenticated user: {response.user}", fg="blue", dim=True)
136
+ # Status code
137
+ click.echo(f" Status: {response.status_code}")
146
138
 
147
- if hasattr(response, "resolver_match") and response.resolver_match:
139
+ # Request ID
140
+ click.echo(f" Request ID: {response.wsgi_request.unique_id}")
141
+
142
+ # User
143
+ if response.user:
144
+ click.echo(f" Authenticated user: {response.user}")
145
+
146
+ # URL pattern
147
+ if response.resolver_match:
148
148
  match = response.resolver_match
149
149
  namespaced_url_name = getattr(match, "namespaced_url_name", None)
150
150
  url_name_attr = getattr(match, "url_name", None)
151
151
  url_name = namespaced_url_name or url_name_attr
152
152
  if url_name:
153
- click.secho(f"URL pattern matched: {url_name}", fg="blue", dim=True)
153
+ click.echo(f" URL pattern: {url_name}")
154
+
155
+ click.echo()
154
156
 
155
157
  # Show headers
156
158
  if response.headers:
@@ -94,6 +94,9 @@ class BaseHandler:
94
94
  span_attributes[url_attributes.URL_QUERY] = query_string
95
95
 
96
96
  span_context = baggage.set_baggage("http.request.cookies", request.cookies)
97
+ span_context = baggage.set_baggage(
98
+ "http.request.headers", request.headers, span_context
99
+ )
97
100
 
98
101
  with tracer.start_as_current_span(
99
102
  f"{request.method} {request.path_info}",
@@ -23,9 +23,11 @@ class PreflightResult:
23
23
  def __str__(self) -> str:
24
24
  if self.obj is None:
25
25
  obj = ""
26
- elif hasattr(self.obj, "_meta") and hasattr(self.obj._meta, "label"):
26
+ elif hasattr(self.obj, "model_options") and hasattr(
27
+ self.obj.model_options, "label"
28
+ ):
27
29
  # Duck type for model objects - use their meta label
28
- obj = self.obj._meta.label
30
+ obj = self.obj.model_options.label
29
31
  else:
30
32
  obj = str(self.obj)
31
33
  id_part = f"({self.id}) " if self.id else ""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain
3
- Version: 0.72.2
3
+ Version: 0.74.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=m-g1Jycq3u9KeMyMUD4pSjJhubEoefzEaPvhppCaCcM,22837
2
+ plain/CHANGELOG.md,sha256=d5qlQbeu460a3u6-UiTWiSGwi0lfMGEYTvMuoZ8ElC4,23635
3
3
  plain/README.md,sha256=5BJyKhf0TDanWVbOQyZ3zsi5Lov9xk-LlJYCDWofM6Y,4078
4
4
  plain/__main__.py,sha256=GK39854Lc_LO_JP8DzY9Y2MIQ4cQEl7SXFJy244-lC8,110
5
5
  plain/debug.py,sha256=C2OnFHtRGMrpCiHSt-P2r58JypgQZ62qzDBpV4mhtFM,855
@@ -44,7 +44,7 @@ plain/cli/agent/docs.py,sha256=1YSmbl9CNsnnmbFd6dzIuzu1rwaHbEn7zX1_Y-MKUKo,2550
44
44
  plain/cli/agent/llmdocs.py,sha256=spDfgNRARyXsHey3Gb0N6ZuvQR6wsH5L3OWR8FKSp0w,5491
45
45
  plain/cli/agent/md.py,sha256=eRspArtBVQNqxIii6J7sPPZqBjc-qmAF49aLnwZoWAE,2778
46
46
  plain/cli/agent/prompt.py,sha256=hMb4RXiMF68xSSHC3gXrCUjv5jZa7flQzL4FZvUMu1I,1261
47
- plain/cli/agent/request.py,sha256=Mz_9xehWmkaQKoi2vKwLxIJUHl6n-S2jl4pr6MrvcOg,6589
47
+ plain/cli/agent/request.py,sha256=cBdN9w4msPqfaE13DHrvAE0lkSdkTdTkIjZzBht8Ydc,6432
48
48
  plain/csrf/README.md,sha256=ApWpB-qlEf0LkOKm9Yr-6f_lB9XJEvGFDo_fraw8ghI,2391
49
49
  plain/csrf/middleware.py,sha256=p46QBXtJDrcCc5xwgZt7n-SIny4adShaFPTfBVXTNTM,5389
50
50
  plain/csrf/views.py,sha256=ckQp-ZJCdtgFukJLHQDtKARBhng6AWOP-1ijsW5Ddqo,736
@@ -70,7 +70,7 @@ plain/internal/files/uploadedfile.py,sha256=RaMeOMMB5LhH_QTEda9fGcI4kEg5CgCLE3kT
70
70
  plain/internal/files/uploadhandler.py,sha256=zUEMePuCsoaukRMCy5yBvMHaeOBageUw2sLBHsXpmew,7982
71
71
  plain/internal/files/utils.py,sha256=9aWCkGGGRdZLbI921IOgeUOD9zxx4FgpWCzXvq0lMXU,2871
72
72
  plain/internal/handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
- plain/internal/handlers/base.py,sha256=nAK2Wfw1-f3fbsCp8w8zzHwl-Fb8sj9CXWPyMM0aLbk,6551
73
+ plain/internal/handlers/base.py,sha256=DhJSZqVMrzKGCMrcpkbq6aMXMm0Q94lPuvAIurpAQ0Y,6671
74
74
  plain/internal/handlers/exception.py,sha256=9Qf9dfQANuaeNx9-DMFJzg3Y3un61NicxfK7YnK3RTk,5226
75
75
  plain/internal/handlers/wsgi.py,sha256=d2Hcs4fzTSir6OvtpVromTw0RmmFAqTL4_EaBjoHtNU,8919
76
76
  plain/internal/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -94,7 +94,7 @@ plain/preflight/__init__.py,sha256=-uBIVLD1DlJUVypQsEcrOtaNAhECbOpKhyoz0c_WMhA,4
94
94
  plain/preflight/checks.py,sha256=kJcr-Hq5bsjKw1BUYR6r6nFg3Ecgrd1DS5SudUr4rSU,289
95
95
  plain/preflight/files.py,sha256=OjD76e-l_cDXJGHMk21LsoPp6V_HxD5v0zyvOKkEDu0,840
96
96
  plain/preflight/registry.py,sha256=87FvZRsbbbuFJGKJ2PC5-o9aZ1MIKgLPYOTR3ghlzK4,2920
97
- plain/preflight/results.py,sha256=OtqHUCdq0hNdwNxSLL4CEocNE4mDo2HqFN-XgxYsjLo,1069
97
+ plain/preflight/results.py,sha256=2LaylWEHDvDOc7M3rvZsmOonV__ziSs1G_OpIXl4Qrk,1115
98
98
  plain/preflight/security.py,sha256=nMbflO2LN49oKAAaa-tYvuweNB0RWv1z3w9niU037n0,3059
99
99
  plain/preflight/urls.py,sha256=Asw_vq-70NRqr15yuBAYL0JCZ04liumORYT3I3KmF_k,437
100
100
  plain/runtime/README.md,sha256=ZZ3NPTjtxwyfw1V827YNwkWc8MiH5rWiy27HrN13qZ8,4819
@@ -162,8 +162,8 @@ plain/views/forms.py,sha256=ESZOXuo6IeYixp1RZvPb94KplkowRiwO2eGJCM6zJI0,2400
162
162
  plain/views/objects.py,sha256=5y0PoPPo07dQTTcJ_9kZcx0iI1O7regsooAIK4VqXQ0,5579
163
163
  plain/views/redirect.py,sha256=mIpSAFcaEyeLDyv4Fr6g_ektduG4Wfa6s6L-rkdazmM,2154
164
164
  plain/views/templates.py,sha256=9LgDMCv4C7JzLiyw8jHF-i4350ukwgixC_9y4faEGu0,1885
165
- plain-0.72.2.dist-info/METADATA,sha256=oNUbDDi3O3AiTeJuuZ_tPo1D5tBhEkzhNIligFBg-kE,4488
166
- plain-0.72.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
167
- plain-0.72.2.dist-info/entry_points.txt,sha256=wvMzY-iREvfqRgyLm77htPp4j_8CQslLoZA15_AnNo8,171
168
- plain-0.72.2.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
169
- plain-0.72.2.dist-info/RECORD,,
165
+ plain-0.74.0.dist-info/METADATA,sha256=nCUlsCv9kCOGTKNmM-IT4o_H3BbsxRo3FEv30x1eRI4,4488
166
+ plain-0.74.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
167
+ plain-0.74.0.dist-info/entry_points.txt,sha256=wvMzY-iREvfqRgyLm77htPp4j_8CQslLoZA15_AnNo8,171
168
+ plain-0.74.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
169
+ plain-0.74.0.dist-info/RECORD,,
File without changes