Skip to content

Conversation

@pquentin
Copy link
Member

No description provided.

@pquentin pquentin marked this pull request as ready for review November 12, 2025 12:10


@pytest.fixture(scope="function")
@pytest_asyncio.fixture(scope="function")
Copy link
Contributor

@miguelgrinberg miguelgrinberg Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not something you introduced, but in the sync side this fixture has a session scope.

Copy link
Member Author

@pquentin pquentin Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional, see the comment below:

    # Unfortunately the asyncio client needs to be rebuilt every
    # test execution due to how pytest-asyncio manages
    # event loops (one per test!)

@pquentin pquentin merged commit 3a15e1b into elastic:main Nov 12, 2025
17 checks passed
@github-actions
Copy link

The backport to 8.19 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-8.19 8.19
# Navigate to the new working tree
cd .worktrees/backport-8.19
# Create a new branch
git switch --create backport-3152-to-8.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3a15e1bdc523f0a385398c6c9678fcc30386926e
# Push it to GitHub
git push --set-upstream origin backport-3152-to-8.19
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-8.19

Then, create a pull request where the base branch is 8.19 and the compare/head branch is backport-3152-to-8.19.

@github-actions
Copy link

The backport to 9.1 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-9.1 9.1
# Navigate to the new working tree
cd .worktrees/backport-9.1
# Create a new branch
git switch --create backport-3152-to-9.1
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3a15e1bdc523f0a385398c6c9678fcc30386926e
# Push it to GitHub
git push --set-upstream origin backport-3152-to-9.1
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-9.1

Then, create a pull request where the base branch is 9.1 and the compare/head branch is backport-3152-to-9.1.

github-actions bot pushed a commit that referenced this pull request Nov 12, 2025
* Fix pytest 9 error

* Use explicit pytest_asyncio fixture

* Revert "Fix pytest 9 error"

This reverts commit 019e747.

* Fix lint

* Fix lint better

* Add back type ignore

(cherry picked from commit 3a15e1b)
pquentin added a commit to pquentin/elasticsearch-py that referenced this pull request Nov 12, 2025
* Fix pytest 9 error

* Use explicit pytest_asyncio fixture

* Revert "Fix pytest 9 error"

This reverts commit 019e747.

* Fix lint

* Fix lint better

* Add back type ignore

(cherry picked from commit 3a15e1b)

# Conflicts:
#	test_elasticsearch/test_async/test_server/conftest.py
@pquentin
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
9.1
8.19

Questions ?

Please refer to the Backport tool documentation

pquentin added a commit to pquentin/elasticsearch-py that referenced this pull request Nov 12, 2025
* Fix pytest 9 error

* Use explicit pytest_asyncio fixture

* Revert "Fix pytest 9 error"

This reverts commit 019e747.

* Fix lint

* Fix lint better

* Add back type ignore

(cherry picked from commit 3a15e1b)

# Conflicts:
#	test_elasticsearch/test_async/test_server/conftest.py
pquentin added a commit that referenced this pull request Nov 13, 2025
* Fix pytest 9 error (#3152)

* Fix pytest 9 error

* Use explicit pytest_asyncio fixture

* Revert "Fix pytest 9 error"

This reverts commit 019e747.

* Fix lint

* Fix lint better

* Add back type ignore

(cherry picked from commit 3a15e1b)

# Conflicts:
#	test_elasticsearch/test_async/test_server/conftest.py

* Add missing import
pquentin added a commit that referenced this pull request Nov 13, 2025
* Fix pytest 9 error (#3152)

* Fix pytest 9 error

* Use explicit pytest_asyncio fixture

* Revert "Fix pytest 9 error"

This reverts commit 019e747.

* Fix lint

* Fix lint better

* Add back type ignore

(cherry picked from commit 3a15e1b)

# Conflicts:
#	test_elasticsearch/test_async/test_server/conftest.py

* Add missing import
pquentin added a commit that referenced this pull request Nov 13, 2025
* Fix pytest 9 error

* Use explicit pytest_asyncio fixture

* Revert "Fix pytest 9 error"

This reverts commit 019e747.

* Fix lint

* Fix lint better

* Add back type ignore

(cherry picked from commit 3a15e1b)

Co-authored-by: Quentin Pradet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants