-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the incorrect fetch partial parsing
Fix #131 The original implementation interpreted the partial fetch arguments as a start and end octet, but the RFC states they are a start octet and a length. This also causes incorrect parsing failures because there was a check that the first number was less than the second number, which does not make sense with corrected assumptions.
- Loading branch information
Showing
11 changed files
with
98 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
from __future__ import annotations | ||
|
||
from asyncio import AbstractEventLoop | ||
|
||
from grpclib.server import Server as _Server | ||
|
||
__all__ = ['Server'] | ||
|
||
|
||
class Server(_Server): | ||
"""The :class:`~grpclib.server.Server` class included with :mod:`grpclib` | ||
has typing issues due to some missing methods. These methods do not seem to | ||
be part of its public API, so they should be implemented to simply raise | ||
exceptions. | ||
Note: | ||
If this is fixed upstream, this class should be removed. | ||
""" | ||
|
||
def get_loop(self) -> AbstractEventLoop: | ||
raise NotImplementedError() | ||
|
||
def is_serving(self) -> bool: | ||
raise NotImplementedError() | ||
|
||
async def serve_forever(self) -> None: | ||
raise NotImplementedError() | ||
|
||
async def start_serving(self) -> None: | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters