Skip to content

Conversation

@viknesh-ai
Copy link

This fixes the issue where importing d3rlpy shows a deprecation warning about gym being unmantained. The fix suppresses stderr during gym imports while maintaining compatibility with both gym and gymnasium.

  • Suppress warning in types.py (early import point)
  • Suppress warning in healthcheck.py
  • Import types module early in init.py to ensure suppression
  • Add safety measure in base.py

This fixes the issue where importing d3rlpy shows a deprecation warning
about gym being unmantained. The fix suppresses stderr during gym imports
while maintaining compatibility with both gym and gymnasium.

- Suppress warning in types.py (early import point)
- Suppress warning in healthcheck.py
- Import types module early in __init__.py to ensure suppression
- Add safety measure in base.py
@takuseno
Copy link
Owner

takuseno commented Nov 2, 2025

@viknesh-ai Hi, thank you for your contribution! The implementation looks good, but I need you to pass the CI checks. First thing you might need to do is to pass format checks and you can do this as follows:

pip install -r dev.requirements.txt
./scripts/lint

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.

2 participants