Skip to content

Commit

Permalink
Bump version and fix docs not running locally
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobichaud committed Nov 27, 2024
1 parent 975f62c commit 7efa248
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 8 deletions.
32 changes: 32 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,38 @@ Json file (\ ``logs/json.log``\ )
Upgrade Guide
=============

.. _upgrade_9.0:

Upgrading to 9.0+
^^^^^^^^^^^^^^^^^

Minimum requirements
~~~~~~~~~~~~~~~~~~~~
- requires python 3.9+
- django 4.2 and 5.1+ are supported


For ``drf-standardized-errors`` users
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Now unhandled exceptions when using `drf-standardized-errors <https://github.com/ghazi-git/drf-standardized-errors>`_ will be intercepted and the exception logged properly.

If you also use `structlog-sentry <https://github.com/kiwicom/structlog-sentry>`_, the exception will now be propagated as expected.

Other libraries alike may be affected by this change.

Internal changes in how ``RequestMiddleware`` handles exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This only affects you if you implemented a middleware inheriting from ``RequestMiddleware`` and you overrided the ``process_exception`` method.

Did you?

If so:

- ``RequestMiddleware.process_exception`` was renamed to ``RequestMiddleware._process_exception``, you should to the same in the middleware.


.. _upgrade_8.0:

Upgrading to 8.0+
Expand Down
2 changes: 1 addition & 1 deletion compose/local/docs/start
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -o nounset
# Basically we watch only README.rst, LICENCE.rst and everything under django_structlog
sphinx-autobuild docs /docs/_build/html \
-b ${SPHINX_COMMAND} \
--port 5000 \
--port 8080 \
--host 0.0.0.0 \
--watch . \
--ignore "*___jb_*" \
Expand Down
2 changes: 1 addition & 1 deletion django_structlog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

name = "django_structlog"

VERSION = (9, 0, 0, "dev2")
VERSION = (9, 0, 0)

__version__ = ".".join(str(v) for v in VERSION)
2 changes: 1 addition & 1 deletion docker-compose.docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
environment:
- SPHINX_COMMAND=html
ports:
- "5000:5000"
- "8080:8080"
docs-test:
image: django_structlog_demo_project_docs
volumes:
Expand Down
16 changes: 12 additions & 4 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
Change Log
==========

9.0.0 (TBD)
-----------
9.0.0 (November 26, 2024)
-------------------------

See: :ref:`upgrade_9.0`

*New:*
- Add type definitions for the project. See `#697 <https://github.com/jrobichaud/django-structlog/pull/697>`_ and `#696 <https://github.com/jrobichaud/django-structlog/issues/696>`_. Special thanks to `@j00bar <https://github.com/j00bar>`_
- Add type definitions for the project. See `#697 <https://github.com/jrobichaud/django-structlog/pull/697>`_ and `#696 <https://github.com/jrobichaud/django-structlog/issues/696>`_. Special thanks to `@j00bar <https://github.com/j00bar>`_.

*Changes:*
- ``RequestMiddleware`` now relies on django signal `got_request_exception <https://docs.djangoproject.com/en/dev/ref/signals/#got-request-exception>`_ instead of Middleware `process_exception <https://docs.djangoproject.com/en/dev/topics/http/middleware/#process-exception>`_ method. See `#705 <https://github.com/jrobichaud/django-structlog/pull/705>`_, `#658 <https://github.com/jrobichaud/django-structlog/issues/658>`_ and :ref:`upgrade_9.0`. Special thanks to `@sshishov <https://github.com/sshishov>`_.
- Add python 3.13 support. See `#674 <https://github.com/jrobichaud/django-structlog/pull/674>`_.
- Drop python 3.8 support. See `#674 <https://github.com/jrobichaud/django-structlog/pull/674>`_.
- Django 5.1 and celery 5.4 support. See `#617 <https://github.com/jrobichaud/django-structlog/pull/617>`_.

*Other:*
- Migrated project to use python 3.13 along with readthedocs generation.
- now use `isort <https://pycqa.github.io/isort/>`_
- fixed ``codecov`` github action that was not properly configured and therefore not properly reporting coverage.


8.1.0 (May 24, 2024)
--------------------

*New:*
- Add a :ref:`setting <settings>` ``DJANGO_STRUCTLOG_USER_ID_FIELD = 'pk'`` to customize what user field to use as ``user_id`` in the logs. `#546 <https://github.com/jrobichaud/django-structlog/pull/546>`_ and `#545 <https://github.com/jrobichaud/django-structlog/issues/545>`_. Special thanks to `@sshishov <https://github.com/ sshishov>`_.
- Add a :ref:`setting <settings>` ``DJANGO_STRUCTLOG_USER_ID_FIELD = 'pk'`` to customize what user field to use as ``user_id`` in the logs. See `#546 <https://github.com/jrobichaud/django-structlog/pull/546>`_ and `#545 <https://github.com/jrobichaud/django-structlog/issues/545>`_. Special thanks to `@sshishov <https://github.com/sshishov>`_.

*Changes:*
- Drop support of python 3.7
Expand Down
2 changes: 1 addition & 1 deletion docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ Building, Serving and Testing the Documentation Locally
.. code-block:: bash
$ docker compose -p django-structlog-docs -f docker-compose.docs.yml up --build
Serving on http://127.0.0.1:5000
Serving on http://127.0.0.1:8080

0 comments on commit 7efa248

Please sign in to comment.