Сделать
Сейчас она используется только для парсинга
Нам нет никакой сложности сделать модуль с нативным
Задача на несколько часов.
https://github.com/wemake-services/django-modern-rest/issues/43
#django_modern_rest
msgspec опциональной зависимостью.Сейчас она используется только для парсинга
json, однако, она может не собраться по какой-то причине.Нам нет никакой сложности сделать модуль с нативным
json для парсинга, если ее нет.Задача на несколько часов.
https://github.com/wemake-services/django-modern-rest/issues/43
#django_modern_rest
GitHub
Do not depend on `msgspec` directly · Issue #43 · wemake-services/django-modern-rest
Right now we always install msgspec directly as the main dependency: django-modern-rest/pyproject.toml Lines 49 to 54 in 25513fd [tool.poetry.dependencies] python = "^3.11" typing_extensi...
👍5
🚀 New issue to ag2ai/faststream by @aleksandrtikhonov
📝 Bug: missing error logs when broker initialize with argument log_level=logging.DEBUG (#2585)
Describe the bug
Missing ERROR logs when broker initialize with argument
How to reproduce
Include source code:
1. Send a message to a topic that does not match the expected model Suka.
Expected behavior
See error logs(error pydantic serializtion) in the console
Observed behavior
Error logs are missing.
Environment
faststream-0.6.0
Additional context
Provide any other relevant context or information about the problem here.
#good_first_issue #bug
sent via relator
📝 Bug: missing error logs when broker initialize with argument log_level=logging.DEBUG (#2585)
Describe the bug
Missing ERROR logs when broker initialize with argument
log_level=logging.DEBUGHow to reproduce
Include source code:
from faststream import FastStream
from faststream.confluent import KafkaBroker, KafkaRouter
from pydantic import BaseModel
broker = KafkaBroker("localhost:9092", log_level=logging.DEBUG)
router = KafkaRouter()
broker.include_router(router)
app = FastStream(broker)
class Suka(BaseModel):
suka_id: int
@router.subscriber("test")
async def suking(suka: Suka) -> None:
print(suka)
1. Send a message to a topic that does not match the expected model Suka.
Expected behavior
See error logs(error pydantic serializtion) in the console
Observed behavior
Error logs are missing.
Environment
faststream-0.6.0
Additional context
Provide any other relevant context or information about the problem here.
#good_first_issue #bug
sent via relator
😁12🗿3🌚2
https://github.com/wemake-services/django-modern-rest/issues/47
Супер простая задача: добавить
#django_modern_rest #typing
Супер простая задача: добавить
TypedDict для типизации kwarg'ов.#django_modern_rest #typing
GitHub
Implement `TypedDict` types for `model_dump_kwargs` and `from_python_kwargs` · Issue #47 · wemake-services/django-modern-rest
Right now we just type them as dict, which is not ideal. django-modern-rest/django_modern_rest/plugins/pydantic.py Lines 53 to 61 in 5cf21e6 # TODO: use `TypedDict` model_dump_kwargs: ClassVar[dict...
💘3
🚀 New issue to ag2ai/faststream by @lesnik512
📝 Bug: async api route returns 500 if broker is set by set_broker (#2588)
Hi and thank you for this great framework!
Describe the bug
async api route returns 500 if broker is set by method
How to reproduce
#bug #good_first_issue
sent via relator
📝 Bug: async api route returns 500 if broker is set by set_broker (#2588)
Hi and thank you for this great framework!
Describe the bug
async api route returns 500 if broker is set by method
set_brokerHow to reproduce
async def test_bug() -> None:
app = faststream.asgi.AsgiFastStream(
asyncapi_path="/docs/"
)
app.set_broker(RedisBroker())
with TestClient(app=app) as test_client:
response = test_client.get("/docs/")
assert response.status_code == 500
app2 = faststream.asgi.AsgiFastStream(
RedisBroker(),
asyncapi_path="/docs/"
)
with TestClient(app=app2) as test_client:
response = test_client.get("/docs/")
assert response.status_code == 200
#bug #good_first_issue
sent via relator
🤔3
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Add `slotscheck` to the CI (#68)
There's an amazing tool called https://github.com/ariebovenberg/slotscheck
We use
List of things to do:
• Add
• Add the configuration to
• Add the call to
This should be a really small task for several minutes :)
#help_wanted #good_first_issue #dependencies #github_actions
sent via relator
📝 Add `slotscheck` to the CI (#68)
There's an amazing tool called https://github.com/ariebovenberg/slotscheck
We use
__slots__ in this project by default. So, we would love to test their defition.List of things to do:
• Add
slotscheck to test deps• Add the configuration to
pyproject.toml• Add the call to
MakefileThis should be a really small task for several minutes :)
#help_wanted #good_first_issue #dependencies #github_actions
sent via relator
👍1
🚀 New issue to ag2ai/faststream by @lesnik512
📝 Bug: async api 3.0 errors if gssapi is used (#2593)
Describe the bug
If async api 3.0 is used with gssapi then specification is failed to render
How to reproduce
If gssapi is used for authorization for aiokafka broker then async api 3 failed to render:
Here is problematic block, as I understood
#good_first_issue #bug
sent via relator
📝 Bug: async api 3.0 errors if gssapi is used (#2593)
Describe the bug
If async api 3.0 is used with gssapi then specification is failed to render
How to reproduce
If gssapi is used for authorization for aiokafka broker then async api 3 failed to render:
Error: There are errors in your Asyncapi document
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Property "gssapi" is not expected to be here
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Property "gssapi" is not expected to be here
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Property "gssapi" is not expected to be here
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Property "gssapi" is not expected to be here
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Property "gssapi" is not expected to be here
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Property "gssapi" is not expected to be here
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Property "gssapi" is not expected to be here
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Property "gssapi" is not expected to be here
0
"0" property must have required property "type"
0
"0" property must not be valid
0
Here is problematic block, as I understood
"securitySchemes": {
"gssapi": {
"type": "gssapi"
}
}
#good_first_issue #bug
sent via relator
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Add `codespell` to the CI (#72)
We need to add
Example:
• https://github.com/dry-python/returns/blob/1d74c969a94ce13648be2fe2a8bfad3b12f73069/pyproject.toml#L64
• Configuration (should be moved to
• Running: https://github.com/dry-python/returns/blob/1d74c969a94ce13648be2fe2a8bfad3b12f73069/.github/workflows/test.yml#L61
PRs are welcome!
#enhancement #good_first_issue #github_actions #help_wanted
sent via relator
📝 Add `codespell` to the CI (#72)
We need to add
codespell to the CI, because I make a lot of typos :)Example:
• https://github.com/dry-python/returns/blob/1d74c969a94ce13648be2fe2a8bfad3b12f73069/pyproject.toml#L64
• Configuration (should be moved to
pyproject.toml): https://github.com/dry-python/returns/blob/1d74c969a94ce13648be2fe2a8bfad3b12f73069/setup.cfg#L170-L173• Running: https://github.com/dry-python/returns/blob/1d74c969a94ce13648be2fe2a8bfad3b12f73069/.github/workflows/test.yml#L61
PRs are welcome!
#enhancement #good_first_issue #github_actions #help_wanted
sent via relator
❤1👍1
🚀 New issue to wemake-services/wemake-python-styleguide by @sobolevn
📝 `WPS226` false positive on fstring parts (#3548)
This code raises a violation:
When
Output:
This does not seem right, because strings that are part of
PR would be rather easy :)
#help_wanted #levelstarter #good_first_issue #bug
sent via relator
📝 `WPS226` false positive on fstring parts (#3548)
This code raises a violation:
x = f'single {1}'
y = f'single {1}'
When
--max-string-usage=1 is provided.Output:
1:5 WPS226 Found string literal over-use: single > 1
x = f'single {1}'
^
This does not seem right, because strings that are part of
f strings should not be counted by WPS226PR would be rather easy :)
#help_wanted #levelstarter #good_first_issue #bug
sent via relator
🚀 New issue to ag2ai/faststream by @carlodri
📝 LICENSE file is missing in source distribution (#2594)
Apache-2.0 requires publishing the LICENSE together with every distribution.
#good_first_issue #bug
sent via relator
📝 LICENSE file is missing in source distribution (#2594)
Apache-2.0 requires publishing the LICENSE together with every distribution.
#good_first_issue #bug
sent via relator
New issue to wemake-services/django-modern-rest by @sobolevn
Write tests for "double validation" problem (#85)
We need to be sure that double validation does not happen. Ever.
See what "double validation" is: fastapi/fastapi#3021
To be sure, we need to write tests for it.
Tests would be rather easy to write:
• One for
• One for
• One for raw data return
Also test disabled response validation mode to do 0 validations.
See the attached issue to learn how to make sure that double validation happened.
No matter what - we need to do a 1 or 0 validations.
#django_modern_rest #help_wanted #enhancement #good_first_issue
sent via relator
Write tests for "double validation" problem (#85)
We need to be sure that double validation does not happen. Ever.
See what "double validation" is: fastapi/fastapi#3021
To be sure, we need to write tests for it.
Tests would be rather easy to write:
• One for
@modify• One for
@validate• One for raw data return
Also test disabled response validation mode to do 0 validations.
See the attached issue to learn how to make sure that double validation happened.
No matter what - we need to do a 1 or 0 validations.
#django_modern_rest #help_wanted #enhancement #good_first_issue
sent via relator
🔥1
🚀 New issue to Lancetnik/FastDepends by @carlodri
📝 LICENSE file is missing in source distribution (#220)
#goodfirstissue
sent via relator
📝 LICENSE file is missing in source distribution (#220)
#goodfirstissue
sent via relator
😁5
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝
Similar to https://github.com/wemake-services/django-modern-rest/issues/93 we have several important public APIs for
But, we never test that they can actually be applied. This is a very simple issue with just 2 extra tests with existing examples from https://github.com/wemake-services/django-modern-rest/pull/95
#helpwanted #goodfirst_issue #enhancement
sent via relator
📝
Endpoint customizations are not tested (#104)Similar to https://github.com/wemake-services/django-modern-rest/issues/93 we have several important public APIs for
Endpoint customization: https://github.com/wemake-services/django-modern-rest/blob/9e1a24deb3a65683f991ebd14465b0b20e0c22b1/djangomodernrest/endpoint.py#L53-L58But, we never test that they can actually be applied. This is a very simple issue with just 2 extra tests with existing examples from https://github.com/wemake-services/django-modern-rest/pull/95
#helpwanted #goodfirst_issue #enhancement
sent via relator
👍2
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Write a test for custom
Our endpoints have two methods to handle custom errors: https://github.com/wemake-services/django-modern-rest/blob/17edd60e1d13b88f4ee2c229095c237b1919b415/djangomodernrest/endpoint.py#L118-L132
But, they are not tested to be customized. Please, add two cases with:
1. Async endpoint and
2. Sync endpoint and
#helpwanted #goodfirst_issue #enhancement
sent via relator
📝 Write a test for custom
handle_error and handle_async_error types (#110)Our endpoints have two methods to handle custom errors: https://github.com/wemake-services/django-modern-rest/blob/17edd60e1d13b88f4ee2c229095c237b1919b415/djangomodernrest/endpoint.py#L118-L132
But, they are not tested to be customized. Please, add two cases with:
1. Async endpoint and
handle_async_error that custom errors can be serialized to json the right way2. Sync endpoint and
handle_error with the same logic#helpwanted #goodfirst_issue #enhancement
sent via relator
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Create
We have kwargs for
And they are used here: https://github.com/wemake-services/django-modern-rest/blob/2edcf631b26758c84adafe1a0f24a8de824c8fca/djangomodernrest/plugins/msgspec.py#L136-L142
We need to make a
#goodfirstissue #help_wanted #enhancement
sent via relator
📝 Create
TypedDict for the msgspec.convert call (#124)We have kwargs for
msgspec.convert defined here: https://github.com/wemake-services/django-modern-rest/blob/2edcf631b26758c84adafe1a0f24a8de824c8fca/djangomodernrest/plugins/msgspec.py#L81And they are used here: https://github.com/wemake-services/django-modern-rest/blob/2edcf631b26758c84adafe1a0f24a8de824c8fca/djangomodernrest/plugins/msgspec.py#L136-L142
We need to make a
TypedDict for the possible values of these kwargs.#goodfirstissue #help_wanted #enhancement
sent via relator
👍2
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Remove
Since we use python3.11+, we can use default
• https://github.com/wemake-services/django-modern-rest/blob/9781921e76acb39f56a90cb413e09e563f43f288/pyproject.toml#L94
• https://github.com/wemake-services/django-modern-rest/blob/9781921e76acb39f56a90cb413e09e563f43f288/docs/conf.py#L17
Docs: https://docs.python.org/3/library/tomllib.html
This is a very easy task :)
#helpwanted #dependencies #goodfirst_issue
sent via relator
📝 Remove
tomli, use tomllib instead (#148)Since we use python3.11+, we can use default
tomllib, tomli can be removed:• https://github.com/wemake-services/django-modern-rest/blob/9781921e76acb39f56a90cb413e09e563f43f288/pyproject.toml#L94
• https://github.com/wemake-services/django-modern-rest/blob/9781921e76acb39f56a90cb413e09e563f43f288/docs/conf.py#L17
Docs: https://docs.python.org/3/library/tomllib.html
This is a very easy task :)
#helpwanted #dependencies #goodfirst_issue
sent via relator
⚡7
🚀 New issue to ag2ai/faststream by @melenudo
📝 Bug: auto_commit is always True in Confluent Kafka (#2610)
Describe the bug
Even if you use the deprecated autocommit subscriber parameter, or if you use the
How to reproduce
You can run this snippet (using the deprecated
In Kafka, you will notice that the message is automatically committed before
You can also debug the code and observe that in the consumer:
https://github.com/ag2ai/faststream/blob/8a4c60bdae02c7632c15ff1a1d15b268da6e095d/faststream/confluent/helpers/client.py#L236
Expected behavior
When use
Observed behavior
Environment
#goodfirstissue #bug
sent via relator
📝 Bug: auto_commit is always True in Confluent Kafka (#2610)
Describe the bug
Even if you use the deprecated autocommit subscriber parameter, or if you use the
ack_policy parameter with a value other than AckPolicy.ACK_FIRST, the consumer will set enable.auto.commit to True.How to reproduce
from asyncio import sleep
from pydantic import BaseModel, Field, NonNegativeFloat
from faststream import FastStream, Logger
from faststream.confluent import KafkaBroker
class DataBasic(BaseModel):
data: NonNegativeFloat = Field(
..., examples=[0.5], description="Float data example"
)
broker = KafkaBroker("localhost:9092")
app = FastStream(broker)
@broker.publisher("output_data")
@broker.subscriber("input_data", group_id="my-group", auto_commit=False)
async def on_input_data(msg: DataBasic, logger: Logger) -> DataBasic:
logger.info(msg)
await sleep(20)
return DataBasic(data=msg.data + 1.0)
You can run this snippet (using the deprecated
auto_commit; the same behavior can be observed if you use ack_policy=AckPolicy.ACK).In Kafka, you will notice that the message is automatically committed before
on_input_data finishes.You can also debug the code and observe that in the consumer:
https://github.com/ag2ai/faststream/blob/8a4c60bdae02c7632c15ff1a1d15b268da6e095d/faststream/confluent/helpers/client.py#L236
self.config always has the property enable.auto.commit to TrueExpected behavior
When use
@subscriber(...,ack_policy=AckPolicy.ACK) the autocommit must be disabled (same behavior for a policy different than AckPolicy.ACK_FIRST)Observed behavior
enable.auto.commit is always True ignoring subscriber parameters.Environment
Running FastStream 0.6.2 with CPython 3.12.9 on Darwin
#goodfirstissue #bug
sent via relator
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Figure out why
See https://github.com/wemake-services/django-modern-rest/blob/7aa23316219d4226d7c49435f9b028130f8c5dbc/docs/conf.py#L98-L99
When
This does not seem right, because everything is configure: intersphinx, imports, etc.
• Links in the form of inline
<img width="721" height="115" alt="Image" src="https://github.com/user-attachments/assets/91a0e5ee-90de-4e04-ae52-58514cc275f4" />
• The link in the annotations is not generated
<img width="737" height="377" alt="Image" src="https://github.com/user-attachments/assets/9ab218c1-0153-45f4-836f-e2d2eaaec92b" />
#documentation #helpwanted #goodfirst_issue
sent via relator
📝 Figure out why
sphinx does not link HttpResponse as a return type (#153)See https://github.com/wemake-services/django-modern-rest/blob/7aa23316219d4226d7c49435f9b028130f8c5dbc/docs/conf.py#L98-L99
When
make -C docs clean html is generated without this line, sphinx produces:django-modern-rest/django_modern_rest/errors.py:docstring of django_modern_rest.errors.global_error_handler:1: WARNING: py:class reference target not found: django.http.response.HttpResponse [ref.class]
django-modern-rest/django_modern_rest/endpoint.py:docstring of django_modern_rest.endpoint.Endpoint.__call__:1: WARNING: py:class reference target not found: django.http.response.HttpResponse [ref.class]
django-modern-rest/django_modern_rest/endpoint.py:docstring of django_modern_rest.endpoint.Endpoint.handle_async_error:1: WARNING: py:class reference target not found: django.http.response.HttpResponse [ref.class]
django-modern-rest/django_modern_rest/endpoint.py:docstring of django_modern_rest.endpoint.Endpoint.handle_error:1: WARNING: py:class reference target not found: django.http.response.HttpResponse [ref.class]
This does not seem right, because everything is configure: intersphinx, imports, etc.
• Links in the form of inline
:class: roles are rendered correctly<img width="721" height="115" alt="Image" src="https://github.com/user-attachments/assets/91a0e5ee-90de-4e04-ae52-58514cc275f4" />
• The link in the annotations is not generated
<img width="737" height="377" alt="Image" src="https://github.com/user-attachments/assets/9ab218c1-0153-45f4-836f-e2d2eaaec92b" />
#documentation #helpwanted #goodfirst_issue
sent via relator
❤1
