METADATA 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. Metadata-Version: 2.2
  2. Name: setproctitle
  3. Version: 1.3.5
  4. Summary: A Python module to customize the process title
  5. Home-page: https://github.com/dvarrazzo/py-setproctitle
  6. Download-URL: http://pypi.python.org/pypi/setproctitle/
  7. Author: Daniele Varrazzo
  8. Author-email: daniele.varrazzo@gmail.com
  9. License: BSD-3-Clause
  10. Platform: GNU/Linux
  11. Platform: BSD
  12. Platform: MacOS X
  13. Platform: Windows
  14. Classifier: Development Status :: 5 - Production/Stable
  15. Classifier: Intended Audience :: Developers
  16. Classifier: License :: OSI Approved :: BSD License
  17. Classifier: Programming Language :: C
  18. Classifier: Programming Language :: Python :: 3
  19. Classifier: Programming Language :: Python :: 3.8
  20. Classifier: Programming Language :: Python :: 3.9
  21. Classifier: Programming Language :: Python :: 3.10
  22. Classifier: Programming Language :: Python :: 3.11
  23. Classifier: Programming Language :: Python :: 3.12
  24. Classifier: Programming Language :: Python :: 3.13
  25. Classifier: Operating System :: POSIX :: Linux
  26. Classifier: Operating System :: POSIX :: BSD
  27. Classifier: Operating System :: MacOS :: MacOS X
  28. Classifier: Operating System :: Microsoft :: Windows
  29. Classifier: Topic :: Software Development
  30. Requires-Python: >=3.8
  31. Description-Content-Type: text/x-rst
  32. Provides-Extra: test
  33. Requires-Dist: pytest; extra == "test"
  34. Dynamic: author
  35. Dynamic: author-email
  36. Dynamic: classifier
  37. Dynamic: description
  38. Dynamic: description-content-type
  39. Dynamic: download-url
  40. Dynamic: home-page
  41. Dynamic: license
  42. Dynamic: platform
  43. Dynamic: provides-extra
  44. Dynamic: requires-python
  45. Dynamic: summary
  46. A Python module to customize the process title
  47. ==============================================
  48. .. image:: https://github.com/dvarrazzo/py-setproctitle/workflows/Tests/badge.svg
  49. :target: https://github.com/dvarrazzo/py-setproctitle/actions?query=workflow%3ATests
  50. :alt: Tests
  51. :author: Daniele Varrazzo
  52. The ``setproctitle`` module allows a process to change its title (as displayed
  53. by system tools such as ``ps``, ``top`` or MacOS Activity Monitor).
  54. Changing the title is mostly useful in multi-process systems, for example
  55. when a master process is forked: changing the children's title allows to
  56. identify the task each process is busy with. The technique is used by
  57. PostgreSQL_ and the `OpenSSH Server`_ for example.
  58. The procedure is hardly portable across different systems. PostgreSQL provides
  59. a good `multi-platform implementation`__: this package was born as a wrapper
  60. around PostgreSQL code.
  61. - `Homepage <https://github.com/dvarrazzo/py-setproctitle>`__
  62. - `Download <http://pypi.python.org/pypi/setproctitle/>`__
  63. - `Bug tracker <https://github.com/dvarrazzo/py-setproctitle/issues>`__
  64. .. _PostgreSQL: http://www.postgresql.org
  65. .. _OpenSSH Server: http://www.openssh.com/
  66. .. __: http://doxygen.postgresql.org/ps__status_8c_source.html
  67. Installation
  68. ------------
  69. ``setproctitle`` is a C extension: in order to build it you will need a C
  70. compiler and the Python development support (the ``python-dev`` or
  71. ``python3-dev`` package in most Linux distributions). No further external
  72. dependencies are required.
  73. You can use ``pip`` to install the module::
  74. pip install setproctitle
  75. You can use ``pip -t`` or ``virtualenv`` for local installations, ``sudo pip``
  76. for a system-wide one... the usual stuff. Read pip_ or virtualenv_ docs for
  77. all the details.
  78. .. _pip: https://pip.readthedocs.org/
  79. .. _virtualenv: https://virtualenv.readthedocs.org/
  80. Usage
  81. -----
  82. .. note::
  83. You should import and use the module (even just calling ``getproctitle()``)
  84. pretty early in your program lifetime: code writing env vars `may
  85. interfere`__ with the module initialisation.
  86. .. __: https://github.com/dvarrazzo/py-setproctitle/issues/42
  87. The ``setproctitle`` module exports the following functions:
  88. ``setproctitle(title)``
  89. Set *title* as the title for the current process.
  90. ``getproctitle()``
  91. Return the current process title.
  92. The process title is usually visible in files such as ``/proc/PID/cmdline``,
  93. ``/proc/PID/status``, ``/proc/PID/comm``, depending on the operating system
  94. and kernel version. These information are used by user-space tools such as
  95. ``ps`` and ``top``.
  96. ``setthreadtitle(title)``
  97. Set *title* as the title for the current thread.
  98. ``getthreadtitle()``
  99. Get the current thread title.
  100. The thread title is exposed by some operating systems as the file
  101. ``/proc/PID/task/TID/comm``, which is used by certain tools such as ``htop``.
  102. Environment variables
  103. ~~~~~~~~~~~~~~~~~~~~~
  104. A few environment variables can be used to customize the module behavior:
  105. ``SPT_NOENV``
  106. Avoid clobbering ``/proc/PID/environ``.
  107. On many platforms, setting the process title will clobber the
  108. ``environ`` memory area. ``os.environ`` will work as expected from within
  109. the Python process, but the content of the file ``/proc/PID/environ`` will
  110. be overwritten. If you require this file not to be broken you can set the
  111. ``SPT_NOENV`` environment variable to any non-empty value: in this case
  112. the maximum length for the title will be limited to the length of the
  113. command line.
  114. ``SPT_DEBUG``
  115. Print debug information on ``stderr``.
  116. If the module doesn't work as expected you can set this variable to a
  117. non-empty value to generate information useful for debugging. Note that
  118. the most useful information is printed when the module is imported, not
  119. when the functions are called.
  120. Module status
  121. -------------
  122. The module can be currently compiled and effectively used on the following
  123. platforms:
  124. - GNU/Linux
  125. - BSD
  126. - MacOS X
  127. - Windows
  128. Note that on Windows there is no way to change the process string:
  129. what the module does is to create a *Named Object* whose value can be read
  130. using a tool such as `Process Explorer`_ (contribution of a more useful tool
  131. to be used together with ``setproctitle`` would be well accepted).
  132. The module can probably work on HP-UX, but I haven't found any to test with.
  133. It is unlikely that it can work on Solaris instead.
  134. .. _Process Explorer: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
  135. Releases history
  136. ----------------
  137. Version 1.3.5 (unreleased)
  138. --------------------------
  139. - Fix bouncing Dock icon on macOS (issue #143).
  140. - Fix building on C23 compilers (issue #145).
  141. Version 1.3.4
  142. -------------
  143. - Add support for Python 3.13 (issue #139).
  144. - Drop support for Python 3.7.
  145. Version 1.3.3
  146. -------------
  147. - Add support for Python 3.12.
  148. - Fix package metadata to include Python 3.11, 3.12.
  149. Version 1.3.2
  150. -------------
  151. - Restore import-time initialization of macOS to avoid crash on thread+fork
  152. (issue #113).
  153. Version 1.3.1
  154. -------------
  155. - Fixed segfault on macOS 12.5 in forked processes (issue #111).
  156. Note that, as a workaround, Activity Monitor will show the title of the
  157. parent.
  158. Version 1.3.0
  159. -------------
  160. - Added fallback no-op implementation if building the extension fails.
  161. - Added support for displaying title as the process name in MacOS Activity
  162. Monitor (issue #10).
  163. - Fixed "Symbol not found: _Py_GetArgcArgv" error when using Xcode provided
  164. Python (issues #82, #103).
  165. - Fixed FreeBSD support, broken in 1.2 (issue #94).
  166. - Added package type annotations (issue #101).
  167. - Dropped support for Python 3.6.
  168. Version 1.2.3
  169. -------------
  170. - Added Python 3.10 packages (issue #102).
  171. - Added Wheel packages for macOS (issue #96).
  172. - Package build moved to cibuildwheel, other wheels provided (issue #47).
  173. Version 1.2.2
  174. -------------
  175. - Fixed Windows build (issues #89, #90).
  176. - Added wheel packages for Windows (issues #47, #90).
  177. - Added wheel packages for aarch64 (issue #95).
  178. Version 1.2.1
  179. -------------
  180. - Fixed segfault after ``os.environ.clear()`` (issue #88).
  181. Version 1.2
  182. ~~~~~~~~~~~
  183. - added ``getthreadtitle()`` and ``setthreadtitle()``.
  184. - Initialisation of the module moved to the first usage: importing the module
  185. doesn't cause side effects.
  186. - Manage much longer command lines (issue #52)
  187. - Improved build on BSD, dropped ancient versions (issue #67).
  188. - Fixed build for Python 3.8 (issues #66, #72)
  189. - Added support for Python 3.9
  190. - Dropped support for Python < 3.6
  191. Version 1.1.10
  192. ~~~~~~~~~~~~~~
  193. - Fixed building with certain ``prctl.h`` implementations (issue #44).
  194. - Use ``setuptools`` if available (issue #48).
  195. Version 1.1.9
  196. ~~~~~~~~~~~~~
  197. - Fixed build on VC (issues #20, #33).
  198. - Added ``MANIFEST.in`` to the source distribution to help with RPM building
  199. (issue #30).
  200. Version 1.1.8
  201. ~~~~~~~~~~~~~
  202. - Added support for Python "diehard" 2.4 (pull request #3).
  203. - Fixed build on Mac OS X 10.9 Maverick (issue #27).
  204. Version 1.1.7
  205. ~~~~~~~~~~~~~
  206. - Added PyPy support, courtesy of Ozan Turksever - http://www.logsign.net
  207. (pull request #2).
  208. Version 1.1.6
  209. ~~~~~~~~~~~~~
  210. - The module can be compiled again on Windows (issue #21).
  211. Version 1.1.5
  212. ~~~~~~~~~~~~~
  213. - No module bug, but a packaging issue: files ``README`` and ``HISTORY``
  214. added back into the distribution.
  215. Version 1.1.4
  216. ~~~~~~~~~~~~~
  217. - The module works correctly in embedded Python.
  218. - ``setproctitle()`` accepts a keyword argument.
  219. - Debug output support always compiled in: the variable ``SPT_DEBUG`` can be
  220. used to emit debug log.
  221. Version 1.1.3
  222. ~~~~~~~~~~~~~
  223. - Don't clobber environ if the variable ``SPT_NOENV`` is set (issue #16).
  224. Version 1.1.2
  225. ~~~~~~~~~~~~~
  226. - Find the setproctitle include file on OpenBSD (issue #11).
  227. - Skip test with unicode if the file system encoding wouldn't make it pass
  228. (issue #13).
  229. Version 1.1.1
  230. ~~~~~~~~~~~~~
  231. - Fixed segfault when the module is imported under mod_wsgi (issue #9).
  232. Version 1.1
  233. ~~~~~~~~~~~
  234. - The module works correctly with Python 3.
  235. Version 1.0.1
  236. ~~~~~~~~~~~~~
  237. - ``setproctitle()`` works even when Python messes up with argv, e.g. when run
  238. with the -m option (issue #8).
  239. Version 1.0
  240. ~~~~~~~~~~~
  241. No major change since the previous version. The module has been heavily used
  242. in production environment without any problem reported, so it's time to declare
  243. it stable.
  244. Version 0.4
  245. ~~~~~~~~~~~
  246. - Module works on BSD (tested on FreeBSD 7.2).
  247. - Module works on Windows. Many thanks to `Develer`_ for providing a neat `GCC
  248. package for Windows with Python integration`__ that made the Windows porting
  249. painless.
  250. .. _Develer: http://www.develer.com/
  251. .. __: http://www.develer.com/oss/GccWinBinaries
  252. Version 0.3
  253. ~~~~~~~~~~~
  254. - Module works on Mac OS X 10.2. Reported working on OS X 10.6 too.
  255. Version 0.2
  256. ~~~~~~~~~~~
  257. - Added ``prctl()`` call on Linux >= 2.6.9 to update ``/proc/self/status``.
  258. Version 0.1
  259. ~~~~~~~~~~~
  260. - Initial public release.