Compare commits

..

No commits in common. "1e96563522686a76e1008a3c24b1a8b8d55219bf" and "bce59127ebd7026f5b913d3ca8b6aa0727592f79" have entirely different histories.

3 changed files with 4 additions and 20 deletions

View File

@ -45,19 +45,12 @@ def test_newest_stable_ignores_unparseable_entries():
# PyPI stub packages date-stamp a fourth component. Capping the regex at
# three reported this exact pin as unpinned *against its own value*.
("==2.33.0.20260712", "2.33.0.20260712"),
# PEP 440 post/dev/pre releases are exact pins too (pytest-asyncio).
("1.4.1.post1", "1.4.1.post1"), ("==1.4.1.post1", "1.4.1.post1"),
("2.0.post3", "2.0.post3"), ("1.0.dev2", "1.0.dev2"),
("==2.0rc1", "2.0rc1"), ("1.2.3a1", "1.2.3a1"), ("1.2b4", "1.2b4"),
("1.0.post1.dev2", "1.0.post1.dev2"),
])
def test_exact_pins_are_recognised(raw, expected):
assert exact_pin(raw) == expected
@pytest.mark.parametrize("raw", ["^1.6.0", ">=1.6.0", "any", "*", "", ">=1,<2", "~1.2",
">=1.4.1.post1", "~=1.4", "1.4.post", "1.4.postx", "1.4.1.post1,<2",
])
@pytest.mark.parametrize("raw", ["^1.6.0", ">=1.6.0", "any", "*", "", ">=1,<2", "~1.2"])
def test_ranges_are_not_exact_pins(raw):
assert exact_pin(raw) is None
@ -68,13 +61,6 @@ def test_behind_compares_versions():
assert not behind("1.8.0", "1.7.0")
def test_a_post_release_is_newer_than_its_base_release():
assert behind("1.4.1", "1.4.1.post1")
assert not behind("1.4.1.post1", "1.4.1")
assert not is_prerelease("1.4.1.post1")
assert newest_stable(["1.4.1", "1.4.1.post1", "1.4.0"]) == "1.4.1.post1"
def test_behind_never_fires_on_unparseable_input():
"""An unpinned constraint is UNPINNED, never dressed up as staleness."""
assert not behind("^1.6.0", "1.7.0")

View File

@ -160,12 +160,10 @@ def behind(pinned: str, latest: str) -> bool:
# date-stamp a fourth (`types-requests==2.33.0.20260712`), and capping at
# three reported an exact pin as unpinned against itself. A project-name
# prefix (`natural-comparator-1.1`) is part of the pin, since it is what the
# registry's version list spells. PEP 440 `(a|b|rc)N`, `.postN` and `.devN`
# follow the release (`pytest-asyncio==1.4.1.post1`), before the semver suffix.
# registry's version list spells.
EXACT = re.compile(
r"^\s*(?:==\s*)?(?:[A-Za-z][A-Za-z_.-]*?-(?=v?\d))?"
r"v?\d+(?:\.\d+)*(?:(?:a|b|rc)\d+)?(?:\.post\d+)?(?:\.dev\d+)?"
r"(?:[-+][0-9A-Za-z.-]+)?\s*$"
r"v?\d+(?:\.\d+)*(?:[-+][0-9A-Za-z.-]+)?\s*$"
)

View File

@ -81,7 +81,7 @@ of truth** — if a prompt needs correcting, fix it here and re-distribute.
| 01 | `~/src/utils/prompts/dopamine-ux-01-motion-tokens.md` — deleted (done) |
| 02 | `~/src/utils/prompts/dopamine-ux-02-structural-check.md` |
| 03 | `~/src/diet-guard/prompts/dopamine-ux-diet-guard.md` |
| 04 | `~/src/screen-locker/prompts/dopamine-ux-04-screen-locker.md` — deleted (done) |
| 04 | `~/src/screen-locker/prompts/dopamine-ux-04-screen-locker.md` |
| 05 | `~/src/screen-locker/prompts/dopamine-ux-05-workout-app.md` — deleted (done) |
| 06 | `~/src/todo/prompts/dopamine-ux-todo.md` |
| 07 | `~/src/dufs-cloud/prompts/dopamine-ux-07-theme.md` |