pybasemkit 0.2.2__tar.gz → 0.2.3__tar.gz

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 (38) hide show
  1. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/PKG-INFO +1 -1
  2. pybasemkit-0.2.3/basemkit/__init__.py +1 -0
  3. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/remotedebug.py +3 -2
  4. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/shell.py +12 -3
  5. pybasemkit-0.2.2/basemkit/__init__.py +0 -1
  6. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/.github/workflows/build.yml +0 -0
  7. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/.github/workflows/upload-to-pypi.yml +0 -0
  8. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/.gitignore +0 -0
  9. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/.project +0 -0
  10. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/.pydevproject +0 -0
  11. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/AGENTS.md +0 -0
  12. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/LICENSE +0 -0
  13. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/README.md +0 -0
  14. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/argparse_action.py +0 -0
  15. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/base_cmd.py +0 -0
  16. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/basetest.py +0 -0
  17. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/docker_util.py +0 -0
  18. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/persistent_log.py +0 -0
  19. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/profiler.py +0 -0
  20. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/basemkit/yamlable.py +0 -0
  21. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/mkdocs.yml +0 -0
  22. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/pyproject.toml +0 -0
  23. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/scripts/blackisort +0 -0
  24. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/scripts/doc +0 -0
  25. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/scripts/install +0 -0
  26. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/scripts/release +0 -0
  27. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/scripts/test +0 -0
  28. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/__init__.py +0 -0
  29. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_argparse_action.py +0 -0
  30. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_avro.py +0 -0
  31. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_base_cmd.py +0 -0
  32. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_docker_util.py +0 -0
  33. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_persistent_log.py +0 -0
  34. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_remotedebug.py +0 -0
  35. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_shell.py +0 -0
  36. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_timeout_decorator.py +0 -0
  37. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/tests/test_yamlable.py +0 -0
  38. {pybasemkit-0.2.2 → pybasemkit-0.2.3}/yamable.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pybasemkit
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Python base module kit: YAML/JSON I/O, structured logging, CLI tooling, shell execution, and pydevd remote debug support.
5
5
  Project-URL: Home, https://github.com/WolfgangFahl/pybasemkit
6
6
  Project-URL: Documentation, https://wiki.bitplan.com/index.php/pybasemkit
@@ -0,0 +1 @@
1
+ __version__ = "0.2.3"
@@ -163,8 +163,9 @@ class RemoteDebugSetup:
163
163
  pydevd.settrace(
164
164
  self.args.debugServer,
165
165
  port=self.args.debugPort,
166
- stdoutToServer=True,
167
- stderrToServer=True,
166
+ stdout_to_server=True,
167
+ stderr_to_server=True,
168
+ suspend=True,
168
169
  )
169
170
  print("Remote debugger attached.")
170
171
 
@@ -29,7 +29,9 @@ class ShellResult:
29
29
 
30
30
  def as_text(self, debug: bool = False):
31
31
  if debug:
32
- text = f"{self.proc.args} → rc={self.proc.returncode}, success={self.success}"
32
+ text = (
33
+ f"{self.proc.args} → rc={self.proc.returncode}, success={self.success}"
34
+ )
33
35
  else:
34
36
  text = "✅" if self.success else f"❌ → rc={self.proc.returncode}"
35
37
  return text
@@ -232,6 +234,7 @@ class Shell:
232
234
  tee: bool = False,
233
235
  stdout_callback: Optional[Callable[[str], None]] = None,
234
236
  stderr_callback: Optional[Callable[[str], None]] = None,
237
+ timeout: int = 60,
235
238
  ) -> subprocess.CompletedProcess:
236
239
  """
237
240
  Run command with profile, always capturing output and optionally teeing it.
@@ -246,9 +249,13 @@ class Shell:
246
249
  tee: If True, also print output live while capturing
247
250
  stdout_callback: Optional callable invoked with each stdout line as it is produced
248
251
  stderr_callback: Optional callable invoked with each stderr line as it is produced
252
+ timeout: Timeout in seconds for command execution (default: 60)
249
253
 
250
254
  Returns:
251
255
  subprocess.CompletedProcess
256
+
257
+ Raises:
258
+ subprocess.TimeoutExpired: If the command exceeds the timeout
252
259
  """
253
260
  shell_cmd = f"source {self.profile} && {cmd}" if self.profile else cmd
254
261
 
@@ -270,7 +277,7 @@ class Shell:
270
277
  stdout_callback=stdout_callback,
271
278
  stderr_callback=stderr_callback,
272
279
  )
273
- returncode = popen_process.wait()
280
+ returncode = popen_process.wait(timeout=timeout)
274
281
 
275
282
  process = subprocess.CompletedProcess(
276
283
  args=popen_process.args,
@@ -320,4 +327,6 @@ class Shell:
320
327
  symbol = "✅"
321
328
  print(f"{symbol} {idx}/{total}: {path.name}")
322
329
  percent_ok = ((total - failures) / total) * 100 if total > 0 else 0
323
- print(f"\n✅ {total - failures}/{total} ({percent_ok:.1f}%), ❌ {failures}/{total} ({100 - percent_ok:.1f}%)")
330
+ print(
331
+ f"\n✅ {total - failures}/{total} ({percent_ok:.1f}%), ❌ {failures}/{total} ({100 - percent_ok:.1f}%)"
332
+ )
@@ -1 +0,0 @@
1
- __version__ = "0.2.2"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes