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

Update geoip2 requirement from ==4.* to ==5.* #538

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 5, 2025

Updates the requirements on geoip2 to permit the latest version.

Release notes

Sourced from geoip2's releases.

5.0.1

  • Allow ip_address in the Traits record to be None again. The primary use case for this is from the minfraud package.
Changelog

Sourced from geoip2's changelog.

5.0.1 (2025-01-28) ++++++++++++++++++

  • Allow ip_address in the Traits record to be None again. The primary use case for this is from the minfraud package.

5.0.0 (2025-01-28) ++++++++++++++++++

  • BREAKING: The raw attribute on the model classes has been replaced with a to_dict() method. This can be used to get a representation of the object that is suitable for serialization.
  • BREAKING: The ip_address property on the model classes now always returns a ipaddress.IPv4Address or ipaddress.IPv6Address.
  • BREAKING: The model and record classes now require all arguments other than locales and ip_address to be keyword arguments.
  • BREAKING: geoip2.mixins has been made internal. This normally would not have been used by external code.
  • IMPORTANT: Python 3.9 or greater is required. If you are using an older version, please use an earlier release.
  • metro_code on geoip2.record.Location has been deprecated. The code values are no longer being maintained.
  • The type hinting for the optional locales keyword argument now allows any sequence of strings rather than only list of strings.

4.8.1 (2024-11-18) ++++++++++++++++++

  • setuptools was incorrectly listed as a runtime dependency. This has been removed. Pull request by Mathieu Dupuy. GitHub #174.

4.8.0 (2023-12-05) ++++++++++++++++++

  • IMPORTANT: Python 3.8 or greater is required. If you are using an older version, please use an earlier release.
  • The is_anycast attribute was added to geoip2.record.Traits. This returns True if the IP address belongs to an anycast network <https://en.wikipedia.org/wiki/Anycast>_. This is available for the GeoIP2 Country, City Plus, and Insights web services and the GeoIP2 Country, City, and Enterprise databases.

4.7.0 (2023-05-09) ++++++++++++++++++

  • IMPORTANT: Python 3.7 or greater is required. If you are using an older version, please use an earlier release.

4.6.0 (2022-06-21) ++++++++++++++++++

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Summary by Sourcery

Enhancements:

  • Upgrade the geoip2 library from version 4.* to 5.*.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Feb 5, 2025
Copy link

sourcery-ai bot commented Feb 5, 2025

Reviewer's Guide by Sourcery

This pull request updates the geoip2 dependency from version 4.* to 5.* in the pyproject.toml file. This upgrade includes breaking changes, such as the replacement of the 'raw' attribute with 'to_dict()' method, changes to the 'ip_address' property, and a requirement for Python 3.9 or greater.

Class diagram showing breaking changes in GeoIP2 v5

classDiagram
    class ModelBase {
        -raw [removed]
        +to_dict() [new]
        +ip_address: IPv4Address|IPv6Address
    }

    class Traits {
        +ip_address: IPv4Address|IPv6Address|None
        +is_anycast: bool
    }

    class Location {
        +metro_code [deprecated]
    }

    ModelBase <|-- Traits
    ModelBase <|-- Location

    note for ModelBase "Breaking changes in v5.0.0:
    - raw attribute replaced with to_dict()
    - ip_address now returns IPv4/IPv6Address
    - keyword args required except locales & ip_address"

    note for Location "metro_code is deprecated
    as codes are no longer maintained"
Loading

File-Level Changes

Change Details Files
Update geoip2 dependency to version 5.*
  • Changed the geoip2 dependency version from 4.* to 5.*.
pyproject.toml

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. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the 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 exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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.

We have skipped reviewing this pull request. Here's why:

  • It seems to have been created by a bot (hey, dependabot[bot]!). We assume it knows what it's doing!
  • We don't review packaging changes - Let us know if you'd like us to change this.

Updates the requirements on [geoip2](https://github.com/maxmind/GeoIP2-python) to permit the latest version.
- [Release notes](https://github.com/maxmind/GeoIP2-python/releases)
- [Changelog](https://github.com/maxmind/GeoIP2-python/blob/main/HISTORY.rst)
- [Commits](maxmind/GeoIP2-python@v4.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: geoip2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/geoip2-eq-5.star branch from c040151 to e11aae3 Compare February 7, 2025 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants