Skip to content

Commit b42f468

Browse files
committed
fix: resolve Python 3.8 compatibility issues
- Create separate requirements-py38.txt for Python 3.8 compatibility - Use numpy>=1.21.0,<1.25.0 for Python 3.8 (numpy 1.26.4 requires Python 3.9+) - Use pandas>=1.5.0,<2.1.0 for Python 3.8 compatibility - Update Python 3.8 workflow to use Python 3.8 compatible requirements - Update cache key to reference correct requirements file
1 parent 8a00146 commit b42f468

2 files changed

Lines changed: 106 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Python 3.8 Compatibility
2+
3+
on:
4+
push:
5+
branches: [ main, master, develop ]
6+
pull_request:
7+
branches: [ main, master, develop ]
8+
9+
jobs:
10+
python38-compatibility:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.8
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.8'
20+
21+
- name: Cache pip dependencies
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.cache/pip
25+
key: ${{ runner.os }}-pip-3.8-${{ hashFiles('**/requirements-py38.txt') }}
26+
restore-keys: |
27+
${{ runner.os }}-pip-3.8-
28+
29+
- name: Install dependencies (Python 3.8)
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -r requirements-py38.txt
33+
34+
- name: Test Import Structure (Python 3.8)
35+
run: |
36+
python -c "import coderag.config; print('✓ Config import successful on Python 3.8')"
37+
python -c "import coderag.embeddings; print('✓ Embeddings import successful on Python 3.8')"
38+
python -c "import coderag.index; print('✓ Index import successful on Python 3.8')"
39+
python -c "import coderag.search; print('✓ Search import successful on Python 3.8')"
40+
python -c "import coderag.monitor; print('✓ Monitor import successful on Python 3.8')"
41+
env:
42+
OPENAI_API_KEY: dummy-key-for-testing
43+
44+
- name: Syntax Check (Python 3.8)
45+
run: |
46+
python -m py_compile main.py
47+
python -m py_compile app.py
48+
python -m py_compile prompt_flow.py
49+
find coderag/ -name "*.py" -exec python -m py_compile {} \;

requirements-py38.txt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
altair==5.4.1
2+
annotated-types==0.7.0
3+
anyio==4.4.0
4+
attrs==24.2.0
5+
blinker==1.8.2
6+
cachetools==5.5.0
7+
certifi==2024.8.30
8+
charset-normalizer==3.3.2
9+
click==8.1.7
10+
colorama==0.4.6
11+
distro==1.9.0
12+
exceptiongroup==1.2.2
13+
faiss-cpu==1.8.0.post1
14+
gitdb==4.0.11
15+
GitPython==3.1.43
16+
h11==0.14.0
17+
httpcore==1.0.5
18+
httpx==0.27.2
19+
idna==3.8
20+
Jinja2==3.1.4
21+
jiter==0.5.0
22+
jsonschema==4.23.0
23+
jsonschema-specifications==2023.12.1
24+
markdown-it-py==3.0.0
25+
MarkupSafe==2.1.5
26+
mdurl==0.1.2
27+
narwhals==1.6.2
28+
numpy>=1.21.0,<1.25.0
29+
openai==1.44.0
30+
packaging==24.1
31+
pandas>=1.5.0,<2.1.0
32+
pillow==10.4.0
33+
protobuf==5.28.0
34+
pyarrow==17.0.0
35+
pydantic==2.9.0
36+
pydantic_core==2.23.2
37+
pydeck==0.9.1
38+
Pygments==2.18.0
39+
python-dateutil==2.9.0.post0
40+
python-dotenv==1.0.1
41+
pytz==2024.1
42+
referencing==0.35.1
43+
requests==2.32.3
44+
rich==13.8.0
45+
rpds-py==0.20.0
46+
six==1.16.0
47+
smmap==5.0.1
48+
sniffio==1.3.1
49+
streamlit==1.38.0
50+
tenacity==8.5.0
51+
toml==0.10.2
52+
tornado==6.4.1
53+
tqdm==4.66.5
54+
typing_extensions==4.12.2
55+
tzdata==2024.1
56+
urllib3==2.2.2
57+
watchdog==4.0.2

0 commit comments

Comments
 (0)