setproctitle 1.3.4__tar.gz → 1.3.6__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 (36) hide show
  1. {setproctitle-1.3.4 → setproctitle-1.3.6}/HISTORY.rst +13 -0
  2. {setproctitle-1.3.4/setproctitle.egg-info → setproctitle-1.3.6}/PKG-INFO +14 -1
  3. {setproctitle-1.3.4 → setproctitle-1.3.6}/pkg/setproctitle/__init__.py +1 -1
  4. {setproctitle-1.3.4 → setproctitle-1.3.6/setproctitle.egg-info}/PKG-INFO +14 -1
  5. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/c.h +2 -13
  6. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/darwin_set_process_name.c +16 -1
  7. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/setproctitle.c +24 -12
  8. {setproctitle-1.3.4 → setproctitle-1.3.6}/COPYRIGHT +0 -0
  9. {setproctitle-1.3.4 → setproctitle-1.3.6}/MANIFEST.in +0 -0
  10. {setproctitle-1.3.4 → setproctitle-1.3.6}/README.rst +0 -0
  11. {setproctitle-1.3.4 → setproctitle-1.3.6}/pkg/setproctitle/py.typed +0 -0
  12. {setproctitle-1.3.4 → setproctitle-1.3.6}/pyproject.toml +0 -0
  13. {setproctitle-1.3.4 → setproctitle-1.3.6}/setproctitle.egg-info/SOURCES.txt +0 -0
  14. {setproctitle-1.3.4 → setproctitle-1.3.6}/setproctitle.egg-info/dependency_links.txt +0 -0
  15. {setproctitle-1.3.4 → setproctitle-1.3.6}/setproctitle.egg-info/not-zip-safe +0 -0
  16. {setproctitle-1.3.4 → setproctitle-1.3.6}/setproctitle.egg-info/requires.txt +0 -0
  17. {setproctitle-1.3.4 → setproctitle-1.3.6}/setproctitle.egg-info/top_level.txt +0 -0
  18. {setproctitle-1.3.4 → setproctitle-1.3.6}/setup.cfg +0 -0
  19. {setproctitle-1.3.4 → setproctitle-1.3.6}/setup.py +0 -0
  20. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/darwin_set_process_name.h +0 -0
  21. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt.h +0 -0
  22. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt_config.h +0 -0
  23. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt_debug.c +0 -0
  24. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt_python.h +0 -0
  25. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt_setup.c +0 -0
  26. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt_setup.h +0 -0
  27. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt_status.c +0 -0
  28. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt_status.h +0 -0
  29. {setproctitle-1.3.4 → setproctitle-1.3.6}/src/spt_strlcpy.c +0 -0
  30. {setproctitle-1.3.4 → setproctitle-1.3.6}/tests/__init__.py +0 -0
  31. {setproctitle-1.3.4 → setproctitle-1.3.6}/tests/conftest.py +0 -0
  32. {setproctitle-1.3.4 → setproctitle-1.3.6}/tests/module_test.py +0 -0
  33. {setproctitle-1.3.4 → setproctitle-1.3.6}/tests/pyrun.c +0 -0
  34. {setproctitle-1.3.4 → setproctitle-1.3.6}/tests/setproctitle_test.py +0 -0
  35. {setproctitle-1.3.4 → setproctitle-1.3.6}/tests/setthreadtitle_test.py +0 -0
  36. {setproctitle-1.3.4 → setproctitle-1.3.6}/tests/test_win32.py +0 -0
@@ -1,6 +1,19 @@
1
1
  Releases history
2
2
  ----------------
3
3
 
4
+ Version 1.3.6
5
+ -------------
6
+
7
+ - Add support for free-threading (issue #147)
8
+
9
+
10
+ Version 1.3.5
11
+ -------------
12
+
13
+ - Fix bouncing Dock icon on macOS (issue #143).
14
+ - Fix building on C23 compilers (issue #145).
15
+
16
+
4
17
  Version 1.3.4
5
18
  -------------
6
19
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: setproctitle
3
- Version: 1.3.4
3
+ Version: 1.3.6
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/
@@ -166,6 +166,19 @@ It is unlikely that it can work on Solaris instead.
166
166
  Releases history
167
167
  ----------------
168
168
 
169
+ Version 1.3.6
170
+ -------------
171
+
172
+ - Add support for free-threading (issue #147)
173
+
174
+
175
+ Version 1.3.5
176
+ -------------
177
+
178
+ - Fix bouncing Dock icon on macOS (issue #143).
179
+ - Fix building on C23 compilers (issue #145).
180
+
181
+
169
182
  Version 1.3.4
170
183
  -------------
171
184
 
@@ -6,7 +6,7 @@ import logging
6
6
 
7
7
  logger = logging.getLogger("setproctitle")
8
8
 
9
- __version__ = "1.3.4"
9
+ __version__ = "1.3.6"
10
10
 
11
11
  __all__ = [
12
12
  "setproctitle",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: setproctitle
3
- Version: 1.3.4
3
+ Version: 1.3.6
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/
@@ -166,6 +166,19 @@ It is unlikely that it can work on Solaris instead.
166
166
  Releases history
167
167
  ----------------
168
168
 
169
+ Version 1.3.6
170
+ -------------
171
+
172
+ - Add support for free-threading (issue #147)
173
+
174
+
175
+ Version 1.3.5
176
+ -------------
177
+
178
+ - Fix bouncing Dock icon on macOS (issue #143).
179
+ - Fix building on C23 compilers (issue #145).
180
+
181
+
169
182
  Version 1.3.4
170
183
  -------------
171
184
 
@@ -12,20 +12,9 @@
12
12
 
13
13
  #include "spt_config.h"
14
14
 
15
- #ifndef __cplusplus
16
-
17
- #ifndef bool
18
- typedef char bool;
19
- #endif
20
-
21
- #ifndef true
22
- #define true ((bool) 1)
23
- #endif
24
-
25
- #ifndef false
26
- #define false ((bool) 0)
15
+ #if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ <= 201710L)
16
+ #include <stdbool.h>
27
17
  #endif
28
- #endif /* not C++ */
29
18
 
30
19
  #include <stddef.h>
31
20
 
@@ -99,10 +99,25 @@ static bool launch_services_set_process_title(const launch_services_t * it, cons
99
99
 
100
100
  CFTypeRef asn;
101
101
  CFStringRef cf_title;
102
+ CFDictionaryRef info_dict;
103
+ CFMutableDictionaryRef mutable_info_dict;
104
+ CFStringRef LSUIElement_key;
102
105
 
103
106
  if (!checked_in) {
104
107
  it->pLSSetApplicationLaunchServicesServerConnectionStatus(0, NULL);
105
- it->pLSApplicationCheckIn(kLSDefaultSessionID, CFBundleGetInfoDictionary(CFBundleGetMainBundle()));
108
+
109
+ // See https://github.com/dvarrazzo/py-setproctitle/issues/143
110
+ // We need to set LSUIElement (https://developer.apple.com/documentation/bundleresources/information-property-list/lsuielement)
111
+ // key to true to avoid macOS > 15 displaying the Dock icon.
112
+ info_dict = CFBundleGetInfoDictionary(CFBundleGetMainBundle());
113
+ mutable_info_dict = CFDictionaryCreateMutableCopy(NULL, 0, info_dict);
114
+ LSUIElement_key = CFStringCreateWithCString(NULL, "LSUIElement", kCFStringEncodingUTF8);
115
+ CFDictionaryAddValue(mutable_info_dict, LSUIElement_key, kCFBooleanTrue);
116
+ CFRelease(LSUIElement_key);
117
+
118
+ it->pLSApplicationCheckIn(kLSDefaultSessionID, mutable_info_dict);
119
+ CFRelease(mutable_info_dict);
120
+
106
121
  checked_in = true;
107
122
  }
108
123
 
@@ -106,6 +106,27 @@ spt_getthreadtitle(PyObject *self, PyObject *args)
106
106
  return Py_BuildValue("s", title);
107
107
  }
108
108
 
109
+ /* Module initialization function */
110
+
111
+ static int
112
+ spt_exec(PyObject *m)
113
+ {
114
+ spt_debug("module init");
115
+ return 0;
116
+ }
117
+
118
+ /* List of slots defined in the module */
119
+
120
+ static PyModuleDef_Slot spt_slots[] = {
121
+ {Py_mod_exec, spt_exec},
122
+ #if PY_VERSION_HEX >= 0x030c0000
123
+ {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
124
+ #endif
125
+ #if PY_VERSION_HEX >= 0x030d0000
126
+ {Py_mod_gil, Py_MOD_GIL_NOT_USED},
127
+ #endif
128
+ {0, NULL}
129
+ };
109
130
 
110
131
  /* List of methods defined in the module */
111
132
 
@@ -144,9 +165,9 @@ static struct PyModuleDef moduledef = {
144
165
  PyModuleDef_HEAD_INIT,
145
166
  "_setproctitle",
146
167
  setproctitle_module_documentation,
147
- -1,
168
+ 0,
148
169
  spt_methods,
149
- NULL,
170
+ spt_slots,
150
171
  NULL,
151
172
  NULL,
152
173
  NULL
@@ -155,14 +176,5 @@ static struct PyModuleDef moduledef = {
155
176
  PyMODINIT_FUNC
156
177
  PyInit__setproctitle(void)
157
178
  {
158
- PyObject *m;
159
-
160
- spt_debug("module init");
161
-
162
- /* Create the module and add the functions */
163
- m = PyModule_Create(&moduledef);
164
- if (m == NULL) { goto exit; }
165
-
166
- exit:
167
- return m;
179
+ return PyModuleDef_Init(&moduledef);
168
180
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes