summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-21 14:36:08 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-09-21 14:36:08 (GMT)
commit9c0cccf363c49a02d2f1cd9fc09b351aec3518af (patch)
tree8fb72c03bd91418774fc0a9f1eb5db2405a3feed
parentc5dbb3dadf42218cd0ab7d25759bcdb6ac580965 (diff)
parentdd2d55c8a145deffb521724e7cb159b453eeb6b8 (diff)
downloadcpython-9c0cccf363c49a02d2f1cd9fc09b351aec3518af.zip
cpython-9c0cccf363c49a02d2f1cd9fc09b351aec3518af.tar.gz
cpython-9c0cccf363c49a02d2f1cd9fc09b351aec3518af.tar.bz2
Branch merge
-rw-r--r--Doc/library/packaging.pypi.simple.rst2
-rw-r--r--Lib/packaging/command/install_dist.py1
-rw-r--r--Lib/packaging/pypi/simple.py8
-rw-r--r--Lib/packaging/tests/test_pypi_dist.py2
4 files changed, 6 insertions, 7 deletions
diff --git a/Doc/library/packaging.pypi.simple.rst b/Doc/library/packaging.pypi.simple.rst
index 92b3270..9153738 100644
--- a/Doc/library/packaging.pypi.simple.rst
+++ b/Doc/library/packaging.pypi.simple.rst
@@ -24,7 +24,7 @@ API
prefer_final=False, prefer_source=True, \
hosts=('*',), follow_externals=False, \
mirrors_url=None, mirrors=None, timeout=15, \
- mirrors_max_tries=0, verbose=False)
+ mirrors_max_tries=0)
*index_url* is the address of the index to use for requests.
diff --git a/Lib/packaging/command/install_dist.py b/Lib/packaging/command/install_dist.py
index 4fbca7e..ce7015e 100644
--- a/Lib/packaging/command/install_dist.py
+++ b/Lib/packaging/command/install_dist.py
@@ -176,7 +176,6 @@ class install_dist(Command):
self.installer = None
self.requested = None
self.no_record = None
- self.no_resources = None
# -- Option finalizing methods -------------------------------------
# (This is rather more involved than for most commands,
diff --git a/Lib/packaging/pypi/simple.py b/Lib/packaging/pypi/simple.py
index 9faabaa..e01e033 100644
--- a/Lib/packaging/pypi/simple.py
+++ b/Lib/packaging/pypi/simple.py
@@ -119,10 +119,9 @@ class Crawler(BaseClient):
def __init__(self, index_url=DEFAULT_SIMPLE_INDEX_URL, prefer_final=False,
prefer_source=True, hosts=DEFAULT_HOSTS,
follow_externals=False, mirrors_url=None, mirrors=None,
- timeout=SOCKET_TIMEOUT, mirrors_max_tries=0, verbose=False):
+ timeout=SOCKET_TIMEOUT, mirrors_max_tries=0):
super(Crawler, self).__init__(prefer_final, prefer_source)
self.follow_externals = follow_externals
- self.verbose = verbose
# mirroring attributes.
parsed = urllib.parse.urlparse(index_url)
@@ -322,9 +321,8 @@ class Crawler(BaseClient):
infos = get_infos_from_url(link, project_name,
is_external=self.index_url not in url)
except CantParseArchiveName as e:
- if self.verbose:
- logger.warning(
- "version has not been parsed: %s", e)
+ logger.warning(
+ "version has not been parsed: %s", e)
else:
self._register_release(release_info=infos)
else:
diff --git a/Lib/packaging/tests/test_pypi_dist.py b/Lib/packaging/tests/test_pypi_dist.py
index ff9a16e..43c8cbe 100644
--- a/Lib/packaging/tests/test_pypi_dist.py
+++ b/Lib/packaging/tests/test_pypi_dist.py
@@ -1,6 +1,7 @@
"""Tests for the packaging.pypi.dist module."""
import os
+import shutil
from packaging.version import VersionPredicate
from packaging.pypi.dist import (ReleaseInfo, ReleasesList, DistInfo,
split_archive_name, get_infos_from_url)
@@ -185,6 +186,7 @@ class TestDistInfo(TempdirManager, unittest.TestCase):
dist2 = Dist(url=url)
# doing an unpack
dist2_there = dist2.unpack()
+ self.addCleanup(shutil.rmtree, dist2_there)
dist2_result = os.listdir(dist2_there)
self.assertIn('paf', dist2_result)
os.remove(os.path.join(dist2_there, 'paf'))