8000 huggorm: python -m huggorm.server warns on every start · Issue #1062 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

huggorm: python -m huggorm.server warns on every start #1062

Open

Description

@Lillecarl

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.


Assisted-By: Claude Opus 5.5

Activity

  1. added
    source: huggorm
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source: huggorm

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0