Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-subprocess-tee for
openSUSE:Factory checked in at 2022-12-08 16:52:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-subprocess-tee (Old)
and /work/SRC/openSUSE:Factory/.python-subprocess-tee.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-subprocess-tee"
Thu Dec 8 16:52:24 2022 rev:4 rq:1041381 version:0.4.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-subprocess-tee/python-subprocess-tee.changes
2022-09-11 21:57:35.669669474 +0200
+++
/work/SRC/openSUSE:Factory/.python-subprocess-tee.new.1835/python-subprocess-tee.changes
2022-12-08 16:52:33.431904716 +0100
@@ -1,0 +2,10 @@
+Wed Dec 7 22:28:03 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- * Update to version 0.4.0
+ * Minor Changes
+ Enable support for py311 (#72) @ssbarnea
+ * Bugfixes
+ Remove support for py37 (#70) @ssbarnea
+ Remove support for py36 (#65) @ssbarnea
+ Mark test test_rich_console_ex as broken (#64) @ssbarnea
+-------------------------------------------------------------------
Old:
----
subprocess-tee-0.3.5.tar.gz
New:
----
subprocess-tee-0.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-subprocess-tee.spec ++++++
--- /var/tmp/diff_new_pack.u6L2Hk/_old 2022-12-08 16:52:33.919907219 +0100
+++ /var/tmp/diff_new_pack.u6L2Hk/_new 2022-12-08 16:52:33.927907260 +0100
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-subprocess-tee
-Version: 0.3.5
+Version: 0.4.0
Release: 0
Summary: Captures the output of subprocesses in real-time
License: MIT
++++++ subprocess-tee-0.3.5.tar.gz -> subprocess-tee-0.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.flake8
new/subprocess-tee-0.4.0/.flake8
--- old/subprocess-tee-0.3.5/.flake8 1970-01-01 01:00:00.000000000 +0100
+++ new/subprocess-tee-0.4.0/.flake8 2022-11-25 01:45:26.000000000 +0100
@@ -0,0 +1,2 @@
+[flake8]
+max-line-length = 88
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.github/CODEOWNERS
new/subprocess-tee-0.4.0/.github/CODEOWNERS
--- old/subprocess-tee-0.3.5/.github/CODEOWNERS 2021-10-05 12:08:12.000000000
+0200
+++ new/subprocess-tee-0.4.0/.github/CODEOWNERS 2022-11-25 01:45:26.000000000
+0100
@@ -1,2 +1 @@
* @ssbarnea
-* @webknjaz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.github/dependabot.yml
new/subprocess-tee-0.4.0/.github/dependabot.yml
--- old/subprocess-tee-0.3.5/.github/dependabot.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/subprocess-tee-0.4.0/.github/dependabot.yml 2022-11-25
01:45:26.000000000 +0100
@@ -0,0 +1,17 @@
+---
+version: 2
+updates:
+ - package-ecosystem: pip
+ directory: /
+ schedule:
+ interval: daily
+ labels:
+ - skip-changelog
+ versioning-strategy: lockfile-only
+ open-pull-requests-limit: 0 # neutered
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: daily
+ labels:
+ - "skip-changelog"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.github/release-drafter.yml
new/subprocess-tee-0.4.0/.github/release-drafter.yml
--- old/subprocess-tee-0.3.5/.github/release-drafter.yml 2021-10-05
12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/.github/release-drafter.yml 2022-11-25
01:45:26.000000000 +0100
@@ -1,51 +1,3 @@
-# Format and labels used aim to match those used by Ansible project
-name-template: '$RESOLVED_VERSION'
-tag-template: '$RESOLVED_VERSION'
-categories:
- - title: 'Major Changes'
- labels:
- - 'major' # c6476b
- - title: 'Minor Changes'
- labels:
- - 'feature' # 006b75
- - 'enhancement' # ededed
- - 'refactoring'
- - title: 'Bugfixes'
- labels:
- - 'bug' # fbca04
- - title: 'Deprecations'
- labels:
- - 'deprecated' # fef2c0
-exclude-labels:
- - 'skip-changelog'
-version-resolver:
- major:
- labels:
- - 'major'
- minor:
- labels:
- - 'minor'
- - 'feature'
- - 'enhancement'
- - 'refactoring'
- patch:
- labels:
- - 'patch'
- - 'bug'
- - 'deprecated'
- default: patch
-autolabeler:
- - label: 'skip-changelog'
- title: '/chore/i'
- - label: 'bug'
- title: '/fix/i'
- - label: 'enhancement'
- title: '/(enhance|improve)/i'
- - label: 'feature'
- title: '/feature/i'
- - label: 'dreprecated'
- title: '/deprecat/i'
-template: |
- $CHANGES
-
- Kudos goes to: $CONTRIBUTORS
+---
+# see https://github.com/ansible/devtools
+_extends: ansible/devtools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.github/workflows/ack.yml
new/subprocess-tee-0.4.0/.github/workflows/ack.yml
--- old/subprocess-tee-0.3.5/.github/workflows/ack.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/subprocess-tee-0.4.0/.github/workflows/ack.yml 2022-11-25
01:45:26.000000000 +0100
@@ -0,0 +1,10 @@
+---
+# See https://github.com/ansible/devtools/blob/main/.github/workflows/ack.yml
+name: ack
+on:
+ pull_request_target:
+ types: [opened, labeled, unlabeled, synchronize]
+
+jobs:
+ ack:
+ uses: ansible/devtools/.github/workflows/ack.yml@main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.github/workflows/labels.yml
new/subprocess-tee-0.4.0/.github/workflows/labels.yml
--- old/subprocess-tee-0.3.5/.github/workflows/labels.yml 2021-10-05
12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/.github/workflows/labels.yml 1970-01-01
01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-# See https://github.com/jesusvasquez333/verify-pr-label-action
-name: labels
-on:
- pull_request_target:
- types: [opened, labeled, unlabeled, synchronize]
-
-jobs:
- check_pr_labels:
- runs-on: ubuntu-latest
- name: verify
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Verify PR label action
- uses: jesusvasquez333/[email protected]
- with:
- github-token: '${{ secrets.GITHUB_TOKEN }}'
- valid-labels: 'bug, enhancement, feature, refactoring, major,
deprecated, skip-changelog'
- invalid-labels: 'help wanted, invalid, feedback-needed, incomplete'
- pull-request-number: '${{ github.event.pull_request.number }}'
- disable-reviews: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.github/workflows/push.yml
new/subprocess-tee-0.4.0/.github/workflows/push.yml
--- old/subprocess-tee-0.3.5/.github/workflows/push.yml 1970-01-01
01:00:00.000000000 +0100
+++ new/subprocess-tee-0.4.0/.github/workflows/push.yml 2022-11-25
01:45:26.000000000 +0100
@@ -0,0 +1,13 @@
+---
+# See https://github.com/ansible/devtools/blob/main/.github/workflows/push.yml
+name: push
+on:
+ push:
+ branches:
+ - main
+ - "releases/**"
+ - "stable/**"
+
+jobs:
+ ack:
+ uses: ansible/devtools/.github/workflows/push.yml@main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/.github/workflows/release-drafter.yml
new/subprocess-tee-0.4.0/.github/workflows/release-drafter.yml
--- old/subprocess-tee-0.3.5/.github/workflows/release-drafter.yml
2021-10-05 12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/.github/workflows/release-drafter.yml
1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-name: release-drafter
-
-on:
- push:
- # branches to consider in the event; optional, defaults to all
- branches:
- - main
- - 'releases/**'
- - 'stable/**'
-
-jobs:
- update_release_draft:
- runs-on: ubuntu-20.04
- steps:
- # Drafts your next Release notes as Pull Requests are merged into "main"
- - uses: release-drafter/release-drafter@v5
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.github/workflows/release.yml
new/subprocess-tee-0.4.0/.github/workflows/release.yml
--- old/subprocess-tee-0.3.5/.github/workflows/release.yml 2021-10-05
12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/.github/workflows/release.yml 2022-11-25
01:45:26.000000000 +0100
@@ -1,3 +1,4 @@
+---
name: release
on:
@@ -17,32 +18,32 @@
TOX_PARALLEL_NO_SPINNER: 1
steps:
- - name: Switch to using Python 3.8 by default
- uses: actions/setup-python@v2
- with:
- python-version: 3.8
- - name: Install tox
- run: >-
- python3 -m
- pip install
- --user
- tox
- - name: Check out src from Git
- uses: actions/checkout@v2
- with:
- fetch-depth: 0 # needed by setuptools-scm
- - name: Build dists
- run: python -m tox
- - name: Publish to test.pypi.org
- if: >- # "create" workflows run separately from "push" & "pull_request"
- github.event_name == 'release'
- uses: pypa/gh-action-pypi-publish@master
- with:
- password: ${{ secrets.testpypi_password }}
- repository_url: https://test.pypi.org/legacy/
- - name: Publish to pypi.org
- if: >- # "create" workflows run separately from "push" & "pull_request"
- github.event_name == 'release'
- uses: pypa/gh-action-pypi-publish@master
- with:
- password: ${{ secrets.pypi_password }}
+ - name: Switch to using Python 3.8 by default
+ uses: actions/setup-python@v4
+ with:
+ python-version: 3.8
+ - name: Install tox
+ run: >-
+ python3 -m
+ pip install
+ --user
+ tox
+ - name: Check out src from Git
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0 # needed by setuptools-scm
+ - name: Build dists
+ run: python -m tox
+ - name: Publish to test.pypi.org
+ if: >- # "create" workflows run separately from "push" & "pull_request"
+ github.event_name == 'release'
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ password: ${{ secrets.testpypi_password }}
+ repository_url: https://test.pypi.org/legacy/
+ - name: Publish to pypi.org
+ if: >- # "create" workflows run separately from "push" & "pull_request"
+ github.event_name == 'release'
+ uses: pypa/gh-action-pypi-publish@release/v1
+ with:
+ password: ${{ secrets.pypi_password }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.github/workflows/tox.yml
new/subprocess-tee-0.4.0/.github/workflows/tox.yml
--- old/subprocess-tee-0.3.5/.github/workflows/tox.yml 2021-10-05
12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/.github/workflows/tox.yml 2022-11-25
01:45:26.000000000 +0100
@@ -1,21 +1,16 @@
name: tox
on:
- create: # is used for publishing to PyPI and TestPyPI
- tags: # any tag regardless of its name, no branches
push: # only publishes pushes to the main branch to TestPyPI
branches: # any integration branch but not tag
- - $default-branch
+ - main
tags-ignore:
- "**"
pull_request:
- schedule:
- - cron: 1 0 * * * # Run daily at 0:01 UTC
jobs:
linters:
- name: >-
- ${{ matrix.env.TOXENV }}
+ name: ${{ matrix.env.TOXENV }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -27,9 +22,6 @@
env:
- TOXENV: lint
- TOXENV: packaging
- env:
- TOX_PARALLEL_NO_SPINNER: 1
-
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
@@ -37,15 +29,14 @@
with:
python-version: ${{ matrix.python-version }}
- name: set PY_SHA256
- run: |
- echo "PY_SHA256=$(python -VV | sha256sum | cut -d' ' -f1)" >>
$GITHUB_ENV
+ run: echo "PY_SHA256=$(python -VV | sha256sum | cut -d' ' -f1)" >>
$GITHUB_ENV
- name: Pre-commit cache
- uses: actions/cache@v1
+ uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ env.PY_SHA256 }}-${{
hashFiles('setup.cfg') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{
hashFiles('pytest.ini') }}
- name: Pip cache
- uses: actions/cache@v1
+ uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ env.PY_SHA256 }}-${{
hashFiles('setup.cfg') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{
hashFiles('pytest.ini') }}
@@ -53,28 +44,17 @@
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install tox
- run: |
- python -m pip install --upgrade tox
+ run: python -m pip install --upgrade tox
- name: Log installed dists
- run: >-
- python -m pip freeze --all
- - name: >-
- Initialize tox envs
- run: >-
- python -m
- tox
- --parallel auto
- --parallel-live
- --notest
- --skip-missing-interpreters false
- -vv
+ run: python -m pip freeze --all
+ - name: Initialize tox envs
+ run: python -m tox --notest --skip-missing-interpreters false -vv
env: ${{ matrix.env }}
- name: Test with tox
- run: |
- python -m tox --parallel auto --parallel-live
+ run: python -m tox
env: ${{ matrix.env }}
- name: Archive logs
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v3
with:
name: logs.zip
path: .tox/**/log/
@@ -89,8 +69,7 @@
run: docker build .
unit:
- name: >-
- py${{ matrix.python-version }}@${{ matrix.os }}
+ name: py${{ matrix.python-version }}@${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# fail-fast: false
@@ -107,19 +86,11 @@
# - windows-latest
# - windows-2016
python-version:
- - "3.6"
- - "3.7"
- "3.8"
- "3.9"
- "3.10"
include:
- os: ubuntu-latest
- python-version: "3.6"
- tox_env: py36
- - os: ubuntu-latest
- python-version: "3.7"
- tox_env: py37
- - os: ubuntu-latest
python-version: "3.8"
tox_env: py38
- os: ubuntu-latest
@@ -128,16 +99,15 @@
- os: ubuntu-latest
python-version: "3.10"
tox_env: py310
+ - os: ubuntu-latest
+ python-version: "3.11"
+ tox_env: py311
- os: macOS-latest
- python-version: "3.6"
- tox_env: py36
+ python-version: "3.8"
+ tox_env: py38
- os: macOS-latest
- python-version: "3.10"
- tox_env: py39
-
- env:
- TOX_PARALLEL_NO_SPINNER: 1
-
+ python-version: "3.11"
+ tox_env: py311
steps:
- uses: actions/checkout@master
- name: Get history and tags for SCM versioning to work
@@ -145,25 +115,15 @@
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up stock Python ${{ matrix.python-version }} from GitHub
- if: >-
- !endsWith(matrix.python-version, '-dev')
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- - name: Set up Python ${{ matrix.python-version }} from deadsnakes
- if: >-
- endsWith(matrix.python-version, '-dev')
- uses: deadsnakes/[email protected]
- with:
- python-version: ${{ matrix.python-version }}
- - name: >-
- Log the currently selected Python
- version info (${{ matrix.python-version }})
+ - name: Log the currently selected Python version info (${{
matrix.python-version }})
run: |
python --version --version
which python
- name: Pip cache
- uses: actions/cache@v1
+ uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ env.PY_SHA256 }}-${{
hashFiles('setup.cfg') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}-${{
hashFiles('pytest.ini') }}
@@ -175,5 +135,17 @@
python -m pip install -U pip
pip install tox
- name: Run tox -e ${{ matrix.tox_env }}
- run: |
- tox -e ${{ matrix.tox_env }}
+ run: tox -e ${{ matrix.tox_env }}
+
+ check: # This job does nothing and is only used for the branch protection
+ if: always()
+ needs:
+ - alpine
+ - linters
+ - unit
+ runs-on: ubuntu-latest
+ steps:
+ - name: Decide whether the needed jobs succeeded or failed
+ uses: re-actors/alls-green@release/v1
+ with:
+ jobs: ${{ toJSON(needs) }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/.pre-commit-config.yaml
new/subprocess-tee-0.4.0/.pre-commit-config.yaml
--- old/subprocess-tee-0.3.5/.pre-commit-config.yaml 2021-10-05
12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/.pre-commit-config.yaml 2022-11-25
01:45:26.000000000 +0100
@@ -5,16 +5,16 @@
)
repos:
- repo: https://github.com/PyCQA/isort
- rev: 5.9.3
+ rev: 5.10.1
hooks:
- id: isort
- - repo: https://github.com/python/black.git
- rev: 21.8b0
+ - repo: https://github.com/psf/black
+ rev: 22.10.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks.git
- rev: v4.0.1
+ rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
@@ -25,24 +25,24 @@
- id: debug-statements
language_version: python3
- repo: https://github.com/pycqa/flake8.git
- rev: 3.9.2
+ rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- - pydocstyle>=5.1.1
- flake8-absolute-import
- flake8-black>=0.1.1
- flake8-docstrings>=1.5.0
+ - pydocstyle>=5.1.1
language_version: python3
- repo: https://github.com/adrienverge/yamllint.git
- rev: v1.26.3
+ rev: v1.28.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v0.910
+ rev: v0.991
hooks:
- id: mypy
# empty args needed in order to match mypy cli behavior
@@ -54,7 +54,7 @@
- packaging
- enrich>=1.2.5
- repo: https://github.com/PyCQA/pylint
- rev: v2.10.2
+ rev: v2.15.6
hooks:
- id: pylint
additional_dependencies:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi
---
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi
2021-10-05 12:08:21.000000000 +0200
+++
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi
1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-def check_pkcs7_padding(data: bytes) -> bool: ...
-def check_ansix923_padding(data: bytes) -> bool: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi
---
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi
2021-10-05 12:08:21.000000000 +0200
+++
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi
1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-import typing
-
-from cryptography.x509 import TLSFeature, PrecertPoison
-
-class TestCertificate:
- not_after_tag: int
- not_before_tag: int
- issuer_value_tags: typing.List[int]
- subject_value_tags: typing.List[int]
-
-def decode_dss_signature(signature: bytes) -> typing.Tuple[int, int]: ...
-def encode_dss_signature(r: int, s: int) -> bytes: ...
-def encode_tls_feature(ext: TLSFeature) -> bytes: ...
-def encode_precert_poison(ext: PrecertPoison) -> bytes: ...
-def parse_spki_for_data(data: bytes) -> bytes: ...
-def test_parse_certificate(data: bytes) -> TestCertificate: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi
---
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi
2021-10-05 12:08:21.000000000 +0200
+++
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi
1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-from cryptography.x509 import ExtensionType
-from cryptography.x509.ocsp import OCSPRequest, OCSPResponse
-
-def load_der_ocsp_request(data: bytes) -> OCSPRequest: ...
-def load_der_ocsp_response(data: bytes) -> OCSPResponse: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi
---
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi
2021-10-05 12:08:21.000000000 +0200
+++
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi
1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-import datetime
-import typing
-
-from cryptography import x509
-
-def parse_csr_extension(
- der_oid: bytes, ext_data: bytes
-) -> x509.ExtensionType: ...
-def load_pem_x509_certificate(data: bytes) -> x509.Certificate: ...
-def load_der_x509_certificate(data: bytes) -> x509.Certificate: ...
-def load_pem_x509_crl(data: bytes) -> x509.CertificateRevocationList: ...
-def load_der_x509_crl(data: bytes) -> x509.CertificateRevocationList: ...
-def load_pem_x509_csr(data: bytes) -> x509.CertificateSigningRequest: ...
-def load_der_x509_csr(data: bytes) -> x509.CertificateSigningRequest: ...
-def encode_precertificate_signed_certificate_timestamps(
- extension: x509.PrecertificateSignedCertificateTimestamps,
-) -> bytes: ...
-
-class Sct: ...
-class Certificate: ...
-class RevokedCertificate: ...
-class CertificateRevocationList: ...
-class CertificateSigningRequest: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/pip/py.typed
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/pip/py.typed
---
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/pip/py.typed
2021-10-05 12:08:13.000000000 +0200
+++
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/pip/py.typed
1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-pip is a command line program. While it is implemented in Python, and so is
-available for import, you must not use pip's internal APIs in this way. Typing
-information is provided as a convenience only and is not a guarantee. Expect
-unannounced changes to the API and types in releases.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/tomli/py.typed
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/tomli/py.typed
---
old/subprocess-tee-0.3.5/.tox/packaging/lib/python3.8/site-packages/tomli/py.typed
2021-10-05 12:08:21.000000000 +0200
+++
new/subprocess-tee-0.4.0/.tox/packaging/lib/python3.8/site-packages/tomli/py.typed
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-# Marker file for PEP 561
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/Dockerfile
new/subprocess-tee-0.4.0/Dockerfile
--- old/subprocess-tee-0.3.5/Dockerfile 2021-10-05 12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/Dockerfile 2022-11-25 01:45:26.000000000 +0100
@@ -2,7 +2,7 @@
# Alpine is used on purpose because it does not come with bash, and we
# want to test that subprocess-tee works even on systems without bash shell.
ENV BUILD_DEPS="\
-ansible-base \
+ansible-core \
gcc \
git \
libffi-dev \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/MANIFEST.in
new/subprocess-tee-0.4.0/MANIFEST.in
--- old/subprocess-tee-0.3.5/MANIFEST.in 2021-10-05 12:08:12.000000000
+0200
+++ new/subprocess-tee-0.4.0/MANIFEST.in 1970-01-01 01:00:00.000000000
+0100
@@ -1,3 +0,0 @@
-prune asset
-global-include *.pyi
-global-include *.typed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/PKG-INFO
new/subprocess-tee-0.4.0/PKG-INFO
--- old/subprocess-tee-0.3.5/PKG-INFO 2021-10-05 12:08:31.247003000 +0200
+++ new/subprocess-tee-0.4.0/PKG-INFO 2022-11-25 01:45:47.561314000 +0100
@@ -1,40 +1,31 @@
Metadata-Version: 2.1
Name: subprocess-tee
-Version: 0.3.5
+Version: 0.4.0
Summary: subprocess-tee
-Home-page: https://github.com/pycontribs/subprocess-tee
-Author: Sorin Sbarnea
-Author-email: [email protected]
-Maintainer: Sorin Sbarnea
-Maintainer-email: [email protected]
+Author-email: Sorin Sbarnea <[email protected]>
+Maintainer-email: Sorin Sbarnea <[email protected]>
License: MIT
-Project-URL: Bug Tracker, https://github.com/pycontribs/subprocess-tee/issues
-Project-URL: Release Management,
https://github.com/pycontribs/subprocess-tee/releases
-Project-URL: CI, https://github.com/pycontribs/subprocess-tee/actions
-Project-URL: Code of Conduct,
https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
-Project-URL: Documentation, https://subprocess-tee.readthedocs.io
-Project-URL: Discussions,
https://github.com/pycontribs/subprocess-tee/discussions
-Project-URL: Source Code, https://github.com/pycontribs/subprocess-tee
+Project-URL: homepage, https://github.com/pycontribs/subprocess-tee
+Project-URL: documentation, https://subprocess-tee.readthedocs.io
+Project-URL: repository, https://github.com/pycontribs/subprocess-tee
+Project-URL: changelog, https://github.com/pycontribs/subprocess-tee/releases
Keywords: subprocess,asyncio
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
-Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
-Requires-Python: >=3.6
+Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: test
License-File: LICENSE
@@ -66,5 +57,3 @@
You can still use `check=True` in order to make it raise CompletedProcess
exception when the result code is not zero.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/pyproject.toml
new/subprocess-tee-0.4.0/pyproject.toml
--- old/subprocess-tee-0.3.5/pyproject.toml 2021-10-05 12:08:12.000000000
+0200
+++ new/subprocess-tee-0.4.0/pyproject.toml 2022-11-25 01:45:26.000000000
+0100
@@ -8,6 +8,57 @@
]
build-backend = "setuptools.build_meta"
+[project]
+# https://peps.python.org/pep-0621/#readme
+requires-python = ">=3.8"
+dynamic = ["version"]
+
+name = "subprocess-tee"
+
+description = "subprocess-tee"
+readme = "README.md"
+authors = [
+ {"name"="Sorin Sbarnea", "email"="[email protected]"}
+]
+maintainers = [
+ {"name"="Sorin Sbarnea", "email"="[email protected]"}
+]
+license = {text = "MIT"}
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Environment :: Console",
+ "Intended Audience :: Developers",
+ "Intended Audience :: Information Technology",
+ "Intended Audience :: System Administrators",
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python",
+ "Topic :: System :: Systems Administration",
+ "Topic :: Utilities",
+]
+keywords = ["subprocess", "asyncio"]
+
+[project.urls]
+homepage = "https://github.com/pycontribs/subprocess-tee"
+documentation = "https://subprocess-tee.readthedocs.io"
+repository = "https://github.com/pycontribs/subprocess-tee"
+changelog = "https://github.com/pycontribs/subprocess-tee/releases"
+
+[project.optional-dependencies]
+test =[
+ "enrich>=1.2.6",
+ "molecule>=3.4.0", # ansible is needed but no direct imports are made
+ "pytest-cov>=2.12.1",
+ "pytest-plus>=0.2",
+ "pytest-xdist>=2.3.0",
+ "pytest>=6.2.5",
+]
+
[tool.black]
skip-string-normalization = false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/setup.cfg
new/subprocess-tee-0.4.0/setup.cfg
--- old/subprocess-tee-0.3.5/setup.cfg 2021-10-05 12:08:31.247003000 +0200
+++ new/subprocess-tee-0.4.0/setup.cfg 2022-11-25 01:45:47.561314000 +0100
@@ -1,97 +1,3 @@
-[metadata]
-name = subprocess-tee
-url = https://github.com/pycontribs/subprocess-tee
-project_urls =
- Bug Tracker = https://github.com/pycontribs/subprocess-tee/issues
- Release Management =
https://github.com/pycontribs/subprocess-tee/releases
- CI = https://github.com/pycontribs/subprocess-tee/actions
- Code of Conduct =
https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
- Documentation = https://subprocess-tee.readthedocs.io
- Discussions = https://github.com/pycontribs/subprocess-tee/discussions
- Source Code = https://github.com/pycontribs/subprocess-tee
-description = subprocess-tee
-long_description = file: README.md
-long_description_content_type = text/markdown
-author = Sorin Sbarnea
-author_email = [email protected]
-maintainer = Sorin Sbarnea
-maintainer_email = [email protected]
-license = MIT
-license_file = LICENSE
-classifiers =
- Development Status :: 5 - Production/Stable
-
- Environment :: Console
-
- Intended Audience :: Developers
- Intended Audience :: Information Technology
- Intended Audience :: System Administrators
-
- Operating System :: OS Independent
-
- License :: OSI Approved :: MIT License
-
- Programming Language :: Python
-
- Operating System :: OS Independent
-
- 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
-
- Topic :: System :: Systems Administration
- Topic :: Utilities
-keywords =
- subprocess
- asyncio
-
-[options]
-use_scm_version = True
-python_requires = >=3.6
-package_dir =
- = src
-packages = find:
-include_package_data = True
-zip_safe = False
-setup_requires =
- setuptools_scm >= 1.15.0
- setuptools_scm_git_archive >= 1.0
-
-[options.extras_require]
-test =
- enrich>=1.2.6
- mock>=4.0.3
- molecule>=3.4.0 # ansible is needed but no direct imports are made
- pytest-cov>=2.12.1
- pytest-plus>=0.2
- pytest-xdist>=2.3.0
- pytest>=6.2.5
-
-[options.packages.find]
-where = src
-
-[options.package_data]
-subprocess_tee =
- *.typed
- *.pyi
-
-[tool:pytest]
-addopts = --doctest-modules --durations 10 --durations-min=3 --color=yes
-doctest_optionflags = ALLOW_UNICODE ELLIPSIS
-norecursedirs = dist doc build .tox .eggs
-testpaths = src
-filterwarnings =
- error
-
-[flake8]
-exclude = .venv/,.tox/,dist/,build/,.eggs/
-format = pylint
-ignore = E741,W503,W504,H,E501,E203,D
-max-line-length = 88
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/setup.py
new/subprocess-tee-0.4.0/setup.py
--- old/subprocess-tee-0.3.5/setup.py 2021-10-05 12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/setup.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-#! /usr/bin/env python
-"""Distribution package setuptools installer."""
-
-import site
-import sys
-
-import setuptools
-
-# See https://github.com/pypa/pip/issues/7953
-site.ENABLE_USER_SITE = "--user" in sys.argv[1:]
-
-
-if __name__ == "__main__":
- setuptools.setup(
- use_scm_version={"local_scheme": "no-local-version"},
- setup_requires=["setuptools_scm[toml]>=3.5.0"],
- )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/src/subprocess_tee/__init__.py
new/subprocess-tee-0.4.0/src/subprocess_tee/__init__.py
--- old/subprocess-tee-0.3.5/src/subprocess_tee/__init__.py 2021-10-05
12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee/__init__.py 2022-11-25
01:45:26.000000000 +0100
@@ -18,7 +18,7 @@
from subprocess import list2cmdline as join # pylint:
disable=ungrouped-imports
-STREAM_LIMIT = 2 ** 23 # 8MB instead of default 64kb, override it if you need
+STREAM_LIMIT = 2**23 # 8MB instead of default 64kb, override it if you need
async def _read_stream(stream: StreamReader, callback: Callable[..., Any]) ->
None:
@@ -85,13 +85,13 @@
if process.stdout:
tasks.append(
loop.create_task(
- _read_stream(process.stdout, lambda l: tee_func(l, out,
stdout))
+ _read_stream(process.stdout, lambda x: tee_func(x, out,
stdout))
)
)
if process.stderr:
tasks.append(
loop.create_task(
- _read_stream(process.stderr, lambda l: tee_func(l, err,
stderr))
+ _read_stream(process.stderr, lambda x: tee_func(x, err,
stderr))
)
)
@@ -116,7 +116,7 @@
def run(args: Union[str, List[str]], **kwargs: Any) -> CompletedProcess:
- """Drop-in replacement for subprocerss.run that behaves like tee.
+ """Drop-in replacement for subprocess.run that behaves like tee.
Extra arguments added by our version:
echo: False - Prints command before executing it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/src/subprocess_tee/test/__init__.py
new/subprocess-tee-0.4.0/src/subprocess_tee/test/__init__.py
--- old/subprocess-tee-0.3.5/src/subprocess_tee/test/__init__.py
2021-10-05 12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee/test/__init__.py
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-"""Unitests."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/src/subprocess_tee/test/test_func.py
new/subprocess-tee-0.4.0/src/subprocess_tee/test/test_func.py
--- old/subprocess-tee-0.3.5/src/subprocess_tee/test/test_func.py
2021-10-05 12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee/test/test_func.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-"""Functional tests for subprocess-tee library."""
-import subprocess
-
-
-def test_molecule() -> None:
- """Ensures molecule does display output of its subprocesses."""
- result = subprocess.run(
- ["molecule", "test"],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- universal_newlines=True,
- check=False,
- ) # type: ignore
- assert result.returncode == 0
- assert "Past glories are poor feeding." in result.stdout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/src/subprocess_tee/test/test_rich.py
new/subprocess-tee-0.4.0/src/subprocess_tee/test/test_rich.py
--- old/subprocess-tee-0.3.5/src/subprocess_tee/test/test_rich.py
2021-10-05 12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee/test/test_rich.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-"""Tests for rich module."""
-import sys
-
-from enrich.console import Console
-
-from subprocess_tee import run
-
-
-def test_rich_console_ex() -> None:
- """Validate that ConsoleEx can capture output from print() calls."""
- console = Console(record=True, redirect=True)
- console.print("alpha")
- print("beta")
- sys.stdout.write("gamma\n")
- sys.stderr.write("delta\n")
- # While not supposed to happen we want to be sure that this will not raise
- # an exception. Some libraries may still sometimes send bytes to the
- # streams, notable example being click.
- # sys.stdout.write(b"epsilon\n") # type: ignore
- proc = run("echo 123")
- assert proc.stdout == "123\n"
- text = console.export_text()
- assert text == "alpha\nbeta\ngamma\ndelta\n123\n"
-
-
-def test_rich_console_ex_ansi() -> None:
- """Validate that ANSI sent to sys.stdout does not become garbage in
record."""
- print()
- console = Console(force_terminal=True, record=True, redirect=True)
- console.print("[green]this from Console.print()[/green]", style="red")
- proc = run(r'echo -e "\033[31mred\033[0m"')
- assert proc.returncode == 0
- assert "red" in proc.stdout
-
- # validate that what rich recorded is the same as what the subprocess
produced
- text = console.export_text(clear=False)
- assert "red" in text
-
- # validate that html export also contains at least the "red" text
- html = console.export_html(clear=False)
- assert '<span class="r3">red</span>' in html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/src/subprocess_tee/test/test_unit.py
new/subprocess-tee-0.4.0/src/subprocess_tee/test/test_unit.py
--- old/subprocess-tee-0.3.5/src/subprocess_tee/test/test_unit.py
2021-10-05 12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee/test/test_unit.py
1970-01-01 01:00:00.000000000 +0100
@@ -1,143 +0,0 @@
-"""Unittests."""
-import subprocess
-from typing import Dict
-
-import pytest
-from _pytest.capture import CaptureFixture
-
-from subprocess_tee import run
-
-
-def test_run_string() -> None:
- """Valida run() called with a single string command."""
- cmd = "echo 111 && >&2 echo 222"
- old_result = subprocess.run(
- cmd,
- shell=True,
- universal_newlines=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- check=False,
- )
- result = run(cmd)
- assert result.returncode == old_result.returncode
- assert result.stdout == old_result.stdout
- assert result.stderr == old_result.stderr
-
-
-def test_run_list() -> None:
- """Validate run call with a command made of list of strings."""
- # NOTICE: subprocess.run() does fail to capture any output when cmd is
- # a list and you specific shell=True. Still, when not mentioning shell,
- # it does work.
- cmd = ["python3", "--version"]
- old_result = subprocess.run(
- cmd,
- # shell=True,
- universal_newlines=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- check=False,
- )
- result = run(cmd)
- assert result.returncode == old_result.returncode
- assert result.stdout == old_result.stdout
- assert result.stderr == old_result.stderr
-
-
-def test_run_echo(capsys: CaptureFixture[str]) -> None:
- """Validate run call with echo dumps command."""
- cmd = ["python3", "--version"]
- old_result = subprocess.run(
- cmd,
- # shell=True,
- universal_newlines=True,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- check=False,
- )
- result = run(cmd, echo=True)
- assert result.returncode == old_result.returncode
- assert result.stdout == old_result.stdout
- assert result.stderr == old_result.stderr
- out, err = capsys.readouterr()
- assert out.startswith("COMMAND:")
- assert err == ""
-
-
[email protected](
- "env",
- [{}, {"SHELL": "/bin/sh"}, {"SHELL": "/bin/bash"}, {"SHELL": "/bin/zsh"}],
- ids=["auto", "sh", "bash", "zsh"],
-)
-def test_run_with_env(env: Dict[str, str]) -> None:
- """Validate that passing custom env to run() works."""
- env["FOO"] = "BAR"
- result = run("echo $FOO", env=env, echo=True)
- assert result.stdout == "BAR\n"
-
-
-def test_run_shell() -> None:
- """Validate run call with multiple shell commands works."""
- cmd = "echo a && echo b && false || exit 4"
- # "python --version"
- result = run(cmd, echo=True)
- assert result.returncode == 4
- assert result.stdout == "a\nb\n"
-
-
-def test_run_shell_undefined() -> None:
- """Validate run call with multiple shell commands works."""
- cmd = "echo a && echo b && false || exit 4"
- # "python --version"
- result = run(cmd, echo=True, env={})
- assert result.returncode == 4
- assert result.stdout == "a\nb\n"
-
-
-def test_run_cwd() -> None:
- """Validate that run accepts cwd and respects it."""
- cmd = "pwd"
- result = run(cmd, echo=True, cwd="/")
- assert result.returncode == 0
- assert result.stdout == "/\n"
-
-
-def test_run_with_check_raise() -> None:
- """Asure compatibility with subprocess.run when using check (return 1)."""
- with pytest.raises(subprocess.CalledProcessError) as ours:
- run("false", check=True)
- with pytest.raises(subprocess.CalledProcessError) as original:
- subprocess.run("false", check=True, universal_newlines=True)
- assert ours.value.returncode == original.value.returncode
- assert ours.value.cmd == original.value.cmd
- assert ours.value.output == original.value.output
- assert ours.value.stdout == original.value.stdout
- assert ours.value.stderr == original.value.stderr
-
-
-def test_run_with_check_pass() -> None:
- """Asure compatibility with subprocess.run when using check (return 0)."""
- ours = run("true", check=True)
- original = subprocess.run("true", check=True, universal_newlines=True)
- assert ours.returncode == original.returncode
- assert ours.args == original.args
- assert ours.stdout == original.stdout
- assert ours.stderr == original.stderr
-
-
-def test_run_compat() -> None:
- """Assure compatiblity with subprocess.run()"""
- cmd = ["seq", "10"]
- ours = run(cmd)
- original = subprocess.run(
- cmd,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE,
- universal_newlines=True,
- check=False,
- )
- assert ours.returncode == original.returncode
- assert ours.stdout == original.stdout
- assert ours.stderr == original.stderr
- assert ours.args == original.args
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/src/subprocess_tee.egg-info/PKG-INFO
new/subprocess-tee-0.4.0/src/subprocess_tee.egg-info/PKG-INFO
--- old/subprocess-tee-0.3.5/src/subprocess_tee.egg-info/PKG-INFO
2021-10-05 12:08:31.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee.egg-info/PKG-INFO
2022-11-25 01:45:47.000000000 +0100
@@ -1,40 +1,31 @@
Metadata-Version: 2.1
Name: subprocess-tee
-Version: 0.3.5
+Version: 0.4.0
Summary: subprocess-tee
-Home-page: https://github.com/pycontribs/subprocess-tee
-Author: Sorin Sbarnea
-Author-email: [email protected]
-Maintainer: Sorin Sbarnea
-Maintainer-email: [email protected]
+Author-email: Sorin Sbarnea <[email protected]>
+Maintainer-email: Sorin Sbarnea <[email protected]>
License: MIT
-Project-URL: Bug Tracker, https://github.com/pycontribs/subprocess-tee/issues
-Project-URL: Release Management,
https://github.com/pycontribs/subprocess-tee/releases
-Project-URL: CI, https://github.com/pycontribs/subprocess-tee/actions
-Project-URL: Code of Conduct,
https://docs.ansible.com/ansible/latest/community/code_of_conduct.html
-Project-URL: Documentation, https://subprocess-tee.readthedocs.io
-Project-URL: Discussions,
https://github.com/pycontribs/subprocess-tee/discussions
-Project-URL: Source Code, https://github.com/pycontribs/subprocess-tee
+Project-URL: homepage, https://github.com/pycontribs/subprocess-tee
+Project-URL: documentation, https://subprocess-tee.readthedocs.io
+Project-URL: repository, https://github.com/pycontribs/subprocess-tee
+Project-URL: changelog, https://github.com/pycontribs/subprocess-tee/releases
Keywords: subprocess,asyncio
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
-Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
-Requires-Python: >=3.6
+Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: test
License-File: LICENSE
@@ -66,5 +57,3 @@
You can still use `check=True` in order to make it raise CompletedProcess
exception when the result code is not zero.
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/src/subprocess_tee.egg-info/SOURCES.txt
new/subprocess-tee-0.4.0/src/subprocess_tee.egg-info/SOURCES.txt
--- old/subprocess-tee-0.3.5/src/subprocess_tee.egg-info/SOURCES.txt
2021-10-05 12:08:31.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee.egg-info/SOURCES.txt
2022-11-25 01:45:47.000000000 +0100
@@ -1,38 +1,22 @@
.dockerignore
+.flake8
.gitignore
.pre-commit-config.yaml
.yamllint
Dockerfile
LICENSE
-MANIFEST.in
README.md
mypy.ini
pyproject.toml
-setup.cfg
-setup.py
tox.ini
.github/CODEOWNERS
.github/FUNDING.yml
+.github/dependabot.yml
.github/release-drafter.yml
-.github/workflows/labels.yml
-.github/workflows/release-drafter.yml
+.github/workflows/ack.yml
+.github/workflows/push.yml
.github/workflows/release.yml
.github/workflows/tox.yml
-.tox/packaging/lib/python3.8/site-packages/build/py.typed
-.tox/packaging/lib/python3.8/site-packages/charset_normalizer/py.typed
-.tox/packaging/lib/python3.8/site-packages/cryptography/py.typed
-.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi
-.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi
-.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi
-.tox/packaging/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi
-.tox/packaging/lib/python3.8/site-packages/idna/py.typed
-.tox/packaging/lib/python3.8/site-packages/importlib_metadata/py.typed
-.tox/packaging/lib/python3.8/site-packages/keyring/py.typed
-.tox/packaging/lib/python3.8/site-packages/packaging/py.typed
-.tox/packaging/lib/python3.8/site-packages/pip/py.typed
-.tox/packaging/lib/python3.8/site-packages/secretstorage/py.typed
-.tox/packaging/lib/python3.8/site-packages/tomli/py.typed
-.tox/packaging/lib/python3.8/site-packages/twine/py.typed
molecule/default/converge.yml
molecule/default/molecule.yml
src/subprocess_tee/__init__.py
@@ -40,10 +24,9 @@
src/subprocess_tee.egg-info/PKG-INFO
src/subprocess_tee.egg-info/SOURCES.txt
src/subprocess_tee.egg-info/dependency_links.txt
-src/subprocess_tee.egg-info/not-zip-safe
src/subprocess_tee.egg-info/requires.txt
src/subprocess_tee.egg-info/top_level.txt
-src/subprocess_tee/test/__init__.py
-src/subprocess_tee/test/test_func.py
-src/subprocess_tee/test/test_rich.py
-src/subprocess_tee/test/test_unit.py
\ No newline at end of file
+test/__init__.py
+test/test_func.py
+test/test_rich.py
+test/test_unit.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/src/subprocess_tee.egg-info/not-zip-safe
new/subprocess-tee-0.4.0/src/subprocess_tee.egg-info/not-zip-safe
--- old/subprocess-tee-0.3.5/src/subprocess_tee.egg-info/not-zip-safe
2021-10-05 12:08:31.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee.egg-info/not-zip-safe
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/subprocess-tee-0.3.5/src/subprocess_tee.egg-info/requires.txt
new/subprocess-tee-0.4.0/src/subprocess_tee.egg-info/requires.txt
--- old/subprocess-tee-0.3.5/src/subprocess_tee.egg-info/requires.txt
2021-10-05 12:08:31.000000000 +0200
+++ new/subprocess-tee-0.4.0/src/subprocess_tee.egg-info/requires.txt
2022-11-25 01:45:47.000000000 +0100
@@ -1,7 +1,6 @@
[test]
enrich>=1.2.6
-mock>=4.0.3
molecule>=3.4.0
pytest-cov>=2.12.1
pytest-plus>=0.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/test/__init__.py
new/subprocess-tee-0.4.0/test/__init__.py
--- old/subprocess-tee-0.3.5/test/__init__.py 1970-01-01 01:00:00.000000000
+0100
+++ new/subprocess-tee-0.4.0/test/__init__.py 2022-11-25 01:45:26.000000000
+0100
@@ -0,0 +1 @@
+"""Unitests."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/test/test_func.py
new/subprocess-tee-0.4.0/test/test_func.py
--- old/subprocess-tee-0.3.5/test/test_func.py 1970-01-01 01:00:00.000000000
+0100
+++ new/subprocess-tee-0.4.0/test/test_func.py 2022-11-25 01:45:26.000000000
+0100
@@ -0,0 +1,15 @@
+"""Functional tests for subprocess-tee library."""
+import subprocess
+
+
+def test_molecule() -> None:
+ """Ensures molecule does display output of its subprocesses."""
+ result = subprocess.run(
+ ["molecule", "test"],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ universal_newlines=True,
+ check=False,
+ ) # type: ignore
+ assert result.returncode == 0
+ assert "Past glories are poor feeding." in result.stdout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/test/test_rich.py
new/subprocess-tee-0.4.0/test/test_rich.py
--- old/subprocess-tee-0.3.5/test/test_rich.py 1970-01-01 01:00:00.000000000
+0100
+++ new/subprocess-tee-0.4.0/test/test_rich.py 2022-11-25 01:45:26.000000000
+0100
@@ -0,0 +1,43 @@
+"""Tests for rich module."""
+import sys
+
+import pytest
+from enrich.console import Console
+
+from subprocess_tee import run
+
+
[email protected](reason="Bug
https://github.com/pycontribs/subprocess-tee/issues/58")
+def test_rich_console_ex() -> None:
+ """Validate that ConsoleEx can capture output from print() calls."""
+ console = Console(record=True, redirect=True)
+ console.print("alpha")
+ print("beta")
+ sys.stdout.write("gamma\n")
+ sys.stderr.write("delta\n")
+ # While not supposed to happen we want to be sure that this will not raise
+ # an exception. Some libraries may still sometimes send bytes to the
+ # streams, notable example being click.
+ # sys.stdout.write(b"epsilon\n") # type: ignore
+ proc = run("echo 123")
+ assert proc.stdout == "123\n"
+ text = console.export_text()
+ assert text == "alpha\nbeta\ngamma\ndelta\n123\n"
+
+
+def test_rich_console_ex_ansi() -> None:
+ """Validate that ANSI sent to sys.stdout does not become garbage in
record."""
+ print()
+ console = Console(force_terminal=True, record=True, redirect=True)
+ console.print("[green]this from Console.print()[/green]", style="red")
+ proc = run(r'echo -e "\033[31mred\033[0m"')
+ assert proc.returncode == 0
+ assert "red" in proc.stdout
+
+ # validate that what rich recorded is the same as what the subprocess
produced
+ text = console.export_text(clear=False)
+ assert "red" in text
+
+ # validate that html export also contains at least the "red" text
+ html = console.export_html(clear=False)
+ assert '<span class="r3">red</span>' in html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/test/test_unit.py
new/subprocess-tee-0.4.0/test/test_unit.py
--- old/subprocess-tee-0.3.5/test/test_unit.py 1970-01-01 01:00:00.000000000
+0100
+++ new/subprocess-tee-0.4.0/test/test_unit.py 2022-11-25 01:45:26.000000000
+0100
@@ -0,0 +1,143 @@
+"""Unittests."""
+import subprocess
+from typing import Dict
+
+import pytest
+from _pytest.capture import CaptureFixture
+
+from subprocess_tee import run
+
+
+def test_run_string() -> None:
+ """Valida run() called with a single string command."""
+ cmd = "echo 111 && >&2 echo 222"
+ old_result = subprocess.run(
+ cmd,
+ shell=True,
+ universal_newlines=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ check=False,
+ )
+ result = run(cmd)
+ assert result.returncode == old_result.returncode
+ assert result.stdout == old_result.stdout
+ assert result.stderr == old_result.stderr
+
+
+def test_run_list() -> None:
+ """Validate run call with a command made of list of strings."""
+ # NOTICE: subprocess.run() does fail to capture any output when cmd is
+ # a list and you specific shell=True. Still, when not mentioning shell,
+ # it does work.
+ cmd = ["python3", "--version"]
+ old_result = subprocess.run(
+ cmd,
+ # shell=True,
+ universal_newlines=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ check=False,
+ )
+ result = run(cmd)
+ assert result.returncode == old_result.returncode
+ assert result.stdout == old_result.stdout
+ assert result.stderr == old_result.stderr
+
+
+def test_run_echo(capsys: CaptureFixture[str]) -> None:
+ """Validate run call with echo dumps command."""
+ cmd = ["python3", "--version"]
+ old_result = subprocess.run(
+ cmd,
+ # shell=True,
+ universal_newlines=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ check=False,
+ )
+ result = run(cmd, echo=True)
+ assert result.returncode == old_result.returncode
+ assert result.stdout == old_result.stdout
+ assert result.stderr == old_result.stderr
+ out, err = capsys.readouterr()
+ assert out.startswith("COMMAND:")
+ assert err == ""
+
+
[email protected](
+ "env",
+ [{}, {"SHELL": "/bin/sh"}, {"SHELL": "/bin/bash"}, {"SHELL": "/bin/zsh"}],
+ ids=["auto", "sh", "bash", "zsh"],
+)
+def test_run_with_env(env: Dict[str, str]) -> None:
+ """Validate that passing custom env to run() works."""
+ env["FOO"] = "BAR"
+ result = run("echo $FOO", env=env, echo=True)
+ assert result.stdout == "BAR\n"
+
+
+def test_run_shell() -> None:
+ """Validate run call with multiple shell commands works."""
+ cmd = "echo a && echo b && false || exit 4"
+ # "python --version"
+ result = run(cmd, echo=True)
+ assert result.returncode == 4
+ assert result.stdout == "a\nb\n"
+
+
+def test_run_shell_undefined() -> None:
+ """Validate run call with multiple shell commands works."""
+ cmd = "echo a && echo b && false || exit 4"
+ # "python --version"
+ result = run(cmd, echo=True, env={})
+ assert result.returncode == 4
+ assert result.stdout == "a\nb\n"
+
+
+def test_run_cwd() -> None:
+ """Validate that run accepts cwd and respects it."""
+ cmd = "pwd"
+ result = run(cmd, echo=True, cwd="/")
+ assert result.returncode == 0
+ assert result.stdout == "/\n"
+
+
+def test_run_with_check_raise() -> None:
+ """Asure compatibility with subprocess.run when using check (return 1)."""
+ with pytest.raises(subprocess.CalledProcessError) as ours:
+ run("false", check=True)
+ with pytest.raises(subprocess.CalledProcessError) as original:
+ subprocess.run("false", check=True, universal_newlines=True)
+ assert ours.value.returncode == original.value.returncode
+ assert ours.value.cmd == original.value.cmd
+ assert ours.value.output == original.value.output
+ assert ours.value.stdout == original.value.stdout
+ assert ours.value.stderr == original.value.stderr
+
+
+def test_run_with_check_pass() -> None:
+ """Asure compatibility with subprocess.run when using check (return 0)."""
+ ours = run("true", check=True)
+ original = subprocess.run("true", check=True, universal_newlines=True)
+ assert ours.returncode == original.returncode
+ assert ours.args == original.args
+ assert ours.stdout == original.stdout
+ assert ours.stderr == original.stderr
+
+
+def test_run_compat() -> None:
+ """Assure compatiblity with subprocess.run()."""
+ cmd = ["seq", "10"]
+ ours = run(cmd)
+ original = subprocess.run(
+ cmd,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ universal_newlines=True,
+ check=False,
+ )
+ assert ours.returncode == original.returncode
+ assert ours.stdout == original.stdout
+ assert ours.stderr == original.stderr
+ assert ours.args == original.args
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/subprocess-tee-0.3.5/tox.ini
new/subprocess-tee-0.4.0/tox.ini
--- old/subprocess-tee-0.3.5/tox.ini 2021-10-05 12:08:12.000000000 +0200
+++ new/subprocess-tee-0.4.0/tox.ini 2022-11-25 01:45:26.000000000 +0100
@@ -27,7 +27,7 @@
TERM
setenv =
PIP_DISABLE_VERSION_CHECK=1
- PYTEST_REQPASS=16
+ PYTEST_REQPASS=15
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
commands =
@@ -63,16 +63,13 @@
# don't install package in this env
skip_install = true
deps =
- collective.checkdocs >= 0.2
- build >= 0.3.1.post1
- twine >= 1.14.0
+ build >= 0.9.0
+ twine >= 4.0.1
setenv =
commands =
rm -rfv {toxinidir}/dist/
python -m build \
- --sdist \
- --wheel \
--outdir {toxinidir}/dist/ \
{toxinidir}
# metadata validation
- python -m twine check {toxinidir}/dist/*
+ python -m twine check --strict {toxinidir}/dist/*