processtitle 1.2__tar.gz → 1.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 (43) hide show
  1. {processtitle-1.2/processtitle.egg-info → processtitle-1.3}/PKG-INFO +2 -1
  2. {processtitle-1.2 → processtitle-1.3/processtitle.egg-info}/PKG-INFO +2 -1
  3. {processtitle-1.2 → processtitle-1.3}/pyproject.toml +1 -0
  4. {processtitle-1.2 → processtitle-1.3}/src/processtitle/__init__.py +1 -2
  5. {processtitle-1.2 → processtitle-1.3}/src/processtitle/__main__.py +19 -18
  6. {processtitle-1.2 → processtitle-1.3}/src/processtitle/_processtitle.pyi +3 -3
  7. {processtitle-1.2 → processtitle-1.3}/Acknowledgments.md +0 -0
  8. {processtitle-1.2 → processtitle-1.3}/LICENSE +0 -0
  9. {processtitle-1.2 → processtitle-1.3}/MANIFEST.in +0 -0
  10. {processtitle-1.2 → processtitle-1.3}/README.md +0 -0
  11. {processtitle-1.2 → processtitle-1.3}/processtitle.egg-info/SOURCES.txt +0 -0
  12. {processtitle-1.2 → processtitle-1.3}/processtitle.egg-info/dependency_links.txt +0 -0
  13. {processtitle-1.2 → processtitle-1.3}/processtitle.egg-info/entry_points.txt +0 -0
  14. {processtitle-1.2 → processtitle-1.3}/processtitle.egg-info/top_level.txt +0 -0
  15. {processtitle-1.2 → processtitle-1.3}/setup.cfg +0 -0
  16. {processtitle-1.2 → processtitle-1.3}/setup.py +0 -0
  17. {processtitle-1.2 → processtitle-1.3}/src/cpp/bsd.h +0 -0
  18. {processtitle-1.2 → processtitle-1.3}/src/cpp/clobber.cpp +0 -0
  19. {processtitle-1.2 → processtitle-1.3}/src/cpp/clobber.h +0 -0
  20. {processtitle-1.2 → processtitle-1.3}/src/cpp/common.h +0 -0
  21. {processtitle-1.2 → processtitle-1.3}/src/cpp/darwin.cpp +0 -0
  22. {processtitle-1.2 → processtitle-1.3}/src/cpp/darwin.h +0 -0
  23. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/intrusive_shared_ptr/apple_cf_ptr.h +0 -0
  24. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/intrusive_shared_ptr/common.h +0 -0
  25. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/intrusive_shared_ptr/intrusive_shared_ptr.h +0 -0
  26. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/intrusive_shared_ptr/python_ptr.h +0 -0
  27. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/pylib/arguments.h +0 -0
  28. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/pylib/errors.h +0 -0
  29. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/pylib/locking.h +0 -0
  30. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/pylib/marshalling.h +0 -0
  31. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/pylib/method.h +0 -0
  32. {processtitle-1.2 → processtitle-1.3}/src/cpp/external/pylib/util.h +0 -0
  33. {processtitle-1.2 → processtitle-1.3}/src/cpp/linux.cpp +0 -0
  34. {processtitle-1.2 → processtitle-1.3}/src/cpp/linux.h +0 -0
  35. {processtitle-1.2 → processtitle-1.3}/src/cpp/logger.h +0 -0
  36. {processtitle-1.2 → processtitle-1.3}/src/cpp/main.cpp +0 -0
  37. {processtitle-1.2 → processtitle-1.3}/src/cpp/pch.h +0 -0
  38. {processtitle-1.2 → processtitle-1.3}/src/cpp/solaris.cpp +0 -0
  39. {processtitle-1.2 → processtitle-1.3}/src/cpp/solaris.h +0 -0
  40. {processtitle-1.2 → processtitle-1.3}/src/cpp/win.cpp +0 -0
  41. {processtitle-1.2 → processtitle-1.3}/src/cpp/win.h +0 -0
  42. {processtitle-1.2 → processtitle-1.3}/src/extension.cpp +0 -0
  43. {processtitle-1.2 → processtitle-1.3}/src/processtitle/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: processtitle
3
- Version: 1.2
3
+ Version: 1.3
4
4
  Summary: Customize process "title" as reported by ps and similar tools
5
5
  Author-email: Eugene Gershnik <gershnik@hotmail.com>
6
6
  License-Expression: BSD-3-Clause
@@ -27,6 +27,7 @@ Classifier: Programming Language :: Python :: 3.11
27
27
  Classifier: Programming Language :: Python :: 3.12
28
28
  Classifier: Programming Language :: Python :: 3.13
29
29
  Classifier: Programming Language :: Python :: 3.14
30
+ Classifier: Programming Language :: Python :: 3.15
30
31
  Classifier: Typing :: Typed
31
32
  Requires-Python: >=3.10
32
33
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: processtitle
3
- Version: 1.2
3
+ Version: 1.3
4
4
  Summary: Customize process "title" as reported by ps and similar tools
5
5
  Author-email: Eugene Gershnik <gershnik@hotmail.com>
6
6
  License-Expression: BSD-3-Clause
@@ -27,6 +27,7 @@ Classifier: Programming Language :: Python :: 3.11
27
27
  Classifier: Programming Language :: Python :: 3.12
28
28
  Classifier: Programming Language :: Python :: 3.13
29
29
  Classifier: Programming Language :: Python :: 3.14
30
+ Classifier: Programming Language :: Python :: 3.15
30
31
  Classifier: Typing :: Typed
31
32
  Requires-Python: >=3.10
32
33
  Description-Content-Type: text/markdown
@@ -55,6 +55,7 @@ classifiers = [
55
55
  "Programming Language :: Python :: 3.12",
56
56
  "Programming Language :: Python :: 3.13",
57
57
  "Programming Language :: Python :: 3.14",
58
+ "Programming Language :: Python :: 3.15",
58
59
 
59
60
  "Typing :: Typed"
60
61
  ]
@@ -3,7 +3,7 @@
3
3
 
4
4
  """processtitle package"""
5
5
 
6
- __version__ = '1.2'
6
+ __version__ = '1.3'
7
7
 
8
8
  from ._processtitle import (
9
9
  prepare,
@@ -16,4 +16,3 @@ __all__ = [
16
16
  'set_to',
17
17
  'last_set'
18
18
  ]
19
-
@@ -16,12 +16,12 @@ from pathlib import Path
16
16
 
17
17
  from . import __version__
18
18
 
19
- def _doBusybox(args, ps: Path):
19
+ def _do_busybox(args, ps: Path):
20
20
  cmd = [ps, '-opid,args']
21
21
  if args.pids is None:
22
- proc = subprocess.run(cmd)
22
+ proc = subprocess.run(cmd, check=False)
23
23
  return proc.returncode
24
-
24
+
25
25
  encoding = locale.getpreferredencoding(do_setlocale=False)
26
26
  proc = subprocess.Popen(cmd, encoding=encoding, stdout=subprocess.PIPE)
27
27
  assert proc.stdout is not None
@@ -36,21 +36,21 @@ def _doBusybox(args, ps: Path):
36
36
  retcode = proc.wait()
37
37
  return retcode
38
38
 
39
- def _doUnix(args):
39
+ def _do_unix(args):
40
40
  path = os.environ.get('PATH', '/bin:/usr/bin')
41
41
  ps = shutil.which('ps', path=path)
42
42
  if ps is None:
43
43
  print('ps utility not found', file=sys.stderr, flush=True)
44
44
  return 1
45
-
45
+
46
46
  test = Path(ps)
47
47
  if test.is_symlink():
48
48
  dest = test.readlink()
49
49
  if dest.name == 'busybox':
50
- return _doBusybox(args, Path(ps))
51
-
50
+ return _do_busybox(args, Path(ps))
51
+
52
52
  cmd = [ps]
53
-
53
+
54
54
  if sys.platform.startswith("sunos"):
55
55
  cmd += ['-F', '-opid,args']
56
56
  else:
@@ -63,17 +63,17 @@ def _doUnix(args):
63
63
  cmd += ['-p', ','.join([str(pid) for pid in args.pids])]
64
64
  elif args.show_all:
65
65
  cmd += ['-A']
66
-
67
- proc = subprocess.run(cmd)
66
+
67
+ proc = subprocess.run(cmd, check=False)
68
68
  return proc.returncode
69
69
 
70
70
 
71
- def _doWin(args):
71
+ def _do_win(args):
72
72
  powershell = shutil.which('powershell')
73
73
  if powershell is None:
74
74
  print('powershell not found', file=sys.stderr, flush=True)
75
75
  return 1
76
-
76
+
77
77
  pids = ''
78
78
  filter = ''
79
79
  if not args.show_all:
@@ -93,9 +93,9 @@ def _doWin(args):
93
93
  if ($s -eq '') { exit 1 }
94
94
  $s
95
95
  ''').replace('\n', '\r\n')
96
-
96
+
97
97
  cmd = [powershell, '-NonInteractive', '-NoLogo', '-Command', '-']
98
- proc = subprocess.run(cmd, input=input, encoding='utf-8')
98
+ proc = subprocess.run(cmd, input=input, encoding='utf-8', check=False)
99
99
  return proc.returncode
100
100
 
101
101
  def main():
@@ -105,18 +105,19 @@ def main():
105
105
  prog='processtitle',
106
106
  description='Portably lists process IDs and their titles'
107
107
  )
108
- parser.add_argument('-a', '--all', action='store_true', dest='show_all',
108
+ parser.add_argument('-a', '--all', action='store_true', dest='show_all',
109
109
  help="show all (as opposed to 'some') processes. "
110
110
  "The definition of 'some' is platform dependent.")
111
- parser.add_argument('-p', '--pid', metavar='PID', type=int, nargs='+', dest='pids', help='limit output to these process IDs')
111
+ parser.add_argument('-p', '--pid', metavar='PID', type=int, nargs='+', dest='pids',
112
+ help='limit output to these process IDs')
112
113
  parser.add_argument('-v', '--version', action='version', version=f'%(prog)s {__version__}')
113
114
 
114
115
  args = parser.parse_args()
115
116
 
116
117
  if not sys.platform.startswith("win32"):
117
- return _doUnix(args)
118
+ return _do_unix(args)
118
119
  else:
119
- return _doWin(args)
120
+ return _do_win(args)
120
121
 
121
122
  if __name__ == '__main__':
122
123
  sys.exit(main())
@@ -1,7 +1,7 @@
1
1
  # Copyright (c) 2026, Eugene Gershnik
2
2
  # SPDX-License-Identifier: BSD-3-Clause
3
3
 
4
- def prepare(*, fork_safe_only: bool = False) -> None:
4
+ def prepare(*, fork_safe_only: bool = False) -> None:
5
5
  """Initialize the library
6
6
 
7
7
  This method must be called prior to any calls to set_to.
@@ -18,7 +18,7 @@ def prepare(*, fork_safe_only: bool = False) -> None:
18
18
  """
19
19
  ...
20
20
 
21
- def set_to(title: str) -> bool:
21
+ def set_to(title: str) -> bool:
22
22
  """Set process title
23
23
 
24
24
  Args:
@@ -43,4 +43,4 @@ def last_set() -> str | None:
43
43
 
44
44
  Returns None if `set_to` was never called before.
45
45
  """
46
- ...
46
+ ...
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
File without changes
File without changes
File without changes
File without changes