-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove 3.5, better support 3.8, Pipfile (#769)
- Loading branch information
Showing
37 changed files
with
259 additions
and
354 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[flake8] | ||
# Bump by 6 to account for "await " as compared to botocore | ||
max-line-length = 86 | ||
# to match longest line in botocore: https://github.com/boto/botocore/blob/develop/botocore/client.py#L730 | ||
max-line-length = 88 |
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 |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
label_prs: deps-update | ||
|
||
schedule: every week | ||
|
||
requirements: | ||
- Pipfile | ||
- docs/requirements.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
codecov = "*" | ||
coverage = "==5.0.3" | ||
flake8 = "==3.7.9" | ||
flake8-formatter-abspath = "==1.0.1" | ||
moto = {extras = ["server"],version = "==1.3.14"} | ||
pytest = "==5.3.5" | ||
pytest-cov = "==2.8.1" | ||
pytest-asyncio = "==0.10.0" | ||
pytest-xdist = "==1.31.0" | ||
dill = "==0.3.1.1" | ||
|
||
# for some reason this is needed when running setup.py check -rms on travis on 3.6.10 | ||
Pygments = "*" | ||
|
||
[packages] | ||
aiohttp = "==3.3.2" | ||
aiobotocore = {editable = true,extras = ["awscli", "boto3"],path = "."} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
from botocore.eventstream import EventStream, EventStreamBuffer | ||
from async_generator import async_generator, yield_ | ||
|
||
|
||
class AioEventStream(EventStream): | ||
@async_generator | ||
async def _create_raw_event_generator(self): | ||
event_stream_buffer = EventStreamBuffer() | ||
async for chunk, _ in self._raw_stream.iter_chunks(): | ||
event_stream_buffer.add_data(chunk) | ||
for event in event_stream_buffer: | ||
await yield_(event) | ||
yield event | ||
|
||
def __iter__(self): | ||
raise NotImplementedError('Use async-for instead') | ||
|
||
def __aiter__(self): | ||
return self.__anext__() | ||
|
||
@async_generator | ||
async def __anext__(self): | ||
async for event in self._event_generator: | ||
parsed_event = self._parse_event(event) | ||
if parsed_event: | ||
await yield_(parsed_event) | ||
yield parsed_event |
Oops, something went wrong.