Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/requests_toolbelt/adapters/__pycache__/ |
Upload File : |
o �O�Xt � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm Z G d d � d ej�ZG dd� deej�Z G d d� de �ZG dd� de�ZG dd� de�Zddd�Zdd� ZdS )a The App Engine Transport Adapter for requests. .. versionadded:: 0.6.0 This requires a version of requests >= 2.10.0 and Python 2. There are two ways to use this library: #. If you're using requests directly, you can use code like: .. code-block:: python >>> import requests >>> import ssl >>> import requests.packages.urllib3.contrib.appengine as ul_appengine >>> from requests_toolbelt.adapters import appengine >>> s = requests.Session() >>> if ul_appengine.is_appengine_sandbox(): ... s.mount('http://', appengine.AppEngineAdapter()) ... s.mount('https://', appengine.AppEngineAdapter()) #. If you depend on external libraries which use requests, you can use code like: .. code-block:: python >>> from requests_toolbelt.adapters import appengine >>> appengine.monkeypatch() which will ensure all requests.Session objects use AppEngineAdapter properly. You are also able to :ref:`disable certificate validation <insecure_appengine>` when monkey-patching. � N)�adapters)�sessions� )� exceptions)� gaecontrib)�timeoutc s$ e Zd ZdZdZ� fdd�Z� ZS )�AppEngineMROHacka� Resolves infinite recursion when monkeypatching. This works by injecting itself as the base class of both the :class:`AppEngineAdapter` and Requests' default HTTPAdapter, which needs to be done because default HTTPAdapter's MRO is recompiled when we monkeypatch, at which point this class becomes HTTPAdapter's base class. In addition, we use an instantiation flag to avoid infinite recursion. Fc s* | j sd| _ tt| �j|i |�� d S d S )NT)�_initialized�superr �__init__��self�args�kwargs�� __class__� �F/usr/lib/python3/dist-packages/requests_toolbelt/adapters/appengine.pyr 9 s �zAppEngineMROHack.__init__)�__name__� __module__�__qualname__�__doc__r r � __classcell__r r r r r . s r c s: e Zd ZdZejjdg Zd � fdd� Zd dd�Z� Z S )�AppEngineAdapteray The transport adapter for Requests to use urllib3's GAE support. Implements Requests's HTTPAdapter API. When deploying to Google's App Engine service, some of Requests' functionality is broken. There is underlying support for GAE in urllib3. This functionality, however, is opt-in and needs to be enabled explicitly for Requests to be able to use it. �_validate_certificateTc s&