Skip to content
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

it is time to deprecate python 3.8 #4817

Merged
merged 11 commits into from
Sep 20, 2024
Merged

Conversation

findtopher
Copy link
Member

@findtopher findtopher commented Sep 18, 2024

What changes are proposed in this pull request?

Deprecate python 3.8 as as foretold by prophecy

How is this patch tested? If it is not, please explain why.

Local Build

Release Notes

Is this a user-facing change that should be mentioned in the release notes?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release
    notes for FiftyOne users.

Python 3.8 is no longer supported; see our deprecation notices for details

What areas of FiftyOne does this PR affect?

  • App: FiftyOne application changes
  • Build: Build and test infrastructure changes
  • Core: Core fiftyone Python library changes
  • Documentation: FiftyOne documentation changes
  • Other

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Updated Python version requirements across various documentation and setup files to support Python 3.9 and above.
    • Enhanced Docker image configuration to utilize Python 3.11.
    • Added support for generating Apple Help Book documentation and Devhelp documentation.
  • Bug Fixes

    • Removed deprecated warnings for Python 3.8 from the codebase and documentation.
  • Documentation

    • Clarified support status for Python versions in README and troubleshooting guides.
    • Updated installation instructions to reflect new Python version requirements.

@findtopher findtopher requested review from a team as code owners September 18, 2024 21:31
Copy link
Contributor

coderabbitai bot commented Sep 18, 2024

Walkthrough

The pull request primarily updates the Python version requirements across multiple files, transitioning from Python 3.8 to 3.9. This includes changes in workflow configurations for documentation and testing, adjustments in the README and other documentation files, and modifications in setup.py files to reflect the new minimum Python version. The updates aim to ensure compatibility with newer Python features and improve the overall environment for the project.

Changes

File(s) Change Summary
.github/workflows/build-docs.yml, .github/workflows/build.yml, .github/workflows/test.yml Updated Python version from 3.8 to 3.9 in workflow configurations; removed Python 3.8 from testing matrix.
README.md, docs/README.md, docs/source/getting_started/install.rst, docs/source/getting_started/troubleshooting.rst, docs/source/getting_started/virtualenv.rst Modified Python version requirements from 3.8 to 3.9 across documentation files.
docs/source/deprecation.rst Updated support status for Python 3.8, indicating support has ended.
docs/source/environments/index.rst Changed Docker image Python version from 3.8 to 3.11.
fiftyone/__init__.py Removed deprecation warning code for Python 3.8.
package/db/setup.py, package/desktop/setup.py, package/graphql/setup.py, setup.py Updated python_requires from >=3.8 to >=3.9, removing support for Python 3.8.
requirements/common.txt, requirements/docs.txt Modified pymongo version requirement and added sphinxcontrib-applehelp dependency.

Possibly related PRs

  • Remove desktop App #4748: This PR involves the removal of the fiftyone-desktop package and its associated documentation, which is relevant as the main PR updates Python version requirements that may affect compatibility with the desktop application.
  • Improve colorscheme ux #4763: This PR includes changes to the documentation that may be impacted by the updates in Python version requirements, as it involves user guidance and configuration related to the application.
  • Adding support for remotely-sourced zoo models #4786: This PR introduces support for remotely-sourced models, which may also be affected by the changes in Python version requirements, particularly in how models are loaded and managed in the application.

Suggested labels

documentation, core, dependencies

🐰 "In fields of code, we hop and play,
With Python's version, we leap today!
From 3.8 to 3.9, a joyful cheer,
New features await, let’s give a cheer!
So gather 'round, dear friends, let's code,
In the world of Python, we’ll lighten the load!" 🐇


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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: 0

Outside diff range and nitpick comments (2)
docs/source/getting_started/troubleshooting.rst (1)

47-47: Update the example Python version.

The error message aligns with the PR objective of updating the Python version requirement to 3.9. However, consider updating the example Python version from 3.4.10 to a more recent version that is closer to the new requirement, such as 3.8.15.

README.md (1)

136-136: Looks good! Consider improving the typography.

The change in the Python version requirement correctly reflects the deprecation of Python 3.8.

As a minor typographical improvement, consider using an en dash (–) instead of a hyphen (-) for the numerical range:

-  [Python](https://www.python.org) (3.9 - 3.11)
+  [Python](https://www.python.org) (3.9 – 3.11)  
Tools
LanguageTool

[typographical] ~136-~136: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... Python (3.9 - 3.11) - Node.js ...

(DASH_RULE)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 93a7f3b and 8fa4ad3.

Files selected for processing (15)
  • .github/workflows/build-docs.yml (1 hunks)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/test.yml (0 hunks)
  • README.md (1 hunks)
  • docs/README.md (1 hunks)
  • docs/source/deprecation.rst (1 hunks)
  • docs/source/environments/index.rst (1 hunks)
  • docs/source/getting_started/install.rst (1 hunks)
  • docs/source/getting_started/troubleshooting.rst (1 hunks)
  • docs/source/getting_started/virtualenv.rst (2 hunks)
  • fiftyone/init.py (0 hunks)
  • package/db/setup.py (1 hunks)
  • package/desktop/setup.py (1 hunks)
  • package/graphql/setup.py (1 hunks)
  • setup.py (1 hunks)
Files not reviewed due to no reviewable changes (2)
  • .github/workflows/test.yml
  • fiftyone/init.py
Files skipped from review due to trivial changes (2)
  • docs/README.md
  • docs/source/deprecation.rst
Additional context used
LanguageTool
README.md

[typographical] ~136-~136: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... Python (3.9 - 3.11) - Node.js ...

(DASH_RULE)

Additional comments not posted (12)
.github/workflows/build.yml (1)

29-32: Python version upgrade looks good! Verify compatibility and update documentation.

The Python version upgrade from 3.8 to 3.9 aligns with the PR objective of deprecating Python 3.8. This change may provide enhancements, new features, and improved performance.

Please ensure that:

  1. All dependencies are compatible with Python 3.9.
  2. The codebase has been thoroughly tested with Python 3.9.

You can run the following script to verify the compatibility:

Please update the documentation to reflect the Python version upgrade, including:

  1. README.md
  2. CHANGELOG.md
  3. Any other relevant documentation

This will ensure that the users are aware of the change and can take necessary actions to upgrade their Python version.

package/graphql/setup.py (1)

59-59: Deprecation of Python 3.8 support

The change to the python_requires parameter and the removal of the Python 3.8 classifier align with the PR objective of deprecating Python 3.8 support.

Please ensure that the release notes clearly communicate this breaking change and its implications for users who are still on Python 3.8. It's important to guide them on the necessary steps to upgrade their Python version.

Additionally, verify if any other parts of the codebase or documentation still reference Python 3.8, and update them accordingly:

# Search for references to Python 3.8 in Python files
rg --type py '3\.8'

# Search for references to Python 3.8 in documentation files (e.g., Markdown, reStructuredText)
rg --type-add 'docs:*.md' --type-add 'docs:*.rst' --type docs '3\.8'
.github/workflows/build-docs.yml (1)

56-59: LGTM!

The Python version update aligns with the PR objective of deprecating Python 3.8. This is a good practice to ensure the project stays up to date with the latest features and improvements.

Please ensure that the project's dependencies are compatible with Python 3.9. You can run the following script to verify the compatibility:

Verification successful

Python 3.9 update is consistent with project requirements

The change from Python 3.8 to 3.9 in the GitHub Actions workflow is appropriate and aligns with the project's requirements. Here's why:

  • The setup.py file already specifies python_requires=">=3.9", indicating that the project is designed to work with Python 3.9 and above.
  • No explicit dependencies on Python 3.8 were found in the requirements files.
  • The main requirements file (requirements/common.txt) doesn't contain any Python version-specific packages that might cause compatibility issues.

This change ensures that the CI/CD pipeline uses a Python version that's consistent with the project's declared requirements, which is a good practice for maintaining compatibility and leveraging the latest features and improvements in Python 3.9.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the compatibility of the project's dependencies with Python 3.9.

# Test: Install the project's dependencies using Python 3.9. Expect: No errors.
python3.9 -m venv venv
source venv/bin/activate
pip install -r requirements/dev.txt
pip install -r fiftyone-teams/requirements/dev.txt
pip install fiftyone-brain fiftyone-db
pip install pycocotools tensorflow torch torchvision
pip install typing_extensions==4.10.0
pip install .

Length of output: 893


Script:

#!/bin/bash
# Description: Examine project files for Python version requirements and potential incompatibilities

# Check setup.py for Python version requirements
echo "Checking setup.py for Python version requirements:"
grep -n "python_requires" setup.py

# Check requirements files for any version-specific packages
echo -e "\nChecking requirements files for version-specific packages:"
grep -n -R "==3.8" requirements/
grep -n -R ">=3.8,<3.9" requirements/

# Check for any mentions of Python 3.8 or 3.9 in the project
echo -e "\nChecking for mentions of Python 3.8 or 3.9 in the project:"
grep -n -R "python 3.8" .
grep -n -R "python 3.9" .

# List all requirements files
echo -e "\nListing all requirements files:"
find . -name "*requirements*.txt"

# Display the content of the main requirements file
echo -e "\nContent of the main requirements file:"
cat requirements/common.txt

Length of output: 1391

setup.py (2)

158-158: Deprecation of Python 3.8 support looks good!

The change to the python_requires field correctly reflects the deprecation of Python 3.8 support. Users will now need Python 3.9 or later to install and use the package.

Please ensure that the deprecation is clearly communicated in the release notes, as mentioned in the PR summary, to help users prepare for the transition.


Line range hint 1-158: Removal of Python 3.8 classifier is consistent.

The removal of the "Programming Language :: Python :: 3.8" classifier from the list of supported programming languages aligns with the deprecation of Python 3.8 support.

docs/source/getting_started/virtualenv.rst (2)

29-29: LGTM!

The Python version update in the documentation from 3.8.9 to 3.9.20 aligns with the PR objective to deprecate Python 3.8 and recommend a newer version. This change provides clear guidance to users about the recommended Python version for setting up the virtual environment.


74-74: Looks good!

Updating the Python version from 3.8.3 to 3.9.20 in this part of the documentation ensures consistency with the previous change and aligns with the goal of deprecating Python 3.8. This helps maintain clarity and avoids confusion for users following the virtual environment setup guide.

package/desktop/setup.py (1)

194-194: Looks good! Ensure the deprecation notices and release notes are updated.

The change to raise the minimum required Python version from 3.8 to 3.9 aligns with the PR objective of deprecating Python 3.8. This will require users to have a more recent Python version to use this package.

Please make sure the deprecation notices clearly explain the rationale behind this change and that the release notes call out this user-facing update, directing users to the relevant deprecation notices for more details.

docs/source/getting_started/install.rst (1)

23-23: Looks good! Ensure this is documented in the release notes.

The change in the supported Python version range from 3.8 - 3.11 to 3.9 - 3.11 aligns with the PR's objective of deprecating Python 3.8.

As this is a user-facing change, please ensure it is clearly communicated in the release notes so that users are aware of the new minimum Python version required to use FiftyOne going forward.

docs/source/getting_started/troubleshooting.rst (1)

49-52: LGTM!

The updated Python and pip version requirements align with the PR objective. The reference to the installation guide is helpful for users to get more details.

package/db/setup.py (1)

327-327: LGTM! Remember to include this in the release notes.

The change to bump the minimum required Python version from 3.8 to 3.9 looks good. It aligns with the PR objective of deprecating Python 3.8.

Please ensure this user-facing change is prominently mentioned in the release notes, as indicated in the PR summary, so that users are aware of the updated Python version requirement.

docs/source/environments/index.rst (1)

418-424: LGTM!

The changes to update the default Python version to 3.11 and provide a build argument for 3.10 are good improvements.

docs/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@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: 0

Outside diff range and nitpick comments (1)
README.md (1)

136-136: The Python version requirement update looks good!

It aligns with the PR objective to deprecate Python 3.8.

For improved formatting, consider using an en dash (–) instead of a hyphen (-) for the numerical range:

-[Python](https://www.python.org) (3.9 - 3.11)
+[Python](https://www.python.org) (3.9 – 3.11)
Tools
LanguageTool

[typographical] ~136-~136: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... Python (3.9 - 3.11) - Node.js ...

(DASH_RULE)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8df1c5e and e930c22.

Files selected for processing (17)
  • .github/workflows/build-docs.yml (1 hunks)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/test.yml (0 hunks)
  • README.md (1 hunks)
  • docs/README.md (1 hunks)
  • docs/source/deprecation.rst (1 hunks)
  • docs/source/environments/index.rst (1 hunks)
  • docs/source/getting_started/install.rst (1 hunks)
  • docs/source/getting_started/troubleshooting.rst (1 hunks)
  • docs/source/getting_started/virtualenv.rst (2 hunks)
  • fiftyone/init.py (0 hunks)
  • package/db/setup.py (2 hunks)
  • package/desktop/setup.py (1 hunks)
  • package/graphql/setup.py (1 hunks)
  • requirements/common.txt (1 hunks)
  • requirements/docs.txt (1 hunks)
  • setup.py (2 hunks)
Files not reviewed due to no reviewable changes (2)
  • .github/workflows/test.yml
  • fiftyone/init.py
Files skipped from review as they are similar to previous changes (14)
  • .github/workflows/build-docs.yml
  • .github/workflows/build.yml
  • docs/README.md
  • docs/source/deprecation.rst
  • docs/source/environments/index.rst
  • docs/source/getting_started/install.rst
  • docs/source/getting_started/troubleshooting.rst
  • docs/source/getting_started/virtualenv.rst
  • package/db/setup.py
  • package/desktop/setup.py
  • package/graphql/setup.py
  • requirements/common.txt
  • requirements/docs.txt
  • setup.py
Additional context used
LanguageTool
README.md

[typographical] ~136-~136: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... Python (3.9 - 3.11) - Node.js ...

(DASH_RULE)

@findtopher findtopher force-pushed the topher/deprecate-python-8 branch from 2df4b56 to f61995c Compare September 20, 2024 13:29
Copy link
Contributor

@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: 0

Outside diff range and nitpick comments (1)
README.md (1)

136-136: Approve updating the Python version and suggest typographical improvement.

The change in the Python version requirement from "3.8 - 3.11" to "3.9 - 3.11" aligns with the objective of deprecating Python 3.8. This is an important user-facing change that is appropriately documented in the README file.

To improve typography, consider using an en dash (–) instead of a hyphen (-) for the numerical range:

-[Python](https://www.python.org) (3.9 - 3.11)
+[Python](https://www.python.org) (3.9 – 3.11) 
Tools
LanguageTool

[typographical] ~136-~136: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... Python (3.9 - 3.11) - Node.js ...

(DASH_RULE)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2df4b56 and f61995c.

Files selected for processing (18)
  • .github/workflows/build-db.yml (2 hunks)
  • .github/workflows/build-docs.yml (1 hunks)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/test.yml (0 hunks)
  • README.md (1 hunks)
  • docs/README.md (1 hunks)
  • docs/source/deprecation.rst (1 hunks)
  • docs/source/environments/index.rst (1 hunks)
  • docs/source/getting_started/install.rst (1 hunks)
  • docs/source/getting_started/troubleshooting.rst (1 hunks)
  • docs/source/getting_started/virtualenv.rst (2 hunks)
  • fiftyone/init.py (0 hunks)
  • package/db/setup.py (2 hunks)
  • package/desktop/setup.py (1 hunks)
  • package/graphql/setup.py (1 hunks)
  • requirements/common.txt (1 hunks)
  • requirements/docs.txt (1 hunks)
  • setup.py (1 hunks)
Files not reviewed due to no reviewable changes (2)
  • .github/workflows/test.yml
  • fiftyone/init.py
Files skipped from review as they are similar to previous changes (15)
  • .github/workflows/build-db.yml
  • .github/workflows/build-docs.yml
  • .github/workflows/build.yml
  • docs/README.md
  • docs/source/deprecation.rst
  • docs/source/environments/index.rst
  • docs/source/getting_started/install.rst
  • docs/source/getting_started/troubleshooting.rst
  • docs/source/getting_started/virtualenv.rst
  • package/db/setup.py
  • package/desktop/setup.py
  • package/graphql/setup.py
  • requirements/common.txt
  • requirements/docs.txt
  • setup.py
Additional context used
LanguageTool
README.md

[typographical] ~136-~136: If you want to indicate numerical ranges or time ranges, consider using an en dash.
Context: ... Python (3.9 - 3.11) - Node.js ...

(DASH_RULE)

Copy link
Contributor

@benjaminpkane benjaminpkane left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@findtopher findtopher merged commit ab8c08d into develop Sep 20, 2024
20 checks passed
@findtopher findtopher deleted the topher/deprecate-python-8 branch September 20, 2024 14:54
@coderabbitai coderabbitai bot mentioned this pull request Sep 25, 2024
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.

2 participants