summaryrefslogtreecommitdiffstats
path: root/pym/portage/getbinpkg.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-17 22:34:17 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-17 22:34:17 -0700
commitd159be545ecb431addc3e7bb31a8ed8cfd9984af (patch)
tree32e9d4225f0b96046c21dd6d6c43d1b626530ebf /pym/portage/getbinpkg.py
parent27dbcfdd5cd285c8b40808ff0f791b25b6f1f3cd (diff)
downloadportage-d159be545ecb431addc3e7bb31a8ed8cfd9984af.tar.gz
portage-d159be545ecb431addc3e7bb31a8ed8cfd9984af.tar.bz2
portage-d159be545ecb431addc3e7bb31a8ed8cfd9984af.zip
Remove old binhost protocol for bug #438640.
The old protocol has been deprecated since portage-2.1.6 (2009), so it should be completely irrelevant now.
Diffstat (limited to 'pym/portage/getbinpkg.py')
-rw-r--r--pym/portage/getbinpkg.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py
index 538f8c23c..28b18a00f 100644
--- a/pym/portage/getbinpkg.py
+++ b/pym/portage/getbinpkg.py
@@ -18,6 +18,7 @@ import socket
import time
import tempfile
import base64
+import warnings
_all_errors = [NotImplementedError, ValueError, socket.error]
@@ -65,6 +66,10 @@ if sys.hexversion >= 0x3000000:
long = int
def make_metadata_dict(data):
+
+ warnings.warn("portage.getbinpkg.make_metadata_dict() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
myid,myglob = data
mydict = {}
@@ -84,6 +89,10 @@ class ParseLinks(html_parser_HTMLParser):
"""Parser class that overrides HTMLParser to grab all anchors from an html
page and provide suffix and prefix limitors"""
def __init__(self):
+
+ warnings.warn("portage.getbinpkg.ParseLinks is deprecated",
+ DeprecationWarning, stacklevel=2)
+
self.PL_anchors = []
html_parser_HTMLParser.__init__(self)
@@ -122,6 +131,9 @@ def create_conn(baseurl,conn=None):
optional connection. If connection is already active, it is passed on.
baseurl is reduced to address and is returned in tuple (conn,address)"""
+ warnings.warn("portage.getbinpkg.create_conn() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
parts = baseurl.split("://",1)
if len(parts) != 2:
raise ValueError(_("Provided URI does not "
@@ -221,6 +233,10 @@ def create_conn(baseurl,conn=None):
def make_ftp_request(conn, address, rest=None, dest=None):
"""(conn,address,rest) --- uses the conn object to request the data
from address and issuing a rest if it is passed."""
+
+ warnings.warn("portage.getbinpkg.make_ftp_request() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
try:
if dest:
@@ -270,6 +286,9 @@ def make_http_request(conn, address, params={}, headers={}, dest=None):
the data from address, performing Location forwarding and using the
optional params and headers."""
+ warnings.warn("portage.getbinpkg.make_http_request() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
rc = 0
response = None
while (rc == 0) or (rc == 301) or (rc == 302):
@@ -312,6 +331,10 @@ def make_http_request(conn, address, params={}, headers={}, dest=None):
def match_in_array(array, prefix="", suffix="", match_both=1, allow_overlap=0):
+
+ warnings.warn("portage.getbinpkg.match_in_array() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
myarray = []
if not (prefix and suffix):
@@ -352,6 +375,9 @@ def dir_get_list(baseurl,conn=None):
URI should be in the form <proto>://<site>[:port]<path>
Connection is used for persistent connection instances."""
+ warnings.warn("portage.getbinpkg.dir_get_list() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
if not conn:
keepconnection = 0
else:
@@ -400,6 +426,9 @@ def file_get_metadata(baseurl,conn=None, chunk_size=3000):
URI should be in the form <proto>://<site>[:port]<path>
Connection is used for persistent connection instances."""
+ warnings.warn("portage.getbinpkg.file_get_metadata() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
if not conn:
keepconnection = 0
else:
@@ -451,6 +480,10 @@ def file_get(baseurl,dest,conn=None,fcmd=None,filename=None):
URI should be in the form <proto>://[user[:pass]@]<site>[:port]<path>"""
if not fcmd:
+
+ warnings.warn("Use of portage.getbinpkg.file_get() without the fcmd "
+ "parameter is deprecated", DeprecationWarning, stacklevel=2)
+
return file_get_lib(baseurl,dest,conn)
if not filename:
filename = os.path.basename(baseurl)
@@ -483,6 +516,9 @@ def file_get_lib(baseurl,dest,conn=None):
URI should be in the form <proto>://<site>[:port]<path>
Connection is used for persistent connection instances."""
+ warnings.warn("portage.getbinpkg.file_get_lib() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
if not conn:
keepconnection = 0
else:
@@ -526,6 +562,10 @@ def file_get_lib(baseurl,dest,conn=None):
def dir_get_metadata(baseurl, conn=None, chunk_size=3000, verbose=1, usingcache=1, makepickle=None):
"""(baseurl,conn,chunk_size,verbose) --
"""
+
+ warnings.warn("portage.getbinpkg.dir_get_metadata() is deprecated",
+ DeprecationWarning, stacklevel=2)
+
if not conn:
keepconnection = 0
else: