kurtmckee/feedparser

pip-2.x

Closed this issue · 3 comments

Installing via pip-2.x (2.7 here) pulls the latest version, which is not Python 2 compatible anymore. PyPi should point to 5.2.1, right?

Yes, that's correct. Maybe there's an issue with how the wheel is getting built. I'm looking into this now.

Can confirm this indeed happens

Traceback (most recent call last):
  File "./get_news.py", line 10, in <module>
    import feedparser, sys, re, time
  File "/usr/local/lib/python2.7/dist-packages/feedparser/__init__.py", line 31, in <module>
    from .api import parse
  File "/usr/local/lib/python2.7/dist-packages/feedparser/api.py", line 56, in <module>
    from . import http
  File "/usr/local/lib/python2.7/dist-packages/feedparser/http.py", line 156
    new_pieces[1] = f'{url_pieces.hostname}:{url_pieces.port}'

Forcing PIP to install 5.2.1 successfully clears the issue.

For anyone who comes here via google and just wants things to run right now, a copypaste command: pip install 'feedparser==5.2.1'

(not as if teaching people to use old versions is a good thing)