o
    2g4                     @  s  d Z ddlmZ ddlZddlZddlZddlZddlZddlm	Z	 ddl
mZ ddlmZmZmZmZmZ ddlmZ ddlmZ dd	lmZmZmZmZmZmZmZmZmZ dd
l m!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z'm(Z(m)Z) ddl*m+Z+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1 z
ddl2m3Z3 dZ4W n e5y   dZ3dZ4Y nw erddlZddl6Z7ddl8m9Z9 e#j:Z:e#j;Z;e#j<Z<e#j=Z=edZ>G dd dZ?dS )zProvide the Reddit class.    )annotationsN)islice)	getLogger)IOTYPE_CHECKINGAny	GeneratorIterable)urlparse)warn)	
AuthorizerDeviceIDAuthorizerReadOnlyAuthorizerRedirect	RequestorScriptAuthorizerTrustedAuthenticatorUntrustedAuthenticatorsession)
BadRequest   )models)Config)API_PATHUSER_AGENT_FORMAT__version__)ClientException!MissingRequiredAttributeExceptionRedditAPIException)Objector)_deprecate_args)update_checkFT)BaseTokenManagerprawc                   @  s  e Zd ZdZdZedZedddZ	edd	d
Z
e
jddd
Z
edddZejdddZdd ZdddZeddddd	dddddddd$d%Zd&d' Zd(d) Zdd-d.Zdddd/dd/d0dd=d>ZddAdBZdCdD ZdddEddHdIZddLdMZddNdOZddQdRZedSdP	dddTddVdWZed;d1d5d9ddddXddYdZZdd]d^Zed;d9dd_ddadbZedcdPddddddeddidjZed;d1d5ddddXddkdlZ ed;d1d3d9d5dddddmddndoZ!ed;d1d5dddpddqdrZ"edsddtddvdwZ#edxdy	dddzdd|d}Z$ed7d;d9d1d3d5dddddmdd~dZ%edSdP	dddTdddZ&dddZ'dS )Reddita  The Reddit class provides convenient access to Reddit's API.

    Instances of this class are the gateway to interacting with Reddit's API through
    PRAW. The canonical way to obtain an instance of this class is via:

    .. code-block:: python

        import praw

        reddit = praw.Reddit(
            client_id="CLIENT_ID",
            client_secret="CLIENT_SECRET",
            password="PASSWORD",
            user_agent="USERAGENT",
            username="USERNAME",
        )

    Fz.([0-9]{1,3}) (milliseconds?|seconds?|minutes?)returnintc                 C  s   | j }|  j d7  _ |S )Nr   )_unique_counterselfvalue r+   C/home/garg/my-data/venv/lib/python3.10/site-packages/praw/reddit.py_next_uniqueV   s   zReddit._next_uniqueboolc                 C  s   | j | jkS )z6Return ``True`` when using the ``ReadOnlyAuthorizer``.)_core_read_only_corer)   r+   r+   r,   	read_only\   s   zReddit.read_onlyr*   c                 C  s2   |r| j | _dS | jdu rd}t|| j| _dS )zSet or unset the use of the ReadOnlyAuthorizer.

        :raises: :class:`.ClientException` when attempting to unset ``read_only`` and
            only the ``ReadOnlyAuthorizer`` is available.

        NzFread_only cannot be unset as only the ReadOnlyAuthorizer is available.)r0   r/   _authorized_corer   )r)   r*   msgr+   r+   r,   r2   a   s   
c                 C  s    | j }|du rtdtdd |S )zGet validate_on_submit.

        .. deprecated:: 7.0

            If property :attr:`.validate_on_submit` is set to ``False``, the behavior is
            deprecated by Reddit. This attribute will be removed around May-June 2020.

        FzReddit will check for validation on all posts around May-June 2020. It is recommended to check for validation by setting reddit.validate_on_submit to True.   category
stacklevel)_validate_on_submitr   DeprecationWarningr(   r+   r+   r,   validate_on_submits   s   
zReddit.validate_on_submitvalc                 C  s
   || _ d S N)r9   )r)   r<   r+   r+   r,   r;      s   
c                 C  s   | S )z Handle the context manager open.r+   r1   r+   r+   r,   	__enter__   s   zReddit.__enter___objectc                 G  s   dS )z!Handle the context manager close.Nr+   )r)   r?   r+   r+   r,   __exit__   s    zReddit.__exit__	site_nameconfig_interpolationrequestor_classrequestor_kwargstoken_managerN)rC   rD   rE   rF   
str | None)type[prawcore.requestor.Requestor] | Nonedict[str, Any] | NoneBaseTokenManager | Noneconfig_settingsstr | bool | int | Nonec             
   K  s  d | _  | _| _d| _|| _d| _d| _z|ptdpd}t	||fi || _
W n tjyH } zd}	|durC| jd|	 7  _ d}~ww d}
d	D ]}t| j
|| j
jdfv rbt|
|qM| j
j| j
ju rw|
d
 d}t||   |   | j||d t| d| _	 t| d| _	 t| | _	 t| d| _	 t| d| _ 	 t!| d| _"	 t#| | _$	 t%| d| _&	 t'| d| _(	 t)| d| _*	 t+| | _,dS )a  Initialize a :class:`.Reddit` instance.

        :param site_name: The name of a section in your ``praw.ini`` file from which to
            load settings from. This parameter, in tandem with an appropriately
            configured ``praw.ini``, file is useful if you wish to easily save
            credentials for different applications, or communicate with other servers
            running Reddit. If ``site_name`` is ``None``, then the site name will be
            looked for in the environment variable ``praw_site``. If it is not found
            there, the ``DEFAULT`` site will be used (default: ``None``).
        :param config_interpolation: Config parser interpolation type that will be
            passed to :class:`.Config` (default: ``None``).
        :param requestor_class: A class that will be used to create a requestor. If not
            set, use ``prawcore.Requestor`` (default: ``None``).
        :param requestor_kwargs: Dictionary with additional keyword arguments used to
            initialize the requestor (default: ``None``).
        :param token_manager: When provided, the passed instance, a subclass of
            :class:`.BaseTokenManager`, will manage tokens via two callback functions.
            This parameter must be provided in order to work with refresh tokens
            (default: ``None``).

        Additional keyword arguments will be used to initialize the :class:`.Config`
        object. This can be used to specify configuration settings during instantiation
        of the :class:`.Reddit` instance. For more details, please see
        :ref:`configuration`.

        Required settings are:

        - ``client_id``
        - ``client_secret`` (for installed applications set this value to ``None``)
        - ``user_agent``

        The ``requestor_class`` and ``requestor_kwargs`` allow for customization of the
        requestor :class:`.Reddit` will use. This allows, e.g., easily adding behavior
        to the requestor or wrapping its |Session|_ in a caching layer. Example usage:

        .. |Session| replace:: ``Session``

        .. _session: https://2.python-requests.org/en/master/api/#requests.Session

        .. code-block:: python

            import json

            import betamax
            import requests
            from prawcore import Requestor

            from praw import Reddit


            class JSONDebugRequestor(Requestor):
                def request(self, *args, **kwargs):
                    response = super().request(*args, **kwargs)
                    print(json.dumps(response.json(), indent=4))
                    return response


            my_session = betamax.Betamax(requests.Session())
            reddit = Reddit(
                ..., requestor_class=JSONDebugRequestor, requestor_kwargs={"session": my_session}
            )

        Nr   F	praw_siteDEFAULTa/  You provided the name of a praw.ini configuration which does not exist.

For help with creating a Reddit instance, visit
https://praw.readthedocs.io/en/latest/code_overview/reddit_instance.html

For help on configuring PRAW, visit
https://praw.readthedocs.io/en/latest/getting_started/configuration.html
zRequired configuration setting {!r} missing. 
This setting can be provided in a praw.ini file, as a keyword argument to the Reddit class constructor, or as an environment variable.)	client_id
user_agentclient_secretzr
For installed applications this value must be set to None via a keyword argument to the Reddit class constructor.rD   rE   )-r/   r3   r0   	_objector_token_managerr'   r9   osgetenvr   configconfigparserNoSectionErrormessagegetattrCONFIG_NOT_SETr   formatrR   _check_for_update_prepare_objector_prepare_prawcorer   AuthauthDraftHelperdraftsFrontfrontInboxinbox
LiveHelperliveMultiredditHelpermultiredditRedditModNotesnotes	Redditors	redditorsSubredditHelper	subreddit
Subreddits
subredditsUseruser)r)   rB   rC   rD   rE   rF   rK   config_sectionexchelp_messagerequired_message	attributer4   r+   r+   r,   __init__   sv   P
zReddit.__init__c                 C  sz   | j jr9zt jj}|dkrW d S W n	 ty   Y nw d}zt  d}W n	 ty/   Y nw |r;t	
d d S d S d S )NZMQInteractiveShellFTa  It appears that you are using PRAW in an asynchronous environment.
It is strongly recommended to use Async PRAW: https://asyncpraw.readthedocs.io.
See https://praw.readthedocs.io/en/latest/getting_started/multiple_instances.html#discord-bots-and-asynchronous-environments for more info.
)rX   check_for_asyncget_ipython	__class____name__	NameErrorasyncioget_running_loop	Exceptionloggerwarning)r)   shellin_asyncr+   r+   r,   _check_for_async  s,   
zReddit._check_for_asyncc                 C  s2   t rd S tjs| jjrttt dt_d S d S d S )NT)UPDATE_CHECKER_MISSINGr$   update_checkedrX   check_for_updatesr!   __package__r   r1   r+   r+   r,   r_     s   

zReddit._check_for_update	exceptionr   int | float | Nonec                 C  s   |j D ]?}|jdkrB| j|j}|s d S t|d}|ddr*|d9 }n
|ddr4d}|t| jj	krB|d   S qd S )N	RATELIMITr      minute<   millisecondr   )
items
error_type_ratelimit_regexsearchr[   r&   group
startswithrX   ratelimit_seconds)r)   r   itemamount_searchsecondsr+   r+   r,   _handle_rate_limit  s   


zReddit._handle_rate_limit datafilesjsonmethodparamspathr   .dict[str, str | Any] | bytes | IO | str | Noner   dict[str, IO] | Noner   !dict[Any, Any] | list[Any] | Noner   strr   str | dict[str, str] | Noner   r   c             
   C  s   | j | j||||||dS )a  Run a request through the ``Objector``.

        :param data: Dictionary, bytes, or file-like object to send in the body of the
            request (default: ``None``).
        :param files: Dictionary, filename to file (like) object mapping (default:
            ``None``).
        :param json: JSON-serializable object to send in the body of the request with a
            Content-Type header of application/json (default: ``None``). If ``json`` is
            provided, ``data`` should not be.
        :param method: The HTTP method (e.g., ``"GET"``, ``"POST"``, ``"PUT"``,
            ``"DELETE"``).
        :param params: The query parameters to add to the request (default: ``None``).
        :param path: The path to fetch.

        r   )rT   	objectifyrequest)r)   r   r   r   r   r   r   r+   r+   r,   _objectify_request  s   zReddit._objectify_requestauthenticatorprawcore.auth.BaseAuthenticatorc                 C  s   | j d ur&tdtdd | jjrd}t|| | j _t|| j j| j j	d}n| jjr3t|| jjd}n| j
| _d S t|| jjd | _| _d S )NzToken managers have been deprecated and will be removed in the near future. See https://www.reddit.com/r/redditdev/comments/olk5e6/followup_oauth2_api_changes_regarding_refresh/ for more details.r   r6   zI'refresh_token' setting cannot be provided when providing 'token_manager')post_refresh_callbackpre_refresh_callback)refresh_token
authorizerwindow_size)rU   r   r:   rX   r   	TypeErrorredditr   r   r   r0   r/   r   r   r3   )r)   r   r4   r   r+   r+   r,   _prepare_common_authorizer  s0   
z!Reddit._prepare_common_authorizerc                 C  s  i | j jd tj| j jd tj| j jd tj| j jd tj| j jd tj| j jd tjdtj	dtj
d	tjd
tjdtjdtjdtjdtjdtjdtjdtji dtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtjdtj dtj!d tj"d!tj#d"tj$tj%tj&tj'tj(tj)tj*tj+tj,tj-d#	}t.| || _/d S )$Ncommentr[   redditor
submissionrs   trophyButton
CollectionDraft	DraftListImageLabeledMultiListing
LiveUpdateLiveUpdateEventMenuLinkModeratedListModmailActionModmailConversationzModmailConversations-listModmailMessageSubmenu
TrophyListUserListUserSubredditbuttoncalendarzcommunity-listcustomzid-cardimagemenu	modactionzmoderator-list)	
moderatorsmod_notemorez
post-flairrule
stylesheetzsubreddit-rulestextareawidget)0rX   kindsr   CommentMessageRedditor
Submission	SubredditTrophyr   r   r   r   r   Multiredditr   r   
LiveThreadr   r   r   r   ModmailConversationsListingr   r   r   RedditorListr   ButtonWidgetCalendarCommunityListCustomWidgetIDCardImageWidgetMenu	ModActionModeratorListingModeratorsWidgetModNoteMoreCommentsPostFlairWidgetRule
StylesheetRulesWidgetTextAreaWidgetr   rT   )r)   mappingsr+   r+   r,   r`   ,  s   	
 !"#-zReddit._prepare_objectorrS   "type[prawcore.requestor.Requestor]
Any | Nonec                C  sZ   |pt }|pi }|t| jj| jj| jjfi |}| jjr&| | d S | 	| d S r=   )
r   r   r^   rX   rQ   	oauth_url
reddit_urlrR   _prepare_trusted_prawcore_prepare_untrusted_prawcore)r)   rD   rE   	requestorr+   r+   r,   ra   \  s   zReddit._prepare_prawcorer  prawcore.requestor.Requestorc                 C  s   t || jj| jj| jj}t|}t|| jjd| _| jj	r:| jj
r:t|| jj	| jj
}t|| jjd | _| _d S | | d S Nr   )r   rX   rP   rR   redirect_urir   r   r   r0   usernamepasswordr   r/   r3   r   )r)   r  r   read_only_authorizerscript_authorizerr+   r+   r,   r  q  s$   z Reddit._prepare_trusted_prawcorec                 C  s<   t || jj| jj}t|}t|| jjd| _| | d S r  )	r   rX   rP   r  r   r   r   r0   r   )r)   r  r   r
  r+   r+   r,   r    s   z"Reddit._prepare_untrusted_prawcoreurlc              
   C  sb   t |jdd}d|v r/z| | W |S  ty. } z|jjjW  Y d}~S d}~ww |S )z/Return the canonical URL for a given share URL./sN)	r
   r   rstripsplitgetr   responsenextr  )r)   r  partser+   r+   r,   _resolve_share_url  s   zReddit._resolve_share_urlid)r  models.Commentc                C     |r|  |}tj| ||dS )aF  Return a lazy instance of :class:`.Comment`.

        :param id: The ID of the comment.
        :param url: A permalink pointing to the comment.

        .. note::

            If you want to obtain the comment's replies, you will need to call
            :meth:`~.Comment.refresh` on the returned :class:`.Comment`.

        r  r  )r  r   r   r)   r  r  r+   r+   r,   r     s   
zReddit.comment)r   r   r   c                C     | j ||d||dS )a)  Return parsed objects returned from a DELETE request to ``path``.

        :param path: The path to fetch.
        :param data: Dictionary, bytes, or file-like object to send in the body of the
            request (default: ``None``).
        :param json: JSON-serializable object to send in the body of the request with a
            Content-Type header of application/json (default: ``None``). If ``json`` is
            provided, ``data`` should not be.
        :param params: The query parameters to add to the request (default: ``None``).

        DELETEr   r   r   r   r   r   r)   r   r   r   r   r+   r+   r,   delete     
zReddit.deletedomainmodels.DomainListingc                 C  s   t | |S )z~Return an instance of :class:`.DomainListing`.

        :param domain: The domain to obtain submission listings for.

        )r   DomainListing)r)   r#  r+   r+   r,   r#    s   zReddit.domainr   !str | dict[str, str | int] | Nonec                C  s   | j d||dS )zReturn parsed objects returned from a GET request to ``path``.

        :param path: The path to fetch.
        :param params: The query parameters to add to the request (default: ``None``).

        GETr   r   r   r  )r)   r   r   r+   r+   r,   r    s   z
Reddit.get	fullnamesru   )r*  ru   r  Iterable[str] | None,Iterable[praw.models.Subreddit | str] | None[Generator[praw.models.Subreddit | praw.models.Comment | praw.models.Submission, None, None]c                  s   |||f d}|dkrd}t||dur|n|}|dur>t|tr+d}t|r/dnd d fd	d
}||S dfdd
}||S )aT  Fetch information about each item in ``fullnames``, ``url``, or ``subreddits``.

        :param fullnames: A list of fullnames for comments, submissions, and/or
            subreddits.
        :param subreddits: A list of subreddit names or :class:`.Subreddit` objects to
            retrieve subreddits from.
        :param url: A url (as a string) to retrieve lists of link submissions from.

        :returns: A generator that yields found items in their relative order.

        Items that cannot be matched will not be generated. Requests will be issued in
        batches for each 100 fullnames.

        .. note::

            For comments that are retrieved via this method, if you want to obtain its
            replies, you will need to call :meth:`~.Comment.refresh` on the yielded
            :class:`.Comment`.

        .. note::

            When using the URL option, it is important to be aware that URLs are treated
            literally by Reddit's API. As such, the URLs ``"youtube.com"`` and
            ``"https://www.youtube.com"`` will provide a different set of submissions.

        Nr   z<Either 'fullnames', 'url', or 'subreddits' must be provided.z8'fullnames' and 'subreddits' must be a non-str iterable.r  sr_namenames%Iterable[str | praw.models.Subreddit]c                 3  sb    rt | }n	t dd | D }	 tt|d}|sd S  d|i}jtd |dE d H  q)Nc                 S  s   g | ]}t |qS r+   )r   ).0r   r+   r+   r,   
<listcomp>  s    z2Reddit.info.<locals>.generator.<locals>.<listcomp>Td   ,infor&  )iterlistr   joinr  r   )r/  iterablechunkr   api_parameter_nameis_using_fullnamesr)   r+   r,   	generator  s   
zReddit.info.<locals>.generator_urlr   c                 3  s&    d| i} j td |dE d H  d S )Nr  r5  r&  )r  r   )r?  r   r1   r+   r,   r>     s   )r/  r0  )r?  r   )countr   
isinstancer   )r)   r*  ru   r  
none_countr4   ids_or_namesr>  r+   r;  r,   r5    s   &
zReddit.infoc                C  r  )a(  Return parsed objects returned from a PATCH request to ``path``.

        :param path: The path to fetch.
        :param data: Dictionary, bytes, or file-like object to send in the body of the
            request (default: ``None``).
        :param json: JSON-serializable object to send in the body of the request with a
            Content-Type header of application/json (default: ``None``). If ``json`` is
            provided, ``data`` should not be.
        :param params: The query parameters to add to the request (default: ``None``).

        PATCHr  r  r   r+   r+   r,   patch&  r"  zReddit.patch)r   r   r   r   c             
   C  s   |du r|pi }d}d}|dkr^|d8 }z| j |||d||dW S  tyY } z-|}| j|d}	|	du r;W Y d}~||	dkrAdnd	}
td
|	|
 t|	 W Y d}~nd}~ww |dks|)a  Return parsed objects returned from a POST request to ``path``.

        :param path: The path to fetch.
        :param data: Dictionary, bytes, or file-like object to send in the body of the
            request (default: ``None``).
        :param files: Dictionary, filename to file (like) object mapping (default:
            ``None``).
        :param json: JSON-serializable object to send in the body of the request with a
            Content-Type header of application/json (default: ``None``). If ``json`` is
            provided, ``data`` should not be.
        :param params: The query parameters to add to the request (default: ``None``).

        Nr5   r   r   POSTr   )r   secondr   z"Rate limit hit, sleeping for %d %s)r   r   r   r   debugtimesleep)r)   r   r   r   r   r   attemptslast_exceptionr   r   second_stringr+   r+   r,   post>  s<   
zReddit.post)r   r   c                C  s   | j ||d|dS )a  Return parsed objects returned from a PUT request to ``path``.

        :param path: The path to fetch.
        :param data: Dictionary, bytes, or file-like object to send in the body of the
            request (default: ``None``).
        :param json: JSON-serializable object to send in the body of the request with a
            Content-Type header of application/json (default: ``None``). If ``json`` is
            provided, ``data`` should not be.

        PUT)r   r   r   r   r  )r)   r   r   r   r+   r+   r,   putq  s   z
Reddit.putnsfw)rQ  praw.models.Subredditc             
   C  sv   t d j|rdndd}d}z| j|d| jid W n ty/ } z	|j}W Y d}~nd}~ww t| |dd	 S )
zReturn a random lazy instance of :class:`.Subreddit`.

        :param nsfw: Return a random NSFW (not safe for work) subreddit (default:
            ``False``).

        rs   randnsfwrandom)rs   Nuniquer&  r  r   )	r   r^   r  r-   r   r   r   r   r  )r)   rQ  r  r   redirectr+   r+   r,   random_subreddit  s   zReddit.random_subredditnamefullname)rY  praw.models.Redditorc                C  s   t j| ||dS )zReturn a lazy instance of :class:`.Redditor`.

        :param name: The name of the redditor.
        :param fullname: The fullname of the redditor, starting with ``t2_``.

        Either ``name`` or ``fullname`` can be provided, but not both.

        )rX  rY  )r   r   )r)   rX  rY  r+   r+   r,   r     s   zReddit.redditorc                C  s   | j jr|   |r|rd}t|z| jj||||||dW S  tyy } zNz|j }W n t	yE   |jj
r@d|jj
i}n|dY nw t|ddhkrO |d}	d|v rit|d d	ksbJ |d d
 }
nd}
t|d |	|
g|d}~ww )a  Return the parsed JSON data returned from a request to URL.

        :param data: Dictionary, bytes, or file-like object to send in the body of the
            request (default: ``None``).
        :param files: Dictionary, filename to file (like) object mapping (default:
            ``None``).
        :param json: JSON-serializable object to send in the body of the request with a
            Content-Type header of application/json (default: ``None``). If ``json`` is
            provided, ``data`` should not be.
        :param method: The HTTP method (e.g., ``"GET"``, ``"POST"``, ``"PUT"``,
            ``"DELETE"``).
        :param params: The query parameters to add to the request (default: ``None``).
        :param path: The path to fetch.

        z-At most one of 'data' or 'json' is supported.r   reasonNerrorr[   explanationfieldsr   r   )rX   r   r   r   r/   r   r   r  r   
ValueErrortextsetr  lenr   )r)   r   r   r   r   r   r   r4   r   r]  fieldr+   r+   r,   r     sJ   
zReddit.requestpraw.models.Submissionc                C  r  )a	  Return a lazy instance of :class:`.Submission`.

        :param id: A Reddit base36 submission ID, e.g., ``"2gmzqe"``.
        :param url: A URL supported by :meth:`.Submission.id_from_url`.

        Either ``id`` or ``url`` can be provided, but not both.

        r  )r  r   r   r  r+   r+   r,   r     s   
zReddit.submissionc                 C  s   | j dd|itd dS )zCheck to see if the username is available.

        For example, to check if the username ``bboe`` is available, try:

        .. code-block:: python

            reddit.username_available("bboe")

        r(  rw   username_availabler)  )r   r   )r)   rX  r+   r+   r,   re    s   
zReddit.username_available)r%   r&   )r%   r.   )r*   r.   )r<   r.   )r?   r@   r=   )rB   rG   rC   rG   rD   rH   rE   rI   rF   rJ   rK   rL   )r   r   r%   r   )r   r   r   r   r   r   r   r   r   r   r   r   r%   r   )r   r   )rD   r   rE   r   )r  r  )r  r   r%   r   )r  rG   r  rG   r%   r  )
r   r   r   r   r   r   r   r   r%   r   )r#  r   r%   r$  )r   r   r   r'  r%   r   )r*  r+  ru   r,  r  rG   r%   r-  )r   r   r   r   r   r   r   r   r   r   r%   r   )r   r   r   r   r   r   r%   r   )rQ  r.   r%   rR  )rX  rG   rY  rG   r%   rZ  )r   r   r   r   r   r   r   r   r   r'  r   r   r%   r   )r  rG   r  rG   r%   rd  )rX  r   r%   r.   )(r   
__module____qualname____doc__r   recompiler   propertyr-   r2   setterr;   r>   rA   r    r}   r   r_   r   r   r   r`   ra   r  r  r  r   r!  r#  r  r5  rE  rN  rP  rW  r   r   r   re  r+   r+   r+   r,   r$   ?   s    

	  !

$ 3







H
2;r$   )@rh  
__future__r   r   rY   rV   ri  rI  	itertoolsr   loggingr   typingr   r   r   r   r	   urllib.parser
   warningsr   prawcorer   r   r   r   r   r   r   r   r   prawcore.exceptionsr   r   r   rX   r   constr   r   r   
exceptionsr   r   r   objectorr   utilr    update_checkerr!   r   ImportErrorpraw.modelsr#   util.token_managerr"   r   r   r   r   r   r$   r+   r+   r+   r,   <module>   sJ    ,