Skip to content

python-active-directory: Add version 2.0.1 - #2994

Draft
luhenry wants to merge 3 commits into
mainfrom
python-active-directory
Draft

luhenry wants to merge 3 commits into
mainfrom
python-active-directory

Conversation

@luhenry

@luhenry luhenry commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Compiles the one C extension in this LDAP/Active-Directory client, a thin wrapper over MIT Kerberos's credential-cache API. Upstream publishes no riscv64 wheel, and nothing past cp311 on any platform.

Upstream ships no CI workflow to mirror; built with cibuildwheel following the krb5-devel pattern ssh-python already uses on this image.

Differs from upstream

  • krb5-devel added - builds this package's own C extension
  • openldap-devel/cyrus-sasl-devel added - build python-ldap (install_requires), which has no riscv64 wheel anywhere and builds from its sdist here too

Testing

  • same as upstream (pytest tests/); the default test.conf.example skips every test that needs a real Active Directory server

License: MIT; the wheel also vendors the image's libkeyutils (GPL-2.0) off the same krb5 dependency chain ssh-python already vendors, so gpl_sources collects it and gcc's source.

CI will validate; local build skipped (low disk on this host).

An MIT-licensed LDAP/AD client with one small C extension
(activedirectory.protocol.krb5) that links directly against libkrb5 - no
GSSAPI, no SIMD, no vendored library tree. krb5-devel builds it; openldap-
devel and cyrus-sasl-devel are for python-ldap, an install_requires with no
riscv64 wheel anywhere (it has never published one on any platform) that
pip builds from its sdist. Default tests/test.conf.example disables the
tests that need a real Active Directory server, matching upstream's own
tox.ini. keyutils-libs is the one copyleft library expected off the same
krb5 dependency chain ssh-python already vendors on this image.
luhenry added a commit that referenced this pull request Oct 13, 2026
…ebsite.yml run

The cancel-in-progress expression made every pull_request-triggered run of
this workflow fail instantly with zero jobs scheduled (confirmed across
unrelated PRs: #2993, #2994, #2995, #2996, #2997, and the docs-update bot
PR #2915), regardless of branch. Reverting to the known-good static false.
@luhenry
luhenry marked this pull request as draft October 13, 2026 09:26
Every riscv64 job built the wheel, then failed in the test step:
activedirectory.util.compat does `from distutils import version` at
import time, and distutils was removed from the standard library in
Python 3.12 (PEP 632), so the conftest import dies with
ModuleNotFoundError on cp312, cp313, cp314 and cp314t alike.

It only used StrictVersion to compare python-ldap's version against
2.4.0. Carry a patch that replaces those checks with a (major, minor)
tuple comparison instead of adding setuptools to the test requirements,
which would have hidden that the shipped wheel cannot be imported on
3.12+ without setuptools installed.
With the distutils patch in place every riscv64 job gets through the
test suite, but tests/protocol/test_netlogon.py::TestDecoder::
test_real_packet fails on cp312, cp313, cp314 and cp314t alike:
"assert b'Test-Site' == b'Default-First-Site'".

The failure is not riscv64-specific. netlogon.Decoder.parse() decodes
DcSiteName before ClientSiteName, the NETLOGON_SAM_LOGON_RESPONSE_EX
order from MS-ADTS; releases up to 1.0.5 decoded them the other way
round, and the test still asserts that old assignment. The fixture
packet carries "Default-First-Site" as the DC site and "Test-Site" as
the client site. Reproduced on x86_64 with Python 3.12 and 3.13 against
the v2.0.1 tree.

Carry a patch that swaps the two expected values instead of deselecting
the test, so the decoder keeps its only real-packet coverage.

This branch has not been deployed

No deployments
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.

1 participant