Skip to content

Conversation

@cobycloud
Copy link
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

Copy link

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

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

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 👍 / 👎.

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.

2 participants