ycm-core / ycmd

A code-completion & code-comprehension server
https://ycm-core.github.io/ycmd/
GNU General Public License v3.0
1.69k stars 764 forks source link

[READY] Drop bottle in favour of a tiny hand-rolled "framework" #1736

Closed bstaletic closed 5 months ago

bstaletic commented 6 months ago

Turns out ycmd needs a tiny part of the whole framework specification from PEP 3333. Note that this does not fully conform to the specification, but it mostly does.

Currently we are only handling POST and GET requests. Support for middleware is limited. Inspired by Bottle plugins API, but only plugin.__call__ and app.install are implemented. Error handling is also limited. Application needs to replace the default error handler that will handle all errors.

However, this just about fits ycmd's needs.


This change is Reviewable

codecov[bot] commented 6 months ago

Codecov Report

Merging #1736 (c00691f) into master (1693a93) will increase coverage by 0.02%. The diff coverage is 97.19%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1736 +/- ## ========================================== + Coverage 95.46% 95.48% +0.02% ========================================== Files 83 84 +1 Lines 8201 8311 +110 Branches 163 163 ========================================== + Hits 7829 7936 +107 - Misses 322 325 +3 Partials 50 50 ```
bstaletic commented 5 months ago

All review comments have been addressed. Ycmd and YCM tests are passing and a manual test with unicode identifiers passed as well. Merging.