diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ab10cae..4bc6b0c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +### Fixed +- Multipart file upload for Async clients, by @HardNorth + +## [5.5.0] ### Added - `RP` class in `reportportal_client.client` module as common interface for all ReportPortal clients, by @HardNorth - `reportportal_client.aio` with asynchronous clients and auxiliary classes, by @HardNorth diff --git a/README.md b/README.md index 70b5662a..99cba0ce 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PyPI](https://img.shields.io/pypi/v/reportportal-client.svg?maxAge=259200)](https://pypi.python.org/pypi/reportportal-client) [![Python versions](https://img.shields.io/pypi/pyversions/reportportal-client.svg)](https://pypi.org/project/reportportal-client) [![Build Status](https://github.com/reportportal/client-Python/actions/workflows/tests.yml/badge.svg)](https://github.com/reportportal/client-Python/actions/workflows/tests.yml) -[![codecov.io](https://codecov.io/gh/reportportal/client-Python/branch/master/graph/badge.svg)](https://codecov.io/gh/reportportal/client-Python) +[![codecov.io](https://codecov.io/gh/reportportal/client-Python/branch/develop/graph/badge.svg)](https://codecov.io/gh/reportportal/client-Python) [![Join Slack chat!](https://slack.epmrpp.reportportal.io/badge.svg)](https://slack.epmrpp.reportportal.io/) [![stackoverflow](https://img.shields.io/badge/reportportal-stackoverflow-orange.svg?style=flat)](http://stackoverflow.com/questions/tagged/reportportal) [![Build with Love](https://img.shields.io/badge/build%20with-❤%EF%B8%8F%E2%80%8D-lightgrey.svg)](http://reportportal.io?style=flat) diff --git a/reportportal_client/aio/client.py b/reportportal_client/aio/client.py index 2a5dca21..5818ac1b 100644 --- a/reportportal_client/aio/client.py +++ b/reportportal_client/aio/client.py @@ -794,7 +794,6 @@ async def finish_launch(self, else: result = "" await self.__client.log_batch(self._log_batcher.flush()) - await self.close() return result async def update_test_item( diff --git a/reportportal_client/client.py b/reportportal_client/client.py index 1b5b73a1..4f6b209b 100644 --- a/reportportal_client/client.py +++ b/reportportal_client/client.py @@ -705,7 +705,6 @@ def finish_launch(self, else: message = "" self._log(self._log_batcher.flush()) - self.close() return message def update_test_item(self, item_uuid: str, attributes: Optional[Union[list, dict]] = None, diff --git a/reportportal_client/core/rp_requests.py b/reportportal_client/core/rp_requests.py index 6bd66912..a7482cec 100644 --- a/reportportal_client/core/rp_requests.py +++ b/reportportal_client/core/rp_requests.py @@ -578,6 +578,7 @@ async def payload(self) -> aiohttp.MultipartWriter: mp_writer = aiohttp.MultipartWriter('form-data') mp_writer.append_payload(json_payload) for _, file in self._get_files(): - file_payload = aiohttp.Payload(file[1], content_type=file[2], filename=file[0]) + file_payload = aiohttp.BytesPayload(file[1], content_type=file[2]) + file_payload.set_content_disposition('form-data', name='file', filename=file[0]) mp_writer.append_payload(file_payload) return mp_writer diff --git a/setup.py b/setup.py index 272b6ac5..5055f950 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup, find_packages -__version__ = '5.5.0' +__version__ = '5.5.1' TYPE_STUBS = ['*.pyi']