plain.dev 0.40.0__py3-none-any.whl → 0.41.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/dev/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # plain-dev changelog
2
2
 
3
+ ## [0.41.0](https://github.com/dropseed/plain/releases/plain-dev@0.41.0) (2025-10-12)
4
+
5
+ ### What's changed
6
+
7
+ - The `plain dev` command now uses the new `plain server` command instead of `gunicorn` for running the development server ([f9dc2867c7](https://github.com/dropseed/plain/commit/f9dc2867c7))
8
+ - Removed `gunicorn` as a dependency - the development server now uses Plain's built-in HTTP server ([f9dc2867c7](https://github.com/dropseed/plain/commit/f9dc2867c7))
9
+ - Removed gunicorn-specific logging configuration file in favor of simplified log formatting ([fb8a00ca73](https://github.com/dropseed/plain/commit/fb8a00ca73))
10
+
11
+ ### Upgrade instructions
12
+
13
+ - No changes required
14
+
3
15
  ## [0.40.0](https://github.com/dropseed/plain/releases/plain-dev@0.40.0) (2025-10-10)
4
16
 
5
17
  ### What's changed
plain/dev/core.py CHANGED
@@ -167,7 +167,7 @@ class DevProcess(ProcessManager):
167
167
  # another thread checking db stuff...
168
168
  self.console_status.start()
169
169
 
170
- self.add_gunicorn()
170
+ self.add_server()
171
171
  self.add_entrypoints()
172
172
  self.add_pyproject_run()
173
173
 
@@ -271,18 +271,16 @@ class DevProcess(ProcessManager):
271
271
  click.secho("Preflight check failed!", fg="red")
272
272
  sys.exit(1)
273
273
 
274
- def add_gunicorn(self) -> None:
275
- # Watch .env files for reload
276
- extra_watch_files = []
277
- for f in os.listdir(APP_PATH.parent):
278
- if f.startswith(".env"):
279
- # Needs to be absolute or "./" for inotify to work on Linux...
280
- # https://github.com/dropseed/plain/issues/26
281
- extra_watch_files.append(str(Path(APP_PATH.parent) / f))
282
-
283
- reload_extra = " ".join(f"--reload-extra-file {f}" for f in extra_watch_files)
284
- gunicorn_cmd = [
285
- "gunicorn",
274
+ def add_server(self) -> None:
275
+ """Add the Plain HTTP server process."""
276
+ # Build the server command using plain's internal server
277
+ # Note: We can't use reload here because watchfiles is handled at a higher level
278
+ # The server command will use gunicorn's built-in reload capability
279
+ server_cmd = [
280
+ sys.executable,
281
+ "-m",
282
+ "plain",
283
+ "server",
286
284
  "--bind",
287
285
  f"{self.hostname}:{self.port}",
288
286
  "--certfile",
@@ -291,25 +289,37 @@ class DevProcess(ProcessManager):
291
289
  str(self.ssl_key_path),
292
290
  "--threads",
293
291
  "4",
294
- "--reload",
295
- "plain.wsgi:app",
296
292
  "--timeout",
297
293
  "60",
298
294
  "--log-level",
299
295
  self.log_level or "info",
300
- "--access-logfile",
301
- "-",
302
- "--error-logfile",
303
- "-",
304
- *reload_extra.split(),
305
- "--access-logformat",
306
- "'\"%(r)s\" status=%(s)s length=%(b)s time=%(M)sms'",
307
- "--log-config-json",
308
- str(Path(__file__).parent / "gunicorn_logging.json"),
296
+ "--reload", # Enable auto-reload for development
309
297
  ]
310
- gunicorn = " ".join(gunicorn_cmd)
311
298
 
312
- self.poncho.add_process("plain", gunicorn, env=self.plain_env)
299
+ # Watch .env files for reload
300
+ extra_watch_files = []
301
+ for f in os.listdir(APP_PATH.parent):
302
+ if f.startswith(".env"):
303
+ # Needs to be absolute or "./" for inotify to work on Linux...
304
+ # https://github.com/dropseed/plain/issues/26
305
+ extra_watch_files.append(str(Path(APP_PATH.parent) / f))
306
+
307
+ # Add extra watch files
308
+ for watch_file in extra_watch_files:
309
+ server_cmd.extend(["--reload-extra-file", watch_file])
310
+
311
+ # Add logging configuration
312
+ server_cmd.extend(
313
+ [
314
+ "--log-format",
315
+ "'[%(levelname)s] %(message)s'",
316
+ "--access-log-format",
317
+ "'\"%(r)s\" status=%(s)s length=%(b)s time=%(M)sms'",
318
+ ]
319
+ )
320
+
321
+ server = " ".join(server_cmd)
322
+ self.poncho.add_process("plain", server, env=self.plain_env)
313
323
 
314
324
  def add_entrypoints(self) -> None:
315
325
  for entry_point in entry_points().select(group=ENTRYPOINT_GROUP):
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.dev
3
- Version: 0.40.0
3
+ Version: 0.41.0
4
4
  Summary: A single command that runs everything you need for local development.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
7
7
  License-File: LICENSE
8
8
  Requires-Python: >=3.13
9
9
  Requires-Dist: click>=8.0.0
10
- Requires-Dist: gunicorn>20
11
10
  Requires-Dist: inotify
12
11
  Requires-Dist: plain<1.0.0
13
12
  Requires-Dist: python-dotenv~=1.0.0
@@ -1,14 +1,13 @@
1
1
  plain/dev/AGENTS.md,sha256=WOrdXNog-K3tXm1D_f6ZyyXi_amBGQ2gviKGaW8qtxA,101
2
- plain/dev/CHANGELOG.md,sha256=kjmnnEvKldQqcWf6ClZM87zICFehEnipO9bbBashXdM,7445
2
+ plain/dev/CHANGELOG.md,sha256=7aptZhuMyFI_cuVwo4z09prrNt1EA17TGy0xoUK7wa4,8122
3
3
  plain/dev/README.md,sha256=St3qIxoC2MJmR9UscN3skBR7w6XyrZm6BcDQ1-Kbwio,4804
4
4
  plain/dev/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
5
5
  plain/dev/alias.py,sha256=ADIcT1zJIG0GM8RxowxOLlfPN_5xGAYV1X_wvf7V_gs,5010
6
6
  plain/dev/cli.py,sha256=pXwg1fkKxVViLkvCn_POmNQBLr31gN0BFstPjdp54MU,8841
7
- plain/dev/core.py,sha256=JBCGKOnGG7nZdlt8AEQciVi1jtP9e3iCbi_PkUHO2NA,11738
7
+ plain/dev/core.py,sha256=QQ_GSvgGTuAniWv7iJOrH-5KzZrg9u6iIpQknnnv7Lk,12097
8
8
  plain/dev/debug.py,sha256=WvUdHXjGlUJjTvGpr5xvx0C-J5_vFL2ORPJeybjhJu8,1049
9
9
  plain/dev/default_settings.py,sha256=uXWYORWP_aRDwXIFXdu5kHyiBFUZzARIJdhPeFaX35c,75
10
10
  plain/dev/entrypoints.py,sha256=ngMPIbfbA0tgF1LDVxq0wwLdyqn-pS1wRIxcHPRkHg0,587
11
- plain/dev/gunicorn_logging.json,sha256=3H6b6bQf_KdY61gzypvI0ly_Jduy-Uhqs2ra9ttzGJQ,867
12
11
  plain/dev/mkcert.py,sha256=0WGynSzwfjiozk8Heg9mRG58PmXNAy4kZVPLnqCiMec,3998
13
12
  plain/dev/pdb.py,sha256=49mBUtmaXJhAxlcZJEC4JEyWJbQoVit9Nlv_OP1PtHU,4193
14
13
  plain/dev/process.py,sha256=ug0FvoV13ksgy7ZTnlt24cQKbCa_gQuM_pi2kjq7gTU,4079
@@ -25,8 +24,8 @@ plain/dev/poncho/printer.py,sha256=Nq4WTMOVPeHPhlQ-v4LoMunqjnWl0CoVBEgW_L6WoAY,3
25
24
  plain/dev/poncho/process.py,sha256=DASNqlbx9sQ59zCsTqEUsVbsCE6L8NfCNdG3OK0IKrg,2947
26
25
  plain/dev/precommit/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
27
26
  plain/dev/precommit/cli.py,sha256=nGF80AHy9GAV92LoA2YzSYtPulZaVgJrY7uh8XfwwNY,3333
28
- plain_dev-0.40.0.dist-info/METADATA,sha256=HnFYnEWpU4KrJ6A-rTpN_ikbIZvhrU9wRK7Q2GR1i5A,5306
29
- plain_dev-0.40.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
- plain_dev-0.40.0.dist-info/entry_points.txt,sha256=zrcTOiFk_MLKsnYVlwVP7aMm1XLEqq7w4EBkJ-3ge-g,114
31
- plain_dev-0.40.0.dist-info/licenses/LICENSE,sha256=Cx4Dq9yR2fLHthf8Ke36B8QJvE1bZFXVzDIGE8wGzsY,4132
32
- plain_dev-0.40.0.dist-info/RECORD,,
27
+ plain_dev-0.41.0.dist-info/METADATA,sha256=k6nPoOHRb5mVUuFE6lWYsNZw-Cz_u3LshgmQWCcdGyU,5279
28
+ plain_dev-0.41.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
+ plain_dev-0.41.0.dist-info/entry_points.txt,sha256=zrcTOiFk_MLKsnYVlwVP7aMm1XLEqq7w4EBkJ-3ge-g,114
30
+ plain_dev-0.41.0.dist-info/licenses/LICENSE,sha256=Cx4Dq9yR2fLHthf8Ke36B8QJvE1bZFXVzDIGE8wGzsY,4132
31
+ plain_dev-0.41.0.dist-info/RECORD,,
@@ -1,40 +0,0 @@
1
- {
2
- "version": 1,
3
- "disable_existing_loggers": false,
4
- "root": {
5
- "level": "INFO",
6
- "handlers": ["console"]
7
- },
8
- "loggers": {
9
- "gunicorn.error": {
10
- "level": "INFO",
11
- "handlers": ["error_console"],
12
- "propagate": false,
13
- "qualname": "gunicorn.error"
14
- },
15
- "gunicorn.access": {
16
- "level": "INFO",
17
- "handlers": ["console"],
18
- "propagate": false,
19
- "qualname": "gunicorn.access"
20
- }
21
- },
22
- "handlers": {
23
- "console": {
24
- "class": "logging.StreamHandler",
25
- "formatter": "generic",
26
- "stream": "ext://sys.stdout"
27
- },
28
- "error_console": {
29
- "class": "logging.StreamHandler",
30
- "formatter": "generic",
31
- "stream": "ext://sys.stderr"
32
- }
33
- },
34
- "formatters": {
35
- "generic": {
36
- "format": "[%(process)d] [%(levelname)s] %(message)s",
37
- "class": "logging.Formatter"
38
- }
39
- }
40
- }