plain 0.42.2__py3-none-any.whl → 0.43.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/assets/compile.py CHANGED
@@ -2,7 +2,7 @@ import gzip
2
2
  import os
3
3
  import shutil
4
4
 
5
- from plain.runtime import settings
5
+ from plain.runtime import PLAIN_TEMP_PATH
6
6
 
7
7
  from .finders import iter_assets
8
8
  from .fingerprints import AssetsFingerprintsManifest, get_file_fingerprint
@@ -46,7 +46,7 @@ def get_compiled_path():
46
46
 
47
47
  There's no reason currently for this to be a user-facing setting.
48
48
  """
49
- return settings.PLAIN_TEMP_PATH / "assets" / "compiled"
49
+ return PLAIN_TEMP_PATH / "assets" / "compiled"
50
50
 
51
51
 
52
52
  def compile_assets(*, target_dir, keep_original, fingerprint, compress):
@@ -2,7 +2,7 @@ import hashlib
2
2
  import json
3
3
  from functools import cache
4
4
 
5
- from plain.runtime import settings
5
+ from plain.runtime import PLAIN_TEMP_PATH
6
6
 
7
7
  FINGERPRINT_LENGTH = 7
8
8
 
@@ -13,7 +13,7 @@ class AssetsFingerprintsManifest(dict):
13
13
  """
14
14
 
15
15
  def __init__(self):
16
- self.path = settings.PLAIN_TEMP_PATH / "assets" / "fingerprints.json"
16
+ self.path = PLAIN_TEMP_PATH / "assets" / "fingerprints.json"
17
17
 
18
18
  def load(self):
19
19
  if self.path.exists():
plain/runtime/__init__.py CHANGED
@@ -13,6 +13,7 @@ except importlib.metadata.PackageNotFoundError:
13
13
 
14
14
  # Made available without setup or settings
15
15
  APP_PATH = Path.cwd() / "app"
16
+ PLAIN_TEMP_PATH = Path.cwd() / ".plain"
16
17
 
17
18
  # from plain.runtime import settings
18
19
  settings = Settings()
@@ -3,18 +3,12 @@ Default Plain settings. Override these with settings in the module pointed to
3
3
  by the PLAIN_SETTINGS_MODULE environment variable.
4
4
  """
5
5
 
6
- from pathlib import Path
7
-
8
- from plain.runtime import APP_PATH as default_app_path
9
-
10
6
  ####################
11
7
  # CORE #
12
8
  ####################
13
9
 
14
10
  DEBUG: bool = False
15
11
 
16
- PLAIN_TEMP_PATH: Path = default_app_path.parent / ".plain"
17
-
18
12
  # Hosts/domain names that are valid for this site.
19
13
  # "*" matches anything, ".example.com" matches example.com and all subdomains
20
14
  ALLOWED_HOSTS: list[str] = []
plain/urls/routers.py CHANGED
@@ -23,7 +23,7 @@ class Router:
23
23
 
24
24
 
25
25
  def include(
26
- route: str | re.Pattern, router_or_urls: list | tuple | str | Router
26
+ route: str | re.Pattern, router_or_urls: list | tuple | str | type[Router]
27
27
  ) -> URLResolver:
28
28
  """
29
29
  Include URLs from another module or a nested list of URL patterns.
@@ -57,7 +57,7 @@ def include(
57
57
  )
58
58
 
59
59
 
60
- def path(route: str | re.Pattern, view: "View", *, name: str = "") -> URLPattern:
60
+ def path(route: str | re.Pattern, view: type["View"], *, name: str = "") -> URLPattern:
61
61
  """
62
62
  Standard URL with a view.
63
63
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain
3
- Version: 0.42.2
3
+ Version: 0.43.1
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
@@ -9,9 +9,9 @@ plain/validators.py,sha256=TePzFHzwR4JXUAZ_Y2vC6mkKgVxHX3QBXI6Oex0rV8c,19236
9
9
  plain/wsgi.py,sha256=R6k5FiAElvGDApEbMPTT0MPqSD7n2e2Az5chQqJZU0I,236
10
10
  plain/assets/README.md,sha256=wgsmBK5vAHgFMZ010q7LTrgLq5BTfuPuuug5HLZ9GNw,3774
11
11
  plain/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- plain/assets/compile.py,sha256=rABDHj7k_YAIPVvS7JJLCukEgUhb7h5oz9ajt5fGirI,3298
12
+ plain/assets/compile.py,sha256=DT85ygnNcY2_7VeozdsQlBvA-DzV7enUIMO_igJ1PjY,3296
13
13
  plain/assets/finders.py,sha256=2k8QZAbfUbc1LykxbzdazTSB6xNxJZnsZaGhWbSFZZs,1452
14
- plain/assets/fingerprints.py,sha256=2LPHLUkoITMseLDmemTpBtMRDWCR2H5GAHjC6AN4gz0,1367
14
+ plain/assets/fingerprints.py,sha256=D-x0o49sUuWfx86BssDyo87yJCjWrV0go6JGPagvMAE,1365
15
15
  plain/assets/urls.py,sha256=zQUA8bAlh9qVqskPJJrqWd9DjvetOi5jPSqy4vUX0J4,1161
16
16
  plain/assets/views.py,sha256=T_0Qh6v9qBerEBYbhToigwOzsij-x1z_R-1zETQcIh0,9447
17
17
  plain/chores/README.md,sha256=Da8Nw8ZF7PlAE_iVb0AqJGbLOu0F6HC0cj1K451KBak,1946
@@ -82,8 +82,8 @@ plain/preflight/registry.py,sha256=wHLq6LSMkKunkxElBmNwzMzQx3tc6OGYeKyOOi0tuyQ,2
82
82
  plain/preflight/security.py,sha256=oxUZBp2M0bpBfUoLYepIxoex2Y90nyjlrL8XU8UTHYY,2438
83
83
  plain/preflight/urls.py,sha256=cQ-WnFa_5oztpKdtwhuIGb7pXEml__bHsjs1SWO2YNI,1468
84
84
  plain/runtime/README.md,sha256=S_FIOmSq8LkVQHh9Xm6s3EJWKTVdlSr5A_bNXgh02X8,4740
85
- plain/runtime/__init__.py,sha256=o2RVETiL8U0lMFBpbtfnxflhw_4MFllMV6CEpX3RqZs,1965
86
- plain/runtime/global_settings.py,sha256=Vi7jabMF-SBolkP5qx1nLnGoDt_kD1KT_wgtbjNlPHw,5580
85
+ plain/runtime/__init__.py,sha256=0Q7k0V-8OfmTaKC0paNvV4Lx92L1_J7xoEWQH9aO5y4,2005
86
+ plain/runtime/global_settings.py,sha256=bg7vnEDGU4mdMKFF7QnnhCFawAUjqqXiocryaOr6gsU,5438
87
87
  plain/runtime/user_settings.py,sha256=uRHHVfzUvHon91_fOKj7K2WaBYwJ1gCPLfeXqKj5CTs,10902
88
88
  plain/signals/README.md,sha256=FInfJXdVQkb7u93PvD8XgPbz_f6m0l2xIu_4PyttV1E,234
89
89
  plain/signals/__init__.py,sha256=eAs0kLqptuP6I31dWXeAqRNji3svplpAV4Ez6ktjwXM,131
@@ -109,7 +109,7 @@ plain/urls/converters.py,sha256=s2JZVOdzZC16lgobsI93hygcdH5L0Kj4742WEkXsVcs,1193
109
109
  plain/urls/exceptions.py,sha256=q4iPh3Aa-zHbA-tw8v6WyX1J1n5WdAady2xvxFuyXB0,114
110
110
  plain/urls/patterns.py,sha256=7DxL5LWq40lI4hFxAJ2I4MyA3HrbCmNx_dHOk8yYiK8,8259
111
111
  plain/urls/resolvers.py,sha256=sZsFQRPlPkogXIVSctZBXJaG0spJzuoJBmtOEZwIXXY,12630
112
- plain/urls/routers.py,sha256=iEsQtTpPNDDVn7r_BQX84FESGSjOeD5qgyO_ep5rzaU,2819
112
+ plain/urls/routers.py,sha256=B1fX-FQTxmr-b_YeHQUMPuilLVqOi6-RqgPgu6MtFDY,2831
113
113
  plain/urls/utils.py,sha256=lKxTX_A3XJpIH7FjlNYju108stY6-8Sw2uVdiSsxOKQ,1249
114
114
  plain/utils/README.md,sha256=hRRkcg4CxMX-zz8d4Bn6V2uJr_VKgTLurc1jY7QlEx8,198
115
115
  plain/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -146,8 +146,8 @@ plain/views/forms.py,sha256=ESZOXuo6IeYixp1RZvPb94KplkowRiwO2eGJCM6zJI0,2400
146
146
  plain/views/objects.py,sha256=GGbcfg_9fPZ-PiaBwIHG2e__8GfWDR7JQtQ15wTyiHg,5970
147
147
  plain/views/redirect.py,sha256=daq2cQIkdDF78bt43sjuZxRAyJm_t_SKw6tyPmiXPIc,1985
148
148
  plain/views/templates.py,sha256=SU1fO9gVMp-gEQHYeFplxvmgeMyrLgT8MJ12WNVmQC8,2085
149
- plain-0.42.2.dist-info/METADATA,sha256=-2ueX6bhRxFuPq7x4GDGiML7MsQ93dY2ORRZe-FrutM,4297
150
- plain-0.42.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
151
- plain-0.42.2.dist-info/entry_points.txt,sha256=1Ys2lsSeMepD1vz8RSrJopna0RQfUd951vYvCRsvl6A,45
152
- plain-0.42.2.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
153
- plain-0.42.2.dist-info/RECORD,,
149
+ plain-0.43.1.dist-info/METADATA,sha256=6uNFnTLaGGNquLaCjlvqN7vDZThC-YouL3ItOCxaIxE,4297
150
+ plain-0.43.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
151
+ plain-0.43.1.dist-info/entry_points.txt,sha256=1Ys2lsSeMepD1vz8RSrJopna0RQfUd951vYvCRsvl6A,45
152
+ plain-0.43.1.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
153
+ plain-0.43.1.dist-info/RECORD,,
File without changes