8000 python 3.13 by Pentusha · Pull Request #1 · Pentusha/python-dependency-injector · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@Pentusha
Copy link
Owner
@Pentusha Pentusha commented Oct 16, 2024

Summary by Sourcery

Drop support for Python 2 and older Python 3 versions, and add support for Python 3.13. Update the codebase to remove compatibility checks and deprecated warnings related to older Python versions. Adjust the CI configuration to test against Python 3.13 and update documentation to reflect these changes.

Enhancements:

  • Remove compatibility code for Python 2 and older Python 3 versions, simplifying the codebase.

Build:

  • Update setup.py to remove support for Python 2 and older Python 3 versions, and add support for Python 3.13.

CI:

  • Update GitHub Actions workflow to test against Python 3.13 instead of older versions.

Documentation:

  • Update README to indicate support for Python 3.12 and 3.13, and suggest an alternative library.

@sourcery-ai
Copy link
sourcery-ai bot commented Oct 16, 2024

Reviewer's Guide by Sourcery

This pull request updates the dependency_injector library to support Python 3.13 and removes support for older Python versions. It simplifies import statements, removes version-specific code, and updates CI configurations.

Updated architecture diagram for CI configuration

graph TD;
    A[CI Configuration] -->|Python 3.9| B[Tests and Linters];
    A -->|Python 3.10| B;
    A -->|Python 3.11| B;
    A -->|Python 3.12| B;
    A -->|Python 3.13| B;
8000 Loading

Updated class diagram for providers module

classDiagram
    class Dependency {
        -set_instance_of(instance_of)
    }
    class Coroutine {
        -set_provides(provides)
    }
    class ConfigurationOption {
        -Error
    }
    class Configuration {
        -Error
    }
    class Resource {
        -_is_resource_subclass(instance)
        -_is_async_resource_subclass(instance)
    }
    class is_provider {
        -instance
    }
    class is_delegated {
        -instance
    }
    class is_container_instance {
        -instance
    }
    class is_container_class {
        -instance
    }
Loading

File-Level Changes

Change Details Files
Removed support for Python versions older than 3.9
  • Removed import statements and conditional code for Python 2.7 and 3.5
  • Removed deprecation warnings for Python 3.5
  • Updated setup.py to remove classifiers for unsupported Python versions
  • Updated CI configuration to test against Python 3.9 to 3.13
src/dependency_injector/providers.pyx
src/dependency_injector/containers.pyx
src/dependency_injector/wiring.py
setup.py
.github/workflows/tests-and-linters.yml
Simplified import statements and removed version-specific code
  • Removed try-except blocks for importing modules that are now always available
  • Removed version-specific implementations of functions
  • Simplified type checking code
src/dependency_injector/providers.pyx
src/dependency_injector/containers.pyx
src/dependency_injector/wiring.py
src/dependency_injector/providers.pxd
Updated version number and README
  • Incremented version number to 4.43.0
  • Updated README to mention support for Python 3.13
  • Added suggestion to look into the 'that-depends' library
src/dependency_injector/__init__.py
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Pentusha - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding upgrade instructions or a migration guide in the documentation to help users transition from older Python versions to 3.9+ as support for earlier versions has been dropped.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Please use the [documentation](https://python-dependency-injector.ets-labs.org/) of the original library.
Please use the [documentation](https://python-dependency-injector.ets-labs.org/) of the original library.

I also suggest looking into the excellent [that-depends](https://github.com/modern-python/that-depends) library,
Copy link

Choose a reason for hiding this comment

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

question (documentation): Consider if suggesting alternative libraries is appropriate for this README.

While this information could be valuable for users, it's somewhat unusual to recommend other libraries in a project's README. Ensure this aligns with your intended documentation strategy.

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

0