From 73b1b9e45e75968405d354dc9cf1da0408832c20 Mon Sep 17 00:00:00 2001 From: crthpl Date: Mon, 13 Apr 2026 14:51:14 -0700 Subject: [PATCH] Fix metagame 0.5.0 ImportError from missing future annotations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 0.5.0 release dropped `from __future__ import annotations` in trading_client.py, so class-body type hints are now evaluated at import time. One of them (`get_market_positions` → `websocket_api.MarketPositions`) references a class that doesn't exist, which means `import metagame` raises AttributeError and any consumer crashes on startup. Restoring the future import fixes this without touching runtime behavior. Bumps to 0.5.1. --- python-client/pyproject.toml | 2 +- python-client/src/metagame/trading_client.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python-client/pyproject.toml b/python-client/pyproject.toml index 48829082..5f71e42c 100644 --- a/python-client/pyproject.toml +++ b/python-client/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "metagame" -version = "0.5.0" +version = "0.5.1" description = "MetaGame Trading Bootcamp Python Client" readme = "README.md" authors = [ diff --git a/python-client/src/metagame/trading_client.py b/python-client/src/metagame/trading_client.py index 10c528ef..6f8ddf56 100644 --- a/python-client/src/metagame/trading_client.py +++ b/python-client/src/metagame/trading_client.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import bisect import json import logging