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

Name changes #55

Merged
merged 6 commits into from Sep 5, 2018
Merged

Name changes #55

merged 6 commits into from Sep 5, 2018

Conversation

jordaneremieff
Copy link
Sponsor Contributor

@jordaneremieff jordaneremieff commented Aug 31, 2018

Refs #51

Renames View class -> HTTPEndpoint and App class -> Starlette.

There were some other name change suggestions on the ticket as well, but these two seemed like the most obvious ones to start with. I can add the other name changes to this PR as well, but figured it would be better to open it up to discussion first.

Module naming - should it be starlette.requests/starlette.responses instead of starlette.request/starlette.response? Would fit websockets and align better with documentation titles.

I think this makes sense.

WebSocketSession as just WebSocket? Rename session variable as websocket in docs?
Drop StaticFile, and just leave StaticFiles and FileResponse.

These I'm not as sure about - haven't looked at them enough to have an opinion either way at this point.

@@ -1,44 +1,44 @@

Starlette includes a `View` class that provides a class-based view pattern which
Copy link
Member

Choose a reason for hiding this comment

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

Great. Best rename the docs file too.

Copy link
Member

@tomchristie tomchristie left a comment

Choose a reason for hiding this comment

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

Great stuff.

Let's rename the views.md file, and also bring in the other changes discussed at the same time. WebSocketSession -> WebSocket, session -> websocket when it is used as a variable. requests.py, responses.py

We'll want to make all these in a single version bump.

@tomchristie
Copy link
Member

Something else I'd also like to see us do as part of this, would be to always use full module imports in the source and tests, and drop imports from __init__.

@jordaneremieff
Copy link
Sponsor Contributor Author

Update the PR with the additional changes:

  • Rename WebSocketSession -> WebSocket
  • Rename session -> websocket (in docs only)
  • Rename request.py -> requests.py
  • Rename response.py -> responses.py
  • Removed module imports from __init__.py and added full module imports where needed
  • Updated docs

@tomchristie
Copy link
Member

Okay, let's go for it.

@tomchristie tomchristie merged commit f4fe0ec into encode:master Sep 5, 2018
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