This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Description
Bug description
NO_PROXY environment variable is not respected by Prisma Client Python when connecting to query engine. Even with NO_PROXY set correctly for localhost/127.0.0.1, connections are still being routed through proxy, resulting in 403 Access Denied errors.
How to reproduce
- Set up Prisma Client Python in an environment behind a corporate proxy
- Set NO_PROXY environment variable:
os.environ["NO_PROXY"] = "localhost,127.0.0.1"
- Try to connect to Prisma query engine:
async with Prisma(http={"trust_env": True}) as prisma_client:
# Any query attempt results in proxy intercepting local connection
- Error received 403 when trying to access
http://localhost:60367/status as it was being routed to proxy.
Expected behavior
- Prisma Client Python should respect NO_PROXY environment variable
- Local connections to query engine should bypass proxy when NO_PROXY is set correctly
- Similar behavior to other Prisma clients regarding proxy handling (Node.js working as expected I believe)
Environment & setup
- OS: Mac OS
- Database: PostgreSQL
- Python version: 3.11
- Prisma version: 0.15