Cadwyn

Latest version: v4.4.3

Safety actively analyzes 688126 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 14

4.0.0

Versions 3.x.x are still supported in terms of bug and security fixes but all the new features will go into versions 4.x.x.

Added

* Runtime schema/enum generation
* Support for versions as ISO date strings instead of dates in `cadwyn.migrate_response_body` and `cadwyn.Version`

Removed

* Pydantic 1 support
* Code generation from everywhere. It is now completely replaced by runtime generation (so schemas/enums are generated in the same manner as endpoints). This allows Cadwyn to version things outside of your project and allows you to pick any project structure unlike codegen that required a single "head" directory with all the versioned modules.
* CLI commands for codegen
* `cadwyn.main` because it is replaced by `cadwyn.__init__`
* `cadwyn.structure.module` as it was only necessary in codegen
* `cadwyn.VersionBundle.latest_schemas_package` and `cadwyn.VersionBundle.head_schemas_package`, `cadwyn.VersionBundle.versioned_modules`, `cadwyn.VersionBundle.versioned_directories_with_head`, `cadwyn.VersionBundle.versioned_directories_without_head`, because they were only necessary in code generation
* `cadwyn.Cadwyn.add_unversioned_routers` as you can now simply use FastAPI's `include_router`
* `cadwyn.Cadwyn.add_unversioned_routes` as you can now simply use any of FastAPI's methods for adding routes directly to the app
* `cadwyn.Cadwyn.enrich_swagger` as its functionality has been automated
* `cadwyn.InternalRepresentationOf` as it was deprecated previously and is now replaced with HeadVersion migrations

Changed

* `VersionBundle.migrate_response_body` is no longer a method of `VersionBundle` and is now importable directly from `cadwyn` as a function
* `cadwyn.structure` is no longer recommended to be used directly because everything from it is now available in `cadwyn` directly

3.15.8

Fixed

* Invalid unparseable JSON response without quotes when the response was a raw string JSONResponse
* An exception raised during codegen if a pydantic model or its parent were created within some indent such as classes defined under if statements

3.15.7

Fixed

* Wrong globals being used for wrapped endpoints in older versions, sometimes causing FastAPI to fail to resolve forward references on endpoint generation (see 192 for more details)
* dependency_overrides not working for old versions of the endpoints because they were wrapped and wraps did not have the same `__hash__` and `__eq__` as the original dependencies

3.15.6

Added

* `HeadVersion` and `Version` into `cadwyn.__init__` so now they are directly importable from `cadwyn`

Fixed

* Fix dependencies from other libraries not resolving if they use fastapi.Request or fastapi.Response (added svcs-specific test)
* Now a proper exception is used when no dated version was passed into `VersionBundle`

3.15.5

Fixed

* Fix dependency overrides not working for versioned routes

3.15.4

Changed

* `Cadwyn.enrich_swagger` is now completely unnecessary: openapi is now generated at runtime. It also now does not do anything, is deprecated, and will be removed in a future version

Fixed

* fastapi-pagination now does not require an explicit call to `Cadwyn.enrich_swagger`

Page 3 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.