Skip to content

Single-source the package version #78

@Faerkeren

Description

@Faerkeren

Problem

Package version metadata is inconsistent.

pyproject.toml:7 declares version 1.1.2, while src/haclient/__init__.py:68 exposes __version__ = "0.2.0".

Suggested Fix

Use one source of truth.

Options:

  • Remove __version__ and tell users to use importlib.metadata.version("haclient").
  • Or configure Hatchling to read the version from src/haclient/__init__.py.

Add a packaging test that asserts the imported version matches package metadata.

Rationale

Mismatched versions confuse users, bug reports, and release automation. This is low effort and should not be left wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:packagingPackaging, build, release, and metadataseverity:lowLow severitytype:refactorRefactoring without intended behavior change

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions