Conversation
Lancetnik
marked this pull request as draft
September 10, 2024 20:03
davorrunje
self-requested a review
September 15, 2024 13:53
* init * AsyncAPI2 * AsyncAPI3 * AsyncAPI facade * AsyncAPI facade refactoring to factory * Rename facade to factory * Remove specs interface from Faststream and AsgiFaststream * Tests update * fixes * tests fixes * tests fix * tests fix * fixes * fixes * docs: generate API References * asyncapi.py rename to facade.py * tests fix * docs: generate API References * merge conflict fix * docs: generate API References * Separation of AMQP bindings creation for AsyncAPI 3.0.0 and 2.6.0 * docs: generate API References * Correct cc for AMQP in AsyncAPI 3.0.0 * docs: generate API References --------- Co-authored-by: KrySeyt <KrySeyt@users.noreply.github.com>
* refactor: use CMD to call publisher * fix: add missing pre-commit changes * refactor: add an ability to check RPC response * refactor: use PublishType * refactor: new NatsFakePublisher * refactor: use PublishCmd in request * fix: correct publisher.publish * fix: correct Nats JS request * lint: polish annotations * feat: add RabbitPublishCommand * refactor: add basic publish & request publisher methods * refactor: remove add_header Response method * refactor: add KafkaPublishCommand * refactor: pass context to middleware directly * refactor: Confluent, Redis publish commands * refactor: break ISP, add publish_batch to ProducerProto * refactor: create basic fake publisher * refactor: do not call LoggingMiddleware for RPC responses * refactor: new NatsOtelMiddleware * refactor: new RabbitOtelMiddleware * refactor: new RedisOtelMiddleware * refactor: new KafkaOtelMiddleware * refactor: new ConfluentOtelMiddleware * feat: add PublishCmd add_headers method * refactor: actual PrometheusMiddleware * fix: correct AsyncAPI * fix: add missing pre-commit changes * chore: remove 3.8 from CI * docs: generate API References * chore: fix CI * chore: fix CI * fix: set miltilock at start only --------- Co-authored-by: Lancetnik <Lancetnik@users.noreply.github.com>
* refactor: make context not-global * docs: generate API References * tests: refactor context tests * chore: merge main * fix: correct Context propogation from App to Broker * docs: generate API References * tests: in-memory cli * chore: use python3.9 compatible FastDepends * chore: revert FD version --------- Co-authored-by: Lancetnik <Lancetnik@users.noreply.github.com>
* fixing metrics for rpc * == -> is
* tests on MetricsSettingsProvider for all brokers * chore: fix tests * chore: remove loguru usage --------- Co-authored-by: Nikita Pastukhov <diementros@yandex.ru>
* feat/ack_middleware added ack middleware * tests: fix FastAPI tests * feat/ack_middleware added ack middleware * ack_middleware fixed redis stream * tests: fix FastAPI tests * ack_middleware fixed redis stream * chore: remove conflicts * chore: refactor AckMiddleware * docs: generate API References --------- Co-authored-by: Nikita Pastukhov <diementros@yandex.ru> Co-authored-by: Pastukhov Nikita <nikita@pastukhov-dev.ru> Co-authored-by: Lancetnik <Lancetnik@users.noreply.github.com>
* docs/index.md updated * docs/ add intertal link * docs/add internal link * fix(docs): rename after_process to after_processed * fix(docs): remove mention publisher level * lint: fix mypy a bit more * tests: fix CLI docs generation * Add HTTP bindings (#2350) * Add HTTP bindings * Ruff format * Remove unnecessary isinstance calls * Apply suggested fixes --------- Co-authored-by: Pastukhov Nikita <nikita@pastukhov-dev.ru> * chore: remove useless comments * refactor: unwrap FastDepends errors * fix(docs): consistency * docs: add flow.svg * docs: flow.svg updated * docs: rename flow.svg to middlewares-flow.svg * docs: add description for middleware flow * docs: add summary and linting via yandex.editor * docs: fix markup * chore: apply autofixes * docs: remove space & internal-link added * Update .gitignore --------- Co-authored-by: Nikita Pastukhov <diementros@yandex.ru> Co-authored-by: Tapeline <mail@tapeline.dev> Co-authored-by: Pastukhov Nikita <nikita@pastukhov-dev.ru> Co-authored-by: faststream-actions[bot] <faststream-actions[bot]@users.noreply.github.com>
* async handler * add all validate tests * lint update * addede different publisher types * chore: apply autofixes --------- Co-authored-by: faststream-actions[bot] <faststream-actions[bot]@users.noreply.github.com> Co-authored-by: Pastukhov Nikita <nikita@pastukhov-dev.ru>
* fix typo * added rabbit type tests * chore: apply autofixes --------- Co-authored-by: faststream-actions[bot] <faststream-actions[bot]@users.noreply.github.com> Co-authored-by: Pastukhov Nikita <nikita@pastukhov-dev.ru>
Lancetnik
marked this pull request as ready for review
July 29, 2025 19:30
|
@Lancetnik awesome news, but do you have any roadmap for future releases? as changes are, well, breaking, I want to understand if I need to already change my codebase to 0.6 or I can postpone it. |
Member
Author
|
@dearkafka I have no plans to break anything with the 0.6 release. That's why I decided to make a RC version instead of an alpha or beta version. It's already stable enough for users to migrate to. The plan is to gather some bugs and feedback from users who have migrated, and then release a stable version within a month. By the way, a few months ago, some of our users installed the 0.6 beta version and everything seems to be working fine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
FastStream 0.6 is a significant technical release that aimed to address many of the current project design issues and unlock further improvements on the path to version 1.0.0. We tried our best to minimize breaking changes, but unfortunately, some aspects were simply not working well. Therefore, we decided to break them in order to move forward.
This release includes:
The primary goal of this release is to unlock the path towards further features. Therefore, we are pleased to announce that after this release, we plan to work on MQTT #956 and SQS #794 support and move towards version 1.0.0!
Breaking changes
Firstly, we have dropped support for Python 3.8 and Python 3.9. Python 3.9 is almost at the end of its life cycle, so it's a good time to update our minimum version.
FastStream object changes
The broker has become a POSITIONAL-ONLY argument. This means that
FastStream(broker=broker)is no longer valid. You should always pass the broker as a separate positional argument, likeFastStream(brokers), to ensure proper usage.This is a preparatory step for
FastStream(*brokers)support, which will be introduced in 1.0.0.AsyncAPI changes
In 0.6, you can't directly pass custom AsyncAPI options to the
FastStreamconstructor anymore.You need to create a
specificationobject and pass it manually to the constructor.Retry feature removed
Previously, you were able to configure retry attempts for a handler by using the following option:
Unfortunately, this option was a design mistake. We apologize for any confusion it may have caused. Technically, it was just a shortcut to
message.nack()on error. We have decided that manual acknowledgement control would be more idiomatic and better for the framework. Therefore, we have provided a new feature in its place:ack_policycontrol.With
ack_policy, you can now control the default acknowledge behavior for your handlers.AckPolicyoffers the following options:In addition, we have deprecated a few more options prior to
ack_policy.ack_first=True->AckPolicy.ACK_FIRSTno_ack=True->AckPolicy.MANUALContext changes
We have made some changes to our Dependency Injection system, so the global context is no longer available.
Currently, you cannot simply import the context from anywhere and use it freely.
Instead, you should create the context in a slightly different way. The
FastStreamobject serves as an entry point for this, so you can place it wherever you need it:Everything else about using the context remains the same. You can request it from the context at any place that supports it.
Additionally,
Context("broker")andContext("logger")have been moved to the local context. They cannot be accessed from lifespan hooks any longer.This change was also made to support multiple brokers.
Middlewares changes
Also, we have finalized our Middleware API. It now supports all the features we wanted, and we have no plans to change it anymore. First of all, the
BaseMiddlewareclass constructor requires a context (which is no longer global).The context is now available as
self.contextin all middleware methods.We also changed the
publish_scopefunction signature.Previously, any options passed to
brocker.publish("msg", "destination")had to be consumed as*args, **kwargs.Now, you can consume them all as a single
PublishCommandobject.Thanks to Python 3.13's
TypeVarswith defaults,BaseMiddlewarebecomes a generic class and you can specify thePublishCommandfor the broker you want to work with.Warning: The methods
on_consume,after_consume,on_publishandafter_publishwill be deprecated and removed in version 0.7. Please useconsume_scopeandpublish_scopeinstead.Redis Default Message format changes
In FastStream 0.6 we are using
BinaryMessageFormatV1as a default instead ofJSONMessageFormat.You can find more details in the documentation: https://faststream.ag2.ai/latest/redis/message_format/
New Features:
AsyncAPI3.0 support – now you can choose between
AsyncAPI(schema_version="3.0.0")(default) andAsyncAPI(schema_version="2.6.0")schemas generationMsgspec native support
Subscriber iteration support. This features supports all middlewares and other FastStream features.
Deprecation removed
@broker.subscriber(..., filters=...)removedmessage.decoded_bodyremoved, useawait message.decode()insteadpublish(..., rpc=True)removed, usebroker.request()instead@broker.subscriber(..., reply_config=...)removed, useResponseinsteadRelated Issues
connect()the broker first" in multi-router application #2215