Skip to content

pluggy: add pluggy==1.6.0 to site-packages-base + smoke test#176

Merged
ppenna merged 1 commit into
mainfrom
feat/port-pluggy
May 7, 2026
Merged

pluggy: add pluggy==1.6.0 to site-packages-base + smoke test#176
ppenna merged 1 commit into
mainfrom
feat/port-pluggy

Conversation

@ada-x64
Copy link
Copy Markdown
Contributor

@ada-x64 ada-x64 commented May 6, 2026

Ports pluggy 1.6.0 by appending one pinned line to the existing pure-Python manifest and adding a smoke test in the upstream convention. The smoke exercises the HookspecMarker / HookimplMarker / PluginManager round-trip path (which transitively exercises inspect.signature) and deliberately does not exercise load_setuptools_entrypoints() — see the caveat below.

Closes #95.

Decisions

  • Install pathway: requirements/site-packages-base.txt + the existing pip --target flow driven by .nanvix/z.py. No vendoring, no Modules/Setup.local, no .nanvix/pluggy.py, no patches/pluggy/.
  • Acceptance bar: a single-file tests/func/test_NNN_<pkg>.py smoke test in the upstream convention; pluggy's upstream testing/*.py suite is not run (it requires pytest, which pluggy is the prerequisite for).
  • Smoke shape: the canonical test_020_click.py shape (module docstring, line-buffered stdout, single try: block, PASS/FAIL+exit-1). Lands as test_109_pluggy.py.
  • Bucket placement: # Core utilities in -base.txt, alongside tenacity/filelock/packaging (small standalone utility libraries; pluggy's runtime profile is zero Requires-Dist). Alphabetically inserted between packaging==23.2 and schedule==1.2.2.
  • No nanvix/cpython enablement issue filed. Positive recon on inspect.signature and importlib.metadata (both confirmed present and active in the 3.12.3 sysroot) plus a reactive failure stance: only file upstream if the smoke trips with a stdlib-surface signature, which it does not.

Caveat: dist-info trim

_create_stripped_sysroot() in .nanvix/z.py removes entry_points.txt from *.dist-info/ directories, so pluggy.PluginManager.load_setuptools_entrypoints() will silently return zero plugins on standalone-mode targets. The smoke routes around this by exercising the marker / register / dispatch path directly. Fixing the strip step (preserving entry_points.txt) is deferred — a future port that depends on entry-point discovery should drive that fix reactively.

Test plan

Per nanvix-python/AGENTS.md:

./z distclean; ./z clean; NANVIX_DEPLOYMENT_MODE=$MODE ./z setup; ./z build; ./z test

for MODE ∈ {standalone, single-process, multi-process}. All three produce pluggy: PASS. CI exercises all four platform configs per doc/contributing.md step 5.

Ramfs size increase

The ramfs grows by 114,688 bytes (+112.0 KiB, +0.135%) on standalone — see the table below.

Measured on a clean tree per the standard protocol (standalone mode; ./z distclean; ./z clean; NANVIX_DEPLOYMENT_MODE=standalone ./z setup; ./z build between baseline and post).

baseline with change delta
ramfs image (nanvix_rootfs.img) 84,938,752 B 85,053,440 B +114,688 B (+112.0 KiB)
files in ramfs 4,795 4,804 +9

New ramfs paths:

  • lib/python3.12/site-packages/pluggy-1.6.0.dist-info/METADATA
  • lib/python3.12/site-packages/pluggy/__init__.pyc
  • lib/python3.12/site-packages/pluggy/_callers.pyc
  • lib/python3.12/site-packages/pluggy/_hooks.pyc
  • lib/python3.12/site-packages/pluggy/_manager.pyc
  • lib/python3.12/site-packages/pluggy/_result.pyc
  • lib/python3.12/site-packages/pluggy/_tracing.pyc
  • lib/python3.12/site-packages/pluggy/_version.pyc
  • lib/python3.12/site-packages/pluggy/_warnings.pyc

That is +0.135 % of an 81.1 MiB image.

Adds pluggy 1.6.0 to the pure-Python manifest under # Core utilities and a smoke test exercising the HookspecMarker / HookimplMarker / PluginManager dispatch round-trip. Closes #95.
Copilot AI review requested due to automatic review settings May 6, 2026 22:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the pure-Python pluggy dependency to the Nanvix Python sysroot and introduces a functional smoke test to validate that core pluggy hook registration/dispatch works under the Nanvix runtime.

Changes:

  • Add pluggy==1.6.0 to requirements/site-packages-base.txt.
  • Add tests/func/test_109_pluggy.py smoke test covering HookspecMarker/HookimplMarker/PluginManager dispatch.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/func/test_109_pluggy.py Adds a pluggy functional smoke test that exercises hook spec/impl registration and invocation.
requirements/site-packages-base.txt Adds pluggy==1.6.0 to the base site-packages manifest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 6 to 8
packaging==23.2
pluggy==1.6.0
schedule==1.2.2
@ada-x64 ada-x64 marked this pull request as draft May 6, 2026 22:36
@ppenna ppenna marked this pull request as ready for review May 7, 2026 01:37
@ppenna ppenna merged commit 0069e2e into main May 7, 2026
16 checks passed
@ppenna ppenna deleted the feat/port-pluggy branch May 7, 2026 01:37
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.

Support package: pluggy

3 participants