6877637507bc4f97e7c9a8e3505befe1837654d9
geoip2 is an optional dependency used only when a MaxMind mmdb path is configured. Importing it unconditionally at module level caused the server to crash on startup with ModuleNotFoundError when the package was absent from the environment. Move the imports under TYPE_CHECKING (for static analysis) and add lazy local imports inside init_geoip() and _geoip_lookup() where geoip2 is actually needed at runtime. The server now starts normally without a MaxMind database, and geoip2 is loaded on demand if the feature is used.
Description
No description provided
Languages
Python
72.9%
TypeScript
19.4%
Markdown
4.2%
Roff
1.5%
Shell
1.2%
Other
0.8%