Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: environment variable to disable plugins #8767

Merged
merged 10 commits into from Feb 13, 2024

Conversation

geospackle
Copy link
Contributor

@geospackle geospackle commented Feb 8, 2024

Change Summary

Environment variable PYDANTIC_DISABLE_PLUGINS can be used to disable all or specified plugins.

Related issue number

#7709

Checklist

  • The pull request title is a good summary of the changes - it will be used in the changelog
  • Unit tests for the changes exist
  • Tests pass on CI
  • Documentation reflects the changes where applicable
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @dmontagu

Copy link

codspeed-hq bot commented Feb 8, 2024

CodSpeed Performance Report

Merging #8767 will not alter performance

Comparing geospackle:am/disable-plugins (e89c7e3) with main (14ce997)

Summary

✅ 10 untouched benchmarks

@geospackle
Copy link
Contributor Author

please review

@geospackle
Copy link
Contributor Author

  1. Should we add a warning when plugin is disabled?
  2. Is it useful to add default value 0 to enable plugins?

docs/concepts/plugins.md Outdated Show resolved Hide resolved
docs/concepts/plugins.md Outdated Show resolved Hide resolved
pantero and others added 2 commits February 12, 2024 11:33
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
pydantic/plugin/_loader.py Outdated Show resolved Hide resolved
geospackle and others added 3 commits February 12, 2024 08:48
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
@sydney-runkle
Copy link
Member

@geospackle,

Looks good overall, but we'll have to fix the tests before merging 👍. Could you please look into those errors?

@geospackle
Copy link
Contributor Author

@geospackle,

Looks good overall, but we'll have to fix the tests before merging 👍. Could you please look into those errors?

I noticed that. Turns out globals were leaking to other tests and needed teardown on the fixture. Got the changes pushed now.

@sydney-runkle
Copy link
Member

@geospackle,

Great, thanks! Awesome work 🚀 .

@sydney-runkle sydney-runkle merged commit b145516 into pydantic:main Feb 13, 2024
53 checks passed
@geospackle geospackle changed the title Environment variable to disable plugins feat: environment variable to disable plugins Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants