git-buckets 0.4.0__tar.gz → 0.4.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 (21) hide show
  1. {git_buckets-0.4.0 → git_buckets-0.4.1}/PKG-INFO +1 -1
  2. {git_buckets-0.4.0 → git_buckets-0.4.1}/pyproject.toml +1 -1
  3. {git_buckets-0.4.0 → git_buckets-0.4.1}/pyproject.toml.orig +1 -1
  4. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/lfs_agent.py +8 -7
  5. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/termio.py +2 -2
  6. {git_buckets-0.4.0 → git_buckets-0.4.1}/README.md +0 -0
  7. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/__init__.py +0 -0
  8. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/cli.py +0 -0
  9. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/credential.py +0 -0
  10. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/hosts.py +0 -0
  11. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/keyring/__init__.py +0 -0
  12. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/keyring/backend.py +0 -0
  13. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/keyring/proof.py +0 -0
  14. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/login.py +0 -0
  15. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/net.py +0 -0
  16. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/oauth.py +0 -0
  17. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/package.py +0 -0
  18. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/repo.py +0 -0
  19. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/secretstore.py +0 -0
  20. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/session.py +0 -0
  21. {git_buckets-0.4.0 → git_buckets-0.4.1}/src/git_buckets/wake.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: git-buckets
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Git over S3: clone, fetch and push repositories backed by an S3 bucket.
5
5
  Author: Full Duplex Media
6
6
  Author-email: Full Duplex Media <contact@fullduplex.media>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "git-buckets"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Git over S3: clone, fetch and push repositories backed by an S3 bucket."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.14"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "git-buckets"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Git over S3: clone, fetch and push repositories backed by an S3 bucket."
5
5
  authors = [
6
6
  { name = 'Full Duplex Media', email = 'contact@fullduplex.media' }
@@ -47,6 +47,7 @@ from concurrent.futures import FIRST_EXCEPTION, ThreadPoolExecutor, wait
47
47
  from hashlib import sha256
48
48
  from http.client import HTTPException
49
49
  from pathlib import Path
50
+ from shutil import which
50
51
  from tempfile import gettempdir
51
52
  from typing import Any
52
53
  from urllib.error import HTTPError, URLError
@@ -643,6 +644,10 @@ def install(remote: str = 'origin', *, echo: Any = print) -> dict[str, str]:
643
644
  scopes the transfers it offers to the direction each is registered for (verified against 3.8.0), so a
644
645
  repo still carrying ``direction = upload`` from an older gb offers ``gb`` on an upload batch and never on
645
646
  a download, and the server answers it with a basic download exactly as before.
647
+
648
+ The path is the bare command name, not where it resolves today: git-lfs looks it up on PATH each time it
649
+ starts the agent, so one checkout works from every machine and container that mounts it, and from any
650
+ install of gb that puts the script on PATH.
646
651
  """
647
652
  _git(['rev-parse', '--git-dir'])
648
653
  url = _git(['remote', 'get-url', remote], check=False)
@@ -650,9 +655,11 @@ def install(remote: str = 'origin', *, echo: Any = print) -> dict[str, str]:
650
655
  echo(f'Warning: this repo has no remote named {remote}.')
651
656
  elif not urlparse(url).hostname or hosts.resolve(urlparse(url).hostname or '') is None:
652
657
  echo(f'Warning: {remote} ({url}) is not a deployment gb is logged in to; run gb login first.')
658
+ if which(AGENT_SCRIPT) is None:
659
+ echo(f'Warning: {AGENT_SCRIPT} is not on PATH here; git-lfs cannot start the agent until it is.')
653
660
 
654
661
  settings = {
655
- f'lfs.customtransfer.{TRANSFER}.path': _agent_path(),
662
+ f'lfs.customtransfer.{TRANSFER}.path': AGENT_SCRIPT,
656
663
  f'lfs.customtransfer.{TRANSFER}.direction': 'both',
657
664
  f'lfs.customtransfer.{TRANSFER}.concurrent': 'true',
658
665
  'lfs.concurrenttransfers': '3',
@@ -662,12 +669,6 @@ def install(remote: str = 'origin', *, echo: Any = print) -> dict[str, str]:
662
669
  return settings
663
670
 
664
671
 
665
- def _agent_path() -> str:
666
- from shutil import which
667
-
668
- return which(AGENT_SCRIPT) or AGENT_SCRIPT
669
-
670
-
671
672
  def _git(args: list[str], *, check: bool = True) -> str:
672
673
  result = subprocess.run(['git', *args], capture_output=True, text=True)
673
674
  if result.returncode != 0:
@@ -2,7 +2,7 @@
2
2
 
3
3
  import os
4
4
  import sys
5
- from collections.abc import Callable, Iterator
5
+ from collections.abc import Callable, Generator
6
6
  from contextlib import contextmanager
7
7
 
8
8
  import click
@@ -25,7 +25,7 @@ class _NoRawMode(Exception):
25
25
 
26
26
 
27
27
  @contextmanager
28
- def _raw_reader() -> Iterator[Read]:
28
+ def _raw_reader() -> Generator[Read]:
29
29
  """Raw mode for the whole prompt, not per read.
30
30
 
31
31
  click.getchar() restores cooked mode between reads, and toggling ICANON with a paste still in the input
File without changes