Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Useb64decode andb64encode forBase64Bytes type#10486

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sydney-runkle merged 5 commits intomainfrombase-64-bytes-fix
Sep 26, 2024

Conversation

sydney-runkle
Copy link
Contributor

Closes#9072

Change that should be highlighted in the upcoming release notes + blog post.

woodruffw and facutuesca reacted with heart emoji
@sydney-runklesydney-runkle added the relnotes-changeUsed for changes to existing functionality which don't have a better categorization. labelSep 25, 2024
@github-actionsgithub-actionsbot added the relnotes-fixUsed for bugfixes. labelSep 25, 2024
@cloudflare-workers-and-pagesCloudflare Workers and Pages
Copy link

cloudflare-workers-and-pagesbot commentedSep 25, 2024
edited
Loading

Deploying pydantic-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit:3b80ba9
Status: ✅  Deploy successful!
Preview URL:https://617bf15e.pydantic-docs.pages.dev
Branch Preview URL:https://base-64-bytes-fix.pydantic-docs.pages.dev

View logs

@codspeed-hqCodSpeed HQ
Copy link

codspeed-hqbot commentedSep 25, 2024
edited
Loading

CodSpeed Performance Report

Merging#10486 willnot alter performance

Comparingbase-64-bytes-fix (3b80ba9) withmain (c7497c5)

Summary

✅ 38 untouched benchmarks

@sydney-runkle
Copy link
ContributorAuthor

One lingering concern that I have here is the failing test relating to round tripping:

frompydanticimportBaseModel,Base64Bytesinput_data=b'Zm9vIGJhcg==\n'expected_value=b'foo bar'classModel(BaseModel):base64_value:Base64Bytesm=Model(base64_value=input_data)assertm.base64_value==expected_valueassertm.model_dump()['base64_value']==input_data# b'Zm9vIGJhcg==' != b'Zm9vIGJhcg==\n'

cc@Viicos,@dmontagu

@ViicosViicos changed the titleUse up to date base64 encoder / decoderUseb64decode andb64encode forBase64Bytes typeSep 25, 2024
@sydney-runklesydney-runkle removed the relnotes-fixUsed for bugfixes. labelSep 25, 2024
@sydney-runkle
Copy link
ContributorAuthor

One lingering concern that I have here is the failing test relating to round tripping.

We've discussed - this isn't an issue, the whole point was to move to the newer function not adding a newline automatically. Validation still succeeds, so round tripping is fine. This is similar to url behavior, etc.

@github-actionsGitHub Actions
Copy link
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  pydantic
  types.py
Project Total 

This report was generated bypython-coverage-comment-action

Copy link
Member

@ViicosViicos left a comment

Choose a reason for hiding this comment

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

nice!

sydney-runkle reacted with heart emoji
@sydney-runklesydney-runkle merged commite838139 intomainSep 26, 2024
61 checks passed
@sydney-runklesydney-runkle deleted the base-64-bytes-fix branchSeptember 26, 2024 14:29
@woodruffw
Copy link
Contributor

Thank you@sydney-runkle, this is fantastic!

commonism added a commit to commonism/aiopenapi3 that referenced this pull requestJan 11, 2025
commonism added a commit to commonism/aiopenapi3 that referenced this pull requestJan 11, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ViicosViicosViicos approved these changes

Assignees
No one assigned
Labels
ready for reviewrelnotes-changeUsed for changes to existing functionality which don't have a better categorization.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Base64Bytes with newlines
3 participants
@sydney-runkle@woodruffw@Viicos

[8]ページ先頭

©2009-2025 Movatter.jp