Skip to main content

chives/urls: import chives.fetch conditionally

ID
5a2876d
date
2026-05-05 18:52:16+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
4ffb5ec
message
chives/urls: import `chives.fetch` conditionally
changed files
3 files, 7 additions, 3 deletions

Changed files

CHANGELOG.md (4449) → CHANGELOG.md (4533)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d1822fe..8a61425 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # CHANGELOG
 
+## v36 - 2026-05-05
+
+Fix another dependency issue with `chives.static_site_tests`.
+
 ## v35 - 2026-05-05
 
 Fix an issue where installing `chives.static_site_tests` without `chives.urls` would complain about a missing `certifi` dependency.

src/chives/__init__.py (391) → src/chives/__init__.py (391)

diff --git a/src/chives/__init__.py b/src/chives/__init__.py
index 203d6c4..237bceb 100644
--- a/src/chives/__init__.py
+++ b/src/chives/__init__.py
@@ -11,4 +11,4 @@ I share across multiple sites.
 
 """
 
-__version__ = "35"
+__version__ = "36"

src/chives/urls.py (4639) → src/chives/urls.py (4643)

diff --git a/src/chives/urls.py b/src/chives/urls.py
index 6559fbb..2823330 100644
--- a/src/chives/urls.py
+++ b/src/chives/urls.py
@@ -10,8 +10,6 @@ from urllib.error import HTTPError
 from urllib.parse import SplitResult, parse_qs, urlencode, urlsplit
 import urllib.request
 
-from chives.fetch import fetch_url
-
 
 __all__ = [
     "clean_youtube_url",
@@ -119,6 +117,8 @@ def parse_mastodon_post_url(url: str) -> tuple[str, str, str]:
     Parse a Mastodon post URL into its component parts:
     server, account, post ID.
     """
+    from chives.fetch import fetch_url
+
     u = urlsplit(url)
     path = u.path.strip("/").split("/")