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

fixed manual to match current Sanic app name policy #2461

Merged
merged 3 commits into from May 26, 2022

Conversation

amitay87
Copy link
Contributor

Current app name in the manual (README) is wrong and cause an error due to Sanic app name policy

according to the error that is being raised:
"Names must begin with a character and may only contain alphanumeric characters, _, or -"

Hence, it is suggested to change the name in the example to a valid name that contains only alphanumeric chars and hyphens

It seems that Sanic has a pretty strict naming policy which doesn't allow spaces and/or comma or similar characters in the app name

following is the exception raised when using the current name as appears in the manual:
`sanic.exceptions.SanicException: Sanic instance named 'Hello World App' uses an invalid format. Names must begin with a character and may only contain alphanumeric characters, _, or -. `
now the name is both valid and readable
@amitay87 amitay87 requested a review from a team as a code owner May 23, 2022 12:02
Copy link
Member

@ahopkins ahopkins left a comment

Choose a reason for hiding this comment

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

Yup. תודה רבה!!

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #2461 (9fb3183) into main (4ee2e57) will decrease coverage by 0.059%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##              main     #2461       +/-   ##
=============================================
- Coverage   87.255%   87.196%   -0.060%     
=============================================
  Files           60        60               
  Lines         5061      5061               
  Branches       909       909               
=============================================
- Hits          4416      4413        -3     
- Misses         474       476        +2     
- Partials       171       172        +1     
Impacted Files Coverage Δ
sanic/server/protocols/http_protocol.py 84.523% <0.000%> (-3.572%) ⬇️

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 4ee2e57...9fb3183. Read the comment docs.

@ahopkins ahopkins merged commit c249004 into sanic-org:main May 26, 2022
27 checks passed
ChihweiLHBird pushed a commit to ChihweiLHBird/sanic that referenced this pull request Jun 1, 2022
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
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.

None yet

2 participants