core-universal4 4.24.2__py2.py3-none-manylinux1_x86_64.whl → 4.28.0__py2.py3-none-manylinux1_x86_64.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 core-universal4 might be problematic. Click here for more details.
- applitools/core_universal/__init__.py +11 -2
- applitools/core_universal/bin/core +0 -0
- applitools/core_universal/instance.py +9 -1
- applitools/core_universal/server.py +5 -1
- {core_universal4-4.24.2.dist-info → core_universal4-4.28.0.dist-info}/METADATA +1 -1
- core_universal4-4.28.0.dist-info/RECORD +11 -0
- core_universal4-4.24.2.dist-info/RECORD +0 -11
- {core_universal4-4.24.2.dist-info → core_universal4-4.28.0.dist-info}/LICENSE +0 -0
- {core_universal4-4.24.2.dist-info → core_universal4-4.28.0.dist-info}/WHEEL +0 -0
- {core_universal4-4.24.2.dist-info → core_universal4-4.28.0.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from __future__ import absolute_import
|
|
2
2
|
|
|
3
|
+
import os
|
|
4
|
+
|
|
3
5
|
|
|
4
6
|
def _version(package_name):
|
|
5
7
|
try: # assume python>=3.9
|
|
@@ -15,10 +17,17 @@ def _version(package_name):
|
|
|
15
17
|
__version__ = _version("core-universal4")
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
def
|
|
20
|
+
def _str2bool(v):
|
|
21
|
+
return None if v is None else v.lower() in ("yes", "true", "t", "1")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
DEBUG = _str2bool(os.getenv("APPLITOOLS_UNIVERSAL_DEBUG", None))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def get_instance(mask_log=None):
|
|
19
28
|
from . import instance
|
|
20
29
|
|
|
21
|
-
return instance.
|
|
30
|
+
return instance.create_or_get_instance(debug=DEBUG, mask_log=mask_log)
|
|
22
31
|
|
|
23
32
|
|
|
24
33
|
__all__ = ("get_instance",)
|
|
Binary file
|
|
@@ -2,4 +2,12 @@ from __future__ import absolute_import
|
|
|
2
2
|
|
|
3
3
|
from .server import SDKServer
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
_instance = None
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def create_or_get_instance(debug, mask_log):
|
|
9
|
+
global _instance
|
|
10
|
+
if _instance:
|
|
11
|
+
return _instance
|
|
12
|
+
_instance = SDKServer(debug, mask_log)
|
|
13
|
+
return _instance
|
|
@@ -26,7 +26,7 @@ executable_path = resource_filename("applitools.core_universal", "bin/" + _exe_n
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class SDKServer(object):
|
|
29
|
-
def __init__(self):
|
|
29
|
+
def __init__(self, debug=None, mask_log=None):
|
|
30
30
|
"""Start core-universal service subprocess and obtain its port number."""
|
|
31
31
|
command = [
|
|
32
32
|
executable_path,
|
|
@@ -35,6 +35,10 @@ class SDKServer(object):
|
|
|
35
35
|
"--shutdown-mode",
|
|
36
36
|
"stdin",
|
|
37
37
|
]
|
|
38
|
+
if debug:
|
|
39
|
+
command.append("--debug")
|
|
40
|
+
if mask_log:
|
|
41
|
+
command.append("--maskLog")
|
|
38
42
|
# Capture and keep stdin reference to notify USDK when it should terminate.
|
|
39
43
|
# USDK is expected to terminate when it receives EOF on its stdin.
|
|
40
44
|
# The pipe is automatically closed and EOF is sent by OS when python terminates.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
applitools/__init__.py,sha256=ED6jHcYiuYpr_0vjGz0zx2lrrmJT9sDJCzIljoDfmlM,65
|
|
2
|
+
applitools/core_universal/__init__.py,sha256=D_DYZLTipVuDfdjMvrASPNE6Xzc_6KbOPuj_zoTLHMU,714
|
|
3
|
+
applitools/core_universal/__main__.py,sha256=cx9LZOEPp_-VxVrIT-LVZh2JSiwHANjflVYkAAVAsXk,210
|
|
4
|
+
applitools/core_universal/instance.py,sha256=G71QQzISrOevjDa6IEfOW7oYJiL0ywiKwtf5dMjkIZs,263
|
|
5
|
+
applitools/core_universal/server.py,sha256=Ns_cQslSaFGNGYvGzHekiib1KRFHAUYqKDDwkmCH1Zg,1849
|
|
6
|
+
applitools/core_universal/bin/core,sha256=MqarJKadwGupJYI4cNcJ3egIsAWJxI92aagCnGIsqVg,118622784
|
|
7
|
+
core_universal4-4.28.0.dist-info/LICENSE,sha256=BDCdBp0jsd8YdhkGmoXEMSOVCarxR6n2x55oNN2BBAA,15088
|
|
8
|
+
core_universal4-4.28.0.dist-info/METADATA,sha256=jHPc6LH3q5lPwGHhfGqI0SRGfo_icK1x82UuMGkKex4,1705
|
|
9
|
+
core_universal4-4.28.0.dist-info/WHEEL,sha256=dNxT-MG8LzRaqJYFQzfes411XUTOrT0gsWYZz0BoKLo,138
|
|
10
|
+
core_universal4-4.28.0.dist-info/top_level.txt,sha256=5jig8U7TAvEHIZT_r46UImIndsZ1-NqX5iWR7H9YZwc,11
|
|
11
|
+
core_universal4-4.28.0.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
applitools/__init__.py,sha256=ED6jHcYiuYpr_0vjGz0zx2lrrmJT9sDJCzIljoDfmlM,65
|
|
2
|
-
applitools/core_universal/__init__.py,sha256=hltnb8DsIMOAuHz8gpY4fQCJpXrdMj4KjSPnrD-OdDI,484
|
|
3
|
-
applitools/core_universal/__main__.py,sha256=cx9LZOEPp_-VxVrIT-LVZh2JSiwHANjflVYkAAVAsXk,210
|
|
4
|
-
applitools/core_universal/instance.py,sha256=Msxa8I61CvkWnsmKEdoehpmAC72KkL3kvZ3AHykZ_cU,94
|
|
5
|
-
applitools/core_universal/server.py,sha256=_11M0Df_DAGOh9qDTFPfUJ9TElQKSSaOzhJMrN-lcuE,1705
|
|
6
|
-
applitools/core_universal/bin/core,sha256=IwQ59RgIKSplqVJHVXPBJvmDPa2sVnmX74KhUdiJ3K4,113117760
|
|
7
|
-
core_universal4-4.24.2.dist-info/LICENSE,sha256=BDCdBp0jsd8YdhkGmoXEMSOVCarxR6n2x55oNN2BBAA,15088
|
|
8
|
-
core_universal4-4.24.2.dist-info/METADATA,sha256=xIfQztuosjCN_oamQ5QrYp0lGLDWsy6rfucJ7quHwnA,1705
|
|
9
|
-
core_universal4-4.24.2.dist-info/WHEEL,sha256=dNxT-MG8LzRaqJYFQzfes411XUTOrT0gsWYZz0BoKLo,138
|
|
10
|
-
core_universal4-4.24.2.dist-info/top_level.txt,sha256=5jig8U7TAvEHIZT_r46UImIndsZ1-NqX5iWR7H9YZwc,11
|
|
11
|
-
core_universal4-4.24.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|