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

build(deps): bump atproto from 0.0.25 to 0.0.27 #640

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 14, 2023

Bumps atproto from 0.0.25 to 0.0.27.

Release notes

Sourced from atproto's releases.

v0.0.27

What's Changed

Full Changelog: MarshalX/atproto@v0.0.26...v0.0.27

v0.0.26 – 40x performance boost; breaking changes

Migration to Pydantic v2 and libipld

All models have been migrated to Pydantic v2. Fields constraints have been added. Decoding of DAG-CBOR, CID and CAR files has been migrated to the brand-new library libipld. This library is powered by Rust and is much faster than the previous implementation. Pydantic v2 also uses Rust in the core. This leads to a significant performance boost.

Firehose catch up benchmark:

  • The previous SDK version: 700 commits in 5 seconds.
  • After migration to Pydantic v2: 2650 commits in 5 seconds.
  • After migration to libipld: 20000 commits in 5 seconds.
  • Using pydantic v2 and libipld with multiprocessing: 30000 commits in 5 seconds.

The new release gives a 40x performance boost! But the cost is a lot of breaking changes.

Example of firehose consumer with multiprocessing: process_commits.py

Test stand for benchmarks: MacBook Pro 2021, Apple M1 Pro, 32 GB RAM, 450mbps connection speed, Python 3.8

❗Breaking changes

  • Python 3.7.0 has been dropped. The minimum supported version is now Python 3.7.1.
  • Camel cased fields are gone. Use snake case instead. For example, createdAt is now created_at.
  • Root namespace has been fixed from bsky to app. For example, Client().bsky.feed.get_likes is now Client().app.bsky.feed.get_likes.
  • Using similar model instances as strong refs is not allowed anymore. Use models.create_strong_ref helper function to convert refs (example).
  • Creating model instances using positional arguments is no longer supported. Use keyword arguments instead. For example, thant's not possible anymore models.ComAtprotoIdentityResolveHandle.Params('marshal.dev'). Use models.ComAtprotoIdentityResolveHandle.Params(handle='marshal.dev') instead.
  • Fields that conflict with reserved Pydantic names has _ (underscore) suffix. For example, validation is now validation_.
  • DotDict has been moved to models.dot_dict.
  • Inheritance of base models has been changed. Please check new base classes.
  • Inheritance of DotDict has been changed. Please check the new base class.
  • BlobRef model doesn't contain to_dict() method anymore.
  • CID class has been reimplemented using libipld lib. It supports much less API.
  • _type field of models has been renamed to py_type. Now it's constant.
  • leb128 module has been removed.
  • Type hint of CID has been changed to CIDType.
  • Type hint of DotDict has been changed to DotDictType.
  • multiformats and dag-cbor dependencies have been removed.
  • These reference classes have been removed:
    • ResponseRef from get_profile. Use models.AppBskyActorDefs.ProfileViewDetailed instead.
    • ResponseRef from get_moderation_action. Use models.ComAtprotoAdminDefs.ActionViewDetail instead.
    • ResponseRef from get_moderation_report. Use models.ComAtprotoAdminDefs.ReportViewDetail instead.
    • ResponseRef from get_record. Use models.ComAtprotoAdminDefs.RecordViewDetail instead.
    • ResponseRef from get_repo. Use models.ComAtprotoAdminDefs.RepoViewDetail instead.

... (truncated)

Changelog

Sourced from atproto's changelog.

Version 0.0.27

13.09.2023

Version 0.0.26

08.09.2023

All models have been migrated to Pydantic v2. Fields constraints have been added. Decoding of DAG-CBOR, CID and CAR files has been migrated to the brand-new library libipld. This library is powered by Rust and is much faster than the previous implementation. Pydantic v2 also uses Rust in the core. This leads to a significant performance boost.

Firehose catch up benchmark:

  • The previous SDK version: 700 commits in 5 seconds.
  • After migration to Pydantic v2: 2650 commits in 5 seconds.
  • After migration to libipld: 20000 commits in 5 seconds.
  • Using pydantic v2 and libipld with multiprocessing: 30000 commits in 5 seconds.

The new release gives a 40x performance boost! But the cost is a lot of breaking changes.

Example of firehose consumer with multiprocessing: process_commits.py

Test stand for benchmarks: MacBook Pro 2021, Apple M1 Pro, 32 GB RAM, 450mbps connection speed, Python 3.8

❗Breaking changes

  • Python 3.7.0 has been dropped. The minimum supported version is now Python 3.7.1.
  • Camel cased fields are gone. Use snake case instead. For example, createdAt is now created_at.
  • Root namespace has been fixed from bsky to app. For example, Client().bsky.feed.get_likes is now Client().app.bsky.feed.get_likes.
  • Using similar model instances as strong refs is not allowed anymore. Use models.create_strong_ref helper function to convert refs (example).
  • Creating model instances using positional arguments is no longer supported. Use keyword arguments instead. For example, thant's not possible anymore models.ComAtprotoIdentityResolveHandle.Params('marshal.dev'). Use models.ComAtprotoIdentityResolveHandle.Params(handle='marshal.dev') instead.
  • Fields that conflict with reserved Pydantic names has _ (underscore) suffix. For example, validation is now validation_.
  • DotDict has been moved to models.dot_dict.
  • Inheritance of base models has been changed. Please check new base classes.
  • Inheritance of DotDict has been changed. Please check the new base class.
  • BlobRef model doesn't contain to_dict() method anymore.
  • CID class has been reimplemented using libipld lib. It supports much less API.
  • _type field of models has been renamed to py_type. Now it's constant.
  • leb128 module has been removed.
  • Type hint of CID has been changed to CIDType.
  • Type hint of DotDict has been changed to DotDictType.
  • multiformats and dag-cbor dependencies have been removed.
  • These reference classes have been removed:

... (truncated)

Commits
  • ed27433 Update dependencies (#145)
  • 327e61f Update lexicons fetched from 07bb0da committed 2023-09-12T17:37:57Z (#144)
  • 9c77910 Add snake to camel and camel to snake case conversion support for DotDict wra...
  • 34daf6e Add reposts support to the firehose process commits example (#140)
  • 10a0b43 Add publish_release workflow (#139)
  • 15a5f9a Update changelog for v0.0.26 (#138)
  • e20b807 Update lexicons fetched from a7c42cf committed 2023-09-07T00:27:50Z (#137)
  • 72fcba5 Fix timezone (#136)
  • 7e6b830 Fix exception printing in the firehose async client; fix exception chaining (...
  • aa4ee37 Migrate to Pydantic and libipld (#127)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [atproto](https://github.com/MarshalX/atproto) from 0.0.25 to 0.0.27.
- [Release notes](https://github.com/MarshalX/atproto/releases)
- [Changelog](https://github.com/MarshalX/atproto/blob/main/CHANGES.md)
- [Commits](MarshalX/atproto@v0.0.25...v0.0.27)

---
updated-dependencies:
- dependency-name: atproto
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Sep 14, 2023
@github-actions github-actions bot enabled auto-merge (rebase) September 14, 2023 12:52
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 18, 2023

Superseded by #642.

@dependabot dependabot bot closed this Sep 18, 2023
auto-merge was automatically disabled September 18, 2023 12:52

Pull request was closed

@dependabot dependabot bot deleted the dependabot/pip/atproto-0.0.27 branch September 18, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants