Skip to content

Commit

Permalink
chore: changed all references of jasyncio to asyncio or _jasyncio. Al…
Browse files Browse the repository at this point in the history
…so ran ruff format and -fix
  • Loading branch information
EdmilsonRodrigues committed Nov 27, 2024
1 parent aae7ade commit f6259b9
Show file tree
Hide file tree
Showing 74 changed files with 517 additions and 465 deletions.
4 changes: 2 additions & 2 deletions docs/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Note : Pylibjuju requires an already bootstrapped Juju controller to connect to.
import logging
import sys
from juju import jasyncio
from juju import _jasyncio
from juju.model import Model
Expand Down Expand Up @@ -87,7 +87,7 @@ Note : Pylibjuju requires an already bootstrapped Juju controller to connect to.
# Run the deploy coroutine in an asyncio event loop, using a helper
# that abstracts loop creation and teardown.
jasyncio.run(deploy())
_jasyncio.run(deploy())
if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions examples/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model


Expand Down Expand Up @@ -50,4 +50,4 @@ async def main():
logging.basicConfig(level=logging.DEBUG)
ws_logger = logging.getLogger("websockets.protocol")
ws_logger.setLevel(logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/add_k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import yaml

from juju import jasyncio
from juju import _jasyncio
from juju.client import client
from juju.controller import Controller

Expand Down Expand Up @@ -58,4 +58,4 @@ async def main():
logging.basicConfig(level=logging.DEBUG)
ws_logger = logging.getLogger("websockets.protocol")
ws_logger.setLevel(logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/add_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model

MB = 1
Expand Down Expand Up @@ -69,4 +69,4 @@ async def main():
ws_logger = logging.getLogger("websockets.protocol")
ws_logger.setLevel(logging.INFO)

jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/add_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import uuid
from logging import getLogger

from juju import jasyncio, utils
from juju import _jasyncio, utils
from juju.controller import Controller

LOG = getLogger(__name__)
Expand Down Expand Up @@ -65,4 +65,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/add_secrets_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import hvac

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model


Expand Down Expand Up @@ -75,4 +75,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/allwatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.client import client
from juju.model import Model

Expand All @@ -34,4 +34,4 @@ async def watch():
ws_logger.setLevel(logging.INFO)
# Run loop until the process is manually stopped (watch will loop
# forever).
jasyncio.run(watch())
_jasyncio.run(watch())
4 changes: 2 additions & 2 deletions examples/charmhub_deploy_k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model


Expand Down Expand Up @@ -40,4 +40,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/charmhub_deploy_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model


Expand Down Expand Up @@ -37,4 +37,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/charmhub_find.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model

log = logging.getLogger(__name__)
Expand All @@ -33,4 +33,4 @@ async def main():

if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/charmhub_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model

log = logging.getLogger(__name__)
Expand All @@ -29,4 +29,4 @@ async def main():

if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller


Expand All @@ -28,4 +28,4 @@ async def main():
logging.basicConfig(level=logging.DEBUG)
ws_logger = logging.getLogger("websockets.protocol")
ws_logger.setLevel(logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/clouds.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller


Expand All @@ -28,4 +28,4 @@ async def main():
logging.basicConfig(level=logging.DEBUG)
ws_logger = logging.getLogger("websockets.protocol")
ws_logger.setLevel(logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -59,4 +59,4 @@ async def main():
# logging.basicConfig(level=logging.DEBUG)
ws_logger = logging.getLogger("websockets.protocol")
ws_logger.setLevel(logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/connect_current_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model

log = logging.getLogger(__name__)
Expand All @@ -27,4 +27,4 @@ async def main():

if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

import logging

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller


Expand Down Expand Up @@ -41,4 +41,4 @@ async def main():
logging.basicConfig(level=logging.DEBUG)
ws_logger = logging.getLogger("websockets.protocol")
ws_logger.setLevel(logging.INFO)
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import sys

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller


Expand Down Expand Up @@ -47,4 +47,4 @@ async def main(cloud_name, credential_name):

if __name__ == "__main__":
assert len(sys.argv) > 2, "Please provide a cloud and credential name"
jasyncio.run(main(sys.argv[1], sys.argv[2]))
_jasyncio.run(main(sys.argv[1], sys.argv[2]))
4 changes: 2 additions & 2 deletions examples/crossmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import tempfile
from logging import getLogger

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller

log = getLogger(__name__)
Expand Down Expand Up @@ -83,4 +83,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/crossmodel_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from logging import getLogger
from pathlib import Path

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller

log = getLogger(__name__)
Expand Down Expand Up @@ -87,4 +87,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/crossmodel_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import tempfile
from logging import getLogger

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller

log = getLogger(__name__)
Expand Down Expand Up @@ -92,4 +92,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/crossmodel_relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import time
from logging import getLogger

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller

log = getLogger(__name__)
Expand Down Expand Up @@ -106,4 +106,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/debug-log.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"""This example demonstrate how debug-log works"""

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model


Expand Down Expand Up @@ -34,4 +34,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model


Expand Down Expand Up @@ -39,4 +39,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/deploy_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""

from juju import jasyncio
from juju import _jasyncio
from juju.controller import Controller


Expand Down Expand Up @@ -59,4 +59,4 @@ async def deploy_and_wait_for_bundle(model, url, channel=None):


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/deploy_bundle_charmhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
3. Destroys the unit and application
"""

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model


Expand All @@ -33,4 +33,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
4 changes: 2 additions & 2 deletions examples/deploy_bundle_with_trust.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""

from juju import jasyncio
from juju import _jasyncio
from juju.model import Model


Expand Down Expand Up @@ -44,4 +44,4 @@ async def main():


if __name__ == "__main__":
jasyncio.run(main())
_jasyncio.run(main())
Loading

0 comments on commit f6259b9

Please sign in to comment.