l3io-wordpress-backup 1.0.0__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.
Files changed (98) hide show
  1. l3io/wp/backup/__init__.py +22 -0
  2. l3io/wp/backup/_version.py +31 -0
  3. l3io/wp/backup/adapters/__init__.py +9 -0
  4. l3io/wp/backup/adapters/clock.py +22 -0
  5. l3io/wp/backup/adapters/config_writer.py +702 -0
  6. l3io/wp/backup/adapters/credential_providers.py +236 -0
  7. l3io/wp/backup/adapters/crypto.py +237 -0
  8. l3io/wp/backup/adapters/database.py +1555 -0
  9. l3io/wp/backup/adapters/database_load.py +1263 -0
  10. l3io/wp/backup/adapters/exclusions.py +83 -0
  11. l3io/wp/backup/adapters/journal.py +507 -0
  12. l3io/wp/backup/adapters/lock.py +372 -0
  13. l3io/wp/backup/adapters/noop.py +666 -0
  14. l3io/wp/backup/adapters/phase.py +218 -0
  15. l3io/wp/backup/adapters/preflight.py +869 -0
  16. l3io/wp/backup/adapters/redaction.py +237 -0
  17. l3io/wp/backup/adapters/restore_extension.py +341 -0
  18. l3io/wp/backup/adapters/restore_runner.py +1030 -0
  19. l3io/wp/backup/adapters/site_files.py +191 -0
  20. l3io/wp/backup/adapters/store.py +227 -0
  21. l3io/wp/backup/adapters/tar.py +1648 -0
  22. l3io/wp/backup/adapters/tracing.py +235 -0
  23. l3io/wp/backup/adapters/workspace.py +299 -0
  24. l3io/wp/backup/adapters/wpcli.py +584 -0
  25. l3io/wp/backup/adapters/wpcli_child.py +135 -0
  26. l3io/wp/backup/api/__init__.py +104 -0
  27. l3io/wp/backup/api/errors.py +344 -0
  28. l3io/wp/backup/api/operations.py +427 -0
  29. l3io/wp/backup/cli/__init__.py +228 -0
  30. l3io/wp/backup/cli/adapter_sets.py +255 -0
  31. l3io/wp/backup/cli/backup.py +1118 -0
  32. l3io/wp/backup/cli/context.py +382 -0
  33. l3io/wp/backup/cli/credentials.py +310 -0
  34. l3io/wp/backup/cli/doctor.py +171 -0
  35. l3io/wp/backup/cli/exit.py +171 -0
  36. l3io/wp/backup/cli/logging.py +147 -0
  37. l3io/wp/backup/cli/output.py +111 -0
  38. l3io/wp/backup/cli/parser.py +853 -0
  39. l3io/wp/backup/cli/passphrase.py +301 -0
  40. l3io/wp/backup/cli/preflight.py +227 -0
  41. l3io/wp/backup/cli/privileges.py +327 -0
  42. l3io/wp/backup/cli/restore.py +1571 -0
  43. l3io/wp/backup/cli/restore_report.py +396 -0
  44. l3io/wp/backup/cli/restore_request.py +560 -0
  45. l3io/wp/backup/cli/scope.py +31 -0
  46. l3io/wp/backup/cli/settings.py +524 -0
  47. l3io/wp/backup/cli/verify.py +286 -0
  48. l3io/wp/backup/core/__init__.py +9 -0
  49. l3io/wp/backup/core/archive_choice.py +156 -0
  50. l3io/wp/backup/core/backup.py +105 -0
  51. l3io/wp/backup/core/config_location.py +257 -0
  52. l3io/wp/backup/core/exclusions.py +189 -0
  53. l3io/wp/backup/core/relocation.py +437 -0
  54. l3io/wp/backup/core/restore.py +1246 -0
  55. l3io/wp/backup/core/restore_journal.py +541 -0
  56. l3io/wp/backup/core/restore_space.py +224 -0
  57. l3io/wp/backup/core/verify.py +198 -0
  58. l3io/wp/backup/domain/__init__.py +9 -0
  59. l3io/wp/backup/domain/archive_format.py +1072 -0
  60. l3io/wp/backup/domain/backup_scope.py +21 -0
  61. l3io/wp/backup/domain/config.py +27 -0
  62. l3io/wp/backup/domain/credentials.py +125 -0
  63. l3io/wp/backup/domain/database.py +113 -0
  64. l3io/wp/backup/domain/errors.py +1434 -0
  65. l3io/wp/backup/domain/exclusion.py +74 -0
  66. l3io/wp/backup/domain/exit_codes.py +87 -0
  67. l3io/wp/backup/domain/flag_map.py +246 -0
  68. l3io/wp/backup/domain/journal.py +142 -0
  69. l3io/wp/backup/domain/lock.py +61 -0
  70. l3io/wp/backup/domain/preflight.py +126 -0
  71. l3io/wp/backup/domain/restore.py +181 -0
  72. l3io/wp/backup/domain/search_replace.py +59 -0
  73. l3io/wp/backup/domain/secret.py +61 -0
  74. l3io/wp/backup/domain/site.py +60 -0
  75. l3io/wp/backup/domain/storage_target.py +60 -0
  76. l3io/wp/backup/ports/__init__.py +33 -0
  77. l3io/wp/backup/ports/adapter_set.py +66 -0
  78. l3io/wp/backup/ports/archive.py +136 -0
  79. l3io/wp/backup/ports/clock.py +23 -0
  80. l3io/wp/backup/ports/config.py +71 -0
  81. l3io/wp/backup/ports/crypto.py +30 -0
  82. l3io/wp/backup/ports/database.py +129 -0
  83. l3io/wp/backup/ports/exclusion.py +33 -0
  84. l3io/wp/backup/ports/journal.py +53 -0
  85. l3io/wp/backup/ports/lock.py +48 -0
  86. l3io/wp/backup/ports/preflight.py +23 -0
  87. l3io/wp/backup/ports/restore.py +59 -0
  88. l3io/wp/backup/ports/search_replace.py +40 -0
  89. l3io/wp/backup/ports/site_files.py +95 -0
  90. l3io/wp/backup/ports/tracing.py +80 -0
  91. l3io/wp/backup/py.typed +0 -0
  92. l3io_wordpress_backup-1.0.0.dist-info/METADATA +593 -0
  93. l3io_wordpress_backup-1.0.0.dist-info/RECORD +98 -0
  94. l3io_wordpress_backup-1.0.0.dist-info/WHEEL +4 -0
  95. l3io_wordpress_backup-1.0.0.dist-info/entry_points.txt +2 -0
  96. l3io_wordpress_backup-1.0.0.dist-info/licenses/LICENSE +21 -0
  97. wpbackup2/__init__.py +7 -0
  98. wpbackup2/__main__.py +8 -0
@@ -0,0 +1,22 @@
1
+ """``l3io.wp.backup`` — WordPress backup, restore and relocation.
2
+
3
+ This is the package root of the ``l3io-wordpress-backup`` distribution. ``l3io`` and
4
+ ``l3io.wp`` are a **PEP 420 native namespace** shared with ``l3io-wordpress-config``
5
+ and ``l3io-wp-database``; neither carries an ``__init__.py`` (AD-27), and
6
+ ``tests/contracts/test_namespace_layout.py`` asserts that, in the source tree
7
+ and in the built wheel.
8
+
9
+ The public surface is declared by ``__all__`` (spine, Consistency
10
+ Conventions). It is deliberately minimal at this stage: the packaging skeleton
11
+ and its contract gates land before any behaviour, so that every gate is proven
12
+ to fire before there is anything for it to catch.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ __all__ = ["__version__"]
18
+
19
+ # Re-exported from _version, which reads installed distribution metadata. There
20
+ # used to be a literal here AND one in pyproject.toml, with nothing comparing
21
+ # them; the git tag is now the only source.
22
+ from l3io.wp.backup._version import __version__
@@ -0,0 +1,31 @@
1
+ """The installed distribution's version, resolved at runtime.
2
+
3
+ There is no version literal in this package. ``pyproject.toml`` declares the
4
+ version ``dynamic`` with ``source = "vcs"``, so the tag is the single source and
5
+ ``hatch-vcs`` resolves it at build time into the distribution metadata. This
6
+ module reads that metadata back, which keeps ``__version__`` importable without
7
+ reintroducing a second value that could disagree with the tag.
8
+
9
+ Deliberately NOT a generated file. A ``_version.py`` written by the build would
10
+ be absent from a fresh clone and from an editable install done before the first
11
+ build, so anything importing it would fail in exactly the situation a new
12
+ contributor hits first.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from importlib.metadata import PackageNotFoundError
18
+ from importlib.metadata import version as _dist_version
19
+
20
+ __all__ = ["__version__"]
21
+
22
+ #: Sentinel for "running from a tree that was never installed". It is a valid
23
+ #: PEP 440 version and sorts BELOW every real release, so a build that somehow
24
+ #: escapes with it cannot outrank a published one -- the same reasoning as the
25
+ #: 0.1.devN fallback for an untagged tree: wrong in the safe direction.
26
+ _UNKNOWN = "0.0.0+unknown"
27
+
28
+ try:
29
+ __version__: str = _dist_version("l3io-wordpress-backup")
30
+ except PackageNotFoundError: # pragma: no cover - only when not installed
31
+ __version__ = _UNKNOWN
@@ -0,0 +1,9 @@
1
+ """Real implementations of the ports: subprocess, filesystem, tar, crypto.
2
+
3
+ May import ``domain/``, ``ports/`` and ``core/`` (AD-1). An adapter *holds* a
4
+ core object and satisfies a Protocol; it never subclasses the core.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ __all__: list[str] = []
@@ -0,0 +1,22 @@
1
+ """The real ``ports.clock.Clock``."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import time
6
+ from datetime import UTC, datetime
7
+
8
+ __all__ = ["SystemClock"]
9
+
10
+
11
+ class SystemClock:
12
+ """The system wall clock, in UTC."""
13
+
14
+ __slots__ = ()
15
+
16
+ def now(self) -> datetime:
17
+ """``datetime.now(UTC)``."""
18
+ return datetime.now(UTC)
19
+
20
+ def monotonic_ns(self) -> int:
21
+ """``time.monotonic_ns()``."""
22
+ return time.monotonic_ns()