-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop python3.8 support #8360
Drop python3.8 support #8360
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes in this pull request primarily involve updating the Python version from 3.8 to 3.9 across various workflow files and documentation. The Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Quality Gate passedIssues Measures |
Python 3.8 EOL is 2024-10-07, so this PR can be unfrozen now. |
Please add a changelog entry and update the black configuration in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
pyproject.toml (1)
Line range hint 1-8
: Consider updating isort's Python version requirements.
While black's target version has been updated, isort's configuration might also benefit from explicitly setting a minimum Python version to maintain consistency across all tools.
Consider adding a py_version
setting to the isort configuration:
[tool.isort]
profile = "black"
forced_separate = ["tests"]
line_length = 100
skip_gitignore = true # align tool behavior with Black
+py_version = 39
cvat-cli/setup.py (2)
Line range hint 44-48
: Consider updating Python version classifier.
The current classifier "Programming Language :: Python :: 3"
is very generic. Consider adding specific version classifiers to better communicate supported Python versions.
classifiers=[
"Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
Python version requirement is specified in setup.py but missing in README.md
The setup.py file specifies Python >= 3.9 requirement, but this information is not documented in the README.md. The README should be updated to include this important requirement for users.
- cvat-cli/README.md: Add Python version requirement (>= 3.9) in the Installation section
🔗 Analysis chain
Line range hint 39-40
: Verify README.md Python version requirements.
The setup is using README.md for the long description. Let's verify it contains the updated Python version requirements.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if README.md mentions Python version requirements
echo "Checking README.md for Python version requirements..."
cat README.md | grep -i "python.*[>=]\s*3\.[0-9]"
Length of output: 168
Script:
#!/bin/bash
# Let's first check if README.md exists and its content
echo "Checking README.md content..."
if [ -f "README.md" ]; then
cat README.md
else
echo "README.md not found in root"
# Check if it exists in cvat-cli directory
if [ -f "cvat-cli/README.md" ]; then
cat cvat-cli/README.md
fi
fi
Length of output: 17816
Script:
#!/bin/bash
# Let's check the cvat-cli specific README and setup.py for Python version requirements
echo "Checking cvat-cli/README.md..."
if [ -f "cvat-cli/README.md" ]; then
cat cvat-cli/README.md
fi
echo -e "\nChecking cvat-cli/setup.py..."
if [ -f "cvat-cli/setup.py" ]; then
cat cvat-cli/setup.py
fi
Length of output: 4207
Script:
#!/bin/bash
# Let's check the base requirements file for Python version requirements
echo "Checking requirements/base.txt..."
if [ -f "cvat-cli/requirements/base.txt" ]; then
cat cvat-cli/requirements/base.txt
fi
Length of output: 273
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
cvat-sdk/gen/generator-config.yml
is excluded by!**/gen/**
📒 Files selected for processing (8)
- .github/workflows/full.yml (1 hunks)
- .github/workflows/main.yml (1 hunks)
- .github/workflows/schedule.yml (1 hunks)
- changelog.d/20241029_113229_maria_drop_python_3_8_support.md (1 hunks)
- cvat-cli/setup.py (1 hunks)
- pyproject.toml (1 hunks)
- site/content/en/docs/api_sdk/cli/_index.md (1 hunks)
- site/content/en/docs/api_sdk/sdk/_index.md (1 hunks)
✅ Files skipped from review due to trivial changes (3)
- changelog.d/20241029_113229_maria_drop_python_3_8_support.md
- site/content/en/docs/api_sdk/cli/_index.md
- site/content/en/docs/api_sdk/sdk/_index.md
🔇 Additional comments (8)
pyproject.toml (1)
9-9
: LGTM! The black configuration update aligns with dropping Python 3.8 support.
The change to target Python 3.9 is appropriate given Python 3.8's EOL status as of October 7, 2024.
cvat-cli/setup.py (1)
59-59
: LGTM! Python version requirement update is appropriate.
The change to require Python >=3.9 aligns with dropping Python 3.8 support, which reached EOL on October 7, 2024.
.github/workflows/schedule.yml (2)
109-109
: LGTM: Python version update aligns with EOL status.
The update from Python 3.8 to 3.9 is appropriate given Python 3.8's end-of-life status as of October 7, 2024.
109-109
: Verify Python version consistency across workflow files.
Let's ensure this Python version update is consistently applied across all workflow files.
✅ Verification successful
Python version is consistently set to 3.9 across all workflow files
All GitHub Actions workflow files (.github/workflows/schedule.yml, full.yml, and main.yml) are using Python version 3.9 consistently. No version mismatches were found.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check Python version settings across all workflow files
# Expected: All workflow files should use Python 3.9 or higher
echo "Checking Python version settings in workflow files..."
rg -A 1 "setup-python@v\d+" .github/workflows/ | rg "python-version"
Length of output: 185
Script:
#!/bin/bash
# Let's try a different approach to find Python version specifications in workflow files
echo "Searching for Python version specifications in workflow files..."
rg "python-version:" .github/workflows/
Length of output: 359
.github/workflows/full.yml (2)
105-105
: LGTM! Python version update aligns with EOL policy.
The update from Python 3.8 to 3.9 is appropriate given Python 3.8's EOL status as of October 7, 2024.
105-105
: Verify Python version consistency across jobs.
While the rest_api_testing
job has been updated to use Python 3.9, let's verify if other jobs in this workflow also need Python version updates.
✅ Verification successful
Python version 3.9 is consistently used across all workflow files
The verification results show that Python version 3.9 is consistently specified in all GitHub workflow files that use Python:
.github/workflows/schedule.yml
: python-version: '3.9'.github/workflows/main.yml
: python-version: '3.9'.github/workflows/full.yml
: python-version: '3.9'
All jobs that require Python are using the same version, so no updates are needed.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for Python version specifications across workflow files
# Expected results: All Python version specifications should be >= 3.9
# Search for Python version specifications in workflow files
echo "Searching for Python version specifications in workflow files..."
rg -A 2 'actions/setup-python' .github/workflows/
# Search for potential Python usage in workflow files
echo -e "\nSearching for potential Python usage in workflow files..."
rg -i 'python|pip|pytest' .github/workflows/
Length of output: 7707
.github/workflows/main.yml (2)
141-141
: LGTM: Python version update aligns with EOL strategy.
The update from Python 3.8 to 3.9 in the rest_api_testing
job is appropriate given Python 3.8's EOL status as of October 7, 2024.
141-141
: Verify Python dependencies compatibility.
Since we're upgrading the Python version, let's ensure all dependencies in the test requirements are compatible with Python 3.9.
✅ Verification successful
Let me check the actual content of the requirements file to better understand the dependencies.
Dependencies are compatible with Python 3.9
All listed dependencies in tests/python/requirements.txt
are known to be compatible with Python 3.9. Notable packages like pytest, requests, boto3, Pillow, and numpy have well-established support for Python 3.9. None of the specified versions have any known compatibility issues with Python 3.9.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if any dependencies in test requirements specify Python version constraints
# Test: Look for Python version constraints in requirements files
echo "Checking Python version constraints in requirements files..."
rg -l "python_version" tests/python/requirements.txt || true
Length of output: 190
Script:
#!/bin/bash
# Check the content of requirements file
cat tests/python/requirements.txt
Length of output: 235
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #8360 +/- ##
========================================
Coverage 74.20% 74.20%
========================================
Files 403 403
Lines 43375 43375
Branches 3925 3925
========================================
+ Hits 32185 32188 +3
+ Misses 11190 11187 -3
|
Co-authored-by: Roman Donchenko <roman@cvat.ai>
Quality Gate passedIssues Measures |
Motivation and context
https://devguide.python.org/versions/#unsupported-versions
How has this been tested?
Checklist
develop
branch(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
Release Notes
New Features
Documentation
Chores