Skip to content

Commit 9f39a42

Browse files
committed
update
1 parent b667bd6 commit 9f39a42

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
run: |
27+
python setup.py sdist bdist_wheel bdist_egg
28+
- name: 'Upload dist'
29+
uses: 'actions/upload-artifact@v2'
30+
with:
31+
name: packages
32+
path: dist/*
33+
- name: Publish
34+
env:
35+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
36+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
37+
run:
38+
twine upload dist/*

sserender/sse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(self, ID: Optional[str] = None,
3333
self.retry = retry
3434
self.comment = comment
3535

36-
def render(self, with_encode: bool = True) -> Union[str, bytes]:
36+
def render(self, with_encode: bool = False) -> Union[str, bytes]:
3737
buffer = io.StringIO()
3838
if self.comment is not None:
3939
for chunk in self._LINE_SEP_EXPR.split(self.comment):
@@ -64,7 +64,7 @@ def render(self, with_encode: bool = True) -> Union[str, bytes]:
6464
return result
6565

6666
@classmethod
67-
def from_content(clz, content: Union[str, bytes], strict: bool = True) -> "SSE":
67+
def from_content(clz, content: Union[str, bytes], strict: bool = False) -> "SSE":
6868
if isinstance(content, bytes):
6969
content = content.decode("utf-8")
7070
if strict:

0 commit comments

Comments
 (0)