fix: use find_dotenv(usecwd=True) for PyPI .env loading

load_dotenv() without usecwd=True fails for mcphub.exe because
find_dotenv() walks the call stack and searches from site-packages/
instead of the user's working directory. Bump to v3.0.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-19 04:45:53 +03:30
parent f29dc299b2
commit 9d45d824d3
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
[project] [project]
name = "mcphub-server" name = "mcphub-server"
version = "3.0.3" version = "3.0.4"
description = "AI-native management hub for WordPress, WooCommerce, and self-hosted services via Model Context Protocol (MCP)" description = "AI-native management hub for WordPress, WooCommerce, and self-hosted services via Model Context Protocol (MCP)"
authors = [ authors = [
{name = "MCP Hub", email = "contact@mcphub.dev"} {name = "MCP Hub", email = "contact@mcphub.dev"}

View File

@@ -27,9 +27,9 @@ import warnings
from datetime import UTC, datetime from datetime import UTC, datetime
from typing import Optional from typing import Optional
from dotenv import load_dotenv from dotenv import find_dotenv, load_dotenv
load_dotenv() # Load .env from current working directory load_dotenv(find_dotenv(usecwd=True)) # Always search from CWD (needed for PyPI mcphub.exe)
# Suppress noisy deprecation warning from websockets (transitive dependency) # Suppress noisy deprecation warning from websockets (transitive dependency)
warnings.filterwarnings("ignore", category=DeprecationWarning, module="websockets") warnings.filterwarnings("ignore", category=DeprecationWarning, module="websockets")