-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
I know that Requests compatibility is an important feature that HTTPX aims at providing. I was thinking about this and had a couple of ideas relative to having people migrating from Requests to HTTPX.
1 - Migration guide. If I was a user thinking of doing the migration, I'd be looking for a migration guide. It should be prominently placed on the project home page, explain the various steps to follow, and highlight key points to pay attention to (e.g. API differences and missing/replaced features). I think we already capture part of this here.
2 - Migration QA. To ensure that our API is actually Requests-compatible (at least on a basic level), we could just test it. For example, ensure that a simple requests-based test suite keeps passing if we search/replace requests with httpx.
3 - Automated migration. Pushing the idea further, we could provide some kind of tool to automatically upgrade code from Requests to HTTPX. (Being familiar with the Angular ecosystem, I remember that rxjs-5-to-6-migrate has made the switch from RxJS v5 to RxJS v6 much easier, and I'm sure it resulted in increased adoption overall.) I'm not sure how relevant and how much impact this will have, but I'd be interested in experimenting with this (seems like an interesting opportunity to play with the AST module or a tool like Bowler? 😄).
Mostly opening this to capture these ideas, not sure where this will go. Any thoughts much welcome!