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

Use pathlib for path resolution #2506

Merged
merged 4 commits into from
Jul 31, 2022
Merged

Use pathlib for path resolution #2506

merged 4 commits into from
Jul 31, 2022

Conversation

ahopkins
Copy link
Member

Piggyback off #2495 to use pathlib. This way we do not need to do any of the path calculations.

@ahopkins ahopkins requested a review from a team as a code owner July 28, 2022 08:07
@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

Merging #2506 (d83229a) into main (2fa28f1) will decrease coverage by 0.042%.
The diff coverage is 83.333%.

@@              Coverage Diff              @@
##              main     #2506       +/-   ##
=============================================
- Coverage   87.434%   87.392%   -0.043%     
=============================================
  Files           69        69               
  Lines         5555      5560        +5     
  Branches       966       966               
=============================================
+ Hits          4857      4859        +2     
- Misses         507       509        +2     
- Partials       191       192        +1     
Impacted Files Coverage Δ
sanic/mixins/routes.py 93.700% <83.333%> (+0.126%) ⬆️
sanic/server/protocols/http_protocol.py 81.617% <0.000%> (-2.206%) ⬇️

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 2fa28f1...d83229a. Read the comment docs.

seemethere
seemethere previously approved these changes Jul 28, 2022
@ahopkins
Copy link
Member Author

Thanks @seemethere. Hope you've been well. 😎

@Tronic @ChihweiLHBird @prryplatypus I changed the pattern to use pathlib so that we can rely upon the stdlib for all the various path resolution Path().resolve(). Also, I think we need 404 for all of the exceptions. A 400 could leak information.

@ahopkins ahopkins requested a review from a team as a code owner July 28, 2022 12:37
@ChihweiLHBird
Copy link
Member

Migrate to pathlib is awesome!

@ahopkins ahopkins merged commit e100a14 into main Jul 31, 2022
@ahopkins ahopkins deleted the pr2495-fix branch July 31, 2022 05:49
ahopkins added a commit that referenced this pull request Jul 31, 2022
ahopkins added a commit that referenced this pull request Jul 31, 2022
ahopkins added a commit that referenced this pull request Jul 31, 2022
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.

3 participants