Skip to content

Commit 02ab291

Browse files
committed
Merge branch 'master' into main-no-binaries
2 parents b58551b + 161612d commit 02ab291

File tree

16 files changed

+500
-128
lines changed

16 files changed

+500
-128
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
ignore = E203, W503, E701
2+
ignore = E203, W503, E701, E704
33
exclude = .git,venv,env
44
max-line-length = 119

.github/workflows/release.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,30 +50,30 @@ jobs:
5050
with:
5151
python-version: '3.10'
5252

53-
# - name: Install dependencies
54-
# run: python -m pip install --upgrade pip setuptools wheel
53+
- name: Install dependencies
54+
run: python -m pip install --upgrade pip setuptools wheel
5555

56-
# - name: Build package
57-
# run: python setup.py sdist bdist_wheel
58-
#
59-
# - name: Publish package
60-
# uses: pypa/gh-action-pypi-publish@release/v1
61-
# with:
62-
# user: ${{ secrets.PYPI_USERNAME }}
63-
# password: ${{ secrets.PYPI_PASSWORD }}
56+
- name: Build package
57+
run: python setup.py sdist bdist_wheel
58+
59+
- name: Publish package
60+
uses: pypa/gh-action-pypi-publish@release/v1
61+
with:
62+
user: ${{ secrets.PYPI_USERNAME }}
63+
password: ${{ secrets.PYPI_PASSWORD }}
6464

6565
- name: Setup git credentials
6666
uses: oleksiyrudenko/gha-git-credentials@v2-latest
6767
with:
6868
name: 'reportportal.io'
6969
7070
token: ${{ secrets.GITHUB_TOKEN }}
71-
#
72-
# - name: Tagging new version
73-
# id: newVersionTag
74-
# run: |
75-
# git tag -a ${{ env.RELEASE_VERSION }} -m "Release ${{ env.RELEASE_VERSION }}"
76-
# git push --tags
71+
72+
- name: Tagging new version
73+
id: newVersionTag
74+
run: |
75+
git tag -a ${{ env.RELEASE_VERSION }} -m "Release ${{ env.RELEASE_VERSION }}"
76+
git push --tags
7777
7878
- name: Checkout develop branch
7979
uses: actions/checkout@v4
@@ -108,13 +108,13 @@ jobs:
108108
version: ${{ env.RELEASE_VERSION }}
109109
path: ./${{ env.CHANGE_LOG_FILE }}
110110

111-
# - name: Create Release
112-
# id: createRelease
113-
# uses: ncipollo/release-action@v1
114-
# with:
115-
# tag: ${{ env.RELEASE_VERSION }}
116-
# name: Release ${{ env.RELEASE_VERSION }}
117-
# body: ${{ steps.readChangelogEntry.outputs.changes }}
111+
- name: Create Release
112+
id: createRelease
113+
uses: ncipollo/release-action@v1
114+
with:
115+
tag: ${{ env.RELEASE_VERSION }}
116+
name: Release ${{ env.RELEASE_VERSION }}
117+
body: ${{ steps.readChangelogEntry.outputs.changes }}
118118

119119
- name: Update version file
120120
id: versionFileUpdate

.pre-commit-config.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
4-
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
55
rev: v5.0.0
66
hooks:
7-
- id: trailing-whitespace
8-
- id: end-of-file-fixer
9-
- id: check-yaml
10-
- id: check-added-large-files
11-
- repo: https://github.com/PyCQA/pydocstyle
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/PyCQA/pydocstyle
1212
rev: 6.3.0
1313
hooks:
14-
- id: pydocstyle
14+
- id: pydocstyle
1515
exclude: |
16-
(?x)^(
17-
tests/.*
18-
)
19-
- repo: https://github.com/psf/black
16+
(?x)^(
17+
tests/.*
18+
)
19+
- repo: https://github.com/psf/black
2020
rev: 24.10.0
2121
hooks:
22-
- id: black
23-
args: ['reportportal_client', 'tests']
24-
- repo: https://github.com/pycqa/isort
22+
- id: black
23+
args: [ '--check', 'reportportal_client', 'tests' ]
24+
- repo: https://github.com/pycqa/isort
2525
rev: 5.13.2
2626
hooks:
2727
- id: isort
28-
- repo: https://github.com/pycqa/flake8
28+
- repo: https://github.com/pycqa/flake8
2929
rev: 7.1.1
3030
hooks:
31-
- id: flake8
31+
- id: flake8

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Changelog
22

33
## [Unreleased]
4+
### Fixed
5+
- Issue [#246](https://github.com/reportportal/client-Python/issues/246): Invalid return type, by @HardNorth
6+
### Changed
7+
- `helpers.common_helpers.gen_attributes` function now accepts refactored, by @HardNorth
8+
9+
## [5.6.1]
10+
### Added
11+
- `markdown_helpers` module in `reportportal_client.helpers` package, by @HardNorth
12+
### Changed
13+
- `helpers.is_binary` function to improve binary content detection, by @HardNorth
14+
- `helpers` module moved to `reportportal_client.helpers` package, by @HardNorth
15+
16+
## [5.6.0]
417
### Added
518
- `match_pattern` and `translate_glob_to_regex`, `normalize_caseless`, `caseless_equal` functions in `helpers` module, by @HardNorth
619
- `client.RP.start_test_item` method and all its children now accept `uuid` argument, by @HardNorth

reportportal_client/_internal/aio/tasks.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from asyncio import Future
2020
from typing import Any, Awaitable, Coroutine, Generator, Generic, List, Optional, TypeVar, Union
2121

22+
from reportportal_client._internal.static.defines import NOT_FOUND
2223
from reportportal_client.aio.tasks import BlockingOperationError, Task
2324

2425
_T = TypeVar("_T")
@@ -54,8 +55,10 @@ def blocking_result(self) -> _T:
5455
:return: execution result or raise an error, or return immediately if already executed
5556
"""
5657
if self.done():
57-
return self.result()
58-
return self.__loop.run_until_complete(self)
58+
result = self.result()
59+
else:
60+
result = self.__loop.run_until_complete(self)
61+
return result if result is not NOT_FOUND else None
5962

6063

6164
class ThreadedTask(Generic[_T], Task[_T]):
@@ -88,7 +91,8 @@ def blocking_result(self) -> _T:
8891
:return: execution result or raise an error, or return immediately if already executed
8992
"""
9093
if self.done():
91-
return self.result()
94+
result = self.result()
95+
return result if result is not NOT_FOUND else None
9296
if not self.__loop.is_running() or self.__loop.is_closed():
9397
raise BlockingOperationError("Running loop is not alive")
9498
start_time = time.time()
@@ -97,7 +101,8 @@ def blocking_result(self) -> _T:
97101
time.sleep(sleep_time)
98102
if not self.done():
99103
raise BlockingOperationError("Timed out waiting for the task execution")
100-
return self.result()
104+
result = self.result()
105+
return result if result is not NOT_FOUND else None
101106

102107

103108
class BatchedTaskFactory:

0 commit comments

Comments
 (0)