You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All notable changes to this project will be documented in this file.
4
+
5
+
The format is based on Keep a Changelog,
6
+
and this project adheres to Semantic Versioning.
7
+
8
+
## [Unreleased]
9
+
10
+
### Changed
11
+
- Централизовано выполнение схемы `request + map` через `Transport.request_public_model`.
12
+
- Убраны прямые обращения доменных клиентов к `request_json` и приватному `Transport._auth_provider`.
13
+
- Секционные клиенты переведены на `@dataclass(slots=True, frozen=True)`.
14
+
- Иерархия исключений упрощена до frozen dataclass без кастомного `__setattr__`.
15
+
- Публичные сигнатуры `accounts`, `ads`, `autoteka`, `cpa`, `jobs`, `messenger`, `orders`, `promotion`, `ratings` и `realty` переведены с `request`-DTO на keyword-only примитивы и коллекции.
16
+
- Transport получил поддержку `Idempotency-Key`; публичные write-методы во всех доменах принимают `idempotency_key`, а dry-run/write-контракт promotion покрыт тестами.
17
+
- Во всех доменных пакетах добавлены `enums.py`; `accounts`, `ads`, `autoteka`, `jobs`, `messenger`, `orders`, `promotion`, `ratings`, `realty` и `tariffs` переведены на typed enums с fallback на `UNKNOWN` и warning-логом ровно один раз на неизвестное upstream-значение.
18
+
19
+
## [1.0.2] - 2026-04-21
20
+
21
+
### Added
22
+
- Первый публичный релиз changelog для `avito-py`.
23
+
24
+
### Changed
25
+
- Зафиксирована базовая структура истории изменений для следующих фаз исправления STYLEGUIDE.
Copy file name to clipboardExpand all lines: STYLEGUIDE.md
+1-16Lines changed: 1 addition & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,7 +339,7 @@ All HTTP must go through a single transport layer.
339
339
Rules:
340
340
341
341
- Direct calls to `httpx.get()`/`httpx.post()` inside section clients are forbidden.
342
-
- Use `httpx.Client`or `httpx.AsyncClient`as an internal dependency of the transport layer.
342
+
- Use `httpx.Client` as an internal dependency of the transport layer.
343
343
- Timeouts are set explicitly.
344
344
- Authorization headers are injected by the transport/auth layer, not by business methods.
345
345
- URL construction, error handling, retries, and logging are concentrated in the transport.
@@ -349,7 +349,6 @@ Recommendation:
349
349
350
350
- Build a high-quality sync SDK first.
351
351
- The SDK is synchronous — this must be explicitly documented in the README and public API.
352
-
- An async version should be added as a separate layer, not mixed with sync in the same classes.
353
352
354
353
### User-Agent and Client Identification
355
354
@@ -363,19 +362,6 @@ Recommendation:
363
362
- Overrides must not mutate the client or shared state. The transport layer resolves the effective policy as `override or client_default` without writing back.
364
363
- The list of supported per-operation overrides is part of the public contract and must be documented on each public method.
365
364
366
-
## Async and Sync Parity
367
-
368
-
When an async surface is added it must be a separate, parallel layer, not a retrofit of sync classes.
369
-
370
-
Rules:
371
-
372
-
- The async namespace is `avito.aio` with mirrored module paths: `avito.aio.client`, `avito.aio.<domain>.client`.
373
-
- Async client classes have the same names as their sync counterparts (`AvitoClient`, `AdClient`, ...) but live in the `aio` namespace.
374
-
- Public method names and parameter lists must be identical between sync and async. Only the call-site keyword (`await`) and the context-manager form (`async with`) differ.
375
-
- Mixing `async def` and `def` on the same class is forbidden.
376
-
- Return types are the same public dataclasses in both layers. `PaginatedList[T]` has an `AsyncPaginatedList[T]` sibling with matching semantics and matching `materialize()`.
377
-
- Feature parity between sync and async is part of the public contract: a method that exists in sync must exist in async within the same release, or be explicitly marked sync-only in the documentation.
378
-
379
365
## Authorization
380
366
381
367
Authorization must be fully abstracted away from API methods.
@@ -885,6 +871,5 @@ Rules:
885
871
- Retrying non-idempotent writes without an idempotency key or an explicit per-operation opt-in.
886
872
- Raising on expected "not found" for probe methods (`exists()` must return `False`, not throw).
887
873
- Exposing `FakeTransport` only through internal test imports instead of `avito.testing`.
888
-
- Mixing sync and async surfaces in the same class or module (`avito.aio` is the only home for async).
889
874
- Public methods that swallow upstream `request_id` or retry `attempt` in raised exceptions.
890
875
- Documentation that covers only reference or only tutorials (all four Diátaxis modes are mandatory).
0 commit comments