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

use little endian int #1372

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

fft001
Copy link
Contributor

@fft001 fft001 commented Jul 20, 2024

Change Summary

Construct the uuid with a little endian representation of the int.

Related issue number

After a bit of forensic, I saw that uuid-rs does not convert the endianness of the u128.

#772
and @davidhewitt pointed out in this PR
uuid-rs/uuid#406

I tried to use the byte attribute from the python object, so endianness would be handled by python itself. This negated the speed-up I tried to introduce in the first place.

This conversion is a no-op on little endian platforms and should fix the s390x build.

Checklist

  • [ X] Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Copy link

codecov bot commented Jul 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link

codspeed-hq bot commented Jul 20, 2024

CodSpeed Performance Report

Merging #1372 will not alter performance

Comparing fft001:fix-uuid-to-string-big-endian (4ab34ad) with main (cd2521e)

Summary

✅ 155 untouched benchmarks

Copy link
Member

@sydney-runkle sydney-runkle left a comment

Choose a reason for hiding this comment

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

Pending happy CI, this looks great! Thanks for the quick fix.

@sydney-runkle sydney-runkle merged commit cb696e2 into pydantic:main Jul 22, 2024
51 checks passed
@fft001
Copy link
Contributor Author

fft001 commented Jul 22, 2024

Thanks for helping out!

sydney-runkle added a commit that referenced this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Full Build cause CI to do a full build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants