Skip to content

Moved FlowControl class and globals to its own file in uvicorn/protocols/http/#1034

Merged
euri10 merged 3 commits intoKludex:masterfrom
ShahriyarR:eliminate-code-duplication
May 27, 2021
Merged

Moved FlowControl class and globals to its own file in uvicorn/protocols/http/#1034
euri10 merged 3 commits intoKludex:masterfrom
ShahriyarR:eliminate-code-duplication

Conversation

@ShahriyarR
Copy link
Copy Markdown

As I have spotted most of the parts of h11_impl.py and httptools_impl.py files are shared. The most notable duplication is FlowControl class and "constants", my suggestion is to move this part to separate file flow_control.py and then use it, this will reduce the duplicated code portion.

Copy link
Copy Markdown
Contributor

@euri10 euri10 left a comment

Choose a reason for hiding this comment

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

makes sense, thanks, just need to fix your imports I think
and you can run scipts/lint so that CI wont break on that

@ShahriyarR
Copy link
Copy Markdown
Author

@euri10 I have run the scripts/lint as mentioned and pushed the changes.

@euri10
Copy link
Copy Markdown
Contributor

euri10 commented May 27, 2021

thanks a lot @ShahriyarR !

@euri10 euri10 merged commit 21ff87f into Kludex:master May 27, 2021
Vibhu-Agarwal added a commit to Vibhu-Agarwal/uvicorn that referenced this pull request May 27, 2021
Kludex pushed a commit to sephioh/uvicorn that referenced this pull request Oct 29, 2022
…ols/http/ (Kludex#1034)

* Moved FlowControl class and globals to its own file

* Run scripts/lint as requested in code review

* Fixing import error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants