libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] Kami commented on a change in pull request #1332: [GH-1322] Detect broken `yum install python-requests`
Date Sat, 03 Aug 2019 15:06:34 GMT
Kami commented on a change in pull request #1332: [GH-1322] Detect broken `yum install python-requests`
URL: https://github.com/apache/libcloud/pull/1332#discussion_r310354294
 
 

 ##########
 File path: libcloud/__init__.py
 ##########
 @@ -24,6 +24,8 @@
 import codecs
 import atexit
 
+import requests
 
 Review comment:
   We import this file in ``setup.py`` to read ``__version__`` attribute from it which means
``setup.py`` calls could fail if ``requests`` is not installed on the system (aka when setup.py
is called during installations, it's unlikely these days, but still) - https://github.com/apache/libcloud/blob/trunk/setup.py#L76.
It's generally a bad practice to do that, but that code has probably been there for a long
time.
   
   I think it would be safer and better for us to simply parse this file as string and use
regex to match ``__version__`` attribute.
   
   Something along those lines - https://github.com/StackStorm/st2/blob/master/scripts/dist_utils.py#L134

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message