You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
"This module exists for backwards compatibility only. For new code we "
"recommend using :mod:`asyncio`."
msgstr ""
"Este módulo existe únicamente por motivos de retrocompatibilidad. Para nuevo "
"código, es recomendable usar :mod:`asyncio`."
# -He "traducido" el verbo de "subclass" por "heredar", ¿alguna solución mejor?
# -¿Mejor traduccion para "channel map"? (depende del contexto pero lo desconozco)
#: ../Doc/library/asynchat.rst:22
#, fuzzy
msgid ""
"This module builds on the :mod:`asyncore` infrastructure, simplifying "
"asynchronous clients and servers and making it easier to handle protocols "
Expand All
@@ -49,6 +57,17 @@ msgid ""
"class:`asynchat.async_chat` channel objects as it receives incoming "
"connection requests."
msgstr ""
"Este módulo se construye en la infraestructura de :mod:`asyncore', "
"simplificando los clientes y servidores asíncronos y facilitando la gestión "
"de protocolos cuyos elementos son terminados por cadenas de texto "
"arbitrarias, o que son de longitud variable. :mod:`asynchat` define la clase "
"abstracta :class:`async_chat` de la que se debe heredar, implementado los "
"métodos :meth:`collect_incoming_data` y :meth:`found_terminator`. Utiliza el "
"mismo bucle asíncrono que :mod:`asyncore`, y los dos tipos de canal, :class:"
"`asyncore.dispatcher` y :class:`asynchat.async_chat`, se pueden mezclar "
"libremente en el mapa de canal. Normalmente un canal de servidor :class:"
"`asyncore.dispatcher` genera nuevos objetos de canal :class:`asynchat."
"async_chat`, al recibir peticiones de conexión entrantes."
#: ../Doc/library/asynchat.rst:37
msgid ""
Expand All
@@ -58,6 +77,11 @@ msgid ""
"methods. The :class:`asyncore.dispatcher` methods can be used, although not "
"all make sense in a message/response context."
msgstr ""
"Esta clase es una subclase abstracta de :class:`asyncore.dispatcher`. Para "
"el uso práctico del código se debe heredar :class:`async_chat`, definiendo "
"los métodos significativos :meth:`collect_incoming_data` y :meth:"
"`found_terminator`. Los métodos de :class:`asyncore.dispatcher` se pueden "
"utilizar, aunque no todos tienen sentido en un contexto de mensaje/respuesta."
#: ../Doc/library/asynchat.rst:44
msgid ""
Expand All
@@ -67,22 +91,33 @@ msgid ""
"`async_chat` object's methods are called by the event-processing framework "
"with no action on the part of the programmer."
msgstr ""
"Al igual que :class:`asyncore.dispatcher`, :class:`async_chat` define una "
"serie de eventos generados por un análisis sobre las condiciones de "
"_socket_, tras una llamada a :c:func:`select`. Una vez que el bucle de "
"_polling_ haya sido iniciado, los métodos de los objetos :class:`async_chat` "
"son llamados por el _framework_ que procesa los eventos, sin que tengamos "
"que programar ninguna acción a mayores."
#: ../Doc/library/asynchat.rst:50
msgid ""
"Two class attributes can be modified, to improve performance, or possibly "
"even to conserve memory."
msgstr ""
"Se pueden modificar dos atributos de clase, para mejorar el rendimiento o "
"incluso hasta para ahorrar memoria."
#: ../Doc/library/asynchat.rst:56
msgid "The asynchronous input buffer size (default ``4096``)."
msgstr ""
msgstr "El tamaño del _buffer_ de entrada asíncrona (por defecto ``4096``)."
#: ../Doc/library/asynchat.rst:61
msgid "The asynchronous output buffer size (default ``4096``)."
msgstr ""
msgstr "El tamaño del _buffer_ de salida asíncrona (por defecto ``4096``)."
# -Traducido "exhaustion" como "agotamiento", ¿alguna palabra más técnica mejor?
# -¿Traducción de "endpoint"?
#: ../Doc/library/asynchat.rst:63
#, fuzzy
msgid ""
"Unlike :class:`asyncore.dispatcher`, :class:`async_chat` allows you to "
"define a :abbr:`FIFO (first-in, first-out)` queue of *producers*. A producer "
Expand All
@@ -96,6 +131,18 @@ msgid ""
"recognize the end of, or an important breakpoint in, an incoming "
"transmission from the remote endpoint."
msgstr ""
"Al contrario que :class:`asyncore.dispatcher`, :class:`async_chat` permite "
"definir una cola :abbr:`FIFO (first-in, first-out)` de productores "
"(*producers*). Un productor necesita tener un solo método, :meth:`more`, que "
"debe devolver los datos que se vayan a transmitir en el canal. Cuando el "
"método :meth:`more` devuelve un objeto bytes vacío, significa que el "
"productor ya se ha agotado (por ejemplo, que no contiene más datos). En este "
"punto, el objeto :class:`async_chat` elimina el productor de la cola y "
"empieza a usar el siguiente productor, si existiese. Cuando la cola de "
"productores está vacía, el método :meth:`handle_write` no hace nada. El "
"método :meth:`set_terminator` de los objetos de canal se utiliza para "
"describir cómo reconocer, en una transmisión entrante desde el punto remoto, "
"el final de esta transmisión o un punto de ruptura importante en la misma."
#: ../Doc/library/asynchat.rst:76
msgid ""
Expand All
@@ -104,25 +151,36 @@ msgid ""
"data that the channel receives asynchronously. The methods are described "
"below."
msgstr ""
"Para construir una subclase funcional de :class:`async_chat`, los métodos de "
"entrada :meth:`collect_incoming_data` and :meth:`found_terminator` deben "
"tratar los datos que el canal recibe asíncronamente. Los métodos se "
"describen a continuación."
#: ../Doc/library/asynchat.rst:84
msgid ""
"Pushes a ``None`` on to the producer queue. When this producer is popped off "
"the queue it causes the channel to be closed."
msgstr ""
"Añade un ``None`` en la cola de productores. Cuando este productor se extrae "
"de la cola, hace que el canal se cierre."
#: ../Doc/library/asynchat.rst:90
msgid ""
"Called with *data* holding an arbitrary amount of received data. The "
"default method, which must be overridden, raises a :exc:"
"`NotImplementedError` exception."
msgstr ""
"Llamado con *data*, conteniendo una cantidad arbitraria de datos recibidos. "
"El método por defecto, que debe ser reemplazado, lanza una excepción :exc:"
"`NotImplementedError`."
#: ../Doc/library/asynchat.rst:97
msgid ""
"In emergencies this method will discard any data held in the input and/or "
"output buffers and the producer queue."
msgstr ""
"En situaciones de emergencia, este método descarta cualquier dato albergado "
"en los búfers de entrada y/o salida y en la cola del productor."
#: ../Doc/library/asynchat.rst:103
msgid ""
Expand All
@@ -131,10 +189,15 @@ msgid ""
"raises a :exc:`NotImplementedError` exception. The buffered input data "
"should be available via an instance attribute."
msgstr ""
"Llamado cuando el flujo de datos de entrada coincide con la condición de "
"finalización establecida por :meth:`set_terminator`. El método por defecto, "
"que debe ser reemplazado, lanza una excepción :exc:`NotImplementedError`. "
"Los datos de entrada en búfer deberían estar disponibles a través de un "
"atributo de instancia."
#: ../Doc/library/asynchat.rst:111
msgid "Returns the current terminator for the channel."
msgstr ""
msgstr "Retorna el terminador actual del canal."
#: ../Doc/library/asynchat.rst:116
msgid ""
Expand All
@@ -143,67 +206,89 @@ msgid ""
"although it is possible to use your own producers in more complex schemes to "
"implement encryption and chunking, for example."
msgstr ""
"Añade datos en la cola del canal para asegurarse de su transmisión. Esto es "
"todo lo que se necesita hacer para que el canal envíe los datos a la red, "
"aunque es posible usar productores personalizados en esquemas más complejos "
"para implementar características como encriptación o fragmentación."
# -Seguramente "Takes" se refiere a un método que obtiene el objeto como parámetro de entrada, por lo que "Obtiene" no me parece la mejor traducción en este caso. ¿Quizás "recibe"?
# -¿Mejor traducción de "endpoint"?
#: ../Doc/library/asynchat.rst:124
#, fuzzy
msgid ""
"Takes a producer object and adds it to the producer queue associated with "
"the channel. When all currently-pushed producers have been exhausted the "
"channel will consume this producer's data by calling its :meth:`more` method "
"and send the data to the remote endpoint."
msgstr ""
"Obtiene un objeto productor y lo añade a la cola de productores asociada al "
"canal. Cuando todos los productores añadidos actualmente han sido agotados, "
"el canal consumirá los datos de este productor llamando al método :meth:"
"`more`, y enviando los datos al punto remoto."
#: ../Doc/library/asynchat.rst:132
msgid ""
"Sets the terminating condition to be recognized on the channel. ``term`` "
"may be any of three types of value, corresponding to three different ways to "
"handle incoming protocol data."
msgstr ""
"Establece la condición de finalización que será reconocida en este canal. "
"``term`` puede ser uno de los tres tipos de valores posibles, "
"correspondientes a tres formas diferentes de tratar los datos de protocolo "
"entrantes."
#: ../Doc/library/asynchat.rst:137
msgid "term"
msgstr ""
msgstr "término"
#: ../Doc/library/asynchat.rst:137
msgid "Description"
msgstr ""
msgstr "Descripción"
#: ../Doc/library/asynchat.rst:139
msgid "*string*"
msgstr ""
msgstr "*string*"
#: ../Doc/library/asynchat.rst:139
msgid ""
"Will call :meth:`found_terminator` when the string is found in the input "
"stream"
msgstr ""
"Llamará a :meth:`found_terminator` cuando la cadena de caracteres se "
"encuentre en el flujo de datos de entrada"
#: ../Doc/library/asynchat.rst:142
msgid "*integer*"
msgstr ""
msgstr "*integer*"
#: ../Doc/library/asynchat.rst:142
msgid ""
"Will call :meth:`found_terminator` when the indicated number of characters "
"have been received"
msgstr ""
"Llamará a :meth:`found_terminator` cuando el número de caracteres indicado "
"se haya recibido"
#: ../Doc/library/asynchat.rst:146
msgid "``None``"
msgstr ""
msgstr "``None``"
#: ../Doc/library/asynchat.rst:146
msgid "The channel continues to collect data forever"
msgstr ""
msgstr "El canal continúa recopilando datos indefinidamente"
#: ../Doc/library/asynchat.rst:150
msgid ""
"Note that any data following the terminator will be available for reading by "
"the channel after :meth:`found_terminator` is called."
msgstr ""
"Téngase en cuenta que cualquier dato posterior al terminador estará "
"disponible para ser leído por el canal después de llamar a :meth:"
"`found_terminator`."
#: ../Doc/library/asynchat.rst:157
msgid "asynchat Example"
msgstr ""
msgstr "Ejemplo de *asynchat*"
#: ../Doc/library/asynchat.rst:159
msgid ""
Expand All
@@ -214,6 +299,12 @@ msgid ""
"end of the HTTP headers, and a flag indicates that the headers are being "
"read."
msgstr ""
"El siguiente ejemplo parcial muestra cómo se pueden leer peticiones HTTP "
"con :class:`async_chat`. Un servidor web podría crear un objeto :class:"
"`http_request_handler` para cada conexión de cliente entrante. Téngase en "
"cuenta que, inicialmente, el terminador del canal está configurado para "
"detectar la línea vacía presente al final de las cabeceras HTTP, y una "
"bandera indica que las cabeceras se están leyendo."
#: ../Doc/library/asynchat.rst:166
msgid ""
Expand All
@@ -222,10 +313,20 @@ msgid ""
"`` header is used to set a numeric terminator to read the right amount of "
"data from the channel."
msgstr ""
"Una vez que las cabeceras se hayan leído, si la petición es de tipo POST (lo "
"cual indica que hay más datos disponibles en el flujo de entrada), la "
"cabecera ``Content-Length:`` se utiliza para establecer un terminador "
"numérico para leer la cantidad de datos correcta en el canal."
# ¿Traducción de "marshalled"?
#: ../Doc/library/asynchat.rst:171
#, fuzzy
msgid ""
"The :meth:`handle_request` method is called once all relevant input has been "
"marshalled, after setting the channel terminator to ``None`` to ensure that "
"any extraneous data sent by the web client are ignored. ::"
msgstr ""
"El método :meth:`handle_request` se llama en cuanto todas las entradas "
"relevantes han sido reunidas, tras establecer el terminador del canal a "
"``None`` para asegurarse de que cualquier dato extraño enviado por el "
"cliente web es ignorado. ::"
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.