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

Fix IS_PYDANTIC_2 logic for pydantic<1.9.0 #42704

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

edoakes
Copy link
Contributor

@edoakes edoakes commented Jan 25, 2024

Why are these changes needed?

The __version__ attribute didn't exist prior to 1.9.0 and our check does not work properly.

Tested manually with pip install -U pydantic==1.8.0.

Related issue number

Closes #42413

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes mentioned this pull request Jan 25, 2024
8 tasks
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes requested a review from a team January 25, 2024 17:45
Copy link
Contributor

@GeneDer GeneDer left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this Ed!

python/ray/tests/test_minimal_install.py Outdated Show resolved Hide resolved
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes merged commit 336cb9d into ray-project:master Jan 25, 2024
9 checks passed
edoakes added a commit to edoakes/ray that referenced this pull request Jan 25, 2024
The `__version__` attribute didn't exist prior to `1.9.0` and our check does not work properly.

Tested manually with `pip install -U pydantic==1.8.0`.

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
architkulkarni pushed a commit that referenced this pull request Jan 29, 2024
The __version__ attribute didn't exist prior to 1.9.0 and our check does not work properly.

Tested manually with pip install -U pydantic==1.8.0.

Related issue number
Closes #42413

---------

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes self-assigned this Jan 30, 2024
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.

Pydantic 1.8.1 is resolved to Pydantic 2 in pydantic_compat
4 participants