Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

requests support >= 0.9 #1

Open
wants to merge 5 commits into from

1 participant

Commits on May 2, 2013
  1. @InQuant
Commits on May 3, 2013
  1. @InQuant
  2. @InQuant

    Typo

    InQuant authored
  3. @InQuant

    Update processor.py

    InQuant authored
Commits on May 5, 2013
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +4 −4 crate/pypi/processor.py
  2. +2 −2 crate/pypi/tasks.py
View
8 crate/pypi/processor.py
@@ -397,7 +397,7 @@ def download(self):
"If-Modified-Since": stored_file_data["modified"],
}
- resp = requests.get(file_data["file"], headers=headers, prefetch=True)
+ resp = requests.get(file_data["file"], headers=headers, stream=False)
if resp.status_code == 304:
logger.info("[DOWNLOAD] skipping %(filename)s because it has not been modified" % {"filename": release_file.filename})
@@ -482,13 +482,13 @@ def verify_and_sync_pages(self):
if self.datastore.get(SERVERKEY_KEY):
key = load_key(self.datastore.get(SERVERKEY_KEY))
else:
- serverkey = requests.get(SERVERKEY_URL, prefetch=True)
+ serverkey = requests.get(SERVERKEY_URL, stream=False)
key = load_key(serverkey.content)
self.datastore.set(SERVERKEY_KEY, serverkey.content)
try:
# Download the "simple" page from PyPI for this package
- simple = requests.get(urlparse.urljoin(SIMPLE_URL, urllib.quote(self.name.encode("utf-8"))), prefetch=True)
+ simple = requests.get(urlparse.urljoin(SIMPLE_URL, urllib.quote(self.name.encode("utf-8"))), stream=False)
simple.raise_for_status()
except requests.HTTPError:
if simple.status_code == 404:
@@ -500,7 +500,7 @@ def verify_and_sync_pages(self):
try:
# Download the "serversig" page from PyPI for this package
- serversig = requests.get(urlparse.urljoin(SERVERSIG_URL, urllib.quote(self.name.encode("utf-8"))), prefetch=True)
+ serversig = requests.get(urlparse.urljoin(SERVERSIG_URL, urllib.quote(self.name.encode("utf-8"))), stream=False)
serversig.raise_for_status()
except requests.HTTPError:
if serversig.status_code == 404:
View
4 crate/pypi/tasks.py
@@ -40,7 +40,7 @@ def process(name, version, timestamp, action, matches):
def remove(name, version, timestamp, action, matches):
package = PyPIPackage(name, version)
- package.delete()
+ eackage.delete()
def remove_file(name, version, timestamp, action, matches):
@@ -203,7 +203,7 @@ def fetch_server_key(package):
@task
def refresh_pypi_package_index_cache():
- r = requests.get("http://pypi.python.org/simple/", prefetch=True)
+ r = requests.get("http://pypi.python.org/simple/", stream=False)
PyPIIndexPage.objects.create(content=r.content)
Something went wrong with that request. Please try again.