
    <|h                         d Z ddlmZ ddlmZ g dZ	 ddlmZ [ddlmZ ddlmZ dd	lmZ ej                  Zy
# e	$ r ej                  d       Y 1w xY w)a  
Wrappers to make file-like objects cooperative.

.. class:: FileObject(fobj, mode='r', buffering=-1, closefd=True, encoding=None, errors=None, newline=None)

    The main entry point to the file-like gevent-compatible behaviour. It
    will be defined to be the best available implementation.

    All the parameters are as for :func:`io.open`.

    :param fobj: Usually a file descriptor of a socket. Can also be
        another object with a ``fileno()`` method, or an object that can
        be passed to ``io.open()`` (e.g., a file system path). If the object
        is not a socket, the results will vary based on the platform and the
        type of object being opened.

        All supported versions of Python allow :class:`os.PathLike` objects.

    .. versionchanged:: 1.5
       Accept str and ``PathLike`` objects for *fobj* on all versions of Python.
    .. versionchanged:: 1.5
       Add *encoding*, *errors* and *newline* arguments.
    .. versionchanged:: 1.5
       Accept *closefd* and *buffering* instead of *close* and *bufsize* arguments.
       The latter remain for backwards compatibility.

There are two main implementations of ``FileObject``. On all systems,
there is :class:`FileObjectThread` which uses the built-in native
threadpool to avoid blocking the entire interpreter. On UNIX systems
(those that support the :mod:`fcntl` module), there is also
:class:`FileObjectPosix` which uses native non-blocking semantics.

A third class, :class:`FileObjectBlock`, is simply a wrapper that
executes everything synchronously (and so is not gevent-compatible).
It is provided for testing and debugging purposes.

All classes have the same signature; some may accept extra keyword arguments.

Configuration
=============

You may change the default value for ``FileObject`` using the
``GEVENT_FILE`` environment variable. Set it to ``posix``, ``thread``,
or ``block`` to choose from :class:`FileObjectPosix`,
:class:`FileObjectThread` and :class:`FileObjectBlock`, respectively.
You may also set it to the fully qualified class name of another
object that implements the file interface to use one of your own
objects.

.. note::

    The environment variable must be set at the time this module
    is first imported.

Classes
=======
    )absolute_import)config)FileObjectPosixFileObjectThreadFileObjectBlock
FileObject)fcntl)r   r   )r   )r   N)__doc__
__future__r   gevent._configr   __all__r	   gevent._fileobjectposixr   ImportErrorremovegevent._fileobjectcommonr   r   
fileobjectr        P/var/www/html/test/engine/venv/lib/python3.12/site-packages/gevent/fileobject.py<module>r      s[   8r ' !8 	7 5 4 
  &NN$%&s   : AA