HoneyryderChuck / httpx

(Mirror) An HTTP client library for ruby
https://gitlab.com/os85/httpx
Apache License 2.0
192 stars 10 forks source link

Remove deprecated lazy option from datadog adapter #41

Closed sobstel closed 8 months ago

sobstel commented 8 months ago

Removed lazy option for datadog adapter as it is now deprecated in datadog (https://github.com/DataDog/dd-trace-rb/pull/2931) and what's worse it makes httpx to throw warnings for each usage (5 warning together).

WARN -- ddtrace: [ddtrace] Defining an option as lazy is deprecated for removal. Options now always behave as lazy. Please remove all references to the lazy setting.
+# Non-lazy options that were previously stored as blocks are no longer supported. If you used this feature, please let us know by opening an issue on: https://github.com/datadog/dd-trace-rb/issues/new so we can better understand and support your use case. This will be enforced in the next major release.
HoneyryderChuck commented 8 months ago

Hi, thx for the patch.

Which version(s) of ddtrace are affected by this? AFAIK this does not affect "latest"

sobstel commented 8 months ago

Which version(s) of ddtrace are affected by this? AFAIK this does not affect "latest"

I've noticed it after upgrading to 1.20.0

It is on master branch: https://github.com/DataDog/dd-trace-rb/blob/81e6060550e4c860ae6ac8b26d0be3dea0e375d0/lib/datadog/core/configuration/option_definition.rb#L98C1-L106C14

and lazy doesn't work and throws warnings since 1.13.0 (https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md#added-7)

HoneyryderChuck commented 8 months ago

created this MR to address this. Your PR was removing .lazy calls in blocks for versions older than 1.13, as well as unversioned code blocks.

Closing the MR, but feel free to comment.