Skip to content

v3.1.1

Choose a tag to compare

@geyang geyang released this 25 Jan 18:02
· 14 commits to main since this release

Bug Fixes

  • EnvVar Descriptor Protocol: EnvVar now works in plain classes without @proto decorator
    • Previously EnvVar @ "VAR" | default returned _EnvVar object in plain classes
    • Now auto-resolves via __get__ descriptor when accessed as class attribute
    • Fixes: AttributeError: '_EnvVar' object has no attribute 'decode'

API Changes

  • Removed .get() method: Use class attribute access instead
    • Old: EnvVar("PORT", dtype=int).get()
    • New: class C: port = EnvVar("PORT", dtype=int) then C.port
    • Use invalidate_cache() to force re-read from environment