Skip to content

Feature/upgrade deps and modernize tests#169

Open
SeanAdams10 wants to merge 2 commits intoHumanCompatibleAI:masterfrom
SeanAdams10:feature/upgrade-deps-and-modernize-tests
Open

Feature/upgrade deps and modernize tests#169
SeanAdams10 wants to merge 2 commits intoHumanCompatibleAI:masterfrom
SeanAdams10:feature/upgrade-deps-and-modernize-tests

Conversation

@SeanAdams10
Copy link
Copy Markdown

Description

Hi there - the current code base has all dependencies are pinned to 2022-era versions, would the maintainers welcome a PR to modernize? Note: the readme.md mentions that this is a fork with full credit to the original - this comment may need to be removed if you accept this to the main trunk.

Key changes

  • Update Python requirement from 3.10 to >=3.13
  • Upgrade all packages to latest stable versions across pyproject.toml,
    setup.py, server/requirements.txt, and Dockerfile (python:3.13-bookworm)
  • Remove numpy<2 constraint, now using numpy 2.4.4
  • Update tensorflow 2.19→2.21, ray 2.2→2.54.1, setuptools 77→82, and
    all other pinned dependencies
  • Replace legacy import gym with import gymnasium in rllib.py and
    remove deprecated gym package from dependencies
  • Fix Gymnasium env warnings: change observation_space from Box to
    Tuple(Box, Box), return obs tuples from reset()/step() instead of
    dicts, move metadata to info dict
  • Add 14 new pytest tests (test_gym_env_warnings.py) verifying no
    gymnasium warnings and correct observation format
  • Convert all 9 test files from unittest to pytest (testing/ and
    src/human_aware_rl/), removing all unittest.TestCase inheritance,
    setUp/tearDown → fixtures, self.assert* → plain assert
  • Fix flaky test_mdp_serialization by using tempfile instead of shared
    path, and fix test_render_state_from_dict misnamed helper function
  • Regenerate uv.lock with all updated dependencies

Potentially breaking changes (depends on usage)

  • Python 3.10/3.11/3.12 no longer supported (now requires >=3.13)
  • numpy 2.x: code using numpy 1.x-only APIs (e.g. removed type aliases like np.bool, np.int, np.float, np.object, np.str) will break.
    Pickled data using old numpy dtypes may trigger deprecation warnings.
  • Gymnasium env API change: Overcooked.reset() and step() now return observation as a tuple of two numpy arrays instead of a dict with "both_agent_obs"/"overcooked_state"/"other_agent_env_idx" keys. "overcooked_state" and "other_agent_env_idx" are now in the info dict. observation_space is now Tuple(Box, Box) instead of Box.
  • gym package removed: code importing gym must switch to gymnasium
  • Flask upgraded 2.x→3.x and Flask-SocketIO 4.x→5.x in server requirements (different async handling, python-socketio 4.x→5.x)
  • protobuf upgraded 3.x→7.x in server requirements (breaking API changes across major versions)
  • Dockerfile base image changed from python:3.7-buster to python:3.13-bookworm

Checklist:

  • All test cases are still passing
  • No new functionality

SeanAdams10 and others added 2 commits April 5, 2026 07:22
… framework

- Update Python requirement from 3.10 to >=3.13
- Upgrade all packages to latest stable versions across pyproject.toml,
  setup.py, server/requirements.txt, and Dockerfile (python:3.13-bookworm)
- Remove numpy<2 constraint, now using numpy 2.4.4
- Update tensorflow 2.19->2.21, ray 2.2->2.54.1, setuptools 77->82, and
  all other pinned dependencies
- Replace legacy `import gym` with `import gymnasium` in rllib.py and
  remove deprecated `gym` package from dependencies
- Fix Gymnasium env warnings: change observation_space from Box to
  Tuple(Box, Box), return obs tuples from reset()/step() instead of
  dicts, move metadata to info dict
- Add 14 new pytest tests (test_gym_env_warnings.py) verifying no
  gymnasium warnings and correct observation format
- Convert all 9 test files from unittest to pytest (testing/ and
  src/human_aware_rl/), removing all unittest.TestCase inheritance,
  setUp/tearDown -> fixtures, self.assert* -> plain assert
- Fix flaky test_mdp_serialization by using tempfile instead of shared
  path, and fix test_render_state_from_dict misnamed helper function
- Regenerate uv.lock with all updated dependencies

BREAKING CHANGES:

- Python 3.10/3.11/3.12 no longer supported (now requires >=3.13)
- numpy 2.x: code using numpy 1.x-only APIs (e.g. removed type aliases
  like np.bool, np.int, np.float, np.object, np.str) will break.
  Pickled data using old numpy dtypes may trigger deprecation warnings.
- Gymnasium env API change: Overcooked.reset() and step() now return
  observation as a tuple of two numpy arrays instead of a dict with
  "both_agent_obs"/"overcooked_state"/"other_agent_env_idx" keys.
  "overcooked_state" and "other_agent_env_idx" are now in the info dict.
  observation_space is now Tuple(Box, Box) instead of Box.
- gym package removed: code importing `gym` must switch to `gymnasium`
- Flask upgraded 2.x->3.x and Flask-SocketIO 4.x->5.x in server
  requirements (different async handling, python-socketio 4.x->5.x)
- protobuf upgraded 3.x->7.x in server requirements (breaking API
  changes across major versions)
- Dockerfile base image changed from python:3.7-buster to
  python:3.13-bookworm

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant