FrancescoCasalegno opened a new issue #20824:
URL: https://github.com/apache/incubator-mxnet/issues/20824


   ## Description
   `setuptools` has deprecated the usage of `distutils` `Version` classes since 
version `60.3.0`. See 
https://github.com/pypa/setuptools/commit/1701579e0827317d8888c2254a17b5786b6b5246
 for details.
   
   As a consequence, a `warning` is raised any time we try, e.g., to do `from 
docker import from_env`. Notice that this `warning` can be fatal if the user 
has set a warning filter to `error` mode, which is not too uncommon when 
running unit tests in CI.
   
   ### Error Message
   ```python
   
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/mxnet/__init__.py:104:
 in <module>
       from . import numpy_dispatch_protocol
   
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/mxnet/numpy_dispatch_protocol.py:193:
 in <module>
       @with_array_function_protocol
   
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/mxnet/numpy_dispatch_protocol.py:48:
 in with_array_function_protocol
       cur_np_ver = LooseVersion(_np.__version__)
   
/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/setuptools/_distutils/version.py:57:
 in __init__
       stacklevel=2,
   E   DeprecationWarning: distutils Version classes are deprecated. Use 
packaging.version instead.
   ```
   
   
   ## To Reproduce
   ```python
   import warnings
   warnings.filterwarnings("error")
   
   import mxnet as mx
   ```
   
   ## What have you tried to solve it?
   
   To fix the problem we should replace occurrences of `distutils.Version` (and 
its subclasses) with `packaging.Version`.
   
   There are only few cases where intervention is needed, see full list 
[**here**](https://github.com/apache/incubator-mxnet/search?q=distutils).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to