Skip to content

docs: note the test suite requires Python 3.7 or higher - #405

Merged
AaronAtDuo merged 1 commit into
masterfrom
readme-python37-test-requirement
Jul 31, 2026
Merged

docs: note the test suite requires Python 3.7 or higher#405
AaronAtDuo merged 1 commit into
masterfrom
readme-python37-test-requirement

Conversation

@AaronAtDuo

Copy link
Copy Markdown
Contributor

Summary of the change

The Python test harness uses ssl.TLSVersion, added in Python 3.7, to build
the mock Duo server's TLS-version table. On distributions whose default
python3 is older — notably RHEL/Rocky 8, which ships Python 3.6 — mockduo.py
raises AttributeError: module 'ssl' has no attribute 'TLSVersion' on import,
so the mock server never starts and make check fails.

This is a test-only requirement: login_duo and pam_duo are C and have no
Python dependency (the min_tls feature uses OpenSSL's
SSL_CTX_set_min_proto_version, present on Rocky 8's OpenSSL 1.1.1). Only the
test harness needs the newer interpreter.

Update the README "Running the tests" section to:

  • State that the test suite requires Python 3.7 or higher, and that this is
    test-only.
  • Note that on distributions whose default python3 is older than 3.7 (e.g.
    Rocky 8), python3 on PATH must resolve to a newer interpreter before
    running the tests.
  • Correct the stale yum install python (which installs Python 2 on RHEL) and
    the bare python invocations to python3.

Test Plan

Documentation only; no code change.

This PR description was generated with AI assistance (Claude).

The Python test harness uses features added in Python 3.7 (the mock Duo
server builds its TLS-version table with ssl.TLSVersion), so make check
fails on distributions whose default python3 is older -- for example
RHEL/Rocky 8, which ships Python 3.6.

Update the README "Running the tests" section to state the 3.7 minimum,
clarify that this is a test-only requirement (login_duo and pam_duo have
no Python dependency), and note that on such distributions python3 on
PATH must resolve to a newer interpreter. Also correct the stale
"yum install python" (Python 2 on RHEL) and the bare "python" invocations
to python3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@AaronAtDuo
AaronAtDuo merged commit a70b39e into master Jul 31, 2026
3 checks passed
@AaronAtDuo
AaronAtDuo deleted the readme-python37-test-requirement branch July 31, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants