Skip to content

Conversation

@gpauloski
Copy link
Collaborator

Description

Add backwards compatibility for Pydantic V1. While running some benchmarks, it's become clear that Pydantic V1 compatibility is still more important than I expected. Specifically, the globus_compute_common and colmena packages used by the benchmark suite are still pinned to pydantic<2.0.0.

There are no breaking changes here.

Fixes N/A

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

I manually ran the test suite in a venv with pydantic V1 installed. Note that all of the pydantic V1 branches are pragma: no cover. While maybe suboptimal, I have marked V1 compatibility as deprecated and I don't think it's worth the extra time of running the test suite twice with each version.

I don't anticipate the compatibility code be changed (or really much of the config load/dump at all), but if it does changes we'll have to be careful about testing against both versions.

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

@gpauloski gpauloski added the package Dependencies, version changes, or package metadata label Feb 28, 2024
@gpauloski gpauloski merged commit ad9a733 into main Feb 28, 2024
@gpauloski gpauloski deleted the pydantic-v1-compat branch February 28, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package Dependencies, version changes, or package metadata

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants