Repository navigation
expose UNSET - #1372
expose UNSET#1372lepture wants to merge 1 commit into
Conversation
Since UNSET is widely used in lots of functions' parameters. When people want to subclass and rewrite a method, or create a function to call httpx, they will need to use this UNSET to define their own parameters too.
|
@lepture Hi, I think it's an interesting point, and I don't think I have an answer right now. I do agree that having this specific type leak through is a bit of a smell, eventually. What would a world in which each library has its own But for now, for the specific use case of the two code examples you listed, it doesn't seem like we need to solve it just yet. In your 2 examples, and also in the snippet in this PR description, it doesn't struck me why the |
|
Closing pre-emptively since I do agree on the problem (it's likely that |
|
Yes, my given examples are not proper. Here is a proper one: https://github.com/lepture/authlib/blob/2af1b9f2c81d5cb847491e96cf762f69215fcf2d/authlib/integrations/httpx_client/oauth2_client.py#L84 There is a check if auth is defined, if not it should attach one. |
|
And also, I have a suggestion, if there is a breaking change, please don鈥檛 release it with a bugfix version. |
|
Gotcha. ;-) Are you referring to a specific issue that's recently struck you? |
Since UNSET is widely used in lots of functions' parameters. When people want to subclass and rewrite a method, or create a function to call httpx, they will need to use this UNSET to define their own parameters too.
A simple example:
Here are some real examples: