Skip to content

feat: support httpx 0.27 #974

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2024
Merged

feat: support httpx 0.27 #974

merged 2 commits into from
Feb 21, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 21, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
httpx (changelog) >=0.20.0,<0.27.0 -> >=0.20.0,<0.28.0 age adoption passing confidence
httpx (changelog) >= 0.20.0, < 0.27.0 -> >=0.20.0, <0.28.0 age adoption passing confidence

Release Notes

encode/httpx (httpx)

v0.27.0

Compare Source

Deprecated
  • The app=... shortcut has been deprecated. Use the explicit style of transport=httpx.WSGITransport() or transport=httpx.ASGITransport() instead.
Fixed
  • Respect the http1 argument while configuring proxy transports. (#​3023)
  • Fix RFC 2069 mode digest authentication. (#​3045)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link
Contributor Author

renovate bot commented Feb 21, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@dbanty dbanty changed the title chore(deps): update dependency httpx to v0.27.0 feat: support httpx 0.27 Feb 21, 2024
@dbanty dbanty enabled auto-merge February 21, 2024 21:02
@dbanty dbanty added this pull request to the merge queue Feb 21, 2024
Merged via the queue into main with commit f44e67f Feb 21, 2024
@dbanty dbanty deleted the renovate/httpx-0.x branch February 21, 2024 21:08
dbanty added a commit that referenced this pull request Feb 22, 2024
This PR was created by Knope. Merging it will create a new release

### Breaking Changes

#### For custom templates, changed type of endpoint parameters

**This does not affect projects that are not using
`--custom-template-path`**

The type of these properties on `Endpoint` has been changed from
`Dict[str, Property]` to `List[Property]`:

- `path_parameters`
- `query_parameters`
- `header_parameters`
- `cookie_parameters`

If your templates are very close to the default templates, you can
probably just remove `.values()` anywhere it appears.

The type of `iter_all_parameters()` is also different, you probably want
`list_all_parameters()` instead.

#### Updated generated config for Ruff v0.2

This only affects projects using the `generate` command, not the
`update` command. The `pyproject.toml` file generated which configures
Ruff for linting and formatting has been updated to the 0.2 syntax,
which means it will no longer work with Ruff 0.1.

#### Updated naming strategy for conflicting properties

While fixing #922, some naming strategies were updated. These should
mostly be backwards compatible, but there may be
some small differences in generated code. Make sure to check your diffs
before pushing updates to consumers!

### Features

#### support httpx 0.27 (#974)

### Fixes

#### Allow parameters with names differing only by case

If you have two parameters to an endpoint named `mixedCase` and
`mixed_case`, previously, this was a conflict and the endpoint would not
be generated.
Now, the generator will skip snake-casing the parameters and use the
names as-is. Note that this means if neither of the parameters _was_
snake case, neither _will be_ in the generated code.

Fixes #922 reported by @macmoritz & @benedikt-bartscher.

#### Fix naming conflicts with properties in models with mixed casing

If you had an object with two properties, where the names differed only
by case, conflicting properties would be generated in the model, which
then failed the linting step (when using default config). For example,
this:

```yaml
type: "object"
properties:
  MixedCase:
    type: "string"
  mixedCase:
    type: "string"
```

Would generate a class like this:

```python
class MyModel:
    mixed_case: str
    mixed_case: str
```

Now, neither of the properties will be forced into snake case, and the
generated code will look like this:

```python
class MyModel:
    MixedCase: str
    mixedCase: str
```

Co-authored-by: GitHub <github-actions@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant