File: replace_ubuntu_system_checks_with_debian.diff

package info (click to toggle)
python-choreographer 1.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 660 kB
  • sloc: python: 2,841; makefile: 12; sh: 5
file content (79 lines) | stat: -rw-r--r-- 3,469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
diff --git a/src/choreographer/browsers/chromium.py b/src/choreographer/browsers/chromium.py
index 73b4642..4a5d197 100644
--- a/src/choreographer/browsers/chromium.py
+++ b/src/choreographer/browsers/chromium.py
@@ -190,12 +190,12 @@ class Chromium:
                 f"Chromium.get_cli() received invalid args: {kwargs.keys()}",
             )
         self.skip_local = bool(
-            "ubuntu" in platform.version().lower() and self.sandbox_enabled,
+            "debian" in platform.version().lower() and self.sandbox_enabled,
         )
 
         if self.skip_local:
             _logger.warning(
-                "Forced skipping local. Ubuntu sandbox requires package manager.",
+                "Forced skipping local. Debian sandbox requires package manager.",
             )
 
         if not self.path:
diff --git a/src/choreographer/cli/_cli_utils.py b/src/choreographer/cli/_cli_utils.py
index 8a1ce57..9460eec 100644
--- a/src/choreographer/cli/_cli_utils.py
+++ b/src/choreographer/cli/_cli_utils.py
@@ -191,12 +191,12 @@ async def get_chrome(
 
 
 def get_chrome_cli() -> None:
-    if "ubuntu" in platform.version().lower():
+    if "debian" in platform.version().lower():
         warnings.warn(  # noqa: B028
-            "You are using `get_browser()` on Ubuntu."
-            " Ubuntu is **very strict** about where binaries come from."
+            "You are using `get_browser()` on Debian."
+            " Debian is **very strict** about where binaries come from."
             " While sandbox is already off by default, do not set"
-            " enable_sandbox to True OR you must install from Ubuntu's"
+            " enable_sandbox to True OR you must install from Debian's"
             " package manager.",
             UserWarning,
         )
diff --git a/src/choreographer/utils/_tmpfile.py b/src/choreographer/utils/_tmpfile.py
index f27928a..4e37d2b 100644
--- a/src/choreographer/utils/_tmpfile.py
+++ b/src/choreographer/utils/_tmpfile.py
@@ -47,7 +47,6 @@ class TmpDirectory:
         Args:
             path: manually specify the directory to use
             sneak: (default False) avoid using /tmp
-                Ubuntu's snap will sandbox /tmp
 
         """
         self._with_onexc = bool(sys.version_info[:3] >= (3, 12))
diff --git a/tests/test_process.py b/tests/test_process.py
index dcee6fc..b0a3c71 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -19,9 +19,9 @@ _logger = logistro.getLogger(__name__)
 @pytest.mark.asyncio(loop_scope="function")
 async def test_context(headless, sandbox, gpu):
     _logger.info("testing...")
-    if sandbox and "ubuntu" in platform.version().lower():
+    if sandbox and "debian" in platform.version().lower():
         pytest.skip(
-            "Ubuntu doesn't support sandbox unless installed from snap.",
+            "Debian doesn't support sandbox.",
         )
     elif sandbox:
         _logger.info(
@@ -52,8 +52,8 @@ async def test_context(headless, sandbox, gpu):
 @pytest.mark.asyncio(loop_scope="function")
 async def test_no_context(headless, sandbox, gpu):
     _logger.info("testing...")
-    if sandbox and "ubuntu" in platform.version().lower():
-        pytest.skip("Ubuntu doesn't support sandbox unless installed from snap.")
+    if sandbox and "debian" in platform.version().lower():
+        pytest.skip("Debian doesn't support sandbox.")
     browser = await choreo.Browser(
         headless=headless,
         enable_sandbox=sandbox,