Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-setproctitle for openSUSE:Factory checked in at 2022-05-12 22:59:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-setproctitle (Old) and /work/SRC/openSUSE:Factory/.python-setproctitle.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-setproctitle" Thu May 12 22:59:42 2022 rev:29 rq:976286 version:1.2.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-setproctitle/python-setproctitle.changes 2021-02-01 13:28:39.618145729 +0100 +++ /work/SRC/openSUSE:Factory/.python-setproctitle.new.1538/python-setproctitle.changes 2022-05-12 23:00:08.328778955 +0200 @@ -1,0 +2,7 @@ +Wed May 11 10:43:10 UTC 2022 - Dirk M??ller <dmuel...@suse.com> + +- update to 1.2.3: + * Added Python 3.10 packages (issue #102). + * Added Wheel packages for macOS (issue #96). + +------------------------------------------------------------------- Old: ---- setproctitle-1.2.2.tar.gz New: ---- setproctitle-1.2.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-setproctitle.spec ++++++ --- /var/tmp/diff_new_pack.FCrZZD/_old 2022-05-12 23:00:08.996779852 +0200 +++ /var/tmp/diff_new_pack.FCrZZD/_new 2022-05-12 23:00:09.000779857 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-setproctitle # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-setproctitle -Version: 1.2.2 +Version: 1.2.3 Release: 0 Summary: Python module to allow customization of the process title License: BSD-3-Clause ++++++ setproctitle-1.2.2.tar.gz -> setproctitle-1.2.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/COPYRIGHT new/setproctitle-1.2.3/COPYRIGHT --- old/setproctitle-1.2.2/COPYRIGHT 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/COPYRIGHT 2022-04-15 01:26:30.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2009-2020, Daniele Varrazzo <daniele.varra...@gmail.com> +Copyright (c) 2009-2021, Daniele Varrazzo <daniele.varra...@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/HISTORY.rst new/setproctitle-1.2.3/HISTORY.rst --- old/setproctitle-1.2.2/HISTORY.rst 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/HISTORY.rst 2022-04-15 01:26:30.000000000 +0200 @@ -1,6 +1,13 @@ Releases history ---------------- +Version 1.2.3 +------------- + +- Added Python 3.10 packages (issue #102). +- Added Wheel packages for macOS (issue #96). + + Version 1.2.2 ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/PKG-INFO new/setproctitle-1.2.3/PKG-INFO --- old/setproctitle-1.2.2/PKG-INFO 2021-01-23 04:21:40.167452800 +0100 +++ new/setproctitle-1.2.3/PKG-INFO 2022-04-15 01:26:31.182628600 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: setproctitle -Version: 1.2.2 +Version: 1.2.3 Summary: A Python module to customize the process title Home-page: https://github.com/dvarrazzo/py-setproctitle Author: Daniele Varrazzo @@ -142,6 +142,13 @@ Releases history ---------------- + Version 1.2.3 + ------------- + + - Added Python 3.10 packages (issue #102). + - Added Wheel packages for macOS (issue #96). + + Version 1.2.2 ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/setproctitle.egg-info/PKG-INFO new/setproctitle-1.2.3/setproctitle.egg-info/PKG-INFO --- old/setproctitle-1.2.2/setproctitle.egg-info/PKG-INFO 2021-01-23 04:21:40.000000000 +0100 +++ new/setproctitle-1.2.3/setproctitle.egg-info/PKG-INFO 2022-04-15 01:26:31.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: setproctitle -Version: 1.2.2 +Version: 1.2.3 Summary: A Python module to customize the process title Home-page: https://github.com/dvarrazzo/py-setproctitle Author: Daniele Varrazzo @@ -142,6 +142,13 @@ Releases history ---------------- + Version 1.2.3 + ------------- + + - Added Python 3.10 packages (issue #102). + - Added Wheel packages for macOS (issue #96). + + Version 1.2.2 ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/setproctitle.egg-info/requires.txt new/setproctitle-1.2.3/setproctitle.egg-info/requires.txt --- old/setproctitle-1.2.2/setproctitle.egg-info/requires.txt 2021-01-23 04:21:40.000000000 +0100 +++ new/setproctitle-1.2.3/setproctitle.egg-info/requires.txt 2022-04-15 01:26:31.000000000 +0200 @@ -1,3 +1,3 @@ [test] -pytest<6.2,>=6.1 +pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/setup.py new/setproctitle-1.2.3/setup.py --- old/setproctitle-1.2.2/setup.py 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/setup.py 2022-04-15 01:26:30.000000000 +0200 @@ -2,7 +2,7 @@ """ setproctitle setup script. -Copyright (c) 2009-2020 Daniele Varrazzo <daniele.varra...@gmail.com> +Copyright (c) 2009-2021 Daniele Varrazzo <daniele.varra...@gmail.com> """ import sys @@ -12,7 +12,7 @@ except ImportError: from distutils.core import setup, Extension -VERSION = "1.2.2" +VERSION = "1.2.3" define_macros = {} define_macros["SPT_VERSION"] = VERSION @@ -94,6 +94,6 @@ python_requires=">=3.6", classifiers=classifiers, ext_modules=[mod_spt], - extras_require={"test": ["pytest>=6.1,<6.2"]}, + extras_require={"test": ["pytest"]}, **kwargs ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/src/c.h new/setproctitle-1.2.3/src/c.h --- old/setproctitle-1.2.2/src/c.h 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/src/c.h 2022-04-15 01:26:30.000000000 +0200 @@ -3,7 +3,7 @@ * c.h * A few fundamental C definitions. * - * Copyright (c) 2009-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2009-2021 Daniele Varrazzo <daniele.varra...@gmail.com> *------------------------------------------------------------------------- */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/src/setproctitle.c new/setproctitle-1.2.3/src/setproctitle.c --- old/setproctitle-1.2.2/src/setproctitle.c 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/src/setproctitle.c 2022-04-15 01:26:30.000000000 +0200 @@ -3,7 +3,7 @@ * setproctitle.c * Python extension module to update and read the process title. * - * Copyright (c) 2009-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2009-2021 Daniele Varrazzo <daniele.varra...@gmail.com> * * The module allows Python code to access the functions get_ps_display() * and set_ps_display(). @@ -137,8 +137,6 @@ "Allow customization of the process title." ; -#ifdef IS_PY3K - static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "setproctitle", @@ -151,22 +149,15 @@ NULL }; -#endif - PyMODINIT_FUNC -INIT_MODULE(setproctitle)(void) +PyInit_setproctitle(void) { PyObject *m, *d; spt_debug("module init"); /* Create the module and add the functions */ -#ifdef IS_PY3K m = PyModule_Create(&moduledef); -#else - m = Py_InitModule3("setproctitle", spt_methods, - setproctitle_module_documentation); -#endif if (m == NULL) { goto exit; } /* Add version string to the module*/ @@ -175,12 +166,6 @@ PyDict_SetItemString(d, "__version__", spt_version); exit: - -#ifdef IS_PY3K return m; -#else - return; -#endif - } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/src/spt.h new/setproctitle-1.2.3/src/spt.h --- old/setproctitle-1.2.2/src/spt.h 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/src/spt.h 2022-04-15 01:26:30.000000000 +0200 @@ -3,7 +3,7 @@ * spt.h * Definitions useful throughout all the extension. * - * Copyright (c) 2010-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2010-2021 Daniele Varrazzo <daniele.varra...@gmail.com> * *------------------------------------------------------------------------- */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/src/spt_debug.c new/setproctitle-1.2.3/src/spt_debug.c --- old/setproctitle-1.2.2/src/spt_debug.c 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/src/spt_debug.c 2022-04-15 01:26:30.000000000 +0200 @@ -3,7 +3,7 @@ * spt_python.c * A simple function for the module debugging. * - * Copyright (c) 2009-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2009-2021 Daniele Varrazzo <daniele.varra...@gmail.com> * * Debug logging is enabled if the environment variable SPT_DEBUG is set to a * non-empty value at runtime. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/src/spt_python.h new/setproctitle-1.2.3/src/spt_python.h --- old/setproctitle-1.2.2/src/spt_python.h 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/src/spt_python.h 2022-04-15 01:26:30.000000000 +0200 @@ -3,7 +3,7 @@ * spt_python.h * Include and customize Python definitions. * - * Copyright (c) 2010-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2010-2021 Daniele Varrazzo <daniele.varra...@gmail.com> * *------------------------------------------------------------------------- */ @@ -12,54 +12,14 @@ #define SPT_PYTHON_H #define PY_SSIZE_T_CLEAN - #include <Python.h> -/* Things change a lot here... */ -#if PY_MAJOR_VERSION >= 3 -#define IS_PY3K -#endif - /* Detect pypy */ #ifdef PYPY_VERSION #define IS_PYPY #endif -/* The type returned by Py_GetArgcArgv */ -#ifdef IS_PY3K -typedef wchar_t argv_t; -#else -typedef char argv_t; -#endif - /* defined in Modules/main.c but not publically declared */ -void Py_GetArgcArgv(int *argc, argv_t ***argv); - -/* Mangle the module name into the name of the module init function */ -#ifdef IS_PY3K -#define INIT_MODULE(m) PyInit_ ## m -#else -#define INIT_MODULE(m) init ## m -#endif - -/* Py2/3 compatibility layer */ - -#ifdef IS_PY3K - -#define PyInt_AsLong PyLong_AsLong - -#define Bytes_Size PyBytes_Size -#define Bytes_AsString PyBytes_AsString - -#else /* Python 2 */ - -#define Bytes_Size PyString_Size -#define Bytes_AsString PyString_AsString - -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -#endif - -#endif /* IS_PY3K > 2 */ +void Py_GetArgcArgv(int *argc, wchar_t ***argv); #endif /* SPT_PYTHON_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/src/spt_setup.c new/setproctitle-1.2.3/src/spt_setup.c --- old/setproctitle-1.2.2/src/spt_setup.c 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/src/spt_setup.c 2022-04-15 01:26:30.000000000 +0200 @@ -3,7 +3,7 @@ * spt_setup.c * Initalization code for the spt_status.c module functions. * - * Copyright (c) 2009-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2009-2021 Daniele Varrazzo <daniele.varra...@gmail.com> * *------------------------------------------------------------------------- */ @@ -70,8 +70,6 @@ } -#ifdef IS_PY3K - /* Return a copy of argv[0] encoded in the default encoding. * * Return a newly allocated buffer to be released with free(). @@ -109,40 +107,6 @@ return rv; } -#else /* !IS_PY3K */ - -/* Return a copy of argv referring to the original arg area. - * - * python -m messes up with arg (issue #8): ensure to have a vector to the - * original args or save_ps_display_args() will stop processing too soon. - * - * Return a buffer allocated with malloc: should be cleaned up with free(). - * - * Return NULL in case of error. If the error shouldn't be ignored, also set - * a Python exception. - */ -static char ** -fix_argv(int argc, char **argv) -{ - char **buf = NULL; - int i; - char *ptr = argv[0]; - - if (!(buf = (char **)malloc(argc * sizeof(char *)))) { - PyErr_NoMemory(); - return NULL; - } - - for (i = 0; i < argc; ++i) { - buf[i] = ptr; - ptr += strlen(ptr) + 1; - } - - return buf; -} - -#endif /* IS_PY3K */ - /* Find the original arg buffer starting from the env position. * @@ -230,8 +194,6 @@ } -#ifdef IS_PY3K - /* Come on, why is this missing?! this is just cruel! * I guess you club seal pups for hobby. */ PyObject * @@ -252,8 +214,6 @@ return rv; } -#endif /* IS_PY3K */ - /* Read the number of arguments and the first argument from /proc/pid/cmdline * * Return 0 if found, else -1. Return arg0 in a malloc'd array. @@ -290,7 +250,7 @@ PyErr_Clear(); goto exit; } - if (-1 == (pid = PyInt_AsLong(pid_py))) { + if (-1 == (pid = PyLong_AsLong(pid_py))) { spt_debug("os.getpid() returned crap?"); /* Don't bother to check PyErr_Occurred as pid can't just be -1. */ goto exit; @@ -327,7 +287,7 @@ char *ccl; Py_ssize_t i; - if (!(ccl = Bytes_AsString(cl))) { + if (!(ccl = PyBytes_AsString(cl))) { spt_debug("failed to get cmdline string"); goto exit; } @@ -339,7 +299,7 @@ spt_debug("got argv[0] = '%s' from /proc", *arg0_o); *argc_o = 0; - for (i = Bytes_Size(cl) - 1; i >= 0; --i) { + for (i = PyBytes_Size(cl) - 1; i >= 0; --i) { if (ccl[i] == '\0') { (*argc_o)++; } } spt_debug("got argc = %d from /proc", *argc_o); @@ -376,7 +336,7 @@ get_argc_argv(int *argc_o, char ***argv_o) { int argc = 0; - argv_t **argv_py = NULL; + wchar_t **argv_py = NULL; char **argv = NULL; char *arg0 = NULL; int rv = -1; @@ -389,19 +349,12 @@ if (argc > 0) { spt_debug("found %d arguments", argc); -#ifdef IS_PY3K if (!(arg0 = get_encoded_arg0(argv_py[0]))) { spt_debug("couldn't get a copy of argv[0]"); goto exit; } -#else - if (!(argv = fix_argv(argc, (char **)argv_py))) { - spt_debug("failed to fix argv"); - goto exit; - } -#endif - /* we got argv: on py2 it points to the right place in memory; on py3 - * we only got a copy of argv[0]: we will use it to look from environ + /* we got argv: on py2 it used to pointsto the right place in memory; on + * py3 we only got a copy of argv[0]: we will use it to look from env */ } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/src/spt_setup.h new/setproctitle-1.2.3/src/spt_setup.h --- old/setproctitle-1.2.2/src/spt_setup.h 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/src/spt_setup.h 2022-04-15 01:26:30.000000000 +0200 @@ -3,7 +3,7 @@ * spt_setup.h * Initalization code for the spt_status.c module functions. * - * Copyright (c) 2009-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2009-2021 Daniele Varrazzo <daniele.varra...@gmail.com> * *------------------------------------------------------------------------- */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/src/spt_status.c new/setproctitle-1.2.3/src/spt_status.c --- old/setproctitle-1.2.2/src/spt_status.c 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/src/spt_status.c 2022-04-15 01:26:30.000000000 +0200 @@ -5,7 +5,7 @@ * Mechanism differs wildly across platforms. * * Copyright (c) 2000-2009, PostgreSQL Global Development Group - * Copyright (c) 2009-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2009-2021 Daniele Varrazzo <daniele.varra...@gmail.com> * various details abducted from various places * * This file was taken from PostgreSQL. The PostgreSQL copyright terms follow. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/tests/pyrun.c new/setproctitle-1.2.3/tests/pyrun.c --- old/setproctitle-1.2.2/tests/pyrun.c 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/tests/pyrun.c 2022-04-15 01:26:30.000000000 +0200 @@ -5,7 +5,7 @@ * * Run a Python program read from stdin. In case of error return 1. * - * Copyright (c) 2011-2020 Daniele Varrazzo <daniele.varra...@gmail.com> + * Copyright (c) 2011-2021 Daniele Varrazzo <daniele.varra...@gmail.com> * *------------------------------------------------------------------------- */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/tests/setproctitle_test.py new/setproctitle-1.2.3/tests/setproctitle_test.py --- old/setproctitle-1.2.2/tests/setproctitle_test.py 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/tests/setproctitle_test.py 2022-04-15 01:26:30.000000000 +0200 @@ -5,7 +5,7 @@ The tests are executed in external processes: setproctitle should never be imported directly from here. -Copyright (c) 2009-2020 Daniele Varrazzo <daniele.varra...@gmail.com> +Copyright (c) 2009-2021 Daniele Varrazzo <daniele.varra...@gmail.com> """ import os @@ -18,11 +18,28 @@ from .conftest import run_script -IS_PYPY = "__pypy__" in sys.builtin_module_names +skip_if_win32 = pytest.mark.skipif( + "sys.platform == 'win32'", + reason="skipping Posix tests on Windows") + +skip_if_macos = pytest.mark.skipif( + "sys.platform == 'darwin'", + reason="skipping test on macOS") + +skip_if_pypy = pytest.mark.skipif( + "'__pypy__' in sys.builtin_module_names", + reason="skipping test on pypy") + +skip_if_no_proc_env = pytest.mark.skipif( + "not os.path.exists('/proc/self/environ')", + reason="'/proc/self/environ' not available" +) + +skip_if_no_proc_cmdline = pytest.mark.skipif( + "not os.path.exists('/proc/%s/cmdline' % os.getpid())", + reason="'/proc/PID/cmdline' not available") -if sys.platform == 'win32': - pytest.skip("skipping Posix tests on Windows", - allow_module_level=True) +pytestmark = [skip_if_win32] def test_runner(): @@ -59,6 +76,9 @@ assert before == after +@pytest.mark.skipif( + 'sys.platform == "darwin" and os.environ.get("CIBW_TEST_COMMAND")', + reason="f*cked up binary name") def test_init_getproctitle(): """getproctitle() returns a sensible value at initial call.""" rv = run_script( @@ -343,13 +363,12 @@ @pytest.mark.embedded -@pytest.mark.skipif(IS_PYPY, reason="skip test, pypy") +@skip_if_pypy +@skip_if_macos +@skip_if_no_proc_cmdline def test_embedded(pyrun, spt_directory): """Check the module works with embedded Python. """ - if not os.path.exists("/proc/%s/cmdline" % os.getpid()): - pytest.skip("known failure: '/proc/PID/cmdline' not available") - rv = run_script( f""" import sys @@ -372,12 +391,11 @@ @pytest.mark.embedded -@pytest.mark.skipif(IS_PYPY, reason="skip test, pypy") +@skip_if_pypy +@skip_if_macos +@skip_if_no_proc_cmdline def test_embedded_many_args(pyrun, spt_directory): """Check more complex cmdlines are handled in embedded env too.""" - if not os.path.exists("/proc/%s/cmdline" % os.getpid()): - pytest.skip("known failure: '/proc/PID/cmdline' not available") - rv = run_script( f""" import sys @@ -400,11 +418,9 @@ assert title == "Hello, embedded!" +@skip_if_no_proc_env def test_noenv(): """Check that SPT_NOENV avoids clobbering environ.""" - if not os.path.exists("/proc/self/environ"): - pytest.skip("'/proc/self/environ' not available") - env = os.environ.copy() env["SPT_TESTENV"] = "testenv" rv = run_script( @@ -439,6 +455,7 @@ ), "title (len {title_len}) not limited to argv (len {cmdline_len})" +@skip_if_no_proc_env def test_large_env(monkeypatch): """Check that large environment doesn't get clobbered. """ @@ -475,7 +492,7 @@ def test_clear_segfault(): - rv = run_script( + run_script( r"""\ import os from setproctitle import setproctitle diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/tests/setthreadtitle_test.py new/setproctitle-1.2.3/tests/setthreadtitle_test.py --- old/setproctitle-1.2.2/tests/setthreadtitle_test.py 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/tests/setthreadtitle_test.py 2022-04-15 01:26:30.000000000 +0200 @@ -1,18 +1,22 @@ -import os +import os # noqa +import sys # noqa + import pytest -import sys from .conftest import run_script -if sys.platform == 'win32': - pytest.skip("skipping Posix tests on Windows", - allow_module_level=True) +skip_if_win32 = pytest.mark.skipif( + "sys.platform == 'win32'", + reason="skipping Posix tests on Windows") + +skip_if_no_proc_tasks = pytest.mark.skipif( + "not os.path.exists('/proc/self/task')", + reason="'/proc/self/task' not available") +pytestmark = [skip_if_win32, skip_if_no_proc_tasks] -def test_thread_title_unchanged(): - if not os.path.isdir("/proc/self/task/"): - pytest.skip("no task dir") +def test_thread_title_unchanged(): rv = run_script( """ from glob import glob @@ -36,10 +40,7 @@ def test_set_thread_title(): - if not os.path.isdir("/proc/self/task/"): - pytest.skip("no task dir") - - rv = run_script( + run_script( """ from glob import glob import setproctitle @@ -53,10 +54,7 @@ def test_set_threads_title(): - if not os.path.isdir("/proc/self/task/"): - pytest.skip("no task dir") - - rv = run_script( + run_script( """ import time import threading diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setproctitle-1.2.2/tests/test_win32.py new/setproctitle-1.2.3/tests/test_win32.py --- old/setproctitle-1.2.2/tests/test_win32.py 2021-01-23 04:21:39.000000000 +0100 +++ new/setproctitle-1.2.3/tests/test_win32.py 2022-04-15 01:26:30.000000000 +0200 @@ -1,10 +1,12 @@ import pytest import setproctitle -import sys +import sys # noqa -if sys.platform != 'win32': - pytest.skip("skipping Windows tests", - allow_module_level=True) +skip_if_not_win32 = pytest.mark.skipif( + "sys.platform != 'win32'", + reason="Windows only test") + +pytestmark = [skip_if_not_win32] def test_setproctitle(): @@ -12,6 +14,7 @@ setproctitle.setproctitle(title) assert title == setproctitle.getproctitle() + def test_setthreadtitle(): title = "setproctitle_test" # This is currently a no-op on Windows. Let's make sure