plain.dev 0.17.0__py3-none-any.whl → 0.18.1__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/entrypoints.py CHANGED
@@ -1,9 +1,10 @@
1
+ import os
2
+
1
3
  from dotenv import load_dotenv
2
4
 
3
5
 
4
6
  def load_dotenv_file():
5
- loaded = load_dotenv(".env")
6
- if not loaded:
7
- # In CI-like environments, we may have .env.test committed
8
- # but not .env, so we can help out by loading it here.
9
- load_dotenv(".env.test")
7
+ if plain_env := os.environ.get("PLAIN_ENV", ""):
8
+ load_dotenv(f".env.{plain_env}")
9
+ else:
10
+ load_dotenv(".env")
@@ -2,7 +2,6 @@ import datetime
2
2
  import multiprocessing
3
3
  import queue
4
4
  import signal
5
- import sys
6
5
 
7
6
  from .color import get_colors
8
7
  from .compat import ProcessManager
@@ -54,7 +53,7 @@ class Manager:
54
53
  self._clock = datetime.datetime
55
54
  self._procmgr = ProcessManager()
56
55
 
57
- self._printer = printer if printer is not None else Printer(sys.stdout)
56
+ self._printer = printer if printer is not None else Printer(lambda s: print(s))
58
57
  self._printer.width = len(SYSTEM_PRINTER_NAME)
59
58
 
60
59
  self._process_ctor = Process
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.dev
3
- Version: 0.17.0
3
+ Version: 0.18.1
4
4
  Summary: Local development tools for Plain.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
@@ -3,7 +3,7 @@ plain/dev/__init__.py,sha256=C1JrkNE5XX2DLgBXXLAV_UyhofwVd0ZPL59fPUMbOKo,139
3
3
  plain/dev/cli.py,sha256=La7Tcw6Szla-eTAqnQkbKYv_ctzHPd7f5YNtd1acAsA,11924
4
4
  plain/dev/debug.py,sha256=fIrecLfAK_lXSDyn3WmYikzZSse3KY47xcVVbZqJGhk,294
5
5
  plain/dev/default_settings.py,sha256=uXWYORWP_aRDwXIFXdu5kHyiBFUZzARIJdhPeFaX35c,75
6
- plain/dev/entrypoints.py,sha256=rEFOCRbmKpTROYAjjFBBEhgnsFgCA-wGU92A52ckA60,272
6
+ plain/dev/entrypoints.py,sha256=7vRa8NUK0QDfktTe4LkQr62ynlj8cMSHQ6aLsyZGYi8,200
7
7
  plain/dev/gunicorn_logging.json,sha256=yU23jzs5G4YGdDWBNiyAc3KypR4HirR6afIkD7w6DhU,1113
8
8
  plain/dev/mkcert.py,sha256=u284XXQeTgwSkKKh0gMrYpnNGdd9OOUJKLQAXcvGnr4,3459
9
9
  plain/dev/pid.py,sha256=gRMBf7aGndrra1TnmKtPghTijnd0i0Xeo63mzfPWp7M,436
@@ -20,14 +20,14 @@ plain/dev/db/container.py,sha256=RlPJU_CCMKA-zN8Kp0sYAu3jabOizxYAj8fSCsjCf60,514
20
20
  plain/dev/poncho/__init__.py,sha256=MDOk2rhhoR3V-I-rg6tMHFeX60vTGJuQ14RI-_N6tQY,97
21
21
  plain/dev/poncho/color.py,sha256=Dk77inPR9qNc9vCaZOGk8W9skXfRgoUlxp_E6mhPNns,610
22
22
  plain/dev/poncho/compat.py,sha256=l66WZLR7kRpO8P8DI5-aUsbNlohPaXEurQ5xXESQYDs,1276
23
- plain/dev/poncho/manager.py,sha256=l_m_RhNTF9Fs6p0Tk8pdjd5ZxQxU1kbGEgDD-qJaFGs,6366
23
+ plain/dev/poncho/manager.py,sha256=xT8ur72ZaVrWYWtg5FnBSiZsENWKUHP7eG_A_ZUP-40,6363
24
24
  plain/dev/poncho/printer.py,sha256=wt1ioaGcPnVyrPy-UjvdsR9zfcr4DTTycmapW1MIdSU,1785
25
25
  plain/dev/poncho/process.py,sha256=JJOKy-C6vMCg7-6JMCtu6C649h7HmOBSJqDP_hnX49I,2637
26
26
  plain/dev/precommit/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
27
27
  plain/dev/precommit/cli.py,sha256=D_A5Mk2eXqjJDSUE6qyCFFddhM7wBZR3C9hgkDRx_v8,3411
28
28
  plain/dev/templates/dev/requests.html,sha256=kQKJZq5L77juuL_t8UjcAehEU61U4RXNnKaAET-wAm8,7627
29
- plain_dev-0.17.0.dist-info/METADATA,sha256=Oq8Jcn_wKu21NuLb8QWpVfk1d0b1gXoRlOg6WpNR0-E,4274
30
- plain_dev-0.17.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
- plain_dev-0.17.0.dist-info/entry_points.txt,sha256=jncRPB4B7d27YWkzWqzt68y534ntliHPNukv_kQu5KY,171
32
- plain_dev-0.17.0.dist-info/licenses/LICENSE,sha256=YDg-l_Rj7LVP5uDXy04eQPGb_DYVXAHAHYd9r3pU1Cg,2713
33
- plain_dev-0.17.0.dist-info/RECORD,,
29
+ plain_dev-0.18.1.dist-info/METADATA,sha256=bN17D0nzY08d463GF7spFjc_tl-NAtA4lYlwxHmAOPo,4274
30
+ plain_dev-0.18.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
+ plain_dev-0.18.1.dist-info/entry_points.txt,sha256=jncRPB4B7d27YWkzWqzt68y534ntliHPNukv_kQu5KY,171
32
+ plain_dev-0.18.1.dist-info/licenses/LICENSE,sha256=YDg-l_Rj7LVP5uDXy04eQPGb_DYVXAHAHYd9r3pU1Cg,2713
33
+ plain_dev-0.18.1.dist-info/RECORD,,