-
Notifications
You must be signed in to change notification settings - Fork 5
Updates supported versions of Python and Django #37
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
Conversation
Reviewer's GuideThis PR updates the project’s supported Python versions (dropping 3.8/3.9 and adding 3.12/3.13) and Django versions (dropping 3.2/4.0/4.1 and adding 5.0/5.1/5.2) across configuration files, adds a fallback for distutils on newer Python releases to maintain compatibility, includes a 'py.typed' marker for PEP 561 compliance, and bumps the package version to 0.3.0 with corresponding CHANGELOG entry. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @hugobessa - I've reviewed your changes - here's some feedback:
- Make sure you include the
py.typed
file in your packaged distribution (e.g. viapackage_data
orinclude
inpyproject.toml
) so type checkers actually pick up your type hints. - Since distutils is deprecated in Python 3.12+, consider standardizing on
sysconfig.get_paths()["purelib"]
(and removing the distutils fallback) to simplify and future-proof yourget_python_lib()
implementation.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
b148796
to
43e3665
Compare
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.
Pull Request Overview
This PR updates the package to support newer Python (3.12 and 3.13) and Django (5.0–5.2) versions, drops support for older releases, and improves type hinting and CI configurations.
- Updated pyproject.toml to include the py.typed marker and modify version classifiers and dependency ranges
- Modified the fallback implementation for get_python_lib in capture.py to support newer Python versions
- Updated CI workflows and documentation to reflect the new supported versions
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pyproject.toml | Updates in classifiers, dependencies, and tox/GitHub Actions matrices for new Python and Django versions, plus adding the py.typed marker |
django_virtual_models/query_capture/capture.py | Added a fallback for get_python_lib to accommodate recent Python releases, including handling for both string and list returns |
django_virtual_models/init.py | Bumped package version from 0.2.0 to 0.3.0 |
CHANGELOG.md | Documented version changes and dependency updates |
.github/workflows/tests.yml | Updated Python and Django versions, as well as actions versions; note an obsolete coverage conditional |
.github/workflows/pre-commit.yml | Upgraded actions for checkout, Python setup, and pre-commit execution |
Comments suppressed due to low confidence (1)
.github/workflows/tests.yml:45
- The conditional for generating coverage.xml still references Python 3.8 and Django 3.2, which are no longer part of the test matrix. Update or remove this condition so that the step runs with one of the supported versions.
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' && matrix.django-version == '3.2' }}
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.
Pull Request Overview
This PR updates the project to support newer Python (3.12, 3.13) and Django (5.0–5.2) releases while deprecating older versions, and it also enhances type hinting support and updates CI configurations.
- Updated version classifiers, dependencies, and CI matrices in pyproject.toml
- Added a fallback for get_python_lib in query_capture to support Python versions lacking distutils.sysconfig
- Upgraded version metadata, CHANGELOG entries, and GitHub Actions workflows
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pyproject.toml | Added py-typed marker and updated Python/Django classifiers and dependencies |
django_virtual_models/query_capture/capture.py | Added fallback implementation for get_python_lib with improved path handling |
django_virtual_models/init.py | Updated package version |
CHANGELOG.md | Documented changes for version 0.3.0 |
.github/workflows/tests.yml | Updated matrix and actions versions to reflect new Python and Django support |
.github/workflows/pre-commit.yml | Upgraded Actions for checkout, setup-python, and pre-commit |
Comments suppressed due to low confidence (2)
.github/workflows/tests.yml:40
- The example test condition only covers Python 3.10 and Django 4.2. To fully validate the newly supported Django 5.x versions, consider adding or updating a test run configuration that explicitly tests these versions.
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && matrix.django-version == '4.2' }}
pyproject.toml:61
- The example dependency still allows Django 4.2 even though the PR metadata indicates support for Django 5.0–5.2 and dropping Django 3.2, 4.0, and 4.1. Please confirm if including Django 4.2 here is intentional or if it should be revised.
"django >= 4.2,<6.0",
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.
Pull Request Overview
This PR updates the supported versions for Python and Django, adds a py.typed marker for enhanced type hinting, updates CI configurations, and bumps the package version. Key changes include updating version matrices in tox and GitHub Actions, migrating from index_together to indexes in models, and adding a fallback for get_python_lib.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pyproject.toml | Updated classifiers, example dependency version, and tox/CI matrices to reflect new Python and Django support; added py.typed marker. |
example/movies/models.py | Replaced deprecated index_together with the indexes attribute for model indexing. |
example/movies/migrations/0002_rename_persondirector_movie_order_movies_pers_movie_i_957f84_idx.py | Introduced a migration to rename the index corresponding to the model index change. |
django_virtual_models/query_capture/capture.py | Added a fallback for get_python_lib to support newer Python versions lacking distutils.sysconfig. |
django_virtual_models/init.py | Bumped package version to 0.3.0. |
CHANGELOG.md | Documented the changes for the new release version. |
.github/workflows/tests.yml .github/workflows/pre-commit.yml |
Updated CI workflows to use the latest actions and test the newly supported versions. |
Comments suppressed due to low confidence (1)
pyproject.toml:30
- The project dependencies still allow Django >=3.2 despite the PR description stating that support for Django 3.2 should be dropped. Update the dependency constraint to match the new supported Django versions.
"django >=3.2",
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.
Pull Request Overview
This PR updates the project configuration and CI pipelines to support newer Python (3.12, 3.13) and Django (5.x) releases while dropping older versions, and it enhances type hinting support. Key changes include updating pyproject.toml with the new supported versions and py.typed flag, modifying the index definition in models, and refreshing CI workflows and migrations accordingly.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
pyproject.toml | Updated supported Python and Django versions and added py.typed |
example/movies/models.py | Replaced deprecated index_together with indexes in model Meta |
example/movies/migrations/0002_rename_persondirector_...py | Migration to rename an index using Django 5.2 conventions |
django_virtual_models/query_capture/capture.py | Added fallback for get_python_lib to support Python versions lacking it |
django_virtual_models/init.py | Bumped version to 0.3.0 |
CHANGELOG.md | Documented changes and version bump |
.github/workflows/tests.yml | Updated CI matrix and actions versions |
.github/workflows/pre-commit.yml | Upgraded pre-commit workflow actions |
@fjsj the coverage decreased a little bit because I had to implement backward compatibility functions. I don't think that's worth covering. Could you please ignore that? |
py.typed
file for type hintsSummary by Sourcery
Update the package to support newer Python (3.12, 3.13) and Django (5.x) releases while dropping older versions, enhance typing support, and refresh CI and project metadata.
Enhancements:
py.typed
marker file for PEP 561 type hintingget_python_lib
for Python versions lackingdistutils.sysconfig
CI:
Documentation:
CHANGELOG.md