dieseldev / diesel

Greenlet-based event I/O Framework for Python

Home Page:http://diesel.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to install diesel 3.0.16 due to ban of curl requests with Python-urllib user agent

oleg-z opened this issue · comments

pip installation log:

Downloading/unpacking diesel==3.0.16 (from -r /opt/nagios-api/requirements.txt (line 5))
  Could not fetch URL https://pypi.python.org/simple/diesel/3.0.16: HTTP Error 404: Not Found
  Will skip URL https://pypi.python.org/simple/diesel/3.0.16 when looking for download links for diesel==3.0.16 (from -r /opt/nagios-api/requirements.txt (line 5))
  Ignoring link https://pypi.python.org/packages/source/d/diesel/diesel-2.1.0.tar.gz#md5=bf52eb9c2d51fedc667348af613f3250 (from https://pypi.python.org/simple/diesel/), version 2.1.0 doesn't match ==3.0.16
  Ignoring link https://pypi.python.org/packages/source/d/diesel/diesel-2.1.1.tar.gz#md5=0184b336fea8f5d4482befde5716ce14 (from https://pypi.python.org/simple/diesel/), version 2.1.1 doesn't match ==3.0.16
  Ignoring link https://pypi.python.org/packages/source/d/diesel/diesel-3.0.5.tar.gz#md5=c70f7e096e1722b9b4eecd60af1fdf1a (from https://pypi.python.org/simple/diesel/), version 3.0.5 doesn't match ==3.0.16
  Ignoring link http://download.dieselweb.org/diesel-0.9.0b.tar.gz (from https://pypi.python.org/simple/diesel/), version 0.9.0b doesn't match ==3.0.16
  Ignoring link http://download.dieselweb.org/diesel-0.9.1b.tar.gz (from https://pypi.python.org/simple/diesel/), version 0.9.1b doesn't match ==3.0.16
  Ignoring link http://jamwt.com/diesel/diesel-2.0.0.tar.gz (from https://pypi.python.org/simple/diesel/), version 2.0.0 doesn't match ==3.0.16
  Ignoring link http://jamwt.com/diesel/diesel-2.1.0.tar.gz (from https://pypi.python.org/simple/diesel/), version 2.1.0 doesn't match ==3.0.16
  Ignoring link http://jamwt.com/diesel/diesel-2.1.1.tar.gz (from https://pypi.python.org/simple/diesel/), version 2.1.1 doesn't match ==3.0.16
  Ignoring link http://jamwt.com/diesel/diesel-3.0.5.tar.gz (from https://pypi.python.org/simple/diesel/), version 3.0.5 doesn't match ==3.0.16
  HTTP error 403 while getting http://jamwt.com/diesel/diesel-3.0.16.tar.gz (from https://pypi.python.org/simple/diesel/)
  Could not install requirement diesel==3.0.16 (from -r /opt/nagios-api/requirements.txt (line 5)) because of error HTTP Error 403: Forbidden
Could not install requirement diesel==3.0.16 (from -r /opt/nagios-api/requirements.txt (line 5)) because of HTTP error HTTP Error 403: Forbidden for URL http://jamwt.com/diesel/diesel-3.0.16.tar.gz (from https://pypi.python.org/simple/diesel/)

Looks like problem is caused by user agent set by urlib.

Next request works:
curl -L -o /dev/null -v http://jamwt.com/diesel/diesel-3.0.16.tar.gz

This one doesn't work:
curl -H "User-Agent: Python-urllib" -v http://jamwt.com/diesel/diesel-3.0.16.tar.gz

<title>Access denied | jamwt.com used CloudFlare to restrict access</title>
...
<h2 data-translate="what_happened">What happened?</h2>
            <p>The owner of this website (jamwt.com) has banned your access based on your browser's signature (171b9664133c03d6-ua48).</p>

This is still a problem by the way. Uploading a new package to pypi would also fix it, as pypi only has version 3.0.5

#89 looks relevant to this issue

Should be fixed now that release are hosted on github.