Skip to content

create_pool_async requires asyncio and causes issues in pytest_asyncio #309

@WolfEYc

Description

@WolfEYc
  1. What versions are you using?
    2.1.0
19c

platform.platform: macOS-14.3.1-arm64-arm-64bit
sys.maxsize > 2**32: True
platform.python_version: 3.12.2

oracledb.__version__: 2.1.0
  1. Is it an error or a hang or a crash?
    hang

  2. What error(s) or behavior you are seeing?
    pool.aquire() hangs when used in context of async pytest of FastAPI app

  1. Does your application call init_oracle_client()?
    No
  1. Include a runnable Python script that shows the problem.
    https://gist.github.com/WolfEYc/90a1f994fee007729037ef62de99e753
    run pytest on this script and make sure to have the following python pkgs installed and in most recent ver
    asgi-lifespan
    httpx
    pytest
    pytest-asyncio
    fastapi
    and ofc oracledb 2.1.0

dont need any sql as it is not a sql related error, it is a connection error.

for reference, when running the app normally it works just fine! but pytest it hangs indefinitley @anthony-tuininga

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions