Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pytest-forked for openSUSE:Factory checked in at 2023-01-06 17:04:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest-forked (Old) and /work/SRC/openSUSE:Factory/.python-pytest-forked.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-forked" Fri Jan 6 17:04:28 2023 rev:7 rq:1039064 version:1.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest-forked/python-pytest-forked.changes 2020-08-25 12:40:52.929438385 +0200 +++ /work/SRC/openSUSE:Factory/.python-pytest-forked.new.1563/python-pytest-forked.changes 2023-01-06 17:04:55.235967370 +0100 @@ -1,0 +2,10 @@ +Wed Nov 30 08:45:20 UTC 2022 - Daniel Garcia <daniel.gar...@suse.com> + +- Remove python_module macro definition +- Add python-py dep +- More specific python_sitelib in %files +- Update to 1.4.0: + * Dropped support for Python 2.7 and 3.5. + * Added official support for Python 3.10. + +------------------------------------------------------------------- Old: ---- pytest-forked-1.3.0.tar.gz New: ---- pytest-forked-1.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest-forked.spec ++++++ --- /var/tmp/diff_new_pack.HgdLAz/_old 2023-01-06 17:04:55.783970447 +0100 +++ /var/tmp/diff_new_pack.HgdLAz/_new 2023-01-06 17:04:55.787970469 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-pytest-forked # -# Copyright (c) 2020 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 @@ -16,19 +16,20 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-forked -Version: 1.3.0 +Version: 1.4.0 Release: 0 Summary: Run each test in a forked subprocess License: MIT URL: https://github.com/pytest-dev/pytest-forked Source: https://files.pythonhosted.org/packages/source/p/pytest-forked/pytest-forked-%{version}.tar.gz BuildRequires: %{python_module pytest >= 3.10} +BuildRequires: %{python_module py} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-py Requires: python-pytest >= 3.10 BuildArch: noarch %python_subpackages @@ -47,11 +48,13 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pytest +# Disable broken tests gh#pytest-dev/pytest-forked#67 +%pytest -k "not (test_xfail or test_functional_boxed_capturing[sys] or test_functional_boxed_capturing[fd])" %files %{python_files} %license LICENSE -%doc README.rst CHANGELOG -%{python_sitelib}/* +%doc README.rst CHANGELOG.rst +%{python_sitelib}/pytest_forked +%{python_sitelib}/pytest_forked-%{version}*-info %changelog ++++++ pytest-forked-1.3.0.tar.gz -> pytest-forked-1.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/.github/workflows/main.yml new/pytest-forked-1.4.0/.github/workflows/main.yml --- old/pytest-forked-1.3.0/.github/workflows/main.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-forked-1.4.0/.github/workflows/main.yml 2021-12-10 16:43:01.000000000 +0100 @@ -0,0 +1,65 @@ +name: build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + python: ["3.6", "3.7", "3.8", "3.9", "3.10"] + include: + - python: "3.6" + tox_env: "py36" + - python: "3.7" + tox_env: "py37" + - python: "3.8" + tox_env: "py38" + - python: "3.9" + tox_env: "py39" + - python: "3.10" + tox_env: "py310" + + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python }} + - name: Install tox + run: | + python -m pip install --upgrade pip + pip install tox + - name: Test + run: | + tox -e ${{ matrix.tox_env }} + + deploy: + + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + + runs-on: ubuntu-latest + + needs: build + + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: "3.9" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: | + python -m build + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_token }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/.pre-commit-config.yaml new/pytest-forked-1.4.0/.pre-commit-config.yaml --- old/pytest-forked-1.3.0/.pre-commit-config.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-forked-1.4.0/.pre-commit-config.yaml 2021-12-10 16:43:01.000000000 +0100 @@ -0,0 +1,29 @@ +repos: + - repo: https://github.com/asottile/pyupgrade + rev: v2.29.1 + hooks: + - id: pyupgrade + args: [--py36-plus] + - repo: https://github.com/psf/black + rev: 21.9b0 + hooks: + - id: black + args: [--safe, --quiet] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - repo: local + hooks: + - id: rst + name: rst + entry: rst-lint --encoding utf-8 + files: ^(CHANGELOG|README.rst)$ + language: python + additional_dependencies: [pygments, restructuredtext_lint] + - repo: https://github.com/asottile/reorder_python_imports + rev: v2.6.0 + hooks: + - id: reorder-python-imports + args: ['--application-directories=.:src'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/.travis.yml new/pytest-forked-1.4.0/.travis.yml --- old/pytest-forked-1.3.0/.travis.yml 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,61 +0,0 @@ -language: python -python: -- '3.8' -- '2.7' -- '3.7' -- '3.6' -- '3.5' -cache: pip -install: pip install -U tox setuptools_scm -env: - matrix: - - TOXENV=py-pytest310 - - TOXENV=py-pytest46 - - TOXENV=py-pytest54 - - TOXENV=py-pytest60 - - TOXENV=py-pytestlatest - - TOXENV=py-pytestmaster -matrix: - exclude: - - python: '2.7' # pytest 5+ does not support Python 2 - env: TOXENV=py-pytest54 - - python: '2.7' # pytest 5+ does not support Python 2 - env: TOXENV=py-pytest60 - - python: '2.7' # pytest 5+ does not support Python 2 - env: TOXENV=py-pytestmaster - - python: '2.7' # Same as pytest54 for Python 2 - env: TOXENV=py-pytestlatest - include: - - python: '3.8' - env: TOXENV=flakes - - stage: Release - name: Build and verify dists (and publish if tagged) - python: '3.8' - env: - TOXENV: build-dists,metadata-validation - - # piggyback on existing build for releases - before_deploy: - # make setup.py no-op because tox has already produced verified dists: - - echo > setup.py - deploy: - provider: pypi - user: nicoddemus - password: - secure: KJgDEXYiKYNiV1Ef0kCYrJr3LvIUrZbEnwc/x5eTXpLHZCLmiJ33tbYDRLzX+uWcvqXpFjVjEtWHOOfhP9sRPl4jbmM0MJrNmO4mqTSCzN1VnVx9fPJXpD74rtjLxMsZNrHjqEWWjeqsqDryGID7O3zm0f/p/FqKEYKBCffhc2AyJN4Bb1d564JLwM1dZUPGAWU5spkDB/0gSvTGtQ1gxl5xtEAwMX59gWzwJ96kj5qKGPBXdQLWPkhXz45/5XQUdxjwJjyRJws5EoCzOD+E/C+Tcc3NKCkksZUGejt7cBpU+rFpqzGSUDv5KBsQoXELElC2yXxFJhqrfoTFkxZqFc4qSvnYRlOlx9M2FPsUqnOwS5RlEgGmadjN4CJe0mlxS+/Yx1V1aDSnaFFCWLsApMDbKgoozB6NPQvSraOvRF28J7CsTSFCvbI1dR1lEYhZVc5XTwt0mI/0w4iXkvGNMJ0Sb0grqj7rPEPiuf1RU/Y9CNtR/yhez02zbYjIzgERUB6Sq3YGg1q2cefkvoiq3eWWV4vf8e1rXVdvs/UdJnj8zTwMbiaWh13CCu+Z8bTEKgaiUAOaTs0y1mxPg4dRGJdVCPceUn3pMeeTl2XBxWr9CkMhDY06IMLd2PmyYfVYIWUkssT235ALZ5kPdk1TmiqmtbKyd+pAga1IWtFbOCY= - on: - tags: true - repo: pytest-dev/pytest-forked - # keep the dists generated by tox: - skip-cleanup: true - -script: tox -notifications: - irc: - channels: - - chat.freenode.net#pytest - on_success: change - on_failure: change - skip_join: true - email: - - pytest-com...@python.org diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/CHANGELOG new/pytest-forked-1.4.0/CHANGELOG --- old/pytest-forked-1.3.0/CHANGELOG 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/CHANGELOG 1970-01-01 01:00:00.000000000 +0100 @@ -1,48 +0,0 @@ -v1.3.0 -====== - -* Add support for pytest 6 (issue #45 / PR #46) -* Replace `@pytest.mark.tryfirst` with newer `@pytest.hookimpl` (PR #46) -* Invoke `pytest_runtest_logstart` and `pytest_runtest_logfinish` hooks in `runtest_protocol` (issue #31 / PR #46) - -v1.2.0 -====== - -* Add limited support for xfail marker (issue #33 / PR #34). -* Fix support for pytest 5.4.0+ (issue #30 / PR #32). -* Drop support for Python 3.4 as it is EOL (PR #39). - -v1.1.3 -====== - -* Another dummy release to sort out missing wheels (hopefully). - -v1.1.2 -====== - -* Another dummy release to sort out missing wheels (hopefully). - -v1.1.1 -====== - -* Dummy release to sort out CI issues. - -v1.1.0 -====== - -* New marker `pytest.mark.forked` to fork before individual tests. - -v1.0.2 -====== - -* Fix support for pytest 4.2. - -v1.0.1 -====== - -* Fix support for pytest 4.1. - -v1.0 -===== - -* just a takeout of pytest-xdist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/CHANGELOG.rst new/pytest-forked-1.4.0/CHANGELOG.rst --- old/pytest-forked-1.3.0/CHANGELOG.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-forked-1.4.0/CHANGELOG.rst 2021-12-10 16:43:01.000000000 +0100 @@ -0,0 +1,54 @@ +v1.4.0 +====== + +* Dropped support for Python 2.7 and 3.5. +* Added official support for Python 3.10. + +v1.3.0 +====== + +* Add support for pytest 6 (issue #45 / PR #46) +* Replace `@pytest.mark.tryfirst` with newer `@pytest.hookimpl` (PR #46) +* Invoke `pytest_runtest_logstart` and `pytest_runtest_logfinish` hooks in `runtest_protocol` (issue #31 / PR #46) + +v1.2.0 +====== + +* Add limited support for xfail marker (issue #33 / PR #34). +* Fix support for pytest 5.4.0+ (issue #30 / PR #32). +* Drop support for Python 3.4 as it is EOL (PR #39). + +v1.1.3 +====== + +* Another dummy release to sort out missing wheels (hopefully). + +v1.1.2 +====== + +* Another dummy release to sort out missing wheels (hopefully). + +v1.1.1 +====== + +* Dummy release to sort out CI issues. + +v1.1.0 +====== + +* New marker `pytest.mark.forked` to fork before individual tests. + +v1.0.2 +====== + +* Fix support for pytest 4.2. + +v1.0.1 +====== + +* Fix support for pytest 4.1. + +v1.0 +===== + +* just a takeout of pytest-xdist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/LICENSE new/pytest-forked-1.4.0/LICENSE --- old/pytest-forked-1.3.0/LICENSE 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/LICENSE 2021-12-10 16:43:01.000000000 +0100 @@ -5,10 +5,10 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -16,4 +16,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/MANIFEST.in new/pytest-forked-1.4.0/MANIFEST.in --- old/pytest-forked-1.3.0/MANIFEST.in 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -include CHANGELOG -include LICENSE -include pyproject.toml -include README.txt -include setup.py -include tox.ini -graft testing -prune .git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/PKG-INFO new/pytest-forked-1.4.0/PKG-INFO --- old/pytest-forked-1.3.0/PKG-INFO 2020-07-27 21:49:41.340860100 +0200 +++ new/pytest-forked-1.4.0/PKG-INFO 2021-12-10 16:43:10.957741500 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pytest-forked -Version: 1.3.0 +Version: 1.4.0 Summary: run tests in isolated forked subprocesses Home-page: https://github.com/pytest-dev/pytest-forked Author: pytest-dev @@ -22,6 +22,22 @@ * ``--forked``: run each test in a forked subprocess to survive ``SEGFAULTS`` or otherwise dying processes. + |python| |version| |ci| |pre-commit| |black| + + .. |version| image:: http://img.shields.io/pypi/v/pytest-forked.svg + :target: https://pypi.python.org/pypi/pytest-forked + + .. |ci| image:: https://github.com/pytest-dev/pytest-forked/workflows/build/badge.svg + :target: https://github.com/pytest-dev/pytest-forked/actions + + .. |python| image:: https://img.shields.io/pypi/pyversions/pytest-forked.svg + :target: https://pypi.python.org/pypi/pytest-forked/ + + .. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/ambv/black + + .. |pre-commit| image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest-forked/master.svg + :target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest-forked/master Installation ----------------------- @@ -80,12 +96,12 @@ Classifier: Topic :: Software Development :: Quality Assurance Classifier: Topic :: Utilities Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 -Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3 :: Only +Requires-Python: >=3.6 Description-Content-Type: text/x-rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/README.rst new/pytest-forked-1.4.0/README.rst --- old/pytest-forked-1.3.0/README.rst 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/README.rst 2021-12-10 16:43:01.000000000 +0100 @@ -14,6 +14,22 @@ * ``--forked``: run each test in a forked subprocess to survive ``SEGFAULTS`` or otherwise dying processes. +|python| |version| |ci| |pre-commit| |black| + +.. |version| image:: http://img.shields.io/pypi/v/pytest-forked.svg + :target: https://pypi.python.org/pypi/pytest-forked + +.. |ci| image:: https://github.com/pytest-dev/pytest-forked/workflows/build/badge.svg + :target: https://github.com/pytest-dev/pytest-forked/actions + +.. |python| image:: https://img.shields.io/pypi/pyversions/pytest-forked.svg + :target: https://pypi.python.org/pypi/pytest-forked/ + +.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/ambv/black + +.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest-forked/master.svg + :target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest-forked/master Installation ----------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/RELEASING.rst new/pytest-forked-1.4.0/RELEASING.rst --- old/pytest-forked-1.3.0/RELEASING.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-forked-1.4.0/RELEASING.rst 2021-12-10 16:43:01.000000000 +0100 @@ -0,0 +1,7 @@ +Here are the steps on how to make a new release. + +1. Create a ``release-VERSION`` branch from ``upstream/master``. +2. Update ``CHANGELOG.rst``. +3. Push a branch with the changes. +4. Once all builds pass, push a tag to ``upstream``. +5. Merge the PR. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/example/boxed.txt new/pytest-forked-1.4.0/example/boxed.txt --- old/pytest-forked-1.3.0/example/boxed.txt 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/example/boxed.txt 2021-12-10 16:43:01.000000000 +0100 @@ -14,7 +14,7 @@ @pytest.mark.parametrize("arg", range(50)) def test_func(arg): time.sleep(0.05) # each tests takes a while - if arg % 19 == 0: + if arg % 19 == 0: os.kill(os.getpid(), 15) If you run this with:: @@ -24,9 +24,9 @@ platform linux2 -- Python 2.7.3 -- pytest-2.3.0.dev8 plugins: xdist, bugzilla, cache, oejskit, cli, pep8, cov collecting ... collected 50 items - + test_module.py f..................f..................f........... - + ================================= FAILURES ================================= _______________________________ test_func[0] _______________________________ /home/hpk/tmp/doc-exec-420/test_module.py:6: running the test CRASHED with signal 15 @@ -46,7 +46,7 @@ plugins: xdist, bugzilla, cache, oejskit, cli, pep8, cov gw0 I / gw1 I / gw2 I gw0 [50] / gw1 [50] / gw2 [50] - + scheduling tests via LoadScheduling ..f...............f..................f............ ================================= FAILURES ================================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/setup.cfg new/pytest-forked-1.4.0/setup.cfg --- old/pytest-forked-1.3.0/setup.cfg 2020-07-27 21:49:41.340860100 +0200 +++ new/pytest-forked-1.4.0/setup.cfg 2021-12-10 16:43:10.957741500 +0100 @@ -1,6 +1,3 @@ -[bdist_wheel] -universal = 1 - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/setup.py new/pytest-forked-1.4.0/setup.py --- old/pytest-forked-1.3.0/setup.py 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/setup.py 2021-12-10 16:43:01.000000000 +0100 @@ -3,42 +3,42 @@ setup( name="pytest-forked", use_scm_version=True, - description='run tests in isolated forked subprocesses', - long_description=open('README.rst').read(), - long_description_content_type='text/x-rst', - license='MIT', - author='pytest-dev', - author_email='pytest-...@python.org', - url='https://github.com/pytest-dev/pytest-forked', - platforms=['linux', 'osx'], - packages=['pytest_forked'], - package_dir={'': 'src'}, + description="run tests in isolated forked subprocesses", + long_description=open("README.rst").read(), + long_description_content_type="text/x-rst", + license="MIT", + author="pytest-dev", + author_email="pytest-...@python.org", + url="https://github.com/pytest-dev/pytest-forked", + platforms=["linux", "osx"], + packages=["pytest_forked"], + package_dir={"": "src"}, entry_points={ - 'pytest11': [ - 'pytest_forked = pytest_forked', + "pytest11": [ + "pytest_forked = pytest_forked", ], }, zip_safe=False, - install_requires=['py', 'pytest>=3.10'], - setup_requires=['setuptools_scm'], - python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', + install_requires=["py", "pytest>=3.10"], + setup_requires=["setuptools_scm"], + python_requires=">=3.6", classifiers=[ - 'Development Status :: 7 - Inactive', - 'Framework :: Pytest', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Operating System :: POSIX', - 'Operating System :: MacOS :: MacOS X', - 'Topic :: Software Development :: Testing', - 'Topic :: Software Development :: Quality Assurance', - 'Topic :: Utilities', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', + "Development Status :: 7 - Inactive", + "Framework :: Pytest", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX", + "Operating System :: MacOS :: MacOS X", + "Topic :: Software Development :: Testing", + "Topic :: Software Development :: Quality Assurance", + "Topic :: Utilities", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3 :: Only", ], ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/src/pytest_forked/__init__.py new/pytest-forked-1.4.0/src/pytest_forked/__init__.py --- old/pytest-forked-1.3.0/src/pytest_forked/__init__.py 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/src/pytest_forked/__init__.py 2021-12-10 16:43:01.000000000 +0100 @@ -2,19 +2,21 @@ import warnings import py -# we know this bit is bad, but we cant help it with the current pytest setup -from _pytest import runner import pytest +from _pytest import runner + +# we know this bit is bad, but we cant help it with the current pytest setup # copied from xdist remote def serialize_report(rep): import py + d = rep.__dict__.copy() - if hasattr(rep.longrepr, 'toterminal'): - d['longrepr'] = str(rep.longrepr) + if hasattr(rep.longrepr, "toterminal"): + d["longrepr"] = str(rep.longrepr) else: - d['longrepr'] = rep.longrepr + d["longrepr"] = rep.longrepr for name in d: if isinstance(d[name], py.path.local): d[name] = str(d[name]) @@ -26,9 +28,12 @@ def pytest_addoption(parser): group = parser.getgroup("forked", "forked subprocess test execution") group.addoption( - '--forked', - action="store_true", dest="forked", default=False, - help="box each test run in a separate process (unix)") + "--forked", + action="store_true", + dest="forked", + default=False, + help="box each test run in a separate process (unix)", + ) def pytest_load_initial_conftests(early_config, parser, args): @@ -54,6 +59,7 @@ # for now, we run setup/teardown in the subprocess # XXX optionally allow sharing of setup/teardown from _pytest.runner import runtestprotocol + EXITSTATUS_TESTEXIT = 4 import marshal @@ -71,22 +77,27 @@ return [runner.TestReport(**x) for x in report_dumps] else: if result.exitstatus == EXITSTATUS_TESTEXIT: - pytest.exit("forked test item %s raised Exit" % (item,)) + pytest.exit(f"forked test item {item} raised Exit") return [report_process_crash(item, result)] def report_process_crash(item, result): from _pytest._code import getfslineno + path, lineno = getfslineno(item) - info = ("%s:%s: running the test CRASHED with signal %d" % - (path, lineno, result.signal)) + info = "%s:%s: running the test CRASHED with signal %d" % ( + path, + lineno, + result.signal, + ) from _pytest import runner + # pytest >= 4.1 has_from_call = getattr(runner.CallInfo, "from_call", None) is not None if has_from_call: - call = runner.CallInfo.from_call(lambda: 0/0, "???") + call = runner.CallInfo.from_call(lambda: 0 / 0, "???") else: - call = runner.CallInfo(lambda: 0/0, "???") + call = runner.CallInfo(lambda: 0 / 0, "???") call.excinfo = info rep = runner.pytest_runtest_makereport(item, call) if result.out: @@ -94,22 +105,21 @@ if result.err: rep.sections.append(("captured stderr", result.err)) - xfail_marker = item.get_closest_marker('xfail') + xfail_marker = item.get_closest_marker("xfail") if not xfail_marker: return rep rep.outcome = "skipped" rep.wasxfail = ( "reason: {xfail_reason}; " - "pytest-forked reason: {crash_info}". - format( - xfail_reason=xfail_marker.kwargs['reason'], + "pytest-forked reason: {crash_info}".format( + xfail_reason=xfail_marker.kwargs["reason"], crash_info=info, ) ) warnings.warn( - 'pytest-forked xfail support is incomplete at the moment and may ' - 'output a misleading reason message', + "pytest-forked xfail support is incomplete at the moment and may " + "output a misleading reason message", RuntimeWarning, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/src/pytest_forked.egg-info/PKG-INFO new/pytest-forked-1.4.0/src/pytest_forked.egg-info/PKG-INFO --- old/pytest-forked-1.3.0/src/pytest_forked.egg-info/PKG-INFO 2020-07-27 21:49:41.000000000 +0200 +++ new/pytest-forked-1.4.0/src/pytest_forked.egg-info/PKG-INFO 2021-12-10 16:43:10.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pytest-forked -Version: 1.3.0 +Version: 1.4.0 Summary: run tests in isolated forked subprocesses Home-page: https://github.com/pytest-dev/pytest-forked Author: pytest-dev @@ -22,6 +22,22 @@ * ``--forked``: run each test in a forked subprocess to survive ``SEGFAULTS`` or otherwise dying processes. + |python| |version| |ci| |pre-commit| |black| + + .. |version| image:: http://img.shields.io/pypi/v/pytest-forked.svg + :target: https://pypi.python.org/pypi/pytest-forked + + .. |ci| image:: https://github.com/pytest-dev/pytest-forked/workflows/build/badge.svg + :target: https://github.com/pytest-dev/pytest-forked/actions + + .. |python| image:: https://img.shields.io/pypi/pyversions/pytest-forked.svg + :target: https://pypi.python.org/pypi/pytest-forked/ + + .. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/ambv/black + + .. |pre-commit| image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest-forked/master.svg + :target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest-forked/master Installation ----------------------- @@ -80,12 +96,12 @@ Classifier: Topic :: Software Development :: Quality Assurance Classifier: Topic :: Utilities Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 -Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3 :: Only +Requires-Python: >=3.6 Description-Content-Type: text/x-rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/src/pytest_forked.egg-info/SOURCES.txt new/pytest-forked-1.4.0/src/pytest_forked.egg-info/SOURCES.txt --- old/pytest-forked-1.3.0/src/pytest_forked.egg-info/SOURCES.txt 2020-07-27 21:49:41.000000000 +0200 +++ new/pytest-forked-1.4.0/src/pytest_forked.egg-info/SOURCES.txt 2021-12-10 16:43:10.000000000 +0100 @@ -1,13 +1,13 @@ .gitignore -.travis.yml -CHANGELOG +.pre-commit-config.yaml +CHANGELOG.rst LICENSE -MANIFEST.in README.rst +RELEASING.rst pyproject.toml -setup.cfg setup.py tox.ini +.github/workflows/main.yml example/boxed.txt src/pytest_forked/__init__.py src/pytest_forked.egg-info/PKG-INFO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/testing/conftest.py new/pytest-forked-1.4.0/testing/conftest.py --- old/pytest-forked-1.3.0/testing/conftest.py 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/testing/conftest.py 2021-12-10 16:43:01.000000000 +0100 @@ -7,6 +7,7 @@ @pytest.fixture(autouse=True) def _divert_atexit(request, monkeypatch): import atexit + atexit_fns = [] def atexit_register(func, *args, **kwargs): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/testing/test_boxed.py new/pytest-forked-1.4.0/testing/test_boxed.py --- old/pytest-forked-1.3.0/testing/test_boxed.py 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/testing/test_boxed.py 2021-12-10 16:43:01.000000000 +0100 @@ -1,64 +1,70 @@ -import pytest import os -needsfork = pytest.mark.skipif(not hasattr(os, "fork"), - reason="os.fork required") +import pytest + +needsfork = pytest.mark.skipif(not hasattr(os, "fork"), reason="os.fork required") @needsfork def test_functional_boxed(testdir): - p1 = testdir.makepyfile(""" + p1 = testdir.makepyfile( + """ import os def test_function(): os.kill(os.getpid(), 15) - """) + """ + ) result = testdir.runpytest(p1, "--forked") - result.stdout.fnmatch_lines([ - "*CRASHED*", - "*1 failed*" - ]) + result.stdout.fnmatch_lines(["*CRASHED*", "*1 failed*"]) @needsfork def test_functional_boxed_per_test(testdir): - p1 = testdir.makepyfile(""" + p1 = testdir.makepyfile( + """ import os import pytest @pytest.mark.forked def test_function(): os.kill(os.getpid(), 15) - """) + """ + ) result = testdir.runpytest(p1) - result.stdout.fnmatch_lines([ - "*CRASHED*", - "*1 failed*" - ]) + result.stdout.fnmatch_lines(["*CRASHED*", "*1 failed*"]) @needsfork -@pytest.mark.parametrize("capmode", [ - "no", - pytest.param("sys", marks=pytest.mark.xfail(reason="capture cleanup needed")), - pytest.param("fd", marks=pytest.mark.xfail(reason="capture cleanup needed"))]) +@pytest.mark.parametrize( + "capmode", + [ + "no", + pytest.param("sys", marks=pytest.mark.xfail(reason="capture cleanup needed")), + pytest.param("fd", marks=pytest.mark.xfail(reason="capture cleanup needed")), + ], +) def test_functional_boxed_capturing(testdir, capmode): - p1 = testdir.makepyfile(""" + p1 = testdir.makepyfile( + """ import os import sys def test_function(): sys.stdout.write("hello\\n") sys.stderr.write("world\\n") os.kill(os.getpid(), 15) - """) + """ + ) result = testdir.runpytest(p1, "--forked", "--capture=%s" % capmode) - result.stdout.fnmatch_lines(""" + result.stdout.fnmatch_lines( + """ *CRASHED* *stdout* hello *stderr* world *1 failed* -""") +""" + ) def test_is_not_boxed_by_default(testdir): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/testing/test_xfail_behavior.py new/pytest-forked-1.4.0/testing/test_xfail_behavior.py --- old/pytest-forked-1.3.0/testing/test_xfail_behavior.py 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/testing/test_xfail_behavior.py 2021-12-10 16:43:01.000000000 +0100 @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Tests for xfail support.""" import os import signal @@ -6,21 +5,21 @@ import pytest IS_PYTEST4_PLUS = int(pytest.__version__[0]) >= 4 # noqa: WPS609 -FAILED_WORD = 'FAILED' if IS_PYTEST4_PLUS else 'FAIL' +FAILED_WORD = "FAILED" if IS_PYTEST4_PLUS else "FAIL" pytestmark = pytest.mark.skipif( # pylint: disable=invalid-name - not hasattr(os, 'fork'), # noqa: WPS421 - reason='os.fork required', + not hasattr(os, "fork"), # noqa: WPS421 + reason="os.fork required", ) @pytest.mark.parametrize( - ('is_crashing', 'is_strict'), + ("is_crashing", "is_strict"), ( - pytest.param(True, True, id='strict xfail'), - pytest.param(False, True, id='strict xpass'), - pytest.param(True, False, id='non-strict xfail'), - pytest.param(False, False, id='non-strict xpass'), + pytest.param(True, True, id="strict xfail"), + pytest.param(False, True, id="strict xpass"), + pytest.param(True, False, id="non-strict xfail"), + pytest.param(False, False, id="non-strict xpass"), ), ) def test_xfail(is_crashing, is_strict, testdir): @@ -29,54 +28,52 @@ sig_num = signal.SIGTERM.numerator test_func_body = ( - 'os.kill(os.getpid(), signal.SIGTERM)' - if is_crashing - else 'assert True' + "os.kill(os.getpid(), signal.SIGTERM)" if is_crashing else "assert True" ) if is_crashing: # marked xfailed and crashing, no matter strict or not - expected_letter = 'x' # XFAILED - expected_lowercase = 'xfailed' - expected_word = 'XFAIL' + expected_letter = "x" # XFAILED + expected_lowercase = "xfailed" + expected_word = "XFAIL" elif is_strict: # strict and not failing as expected should cause failure - expected_letter = 'F' # FAILED - expected_lowercase = 'failed' + expected_letter = "F" # FAILED + expected_lowercase = "failed" expected_word = FAILED_WORD elif not is_strict: # non-strict and not failing as expected should cause xpass - expected_letter = 'X' # XPASS - expected_lowercase = 'xpassed' - expected_word = 'XPASS' - - session_start_title = '*==== test session starts ====*' - loaded_pytest_plugins = 'plugins: forked*' - collected_tests_num = 'collected 1 item' - expected_progress = 'test_xfail.py {expected_letter!s}*'.format(**locals()) - failures_title = '*==== FAILURES ====*' - failures_test_name = '*____ test_function ____*' - failures_test_reason = '[XPASS(strict)] The process gets terminated' - short_test_summary_title = '*==== short test summary info ====*' - short_test_summary = ( - '{expected_word!s} test_xfail.py::test_function'. - format(**locals()) + expected_letter = "X" # XPASS + expected_lowercase = "xpassed" + expected_word = "XPASS" + + session_start_title = "*==== test session starts ====*" + loaded_pytest_plugins = "plugins: forked*" + collected_tests_num = "collected 1 item" + expected_progress = "test_xfail.py {expected_letter!s}*".format(**locals()) + failures_title = "*==== FAILURES ====*" + failures_test_name = "*____ test_function ____*" + failures_test_reason = "[XPASS(strict)] The process gets terminated" + short_test_summary_title = "*==== short test summary info ====*" + short_test_summary = "{expected_word!s} test_xfail.py::test_function".format( + **locals() ) - if expected_lowercase == 'xpassed': + if expected_lowercase == "xpassed": # XPASS wouldn't have the crash message from # pytest-forked because the crash doesn't happen - short_test_summary = ' '.join(( - short_test_summary, 'The process gets terminated', - )) + short_test_summary = " ".join( + ( + short_test_summary, + "The process gets terminated", + ) + ) reason_string = ( - ' reason: The process gets terminated; ' - 'pytest-forked reason: ' - '*:*: running the test CRASHED with signal {sig_num:d}'. - format(**locals()) - ) - total_summary_line = ( - '*==== 1 {expected_lowercase!s} in 0.*s* ====*'. - format(**locals()) + " reason: The process gets terminated; " + "pytest-forked reason: " + "*:*: running the test CRASHED with signal {sig_num:d}".format(**locals()) + ) + total_summary_line = "*==== 1 {expected_lowercase!s} in 0.*s* ====*".format( + **locals() ) expected_lines = ( @@ -96,17 +93,13 @@ short_test_summary_title, short_test_summary, ) - if expected_lowercase == 'xpassed' and expected_word == FAILED_WORD: + if expected_lowercase == "xpassed" and expected_word == FAILED_WORD: # XPASS(strict) - expected_lines += ( - reason_string, - ) - expected_lines += ( - total_summary_line, - ) + expected_lines += (reason_string,) + expected_lines += (total_summary_line,) test_module = testdir.makepyfile( - """ + f""" import os import signal @@ -122,9 +115,8 @@ @pytest.mark.forked def test_function(): {test_func_body!s} - """. - format(**locals()) + """ ) - pytest_run_result = testdir.runpytest(test_module, '-ra') + pytest_run_result = testdir.runpytest(test_module, "-ra") pytest_run_result.stdout.fnmatch_lines(expected_lines) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-forked-1.3.0/tox.ini new/pytest-forked-1.4.0/tox.ini --- old/pytest-forked-1.3.0/tox.ini 2020-07-27 21:49:27.000000000 +0200 +++ new/pytest-forked-1.4.0/tox.ini 2021-12-10 16:43:01.000000000 +0100 @@ -3,7 +3,7 @@ minversion = 3.7.0 isolated_build = true envlist= - py{27,35,36,37,38}-pytest{310,46,54,latest} + py{36,37,38,39,310}-pytest{310,46,54,62,latest} flakes build-dists metadata-validation @@ -16,9 +16,9 @@ pytest310: pytest~=3.10 pytest46: pytest~=4.6 pytest54: pytest~=5.4 - pytest60: pytest~=6.0rc1 + pytest62: pytest~=6.2 pytestlatest: pytest - pytestmaster: git+https://github.com/pytest-dev/pytest.git@master + pytestmain: git+https://github.com/pytest-dev/pytest.git@main platform=linux|darwin commands= pytest {posargs}