Don’t use parse_requirements in your code

I just ran into trouble while building a setuptools package.  Specifically, I was using pip.req.parse_requirements to process package dependencies from a requirements.txt file and noticed that upgrading pip would break my code.  Upon further investigation, I found out that they(authors of pip) do not guarantee the api of their internal code.  This is because they officially do not provide a programmatic api to pip see (  My suggestion, just use readlines, its the same thing and dirt simple.

Posted by Chad Dotson

A small town Computer Scientist / Software Engineer. Chad enjoys writing Python and JavaScript as well as tinkering with his Raspberry Pi and Arduino. When not programming, he enjoys Photography (especially lightning) and Sci-Fi.

Leave a Reply