Repository: kevinconway/rpmvenv (language: python)

Issue:
Bump patch number to account for recent fix
Signed-off-by: Kevin Conway kevinjacobconway@gmail.com



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5ef58a0..c2d323f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,10 +16,10 @@ jobs:
     steps:
       - name: Checkhout
         uses: actions/checkout@v2
-      - name: Setup Python 3.7
+      - name: Setup Python 3.9
         uses: actions/setup-python@v2
         with:
-          python-version: 3.7
+          python-version: 3.9
       - name: Cache PyPI
         uses: actions/cache@v2
         with:
@@ -45,7 +45,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        pyver: ["2.7", "3.5", "3.6", "3.7"]
+        pyver: ["3.6", "3.7", "3.8", "3.9", "3.10"]
       fail-fast: true
     steps:
       - name: Install deps
@@ -65,7 +65,6 @@ jobs:
             ${{ runner.os }}-pip-${{ matrix.pyver }}-
       - name: Install dependencies
         run: |
-          if [[ "$(python --version 2>&1)" =~ Python\ (2\.*) ]]; then pip install -U jinja2; else echo "Skipping JINJA2 for $(python --version 2>&1)."; fi
           python -m pip install -r requirements.txt
           python -m pip install -r test-requirements.txt
           python -m pip install -e ./
@@ -73,8 +72,8 @@ jobs:
         env:
           PYTHONPATH: .
         run: |
-          py.test -v --skip-binary-strip --python-git-url="https://github.com/kevinconway/rpmvenv_manylinux_issue.git" tests/
-          py.test -v --python-git-url="https://github.com/kevinconway/rpmvenv_manylinux_issue.git" tests/
+          py.test -v --python_ver="python${{ matrix.pyver }}" --skip-binary-strip --python-git-url="https://github.com/kevinconway/rpmvenv_manylinux_issue.git" tests/
+          py.test -v --python_ver="python${{ matrix.pyver }}" --python-git-url="https://github.com/kevinconway/rpmvenv_manylinux_issue.git" tests/
   build-and-publish:
     name: Build and publish
     needs: test
@@ -82,10 +81,10 @@ jobs:
     if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
     steps:
       - uses: actions/checkout@v2
-      - name: Set up Python 2.7
+      - name: Set up Python 3.9
         uses: actions/setup-python@v2
         with:
-          python-version: 2.7
+          python-version: 3.9
       - name: Install pypa/build
         run: python -m pip install build
       - name: Build a binary wheel and a source tarball
diff --git a/README.rst b/README.rst
index e17c9e5..51ad47e 100644
--- a/README.rst
+++ b/README.rst
@@ -236,7 +236,7 @@ enabled by adding 'python_venv' to the list of enabled extensions.
         // The path in which to install the venv.
         "path": "/usr/share/python",
         // The python executable to use in the venv.
-        "python": "python2.7",
+        "python": "python3.9",
         // Optional flag to enable building an rpm with, without a setup.py file. Default is true if not present.
         "require_setup_py": true,
         // Names of requirements files to install in the venv.
diff --git a/requirements.txt b/requirements.txt
index 4573492..24151ef 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,4 @@
 jinja2==2.11.3
 venvctrl>=0.5.0,<2.0.0
-argparse>=1.4.0,<2.0.0
 confpy>=0.11.0,<2.0.0
-ordereddict>=1.1.0,<2.0.0
-semver>=2.9.1,<3.0.0
+semver>=2.9.1,<3.0.0
\ No newline at end of file
diff --git a/rpmvenv/extensions/files/option.py b/rpmvenv/extensions/files/option.py
index 7cae331..f1647ef 100644
--- a/rpmvenv/extensions/files/option.py
+++ b/rpmvenv/extensions/files/option.py
@@ -1,6 +1,7 @@
 """Confpy extension that supports using RPM file paths as config options."""
 
-from collections import MutableMapping, namedtuple
+from collections.abc import MutableMapping
+from collections import namedtuple
 
 from confpy.core import option
 
diff --git a/rpmvenv/spec.py b/rpmvenv/spec.py
index 3536aae..2293234 100644
--- a/rpmvenv/spec.py
+++ b/rpmvenv/spec.py
@@ -7,13 +7,7 @@
 
 import copy
 
-try:
-
-    from ordereddict import OrderedDict
-
-except ImportError:
-
-    from collections import OrderedDict
+from collections import OrderedDict
 
 from . import template
 
diff --git a/setup.py b/setup.py
index 2a53922..0186b1a 100644
--- a/setup.py
+++ b/setup.py
@@ -21,10 +21,8 @@
     install_requires=[
         "jinja2",
         "venvctrl",
-        "argparse",
         "confpy",
-        "ordereddict",
-        "semver<2.10",  # semver dropped support for legacy Python at 2.10.
+        "semver",
     ],
     entry_points={
         "console_scripts": [
diff --git a/tox.ini b/tox.ini
index a90fdbe..80c9a9b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py26,py27,py33,py34,py35,py36,py37,pep8,pyflakes,pylint
+envlist = py36,py37,py38,py39,py310,pep8,pyflakes,pylint
 
 [testenv]
 deps=


Test patch:
diff --git a/test-requirements.txt b/test-requirements.txt
index 62d8cf1..9953c89 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,5 +1,5 @@
-isort==4.2.15
+isort==5.10.1
 pycodestyle==2.8.0
-pyflakes==2.4.0; python_version=='2.7' or python_version>='3.4'
-pylint; python_version>='3.4'
-pytest==4.6.11
+pyflakes==2.4.0
+pylint==2.12.2
+pytest==6.2.5
diff --git a/tests/conftest.py b/tests/conftest.py
index b181658..41d73ea 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -21,9 +21,9 @@ def pytest_addoption(parser):
         default="https://github.com/kevinconway/rpmvenv.git",
     )
     parser.addoption(
-        "--python",
+        "--python_ver",
         help="Python version to use in the test.",
-        default="python2.7",
+        default="python3.9",
     )
     parser.addoption(
         "--skip-binary-strip",
@@ -40,7 +40,7 @@ def pytest_generate_tests(metafunc):
         )
 
     if "python" in metafunc.fixturenames:
-        metafunc.parametrize("python", (metafunc.config.option.python,))
+        metafunc.parametrize("python", (metafunc.config.option.python_ver,))
 
     if "skip_binary_strip" in metafunc.fixturenames:
         metafunc.parametrize(