django-api-versioning 1.2.0__tar.gz → 1.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/CHANGELOG.md +11 -0
  2. {django_api_versioning-1.2.0/django_api_versioning.egg-info → django_api_versioning-1.2.1}/PKG-INFO +26 -3
  3. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/README.md +25 -2
  4. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1/django_api_versioning.egg-info}/PKG-INFO +26 -3
  5. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/pyproject.toml +1 -1
  6. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/LICENSE +0 -0
  7. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/MANIFEST.in +0 -0
  8. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/__init__.py +0 -0
  9. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/channels.py +0 -0
  10. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/decorators.py +0 -0
  11. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/exceptions.py +0 -0
  12. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/lifecycle.py +0 -0
  13. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/lifecycle_metadata.py +0 -0
  14. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/management/__init__.py +0 -0
  15. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/management/commands/__init__.py +0 -0
  16. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/management/commands/check_versions.py +0 -0
  17. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/management/commands/migrate_endpoints.py +0 -0
  18. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/py.typed +0 -0
  19. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/registry.py +0 -0
  20. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/reverse.py +0 -0
  21. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/routers.py +0 -0
  22. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/settings.py +0 -0
  23. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/spectacular.py +0 -0
  24. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/testing.py +0 -0
  25. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning/urls.py +0 -0
  26. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning.egg-info/SOURCES.txt +0 -0
  27. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning.egg-info/dependency_links.txt +0 -0
  28. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning.egg-info/requires.txt +0 -0
  29. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/django_api_versioning.egg-info/top_level.txt +0 -0
  30. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/pytest.ini +0 -0
  31. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/requirements-dev.txt +0 -0
  32. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/requirements.txt +0 -0
  33. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/setup.cfg +0 -0
  34. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/__init__.py +0 -0
  35. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/conftest.py +0 -0
  36. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/settings.py +0 -0
  37. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_channels.py +0 -0
  38. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_channels_extra.py +0 -0
  39. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_decorators.py +0 -0
  40. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_distribution_contents.py +0 -0
  41. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_exceptions.py +0 -0
  42. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_lifecycle.py +0 -0
  43. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_lifecycle_integration.py +0 -0
  44. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_management_commands.py +0 -0
  45. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_registry.py +0 -0
  46. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_reverse.py +0 -0
  47. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_route_removal.py +0 -0
  48. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_routers.py +0 -0
  49. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_segment_model.py +0 -0
  50. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_settings.py +0 -0
  51. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_spectacular.py +0 -0
  52. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_testing_utils.py +0 -0
  53. {django_api_versioning-1.2.0 → django_api_versioning-1.2.1}/tests/test_urls.py +0 -0
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.1] - 2026-11-19
11
+
12
+ ### Documentation
13
+
14
+ - Refresh the PyPI long description and align published-version guidance with the 1.2.0 release.
15
+ - Restore the landing page’s original, more concise section flow while keeping product positioning in page metadata and documentation.
16
+
17
+ ### Packaging
18
+
19
+ - Publish the documentation and project-metadata update as a patch release; no runtime behavior changes.
20
+
10
21
  ## [1.2.0] - 2026-11-19
11
22
 
12
23
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-api-versioning
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: URL-path API versioning for Django and Django REST Framework with decorator-based endpoint registration and forward route inheritance.
5
5
  Author-email: Mojtaba Arvin <ArvinDevDay@gmail.com>
6
6
  License-Expression: MIT
@@ -120,7 +120,30 @@ Django API Versioning makes that mapping explicit with `@endpoint`:
120
120
 
121
121
  This is inheritance of route registrations, not automatic backward compatibility. Your application remains responsible for response schemas, business behavior, and compatibility tests.
122
122
 
123
- **Included in the upcoming 1.2.0 release (not yet published):** Explicit endpoint removal is implemented in the repository and will be included in the next release; it is not part of the published `1.1.0` artifact. Use `remove_endpoint("orders/", from_version=3)` for decorator endpoints or `VersionedRouter.remove(prefix, route_name, from_version=...)` for one generated DRF action. Earlier versions retain the route, removed versions return 404, and a later source declaration can explicitly reintroduce it. These APIs are documented in the [endpoint-removal contract](https://github.com/mojtaba-arvin/django-api-versioning/blob/main/docs/design/endpoint-removal.md). The 1.2.0 release candidate also adds `set_endpoint_lifecycle()` for decorator endpoints and `VersionedRouter.set_lifecycle()` for DRF operations. The optional `EndpointLifecycleAutoSchema` integration marks matching deprecated OpenAPI operations; these endpoint-level lifecycle APIs are also included in the upcoming `1.2.0` release, pending publication. See the [endpoint lifecycle design](https://github.com/mojtaba-arvin/django-api-versioning/blob/main/docs/design/endpoint-lifecycle.md).
123
+ ### How it complements Django REST Framework
124
+
125
+ DRF and this package solve related but different parts of API versioning:
126
+
127
+ | Responsibility | Django REST Framework | django-api-versioning |
128
+ |---|---|---|
129
+ | Identify a requested version | Built-in schemes such as URL path, namespace, query parameter, hostname, and Accept header | Selects registered implementations through concrete URL-path routes; VersionedRouterVersioning exposes the matched ViewSet namespace as request.version |
130
+ | Generate ViewSet routes | SimpleRouter and DefaultRouter generate actions and URL patterns | VersionedRouter integrates DRF SimpleRouter patterns with the package registry |
131
+ | Select a different implementation per version | Application code or separately maintained URL configurations | Declarative endpoint registration and per-generated-route inheritance/replacement |
132
+ | Carry unchanged endpoints forward | Application-managed | Built in to the registry |
133
+ | Inspect and guard the effective route matrix | Application-managed | check_versions and assert_version_matrix |
134
+
135
+ Use DRF's own versioning schemes when request-version identification is all you need. Use ordinary DRF routers when you want to manage each version's URL configuration yourself. Choose this package when you want a central registry to map concrete URL routes to version-specific implementations and carry unchanged routes forward. For ViewSets, use VersionedRouter; for Django views, APIView, and GenericAPIView, use @endpoint.
136
+
137
+ ### What it does not do
138
+
139
+ - It does not negotiate versions through request headers, query parameters, hostnames, or tenants. The related channel/resolver settings are reserved and do not activate dispatch.
140
+ - It does not transform serializers or response payloads, guarantee semantic backward compatibility, or replace application contract tests.
141
+ - It does not decorate DRF ViewSet classes directly with @endpoint; use VersionedRouter for package-managed SimpleRouter integration.
142
+ - It does not provide DefaultRouter API-root/format-suffix parity, automatic endpoint-module discovery, or a built-in version-discovery endpoint.
143
+ - It does not generate a separate OpenAPI schema for each API version. The repository's executable OpenAPI example is validation tooling, not a package runtime dependency.
144
+
145
+
146
+ **Available since 1.2.0:** Explicit endpoint removal is supported through remove_endpoint() for decorator endpoints and VersionedRouter.remove() for generated DRF actions. Earlier versions retain the route, removed versions return 404, and a later declaration can explicitly reintroduce it. Version 1.2.0 also adds set_endpoint_lifecycle() for decorator endpoints and VersionedRouter.set_lifecycle() for DRF operations. The optional EndpointLifecycleAutoSchema integration marks matching deprecated OpenAPI operations. See the endpoint-removal and endpoint-lifecycle design documents.
124
147
 
125
148
  ## Why use it with Django REST Framework?
126
149
 
@@ -213,7 +236,7 @@ For endpoints that should exist only in selected versions, pass `versions=[1, 3]
213
236
 
214
237
  The adapter is required when ViewSets need `request.version`, `reverse_action()`, or hyperlinked serializer support. You can configure it globally through `REST_FRAMEWORK` as shown above, or set `versioning_class = VersionedRouterVersioning` on selected ViewSets.
215
238
 
216
- **Scope:** the initial integration supports DRF `SimpleRouter`; it does not claim `DefaultRouter` API-root or format-suffix parity. It does not transform serializers or response payloads. A route omitted from a later ViewSet remains inherited; remove it explicitly with `VersionedRouter.remove()` (included in the upcoming 1.2.0 release, not in the published `1.1.0` artifact). Header/query/tenant negotiation is not enabled by the reserved settings and remains a separate design decision.
239
+ **Scope:** the initial integration supports DRF SimpleRouter; it does not claim DefaultRouter API-root or format-suffix parity. It does not transform serializers or response payloads. A route omitted from a later ViewSet remains inherited; remove it explicitly with VersionedRouter.remove() (available since 1.2.0). Header/query/tenant negotiation is not enabled by the reserved settings and remains a separate design decision.
217
240
 
218
241
  For DRF installation, use a version compatible with your Django release:
219
242
  ```bash
@@ -70,7 +70,30 @@ Django API Versioning makes that mapping explicit with `@endpoint`:
70
70
 
71
71
  This is inheritance of route registrations, not automatic backward compatibility. Your application remains responsible for response schemas, business behavior, and compatibility tests.
72
72
 
73
- **Included in the upcoming 1.2.0 release (not yet published):** Explicit endpoint removal is implemented in the repository and will be included in the next release; it is not part of the published `1.1.0` artifact. Use `remove_endpoint("orders/", from_version=3)` for decorator endpoints or `VersionedRouter.remove(prefix, route_name, from_version=...)` for one generated DRF action. Earlier versions retain the route, removed versions return 404, and a later source declaration can explicitly reintroduce it. These APIs are documented in the [endpoint-removal contract](https://github.com/mojtaba-arvin/django-api-versioning/blob/main/docs/design/endpoint-removal.md). The 1.2.0 release candidate also adds `set_endpoint_lifecycle()` for decorator endpoints and `VersionedRouter.set_lifecycle()` for DRF operations. The optional `EndpointLifecycleAutoSchema` integration marks matching deprecated OpenAPI operations; these endpoint-level lifecycle APIs are also included in the upcoming `1.2.0` release, pending publication. See the [endpoint lifecycle design](https://github.com/mojtaba-arvin/django-api-versioning/blob/main/docs/design/endpoint-lifecycle.md).
73
+ ### How it complements Django REST Framework
74
+
75
+ DRF and this package solve related but different parts of API versioning:
76
+
77
+ | Responsibility | Django REST Framework | django-api-versioning |
78
+ |---|---|---|
79
+ | Identify a requested version | Built-in schemes such as URL path, namespace, query parameter, hostname, and Accept header | Selects registered implementations through concrete URL-path routes; VersionedRouterVersioning exposes the matched ViewSet namespace as request.version |
80
+ | Generate ViewSet routes | SimpleRouter and DefaultRouter generate actions and URL patterns | VersionedRouter integrates DRF SimpleRouter patterns with the package registry |
81
+ | Select a different implementation per version | Application code or separately maintained URL configurations | Declarative endpoint registration and per-generated-route inheritance/replacement |
82
+ | Carry unchanged endpoints forward | Application-managed | Built in to the registry |
83
+ | Inspect and guard the effective route matrix | Application-managed | check_versions and assert_version_matrix |
84
+
85
+ Use DRF's own versioning schemes when request-version identification is all you need. Use ordinary DRF routers when you want to manage each version's URL configuration yourself. Choose this package when you want a central registry to map concrete URL routes to version-specific implementations and carry unchanged routes forward. For ViewSets, use VersionedRouter; for Django views, APIView, and GenericAPIView, use @endpoint.
86
+
87
+ ### What it does not do
88
+
89
+ - It does not negotiate versions through request headers, query parameters, hostnames, or tenants. The related channel/resolver settings are reserved and do not activate dispatch.
90
+ - It does not transform serializers or response payloads, guarantee semantic backward compatibility, or replace application contract tests.
91
+ - It does not decorate DRF ViewSet classes directly with @endpoint; use VersionedRouter for package-managed SimpleRouter integration.
92
+ - It does not provide DefaultRouter API-root/format-suffix parity, automatic endpoint-module discovery, or a built-in version-discovery endpoint.
93
+ - It does not generate a separate OpenAPI schema for each API version. The repository's executable OpenAPI example is validation tooling, not a package runtime dependency.
94
+
95
+
96
+ **Available since 1.2.0:** Explicit endpoint removal is supported through remove_endpoint() for decorator endpoints and VersionedRouter.remove() for generated DRF actions. Earlier versions retain the route, removed versions return 404, and a later declaration can explicitly reintroduce it. Version 1.2.0 also adds set_endpoint_lifecycle() for decorator endpoints and VersionedRouter.set_lifecycle() for DRF operations. The optional EndpointLifecycleAutoSchema integration marks matching deprecated OpenAPI operations. See the endpoint-removal and endpoint-lifecycle design documents.
74
97
 
75
98
  ## Why use it with Django REST Framework?
76
99
 
@@ -163,7 +186,7 @@ For endpoints that should exist only in selected versions, pass `versions=[1, 3]
163
186
 
164
187
  The adapter is required when ViewSets need `request.version`, `reverse_action()`, or hyperlinked serializer support. You can configure it globally through `REST_FRAMEWORK` as shown above, or set `versioning_class = VersionedRouterVersioning` on selected ViewSets.
165
188
 
166
- **Scope:** the initial integration supports DRF `SimpleRouter`; it does not claim `DefaultRouter` API-root or format-suffix parity. It does not transform serializers or response payloads. A route omitted from a later ViewSet remains inherited; remove it explicitly with `VersionedRouter.remove()` (included in the upcoming 1.2.0 release, not in the published `1.1.0` artifact). Header/query/tenant negotiation is not enabled by the reserved settings and remains a separate design decision.
189
+ **Scope:** the initial integration supports DRF SimpleRouter; it does not claim DefaultRouter API-root or format-suffix parity. It does not transform serializers or response payloads. A route omitted from a later ViewSet remains inherited; remove it explicitly with VersionedRouter.remove() (available since 1.2.0). Header/query/tenant negotiation is not enabled by the reserved settings and remains a separate design decision.
167
190
 
168
191
  For DRF installation, use a version compatible with your Django release:
169
192
  ```bash
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-api-versioning
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: URL-path API versioning for Django and Django REST Framework with decorator-based endpoint registration and forward route inheritance.
5
5
  Author-email: Mojtaba Arvin <ArvinDevDay@gmail.com>
6
6
  License-Expression: MIT
@@ -120,7 +120,30 @@ Django API Versioning makes that mapping explicit with `@endpoint`:
120
120
 
121
121
  This is inheritance of route registrations, not automatic backward compatibility. Your application remains responsible for response schemas, business behavior, and compatibility tests.
122
122
 
123
- **Included in the upcoming 1.2.0 release (not yet published):** Explicit endpoint removal is implemented in the repository and will be included in the next release; it is not part of the published `1.1.0` artifact. Use `remove_endpoint("orders/", from_version=3)` for decorator endpoints or `VersionedRouter.remove(prefix, route_name, from_version=...)` for one generated DRF action. Earlier versions retain the route, removed versions return 404, and a later source declaration can explicitly reintroduce it. These APIs are documented in the [endpoint-removal contract](https://github.com/mojtaba-arvin/django-api-versioning/blob/main/docs/design/endpoint-removal.md). The 1.2.0 release candidate also adds `set_endpoint_lifecycle()` for decorator endpoints and `VersionedRouter.set_lifecycle()` for DRF operations. The optional `EndpointLifecycleAutoSchema` integration marks matching deprecated OpenAPI operations; these endpoint-level lifecycle APIs are also included in the upcoming `1.2.0` release, pending publication. See the [endpoint lifecycle design](https://github.com/mojtaba-arvin/django-api-versioning/blob/main/docs/design/endpoint-lifecycle.md).
123
+ ### How it complements Django REST Framework
124
+
125
+ DRF and this package solve related but different parts of API versioning:
126
+
127
+ | Responsibility | Django REST Framework | django-api-versioning |
128
+ |---|---|---|
129
+ | Identify a requested version | Built-in schemes such as URL path, namespace, query parameter, hostname, and Accept header | Selects registered implementations through concrete URL-path routes; VersionedRouterVersioning exposes the matched ViewSet namespace as request.version |
130
+ | Generate ViewSet routes | SimpleRouter and DefaultRouter generate actions and URL patterns | VersionedRouter integrates DRF SimpleRouter patterns with the package registry |
131
+ | Select a different implementation per version | Application code or separately maintained URL configurations | Declarative endpoint registration and per-generated-route inheritance/replacement |
132
+ | Carry unchanged endpoints forward | Application-managed | Built in to the registry |
133
+ | Inspect and guard the effective route matrix | Application-managed | check_versions and assert_version_matrix |
134
+
135
+ Use DRF's own versioning schemes when request-version identification is all you need. Use ordinary DRF routers when you want to manage each version's URL configuration yourself. Choose this package when you want a central registry to map concrete URL routes to version-specific implementations and carry unchanged routes forward. For ViewSets, use VersionedRouter; for Django views, APIView, and GenericAPIView, use @endpoint.
136
+
137
+ ### What it does not do
138
+
139
+ - It does not negotiate versions through request headers, query parameters, hostnames, or tenants. The related channel/resolver settings are reserved and do not activate dispatch.
140
+ - It does not transform serializers or response payloads, guarantee semantic backward compatibility, or replace application contract tests.
141
+ - It does not decorate DRF ViewSet classes directly with @endpoint; use VersionedRouter for package-managed SimpleRouter integration.
142
+ - It does not provide DefaultRouter API-root/format-suffix parity, automatic endpoint-module discovery, or a built-in version-discovery endpoint.
143
+ - It does not generate a separate OpenAPI schema for each API version. The repository's executable OpenAPI example is validation tooling, not a package runtime dependency.
144
+
145
+
146
+ **Available since 1.2.0:** Explicit endpoint removal is supported through remove_endpoint() for decorator endpoints and VersionedRouter.remove() for generated DRF actions. Earlier versions retain the route, removed versions return 404, and a later declaration can explicitly reintroduce it. Version 1.2.0 also adds set_endpoint_lifecycle() for decorator endpoints and VersionedRouter.set_lifecycle() for DRF operations. The optional EndpointLifecycleAutoSchema integration marks matching deprecated OpenAPI operations. See the endpoint-removal and endpoint-lifecycle design documents.
124
147
 
125
148
  ## Why use it with Django REST Framework?
126
149
 
@@ -213,7 +236,7 @@ For endpoints that should exist only in selected versions, pass `versions=[1, 3]
213
236
 
214
237
  The adapter is required when ViewSets need `request.version`, `reverse_action()`, or hyperlinked serializer support. You can configure it globally through `REST_FRAMEWORK` as shown above, or set `versioning_class = VersionedRouterVersioning` on selected ViewSets.
215
238
 
216
- **Scope:** the initial integration supports DRF `SimpleRouter`; it does not claim `DefaultRouter` API-root or format-suffix parity. It does not transform serializers or response payloads. A route omitted from a later ViewSet remains inherited; remove it explicitly with `VersionedRouter.remove()` (included in the upcoming 1.2.0 release, not in the published `1.1.0` artifact). Header/query/tenant negotiation is not enabled by the reserved settings and remains a separate design decision.
239
+ **Scope:** the initial integration supports DRF SimpleRouter; it does not claim DefaultRouter API-root or format-suffix parity. It does not transform serializers or response payloads. A route omitted from a later ViewSet remains inherited; remove it explicitly with VersionedRouter.remove() (available since 1.2.0). Header/query/tenant negotiation is not enabled by the reserved settings and remains a separate design decision.
217
240
 
218
241
  For DRF installation, use a version compatible with your Django release:
219
242
  ```bash
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "django-api-versioning"
7
- version = "1.2.0"
7
+ version = "1.2.1"
8
8
  description = "URL-path API versioning for Django and Django REST Framework with decorator-based endpoint registration and forward route inheritance."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"