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

Draft
wants to merge 9 commits into
base: devel
Choose a base branch
from
Draft
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
119 changes: 5 additions & 114 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,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 @@ -698,16 +696,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 @@ -724,16 +712,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 @@ -794,8 +772,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 @@ -856,22 +832,13 @@ jobs:
needs:
- build-changelog
- pre-setup # transitive, for accessing settings
runs-on: ${{ matrix.runner-vm-os }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.8
- 3.7
runner-vm-os:
- ubuntu-22.04
store-sdist-to-artifact:
- false
include:
- 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
- python-version: 3.8
store-sdist-to-artifact: false

env:
Expand Down Expand Up @@ -1063,19 +1030,9 @@ jobs:
- tag: fedora:38
- 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 All @@ -1102,13 +1059,6 @@ jobs:
matrix.target-container.tag
}}

continue-on-error: >-
${{
contains(matrix.target-container.tag, 'ubi9')
&& true
|| false
}}

steps:
- name: Produce artifact name
id: distribution-meta
Expand Down Expand Up @@ -1198,23 +1148,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 @@ -1246,15 +1179,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 @@ -1266,33 +1191,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 @@ -1401,17 +1302,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 @@ -1443,16 +1339,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
1 change: 1 addition & 0 deletions docs/changelog-fragments/532.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dropped support for Python 3.6/3.7 -- by :user:`Qalthos`.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
The RPM specification now opts out of demanding that the
compiled C-extensions have a Build ID present under EL 8
compiled C-extensions have a Build ID present under EL
-- by :user:`webknjaz`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The RPM specification has been updated to pre-build the
vendored copy of ``setuptools-scm`` with the isolation
disabled, addressing the build problem in EL 9
-- by :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+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, this patch doesn't upgrade anything in the Sphinx setup. So I'd leave it as is. OTOH, RTD is running Python 3.10. And GHA uses Python 3.11.

# 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
5 changes: 3 additions & 2 deletions packaging/rpm/ansible-pylibssh.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
%if 0%{?with_debug}
%global _dwz_low_mem_die_limit 0
%else
%if 0%{?rhel} == 8
# RHEL or CentOS:
%if 0%{?rhel}
# Prevent requiring a Build ID in the compiled shared objects
%global debug_package %{nil}
%endif
Expand Down Expand Up @@ -144,7 +145,7 @@ 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}
%{__python3} -m pip install --no-deps -t bin %{SOURCE6} --no-build-isolation
PYTHONPATH="$(pwd)/bin" \
%{__python3} -m pip install --no-deps -t bin %{SOURCE7}
PYTHONPATH="$(pwd)/bin" \
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
10 changes: 2 additions & 8 deletions requirements-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +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"
setuptools-scm==8.1.0
# via -r -
toml==0.10.2
# via -r -
Expand All @@ -28,9 +24,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