Skip to content

Support Hackney 3.x#824

Draft
tomekowal wants to merge 1 commit intoelixir-tesla:masterfrom
tomekowal:support-hackney-2.x
Draft

Support Hackney 3.x#824
tomekowal wants to merge 1 commit intoelixir-tesla:masterfrom
tomekowal:support-hackney-2.x

Conversation

@tomekowal
Copy link
Copy Markdown
Contributor

@tomekowal tomekowal commented Jan 24, 2026

This PR is a starting point on supporting hackney 2.x by tesla.
So far:

TBD:

  • if the adapter for Hackney 2.x will require extensive changes, it might be better to have a second module and decinde at runtime which one to load

TODO:

  • make sure all tests pass
  • squash to conventional commits after everything works

Note: the tests here are green because they still use old hackney. On new version

@tomekowal tomekowal mentioned this pull request Jan 24, 2026
@yordis
Copy link
Copy Markdown
Member

yordis commented Jan 26, 2026

if the adapter for Hackney 2.x will require extensive changes, it might be better to have a second module and decinde at runtime which one to load

If you feel that is the right approach, I really do not mind. These type of configuration are barely the "every day" situation. So, feel free to create a HackneyV2 and we mark the module as experimental in the worse case.

Try to keep safety checks at compile-time as much as we can.

Make it work, then make it beautiful.

@tomekowal tomekowal changed the title Support Hackney 2.x Support Hackney 3.x Feb 15, 2026
@tomekowal tomekowal force-pushed the support-hackney-2.x branch from d97f067 to 5c37538 Compare March 18, 2026 07:05
- Handle PID connection handles (hackney 2.x+ uses PIDs instead of refs)
- Add finish_send_body call for streaming requests
- Convert cacertfile to cacerts for hackney 3.x SSL compatibility
- Use hackney_conn.body/2 for reading response body in hackney 3.x
- Remove deprecated max_body test (hackney 3.x changed body reading API)
- Require hackney >= 3.2.1 (fixes recv_timeout with connection pooling)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomekowal tomekowal force-pushed the support-hackney-2.x branch from 5c37538 to b4e3ac3 Compare March 18, 2026 07:16
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.

2 participants