Skip to content

Commit

Permalink
Update minor versions of *many* dependencies. (#5521)
Browse files Browse the repository at this point in the history
* Update versions of *many* dependencies.

* Renumber change fragment

* Add change fragment specifically about Pillow

* Update changes/5521.dependencies

---------

Co-authored-by: Hanlin Miao <46973263+HanlinMiao@users.noreply.github.com>
  • Loading branch information
glennmatthews and HanlinMiao committed Apr 8, 2024
1 parent 7ffda93 commit 5622dbe
Show file tree
Hide file tree
Showing 28 changed files with 271 additions and 240 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
ports:
- "6379:6379"
selenium:
image: "selenium/standalone-firefox:4.17"
image: "selenium/standalone-firefox:4.19"
ports:
- "4444:4444"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ jobs:
ports:
- "6379:6379"
selenium:
image: "selenium/standalone-firefox:4.17"
image: "selenium/standalone-firefox:4.19"
ports:
- "4444:4444"
steps:
Expand Down
1 change: 1 addition & 0 deletions changes/5521.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated most dependencies to the latest versions available as of 2024-04-01.
1 change: 1 addition & 0 deletions changes/5521.security
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated `Pillow` dependency to `~10.3.0` to address `CVE-2024-28219`.
2 changes: 1 addition & 1 deletion development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ services:
env_file:
- ./dev.env
selenium:
image: selenium/standalone-firefox:4.17
image: selenium/standalone-firefox:4.19
ports:
- "4444:4444"
- "15900:5900"
Expand Down
1 change: 1 addition & 0 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nautobot development configuration file."""

import os

from nautobot.core.settings import * # noqa: F403 # undefined-local-with-import-star
Expand Down
1 change: 1 addition & 0 deletions examples/azure_ad/group_sync.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Additional functions to process an Azure user."""

import logging

from django.contrib.auth.models import Group
Expand Down
1 change: 1 addition & 0 deletions examples/example_app/example_app/signals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Signal handlers for the example_app."""

EXAMPLE_APP_CUSTOM_FIELD_DEFAULT = "Default value"
EXAMPLE_APP_CUSTOM_FIELD_NAME = "example_app_auto_custom_field" # Note underscores rather than dashes!

Expand Down
1 change: 1 addition & 0 deletions examples/okta/group_sync.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Additional functions to process an Okta user."""

import logging

from django.contrib.auth.models import Group
Expand Down
2 changes: 1 addition & 1 deletion examples/s3_static_files/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The [`django-storages`](https://django-storages.readthedocs.io/en/stable/) libra
In `nautobot_config.py` define the following configuration:

```python
STORAGE_BACKEND = "storages.backends.s3boto3.S3Boto3Storage"
STORAGE_BACKEND = "storages.backends.s3.S3Storage"

STORAGE_CONFIG = {
"AWS_ACCESS_KEY_ID": "...",
Expand Down
3 changes: 1 addition & 2 deletions nautobot/core/forms/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ def __iter__(self):
# ModelChoiceIterator.__iter__() yields a tuple of (value, label)
# using this approach first yield a tuple of (null(value), null_option(label))
yield "null", self.null_options
for item in super().__iter__():
yield item
yield from super().__iter__()

null_option = self.attrs.get("data-null-option")
self.choices = ModelChoiceIteratorWithNullOption(field=self.choices.field, null_option=null_option)
Expand Down
1 change: 1 addition & 0 deletions nautobot/core/graphql/schema.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Schema module for GraphQL."""

from collections import OrderedDict
import logging

Expand Down
1 change: 1 addition & 0 deletions nautobot/core/signals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Custom signals and handlers for the core Nautobot application."""

import contextlib
from functools import wraps
import inspect
Expand Down
2 changes: 1 addition & 1 deletion nautobot/core/templates/nautobot_config.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ INSTALLATION_METRICS_ENABLED = is_truthy(os.getenv("NAUTOBOT_INSTALLATION_METRIC
# class path of the storage driver in STORAGE_BACKEND and any configuration options in STORAGE_CONFIG.
# These default to None and {} respectively.
#
# STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage'
# STORAGE_BACKEND = 'storages.backends.s3.S3Storage'
# STORAGE_CONFIG = {
# 'AWS_ACCESS_KEY_ID': 'Key ID',
# 'AWS_SECRET_ACCESS_KEY': 'Secret',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def test_all_views_require_authentication(self):
url.startswith(path)
for path in [
"/complete/", # social auth
"/health/string/", # health-check
"/login/", # social auth
"/media/", # MEDIA_ROOT
"/plugins/example-app/docs/", # STATIC_ROOT
Expand Down
3 changes: 1 addition & 2 deletions nautobot/core/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def flatten_iterable(iterable):
"""
for i in iterable:
if hasattr(i, "__iter__") and not isinstance(i, str):
for j in flatten_iterable(i):
yield j
yield from flatten_iterable(i)
else:
yield i

Expand Down
2 changes: 1 addition & 1 deletion nautobot/dcim/tests/test_signals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Tests for DCIM Signals.py """
"""Tests for DCIM Signals.py"""

from django.test import TestCase

Expand Down
6 changes: 3 additions & 3 deletions nautobot/docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ markdown-data-tables==1.0.0
mkdocs==1.5.3
mkdocs-gen-files==0.5.0
mkdocs-macros-plugin==1.0.5
mkdocs-material==9.5.8
mkdocs-material==9.5.16
mkdocs-redirects==1.2.1
mkdocs-section-index==0.3.8
mkdocs-version-annotations==1.0.0
mkdocstrings==0.24.0
mkdocstrings-python==1.8.0
mkdocstrings==0.24.1
mkdocstrings-python==1.9.0
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The [`django-storages`](https://django-storages.readthedocs.io/en/stable/) libra
In `nautobot_config.py` define the following configuration:

```python
STORAGE_BACKEND = "storages.backends.s3boto3.S3Boto3Storage"
STORAGE_BACKEND = "storages.backends.s3.S3Storage"

STORAGE_CONFIG = {
"AWS_ACCESS_KEY_ID": "...",
Expand Down Expand Up @@ -113,9 +113,9 @@ For this example I created a simple python file called `customer_storage.py` in

```python
"""Example of a custom extension to support flexible s3 storage."""
from storages.backends.s3boto3 import S3Boto3Storage
from storages.backends.s3 import S3Storage

class MediaStorage(S3Boto3Storage):
class MediaStorage(S3Storage):
bucket_name = 'nautobot-sw-media'
location = "software_images" # store files under directory `software_images/` in bucket `nautobot-sw-media`
```
Expand Down
1 change: 1 addition & 0 deletions nautobot/extras/health_checks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Nautobot custom health checks."""

from typing import Optional
from urllib.parse import urlparse

Expand Down
1 change: 1 addition & 0 deletions nautobot/extras/jobs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Jobs functionality - consolidates and replaces legacy "custom scripts" and "reports" features."""

from collections import OrderedDict
import functools
import inspect
Expand Down
3 changes: 1 addition & 2 deletions nautobot/extras/managers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from celery import states
from django.utils import timezone
from django_celery_beat.managers import ExtendedManager
from django_celery_results.managers import TaskResultManager, transaction_retry

from nautobot.core.models import BaseManager
Expand Down Expand Up @@ -136,5 +135,5 @@ def store_result(
return obj


class ScheduledJobsManager(BaseManager.from_queryset(RestrictedQuerySet), ExtendedManager):
class ScheduledJobsManager(BaseManager.from_queryset(RestrictedQuerySet)):
pass
1 change: 1 addition & 0 deletions nautobot/extras/models/datasources.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models for representing external data sources."""

from importlib.util import find_spec
import os

Expand Down
1 change: 1 addition & 0 deletions nautobot/extras/models/mixins.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Class-modifying mixins that need to be standalone to avoid circular imports.
"""

from django.urls import NoReverseMatch, reverse

from nautobot.core.utils.lookup import get_route_for_model
Expand Down
3 changes: 1 addition & 2 deletions nautobot/extras/querysets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from django.core.cache import cache
from django.db.models import F, Model, OuterRef, Q, Subquery
from django.db.models.functions import JSONObject
from django_celery_beat.managers import ExtendedQuerySet

from nautobot.core.models.query_functions import EmptyGroupByJSONBAgg
from nautobot.core.models.querysets import RestrictedQuerySet
Expand Down Expand Up @@ -272,7 +271,7 @@ def get_for_class_path(self, class_path):
)


class ScheduledJobExtendedQuerySet(RestrictedQuerySet, ExtendedQuerySet):
class ScheduledJobExtendedQuerySet(RestrictedQuerySet):
"""
Base queryset used for the ScheduledJob class
"""
Expand Down
1 change: 1 addition & 0 deletions nautobot/extras/secrets/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Plugins may define and register additional providers in addition to these.
"""

import os

from django import forms
Expand Down

0 comments on commit 5622dbe

Please sign in to comment.