Skip to content

Commit

Permalink
repro attempt #1
Browse files Browse the repository at this point in the history
  • Loading branch information
pajod committed May 22, 2024
1 parent 9802e21 commit 7cbb731
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/lint.yml

This file was deleted.

19 changes: 11 additions & 8 deletions .github/workflows/tox.yml → .github/workflows/repro.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tox
name: bug reproducer
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
Expand All @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest] # All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc.
os: [ubuntu-latest]
python-version:
# CPython <= 3.7 is EoL since 2023-06-27
- "3.7"
Expand All @@ -23,9 +23,10 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
# PyPy <= 3.8 is EoL since 2023-06-16
- "pypy-3.9"
- "pypy-3.10"
# - "pypy-3.9"
# - "pypy-3.10"
steps:
- uses: actions/checkout@v4
- name: Using Python ${{ matrix.python-version }}
Expand All @@ -38,7 +39,9 @@ jobs:
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- run: tox -e run-module
- run: tox -e run-entrypoint
- run: tox -e py
python -m pip install qdrant-client
python -m pip install .
- run:
gunicorn -w 2 -b [::1]:8001 repro-3213:app --enable-stdio-inheritance &
curl http://[::1]:8001/
killall gunicorn
27 changes: 27 additions & 0 deletions repro-3213.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import sys
import os
import logging

if sys.version_info >= (3, 8):
logging.basicConfig(force=True)
logger = logging.getLogger(__name__)
logger.info("logger has been reset")
else:
logging.basicConfig()
logger = logging.getLogger(__name__)

from qdrant_client import QdrantClient
client = QdrantClient(url="https://test.cloud.qdrant.io.invalid:6333", api_key="1")

def app(environ_, start_response):
info = "stderr from app platform=%r %r user=%r:%r:%r pid=%r" % (sys.platform, os.uname(), os.getuid(), os.getgid(), os.getgroups(), os.getpid())
print(info, file=sys.stderr)
# needed for Python <= 3.8
sys.stderr.flush()
body = b"response body from app\n%s\n" % (info.encode(), )
response_head = [
("Content-Type", "text/plain; encoding=utf-8"),
("Content-Length", "%d" % len(body)),
]
start_response("200 OK", response_head)
return iter([body])

0 comments on commit 7cbb731

Please sign in to comment.