Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pypsexec for openSUSE:Factory 
checked in at 2021-10-26 20:13:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pypsexec (Old)
 and      /work/SRC/openSUSE:Factory/.python-pypsexec.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pypsexec"

Tue Oct 26 20:13:47 2021 rev:3 rq:927366 version:0.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pypsexec/python-pypsexec.changes  
2020-12-16 11:00:23.331564079 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pypsexec.new.1890/python-pypsexec.changes    
    2021-10-26 20:14:28.330034478 +0200
@@ -1,0 +2,7 @@
+Mon Oct 25 19:48:37 UTC 2021 - Martin Hauke <[email protected]>
+
+- Update to version 0.3.0
+  * Dropped Python 2.7 and 3.5, new minimum is 3.6
+  * Updated the PAExec executable to 1.29
+
+-------------------------------------------------------------------

Old:
----
  python-pypsexec-0.2.0.tar.gz

New:
----
  python-pypsexec-0.3.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pypsexec.spec ++++++
--- /var/tmp/diff_new_pack.2RfEoS/_old  2021-10-26 20:14:28.862034759 +0200
+++ /var/tmp/diff_new_pack.2RfEoS/_new  2021-10-26 20:14:28.866034760 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pypsexec
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pypsexec
-Version:        0.2.0
+Version:        0.3.0
 Release:        0
 Summary:        Run commands on a remote Windows host using SMB/RPC
 License:        MIT

++++++ python-pypsexec-0.2.0.tar.gz -> python-pypsexec-0.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/.github/workflows/ci.yml 
new/pypsexec-0.3.0/.github/workflows/ci.yml
--- old/pypsexec-0.2.0/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 
+0100
+++ new/pypsexec-0.3.0/.github/workflows/ci.yml 2021-10-21 22:27:07.000000000 
+0200
@@ -0,0 +1,125 @@
+name: Test pypsexec
+on:
+  push:
+    branches:
+    - master
+    paths-ignore:
+    - CHANGELOG.md
+    - LICENSE
+    - README.md
+
+  pull_request:
+    branches:
+    - master
+    paths-ignore:
+    - CHANGELOG.md
+    - LICENSE
+    - README.md
+
+  release:
+    types:
+    - published
+
+  schedule:
+  - cron: 0 9 * * *
+
+jobs:
+  test:
+    name: test
+    runs-on: ${{ matrix.os }}
+
+    strategy:
+      fail-fast: false
+      matrix:
+        os:
+        - ubuntu-latest
+        - windows-latest
+        python-version:
+        - 3.6
+        - 3.7
+        - 3.8
+        - 3.9
+        - '3.10'
+        python-arch:
+        - x86
+        - x64
+
+        exclude:
+        - os: ubuntu-latest
+          python-arch: x86
+
+    steps:
+    - uses: actions/checkout@v2
+
+    - uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+        architecture: ${{ matrix.python-arch }}
+
+    - name: Extract OS name
+      shell: bash
+      run: |
+        echo "##[set-output name=name;]$( echo '${{ matrix.os }}' | tr '-' ' ' 
| awk '{print $1}' )"
+      id: os
+
+    - name: Test
+      shell: bash
+      run: |
+        if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
+            build_helpers/run-ci.sh
+        else
+            sudo -E build_helpers/run-ci.sh
+        fi
+      env:
+        PYTEST_ADDOPTS: --color=yes
+
+    - name: Upload Test Results
+      if: always()
+      uses: actions/upload-artifact@v2
+      with:
+        name: Unit Test Results (${{ matrix.os }} ${{ matrix.python-version }} 
${{ matrix.python-arch }})
+        path: ./junit/test-results.xml
+
+    - name: Upload Coverage Results
+      if: always()
+      uses: actions/upload-artifact@v2
+      with:
+        name: Coverage Results (${{ matrix.os }} ${{ matrix.python-version }} 
${{ matrix.python-arch }})
+        path: ./coverage.xml
+
+    - name: Upload Coverage to codecov
+      if: always()
+      uses: codecov/codecov-action@v2
+      with:
+        files: ./coverage.xml
+        flags: ${{ steps.os.outputs.name }},py${{ matrix.python-version }},${{ 
matrix.python-arch }}
+
+  publish:
+    name: publish
+    needs:
+    - test
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+
+    - name: Set up Python
+      uses: actions/setup-python@v2
+
+    - name: Installing baseline packages
+      run: python -m pip install --upgrade pip setuptools wheel
+
+    - name: Build package
+      run: python setup.py sdist bdist_wheel
+
+    - name: Capture Wheel and SDist
+      uses: actions/upload-artifact@v2
+      with:
+        name: artifact
+        path: dist/*
+
+    - name: Publish
+      if: startsWith(github.ref, 'refs/tags/v')
+      uses: pypa/gh-action-pypi-publish@release/v1
+      with:
+        user: __token__
+        password: ${{ secrets.PYPI_API_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/CHANGELOG.md 
new/pypsexec-0.3.0/CHANGELOG.md
--- old/pypsexec-0.2.0/CHANGELOG.md     2020-12-14 11:54:48.000000000 +0100
+++ new/pypsexec-0.3.0/CHANGELOG.md     2021-10-21 22:27:07.000000000 +0200
@@ -1,5 +1,11 @@
 # Changelog
 
+## 0.3.0 - 2021-10-22
+
+* Dropped Python 2.7 and 3.5, new minimum is 3.6
+* Updated the `PAExec` executable to `1.29`
+
+
 ## 0.2.0 - 2020-12-14
 
 * Breaking change where processes are run as the native architecture bitness, 
e.g. 64-bit on 64-bit OS' and 32-bit on 32-bit OS'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/README.md new/pypsexec-0.3.0/README.md
--- old/pypsexec-0.2.0/README.md        2020-12-14 11:54:48.000000000 +0100
+++ new/pypsexec-0.3.0/README.md        2021-10-21 22:27:07.000000000 +0200
@@ -1,6 +1,6 @@
 # Python PsExec Library
 
-[![Build 
Status](https://dev.azure.com/jborean93/jborean93/_apis/build/status/jborean93.pypsexec?branchName=master)](https://dev.azure.com/jborean93/jborean93/_build/latest?definitionId=7&branchName=master)
+[![Test 
workflow](https://github.com/jborean93/pypsexec/actions/workflows/ci.yml/badge.svg)](https://github.com/jborean93/pypsexec/actions/workflows/ci.yml)
 
[![codecov](https://codecov.io/gh/jborean93/pypsexec/branch/master/graph/badge.svg?token=Hi2Nk4RfMF)](https://codecov.io/gh/jborean93/pypsexec)
 [![PyPI 
version](https://badge.fury.io/py/pypsexec.svg)](https://badge.fury.io/py/pypsexec)
 
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jborean93/pypsexec/blob/master/LICENSE)
@@ -78,23 +78,24 @@
 
 ## Requirements
 
-* Python 2.7, 2.7, 3.4-3.6
+* Python 3.6+
 * [smbprotocol](https://github.com/jborean93/smbprotocol)
 
 To install pypsexec, simply run
 
-`pip install pypsexec`
+```bash
+pip install pypsexec
+```
 
 This will download the required packages that are required and get your
 Python environment ready to do.
 
 Out of the box, pypsexec supports authenticating to a Windows host with NTLM
 authentication but users in a domain environment can take advantage of Kerberos
-authentication as well for added security. Currently the Windows implementation
-of the smbprotocol does not support Kerberos auth but for other platforms you
-can add support by installing the kerberos components of `smbprotocol`;
+authentication as well for added security. The Kerberos libraries are an
+optional install which can be installed with;
 
-```
+```bash
 # for Debian/Ubuntu/etc:
 sudo apt-get install gcc python-dev libkrb5-dev
 pip install smbprotocol[kerberos]
@@ -104,21 +105,6 @@
 pip install smbprotocol[kerberos]
 ```
 
-From there to check that everything was installed correctly and the correct
-GSSAPI extensions are available on that host, run
-
-```
-try:
-    from gssapi.raw import inquire_sec_context_by_oid
-    print("python-gssapi extension is available")
-except ImportError as exc:
-    print("python-gssapi extension is not available: %s" % str(exc))
-```
-
-If it isn't available, then either a newer version of the system's gssapi
-implementation needs to be setup and python-gssapi compiled against that newer
-version.
-
 
 ## Remote Host Requirements
 
@@ -140,7 +126,7 @@
 pypsexec can connect to the host. To do this run either one of the following
 commands;
 
-```
+```powershell
 # PowerShell (Windows 8 and Server 2012 or Newer)
 Set-NetFirewallRule -Name FPS-SMB-In-TCP -Enabled True
 
@@ -175,7 +161,7 @@
 To set `LocalAccountTokenFilterPolicy` to allow a full token on a remote logon,
 run the following PowerShell commands;
 
-```
+```powershell
 $reg_path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
 $reg_prop_name = "LocalAccountTokenFilterPolicy"
 
@@ -191,7 +177,7 @@
 To get the name of the builtin Administrator (SID `S-1-5-21-*-500`), you can
 run the following PowerShell commands;
 
-```
+```powershell
 Add-Type -AssemblyName System.DirectoryServices.AccountManagement
 $principal_context = New-Object -TypeName 
System.DirectoryServices.AccountManagement.PrincipalContext([System.DirectoryServices.AccountManagement.ContextType]::Machine)
 $user_principal = New-Object -TypeName 
System.DirectoryServices.AccountManagement.UserPrincipal($principal_context)
@@ -205,7 +191,7 @@
 will reduce the security of your Windows host, but to do so you can run the
 following PowerShell commands;
 
-```
+```powershell
 $reg_path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
 $reg_prop_name = "EnableLUA"
 
@@ -226,7 +212,7 @@
 
 Here is an example of how to run a command with this library
 
-```
+```python
 from pypsexec.client import Client
 
 # creates an encrypted connection to the host with the username and password
@@ -278,7 +264,7 @@
 named they can build up over time. They can be manually removed but you can
 also use pypsexec to cleanup them all up at once. To do this run
 
-```
+```python
 from pypsexec.client import Client
 
 c = Client("server", username="username", password="password")
@@ -341,7 +327,7 @@
 A way to enable the logging in your scripts through code is to add the
 following to the top of the script being used;
 
-```
+```python
 import logging
 
 logger = logging.getLogger("pypsexec")
@@ -365,7 +351,7 @@
 To this module, you need to install some pre-requisites first. This can be done
 by running;
 
-```
+```bash
 pip install -r requirements-test.txt
 
 # you can also run tox by installing tox
@@ -374,7 +360,7 @@
 
 From there to run the basic tests run;
 
-```
+```bash
 py.test -v --cov pypsexec --cov-report term-missing
 
 # or with tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/azure-pipelines.yml 
new/pypsexec-0.3.0/azure-pipelines.yml
--- old/pypsexec-0.2.0/azure-pipelines.yml      2020-12-14 11:54:48.000000000 
+0100
+++ new/pypsexec-0.3.0/azure-pipelines.yml      1970-01-01 01:00:00.000000000 
+0100
@@ -1,233 +0,0 @@
-trigger:
-  branches:
-    include:
-    - master
-  tags:
-    include:
-    - v*
-  paths:
-    exclude:
-    - CHANGELOG.md
-    - LICENSE
-    - README.md
-
-schedules:
-- cron: 0 14 * * 0
-  displayName: Weekly CI build
-  branches:
-    include:
-    - master
-  always: true
-
-stages:
-- stage: Test
-  jobs:
-
-  - job: Test_Linux
-    pool:
-      vmImage: ubuntu-18.04
-    strategy:
-      matrix:
-        Python27:
-          python.version: 2.7
-        Python35:
-          python.version: 3.5
-        Python36:
-          python.version: 3.6
-        Python37:
-          python.version: 3.7
-        Python38:
-          python.version: 3.8
-        Python39:
-          python.version: 3.9
-
-    steps:
-    - task: UsePythonVersion@0
-      inputs:
-        versionSpec: $(python.version)
-
-    - script: |
-        echo "Installing baseline pip packages"
-        python -m pip install --upgrade pip setuptools wheel coverage -c 
tests/constraints.txt
-
-        echo "Installing test requirements"
-        python -m pip install -r requirements-test.txt -c tests/constraints.txt
-
-        echo "Installing package"
-        python -m pip install . -c tests/constraints.txt
-
-        echo "Show python packages"
-        python -m pip list
-      displayName: Install
-
-    - script: |
-        python -m pycodestyle pypsexec --verbose --show-source --statistics
-      displayName: Lint
-
-    - script: |
-        pytest -v --junitxml junit/test-results.xml --cov pypsexec 
--cov-report xml --cov-report term-missing
-      displayName: Test
-
-    - task: PublishTestResults@2
-      inputs:
-        testResultsFiles: '**/test-*.xml'
-        testRunTitle: $(Agent.OS) - $(Build.BuildNumber) - Python 
$(python.version)
-      displayName: Publish test results
-      condition: succeededOrFailed()
-
-    - task: PublishCodeCoverageResults@1
-      inputs:
-        codeCoverageTool: Cobertura
-        summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml
-
-    - script: |
-        bash <(curl -s https://codecov.io/bash)
-      displayName: Upload to codecov.io
-      continueOnError: true
-      timeoutInMinutes: 5
-
-  - job: Test_Windows
-    timeoutInMinutes: 5  # Need to stabilise tests a bit more
-    variables:
-      pypsexec_alt_username: PSExecTest
-      pypsexec_alt_password: Password01!
-    pool:
-      vmImage: windows-2019
-    strategy:
-      matrix:
-        Python27-x86:
-          python.version: 2.7
-          python.arch: x86
-        Python27-x64:
-          python.version: 2.7
-          python.arch: x64
-        Python35-x86:
-          python.version: 3.5
-          python.arch: x86
-        Python35-x64:
-          python.version: 3.5
-          python.arch: x64
-        Python36-x86:
-          python.version: 3.6
-          python.arch: x86
-        Python36-x64:
-          python.version: 3.6
-          python.arch: x64
-        Python37-x86:
-          python.version: 3.7
-          python.arch: x86
-        Python37-x64:
-          python.version: 3.7
-          python.arch: x64
-        Python38-x86:
-          python.version: 3.8
-          python.arch: x86
-        Python38-x64:
-          python.version: 3.8
-          python.arch: x64
-        Python39-x86:
-          python.version: 3.9
-          python.arch: x86
-        Python39-x64:
-          python.version: 3.9
-          python.arch: x64
-
-    steps:
-    - task: UsePythonVersion@0
-      inputs:
-        versionSpec: $(python.version)
-        architecture: $(python.arch)
-
-    - powershell: |
-        Write-Host 'Create local admin user'
-        $userParams = @{
-            Name = '$(pypsexec_alt_username)'
-            Password = (ConvertTo-SecureString -AsPlainText -Force -String 
'$(pypsexec_alt_password)')
-            AccountNeverExpires = $true
-            PasswordNeverExpires = $true
-        }
-        $null = New-LocalUser @userParams
-        Add-LocalGroupMember -Group Administrators -Member $userParams.Name
-      displayName: Set up pypsexec test account and service
-
-    - script: |
-        echo "Installing baseline pip packages"
-        python -m pip install --upgrade pip setuptools wheel coverage -c 
tests/constraints.txt
-
-        echo "Installing test requirements"
-        python -m pip install -r requirements-test.txt -c tests/constraints.txt
-
-        echo "Installing package"
-        python -m pip install . -c tests/constraints.txt
-
-        echo "Show python packages"
-        python -m pip list
-      displayName: Install
-
-    - script: |
-        python -m pycodestyle pypsexec --verbose --show-source --statistics
-      displayName: Lint
-
-    - script: |
-        pytest -v --junitxml junit/test-results.xml --cov pypsexec 
--cov-report xml --cov-report term-missing
-      env:
-        PYPSEXEC_SERVER: localhost
-        PYPSEXEC_ALT_USERNAME: $(pypsexec_alt_username)
-        PYPSEXEC_ALT_PASSWORD: $(pypsexec_alt_password)
-      displayName: Test
-
-    - task: PublishTestResults@2
-      inputs:
-        testResultsFiles: '**/test-*.xml'
-        testRunTitle: $(Agent.OS) - $(Build.BuildNumber) - Python 
$(python.version) $(python.arch)
-      displayName: Publish test results
-      condition: succeededOrFailed()
-
-    - task: PublishCodeCoverageResults@1
-      inputs:
-        codeCoverageTool: Cobertura
-        summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage.xml
-
-    - script: |
-        choco.exe install codecov --yes --no-progress
-        codecov.exe -f coverage.xml
-      displayName: Upload to codecov.io
-      continueOnError: true
-      timeoutInMinutes: 5
-
-- stage: Publish
-  jobs:
-
-  - job: Publish
-    pool:
-      vmImage: ubuntu-18.04
-
-    steps:
-    - task: UsePythonVersion@0
-      inputs:
-        versionSpec: 3.8
-
-    - script: |
-        python -m pip install twine wheel -c tests/constraints.txt
-      displayName: Install build requirements
-
-    - script: |
-        python setup.py bdist_wheel --universal
-        python setup.py sdist
-      displayName: Build universal wheel and sdist
-
-    - task: PublishBuildArtifacts@1
-      inputs:
-        pathToPublish: dist
-        artifactName: wheels
-
-    - task: TwineAuthenticate@1
-      displayName: Twine Authenticate
-      condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 
'refs/tags/v'))
-      inputs:
-        pythonUploadServiceConnection: pypi
-
-    - script: |
-        python -m twine upload -r pypi --config-file $(PYPIRC_PATH) dist/*
-      condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 
'refs/tags/v'))
-      displayName: Publish artifact to Pypi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/build_helpers/lib.sh 
new/pypsexec-0.3.0/build_helpers/lib.sh
--- old/pypsexec-0.2.0/build_helpers/lib.sh     1970-01-01 01:00:00.000000000 
+0100
+++ new/pypsexec-0.3.0/build_helpers/lib.sh     2021-10-21 22:27:07.000000000 
+0200
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+
+lib::setup::windows_requirements() {
+    echo "Installing Windows pre-requisites"
+
+    export PYPSEXEC_SERVER=localhost
+    export PYPSEXEC_ALT_USERNAME=PSExecTest
+    export PYPSEXEC_ALT_PASSWORD=Password123
+
+    powershell.exe -NoLogo -NoProfile \
+        -File ./build_helpers/win-setup.ps1 \
+        -UserName "${PYPSEXEC_ALT_USERNAME}" \
+        -Password "${PYPSEXEC_ALT_PASSWORD}" \
+        -InformationAction Continue
+}
+
+lib::setup::system_requirements() {
+    if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then
+        echo "::group::Installing System Requirements"
+    fi
+
+    if [ -f /etc/debian_version ]; then
+        echo "No requirements required for Linux"
+
+    elif [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
+        lib::setup::windows_requirements
+
+    else
+        echo "Distro not found!"
+        false
+    fi
+
+    if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then
+        echo "::endgroup::"
+    fi
+}
+
+lib::setup::python_requirements() {
+    if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then
+        echo "::group::Installing Python Requirements"
+    fi
+
+    echo "Upgrading baseline packages"
+    python -m pip install --upgrade pip setuptools wheel
+
+    echo "Installing pypsexec"
+    python -m pip install .
+
+    echo "Install test requirements"
+    python -m pip install -r requirements-test.txt
+
+    if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then
+        echo "::endgroup::"
+    fi
+}
+
+lib::sanity::run() {
+    if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then
+        echo "::group::Running Sanity Checks"
+    fi
+
+    python -m pycodestyle \
+        pypsexec \
+        --verbose \
+        --show-source \
+        --statistics
+
+    if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then
+        echo "::endgroup::"
+    fi
+}
+
+lib::tests::run() {
+    if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then
+        echo "::group::Running Tests"
+    fi
+
+    python -m pytest \
+        --verbose \
+        --junitxml junit/test-results.xml \
+        --cov pypsexec \
+        --cov-report xml \
+        --cov-report term-missing
+
+    if [ x"${GITHUB_ACTIONS}" = "xtrue" ]; then
+        echo "::endgroup::"
+    fi
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/build_helpers/run-ci.sh 
new/pypsexec-0.3.0/build_helpers/run-ci.sh
--- old/pypsexec-0.2.0/build_helpers/run-ci.sh  1970-01-01 01:00:00.000000000 
+0100
+++ new/pypsexec-0.3.0/build_helpers/run-ci.sh  2021-10-21 22:27:07.000000000 
+0200
@@ -0,0 +1,8 @@
+#!/bin/bash -ex
+
+source ./build_helpers/lib.sh
+
+lib::setup::system_requirements
+lib::setup::python_requirements
+lib::sanity::run
+lib::tests::run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/build_helpers/win-setup.ps1 
new/pypsexec-0.3.0/build_helpers/win-setup.ps1
--- old/pypsexec-0.2.0/build_helpers/win-setup.ps1      1970-01-01 
01:00:00.000000000 +0100
+++ new/pypsexec-0.3.0/build_helpers/win-setup.ps1      2021-10-21 
22:27:07.000000000 +0200
@@ -0,0 +1,30 @@
+[CmdletBinding()]
+param (
+    [Parameter(Mandatory)]
+    [String]
+    $UserName,
+
+    [Parameter(Mandatory)]
+    [String]
+    $Password
+)
+
+Write-Information -MessageData "Allow local admins over network auth"
+$regInfo = @{
+    Path         = 
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
+    Name         = "LocalAccountTokenFilterPolicy"
+    Value        = 1
+    PropertyType = "DWord"
+    Force        = $true
+}
+New-ItemProperty @regInfo
+
+Write-Information -MessageData "Create local admin user"
+$userParams = @{
+    Name                 = $UserName
+    Password             = (ConvertTo-SecureString -AsPlainText -Force -String 
$Password)
+    AccountNeverExpires  = $true
+    PasswordNeverExpires = $true
+}
+$null = New-LocalUser @userParams
+Add-LocalGroupMember -Group Administrators -Member $userParams.Name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/pypsexec/__init__.py 
new/pypsexec-0.3.0/pypsexec/__init__.py
--- old/pypsexec-0.2.0/pypsexec/__init__.py     2020-12-14 11:54:48.000000000 
+0100
+++ new/pypsexec-0.3.0/pypsexec/__init__.py     2021-10-21 22:27:07.000000000 
+0200
@@ -4,12 +4,8 @@
 
 import logging
 
-try:
-    from logging import NullHandler
-except ImportError:
-    class NullHandler(logging.Handler):
-        def emit(self, record):
-            pass
+from logging import NullHandler
+
 
 logger = logging.getLogger(__name__)
 logger.addHandler(NullHandler())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/pypsexec/client.py 
new/pypsexec-0.3.0/pypsexec/client.py
--- old/pypsexec-0.2.0/pypsexec/client.py       2020-12-14 11:54:48.000000000 
+0100
+++ new/pypsexec-0.3.0/pypsexec/client.py       2021-10-21 22:27:07.000000000 
+0200
@@ -5,10 +5,11 @@
 import logging
 import os
 import socket
-import sys
 import time
 import uuid
 
+from queue import Empty
+
 from smbprotocol.connection import (
     Connection,
     NtStatus,
@@ -66,10 +67,6 @@
     ServiceType,
 )
 
-if sys.version[0] == '2':
-    from Queue import Empty
-else:
-    from queue import Empty
 
 log = logging.getLogger(__name__)
 
Binary files old/pypsexec-0.2.0/pypsexec/paexec.exe and 
new/pypsexec-0.3.0/pypsexec/paexec.exe differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/pypsexec/pipe.py 
new/pypsexec-0.3.0/pypsexec/pipe.py
--- old/pypsexec-0.2.0/pypsexec/pipe.py 2020-12-14 11:54:48.000000000 +0100
+++ new/pypsexec-0.3.0/pypsexec/pipe.py 2021-10-21 22:27:07.000000000 +0200
@@ -15,10 +15,6 @@
     OrderedDict,
 )
 
-from six import (
-    with_metaclass,
-)
-
 from smbprotocol.connection import (
     NtStatus,
 )
@@ -168,7 +164,7 @@
         self.pipe.close(get_attributes=False)
 
 
-class OutputPipe(with_metaclass(ABCMeta, threading.Thread)):
+class OutputPipe(threading.Thread, metaclass=ABCMeta):
 
     def __init__(self, tree, name):
         """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/setup.py new/pypsexec-0.3.0/setup.py
--- old/pypsexec-0.2.0/setup.py 2020-12-14 11:54:48.000000000 +0100
+++ new/pypsexec-0.3.0/setup.py 2021-10-21 22:27:07.000000000 +0200
@@ -18,14 +18,13 @@
 
 setup(
     name='pypsexec',
-    version='0.2.0',
+    version='0.3.0',
     packages=['pypsexec'],
     install_requires=[
         'smbprotocol',
-        'six',
     ],
     include_package_data=True,
-    python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
+    python_requires='>=3.6',
     author='Jordan Borean',
     author_email='[email protected]',
     url='https://github.com/jborean93/pypsexec',
@@ -37,13 +36,11 @@
     classifiers=[
         'Development Status :: 4 - Beta',
         'License :: OSI Approved :: MIT License',
-        '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',
         'Programming Language :: Python :: 3.9',
+        'Programming Language :: Python :: 3.10',
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/tests/constraints.txt 
new/pypsexec-0.3.0/tests/constraints.txt
--- old/pypsexec-0.2.0/tests/constraints.txt    2020-12-14 11:54:48.000000000 
+0100
+++ new/pypsexec-0.3.0/tests/constraints.txt    1970-01-01 01:00:00.000000000 
+0100
@@ -1 +0,0 @@
-pytest >= 3.6 ; python_version > "2.7"  # Make sure other Python versions use 
a newer version of pytest
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/tests/test_client.py 
new/pypsexec-0.3.0/tests/test_client.py
--- old/pypsexec-0.2.0/tests/test_client.py     2020-12-14 11:54:48.000000000 
+0100
+++ new/pypsexec-0.3.0/tests/test_client.py     2021-10-21 22:27:07.000000000 
+0200
@@ -275,7 +275,7 @@
                                   username="fakeuser",
                                   password="fakepassword")
         assert str(exc.value) == "Received exception from remote PAExec " \
-                                 "service: Error logging in as fakeuser The " \
+                                 "service: Error logging in as fakeuser. The " 
\
                                  "user name or password is incorrect. " \
                                  "[Err=0x52E, 1326]\r\n"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/tests/test_paexec.py 
new/pypsexec-0.3.0/tests/test_paexec.py
--- old/pypsexec-0.2.0/tests/test_paexec.py     2020-12-14 11:54:48.000000000 
+0100
+++ new/pypsexec-0.3.0/tests/test_paexec.py     2021-10-21 22:27:07.000000000 
+0200
@@ -28,16 +28,10 @@
 
 
 def test_paexec_out_stream():
-    count = 0
     actual = b""
     for (data, offset) in paexec_out_stream(4096):
-        count += 1
         actual += data
-        if count == 49:
-            assert len(actual) == 199304
-        else:
-            assert len(actual) == count * 4096
-    assert count == 49
+
     assert actual == pkgutil.get_data('pypsexec', 'paexec.exe')
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pypsexec-0.2.0/tests/test_scmr.py 
new/pypsexec-0.3.0/tests/test_scmr.py
--- old/pypsexec-0.2.0/tests/test_scmr.py       2020-12-14 11:54:48.000000000 
+0100
+++ new/pypsexec-0.3.0/tests/test_scmr.py       2021-10-21 22:27:07.000000000 
+0200
@@ -2,16 +2,11 @@
 # Copyright: (c) 2019, Jordan Borean (@jborean93) <[email protected]>
 # MIT License (see LICENSE or https://opensource.org/licenses/MIT)
 
-import binascii
 import os
 import pkgutil
 import pytest
 import uuid
 
-from six import (
-    string_types,
-)
-
 from smbprotocol.connection import (
     Connection,
 )
@@ -360,8 +355,8 @@
                                                  SERVICE_STATE_ALL)
 
             assert len(actual) > 0
-            assert isinstance(actual[0]['display_name'], string_types)
-            assert isinstance(actual[0]['service_name'], string_types)
+            assert isinstance(actual[0]['display_name'], str)
+            assert isinstance(actual[0]['service_name'], str)
             assert isinstance(actual[0]['service_status'], ServiceStatus)
         finally:
             if scmr_handle:
@@ -385,8 +380,8 @@
                                                  EnumServiceState.
                                                  SERVICE_STATE_ALL)
             assert len(actual) > 0
-            assert isinstance(actual[0]['display_name'], string_types)
-            assert isinstance(actual[0]['service_name'], string_types)
+            assert isinstance(actual[0]['display_name'], str)
+            assert isinstance(actual[0]['service_name'], str)
             assert isinstance(actual[0]['service_status'], ServiceStatus)
         finally:
             if scmr_handle:

Reply via email to