Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Python 3.6/3.7 support #534

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 6 additions & 100 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,6 @@ jobs:
# NOTE: $ podman run -it --rm \
# NOTE: quay.io/pypa/manylinux2014_x86_64 \
# NOTE: ls -1 /opt/python
- cp36-cp36m
- cp37-cp37m
- cp38-cp38
- cp39-cp39
- cp310-cp310
Expand All @@ -704,16 +702,6 @@ jobs:
qemu_arch: amd64
include:
# NOTE: manylinux2010 only on x86_64
- manylinux-python-target: cp36-cp36m
manylinux-image-target:
arch: x86_64
qemu_arch: amd64
manylinux-year-target: 2010
- manylinux-python-target: cp37-cp37m
manylinux-image-target:
arch: x86_64
qemu_arch: amd64
manylinux-year-target: 2010
- manylinux-python-target: cp38-cp38
manylinux-image-target:
arch: x86_64
Expand All @@ -730,16 +718,6 @@ jobs:
qemu_arch: amd64
manylinux-year-target: 2010
# NOTE: manylinux1 caps out at Python 3.9
- manylinux-python-target: cp36-cp36m
manylinux-image-target:
arch: x86_64
qemu_arch: amd64
manylinux-year-target: 1
- manylinux-python-target: cp37-cp37m
manylinux-image-target:
arch: x86_64
qemu_arch: amd64
manylinux-year-target: 1
- manylinux-python-target: cp38-cp38
manylinux-image-target:
arch: x86_64
Expand Down Expand Up @@ -800,8 +778,6 @@ jobs:
# NOTE: $ podman run -it --rm \
# NOTE: quay.io/pypa/manylinux2014_x86_64 \
# NOTE: ls -1 /opt/python
- cp36-cp36m
- cp37-cp37m
- cp38-cp38
- cp39-cp39
- cp310-cp310
Expand Down Expand Up @@ -866,8 +842,10 @@ jobs:
strategy:
matrix:
python-version:
- >-
3.10
- 3.9
- 3.8
- 3.7
runner-vm-os:
- ubuntu-22.04
store-sdist-to-artifact:
Expand All @@ -876,9 +854,6 @@ jobs:
- python-version: 3.12
runner-vm-os: ubuntu-22.04
store-sdist-to-artifact: true
- python-version: 3.6 # EOL, only provided for older OSs
runner-vm-os: ubuntu-20.04
store-sdist-to-artifact: false

env:
PEP517_BUILD_ARGS: --sdist
Expand Down Expand Up @@ -1068,19 +1043,9 @@ jobs:
target-container:
- tag: fedora:39
- tag: fedora:40
- tag: centos/centos:stream8
registry: quay.io
# No matching package to install: 'python3dist(wheel)'
# - tag: centos/centos:stream9
# registry: quay.io
- tag: ubi8/ubi:8.5
registry: registry.access.redhat.com
- tag: ubi8/ubi:8.6
registry: registry.access.redhat.com
- tag: ubi8/ubi:8.7
registry: registry.access.redhat.com
- tag: ubi8/ubi:8.8
registry: registry.access.redhat.com
- tag: ubi9/ubi:9.0.0
registry: registry.access.redhat.com
- tag: ubi9/ubi:9.1
Expand Down Expand Up @@ -1205,23 +1170,6 @@ jobs:
steps.distribution-meta.outputs.dist-tag
}}.noarch.rpm

- name: Install static test dependencies missing from UBI8
if: contains(matrix.target-container.tag, 'ubi8')
run: >-
rpm
-ivh
--nodeps
https://vault.centos.org/"$(
rpm --eval '%{rhel}'
)".4.2105/BaseOS/x86_64/os/Packages/openssh-8.0p1-6${{
steps.distribution-meta.outputs.dist-tag
}}_4.2.x86_64.rpm
https://rpmfind.net/linux/epel/"$(
rpm --eval '%{rhel}'
)"/Everything/x86_64/Packages/p/python3-toml-0.10.0-3${{
steps.distribution-meta.outputs.dist-tag
}}.noarch.rpm

- name: Install static test dependencies missing from all UBIs
if: contains(matrix.target-container.tag, 'ubi')
run: >-
Expand Down Expand Up @@ -1253,15 +1201,7 @@ jobs:
}}${{ steps.distribution-meta.outputs.dist-tag }}.noarch.rpm
https://rpmfind.net/linux/epel/"$(
rpm --eval '%{rhel}'
)"/Everything/x86_64/Packages/${{
contains(matrix.target-container.tag, 'ubi9')
&& 't'
|| 'p'
}}/${{
!contains(matrix.target-container.tag, 'ubi9')
&& 'python3-'
|| ''
}}tox-${{
)"/Everything/x86_64/Packages/t/tox-${{
contains(matrix.target-container.tag, 'ubi9')
&& '3.28.0-1'
|| '3.4.0-2'
Expand All @@ -1273,33 +1213,9 @@ jobs:
&& '1.9.0-3'
|| '1.7.1-1'
}}${{ steps.distribution-meta.outputs.dist-tag }}.noarch.rpm
https://${{
contains(matrix.target-container.tag, '8')
&& 'vault.centos.org'
|| 'rpmfind.net/linux'
}}/${{
contains(matrix.target-container.tag, 'ubi9')
&& 'epel'
|| 'centos'
}}/"$(
https://rpmfind.net/linux/epel/"$(
rpm --eval '%{rhel}'
)"${{
!contains(matrix.target-container.tag, 'ubi9')
&& '-stream'
|| ''
}}/${{
contains(matrix.target-container.tag, 'ubi9')
&& 'Everything'
|| 'AppStream'
}}/x86_64/${{
!contains(matrix.target-container.tag, 'ubi9')
&& 'os/'
|| ''
}}Packages/${{
contains(matrix.target-container.tag, 'ubi9')
&& 'p/'
|| ''
}}python3-coverage-${{
)"/Everything/x86_64/Packages/p/python3-coverage-${{
contains(matrix.target-container.tag, 'ubi9')
&& '6.2-1'
|| '4.5.1-9'
Expand Down Expand Up @@ -1408,17 +1324,12 @@ jobs:
- "3.10"
- 3.9
- 3.8
- 3.7
- 3.6
runner-vm-os:
- ubuntu-22.04
- ubuntu-20.04
dist-type:
- binary
- source
exclude:
- runner-vm-os: ubuntu-22.04
python-version: 3.6 # EOL, only provided for older OSs

uses: ./.github/workflows/reusable-tests.yml
with:
Expand Down Expand Up @@ -1450,16 +1361,11 @@ jobs:
- "3.10"
- 3.9
- 3.8
- 3.7
- 3.6
runner-vm-os:
- macos-13
dist-type:
- binary
- source
exclude:
- runner-vm-os: ubuntu-22.04
python-version: 3.6 # EOL, only provided for older OSs

uses: ./.github/workflows/reusable-tests.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The web view is @ https://ansible.github.io/pylibssh/.
Requirements
------------

You need Python 3.6+
You need Python 3.8+

pylibssh requires libssh to be installed in particular:

Expand Down
2 changes: 2 additions & 0 deletions docs/changelog-fragments/532.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Dropped support for Python 3.6 and Python 3.7
-- by :user:`Qalthos` and :user:`webknjaz`.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pylint: disable=invalid-name
# Requires Python 3.6+
# Requires Python 3.8+
webknjaz marked this conversation as resolved.
Show resolved Hide resolved
# Ref: https://www.sphinx-doc.org/en/master/usage/configuration.html
"""Configuration for the Sphinx documentation generator."""

Expand Down
2 changes: 1 addition & 1 deletion docs/installation_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CPython and OS versions so in 99% of cases, you may
seamlessly install |project| not needing any external
dependencies on your system.

It should be enough for you to just have Python 3.6+ and
It should be enough for you to just have Python 3.8+ and
a recent :std:doc:`pip <pip:index>` installed.

.. attention::
Expand Down
18 changes: 9 additions & 9 deletions packaging/rpm/ansible-pylibssh.spec
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@ Source2: %{pypi_source build 0.3.1.post1}
Source3: %{pypi_source Cython 0.29.32}
Source4: %{pypi_source packaging 20.9}
Source5: %{pypi_source setuptools 56.0.0}
Source6: %{pypi_source setuptools_scm 6.0.1}
Source7: %{pypi_source setuptools_scm_git_archive 1.4}
Source8: %{pypi_source toml 0.10.2}
Source6: %{pypi_source setuptools_scm 8.1.0}
Source8: %{pypi_source tomli 2.0.1}
Source9: %{pypi_source pep517 0.10.0}
Source10: %{pypi_source pip 21.1.1}
Source11: %{pypi_source pyparsing 2.4.7}
# RHEL specifically, not CentOS:
%if 0%{?centos} == 0
Source12: %{pypi_source importlib_metadata 4.0.1}
Source13: %{pypi_source zipp 3.4.1}
Source14: %{pypi_source typing_extensions 3.10.0.0}
Source14: %{pypi_source typing_extensions 4.12.2}
%endif
Source15: %{pypi_source pytest 6.2.4}
Source16: %{pypi_source pytest-cov 2.12.1}
Expand Down Expand Up @@ -145,11 +144,14 @@ PYTHONPATH="$(pwd)/bin" \
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE5}
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE6} --no-build-isolation
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE7}
%{__python3} -m pip install --no-deps -t bin %{SOURCE6}
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE8}
# RHEL specifically, not CentOS:
%if 0%{?centos} == 0
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE14}
%endif
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE11}
# RHEL specifically, not CentOS:
Expand All @@ -158,8 +160,6 @@ PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE12}
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE13}
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE14}
%endif
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE15}
Expand Down
7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ requires = [
"tomli; python_version < '3.11'", # needed by in-tree build backend `packaging/pep517_backend.py`

# Plugins
"setuptools-scm >= 7.0.0; python_version >= '3.7'",
# ^ supports git archives through a plugin
# | |
# supports git archives natively V
"setuptools-scm[toml] >= 3.5, < 7.0.0; python_version < '3.7'",
"setuptools-scm-git-archive >= 1.1; python_version < '3.7'",
"setuptools-scm >= 7.0.0",
]
backend-path = ["packaging"] # requires 'Pip>=20' or 'pep517>=0.6.0'
build-backend = "pep517_backend.hooks"
Expand Down
12 changes: 2 additions & 10 deletions requirements-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ packaging==21.3
# via setuptools-scm
pyparsing==3.0.9
# via packaging
setuptools-scm==6.4.2 ; python_version < "3.7"
setuptools-scm==7.1.0 ; python_version == "3.7.*"
setuptools-scm==8.1.0 ; python_version > "3.7"
# via -r -
setuptools-scm-git-archive==1.4 ; python_version < "3.7"
# via -r -
toml==0.10.2
setuptools-scm==8.1.0
# via -r -
tomli==1.2.3
# via setuptools-scm
Expand All @@ -28,9 +22,7 @@ wheel==0.37.1
# via -r -

# The following packages are considered to be unsafe in a requirements file:
setuptools==59.6.0 ; python_version < "3.7"
setuptools==68.0.0 ; python_version == "3.7.*"
setuptools==68.2.2 ; python_version > "3.7"
setuptools==68.2.2
# via
# -r -
# setuptools-scm
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ classifiers =
Operating System :: POSIX :: Linux

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
Expand All @@ -46,7 +44,7 @@ keywords =
libssh

[options]
python_requires = >=3.6
python_requires = >=3.8
# Ref:
# https://setuptools.readthedocs.io/en/latest/setuptools.html#using-a-src-layout
# (`src/` layout)
Expand Down
Loading