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] Bump django-phonenumber-field from 6.4.0 to 8.0.0 #686

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

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 27, 2024

Bumps django-phonenumber-field from 6.4.0 to 8.0.0.

Release notes

Sourced from django-phonenumber-field's releases.

8.0.0

What's Changed

Breaking changes

Other changes

Full Changelog: stefanfoulis/django-phonenumber-field@7.3.0...8.0.0


Migration guide

Previously, the widgets handled part of the validation. That behavior prevents overriding validation in form fields, as widgets were casting the value into a PhoneNumber object, validating it in the process.

Following the MultiValueField implementation from Django (and MultiWidget), the widget now handles the presentation logic, but makes no attempt at validation. The new SplitPhoneNumberField handles the logic of validating the region choice and the number, and the PhoneNumberPrefixWidget simply dispatches the region and number data to the appropriate widget.

In order to retain backward compatibility, now that the validate_international_phonenumber actually comes into play, its error code has been changed to invalid, so that the custom error message for invalid shows.

validate_international_phonenumber

Review uses of the invalid_phone_number error code. You’ll probably want to replace them with invalid. Given that the validator usually did not come into play, you shouldn’t find many uses.

PhoneNumberField with RegionalPhoneNumberWidget

Move the custom validation occurs in the Django Form clean_FIELD() (or clean()), and no changes should be noticeable.

PhoneNumberField with PhoneNumberPrefixWidget

Use the SplitPhoneNumberField instead. Error messages will change slightly and should be more precise (whether the region is not part of the choices, or the number cannot be interpreted in the selected region).

For more examples, take a look at tests.test_formfields.SplitPhoneNumberFieldTest. Make sure GitHub loads the diff for file tests/test_formfields.py

The following tests should cover most use cases:

7.3.0

... (truncated)

Commits
  • f7765f4 docs: Fix representation of serializer
  • b255326 Add validate_phonenumber to allow short numbers
  • b8d1886 Rename test_value_from_datadict to test_example_numbers
  • 9923578 Move validation from widgets to the form fields
  • e491d09 Drop support for Django 4.1
  • ef1e728 Remove PhoneNumberInternationalFallbackWidget
  • 4484533 update Italian locale
  • ee1dd71 Make PhoneNumberPrefixSelect use the provided region
  • cb83645 Merge pull request #590 from francoisfreitag/mo
  • b1f355d Merge pull request #591 from stefanfoulis/dependabot/github_actions/actions/u...
  • Additional commits viewable in compare view

Dependabot compatibility score

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)

Copy link
Contributor Author

dependabot bot commented on behalf of github Jun 27, 2024

Dependabot tried to add @ae-utbm/developpers-v3 as a reviewer to this PR, but received the following error from GitHub:

POST https://api.github.com/repos/ae-utbm/sith3/pulls/686/requested_reviewers: 422 - Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the ae-utbm/sith3 repository. // See: https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jun 27, 2024
@dependabot dependabot bot force-pushed the dependabot/pip/taiste/django-phonenumber-field-8.0.0 branch 5 times, most recently from 4694695 to a287c7e Compare July 5, 2024 13:23
@dependabot dependabot bot force-pushed the dependabot/pip/taiste/django-phonenumber-field-8.0.0 branch 2 times, most recently from d23ddd9 to 5e53056 Compare July 10, 2024 12:17
Bumps [django-phonenumber-field](https://github.com/stefanfoulis/django-phonenumber-field) from 6.4.0 to 8.0.0.
- [Release notes](https://github.com/stefanfoulis/django-phonenumber-field/releases)
- [Changelog](https://github.com/stefanfoulis/django-phonenumber-field/blob/main/CHANGELOG.rst)
- [Commits](stefanfoulis/django-phonenumber-field@6.4.0...8.0.0)

---
updated-dependencies:
- dependency-name: django-phonenumber-field
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/taiste/django-phonenumber-field-8.0.0 branch from 5e53056 to 90832df Compare July 11, 2024 09:01
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.

None yet

0 participants