diff --git a/.changeset/add_metapdm_option_for_generating_pep621_pdm_metadata.md b/.changeset/add_metapdm_option_for_generating_pep621_pdm_metadata.md deleted file mode 100644 index cbed8d823..000000000 --- a/.changeset/add_metapdm_option_for_generating_pep621_pdm_metadata.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -default: minor ---- - -# Add `--meta=pdm` option for generating PEP621 + PDM metadata - -The default metadata is still `--meta=poetry`, which generates a `pyproject.toml` file with Poetry-specific metadata. -This change adds the `--meta=pdm` option which includes [PDM](https://pdm-project.org/latest/)-specific metadata, but also -standard [PEP621](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml) -metadata. This may be useful as a starting point for other dependency managers & build tools (like Hatch). diff --git a/.changeset/add_original_openapi_data_attribute_to_response_object.md b/.changeset/add_original_openapi_data_attribute_to_response_object.md deleted file mode 100644 index 61ccf8de5..000000000 --- a/.changeset/add_original_openapi_data_attribute_to_response_object.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -default: minor ---- - -# Add original OpenAPI `data` attribute to `Response` object - -PR #767 - -In custom templates, you can now access a `response.data` attribute that contains the original OpenAPI definition of the -response (Response Object or Reference Object). diff --git a/.changeset/fix_ruff_formatting_for_metanone.md b/.changeset/fix_ruff_formatting_for_metanone.md deleted file mode 100644 index 4ce3b7a3b..000000000 --- a/.changeset/fix_ruff_formatting_for_metanone.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -default: patch ---- - -# Fix Ruff formatting for `--meta=none` - -PR #940 fixes issue #939. Thanks @satwell! - -Due to the lack of `pyproject.toml`, Ruff was not getting configured properly when `--meta=none`. -As a result, it didn't clean up common generation issues like duplicate imports, which would then cause errors from -linters. - -This is now fixed by changing the default `post_hook` to `ruff check . --fix --extend-select=I` when `--meta=none`. -Using `generate --meta=none` should now be almost identical to the code generated by `update`. diff --git a/.changeset/include_the_up_rule_for_generated_ruff_config.md b/.changeset/include_the_up_rule_for_generated_ruff_config.md deleted file mode 100644 index d9bc5c3a4..000000000 --- a/.changeset/include_the_up_rule_for_generated_ruff_config.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -default: minor ---- - -# Include the `UP` rule for generated Ruff config - -This enables [pyupgrade-like improvements](https://docs.astral.sh/ruff/rules/#pyupgrade-up) which should replace some -`.format()` calls with f-strings. diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b5bb52a4..2d2049163 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,42 @@ Programmatic usage of this project (e.g., importing it as a Python module) and t The 0.x prefix used in versions for this project is to indicate that breaking changes are expected frequently (several times a year). Breaking changes will increment the minor number, all other changes will increment the patch number. You can track the progress toward 1.0 [here](https://github.com/openapi-generators/openapi-python-client/projects/2). +## 0.17.2 (2024-01-15) + +### Features + +#### Add `--meta=pdm` option for generating PEP621 + PDM metadata + +The default metadata is still `--meta=poetry`, which generates a `pyproject.toml` file with Poetry-specific metadata. +This change adds the `--meta=pdm` option which includes [PDM](https://pdm-project.org/latest/)-specific metadata, but also +standard [PEP621](https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#writing-pyproject-toml) +metadata. This may be useful as a starting point for other dependency managers & build tools (like Hatch). + +#### Add original OpenAPI `data` attribute to `Response` object + +PR #767 + +In custom templates, you can now access a `response.data` attribute that contains the original OpenAPI definition of the +response (Response Object or Reference Object). + +#### Include the `UP` rule for generated Ruff config + +This enables [pyupgrade-like improvements](https://docs.astral.sh/ruff/rules/#pyupgrade-up) which should replace some +`.format()` calls with f-strings. + +### Fixes + +#### Fix Ruff formatting for `--meta=none` + +PR #940 fixes issue #939. Thanks @satwell! + +Due to the lack of `pyproject.toml`, Ruff was not getting configured properly when `--meta=none`. +As a result, it didn't clean up common generation issues like duplicate imports, which would then cause errors from +linters. + +This is now fixed by changing the default `post_hook` to `ruff check . --fix --extend-select=I` when `--meta=none`. +Using `generate --meta=none` should now be almost identical to the code generated by `update`. + ## 0.17.1 (2024-01-04) ### Features diff --git a/pyproject.toml b/pyproject.toml index 8224fdf10..2939d310c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ "typing-extensions>=4.8.0,<5.0.0", ] name = "openapi-python-client" -version = "0.17.1" +version = "0.17.2" description = "Generate modern Python clients from OpenAPI" keywords = [ "OpenAPI",