sloria / environs

simplified environment variable parsing
MIT License
1.19k stars 83 forks source link

Handle marshmallow DeprecationWarning #333

Closed epicserve closed 6 months ago

epicserve commented 6 months ago

With:

marshmallow==3.21.0
environs==10.3.0

A DeprecationWarning is raised when importing environs.

Python 3.12.2 (main, Feb 13 2024, 08:34:52) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import warnings
>>> warnings.filterwarnings("error")
>>> import environs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/venv/lib/python3.12/site-packages/environs/__init__.py", line 58, in <module>
    _SUPPORTS_LOAD_DEFAULT = ma.__version_info__ >= (3, 13)
                             ^^^^^^^^^^^^^^^^^^^
  File "/opt/venv/lib/python3.12/site-packages/marshmallow/__init__.py", line 47, in __getattr__
    warnings.warn(
DeprecationWarning: The '__version_info__' attribute is deprecated and will be removed in in a future version. Use feature detection or 'packaging.Version(importlib.metadata.version("marshmallow")).release' instead.
sloria commented 6 months ago

This has already been addressed on main. I'll cut a release when I have some time later today

sloria commented 6 months ago

Fix is released in 11.0.0