-
-
Couldn't load subscription status.
- Fork 1.2k
Description
It appears that a new string has been injected into the Gym package that prints unsolicited messages to users’ screens. The message reads:
Gym has been unmaintained since 2022 and does not support NumPy 2.0 amongst other critical functionality.
Please upgrade to Gymnasium, the maintained drop-in replacement of Gym, or contact the authors of your software and request that they upgrade.
Users of this version of Gym should be able to simply replace 'import gym' with 'import gymnasium as gym' in the vast majority of cases.
See the migration guide at https://gymnasium.farama.org/introduction/migration_guide/ for additional information.
Why this is a problem:
This message is being forced on all users of Gym and all downstream libraries that depend on it, even if they are intentionally using the old version for compatibility reasons.
It is not acceptable to modify published wheels in-place in order to inject new behavior — this breaks reproducibility and undermines trust in the package.
Printing unsolicited advertisements to end users’ consoles is disruptive and not expected behavior from a library.
This has made it way into many of my projects (vmas, benchmarl, and their google colab notebooks) and ultimately even in tutorials on the pytorch website https://docs.pytorch.org/tutorials/intermediate/reinforcement_q_learning.html
Expected behavior:
Previously released versions of Gym should remain immutable. If a message like this needs to be communicated, it should be done through:
- Release notes / changelogs
- Documentation updates
- A new major release that downstream projects can opt into
Request:
Please remove the injected message from altered packages.
Restore the original wheels for the affected versions so downstream users can rely on consistent behavior.
Communicate deprecation and migration guidance through official channels (docs, GitHub README, PyPI project description), rather than forced runtime messages.
Thank you for addressing this quickly. Preserving trust in the stability and integrity of the Python packaging ecosystem is extremely important.