Skip to content

fix: remove custom URL encoding #1816

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

Merged
merged 1 commit into from
Jan 9, 2022
Merged

fix: remove custom URL encoding #1816

merged 1 commit into from
Jan 9, 2022

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovos JohnVillalovos commented Jan 8, 2022

We were using str.replace() calls to take care of URL encoding
issues.

Switch them to use our utils._url_encode() function which itself uses
urllib.parse.quote()

Closes: #1356

@JohnVillalovos JohnVillalovos requested a review from nejch January 8, 2022 22:14
@JohnVillalovos JohnVillalovos force-pushed the jlvillal/remove_replace branch from 8c17afa to 2a209c3 Compare January 8, 2022 22:23
@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2022

Codecov Report

Merging #1816 (3d49e5e) into main (0dba899) will increase coverage by 0.08%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##             main    #1816      +/-   ##
==========================================
+ Coverage   92.01%   92.10%   +0.08%     
==========================================
  Files          76       76              
  Lines        4799     4801       +2     
==========================================
+ Hits         4416     4422       +6     
+ Misses        383      379       -4     
Flag Coverage Δ
cli_func_v4 81.35% <38.88%> (-0.04%) ⬇️
py_func_v4 80.17% <77.77%> (+0.09%) ⬆️
unit 83.04% <38.88%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/v4/objects/features.py 68.42% <0.00%> (-3.81%) ⬇️
gitlab/mixins.py 91.54% <100.00%> (ø)
gitlab/utils.py 88.00% <100.00%> (ø)
gitlab/v4/cli.py 81.56% <100.00%> (ø)
gitlab/v4/objects/files.py 100.00% <100.00%> (+6.66%) ⬆️
gitlab/v4/objects/repositories.py 83.07% <100.00%> (ø)

Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

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

Thanks again John! Just a few questions.

@JohnVillalovos JohnVillalovos force-pushed the jlvillal/remove_replace branch 4 times, most recently from ca85f93 to 94dd1e0 Compare January 8, 2022 23:43
@nejch
Copy link
Member

nejch commented Jan 9, 2022

As discussed let's call this a fix as I think it fixes a few issues including submodule updates for filepaths with dots, if I'm not mistaken.

We were using `str.replace()` calls to take care of URL encoding
issues.

Switch them to use our `utils._url_encode()` function which itself uses
`urllib.parse.quote()`

Closes: #1356
@JohnVillalovos JohnVillalovos force-pushed the jlvillal/remove_replace branch from 94dd1e0 to 3d49e5e Compare January 9, 2022 00:19
@JohnVillalovos JohnVillalovos requested a review from nejch January 9, 2022 00:20
@nejch nejch changed the title chore: remove custom URL encoding fix: remove custom URL encoding Jan 9, 2022
@nejch nejch merged commit 24d2766 into main Jan 9, 2022
@nejch nejch deleted the jlvillal/remove_replace branch January 9, 2022 00:55
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.

Get rid of all custom URL encoding
3 participants