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 django-phonenumber-field to 7.3.0 #1327

Closed

Conversation

pyup-bot
Copy link
Collaborator

This PR updates django-phonenumber-field from 2.0.0 to 7.3.0.

Changelog

6.1.0

------------------
* Make ``formfields.PhoneNumberField`` honor ``PHONENUMBER_DEFAULT_REGION``
* Use ``PHONENUMBER_DEFAULT_REGION`` for example phone number in form field errors.
* Add support for Django 4.0
* Add Persian (farsi) translations.
* Update uk_AR translations

**Backwards incompatible changes**

* Drop support for Python 3.6

6.0.0

------------------

* Add support for Python 3.10
* Update Czech, Dutch and pt_BR translations

**Backwards incompatible changes**

* ``formfields.PhoneNumberField`` with a ``region`` now display national phone
numbers in the national format instead of ``PHONENUMBER_DEFAULT_FORMAT``.
International numbers are displayed in the ``PHONENUMBER_DEFAULT_FORMAT``.

5.2.0

------------------

* Lazy load ``formfields.PhoneNumberField`` translation for ``invalid`` data.
* Update Russian translations

**Backwards incompatible changes**

* Drop support for end-of-life Django 3.0

5.1.0

------------------

* Allow sorting ``PhoneNumber``\ s from Python
* Add support for Python 3.9 and Django 3.2
* Add Argentinian, Bulgarian, Indonesian, Ukrainian translations
* Update Esperanto and European Spanish translations

**Backwards incompatible changes**

* Drop support for Python 3.5

5.0.0

------------------

* Add support for Django 3.1.
* Fix rendering ``PhonePrefixSelect`` with ``initial`` passed to the
constructor.
* The Babel dependency is now optional.
* Switched to setuptools declarative configuration for packaging and
installation.
* Add Arabic and Russian translation.
* Correct License information in package metadata.

**Backwards incompatible changes**

* Drop support for end-of-life Django 1.11 and 2.1.
* As the Babel dependency is now optional, you must now install it to use
``PhoneNumberPrefixWidget``. If you do not install it, an
``ImproperlyConfigured`` exception will be raised when instantiated.

4.0.0

------------------

The big version bump is due to the change in how invalid phone numbers are handled.
Starting with ``2.4.0`` we added very aggressive validation, which raised ``ValueError``
for invalid numbers. This caused problems in unexpected places (like when filtering a
queryset). Starting with ``4.0.0`` we acknowledge that we can not completely prevent
invalid numbers from entering the system. Changes directly to the database, validation
changes in the upstream phonenumbers library, changes in the django settings may all
lead to invalid numbers in the database. Now it is possible to save an invalid number
to the database and ``__str__`` and ``__repr__`` clearly indicate invalid numbers.

* Don’t raise ``ValueError`` on invalid phone numbers - ``__str__`` and ``__repr__``
updated to report invalid phone numbers correctly if detected.
* Various translation updates

3.0.1

------------------

* Allow overriding the default invalid phone number message.

3.0.0

------------------

* Update French and Hebrew translations.
* Add a valid phone number example to invalid phone number error messages.

**Backwards incompatible changes**

* Drop support for Django 2.0.
* Drop support for Python 2.7 and 3.4.

2.4.0

------------------

* A ``PhoneNumberField`` can now be deferred with ``QuerySet.defer()``.
* Saving or filtering by an invalid phone number will now raise a
``ValueError``.
* The model field attribute ``PhoneNumberField.region`` now uses
``PHONENUMBER_DEFAULT_REGION`` if not specified.

2.3.1

------------------

* Fixed a regression to re-allow the model field to override the default form
field.

2.3.0

------------------

* Added the ``region`` keyword argument to ``PhoneNumberField``.
* Fix representation of invalid phone numbers in the database, previously
stored as ``+NoneNone``. Now, invalid phone numbers are represented as:

1. the field's `default`_ when it is specified, or
2. empty ``str`` if the field is `blank`_ and not `null`_, or
3. null.

Existing database records can be upgraded with a `data migration`_.
* Added support for Django 2.2.
* Tests are now included in the sdist package.
* ``modelfields.PhoneNumberField`` now inherits from ``models.CharField``
instead of ``models.Field``.

.. _default: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.default
.. _blank: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.blank
.. _null: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.null
.. _data migration: https://docs.djangoproject.com/en/dev/topics/migrations/#data-migrations

2.2.0

------------------

* Added support for ``null=True``

2.1.0

------------------

* Removed hardcoded dependency to phonenumbers library. Now developers have to
manually install either phonenumbers or phonenumberslite.
* Added Romanian locale
* Added Bangla locale
* Update French locale
* Update Italian locale

2.0.1

------------------

* Statically depend on phonenumbers
Previously the phonenumberslight dependency was used dynamically in setup.py
if it already was installed, causing problems with building wheels and
with pipenv.
* Added Ukrainian locale
* Added Simplified Chinese locale
Links

@pyup-bot
Copy link
Collaborator Author

Closing this in favor of #1401

@pyup-bot pyup-bot closed this Jun 24, 2024
@iesteban iesteban deleted the pyup-update-django-phonenumber-field-2.0.0-to-7.3.0 branch June 24, 2024 15:51
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.

1 participant