Skip to content
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

fix(httpx): manually construct removed URL.raw property #4595

Merged
merged 3 commits into from Nov 21, 2022

Conversation

Yun-Kim
Copy link
Contributor

@Yun-Kim Yun-Kim commented Nov 18, 2022

Description

As of httpx==0.23.1, the URL.raw property was removed, which broke our _url_to_str() helper that uses that property to construct the raw URL.

However, the removed property was simply a combination of already existing (and still existing) properties in the URL object, which we can use to manually consturct the raw URL. I've version gated it such that nothing's changed for previous versions of httpx, but moving forward we'll manually construct the raw URL.

Checklist

Motivation

Design

Testing strategy

Relevant issue(s)

Testing strategy

Reviewer Checklist

  • Title is accurate.
  • Description motivates each change.
  • No unnecessary changes were introduced in this PR.
  • Avoid breaking API changes unless absolutely necessary.
  • Tests provided or description of manual testing performed is included in the code or PR.
  • Release note has been added for fixes and features, or else changelog/no-changelog label added.
  • All relevant GitHub issues are correctly linked.
  • Backports are identified and tagged with Mergifyio.

@Yun-Kim Yun-Kim added the changelog/no-changelog A changelog entry is not required for this PR. label Nov 18, 2022
@Yun-Kim Yun-Kim requested a review from a team as a code owner November 18, 2022 19:03
brettlangdon
brettlangdon previously approved these changes Nov 18, 2022
Copy link
Member

@brettlangdon brettlangdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one thought, but other lgtm

ddtrace/contrib/httpx/patch.py Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2022

Codecov Report

Merging #4595 (8c55117) into 1.x (0ea7b6a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              1.x    #4595   +/-   ##
=======================================
  Coverage   77.95%   77.96%           
=======================================
  Files         759      759           
  Lines       60125    60131    +6     
=======================================
+ Hits        46872    46879    +7     
+ Misses      13253    13252    -1     
Impacted Files Coverage Δ
ddtrace/contrib/httpx/patch.py 95.50% <100.00%> (+0.32%) ⬆️
tests/utils.py 90.58% <0.00%> (+0.23%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Yun-Kim Yun-Kim mentioned this pull request Nov 18, 2022
10 tasks
@brettlangdon
Copy link
Member

@Mergifyio backport 1.6

@brettlangdon
Copy link
Member

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2022

backport 1.6

✅ Backports have been created

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2022

refresh

✅ Pull request refreshed

@mergify mergify bot merged commit 6a1948d into DataDog:1.x Nov 21, 2022
mergify bot pushed a commit that referenced this pull request Nov 21, 2022
## Description
[As of `httpx==0.23.1`](encode/httpx#2241), the `URL.raw` property was removed, which broke our `_url_to_str()` helper that uses that property to construct the raw URL.

However, the removed property was simply a combination of already existing (and still existing) properties in the `URL` object, which we can use to manually consturct the raw URL. I've version gated it such that nothing's changed for previous versions of `httpx`, but moving forward we'll manually construct the raw URL.

## Checklist
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.

## Motivation

## Design

## Testing strategy

## Relevant issue(s)

## Testing strategy

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.

(cherry picked from commit 6a1948d)
@brettlangdon
Copy link
Member

Fixes #4593

@brettlangdon brettlangdon linked an issue Nov 21, 2022 that may be closed by this pull request
@Yun-Kim Yun-Kim deleted the yunkim/fix-httpx branch November 21, 2022 15:27
mergify bot pushed a commit that referenced this pull request Nov 21, 2022
## Description

#4595 should have included a release note, this is the note for that PR.

## Reviewer Checklist
- [x] Title is accurate.
- [x] Description motivates each change.
- [x] No unnecessary changes were introduced in this PR.
- [x] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [x] Tests provided or description of manual testing performed is included in the code or PR.
- [x] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [x] All relevant GitHub issues are correctly linked.
- [x] Backports are identified and tagged with Mergifyio.
mergify bot pushed a commit that referenced this pull request Nov 21, 2022
## Description

#4595 should have included a release note, this is the note for that PR.

## Reviewer Checklist
- [x] Title is accurate.
- [x] Description motivates each change.
- [x] No unnecessary changes were introduced in this PR.
- [x] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [x] Tests provided or description of manual testing performed is included in the code or PR.
- [x] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [x] All relevant GitHub issues are correctly linked.
- [x] Backports are identified and tagged with Mergifyio.

(cherry picked from commit 7dd5f6a)
brettlangdon pushed a commit that referenced this pull request Nov 21, 2022
)

## Description
[As of `httpx==0.23.1`](encode/httpx#2241), the `URL.raw` property was removed, which broke our `_url_to_str()` helper that uses that property to construct the raw URL.

However, the removed property was simply a combination of already existing (and still existing) properties in the `URL` object, which we can use to manually consturct the raw URL. I've version gated it such that nothing's changed for previous versions of `httpx`, but moving forward we'll manually construct the raw URL.

## Checklist
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.

## Motivation

## Design

## Testing strategy

## Relevant issue(s)

## Testing strategy

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.

(cherry picked from commit 6a1948d)

Co-authored-by: Yun Kim <35776586+Yun-Kim@users.noreply.github.com>
Kyle-Verhoog pushed a commit that referenced this pull request Nov 21, 2022
## Description

#4595 should have included a release note, this is the note for that PR.

## Reviewer Checklist
- [x] Title is accurate.
- [x] Description motivates each change.
- [x] No unnecessary changes were introduced in this PR.
- [x] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [x] Tests provided or description of manual testing performed is included in the code or PR.
- [x] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [x] All relevant GitHub issues are correctly linked.
- [x] Backports are identified and tagged with Mergifyio.

(cherry picked from commit 7dd5f6a)

Co-authored-by: Brett Langdon <brett.langdon@datadoghq.com>
Co-authored-by: Yun Kim <35776586+Yun-Kim@users.noreply.github.com>
mabdinur pushed a commit that referenced this pull request Dec 9, 2022
## Description
[As of `httpx==0.23.1`](encode/httpx#2241), the `URL.raw` property was removed, which broke our `_url_to_str()` helper that uses that property to construct the raw URL.

However, the removed property was simply a combination of already existing (and still existing) properties in the `URL` object, which we can use to manually consturct the raw URL. I've version gated it such that nothing's changed for previous versions of `httpx`, but moving forward we'll manually construct the raw URL.



## Checklist
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.





## Motivation


## Design 


## Testing strategy




## Relevant issue(s)


## Testing strategy




## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
mabdinur pushed a commit that referenced this pull request Dec 9, 2022
## Description
[As of `httpx==0.23.1`](encode/httpx#2241), the `URL.raw` property was removed, which broke our `_url_to_str()` helper that uses that property to construct the raw URL.

However, the removed property was simply a combination of already existing (and still existing) properties in the `URL` object, which we can use to manually consturct the raw URL. I've version gated it such that nothing's changed for previous versions of `httpx`, but moving forward we'll manually construct the raw URL.



## Checklist
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] [Library documentation](https://github.com/DataDog/dd-trace-py/tree/1.x/docs) and/or [Datadog's documentation site](https://github.com/DataDog/documentation/) is updated. Link to doc PR in description.





## Motivation


## Design 


## Testing strategy




## Relevant issue(s)


## Testing strategy




## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
brettlangdon pushed a commit that referenced this pull request Dec 22, 2022
## Description

CI mitigation for issue addressed in this PR
#4595

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] Avoid breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is
included in the code or PR.
- [ ] Release note has been added and follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/contributing.html#Release-Note-Guidelines),
or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.

Co-authored-by: Yun Kim <35776586+Yun-Kim@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility introduced in HTTPX 0.23.1
5 participants