#1111·howdy

[Bug] Python 3 compatibility: ConfigParser AttributeError and datetime.utcnow() DeprecationWarning (v2.6.1)

Author: AKRiLLiCKCreated May 12, 2026Updated Jul 27, 2026

Description

When utilizing the pam_python3.so wrapper on modern rolling-release distributions (e.g., Arch/EndeavourOS with Python 3.12+), Howdy 2.6.1 fails to execute the PAM hook due to a Python 2 syntax artifact. Furthermore, a deprecation warning in the comparison logic leaks into stderr during successful authentication.

Environment

  • OS: Arch Linux / EndeavourOS
  • Kernel: 7.0.2-cachyos
  • Python: 3.14
  • Howdy Version: 2.6.1

Errors

1. PAM Wrapper Crash (/lib/security/howdy/pam.py) Because Python 3 renamed the module to lowercase, instantiating configparser.configparser() throws: AttributeError: module 'configparser' has no attribute 'configparser'. Did you mean: 'ConfigParser'? This causes the module to return PAM_IGNORE, breaking the biometric auth chain.

2. Deprecation Warning (/lib/security/howdy/compare.py) DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).

Proposed Fix

In howdy/src/pam.py (Line 13): Change the class instantiation to maintain standard Python 3 capitalization:

python
# Old
config = configparser.configparser()
# New
config = configparser.ConfigParser()

In howdy/src/compare.py (Line 57): Update the datetime call to the modern, timezone-aware standard:

python
# Old
"Date: " + datetime.datetime.utcnow().strftime("%Y/%m/%d %H:%M:%S UTC"),
# New
"Date: " + datetime.datetime.now(datetime.UTC).strftime("%Y/%m/%d %H:%M:%S UTC"),