From e2cf24f375981d072285724e0b441090c73ee3d3 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 12 Oct 2022 19:12:34 +1100 Subject: [PATCH] Use contextlib in test_profile_parser (#590) * Use contextlib in test_profile_parser Since the project no longer declares a requirement of contextlib2, and the lowest version of Python supported is 3.7, we should remove the use of contextlib2. Switch the import to contextlib. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- project/tests/test_profile_parser.py | 2 +- requirements.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/project/tests/test_profile_parser.py b/project/tests/test_profile_parser.py index eebeb827..3f9c9ef2 100644 --- a/project/tests/test_profile_parser.py +++ b/project/tests/test_profile_parser.py @@ -1,8 +1,8 @@ +import contextlib import cProfile import io import re -import contextlib2 as contextlib from django.test import TestCase from silk.utils.profile_parser import parse_profile diff --git a/requirements.txt b/requirements.txt index 6b893497..a38a50ad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -contextlib2==21.6.0 coverage==6.3.2 factory-boy==3.2.1 freezegun==1.1.0