Skip to content

Add experimental OpenPGP HKPS pytest compliance suite#4711

Open
cobycloud wants to merge 3 commits into
masterfrom
ccdx/create-pytest-plugin-for-hkps-compliance/2025-10-13
Open

Add experimental OpenPGP HKPS pytest compliance suite#4711
cobycloud wants to merge 3 commits into
masterfrom
ccdx/create-pytest-plugin-for-hkps-compliance/2025-10-13

Conversation

@cobycloud

Copy link
Copy Markdown
Contributor

Summary

  • add the experimental openpgp_hkps_pytest package with a pytest plugin and fixtures for HKP/HKPS interoperability checks
  • include legacy HKP and HKP v2 asynchronous test modules plus packaging metadata and documentation
  • register the new package in the workspace manifest for tooling support

Testing

  • uv run --directory experimental/openpgp_hkps_pytest --package openpgp_hkps_pytest ruff format .
  • uv run --directory experimental/openpgp_hkps_pytest --package openpgp_hkps_pytest ruff check . --fix

https://chatgpt.com/codex/tasks/task_e_68ecac9c67fc8326b8f0775dc9fc13e5

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +63 to +76
def _load_asgi_app(import_paths: Iterable[str]) -> Optional[object]:
for import_path in import_paths:
try:
module_name, attribute = import_path.split(":", 1)
except ValueError:
continue
try:
module = import_module(module_name)
target = getattr(module, attribute)
except Exception:
continue
app = target() if callable(target) else target
if app is not None:
return app

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid invoking ASGI app objects as factories

The loader treats every imported target as a factory and calls it when callable(target) is true. Real ASGI applications (e.g., FastAPI/Starlette instances) are themselves callable and require (scope, receive, send) parameters, so calling them with no arguments raises TypeError and prevents the plugin from resolving the in-process server even though the path points to a valid app. This makes the default candidates such as hpks.app:app unusable and causes all tests to error instead of running. Only call objects that are zero‑arg factories (or inspect their signature) and return callable apps directly.

Useful? React with 👍 / 👎.

@cobycloud cobycloud force-pushed the mono/dev branch 25 times, most recently from 93c3606 to 99fdb63 Compare January 13, 2026 06:08
@cobycloud cobycloud force-pushed the mono/dev branch 21 times, most recently from 99c5e35 to 0f89d2e Compare January 13, 2026 06:13
Base automatically changed from mono/dev to master January 28, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant