Skip to content

add runtime deprecation warnings to Puppet::Util ENV wrappers#417

Draft
silug wants to merge 1 commit intoOpenVoxProject:mainfrom
silug:deprecate-puppet-util-env-wrappers
Draft

add runtime deprecation warnings to Puppet::Util ENV wrappers#417
silug wants to merge 1 commit intoOpenVoxProject:mainfrom
silug:deprecate-puppet-util-env-wrappers

Conversation

@silug
Copy link
Copy Markdown
Contributor

@silug silug commented Apr 24, 2026

Short description

The five ENV wrapper methods (get_env, get_environment, clear_environment, set_env, merge_environment) had @deprecated doc comments but no runtime warnings. Add Puppet.deprecation_warning calls to each so callers are notified at runtime when these methods are invoked.

Also fix a NameError bug in merge_environment where the parameter env_hash was referenced as hash in the method body.

Adds specs asserting each method emits a deprecation warning.

See: #342

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document and added a Signed-off-by annotation to each of my commits
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

The five ENV wrapper methods (get_env, get_environment, clear_environment,
set_env, merge_environment) had @deprecated doc comments but no runtime
warnings. Add Puppet.deprecation_warning calls to each so callers are
notified at runtime when these methods are invoked.

Also fix a NameError bug in merge_environment where the parameter env_hash
was referenced as hash in the method body.

Adds specs asserting each method emits a deprecation warning.

See: OpenVoxProject#342

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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