uipath 2.0.24__py3-none-any.whl → 2.0.26__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.

Potentially problematic release.


This version of uipath might be problematic. Click here for more details.

@@ -8,7 +8,7 @@ from ..spinner import Spinner
8
8
 
9
9
  def get_personal_workspace_info(
10
10
  base_url: str, token: str, spinner: Optional[Spinner] = None
11
- ) -> Tuple[str, str]:
11
+ ) -> Tuple[Optional[str], Optional[str]]:
12
12
  user_url = f"{base_url}/orchestrator_/odata/Users/UiPath.Server.Configuration.OData.GetCurrentUserExtended?$expand=PersonalWorkspace"
13
13
  user_response = requests.get(user_url, headers={"Authorization": f"Bearer {token}"})
14
14
 
@@ -20,10 +20,10 @@ def get_personal_workspace_info(
20
20
 
21
21
  user_data = user_response.json()
22
22
  feed_id = user_data.get("PersonalWorskpaceFeedId")
23
- folder_id = user_data["PersonalWorkspace"].get("Id")
24
- if not (feed_id and folder_id):
25
- if spinner:
26
- spinner.stop()
27
- click.echo("❌ No personal workspace found for user")
28
- click.get_current_context().exit(1)
23
+ personal_workspace = user_data.get("PersonalWorkspace")
24
+
25
+ if not personal_workspace or not feed_id or "Id" not in personal_workspace:
26
+ return None, None
27
+
28
+ folder_id = personal_workspace.get("Id")
29
29
  return feed_id, folder_id
@@ -118,6 +118,13 @@ def publish(feed):
118
118
  )
119
119
  if feed == "personal" or feed == personal_workspace_feed_id:
120
120
  is_personal_workspace = True
121
+ if (
122
+ personal_workspace_feed_id is None
123
+ or personal_workspace_folder_id is None
124
+ ):
125
+ spinner.stop()
126
+ click.echo("❌ No personal workspace found for user")
127
+ click.get_current_context().exit(1)
121
128
  url = url + "?feedId=" + personal_workspace_feed_id
122
129
  else:
123
130
  url = url + "?feedId=" + feed
uipath/tracing/_traced.py CHANGED
@@ -51,8 +51,9 @@ class TracingManager:
51
51
 
52
52
  Args:
53
53
  tracer_implementation: A function that takes the same parameters as _opentelemetry_traced
54
- and returns a decorator
54
+ and returns a decorator. If None, reverts to default implementation.
55
55
  """
56
+ tracer_implementation = tracer_implementation or _opentelemetry_traced
56
57
  cls._custom_tracer_implementation = tracer_implementation
57
58
 
58
59
  # Work with a copy of the registry to avoid modifying it during iteration
@@ -60,7 +61,10 @@ class TracingManager:
60
61
 
61
62
  for original_func, decorated_func, params in registry_copy:
62
63
  # Apply the new decorator with the same parameters
63
- new_decorated_func = tracer_implementation(**params)(original_func)
64
+ supported_params = _get_supported_params(tracer_implementation, params)
65
+ new_decorated_func = tracer_implementation(**supported_params)(
66
+ original_func
67
+ )
64
68
 
65
69
  logger.debug(
66
70
  f"Reapplying decorator to {original_func.__name__}, from {decorated_func.__name__}"
@@ -300,6 +304,36 @@ def _opentelemetry_traced(
300
304
  return decorator
301
305
 
302
306
 
307
+ def _get_supported_params(tracer_impl, params):
308
+ """Extract the parameters supported by the tracer implementation.
309
+
310
+ Args:
311
+ tracer_impl: The tracer implementation function or callable
312
+ params: Dictionary of parameters to check
313
+
314
+ Returns:
315
+ Dictionary containing only parameters supported by the tracer implementation
316
+ """
317
+ supported_params = {}
318
+ if hasattr(tracer_impl, "__code__"):
319
+ # For regular functions
320
+ impl_signature = inspect.signature(tracer_impl)
321
+ for param_name, param_value in params.items():
322
+ if param_name in impl_signature.parameters and param_value is not None:
323
+ supported_params[param_name] = param_value
324
+ elif callable(tracer_impl):
325
+ # For callable objects
326
+ impl_signature = inspect.signature(tracer_impl.__call__)
327
+ for param_name, param_value in params.items():
328
+ if param_name in impl_signature.parameters and param_value is not None:
329
+ supported_params[param_name] = param_value
330
+ else:
331
+ # If we can't inspect, pass all parameters and let the function handle it
332
+ supported_params = params
333
+
334
+ return supported_params
335
+
336
+
303
337
  def traced(
304
338
  name: Optional[str] = None,
305
339
  run_type: Optional[str] = None,
@@ -343,8 +377,12 @@ def traced(
343
377
  )
344
378
 
345
379
  def decorator(func):
346
- # Decorate the function
347
- decorated_func = tracer_impl(**params)(func)
380
+ # Check which parameters are supported by the tracer_impl
381
+ supported_params = _get_supported_params(tracer_impl, params)
382
+
383
+ # Decorate the function with only supported parameters
384
+ decorated_func = tracer_impl(**supported_params)(func)
385
+
348
386
  # Register both original and decorated function with parameters
349
387
  TracingManager.register_traced_function(func, decorated_func, params)
350
388
  return decorated_func
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.24
3
+ Version: 2.0.26
4
4
  Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
5
5
  Project-URL: Homepage, https://uipath.com
6
6
  Project-URL: Repository, https://github.com/UiPath/uipath-python
@@ -12,7 +12,7 @@ uipath/_cli/cli_init.py,sha256=75wHT0A4LuZFjlBQ8F34958Aq_o_KJdOlTQfwvFUqo4,3916
12
12
  uipath/_cli/cli_invoke.py,sha256=Qp9ao4xDeXSlKtxXWNn1oHxOuEcFZN7v6TZl0LjaWYk,3170
13
13
  uipath/_cli/cli_new.py,sha256=ViGqmheiuH5KLKUs0ECtv-xuxH4HtMxfb8bV8D2673M,2183
14
14
  uipath/_cli/cli_pack.py,sha256=V5fm3XPJ_vtJ2lrLoQU_jDgAKVe9lsipeB6n_7Nc4WM,13955
15
- uipath/_cli/cli_publish.py,sha256=QEvSeiyC5oDc_YNELgOPmATRibNPd-sr9_jje5PKOm8,5744
15
+ uipath/_cli/cli_publish.py,sha256=pJn-6oWfNvAo0P9powl9_hpQ57EeNgKB2q1tpzHtoSU,6037
16
16
  uipath/_cli/cli_run.py,sha256=B5L7fE2IqysIEcweedU8GEy7ekMGwpeRagYBCB_cdQI,4597
17
17
  uipath/_cli/middlewares.py,sha256=IiJgjsqrJVKSXx4RcIKHWoH-SqWqpHPbhzkQEybmAos,3937
18
18
  uipath/_cli/spinner.py,sha256=bS-U_HA5yne11ejUERu7CQoXmWdabUD2bm62EfEdV8M,1107
@@ -34,7 +34,7 @@ uipath/_cli/_templates/[Content_Types].xml.template,sha256=bYsKDz31PkIF9QksjgAY_
34
34
  uipath/_cli/_templates/main.py.template,sha256=QB62qX5HKDbW4lFskxj7h9uuxBITnTWqu_DE6asCwcU,476
35
35
  uipath/_cli/_templates/package.nuspec.template,sha256=YZyLc-u_EsmIoKf42JsLQ55OGeFmb8VkIU2VF7DFbtw,359
36
36
  uipath/_cli/_utils/_common.py,sha256=h0-lvaAzz-4iM7WuEqZhlTo5QadBpsQyAdlggx73-PA,1123
37
- uipath/_cli/_utils/_folders.py,sha256=X1KjB8itJsMceW7eZu9PiKx4hEF5kGRrjfNdrH9hs28,1028
37
+ uipath/_cli/_utils/_folders.py,sha256=-A3dwz3ViPVzVuSii0PT2FZiELBIdPtzU-PYfrGdFuA,1014
38
38
  uipath/_cli/_utils/_input_args.py,sha256=pyQhEcQXHdFHYTVNzvfWp439aii5StojoptnmCv5lfs,4094
39
39
  uipath/_cli/_utils/_parse_ast.py,sha256=3XVjnhJNnSfjXlitct91VOtqSl0l-sqDpoWww28mMc0,20663
40
40
  uipath/_cli/_utils/_processes.py,sha256=kcsMNlo8yvWwKSBxumAPFDPm67Od1ZpZglfNgvoIBso,1602
@@ -75,10 +75,10 @@ uipath/models/processes.py,sha256=Atvfrt6X4TYST3iA62jpS_Uxc3hg6uah11p-RaKZ6dk,20
75
75
  uipath/models/queues.py,sha256=N_s0GKucbyjh0RnO8SxPk6wlRgvq8KIIYsfaoIY46tM,6446
76
76
  uipath/tracing/__init__.py,sha256=GimSzv6qkCOlHOG1WtjYKJsZqcXpA28IgoXfR33JhiA,139
77
77
  uipath/tracing/_otel_exporters.py,sha256=x0PDPmDKJcxashsuehVsSsqBCzRr6WsNFaq_3_HS5F0,3014
78
- uipath/tracing/_traced.py,sha256=QGzvsk98xFTGFBbdU_vbYgdYWva6qd2pQOZklFfZNtk,14979
78
+ uipath/tracing/_traced.py,sha256=GFxOp73jk0vGTN_H7YZOOsEl9rVLaEhXGztMiYKIA-8,16634
79
79
  uipath/tracing/_utils.py,sha256=5SwsTGpHkIouXBndw-u8eCLnN4p7LM8DsTCCuf2jJgs,10165
80
- uipath-2.0.24.dist-info/METADATA,sha256=gla28eIGjQoPw10pbgTMnjwVJpf2cSps6s4zaSXudeU,6106
81
- uipath-2.0.24.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
82
- uipath-2.0.24.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
83
- uipath-2.0.24.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
84
- uipath-2.0.24.dist-info/RECORD,,
80
+ uipath-2.0.26.dist-info/METADATA,sha256=v0nkvuROqaY1ETPWX3tOQuYQfcLuKlcd17S3fbwDd8E,6106
81
+ uipath-2.0.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
82
+ uipath-2.0.26.dist-info/entry_points.txt,sha256=9C2_29U6Oq1ExFu7usihR-dnfIVNSKc-0EFbh0rskB4,43
83
+ uipath-2.0.26.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
84
+ uipath-2.0.26.dist-info/RECORD,,