Skip to content

allow to update query string using mod operator#435

Merged
asvetlov merged 5 commits intoaio-libs:masterfrom
vanyakosmos:feature/query-op
Jul 19, 2020
Merged

allow to update query string using mod operator#435
asvetlov merged 5 commits intoaio-libs:masterfrom
vanyakosmos:feature/query-op

Conversation

@vanyakosmos
Copy link
Copy Markdown
Contributor

@vanyakosmos vanyakosmos commented Apr 4, 2020

What do these changes do?

update query string using mod operator

Are there changes in behavior for the user?

url = URL('https://example.com') % {'a': '1'}
assert str(url) == 'https://example.com?a=1'

Related issue number

close #434

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder
    • name it <issue_id>.<type> (e.g. 588.bugfix)
    • if you don't have an issue_id change it to the pr id after creating the PR
    • ensure type is one of the following:
      • .feature: Signifying a new feature.
      • .bugfix: Signifying a bug fix.
      • .doc: Signifying a documentation improvement.
      • .removal: Signifying a deprecation or removal of public API.
      • .misc: A ticket has been closed, but it is not of interest to users.
    • Make sure to use full sentences with correct case and punctuation, for example: Fix issue with non-ascii contents in doctest text files.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2020

Codecov Report

Merging #435 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #435      +/-   ##
==========================================
+ Coverage   99.24%   99.25%   +0.01%     
==========================================
  Files           2        2              
  Lines         664      673       +9     
  Branches      152      154       +2     
==========================================
+ Hits          659      668       +9     
  Misses          5        5              
Impacted Files Coverage Δ
yarl/__init__.py 99.01% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78f49dc...6a2a6d2. Read the comment docs.

@webknjaz webknjaz requested a review from asvetlov April 4, 2020 12:13
@webknjaz
Copy link
Copy Markdown
Member

webknjaz commented Apr 4, 2020

close #434

that issue suggests // and you're using % here..

Copy link
Copy Markdown
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the UX research part is missing here: #434 (comment)

@asvetlov
Copy link
Copy Markdown
Member

I like this PR and can buy it.

Please make the following before the merge:

  1. Document % in docs/api.rst. docs/index.rst and README.rst should probably be updated as well to promote the new syntax instead of update_query() / with_query() calls.
  2. Update __init__.pyi to reflect the new method.
  3. Add CHANGES/435.feature file with a short one-line announcement for the feature.

Copy link
Copy Markdown
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The steps above are required to make the PR done.

Copy link
Copy Markdown
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please apply my comments.

Comment thread CHANGES/435.feature Outdated
Comment thread README.rst Outdated
Comment thread docs/api.rst Outdated
Comment thread docs/index.rst Outdated
@asvetlov asvetlov merged commit 7aee9aa into aio-libs:master Jul 19, 2020
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.

improve addition of query string

3 participants