Skip to content
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

Add an update method to the Headers datastructure #1687

Merged
merged 1 commit into from Jan 5, 2020

Conversation

pgjones
Copy link
Member

@pgjones pgjones commented Dec 29, 2019

This allows a typical dict action (namely a.update(b)) to be possible
with Headers instances. Notably I think the update action should
emulate that of standard python dictionaries and overwrite rather than
extend (the multi keys). This is the opposite to how the Werkzeug
MultiDict works.

I'm starting to migrate Quart to be based on Werkzeug, and I'm likely to have a few of these differences that ideally I'd like Werkzeug to adopt.

@davidism davidism added this to the 1.0.0 milestone Jan 5, 2020
@davidism
Copy link
Member

@davidism davidism commented Jan 5, 2020

Do you want to re-submit this from a branch other than master? Otherwise when I force push you'll need to git reset once it's merged.

In addition to rebasing, needs a changelog and .. versionadded entry.

src/werkzeug/datastructures.py Outdated Show resolved Hide resolved
@pgjones pgjones force-pushed the master branch 2 times, most recently from 78379ad to 56f3547 Compare Jan 5, 2020
@pgjones
Copy link
Member Author

@pgjones pgjones commented Jan 5, 2020

What version will this be added to, 1?

Also I continually trash my github fork master branches, so no worries.

src/werkzeug/datastructures.py Outdated Show resolved Hide resolved
This allows a typical dict action (namely a.update(b)) to be possible
with Headers instances. Notably I think the update action should
emulate that of standard python dictionaries and overwrite rather than
extend (the multi keys). This is the opposite to how the Werkzeug
MultiDict works.
@davidism davidism merged commit 5062cb2 into pallets:master Jan 5, 2020
12 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants