scmrepo 3.3.11__py3-none-any.whl → 3.3.12__py3-none-any.whl

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.

Potentially problematic release.


This version of scmrepo might be problematic. Click here for more details.

scmrepo/asyn.py CHANGED
@@ -6,7 +6,6 @@ import threading
6
6
  from typing import Any, Optional
7
7
 
8
8
  from fsspec.asyn import ( # noqa: F401, pylint:disable=unused-import
9
- _selector_policy,
10
9
  sync,
11
10
  sync_wrapper,
12
11
  )
@@ -23,8 +22,7 @@ def get_loop() -> asyncio.AbstractEventLoop:
23
22
  if default_loop[0] is None:
24
23
  with lock:
25
24
  if default_loop[0] is None:
26
- with _selector_policy():
27
- default_loop[0] = asyncio.new_event_loop()
25
+ default_loop[0] = asyncio.new_event_loop()
28
26
  loop = default_loop[0]
29
27
  th = threading.Thread(
30
28
  target=loop.run_forever, # type: ignore[attr-defined]
scmrepo/git/__init__.py CHANGED
@@ -10,6 +10,7 @@ from contextlib import contextmanager
10
10
  from functools import partialmethod
11
11
  from typing import (
12
12
  TYPE_CHECKING,
13
+ Any,
13
14
  Callable,
14
15
  ClassVar,
15
16
  Optional,
@@ -295,7 +296,7 @@ class Git(Base):
295
296
  # See:
296
297
  # https://github.com/iterative/dvc/issues/5641
297
298
  # https://github.com/iterative/dvc/issues/7458
298
- def _backend_func(self, name, *args, **kwargs):
299
+ def _backend_func(self, name, *args, **kwargs) -> Any:
299
300
  backends: Iterable[str] = kwargs.pop("backends", self.backends)
300
301
  for key in backends:
301
302
  if self._last_backend is not None and key != self._last_backend:
@@ -39,7 +39,7 @@ logger = logging.getLogger(__name__)
39
39
 
40
40
 
41
41
  class DulwichObject(GitObject):
42
- def __init__(self, repo, name, mode, sha):
42
+ def __init__(self, repo, name, mode, sha) -> None:
43
43
  self.repo = repo
44
44
  self._name = name
45
45
  self._mode = mode
@@ -136,7 +136,7 @@ def _get_ssh_vendor() -> "SSHVendor":
136
136
 
137
137
 
138
138
  class DulwichConfig(Config):
139
- def __init__(self, config: Union["ConfigFile", "StackedConfig"]):
139
+ def __init__(self, config: Union["ConfigFile", "StackedConfig"]) -> None:
140
140
  self._config = config
141
141
 
142
142
  @property
@@ -183,7 +183,7 @@ class DulwichBackend(BaseGitBackend): # pylint:disable=abstract-method
183
183
 
184
184
  def __init__( # pylint:disable=W0231
185
185
  self, root_dir=os.curdir, search_parent_directories=True
186
- ):
186
+ ) -> None:
187
187
  from dulwich.errors import NotGitRepository
188
188
  from dulwich.repo import Repo
189
189
 
@@ -990,7 +990,7 @@ def ls_remote(url: str) -> dict[str, str]:
990
990
  from dulwich.client import HTTPUnauthorized
991
991
 
992
992
  try:
993
- refs = porcelain.ls_remote(url)
993
+ refs = porcelain.ls_remote(url).refs
994
994
  return {os.fsdecode(ref): sha.decode("ascii") for ref, sha in refs.items()}
995
995
  except HTTPUnauthorized as exc:
996
996
  raise AuthError(url) from exc
@@ -71,7 +71,9 @@ class _StderrWrapper:
71
71
 
72
72
 
73
73
  class AsyncSSHWrapper(BaseAsyncObject):
74
- def __init__(self, conn: "SSHClientConnection", proc: "SSHClientProcess", **kwargs):
74
+ def __init__(
75
+ self, conn: "SSHClientConnection", proc: "SSHClientProcess", **kwargs
76
+ ) -> None:
75
77
  super().__init__(**kwargs)
76
78
  self.conn: SSHClientConnection = conn
77
79
  self.proc: SSHClientProcess = proc
@@ -109,7 +111,7 @@ class InteractiveSSHClient(SSHClient):
109
111
  _keys_to_try: Optional[list["FilePath"]] = None
110
112
  _passphrases: dict[str, str]
111
113
 
112
- def __init__(self, *args, **kwargs):
114
+ def __init__(self, *args, **kwargs) -> None:
113
115
  super(*args, **kwargs)
114
116
  self._passphrases: dict[str, str] = {}
115
117
 
@@ -14,7 +14,7 @@ class GitCredentialsHTTPClient(Urllib3HttpGitClient): # pylint: disable=abstrac
14
14
  password=None,
15
15
  config=None,
16
16
  **kwargs,
17
- ):
17
+ ) -> None:
18
18
  super().__init__(
19
19
  base_url=base_url,
20
20
  username=username,
@@ -29,6 +29,7 @@ class GitCredentialsHTTPClient(Urllib3HttpGitClient): # pylint: disable=abstrac
29
29
  url: str,
30
30
  headers: Optional[dict[str, str]] = None,
31
31
  data: Optional[Union[bytes, Iterator[bytes]]] = None,
32
+ raise_for_status: bool = True,
32
33
  ):
33
34
  cached_chunks: list[bytes] = []
34
35
 
@@ -48,7 +49,10 @@ class GitCredentialsHTTPClient(Urllib3HttpGitClient): # pylint: disable=abstrac
48
49
 
49
50
  try:
50
51
  result = super()._http_request(
51
- url, headers=headers, data=None if data is None else _cached_data()
52
+ url,
53
+ headers=headers,
54
+ data=None if data is None else _cached_data(),
55
+ raise_for_status=raise_for_status,
52
56
  )
53
57
  except HTTPUnauthorized:
54
58
  auth_header = self._get_auth()
@@ -59,7 +63,10 @@ class GitCredentialsHTTPClient(Urllib3HttpGitClient): # pylint: disable=abstrac
59
63
  else:
60
64
  headers = auth_header
61
65
  result = super()._http_request(
62
- url, headers=headers, data=None if data is None else _cached_data()
66
+ url,
67
+ headers=headers,
68
+ data=None if data is None else _cached_data(),
69
+ raise_for_status=raise_for_status,
63
70
  )
64
71
  if self._store_credentials is not None:
65
72
  self._store_credentials.approve()
@@ -13,7 +13,7 @@ logger = logging.getLogger(__name__)
13
13
  class LFSFilter(Filter):
14
14
  attributes = "filter=*"
15
15
 
16
- def __init__(self, *args, **kwargs):
16
+ def __init__(self, *args, **kwargs) -> None:
17
17
  self._smudge_buf: Optional[io.BytesIO] = None
18
18
  self._smudge_root: Optional[str] = None
19
19
 
@@ -105,7 +105,7 @@ class GitCredentialHelper(CredentialHelper):
105
105
  >>> password = credentials.password
106
106
  """
107
107
 
108
- def __init__(self, command: str, use_http_path: bool = False):
108
+ def __init__(self, command: str, use_http_path: bool = False) -> None:
109
109
  super().__init__()
110
110
  self._command = command
111
111
  self._run_kwargs: dict[str, Any] = {}
@@ -136,7 +136,7 @@ class GitCredentialHelper(CredentialHelper):
136
136
  if not shutil.which(executable) and shutil.which("git"):
137
137
  # If the helper cannot be found in PATH, it might be
138
138
  # a C git helper in GIT_EXEC_PATH
139
- git_exec_path = subprocess.check_output( # noqa: S603
139
+ git_exec_path = subprocess.check_output(
140
140
  ("git", "--exec-path"),
141
141
  text=True,
142
142
  ).strip()
@@ -353,7 +353,7 @@ def _input_tty(prompt: str = "Username: ") -> str:
353
353
  class MemoryCredentialHelper(CredentialHelper):
354
354
  """Memory credential helper that supports optional interactive input."""
355
355
 
356
- def __init__(self):
356
+ def __init__(self) -> None:
357
357
  super().__init__()
358
358
  self._credentials: dict[_CredentialKey, Credential] = {}
359
359
 
@@ -535,7 +535,7 @@ class Credential(Mapping[str, str]):
535
535
  path: Optional[str] = None,
536
536
  username: Optional[str] = None,
537
537
  password: Optional[str] = None,
538
- password_expiry_utc: Optional[int] = None,
538
+ password_expiry_utc: Optional[str] = None,
539
539
  url: Optional[str] = None,
540
540
  ):
541
541
  self.protocol = protocol
scmrepo/git/lfs/smudge.py CHANGED
@@ -17,7 +17,7 @@ def smudge(
17
17
  batch_size: Optional[int] = None,
18
18
  ) -> BinaryIO:
19
19
  """Wrap the specified binary IO stream and run LFS smudge if necessary."""
20
- reader = io.BufferedReader(fobj) # type: ignore[arg-type]
20
+ reader = io.BufferedReader(fobj) # type: ignore[type-var]
21
21
  data = reader.peek(100)
22
22
  if any(data.startswith(header) for header in HEADERS):
23
23
  # read the pointer data into memory since the raw stream is unseekable
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scmrepo
3
- Version: 3.3.11
3
+ Version: 3.3.12
4
4
  Summary: scmrepo
5
5
  Author-email: Iterative <support@dvc.org>
6
6
  License: Apache-2.0
@@ -17,7 +17,7 @@ Requires-Python: >=3.9
17
17
  Description-Content-Type: text/x-rst
18
18
  License-File: LICENSE
19
19
  Requires-Dist: gitpython>3
20
- Requires-Dist: dulwich>=0.22.1
20
+ Requires-Dist: dulwich>=0.23.1
21
21
  Requires-Dist: pygit2>=1.14.0
22
22
  Requires-Dist: pygtrie>=2.3.2
23
23
  Requires-Dist: fsspec[tqdm]>=2024.2.0
@@ -30,7 +30,7 @@ Provides-Extra: tests
30
30
  Requires-Dist: aioresponses<0.8,>=0.7; extra == "tests"
31
31
  Requires-Dist: paramiko<4,>=3.4.0; extra == "tests"
32
32
  Requires-Dist: pytest<9,>=7; extra == "tests"
33
- Requires-Dist: pytest-asyncio<1,>=0.23.2; extra == "tests"
33
+ Requires-Dist: pytest-asyncio<2,>=0.23.2; extra == "tests"
34
34
  Requires-Dist: pytest-cov>=4.1.0; extra == "tests"
35
35
  Requires-Dist: pytest-docker<4,>=1; extra == "tests"
36
36
  Requires-Dist: pytest-mock; extra == "tests"
@@ -38,7 +38,7 @@ Requires-Dist: pytest-sugar; extra == "tests"
38
38
  Requires-Dist: pytest-test-utils<0.2,>=0.1.0; extra == "tests"
39
39
  Requires-Dist: proxy.py; extra == "tests"
40
40
  Provides-Extra: dev
41
- Requires-Dist: mypy==1.15.0; extra == "dev"
41
+ Requires-Dist: mypy==1.17.0; extra == "dev"
42
42
  Requires-Dist: scmrepo[tests]; extra == "dev"
43
43
  Requires-Dist: types-certifi; extra == "dev"
44
44
  Requires-Dist: types-mock; extra == "dev"
@@ -1,5 +1,5 @@
1
1
  scmrepo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- scmrepo/asyn.py,sha256=eckXZkVngwbNNyO04eAJUZxsTy7kvsdz0TUGaWpJpf0,1524
2
+ scmrepo/asyn.py,sha256=DoTSfXhvGocuS0HS5CuO5MSFIy2qkdbJ4vjymhvT1R8,1457
3
3
  scmrepo/base.py,sha256=pgddGR7UeZoEq2d5lip1vjbxTmpwTnKFH4JwHy-Fmho,3007
4
4
  scmrepo/exceptions.py,sha256=vR8BuCKgKh9lMnCemzNYGHiJctioOmhn_Kv5m8XO69Y,1053
5
5
  scmrepo/fs.py,sha256=8efNf_D5IQb-N42w-apAkG3Uwe8gJA_HVflniY9gX6M,6639
@@ -8,20 +8,20 @@ scmrepo/progress.py,sha256=fRUMvkcw6GLuVTP_tK7mGpKeJjbJulFP8rPUqyltkYQ,2157
8
8
  scmrepo/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  scmrepo/urls.py,sha256=vEfW1h1lb7GXvMVBk-TNwqctpl-5xGMA2LbOPVn7t4Q,638
10
10
  scmrepo/utils.py,sha256=_F3rVvPhES-A2JxLGob0RV8BOnHzxbA9aDPClA7_V8M,1512
11
- scmrepo/git/__init__.py,sha256=elQErQSqekg-XWfxjNmEV0X00xtvy0LDFvy9nmv71Ls,17187
11
+ scmrepo/git/__init__.py,sha256=lTpkGdtwPM1PtYmmymTss8AvZRrdYCX0x_A_wS_pago,17203
12
12
  scmrepo/git/config.py,sha256=0t0OBmJ9SIa5tf22QdcGzhZfdMzzppvEmceUDg8ZPyE,943
13
- scmrepo/git/credentials.py,sha256=tn8TlyCJUz8HOF7eL6F5Yj4n9vREsFwXrjLU1isi13s,22312
13
+ scmrepo/git/credentials.py,sha256=_jHkeC-CNQRLtGhaliE57xLWILGBp2Oy7aPJ1TK9Mqw,22314
14
14
  scmrepo/git/objects.py,sha256=qx8zAHZIrr0SDbZGD9wVShlMZK57nef8stIeRVqYdCU,4676
15
15
  scmrepo/git/stash.py,sha256=wKWnYj_xpdT_3pvHiXtE7_I_By4S-Zbxf4Lv-ZY2sxI,2785
16
16
  scmrepo/git/backend/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  scmrepo/git/backend/base.py,sha256=nVMkUIeSVu-ZLCd2QPxMfTgrjnTOejM1UET9R7qKJRc,13560
18
18
  scmrepo/git/backend/gitpython.py,sha256=myfZY2x27DbDvIBUXzDjswXEViR5MKH0qgowwzcn7aY,25340
19
- scmrepo/git/backend/dulwich/__init__.py,sha256=7UJJyEPqgc2tfPs1WN_XdvRkMsGyFA1HVgTf7mrgLNE,35098
20
- scmrepo/git/backend/dulwich/asyncssh_vendor.py,sha256=E3AyXok4S4FwsG9cMdswklf1bYRMmcmQM7Unri2fSVo,9882
21
- scmrepo/git/backend/dulwich/client.py,sha256=XjNBfOp0L8M3iPpqcX_4bmXsO7hwrkyqg5wMbZULD-I,2358
19
+ scmrepo/git/backend/dulwich/__init__.py,sha256=gYq9WV1Sz4ovd7X12nEcGzm5HQB80xq47YjoQaBl61g,35127
20
+ scmrepo/git/backend/dulwich/asyncssh_vendor.py,sha256=QnaUyHmPWBWtryK1JCXR_S0UZyjfF_NN7z9jIii3Bac,9912
21
+ scmrepo/git/backend/dulwich/client.py,sha256=VvAheye_QAK6agGsKVj5Jk62zOp-SipgdwuaJLIWDbA,2573
22
22
  scmrepo/git/backend/pygit2/__init__.py,sha256=7meRePoB_bUx0UY2wPm2nxI4DFabn5nenVP8Cyf7AZc,36366
23
23
  scmrepo/git/backend/pygit2/callbacks.py,sha256=Mk-2e5dfJPNLsczRiK4rTnjHd5ZyonmegdwiFwM9Anc,2849
24
- scmrepo/git/backend/pygit2/filter.py,sha256=8Ibn_2oXM32YRpyovxGKYhtPZLUYTBLDi9--bScOP00,2198
24
+ scmrepo/git/backend/pygit2/filter.py,sha256=UJdTsgBOuxQFn9nw_tnhHi7GOIjEOtFkzn0Xuavx1jI,2206
25
25
  scmrepo/git/lfs/__init__.py,sha256=at5blRIKnKpg_g5dLRDsGWBFi6SbucRlF_DX6aAkGtE,257
26
26
  scmrepo/git/lfs/client.py,sha256=64u5lJijUASNJ4H_Eg7aEb8j3z3eluuNUWGnYvfNnvo,10187
27
27
  scmrepo/git/lfs/exceptions.py,sha256=cLlImmPXWJJUl44S4xcRBa2T9wYRkWTaKQGwJylwOhA,77
@@ -29,10 +29,10 @@ scmrepo/git/lfs/fetch.py,sha256=YynrODVZWYTfnqOmLOBHjXZQ6sf_lnyDuJHttSl3TOU,5530
29
29
  scmrepo/git/lfs/object.py,sha256=rAYY_z9EYoHPfbpF1QHwL7ecYgaETPyCl-zBx0E1oIQ,337
30
30
  scmrepo/git/lfs/pointer.py,sha256=BcVbtjoOUG9cEzyJSJDeweqehGZvq43P6NNLDYUGYEI,3181
31
31
  scmrepo/git/lfs/progress.py,sha256=AcWvygDG0ee__Jec5BlRr58F-lAj3d4Z_j7JbW3OUcI,4733
32
- scmrepo/git/lfs/smudge.py,sha256=1O_fznptWo4CKXqcJgUoWP6cgWWhvGAZ3d87kasG3cQ,1610
32
+ scmrepo/git/lfs/smudge.py,sha256=LMt9I5QodXLh8FiQbAbix3GHbeuyPXGwHuHYJ0f5ORo,1610
33
33
  scmrepo/git/lfs/storage.py,sha256=nx_HvHHC1sf15Qgbsj8jEOkdHXkZ8VUEh8QBtt9sLwI,2348
34
- scmrepo-3.3.11.dist-info/licenses/LICENSE,sha256=-1jhbPjoIVHR0cEgahL4Zhct75Ff4MzYCR_jOaJDPq8,11340
35
- scmrepo-3.3.11.dist-info/METADATA,sha256=2edjOxEKBOCfYNiG_cFDExx5Q8P1eXQfrMTAtSlOzZ8,4815
36
- scmrepo-3.3.11.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
37
- scmrepo-3.3.11.dist-info/top_level.txt,sha256=iunjod6w3GogERsAYfLRupnANXnqzX3jbIfbeIQG5cc,8
38
- scmrepo-3.3.11.dist-info/RECORD,,
34
+ scmrepo-3.3.12.dist-info/licenses/LICENSE,sha256=-1jhbPjoIVHR0cEgahL4Zhct75Ff4MzYCR_jOaJDPq8,11340
35
+ scmrepo-3.3.12.dist-info/METADATA,sha256=43OwoHiicdk7u3KloFEp7MPoQxYE2b76lgzpZLvgDuw,4815
36
+ scmrepo-3.3.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ scmrepo-3.3.12.dist-info/top_level.txt,sha256=iunjod6w3GogERsAYfLRupnANXnqzX3jbIfbeIQG5cc,8
38
+ scmrepo-3.3.12.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.1)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5