Находки в опенсорсе: Python
описание
Легкие задачки в опенсорсе из мира Python Чат: @opensource_findings_chat
966
подписчиков
Охват к подписчикам
39,9%
ERR
Реакции к просмотрам
0,14%
47 на 50 постов
Пересылки к просмотрам
0,27%
91
Постов в день
1,1
всего 71
Где отзываются чаще
доля реакций к просмотрам- 14 авг.🚀 New issue to faststream-community/zMQTT by @borisalekseev 📝 Add Last Will support to the public MQTTClient API (#45) Problem zmqtt already implements MQTT Last Will at the packet/codec level, but it cannot be configured through the public high-level client API. Currently: • Will and WillProperties are only available through private zmqtt._internal modules; • MQTTClient and create_client() do not accept a will= argument; • MQTTClient._connect() builds every CONNECT packet without a Will. As a result, users and frameworks built on the public zmqtt.MQTTClient API, including FastStream, cannot configure an MQTT Last Will without depending on private implementation details. Proposed API from zmqtt import MQTTClient, QoS, Will, WillProperties will = Will( topic="devices/device-42/status", payload=b"offline", qos=QoS.AT_LEAST_ONCE, retain=True, properties=WillProperties( will_delay_interval=10, content_type="text/plain", ), ) client = MQTTClient( "broker.example.com", version="5.0", will=will, ) For MQTT 3.1.1, the same Will type should be usable without WillProperties. Scope • Export Will and WillProperties from the top-level zmqtt package. • Add will: Will | None = None to MQTTClient. • Add the same argument to create_client() and all of its typed overloads. • Store the configured Will and pass it to every Connect packet created by the client. • Preserve the same Will configuration when the client reconnects after an established connection is lost. • Reject MQTT 5.0 Will properties on MQTT 3.1.1 with a clear error consistent with other version-specific options. • Keep the current behavior unchanged when will=None. Tests The tests should exercise the public client path rather than only the existing packet codec: • MQTT 3.1.1: construct MQTTClient(..., will=...), decode the emitted CONNECT, and verify the Will topic, payload, QoS, and retain flag. • MQTT 5.0: verify the same fields together with WillProperties. • Simulate will receiving of second client when the first reconnected unexpectedly Tests should test public behaviour with real broker instead internals testing and avoid monkey patching. #enhancement #good_first_issue #faststream #zmqtt sent via relator1,16%
- 14 авг.🚀 New issue to ag2ai/faststream by @IvanKirpichnikov 📝 Bug: Uncorrect typehint for `partition_assignment_strategy` parameter in `faststream.kafka` (#3019) Now: partition_assignment_strategy: Sequence["AbstractPartitionAssignor"] Need: partition_assignment_strategy: Sequence["type[AbstractPartitionAssignor]"] #bug #good_first_issue #aiokafka #faststream #ag2ai sent via relator0,86%
- 9 авг.🚀 New issue to wemake-services/django-modern-rest by @sobolevn 📝 Improve `Token` customizations coverage (#1191) I added several customization options to both • token views django-modern-rest/dmr/security/token/views.py Lines 54 to 61 in 36a8567 • token auth django-modern-rest/dmr/security/token/auth/base.py Lines 84 to 88 in 36a8567 There are several integration tests that cover this: django-modern-rest/django_test_app/server/apps/token_auth/views/obtain.py Lines 46 to 57 in 36a8567 But, it not enough. What we need is more unit tests: • Test all auth classes: async and sync types for headers / cookies / query • Test all views: async and sync • Test all options • Test both positive and negative cases #feature #good_first_issue #help_wanted #django_modern_rest sent via relator0,78%
- 21 янв.без подписи0,71%
- 25 сент. 2025 г.без подписи0,62%
- 2 авг.🚀 New issue to wemake-services/django-modern-rest by @Lancetnik 📝 Add `pytest-timeout` to fail hanging tests fast (#1195) FEATURE Thesis Add pytest-timeout to the test dependencies and enable a global per-test timeout, so a hanging test fails fast and names itself instead of stalling the job. [dependency-groups] unit-test = [ # ... "pytest-timeout>=2.4,<3", ] [tool.pytest.ini_options] # Fail hanging tests instead of blocking CI: timeout = 30 timeout_method = "thread" Tests that legitimately need longer raise their own budget with the marker: @pytest.mark.timeout(120) def test_something_genuinely_slow() -> None: ... Reasoning • Nothing currently bounds a hang. Only .github/workflows/relator.yml sets timeout-minutes; test.yml, test-extras.yml, build-wheels.yml and codspeed.yml do not, so a single deadlocked test burns the GitHub Actions default of 6 hours per job — multiplied across the Python/Django matrix. • The suite has real hang-prone surface. asyncio_mode = 'auto' means every async test can deadlock on an unawaited future; tests/test_integration/test_throttling/test_backends/test_redis_backend/ talks to a live Redis/Valkey; the streaming tests consume generators; the smoke tests spawn subprocesses. Today a wedged backend looks like "CI is slow", not "CI is broken". • Attribution. A job-level timeout-minutes kills the run without telling you which test hung. pytest-timeout dumps the stack of the offending test and keeps going, which is the difference between a five-minute fix and a bisect. • Locally too. The same protection applies to just unit, where a hang currently requires a manual Ctrl-C and offers no traceback. • Cheap. One pure-Python dev dependency, no runtime impact on the shipped package. Notes / open questions • It has to go in the unit-test group specifically: that group is the minimal one installed by cibuildwheel, and with --strict-config in addopts an unknown timeout ini key would make pytest error out anywhere the plugin isn't installed. • timeout_method = "thread" behaves the same on every platform (relevant for the Windows wheel jobs); signal gives a slightly nicer traceback but is POSIX-only. Happy to go with either. • The 30s default is a starting point — it should be set above the slowest current test so the change is a no-op for a green suite. Worth a --durations run to pick the number. #feature #good_first_issue #help_wanted #django_modern_rest sent via relator0,43%
- 16 окт. 2025 г.без подписи0,43%
- 5 авг. 2025 г.без подписи0,31%
- 11 дек.без подписи0,26%
- 6 окт. 2025 г.без подписи0,21%
- 7 окт. 2025 г.без подписи0,21%
- 2 авг.🚀 New issue to ag2ai/faststream by @sobolevn 📝 Consider using `syrupy` for tests (#2978) Link: https://pypi.org/project/syrupy/ Example usage: • https://github.com/wemake-services/django-modern-rest/blob/master/tests/test_unit/test_plugins/test_msgspec/test_msgspec_snapshots.py • https://github.com/wemake-services/django-modern-rest/blob/master/tests/test_unit/test_plugins/test_msgspec/__snapshots__/test_msgspec_snapshots.ambr #good_first_issue #faststream #ag2ai sent via relator0,19%