Enable Legacy Warnings (#2617)

* Update pendulum.py

* version warnings

* black

* try except

* update notices version

* Exception

* nosec

* black

* no loop, stderr

* black
This commit is contained in:
trigaten
2022-02-17 13:44:11 -05:00
committed by GitHub
parent 3fa10a2360
commit a1f14215f3
2 changed files with 14 additions and 0 deletions

View File

@@ -15,6 +15,19 @@ from gym import vector
from gym import wrappers
import os
__all__ = ["Env", "Space", "Wrapper", "make", "spec", "register"]
os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "hide"
try:
import gym_notices.notices as notices
import sys
# print version warning if necessary
notice = notices.notices.get(__version__)
if notice is not None:
print(notice, file=sys.stderr)
except Exception: # nosec
pass

View File

@@ -49,6 +49,7 @@ setup(
"numpy>=1.18.0",
"cloudpickle>=1.2.0",
"importlib_metadata>=4.10.0; python_version < '3.10'",
"gym_notices>=0.0.4",
],
extras_require=extras,
package_data={