AnandInguva commented on code in PR #21968:
URL: https://github.com/apache/beam/pull/21968#discussion_r905468048


##########
sdks/python/apache_beam/runners/portability/stager.py:
##########
@@ -54,14 +54,14 @@
 import shutil
 import sys
 import tempfile
-from distutils.version import StrictVersion
 from typing import Callable
 from typing import List
 from typing import Optional
 from typing import Tuple
 from urllib.parse import urlparse
 
 import pkg_resources
+from pkg_resources import parse_version

Review Comment:
   We need setuptools to build the `sdist`. I eliminated the usage of distutils 
almost in the code base except for the `DistutilErrorr` which is used in 
`setup.py`. To import that error, we just need to import it after importing 
`setuptools`
   
   For `StrictVersion`, `parse_version` was used because it follows PEP-440 and 
we need to sort the version of pip and some other modules in our code. 
`parse_version` comes from `pkg_resources` module.
   



-- 
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]

Reply via email to