.. default-intersphinx:: django3.2 djblets4.x


================================
Djblets 4.0 Beta 3 Release Notes
================================

**Release date**: August 30, 2023

This release contains all bug fixes and features found in Djblets version
:doc:`3.3 <3.3>` and :doc:`4.0 beta 2 <4.0-beta-2>`.


Installation
============

To install this release, run the following:

.. code-block:: console

    $ sudo pip3 install \
        -f https://downloads.reviewboard.org/betas/reviewboard/6.0-beta-3/ \
        --pre -U Djblets


We **do not** recommend upgrading a production server with this version of
Djblets. This version is still in development, and is not guaranteed to have
API stability.

To learn more, see:

* `Documentation <https://www.reviewboard.org/docs/djblets/dev/>`_
* `Djblets on PyPI <https://pypi.org/project/Djblets/>`_
* `Djblets on GitHub <https://github.com/djblets/djblets/>`_


Packaging
=========

* Djblets 4.x supports Python 3.8 - 3.11.

  Support for Python 3.7 has been dropped.

* :pypi:`Django` 3.2.x is required.

* :pypi:`cryptography` 1.8.1+ is required.

* :pypi:`django-pipeline` 2.0.9 - 2.0.x is required.

* :pypi:`markdown` 3.3.x is required.

* :pypi:`packaging` 23.1 or higher is required.

* :pypi:`importlib-metadata` 6.6 or higher is required.

* :pypi:`importlib-resources` 5.9 or higher is required.


For building packages, Node.JS packages have now been consolidated as
dependencies under a new utility package. All Node.JS dependencies are now
listed in :file:`package.json` instead of :file:`djblets/dependencies.py`.

* :npm:`@beanbag/frontend-buildkit` 1.1.0 - 1.1.x


djblets.configforms
===================

* Added Python type hints throughout some of the module.

  The full port to Python type hints is still in-progress.

* Updated the Config Forms JavaScript support to use Spina_ and TypeScript_.

  This enables code working with Config Forms to use Spina and TypeScript
  when interfacing with or subclassing these components.


.. _Spina: https://www.npmjs.com/package/@beanbag/spina
.. _TypeScript: https://www.typescriptlang.org/


djblets.extensions
==================

* Added Python type hints throughout most of the module.

  The full port to Python type hints is still in-progress.

* Updated to use modern Python packaging modules for extensions instead of
  legacy modules.

  Our packaging and package loading code for extensions now use the modern
  :pypi:`importlib_metadata`, :pypi:`importlib_resources`, and
  :pypi:`packaging` modules instead of the deprecated :py:mod:`pkg_resources`.

  While this shouldn't impact any extensions, this is a large change. If your
  extension package no longer works, please let us know.

* Updated the JavaScript extension support to use Spina_ and TypeScript_.

  This enables extension code to be written using these toolkits. This is
  backwards-compatible with older extensions.


djblets.mail
============

* Added Python type hints throughout the module.

* Added a ``reply_to`` argument to
  :py:class:`~djblets.mail.message.EmailMessage`.

* Updated to use modern Python packaging modules for loading DMARC-related
  data.

* Deprecated positional arguments and the ``enable_smart_spoofing`` argument
  in :py:class:`~djblets.mail.message.EmailMessage`.


djblets.registries
==================

* Updated to use modern Python packaging modules for loading Python
  entrypoint-backed registries.


djblets.util
============

* Added :py:func:`djblets.util.filesystem.safe_join` for joining filesystem
  path components without risk of escaping a confined top-level directory.

* Added :py:mod:`djblets.util.functional`, providing:

  * :py:func:`~djblets.util.functional.iterable_len`: Efficiently computes
    the length of a finite iterable.

  * :py:func:`~djblets.util.functional.lazy_re_compile`: Lazily compiles
    a regex on first access, to help reduce module/class load times.

* Improved Python type hints for the :py:data:`djblets.util.symbols.UNSET`
  symbol.

  This will now be correctly type-narrowed when compared against a value.


JavaScript
==========

* Fixed ``$.ui.modalBox`` button placement to factor in the padding around the
  box.


Contributors
============

* Christian Hammond
* David Trowbridge
* Michelle Aubin
