pymobiledevice3 7.0.2__py3-none-any.whl → 7.0.3__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.
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '7.0.2'
32
- __version_tuple__ = version_tuple = (7, 0, 2)
31
+ __version__ = version = '7.0.3'
32
+ __version_tuple__ = version_tuple = (7, 0, 3)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -141,10 +141,8 @@ async def _tunneld(udid: Optional[str] = None) -> Optional[RemoteServiceDiscover
141
141
  raise NoDeviceConnectedError()
142
142
 
143
143
  if udid != "":
144
- try:
145
- # Connect to the specified device
146
- service_provider = next(rsd for rsd in rsds if rsd.udid == udid)
147
- except IndexError:
144
+ service_provider = next((rsd for rsd in rsds if rsd.udid == udid), None)
145
+ if service_provider is None:
148
146
  raise DeviceNotFoundError(udid) from None
149
147
  else:
150
148
  service_provider = rsds[0] if len(rsds) == 1 else prompt_device_list(rsds)
@@ -3,6 +3,7 @@ import dataclasses
3
3
  import logging
4
4
  import sys
5
5
  import tempfile
6
+ from contextlib import nullcontext
6
7
  from functools import partial
7
8
  from pathlib import Path
8
9
  from typing import Annotated, Optional, TextIO
@@ -195,7 +196,7 @@ async def tunnel_task(
195
196
 
196
197
  async def start_tunnel_task(
197
198
  connection_type: ConnectionType,
198
- secrets: TextIO,
199
+ secrets: Optional[TextIO],
199
200
  udid: Optional[str] = None,
200
201
  script_mode: bool = False,
201
202
  max_idle_timeout: float = MAX_IDLE_TIMEOUT,
@@ -226,7 +227,6 @@ async def start_tunnel_task(
226
227
  @cli.command("start-tunnel")
227
228
  @sudo_required
228
229
  def cli_start_tunnel(
229
- *,
230
230
  connection_type: Annotated[
231
231
  ConnectionType,
232
232
  typer.Option(
@@ -241,9 +241,9 @@ def cli_start_tunnel(
241
241
  typer.Option(help="UDID for a specific device to look for"),
242
242
  ] = None,
243
243
  secrets: Annotated[
244
- Path,
244
+ Optional[Path],
245
245
  typer.Option(help="File to write TLS secrets for Wireshark decryption."),
246
- ],
246
+ ] = None,
247
247
  script_mode: Annotated[
248
248
  bool,
249
249
  typer.Option(help="Print only HOST and port for scripts instead of formatted output."),
@@ -265,7 +265,7 @@ def cli_start_tunnel(
265
265
  """start tunnel"""
266
266
  if not verify_tunnel_imports():
267
267
  return
268
- with secrets.open("wt") as secrets_file:
268
+ with secrets.open("wt") if secrets is not None else nullcontext() as secrets_file:
269
269
  asyncio.run(
270
270
  start_tunnel_task(
271
271
  connection_type,
@@ -573,7 +573,8 @@ class AfcService(LockdownService):
573
573
  """
574
574
  Create a directory on the device.
575
575
 
576
- Note: Unlike os.makedirs, this does not create parent directories automatically.
576
+ Note: This behaves like os.makedirs and will create parent directories as needed.
577
+ It is idempotent and will not raise an error if the directory already exists.
577
578
 
578
579
  :param filename: Path of the directory to create
579
580
  :return: Response data from the operation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymobiledevice3
3
- Version: 7.0.2
3
+ Version: 7.0.3
4
4
  Summary: Pure python3 implementation for working with iDevices (iPhone, etc...)
5
5
  Author-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>
6
6
  Maintainer-email: doronz88 <doron88@gmail.com>, matan <matan1008@gmail.com>
@@ -8,7 +8,7 @@ misc/understanding_idevice_protocol_layers.md,sha256=FMJQ-ik2j9kFLPS15JzDZg62uk1
8
8
  misc/usbmux_sniff.sh,sha256=iWtbucOEQ9_UEFXk9x-2VNt48Jg5zrPsnUbZ_LfZxwA,212
9
9
  pymobiledevice3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  pymobiledevice3/__main__.py,sha256=Ogsyro4MUVVSciEtg8kZufL81AHcjuphItnaL0BT10Q,16386
11
- pymobiledevice3/_version.py,sha256=Sd7srCYvlucRy8Y17pgfM_X-99Va2KsO3sfgkXAvKVo,704
11
+ pymobiledevice3/_version.py,sha256=PxlQCxVdZVIvUH2WxIt6XwlEWOz4EwsXEUQF0kgoNSg,704
12
12
  pymobiledevice3/bonjour.py,sha256=lmx3uCaiolF59AieftmTKqktNod5ZDyJ06oRZdYKHSE,13681
13
13
  pymobiledevice3/ca.py,sha256=5_Y4F-zDFX_KeDL-M_TRCKKyrRRb9h1lBE8MGTWv91o,10606
14
14
  pymobiledevice3/common.py,sha256=FZzF0BQYV5fCEUPbLo6jbt2Ig9s5YwR8AvX_iR124Ew,329
@@ -29,7 +29,7 @@ pymobiledevice3/cli/amfi.py,sha256=3cpKYYNuyT58ojggsiI3LoBVhbOEvOOncabSK_w3J1c,9
29
29
  pymobiledevice3/cli/apps.py,sha256=rieU0xT9y8mdzwkXXif3OIJaxMnDv6rdEUFVFc-ljkk,3518
30
30
  pymobiledevice3/cli/backup.py,sha256=Qt-iUARMtdMeFujawN1kpxC39u2q3IKocUDkpCrTFYM,6814
31
31
  pymobiledevice3/cli/bonjour.py,sha256=UMPJU1oOu6pnvhM0MKInlXkag70Z9D-wUzLhFWc8WYs,2837
32
- pymobiledevice3/cli/cli_common.py,sha256=3kd8mbffPBDNmENyxBrjzA58xtOn6800OS3DzQxGOVU,9927
32
+ pymobiledevice3/cli/cli_common.py,sha256=O7RzfGb_JBh6HAGxGt208bmb5-vPeBK7daDUyq0KoUo,9882
33
33
  pymobiledevice3/cli/companion_proxy.py,sha256=Zp1PJKE36mNs2lbnmwevDoVC7jTX5FSuQApTcmvEhJg,611
34
34
  pymobiledevice3/cli/crash.py,sha256=wss34L3at8qwL_z5ExGabofBbQ99cP_CGJJm8vuF36g,3506
35
35
  pymobiledevice3/cli/idam.py,sha256=a_xnURhQlmfnrTGY5KwOIbl9f-1rAjuGG-q6QfOfSE4,1105
@@ -41,7 +41,7 @@ pymobiledevice3/cli/power_assertion.py,sha256=Dwv_ykYpxB8sHsNkN0KTgCP8xL-zpE0m7c
41
41
  pymobiledevice3/cli/processes.py,sha256=iMjASV8LTCVMzDtx-H9vURI6V6FknVzMOtFFxTxsGNA,1027
42
42
  pymobiledevice3/cli/profile.py,sha256=FCFsr7t3eRN92bOtinBK37zxG-XuSNdji5CdD_smhvw,7392
43
43
  pymobiledevice3/cli/provision.py,sha256=tlJ2n7GdCdDMK5kLguo9Zp7l81PcIdzlS8efYylxAlA,1944
44
- pymobiledevice3/cli/remote.py,sha256=6tOtHF0KXciaT9Z4K7XELU9138U4Y0tvH-m6dMMREL4,12614
44
+ pymobiledevice3/cli/remote.py,sha256=tjoMjjUg32SPaIdZbwtu2Frno5Ly9is3p_E6FyjWxUU,12711
45
45
  pymobiledevice3/cli/restore.py,sha256=j1T9-eZi2AsvQqJ0EKpXuaWPuttoVUPy0xbYYfH6B_s,7485
46
46
  pymobiledevice3/cli/springboard.py,sha256=S76Kth2DbqsjGRFVOns40-L4RCqFnuMFuy7bVHbmw9M,3111
47
47
  pymobiledevice3/cli/syslog.py,sha256=tqQLecHGcb0v_3Lq54XyEDojdxJSFpvMnQ8B7P_lU58,8945
@@ -113,7 +113,7 @@ pymobiledevice3/restore/restored_client.py,sha256=tv1hyIV7UBDb_OUwj_w6qJsH_x36oB
113
113
  pymobiledevice3/restore/tss.py,sha256=EY8XpUaexHyDTtUCuXQnOgLVIFAikcs9p0ysNSG1Q0U,30818
114
114
  pymobiledevice3/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
115
  pymobiledevice3/services/accessibilityaudit.py,sha256=7AvGqfAqvsSULib06mpxP94-P-Zr4SwSZohgmbXLuog,15474
116
- pymobiledevice3/services/afc.py,sha256=cIjOyeVDRkE1iKVLpSNt2UGI6jVbOiPoS-siLTeDyWw,55008
116
+ pymobiledevice3/services/afc.py,sha256=Y9cF_YdndyMxSZZZlsapUGOVI1IdqAGCiYRyQn1HIvI,55095
117
117
  pymobiledevice3/services/amfi.py,sha256=SWGh5UQtf3YhD_4cT8M3dhH1sPE-mnIzkmiZjJ8d2x4,2522
118
118
  pymobiledevice3/services/companion.py,sha256=6rvL1KF2-Gflv77rL9txINMoiQplVouL_nnGKNq-Maw,2612
119
119
  pymobiledevice3/services/crash_reports.py,sha256=ODsgT3WgpOHIFM-ht9za_-xI9AAh7dKiq50NsRB5q3I,10945
@@ -180,9 +180,9 @@ pymobiledevice3/services/web_protocol/switch_to.py,sha256=TCdVrMfsvd18o-vZ0owVrE
180
180
  pymobiledevice3/tunneld/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
181
181
  pymobiledevice3/tunneld/api.py,sha256=Lwl1OdhPTgX6Zqezy8T4dEcXRfaEPwyGNClioTx3fUc,2338
182
182
  pymobiledevice3/tunneld/server.py,sha256=dMEZAv_X-76l0vSalpq4x0IVkbE-MNGR77T-u1TiHuE,25752
183
- pymobiledevice3-7.0.2.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
184
- pymobiledevice3-7.0.2.dist-info/METADATA,sha256=Q9FFjzNplZDqxJtKSt3B9GVRiCLkB3RJJdvpEQZMuYQ,17500
185
- pymobiledevice3-7.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
186
- pymobiledevice3-7.0.2.dist-info/entry_points.txt,sha256=jJMlOanHlVwUxcY__JwvKeWPrvBJr_wJyEq4oHIZNKE,66
187
- pymobiledevice3-7.0.2.dist-info/top_level.txt,sha256=MjZoRqcWPOh5banG-BbDOnKEfsS3kCxqV9cv-nzyg2Q,21
188
- pymobiledevice3-7.0.2.dist-info/RECORD,,
183
+ pymobiledevice3-7.0.3.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
184
+ pymobiledevice3-7.0.3.dist-info/METADATA,sha256=o_ZVbQ8SVyx-UluPA_DE9T-REKuInbnCT1LtHsRHTl8,17500
185
+ pymobiledevice3-7.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
186
+ pymobiledevice3-7.0.3.dist-info/entry_points.txt,sha256=jJMlOanHlVwUxcY__JwvKeWPrvBJr_wJyEq4oHIZNKE,66
187
+ pymobiledevice3-7.0.3.dist-info/top_level.txt,sha256=MjZoRqcWPOh5banG-BbDOnKEfsS3kCxqV9cv-nzyg2Q,21
188
+ pymobiledevice3-7.0.3.dist-info/RECORD,,