Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using reserved keywords async and await. #748

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion gateone/async/__init__.py

This file was deleted.

1 change: 1 addition & 0 deletions gateone/asynchronous/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .asynchronous import *
File renamed without changes.
2 changes: 1 addition & 1 deletion gateone/core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@
from gateone.auth.authentication import SSLAuthHandler
from gateone.auth.authorization import require, authenticated, policies
from gateone.auth.authorization import applicable_policies
from gateone.async import MultiprocessRunner, ThreadedRunner
from gateone.asynchronous import MultiprocessRunner, ThreadedRunner
from .utils import generate_session_id, mkdir_p, touch, noop
from .utils import gen_self_signed_ssl, entry_point_files
from .utils import merge_handlers, none_fix, convert_to_timedelta, short_hash
Expand Down
2 changes: 1 addition & 1 deletion gateone/docs/build/html/_modules/gateone/core/server.html
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ <h1>Source code for gateone.core.server</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">gateone.auth.authentication</span> <span class="kn">import</span> <span class="n">SSLAuthHandler</span>
<span class="kn">from</span> <span class="nn">gateone.auth.authorization</span> <span class="kn">import</span> <span class="n">require</span><span class="p">,</span> <span class="n">authenticated</span><span class="p">,</span> <span class="n">policies</span>
<span class="kn">from</span> <span class="nn">gateone.auth.authorization</span> <span class="kn">import</span> <span class="n">applicable_policies</span>
<span class="kn">from</span> <span class="nn">gateone.async</span> <span class="kn">import</span> <span class="n">MultiprocessRunner</span><span class="p">,</span> <span class="n">ThreadedRunner</span>
<span class="kn">from</span> <span class="nn">gateone.asynchronous</span> <span class="kn">import</span> <span class="n">MultiprocessRunner</span><span class="p">,</span> <span class="n">ThreadedRunner</span>
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="n">generate_session_id</span><span class="p">,</span> <span class="n">mkdir_p</span><span class="p">,</span> <span class="n">touch</span><span class="p">,</span> <span class="n">noop</span>
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="n">gen_self_signed_ssl</span><span class="p">,</span> <span class="n">entry_point_files</span>
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="n">merge_handlers</span><span class="p">,</span> <span class="n">none_fix</span><span class="p">,</span> <span class="n">convert_to_timedelta</span><span class="p">,</span> <span class="n">short_hash</span>
Expand Down
10 changes: 5 additions & 5 deletions gateone/i18n/de_DE/LC_MESSAGES/gateone.po
Original file line number Diff line number Diff line change
Expand Up @@ -854,27 +854,27 @@ msgid ""
"(left, right, top, bottom). %s is not valid"
msgstr "frame_extents () nimmt ein Tupel (oder Liste) der ganzen Zahlen in der Form von: (links, rechts, oben, unten). %s ist nicht gültig"

#: gateone/async/async.py:138
#: gateone/asynchronous/asynchronous.py:138
#, python-format
msgid "Exception in Future: %s (id: %s)"
msgstr "Ausnahme in Zukunft: %s (ID: %s )"

#: gateone/async/async.py:223
#: gateone/asynchronous/asynchronous.py:223
#, python-format
msgid "Shutting down %s"
msgstr "Abschalten %s"

#: gateone/async/async.py:429
#: gateone/asynchronous/asynchronous.py:429
#, python-format
msgid "Starting the ThreadedRunner executor with %s worker threads."
msgstr "Starten des ThreadedRunner Vollstrecker mit %s Worker-Threads."

#: gateone/async/async.py:480
#: gateone/asynchronous/asynchronous.py:480
#, python-format
msgid "Starting the MultiprocessRunner executor with %s worker processes."
msgstr "Starten des MultiprocessRunner Vollstrecker mit %s Arbeitsprozesse."

#: gateone/async/async.py:513
#: gateone/asynchronous/asynchronous.py:513
msgid "Shutting down the MultiprocessRunner executor."
msgstr "Das Herunterfahren des MultiprocessRunner Executor."

Expand Down
10 changes: 5 additions & 5 deletions gateone/i18n/es_ES/LC_MESSAGES/gateone.po
Original file line number Diff line number Diff line change
Expand Up @@ -854,27 +854,27 @@ msgid ""
"(left, right, top, bottom). %s is not valid"
msgstr "frame_extents () toma una tupla (o lista) de los números enteros en forma de: (izquierda, derecha, arriba, abajo). %s no es válido"

#: gateone/async/async.py:138
#: gateone/asynchronous/asynchronous.py:138
#, python-format
msgid "Exception in Future: %s (id: %s)"
msgstr "Excepción en el futuro: %s (id: %s )"

#: gateone/async/async.py:223
#: gateone/asynchronous/asynchronous.py:223
#, python-format
msgid "Shutting down %s"
msgstr "Apagado %s"

#: gateone/async/async.py:429
#: gateone/asynchronous/asynchronous.py:429
#, python-format
msgid "Starting the ThreadedRunner executor with %s worker threads."
msgstr "Inicio del albacea ThreadedRunner con %s subprocesos de trabajo."

#: gateone/async/async.py:480
#: gateone/asynchronous/asynchronous.py:480
#, python-format
msgid "Starting the MultiprocessRunner executor with %s worker processes."
msgstr "Inicio del albacea MultiprocessRunner con %s procesos de trabajo."

#: gateone/async/async.py:513
#: gateone/asynchronous/asynchronous.py:513
msgid "Shutting down the MultiprocessRunner executor."
msgstr "Apagado del albacea MultiprocessRunner."

Expand Down
10 changes: 5 additions & 5 deletions gateone/i18n/fr_FR/LC_MESSAGES/gateone.po
Original file line number Diff line number Diff line change
Expand Up @@ -854,27 +854,27 @@ msgid ""
"(left, right, top, bottom). %s is not valid"
msgstr "frame_extents () prend un tuple (ou une liste) d'entiers sous la forme de: (gauche, droite, haut, bas). %s n'est pas valide"

#: gateone/async/async.py:138
#: gateone/asynchronous/asynchronous.py:138
#, python-format
msgid "Exception in Future: %s (id: %s)"
msgstr "Exception dans l'avenir: %s (id: %s )"

#: gateone/async/async.py:223
#: gateone/asynchronous/asynchronous.py:223
#, python-format
msgid "Shutting down %s"
msgstr "Arrêt %s"

#: gateone/async/async.py:429
#: gateone/asynchronous/asynchronous.py:429
#, python-format
msgid "Starting the ThreadedRunner executor with %s worker threads."
msgstr "Démarrage de l'exécuteur ThreadedRunner avec %s les threads de travail."

#: gateone/async/async.py:480
#: gateone/asynchronous/asynchronous.py:480
#, python-format
msgid "Starting the MultiprocessRunner executor with %s worker processes."
msgstr "Démarrage de l'exécuteur MultiprocessRunner avec %s des processus de travail."

#: gateone/async/async.py:513
#: gateone/asynchronous/asynchronous.py:513
msgid "Shutting down the MultiprocessRunner executor."
msgstr "Arrêt du exécuteur MultiprocessRunner."

Expand Down
10 changes: 5 additions & 5 deletions gateone/i18n/gateone.pot
Original file line number Diff line number Diff line change
Expand Up @@ -853,27 +853,27 @@ msgid ""
"(left, right, top, bottom). %s is not valid"
msgstr ""

#: gateone/async/async.py:138
#: gateone/asynchronous/asynchronous.py:138
#, python-format
msgid "Exception in Future: %s (id: %s)"
msgstr ""

#: gateone/async/async.py:223
#: gateone/asynchronous/asynchronous.py:223
#, python-format
msgid "Shutting down %s"
msgstr ""

#: gateone/async/async.py:429
#: gateone/asynchronous/asynchronous.py:429
#, python-format
msgid "Starting the ThreadedRunner executor with %s worker threads."
msgstr ""

#: gateone/async/async.py:480
#: gateone/asynchronous/asynchronous.py:480
#, python-format
msgid "Starting the MultiprocessRunner executor with %s worker processes."
msgstr ""

#: gateone/async/async.py:513
#: gateone/asynchronous/asynchronous.py:513
msgid "Shutting down the MultiprocessRunner executor."
msgstr ""

Expand Down
10 changes: 5 additions & 5 deletions gateone/i18n/pt_PT/LC_MESSAGES/gateone.po
Original file line number Diff line number Diff line change
Expand Up @@ -854,27 +854,27 @@ msgid ""
"(left, right, top, bottom). %s is not valid"
msgstr "frame_extents () recebe uma tupla (ou lista) de inteiros na forma de: (esquerda, direita, superior e inferior). %s não é válido"

#: gateone/async/async.py:138
#: gateone/asynchronous/asynchronous.py:138
#, python-format
msgid "Exception in Future: %s (id: %s)"
msgstr "Exceção no futuro: %s (ID: %s )"

#: gateone/async/async.py:223
#: gateone/asynchronous/asynchronous.py:223
#, python-format
msgid "Shutting down %s"
msgstr "Desligando %s"

#: gateone/async/async.py:429
#: gateone/asynchronous/asynchronous.py:429
#, python-format
msgid "Starting the ThreadedRunner executor with %s worker threads."
msgstr "Iniciando o executor ThreadedRunner com %s segmentos de trabalho."

#: gateone/async/async.py:480
#: gateone/asynchronous/asynchronous.py:480
#, python-format
msgid "Starting the MultiprocessRunner executor with %s worker processes."
msgstr "Iniciando o executor MultiprocessRunner com %s processos de trabalho."

#: gateone/async/async.py:513
#: gateone/asynchronous/asynchronous.py:513
msgid "Shutting down the MultiprocessRunner executor."
msgstr "Desligar o executor MultiprocessRunner."

Expand Down
10 changes: 5 additions & 5 deletions gateone/i18n/ru_RU/LC_MESSAGES/gateone.po
Original file line number Diff line number Diff line change
Expand Up @@ -859,27 +859,27 @@ msgid ""
"(left, right, top, bottom). %s is not valid"
msgstr "frame_extents () принимает кортеж (или список) целых чисел в виде: (left, right, top, bottom). %s не подходит"

#: gateone/async/async.py:138
#: gateone/asynchronous/asynchronous.py:138
#, python-format
msgid "Exception in Future: %s (id: %s)"
msgstr "Исключение в будущем: %s (ID: %s )"

#: gateone/async/async.py:223
#: gateone/asynchronous/asynchronous.py:223
#, python-format
msgid "Shutting down %s"
msgstr "Выключение %s"

#: gateone/async/async.py:429
#: gateone/asynchronous/asynchronous.py:429
#, python-format
msgid "Starting the ThreadedRunner executor with %s worker threads."
msgstr "Запуск исполнителя ThreadedRunner с %s рабочими потоками."

#: gateone/async/async.py:480
#: gateone/asynchronous/asynchronous.py:480
#, python-format
msgid "Starting the MultiprocessRunner executor with %s worker processes."
msgstr "Запуск исполнителя MultiprocessRunner с %s рабочими процессами."

#: gateone/async/async.py:513
#: gateone/asynchronous/asynchronous.py:513
msgid "Shutting down the MultiprocessRunner executor."
msgstr "Выключение исполнителя MultiprocessRunner."

Expand Down
8 changes: 4 additions & 4 deletions terminal/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,7 @@ class Terminal(object):
RE_SIGINT = re.compile(b'.*\^C', re.MULTILINE|re.DOTALL)

def __init__(self, rows=24, cols=80, em_dimensions=None, temppath='/tmp',
linkpath='/tmp', icondir=None, encoding='utf-8', async=None, debug=False,
linkpath='/tmp', icondir=None, encoding='utf-8', asynchronous=None, debug=False,
enabled_filetypes="all"):
"""
Initializes the terminal by calling *self.initialize(rows, cols)*. This
Expand Down Expand Up @@ -1857,7 +1857,7 @@ def __init__(self, rows=24, cols=80, em_dimensions=None, temppath='/tmp',
self.linkpath = linkpath
self.icondir = icondir
self.encoding = encoding
self.async = async
self.asynchronous = asynchronous
if enabled_filetypes == "all":
enabled_filetypes = [
PDFFile,
Expand Down Expand Up @@ -4481,7 +4481,7 @@ def dump_html_async(self, identifier=None, renditions=True, callback=None):
This places <span class="cursor">(current character)</span> around
the cursor location.
"""
if self.async:
if self.asynchrnonous:
state_obj = {
'html_cache': HTML_CACHE,
'screen': self.screen,
Expand All @@ -4492,7 +4492,7 @@ def dump_html_async(self, identifier=None, renditions=True, callback=None):
'show_cursor': self.expanded_modes['25'],
'class_prefix': self.class_prefix
}
self.async.call_singleton(
self.asynchrnonous.call_singleton(
spanify_screen, identifier, state_obj, callback=callback)
else:
scrollback, screen = self.dump_html(renditions=renditions)
Expand Down
Loading