Skip to content

PyPI release v1.0.0 is missing dialog.Format, dialog.Tags — blocks gemma library #15

@ac12644

Description

@ac12644

Description

The PyPI release dialog==1.0.0 is missing dialog.Format and dialog.Tags, which were added to the GitHub main branch after the release. Since the version in dialog/__init__.py was not bumped, pip install dialog always resolves to the stale PyPI package.

This is the root cause of google-deepmind/gemma#559 and google-deepmind/gemma#606 — making it impossible to use the gemma library from source with a standard pip install.

What's missing from PyPI v1.0.0

  1. dialog/_src/string/str_compat.py — contains the Format enum (added in commit "Add conversion methods", PiperOrigin-RevId: 868643343)
  2. dialog/__init__.py — PyPI version doesn't export Format or Tags

GitHub main has both:

from dialog._src.string.str_compat import Format  # present on main, missing on PyPI
from dialog._src.tags import Tags                  # present on main, missing on PyPI

Reproduction

pip install dialog==1.0.0
python -c "import dialog; print(dialog.Format)"
# AttributeError: module 'dialog' has no attribute 'Format'

vs.

pip install "dialog @ git+https://github.com/google-deepmind/dialog.git"
python -c "import dialog; print(dialog.Format)"
# <enum 'Format'>  ✓

Impact

The gemma PyPI package (google-deepmind/gemma) imports dialog.Format in gemma/gm/text/_tokenizer.py:196 and dialog.Tags in gemma/gm/tools/_manager.py:64. With PyPI dialog, any import of gemma's tokenizer or tool system crashes immediately.

Fix

Bump __version__ in dialog/__init__.py (e.g. to 1.1.0) and publish a new PyPI release. This will make pip install dialog pick up the version that includes Format and Tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions