Skip to content

docs: update python version requirements for backend stability#514

Open
speedo-345 wants to merge 2 commits intoAOSSIE-Org:mainfrom
speedo-345:main
Open

docs: update python version requirements for backend stability#514
speedo-345 wants to merge 2 commits intoAOSSIE-Org:mainfrom
speedo-345:main

Conversation

@speedo-345
Copy link

@speedo-345 speedo-345 commented Mar 3, 2026

"Updated the README to recommend Python 3.11/3.12. During local setup on Windows, Python 3.13 failed to install key ML dependencies (torch, sentencepiece) due to missing wheels. This update helps new contributors avoid installation hurdles."

Summary by CodeRabbit

  • Documentation

    • Recommend using Python 3.11 or 3.12; note Python 3.13 is not supported.
  • Chores

    • Allow a broader range of the core ML library and add a Python version constraint.
    • Update project ignore list to exclude a large archive artifact and restore macOS metadata entry.

@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Updated .gitignore to re-add .DS_Store and ignore backend/s2v_reddit_2015_md.tar.gz; README notes Python 3.11–3.12 compatibility (not 3.13); requirements relaxed torch from a pin to torch>=2.8.0 and added python>=3.11.0,<3.13.0.

Changes

Cohort / File(s) Summary
Ignore & small config
/.gitignore
Reintroduced .DS_Store entry and added backend/s2v_reddit_2015_md.tar.gz to ignore list.
Documentation
README.md
Added note under "Install Python Dependencies" specifying Python 3.11 or 3.12; states incompatibility with Python 3.13.
Dependencies
requirements.txt
Changed torch==2.5.1 to torch>=2.8.0; added python>=3.11.0,<3.13.0 constraint.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through files with eager eyes,
Hid heavy tar and dusted ties.
Eleven or twelve is where I'll dwell,
Torch set free to roam and swell. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating Python version requirements in documentation for backend stability, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
README.md (1)

43-44: Remove unnecessary quotes and consider programmatic version enforcement.

The Python version compatibility note is helpful, but has formatting and enforcement issues:

  1. Remove the double quotes around the note—they're non-standard for documentation.
  2. Consider enforcing this requirement programmatically (e.g., python_requires=">=3.11,<3.13" in a setup.py file) rather than relying solely on documentation.
📝 Proposed documentation fix
-   "Note: Ensure you are using Python 3.11 or 3.12. Python 3.13 is currently incompatible with several required machine learning libraries."
-   
+   > **Note:** Ensure you are using Python 3.11 or 3.12. Python 3.13 is currently incompatible with several required machine learning libraries.
+
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 43 - 44, Remove the extraneous double quotes around
the Python compatibility note in README.md (make it plain text) and add
programmatic enforcement by specifying python version bounds in the packaging
metadata (for example set python_requires=">=3.11,<3.13" in setup.py or the
equivalent in pyproject.toml/setup.cfg) so the requirement is enforced by
pip/build tools rather than only in docs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@README.md`:
- Around line 43-44: Remove the extraneous double quotes around the Python
compatibility note in README.md (make it plain text) and add programmatic
enforcement by specifying python version bounds in the packaging metadata (for
example set python_requires=">=3.11,<3.13" in setup.py or the equivalent in
pyproject.toml/setup.cfg) so the requirement is enforced by pip/build tools
rather than only in docs.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc3bf1a and 9dfb30c.

📒 Files selected for processing (3)
  • .gitignore
  • README.md
  • requirements.txt

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@requirements.txt`:
- Line 2: Remove the interpreter constraint string 'python>=3.11.0,<3.13.0' from
requirements.txt because pip treats it as a package dependency; either delete
that line from requirements.txt or move the constraint into a pyproject.toml
under [project] as requires-python = ">=3.11,<3.13" (or otherwise enforce the
Python version via CI/.python-version) so the project no longer lists a
non-package requirement named "python".
- Line 1: The requirements pin for the Python package "torch" allows vulnerable
versions (currently "torch>=2.0.0"); update the constraint in requirements.txt
to "torch>=2.8.0" to ensure all listed CVEs are patched, then regenerate the
lock/artifact (pip-compile, poetry lock, or pip freeze) and run CI tests to
validate compatibility; search for the symbol "torch" in requirements.txt and
CI/deployment scripts to update any duplicated constraints.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dfb30c and d565739.

📒 Files selected for processing (2)
  • .gitignore
  • requirements.txt
🚧 Files skipped from review as they are similar to previous changes (1)
  • .gitignore

requirements.txt Outdated
@@ -1,4 +1,5 @@
torch==2.5.1
torch>=2.0.0
python>=3.11.0,<3.13.0
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for invalid python requirement in requirements.txt
echo "=== Checking requirements.txt for python entry ==="
cat -n requirements.txt

echo -e "\n=== Searching for python version constraints in requirements.txt ==="
rg -n '^\s*python\s*[<>=!~]' requirements.txt || echo "No matches found"

echo -e "\n=== Looking for package metadata files ==="
fd -H 'pyproject.toml|setup.cfg|setup.py' . 2>/dev/null

echo -e "\n=== Checking for existing requires-python or python_requires ==="
rg -n 'requires-python|python_requires' . 2>/dev/null || echo "No existing requires-python or python_requires found"

Repository: AOSSIE-Org/EduAid

Length of output: 1356


🏁 Script executed:

#!/bin/bash
# Check if there's a python package on PyPI that would interfere
# Search for any documentation or comments about this issue in the repo
rg -i 'python_requires|requires-python' . --type md --type txt 2>/dev/null || echo "No mentions found"

# Look for any setup or configuration comments in the project
echo -e "\n=== Checking README or similar files ==="
fd -H 'README|CONTRIBUTING|setup' . -type f 2>/dev/null | head -20

# Check root level for any config files
echo -e "\n=== Checking root directory structure ==="
ls -la . | grep -E '\.(toml|cfg|ini|txt|md)$|setup'

Repository: AOSSIE-Org/EduAid

Length of output: 418


🌐 Web query:

python package PyPI pip requirements.txt interpreter version constraint

💡 Result:

1) On PyPI (your package’s supported Python versions)

To constrain the interpreter version your distribution can be installed on, publish metadata Requires-Python (aka requires-python in pyproject.toml). Installers (including pip) use this when selecting a release to install. [2], [3]

pyproject.toml (PEP 621)

[project]
requires-python = ">=3.10"

This becomes core metadata Requires-Python: >=3.10. [2], [3]

pip will refuse a release that doesn’t match the current interpreter (and may try older releases that do). [4]


2) In requirements.txt (pip requirements files)

You generally cannot “set the Python version” for the environment from a requirements file. What you can do is conditional dependencies using PEP 508 environment markers (e.g., python_version). [1]

Examples:

tomli==2.0.1 ; python_version < "3.11"
uvloop==0.19.0 ; sys_platform == "linux" and python_version >= "3.10"

[1]

If you need a hard guardrail, you typically enforce the Python version outside requirements.txt (e.g., with pyproject.toml / your packaging metadata, CI checks, .python-version, runtime.txt, etc.), rather than expecting pip to “switch interpreters”.


Sources

[1] pip docs: Requirement specifiers & environment markers
[2] PyPA: Core metadata spec (Requires-Python)
[3] PyPA: Project metadata in pyproject.toml (requires-python)
[4] Packaging tutorial: how pip uses requires-python to choose compatible releases


Remove python>=3.11.0,<3.13.0 from requirements.txt — it's interpreted as a package dependency, not an interpreter constraint.

Line 2 contains a Python version specifier that pip will treat as a requirement for a package named "python", which will cause installation failures. To enforce Python version constraints, either:

  1. Create pyproject.toml with:
[project]
requires-python = ">=3.11,<3.13"
  1. Or remove the line if the project is not intended as an installable package and relies on external Python version management (e.g., CI/CD, .python-version files, or documentation).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@requirements.txt` at line 2, Remove the interpreter constraint string
'python>=3.11.0,<3.13.0' from requirements.txt because pip treats it as a
package dependency; either delete that line from requirements.txt or move the
constraint into a pyproject.toml under [project] as requires-python =
">=3.11,<3.13" (or otherwise enforce the Python version via CI/.python-version)
so the project no longer lists a non-package requirement named "python".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant