shvcli 0.8.0__tar.gz → 0.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {shvcli-0.8.0/shvcli.egg-info → shvcli-0.8.1}/PKG-INFO +2 -2
  2. {shvcli-0.8.0 → shvcli-0.8.1}/pyproject.toml +2 -2
  3. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/__version__.py +1 -1
  4. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/file.py +6 -4
  5. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/oauth.py +1 -1
  6. {shvcli-0.8.0 → shvcli-0.8.1/shvcli.egg-info}/PKG-INFO +2 -2
  7. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli.egg-info/requires.txt +1 -1
  8. {shvcli-0.8.0 → shvcli-0.8.1}/LICENSE +0 -0
  9. {shvcli-0.8.0 → shvcli-0.8.1}/README.rst +0 -0
  10. {shvcli-0.8.0 → shvcli-0.8.1}/setup.cfg +0 -0
  11. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/__init__.py +0 -0
  12. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/__main__.py +0 -0
  13. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/__setuptools__.py +0 -0
  14. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/afterconn.py +0 -0
  15. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/args.py +0 -0
  16. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtin.py +0 -0
  17. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/__init__.py +0 -0
  18. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/broker.py +0 -0
  19. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/cd.py +0 -0
  20. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/file.py +0 -0
  21. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/help.py +0 -0
  22. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/history.py +0 -0
  23. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/scan.py +0 -0
  24. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/set.py +0 -0
  25. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/builtins/tree.py +0 -0
  26. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/cli.py +0 -0
  27. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/client.py +0 -0
  28. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/cliitems.py +0 -0
  29. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/complet.py +0 -0
  30. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/config.py +0 -0
  31. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/lsdir.py +0 -0
  32. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/option.py +0 -0
  33. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/options.py +0 -0
  34. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/plugins.py +0 -0
  35. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/py.typed +0 -0
  36. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/scan.py +0 -0
  37. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/state.py +0 -0
  38. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/tools/__init__.py +0 -0
  39. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/tools/complet.py +0 -0
  40. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/tools/print.py +0 -0
  41. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/tree.py +0 -0
  42. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/url.py +0 -0
  43. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli/valid.py +0 -0
  44. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli.egg-info/SOURCES.txt +0 -0
  45. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli.egg-info/dependency_links.txt +0 -0
  46. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli.egg-info/entry_points.txt +0 -0
  47. {shvcli-0.8.0 → shvcli-0.8.1}/shvcli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shvcli
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Silicon Heaven CLI access application
5
5
  Author: Elektroline a.s.
6
6
  License: MIT License
@@ -37,7 +37,7 @@ Requires-Python: >=3.11
37
37
  Description-Content-Type: text/x-rst
38
38
  License-File: LICENSE
39
39
  Requires-Dist: pyshv>=0.10.0
40
- Requires-Dist: prompt_toolkit
40
+ Requires-Dist: prompt-toolkit
41
41
  Requires-Dist: pygments
42
42
  Requires-Dist: pyxdg
43
43
  Requires-Dist: more-itertools
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "shvcli"
3
- version = "0.8.0"
3
+ version = "0.8.1"
4
4
  description = "Silicon Heaven CLI access application"
5
5
  readme = "README.rst"
6
6
  license = {file = "LICENSE"}
@@ -19,7 +19,7 @@ classifiers = [
19
19
  requires-python = ">=3.11"
20
20
  dependencies = [
21
21
  "pyshv >= 0.10.0",
22
- "prompt_toolkit",
22
+ "prompt-toolkit",
23
23
  "pygments",
24
24
  "pyxdg",
25
25
  "more-itertools",
@@ -12,7 +12,7 @@ import tomllib
12
12
 
13
13
 
14
14
  def _get_version() -> str:
15
- pyproject = pathlib.Path(__file__).parent.parent / "pyproject.toml"
15
+ pyproject = pathlib.Path(__file__).parents[1] / "pyproject.toml"
16
16
  if pyproject.exists():
17
17
  with pyproject.open("rb") as f:
18
18
  res = tomllib.load(f)["project"]["version"]
@@ -3,13 +3,13 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import asyncio
6
+ import contextlib
6
7
  import io
7
8
  import pathlib
8
9
 
9
- import shv
10
10
  import shv.path
11
- import shv.rpcdef.file
12
11
  from prompt_toolkit.shortcuts import ProgressBar, ProgressBarCounter
12
+ from shv.rpcdef import RpcMethodNotFoundError
13
13
  from shv.rpcdef.file import RpcFile
14
14
 
15
15
  from .client import Client
@@ -42,13 +42,15 @@ async def copy_file(
42
42
 
43
43
  if isinstance(src, pathlib.Path):
44
44
  srcfile = src.open("rb")
45
- srcsiz = src.stat().st_size
45
+ srcstat = await asyncio.get_running_loop().run_in_executor(None, src.stat)
46
+ srcsiz = srcstat.st_size
46
47
  if isinstance(dest, pathlib.Path):
47
48
  destfile = dest.open("wb")
48
49
 
49
50
  assert srcfile is not None and destfile is not None
50
51
  if isinstance(destfile, RpcFile):
51
- await destfile.truncate(0)
52
+ with contextlib.suppress(RpcMethodNotFoundError):
53
+ await destfile.truncate(0) # Truncate if truncate is available
52
54
 
53
55
  with ProgressBar() as pb:
54
56
  pbcnt: ProgressBarCounter = pb(label=label, total=srcsiz)
@@ -21,7 +21,7 @@ def oauth_login_token(
21
21
  auth_code = None
22
22
 
23
23
  class _HTTPHandler(http.server.BaseHTTPRequestHandler):
24
- def do_GET(self) -> None: # noqa: N802
24
+ def do_GET(self) -> None:
25
25
  nonlocal auth_code
26
26
  parsed_path = urllib.parse.urlparse(self.path)
27
27
  if parsed_path.path == "/":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shvcli
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Silicon Heaven CLI access application
5
5
  Author: Elektroline a.s.
6
6
  License: MIT License
@@ -37,7 +37,7 @@ Requires-Python: >=3.11
37
37
  Description-Content-Type: text/x-rst
38
38
  License-File: LICENSE
39
39
  Requires-Dist: pyshv>=0.10.0
40
- Requires-Dist: prompt_toolkit
40
+ Requires-Dist: prompt-toolkit
41
41
  Requires-Dist: pygments
42
42
  Requires-Dist: pyxdg
43
43
  Requires-Dist: more-itertools
@@ -1,5 +1,5 @@
1
1
  pyshv>=0.10.0
2
- prompt_toolkit
2
+ prompt-toolkit
3
3
  pygments
4
4
  pyxdg
5
5
  more-itertools
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes