heathrow 0.2__tar.gz → 0.2.2__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 (65) hide show
  1. {heathrow-0.2 → heathrow-0.2.2}/PKG-INFO +1 -1
  2. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/heathrow/__init__.py +6 -6
  3. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/heathrow/util.py +5 -0
  4. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/heathrow/windows/dialogue.py +2 -6
  5. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow.egg-info/PKG-INFO +1 -1
  6. heathrow-0.2.2/src/heathrow.egg-info/scm_version.json +8 -0
  7. heathrow-0.2/src/heathrow.egg-info/scm_version.json +0 -8
  8. {heathrow-0.2 → heathrow-0.2.2}/.gitignore +0 -0
  9. {heathrow-0.2 → heathrow-0.2.2}/.gitlab-ci.yml +0 -0
  10. {heathrow-0.2 → heathrow-0.2.2}/COPYING +0 -0
  11. {heathrow-0.2 → heathrow-0.2.2}/Makefile +0 -0
  12. {heathrow-0.2 → heathrow-0.2.2}/README.txt +0 -0
  13. {heathrow-0.2 → heathrow-0.2.2}/pyproject.toml +0 -0
  14. {heathrow-0.2 → heathrow-0.2.2}/setup.cfg +0 -0
  15. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/bencode.py +0 -0
  16. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/bitset.py +0 -0
  17. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/constants.py +0 -0
  18. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/discovery/__init__.py +0 -0
  19. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/discovery/base.py +0 -0
  20. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/discovery/destination.py +0 -0
  21. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/__init__.py +0 -0
  22. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/base.py +0 -0
  23. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/basic.py +0 -0
  24. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/heathrow/constants.py +0 -0
  25. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/heathrow/windows/__init__.py +0 -0
  26. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/heathrow/windows/base.py +0 -0
  27. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/heathrow/windows/root.py +0 -0
  28. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/driver/heathrow/windows/splash.py +0 -0
  29. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/economy/__init__.py +0 -0
  30. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/economy/base.py +0 -0
  31. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/economy/proto.py +0 -0
  32. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/economy/reference.py +0 -0
  33. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/fileset/__init__.py +0 -0
  34. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/fileset/base.py +0 -0
  35. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/fileset/v1.py +0 -0
  36. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/main.py +0 -0
  37. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/messages.py +0 -0
  38. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/wire/__init__.py +0 -0
  39. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/wire/base.py +0 -0
  40. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/wire/buffered.py +0 -0
  41. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/wire/ltep.py +0 -0
  42. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/wire/reticulated.py +0 -0
  43. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow/wire/reticulated_v2.py +0 -0
  44. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow.egg-info/SOURCES.txt +0 -0
  45. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow.egg-info/dependency_links.txt +0 -0
  46. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow.egg-info/entry_points.txt +0 -0
  47. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow.egg-info/requires.txt +0 -0
  48. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow.egg-info/scm_file_list.json +0 -0
  49. {heathrow-0.2 → heathrow-0.2.2}/src/heathrow.egg-info/top_level.txt +0 -0
  50. {heathrow-0.2 → heathrow-0.2.2}/tests/__init__.py +0 -0
  51. {heathrow-0.2 → heathrow-0.2.2}/tests/fileset/__init__.py +0 -0
  52. {heathrow-0.2 → heathrow-0.2.2}/tests/fileset/fixtures/v1_basic.torrent +0 -0
  53. {heathrow-0.2 → heathrow-0.2.2}/tests/fileset/test_v1.py +0 -0
  54. {heathrow-0.2 → heathrow-0.2.2}/tests/fixtures/constants.py +0 -0
  55. {heathrow-0.2 → heathrow-0.2.2}/tests/fixtures/economy.py +0 -0
  56. {heathrow-0.2 → heathrow-0.2.2}/tests/fixtures/reticulum_config/.gitignore +0 -0
  57. {heathrow-0.2 → heathrow-0.2.2}/tests/fixtures/reticulum_config/config +0 -0
  58. {heathrow-0.2 → heathrow-0.2.2}/tests/fixtures/wire.py +0 -0
  59. {heathrow-0.2 → heathrow-0.2.2}/tests/module/__init__.py +0 -0
  60. {heathrow-0.2 → heathrow-0.2.2}/tests/module/test_discovery.py +0 -0
  61. {heathrow-0.2 → heathrow-0.2.2}/tests/module/test_wire.py +0 -0
  62. {heathrow-0.2 → heathrow-0.2.2}/tests/test_bencode.py +0 -0
  63. {heathrow-0.2 → heathrow-0.2.2}/tests/test_bitset.py +0 -0
  64. {heathrow-0.2 → heathrow-0.2.2}/tests/wire/__init__.py +0 -0
  65. {heathrow-0.2 → heathrow-0.2.2}/tests/wire/test_reticulated.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: heathrow
3
- Version: 0.2
3
+ Version: 0.2.2
4
4
  Summary: Reference client for the Aquarius protocol
5
5
  Author: Data Airspace Transport Authority
6
6
  License-Expression: GPL-3.0-only
@@ -19,7 +19,7 @@ from heathrow.bencode import bencode, bdecode
19
19
 
20
20
  from ..base import Driver
21
21
  from .constants import CONFIG_IDENTITY, CONFIG_METADATA, CONFIG_RESUME
22
- from .util import string_to_fileset
22
+ from .util import string_to_fileset, id_to_filename
23
23
  from .windows import TUIWindow, SplashWindow
24
24
 
25
25
 
@@ -50,7 +50,7 @@ class HeathrowDriverConfig:
50
50
  parser.add_argument("targets", help="Start downloading these magnet link / file URIs", nargs="*")
51
51
  args = parser.parse_args()
52
52
  discovery = getattr(heathrow.discovery, args.discovery + "Discovery")
53
- wirefactory = getattr(heathrow.wire, args.wirefactory + "WireFactory")
53
+ wirefactory = getattr(heathrow.wire, args.wire + "WireFactory")
54
54
  fileset = getattr(heathrow.fileset, args.fileset + "Fileset")
55
55
  economy = getattr(heathrow.economy, args.economy + "Economy")
56
56
  return cls(config_dir=args.config_directory, tui=args.tui, debug=args.debug, discovery=discovery, wirefactory=wirefactory, fileset=fileset, economy=economy, targets=args.targets)
@@ -94,7 +94,7 @@ class HeathrowDriver(Driver):
94
94
  self.run()
95
95
 
96
96
  def create_resume_file(self, fileset: heathrow.fileset.Fileset):
97
- resume_path = self.config.config_dir / CONFIG_RESUME / (fileset.fileset_id.replace(":", "_") + ".resume")
97
+ resume_path = self.config.config_dir / CONFIG_RESUME / id_to_filename(fileset.fileset_id, extension="resume")
98
98
  download_dir = fileset
99
99
  if resume_path.exists():
100
100
  pass # We have it already
@@ -133,8 +133,8 @@ class HeathrowDriver(Driver):
133
133
  for cliarg in self.config.targets:
134
134
  fs = string_to_fileset(cliarg, self.config.fileset, Path(os.path.expanduser("~/Downloads")), self.config.config_dir / CONFIG_METADATA)
135
135
  if fs is not None:
136
- self._driver.create_resume_file(fs)
137
- self._driver.add_fileset(fs)
136
+ self.create_resume_file(fs)
137
+ filesets.append(fs)
138
138
  return filesets
139
139
 
140
140
  def add_fileset(self, fileset):
@@ -195,7 +195,7 @@ class HeathrowDriver(Driver):
195
195
  curses.wrapper(self.curses_main)
196
196
  else:
197
197
  self.init_filesets_and_economies()
198
- self._driver._tracked_filesets_loaded = True
198
+ self._tracked_filesets_loaded = True
199
199
  try:
200
200
  while True:
201
201
  time.sleep(1)
@@ -20,3 +20,8 @@ def string_to_fileset(inp: str, fileset_type: type[Fileset], download_dir: Path,
20
20
  file_data = Path(inp).read_bytes()
21
21
  fileset = fileset_type.from_file(file_data, download_dir, metadata_dir)
22
22
  return fileset
23
+
24
+
25
+ def id_to_filename(id_: str, extension="torrent"):
26
+ """Turn a Heathrow ID to a filename."""
27
+ return id_.replace(":", "_") + "." + extension
@@ -10,7 +10,7 @@ from textwrap import dedent
10
10
  from heathrow.fileset import MissingMetadata
11
11
  from .base import TUIWindow
12
12
  from ..constants import CONFIG_RESUME, CONFIG_METADATA
13
- from ..util import string_to_fileset
13
+ from ..util import string_to_fileset, id_to_filename
14
14
 
15
15
 
16
16
  logger = logging.getLogger(__name__)
@@ -296,10 +296,6 @@ class InfoDialogueWindow(TUIWindow):
296
296
  return key != "\n"
297
297
 
298
298
 
299
- def _id_to_filename(id_: str, extension="torrent"):
300
- return id_.split(":", 2)[2] + "." + extension
301
-
302
-
303
299
  class DeleteDialogueWindow(TUIWindow):
304
300
  def __init__(self, curses_window, driver, fileset):
305
301
  super().__init__(curses_window, driver)
@@ -351,7 +347,7 @@ class DeleteDialogueWindow(TUIWindow):
351
347
  self._driver._discovery.unsubscribe(self._fileset.fileset_id)
352
348
  except KeyError:
353
349
  pass
354
- (self._driver.config.config_dir / CONFIG_RESUME / _id_to_filename(self._fileset.fileset_id, extension="resume")).unlink()
350
+ (self._driver.config.config_dir / CONFIG_RESUME / id_to_filename(self._fileset.fileset_id, extension="resume")).unlink()
355
351
  return False
356
352
  return True
357
353
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: heathrow
3
- Version: 0.2
3
+ Version: 0.2.2
4
4
  Summary: Reference client for the Aquarius protocol
5
5
  Author: Data Airspace Transport Authority
6
6
  License-Expression: GPL-3.0-only
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.2.2",
3
+ "distance": 0,
4
+ "node": "g41b20d859e052bcd44d324c8ec1100e6a46e373d",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-10-11"
8
+ }
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.2",
3
- "distance": 0,
4
- "node": "ge8d6d2e54689135c1890da04999763ac19716870",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-10-08"
8
- }
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