plain 0.59.0__py3-none-any.whl → 0.60.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 +11 -0
- plain/runtime/global_settings.py +4 -2
- plain/runtime/utils.py +7 -4
- {plain-0.59.0.dist-info → plain-0.60.0.dist-info}/METADATA +1 -1
- {plain-0.59.0.dist-info → plain-0.60.0.dist-info}/RECORD +8 -8
- {plain-0.59.0.dist-info → plain-0.60.0.dist-info}/WHEEL +0 -0
- {plain-0.59.0.dist-info → plain-0.60.0.dist-info}/entry_points.txt +0 -0
- {plain-0.59.0.dist-info → plain-0.60.0.dist-info}/licenses/LICENSE +0 -0
plain/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
# plain changelog
|
2
2
|
|
3
|
+
## [0.60.0](https://github.com/dropseed/plain/releases/plain@0.60.0) (2025-08-27)
|
4
|
+
|
5
|
+
### What's changed
|
6
|
+
|
7
|
+
- Added new `APP_VERSION` setting that defaults to the project version from `pyproject.toml` ([57fb948d46](https://github.com/dropseed/plain/commit/57fb948d46))
|
8
|
+
- Updated `get_app_name_from_pyproject()` to `get_app_info_from_pyproject()` to return both name and version ([57fb948d46](https://github.com/dropseed/plain/commit/57fb948d46))
|
9
|
+
|
10
|
+
### Upgrade instructions
|
11
|
+
|
12
|
+
- No changes required
|
13
|
+
|
3
14
|
## [0.59.0](https://github.com/dropseed/plain/releases/plain@0.59.0) (2025-08-22)
|
4
15
|
|
5
16
|
### What's changed
|
plain/runtime/global_settings.py
CHANGED
@@ -3,13 +3,15 @@ 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 .utils import
|
6
|
+
from .utils import get_app_info_from_pyproject
|
7
7
|
|
8
8
|
# MARK: Core Settings
|
9
9
|
|
10
10
|
DEBUG: bool = False
|
11
11
|
|
12
|
-
|
12
|
+
name, version = get_app_info_from_pyproject()
|
13
|
+
APP_NAME: str = name
|
14
|
+
APP_VERSION: str = version
|
13
15
|
|
14
16
|
# List of strings representing installed packages.
|
15
17
|
INSTALLED_PACKAGES: list[str] = []
|
plain/runtime/utils.py
CHANGED
@@ -2,8 +2,8 @@ import tomllib
|
|
2
2
|
from pathlib import Path
|
3
3
|
|
4
4
|
|
5
|
-
def
|
6
|
-
"""Get the project name from the nearest pyproject.toml file."""
|
5
|
+
def get_app_info_from_pyproject():
|
6
|
+
"""Get the project name and version from the nearest pyproject.toml file."""
|
7
7
|
current_path = Path.cwd()
|
8
8
|
|
9
9
|
# Walk up the directory tree looking for pyproject.toml
|
@@ -13,8 +13,11 @@ def get_app_name_from_pyproject():
|
|
13
13
|
try:
|
14
14
|
with pyproject_path.open("rb") as f:
|
15
15
|
pyproject = tomllib.load(f)
|
16
|
-
|
16
|
+
project = pyproject.get("project", {})
|
17
|
+
name = project.get("name", "App")
|
18
|
+
version = project.get("version", "dev")
|
19
|
+
return name, version
|
17
20
|
except (tomllib.TOMLDecodeError, OSError):
|
18
21
|
continue
|
19
22
|
|
20
|
-
return "App"
|
23
|
+
return "App", "dev"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
plain/CHANGELOG.md,sha256=
|
1
|
+
plain/CHANGELOG.md,sha256=D_pNXRYALt2M76lgFw0DsNBweBA3wjnESTQycSEMz68,10968
|
2
2
|
plain/README.md,sha256=5BJyKhf0TDanWVbOQyZ3zsi5Lov9xk-LlJYCDWofM6Y,4078
|
3
3
|
plain/__main__.py,sha256=GK39854Lc_LO_JP8DzY9Y2MIQ4cQEl7SXFJy244-lC8,110
|
4
4
|
plain/debug.py,sha256=XdjnXcbPGsi0J2SpHGaLthhYU5AjhBlkHdemaP4sbYY,758
|
@@ -90,9 +90,9 @@ plain/preflight/security.py,sha256=oxUZBp2M0bpBfUoLYepIxoex2Y90nyjlrL8XU8UTHYY,2
|
|
90
90
|
plain/preflight/urls.py,sha256=cQ-WnFa_5oztpKdtwhuIGb7pXEml__bHsjs1SWO2YNI,1468
|
91
91
|
plain/runtime/README.md,sha256=sTqXXJkckwqkk9O06XMMSNRokAYjrZBnB50JD36BsYI,4873
|
92
92
|
plain/runtime/__init__.py,sha256=8GtvKROf3HUCtneDYXTbEioPcCtwnV76dP57n2PnjuE,2343
|
93
|
-
plain/runtime/global_settings.py,sha256=
|
93
|
+
plain/runtime/global_settings.py,sha256=LX4g0ncNif_STuM83Idcron1j_TnQ9TJwWbVywexyZo,5788
|
94
94
|
plain/runtime/user_settings.py,sha256=OzMiEkE6ZQ50nxd1WIqirXPiNuMAQULklYHEzgzLWgA,11027
|
95
|
-
plain/runtime/utils.py,sha256=
|
95
|
+
plain/runtime/utils.py,sha256=p5IuNTzc7Kq-9Ym7etYnt_xqHw5TioxfSkFeq1bKdgk,832
|
96
96
|
plain/signals/README.md,sha256=XefXqROlDhzw7Z5l_nx6Mhq6n9jjQ-ECGbH0vvhKWYg,272
|
97
97
|
plain/signals/__init__.py,sha256=eAs0kLqptuP6I31dWXeAqRNji3svplpAV4Ez6ktjwXM,131
|
98
98
|
plain/signals/dispatch/__init__.py,sha256=FzEygqV9HsM6gopio7O2Oh_X230nA4d5Q9s0sUjMq0E,292
|
@@ -152,8 +152,8 @@ plain/views/forms.py,sha256=ESZOXuo6IeYixp1RZvPb94KplkowRiwO2eGJCM6zJI0,2400
|
|
152
152
|
plain/views/objects.py,sha256=YNb8MO1I99HTmQghC5nFk25TQmaB_s45K5yg5BGt4qY,5018
|
153
153
|
plain/views/redirect.py,sha256=Xpb3cB7nZYvKgkNqcAxf9Jwm2SWcQ0u2xz4oO5M3vP8,1909
|
154
154
|
plain/views/templates.py,sha256=oAlebEyfES0rzBhfyEJzFmgLkpkbleA6Eip-8zDp-yk,1863
|
155
|
-
plain-0.
|
156
|
-
plain-0.
|
157
|
-
plain-0.
|
158
|
-
plain-0.
|
159
|
-
plain-0.
|
155
|
+
plain-0.60.0.dist-info/METADATA,sha256=w-VNXX3R5YsTPJ_UBnFSzu33jUHnwPHAQdzMJZxILhc,4488
|
156
|
+
plain-0.60.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
157
|
+
plain-0.60.0.dist-info/entry_points.txt,sha256=nn4uKTRRZuEKOJv3810s3jtSMW0Gew7XDYiKIvBRR6M,93
|
158
|
+
plain-0.60.0.dist-info/licenses/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
|
159
|
+
plain-0.60.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|