$21 GRAYBYTE WORDPRESS FILE MANAGER $34

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python313/lib/python3.13/site-packages/pip/_internal/network/

HOME
Current File : /opt/alt/python313/lib/python3.13/site-packages/pip/_internal/network//xmlrpc.py
"""xmlrpclib.Transport implementation
"""

import logging
import urllib.parse
import xmlrpc.client
from typing import TYPE_CHECKING, Tuple

from pip._internal.exceptions import NetworkConnectionError
from pip._internal.network.session import PipSession
from pip._internal.network.utils import raise_for_status

if TYPE_CHECKING:
    from xmlrpc.client import _HostType, _Marshallable

logger = logging.getLogger(__name__)


class PipXmlrpcTransport(xmlrpc.client.Transport):
    """Provide a `xmlrpclib.Transport` implementation via a `PipSession`
    object.
    """

    def __init__(
        self, index_url: str, session: PipSession, use_datetime: bool = False
    ) -> None:
        super().__init__(use_datetime)
        index_parts = urllib.parse.urlparse(index_url)
        self._scheme = index_parts.scheme
        self._session = session

    def request(
        self,
        host: "_HostType",
        handler: str,
        request_body: bytes,
        verbose: bool = False,
    ) -> Tuple["_Marshallable", ...]:
        assert isinstance(host, str)
        parts = (self._scheme, host, handler, None, None, None)
        url = urllib.parse.urlunparse(parts)
        try:
            headers = {"Content-Type": "text/xml"}
            response = self._session.post(
                url,
                data=request_body,
                headers=headers,
                stream=True,
            )
            raise_for_status(response)
            self.verbose = verbose
            return self.parse_response(response.raw)
        except NetworkConnectionError as exc:
            assert exc.response
            logger.critical(
                "HTTP error %s while getting %s",
                exc.response.status_code,
                url,
            )
            raise


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
10 Feb 2026 9.37 AM
root / linksafe
0755
__pycache__
--
10 Feb 2026 9.37 AM
root / linksafe
0755
__init__.py
0.049 KB
10 Jan 2026 11.03 AM
root / linksafe
0644
auth.py
20.06 KB
10 Jan 2026 11.03 AM
root / linksafe
0644
cache.py
3.843 KB
10 Jan 2026 11.03 AM
root / linksafe
0644
download.py
5.953 KB
10 Jan 2026 11.03 AM
root / linksafe
0644
lazy_wheel.py
7.459 KB
10 Jan 2026 11.03 AM
root / linksafe
0644
session.py
18.171 KB
10 Jan 2026 11.03 AM
root / linksafe
0644
utils.py
3.978 KB
10 Jan 2026 11.03 AM
root / linksafe
0644
xmlrpc.py
1.749 KB
10 Jan 2026 11.03 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF