core-universal4 4.21.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.

@@ -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 get_instance():
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.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
- instance = SDKServer()
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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: core-universal4
3
- Version: 4.21.2
3
+ Version: 4.28.0
4
4
  Summary: Applitools Eyes Core SDK Server
5
5
  Home-page: http://www.applitools.com
6
6
  Author: Applitools Team
@@ -11,7 +11,7 @@ Platform: Linux
11
11
  Platform: MacOS
12
12
  Platform: Windows
13
13
  Classifier: Programming Language :: Python
14
- Classifier: Development Status :: 4 - Beta
14
+ Classifier: Development Status :: 5 - Production/Stable
15
15
  Classifier: Intended Audience :: Developers
16
16
  Classifier: Operating System :: MacOS
17
17
  Classifier: Operating System :: Microsoft :: Windows
@@ -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=XWOSBbNI3pIH0ReW2msPjnDGgeYspcRJoJ1_smYk7DQ,113117760
7
- core_universal4-4.21.2.dist-info/LICENSE,sha256=BDCdBp0jsd8YdhkGmoXEMSOVCarxR6n2x55oNN2BBAA,15088
8
- core_universal4-4.21.2.dist-info/METADATA,sha256=UGltcE3rrwelRATz4Bh3q1CG8ZAsBn1vtc93wQjehDk,1692
9
- core_universal4-4.21.2.dist-info/WHEEL,sha256=dNxT-MG8LzRaqJYFQzfes411XUTOrT0gsWYZz0BoKLo,138
10
- core_universal4-4.21.2.dist-info/top_level.txt,sha256=5jig8U7TAvEHIZT_r46UImIndsZ1-NqX5iWR7H9YZwc,11
11
- core_universal4-4.21.2.dist-info/RECORD,,