You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
huggorm: python -m huggorm.server warns on every start #1062
python -m huggorm.server PATH prints this on every start:
<frozen runpy>:130: RuntimeWarning: 'huggorm.server' found in sys.modules after import of package 'huggorm', but prior to execution of 'huggorm.server'; this may result in unpredictable behaviour
The emitted front door (huggorm/__init__.py) has from .server import serve as serve, so the package imports the module before runpy runs it. The server's docstring and the test fixtures name the -m entry.
huggorm.spawn.spawned avoids it with -c "from huggorm.server import main; main()". Routes for the documented entry: a console script, a huggorm.serve module that the front door does not import, or a lazy serve in the front door.
Activity