-
-
Notifications
You must be signed in to change notification settings - Fork 884
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
Allow the adding of headers rather than just overwriting all headers #958
Conversation
2d26619
to
b965f84
Compare
@pradcliffe-ns please merge in the changes from master, solve the conflicts and maybe explain the added functionality improvement in the PR itself (some code sample would be nice) |
@studioj I filed this 9 months ago and was trying to be helpful in adding functionality that was useful as explained above. I'm working on different projects now and I'm not sure I have time to add to this. Going back to try and produce example code and work out where in your project those belong is not trivial. It's a pretty simple change that allows you to add headers without overwriting them all as I explained above, anything in headers within DEFAULT_OPTIONS - Line 276 in b93cdb8
|
I believe it would be smart to add a test verifying this behavior. But that's my QA person opinion :) in the end up to @ssbarnea :-) i just try to offload some work of of him. @pradcliffe-ns |
I have no idea what "because of black" means. |
@pradcliffe-ns this repo uses the uncompromising code formatter "black" https://pypi.org/project/black/ which is rapidly becoming a standard as code formatting goes. if you don't know it yet, it's a very interesting project. how to fix your code ...
|
Please assure that at least running |
Refer to #1085 |
In the current update of the options dict you either overwrite all default headers or none. This change allows the addition of headers or changing of existing headers without removing other default headers. That way the current
headers
entries inDEFAULT_OPTIONS
will not need to be duplicated in code that uses the module and if the default headers set is updated in the future it will be used as expected.