setproctitle 1.3.7__tar.gz → 1.3.8__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 (37) hide show
  1. {setproctitle-1.3.7 → setproctitle-1.3.8}/HISTORY.rst +9 -0
  2. {setproctitle-1.3.7/setproctitle.egg-info → setproctitle-1.3.8}/PKG-INFO +11 -2
  3. {setproctitle-1.3.7 → setproctitle-1.3.8}/pkg/setproctitle/__init__.py +1 -1
  4. setproctitle-1.3.8/pyproject.toml +12 -0
  5. {setproctitle-1.3.7 → setproctitle-1.3.8/setproctitle.egg-info}/PKG-INFO +11 -2
  6. {setproctitle-1.3.7 → setproctitle-1.3.8}/setup.py +1 -1
  7. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt_setup.c +7 -0
  8. {setproctitle-1.3.7 → setproctitle-1.3.8}/tests/conftest.py +3 -0
  9. {setproctitle-1.3.7 → setproctitle-1.3.8}/tests/setproctitle_test.py +12 -0
  10. {setproctitle-1.3.7 → setproctitle-1.3.8}/tests/setthreadtitle_test.py +5 -0
  11. setproctitle-1.3.7/pyproject.toml +0 -9
  12. {setproctitle-1.3.7 → setproctitle-1.3.8}/LICENSE +0 -0
  13. {setproctitle-1.3.7 → setproctitle-1.3.8}/MANIFEST.in +0 -0
  14. {setproctitle-1.3.7 → setproctitle-1.3.8}/README.rst +0 -0
  15. {setproctitle-1.3.7 → setproctitle-1.3.8}/pkg/setproctitle/py.typed +0 -0
  16. {setproctitle-1.3.7 → setproctitle-1.3.8}/setproctitle.egg-info/SOURCES.txt +0 -0
  17. {setproctitle-1.3.7 → setproctitle-1.3.8}/setproctitle.egg-info/dependency_links.txt +0 -0
  18. {setproctitle-1.3.7 → setproctitle-1.3.8}/setproctitle.egg-info/not-zip-safe +0 -0
  19. {setproctitle-1.3.7 → setproctitle-1.3.8}/setproctitle.egg-info/requires.txt +0 -0
  20. {setproctitle-1.3.7 → setproctitle-1.3.8}/setproctitle.egg-info/top_level.txt +0 -0
  21. {setproctitle-1.3.7 → setproctitle-1.3.8}/setup.cfg +0 -0
  22. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/c.h +0 -0
  23. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/darwin_set_process_name.c +0 -0
  24. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/darwin_set_process_name.h +0 -0
  25. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/setproctitle.c +0 -0
  26. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt.h +0 -0
  27. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt_config.h +0 -0
  28. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt_debug.c +0 -0
  29. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt_python.h +0 -0
  30. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt_setup.h +0 -0
  31. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt_status.c +0 -0
  32. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt_status.h +0 -0
  33. {setproctitle-1.3.7 → setproctitle-1.3.8}/src/spt_strlcpy.c +0 -0
  34. {setproctitle-1.3.7 → setproctitle-1.3.8}/tests/__init__.py +0 -0
  35. {setproctitle-1.3.7 → setproctitle-1.3.8}/tests/module_test.py +0 -0
  36. {setproctitle-1.3.7 → setproctitle-1.3.8}/tests/pyrun.c +0 -0
  37. {setproctitle-1.3.7 → setproctitle-1.3.8}/tests/test_win32.py +0 -0
@@ -1,6 +1,15 @@
1
1
  Releases history
2
2
  ----------------
3
3
 
4
+ Version 1.3.8
5
+ -------------
6
+
7
+ - Add support for Python 3.15.
8
+ - Fix segfault calling setproctitle() after clearenv() on Python 3.15
9
+ (issue #157).
10
+ - Add support for riscv64 (issue #156).
11
+
12
+
4
13
  Version 1.3.7
5
14
  -------------
6
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: setproctitle
3
- Version: 1.3.7
3
+ Version: 1.3.8
4
4
  Summary: A Python module to customize the process title
5
5
  Home-page: https://github.com/dvarrazzo/py-setproctitle
6
6
  Download-URL: http://pypi.python.org/pypi/setproctitle/
@@ -13,7 +13,6 @@ Platform: MacOS X
13
13
  Platform: Windows
14
14
  Classifier: Development Status :: 5 - Production/Stable
15
15
  Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: BSD License
17
16
  Classifier: Programming Language :: C
18
17
  Classifier: Programming Language :: Python :: 3
19
18
  Classifier: Programming Language :: Python :: 3.8
@@ -23,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.11
23
22
  Classifier: Programming Language :: Python :: 3.12
24
23
  Classifier: Programming Language :: Python :: 3.13
25
24
  Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Programming Language :: Python :: 3.15
26
26
  Classifier: Operating System :: POSIX :: Linux
27
27
  Classifier: Operating System :: POSIX :: BSD
28
28
  Classifier: Operating System :: MacOS :: MacOS X
@@ -168,6 +168,15 @@ It is unlikely that it can work on Solaris instead.
168
168
  Releases history
169
169
  ----------------
170
170
 
171
+ Version 1.3.8
172
+ -------------
173
+
174
+ - Add support for Python 3.15.
175
+ - Fix segfault calling setproctitle() after clearenv() on Python 3.15
176
+ (issue #157).
177
+ - Add support for riscv64 (issue #156).
178
+
179
+
171
180
  Version 1.3.7
172
181
  -------------
173
182
 
@@ -6,7 +6,7 @@ import logging
6
6
 
7
7
  logger = logging.getLogger("setproctitle")
8
8
 
9
- __version__ = "1.3.7"
9
+ __version__ = "1.3.8"
10
10
 
11
11
  __all__ = [
12
12
  "setproctitle",
@@ -0,0 +1,12 @@
1
+ [tool.black]
2
+ line-length = 79
3
+
4
+ [tool.cibuildwheel]
5
+ enable = [
6
+ "pypy",
7
+ ]
8
+ test-extras = ["test"]
9
+
10
+ [[tool.cibuildwheel.overrides]]
11
+ select = "*-manylinux_riscv64"
12
+ before-all = ["dnf install -y --setopt=install_weak_deps=False procps-ng"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: setproctitle
3
- Version: 1.3.7
3
+ Version: 1.3.8
4
4
  Summary: A Python module to customize the process title
5
5
  Home-page: https://github.com/dvarrazzo/py-setproctitle
6
6
  Download-URL: http://pypi.python.org/pypi/setproctitle/
@@ -13,7 +13,6 @@ Platform: MacOS X
13
13
  Platform: Windows
14
14
  Classifier: Development Status :: 5 - Production/Stable
15
15
  Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: BSD License
17
16
  Classifier: Programming Language :: C
18
17
  Classifier: Programming Language :: Python :: 3
19
18
  Classifier: Programming Language :: Python :: 3.8
@@ -23,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.11
23
22
  Classifier: Programming Language :: Python :: 3.12
24
23
  Classifier: Programming Language :: Python :: 3.13
25
24
  Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Programming Language :: Python :: 3.15
26
26
  Classifier: Operating System :: POSIX :: Linux
27
27
  Classifier: Operating System :: POSIX :: BSD
28
28
  Classifier: Operating System :: MacOS :: MacOS X
@@ -168,6 +168,15 @@ It is unlikely that it can work on Solaris instead.
168
168
  Releases history
169
169
  ----------------
170
170
 
171
+ Version 1.3.8
172
+ -------------
173
+
174
+ - Add support for Python 3.15.
175
+ - Fix segfault calling setproctitle() after clearenv() on Python 3.15
176
+ (issue #157).
177
+ - Add support for riscv64 (issue #156).
178
+
179
+
171
180
  Version 1.3.7
172
181
  -------------
173
182
 
@@ -67,7 +67,6 @@ except Exception:
67
67
  classifiers = """\
68
68
  Development Status :: 5 - Production/Stable
69
69
  Intended Audience :: Developers
70
- License :: OSI Approved :: BSD License
71
70
  Programming Language :: C
72
71
  Programming Language :: Python :: 3
73
72
  Programming Language :: Python :: 3.8
@@ -77,6 +76,7 @@ Programming Language :: Python :: 3.11
77
76
  Programming Language :: Python :: 3.12
78
77
  Programming Language :: Python :: 3.13
79
78
  Programming Language :: Python :: 3.14
79
+ Programming Language :: Python :: 3.15
80
80
  Operating System :: POSIX :: Linux
81
81
  Operating System :: POSIX :: BSD
82
82
  Operating System :: MacOS :: MacOS X
@@ -139,6 +139,13 @@ find_argv_from_env(int argc, char *arg0)
139
139
  }
140
140
  buf[argc] = NULL;
141
141
 
142
+ /* environ can be NULL if clearenv() has been called.
143
+ * Python 3.15 implements os.environ.clear() as clearenv(). */
144
+ if (!environ) {
145
+ spt_debug("environ pointer is NULL");
146
+ goto exit;
147
+ }
148
+
142
149
  /* Walk back from environ until you find argc-1 null-terminated strings.
143
150
  * Don't look for argv[0] as it's probably not preceded by 0. */
144
151
  ptr = environ[0];
@@ -9,6 +9,9 @@ def pytest_configure(config):
9
9
  config.addinivalue_line(
10
10
  "markers", "embedded: the test create an embedded executable"
11
11
  )
12
+ config.addinivalue_line(
13
+ "markers", "skip_on_qemu: the test fail under qemu virtualisation"
14
+ )
12
15
 
13
16
 
14
17
  skip_if_win32 = pytest.mark.skipif(
@@ -38,6 +38,9 @@ print(10 + 20)
38
38
  )
39
39
  def test_init_getproctitle():
40
40
  """getproctitle() returns a sensible value at initial call."""
41
+ if "Xcode" in sys.executable:
42
+ pytest.xfail("xcode is crap")
43
+
41
44
  rv = run_script(
42
45
  """
43
46
  import setproctitle
@@ -48,6 +51,7 @@ print(setproctitle.getproctitle())
48
51
  assert rv == sys.executable + " -u\n"
49
52
 
50
53
 
54
+ @pytest.mark.skip_on_qemu
51
55
  def test_setproctitle():
52
56
  """setproctitle() can set the process title, duh."""
53
57
  rv = run_script(
@@ -169,6 +173,7 @@ print(newenv['PATH'])
169
173
  assert path.endswith("fakepath"), path
170
174
 
171
175
 
176
+ @pytest.mark.skip_on_qemu
172
177
  def test_issue_8(tmp_pypath):
173
178
  """Test that the module works with 'python -m'."""
174
179
  module = "spt_issue_8"
@@ -193,6 +198,7 @@ print(os.popen("ps -x -o pid,command 2> /dev/null").read())
193
198
  assert title == "Hello, module!"
194
199
 
195
200
 
201
+ @pytest.mark.skip_on_qemu
196
202
  def test_large_cmdline(tmp_pypath):
197
203
  """Test with a 64KB command line."""
198
204
  module = "longargs"
@@ -217,6 +223,7 @@ print(os.popen("ps -x -o pid,command 2> /dev/null").read())
217
223
  assert title == "Hello, long!"
218
224
 
219
225
 
226
+ @pytest.mark.skip_on_qemu
220
227
  def test_unicode():
221
228
  """Title can contain unicode characters."""
222
229
  snowman = "\u2603"
@@ -271,6 +278,7 @@ print(buf.decode(locale.getpreferredencoding(), 'replace'))
271
278
  pytest.fail("unexpected ps output: %r" % title)
272
279
 
273
280
 
281
+ @pytest.mark.skip_on_qemu
274
282
  def test_weird_args():
275
283
  """No problem with encoded arguments."""
276
284
  euro = "\u20ac"
@@ -298,6 +306,7 @@ print(os.popen("ps -x -o pid,command 2> /dev/null").read())
298
306
  assert title == "Hello, weird args!"
299
307
 
300
308
 
309
+ @pytest.mark.skip_on_qemu
301
310
  def test_weird_path(tmp_path, spt_directory):
302
311
  """No problem with encoded argv[0] path."""
303
312
  _check_4388()
@@ -391,6 +400,7 @@ print(os.popen("ps -x -o pid,command 2> /dev/null").read())
391
400
 
392
401
 
393
402
  @skip_if_no_proc_env
403
+ @pytest.mark.skip_on_qemu
394
404
  def test_noenv():
395
405
  """Check that SPT_NOENV avoids clobbering environ."""
396
406
  env = os.environ.copy()
@@ -473,6 +483,7 @@ setproctitle("Test")
473
483
  )
474
484
 
475
485
 
486
+ @skip_if_macos
476
487
  def test_fork_segfault():
477
488
  run_script(
478
489
  """\
@@ -492,6 +503,7 @@ assert p.exitcode == 0, f"p.exitcode is {p.exitcode}"
492
503
  )
493
504
 
494
505
 
506
+ @skip_if_macos
495
507
  def test_thread_fork_segfault():
496
508
  run_script(
497
509
  """\
@@ -1,11 +1,14 @@
1
1
  import os # noqa
2
2
  import sys # noqa
3
3
 
4
+ import pytest
5
+
4
6
  from .conftest import run_script, skip_if_win32, skip_if_no_proc_tasks
5
7
 
6
8
  pytestmark = [skip_if_win32, skip_if_no_proc_tasks]
7
9
 
8
10
 
11
+ @pytest.mark.skip_on_qemu
9
12
  def test_thread_title_unchanged():
10
13
  rv = run_script(
11
14
  """
@@ -29,6 +32,7 @@ print(setproctitle.getthreadtitle())
29
32
  assert before == gtt
30
33
 
31
34
 
35
+ @pytest.mark.skip_on_qemu
32
36
  def test_set_thread_title():
33
37
  run_script(
34
38
  """
@@ -43,6 +47,7 @@ with open(fn) as f:
43
47
  )
44
48
 
45
49
 
50
+ @pytest.mark.skip_on_qemu
46
51
  def test_set_threads_title():
47
52
  run_script(
48
53
  """
@@ -1,9 +0,0 @@
1
- [tool.black]
2
- line-length = 79
3
-
4
- [tool.cibuildwheel]
5
- enable = [
6
- "cpython-freethreading", # Only needed for 3.13t, where it was still experimental
7
- "pypy",
8
- ]
9
- test-extras = ["test"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes