From 7b1e07de9213c8657e44e4eb69390df3772b5cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= Date: Thu, 6 Mar 2025 23:48:20 +0200 Subject: [PATCH] Update mock import to work with Python 3.13 --- spacy/tests/doc/test_underscore.py | 2 +- spacy/tests/matcher/test_dependency_matcher.py | 2 +- spacy/tests/matcher/test_matcher_api.py | 2 +- spacy/tests/matcher/test_phrase_matcher.py | 2 +- spacy/tests/pipeline/test_analysis.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spacy/tests/doc/test_underscore.py b/spacy/tests/doc/test_underscore.py index b79d2f01f..6f7a83657 100644 --- a/spacy/tests/doc/test_underscore.py +++ b/spacy/tests/doc/test_underscore.py @@ -1,5 +1,5 @@ import pytest -from mock import Mock +from unittest.mock import Mock from spacy.tokens import Doc, Span, Token from spacy.tokens.underscore import Underscore diff --git a/spacy/tests/matcher/test_dependency_matcher.py b/spacy/tests/matcher/test_dependency_matcher.py index be33f90cf..d8f337e5c 100644 --- a/spacy/tests/matcher/test_dependency_matcher.py +++ b/spacy/tests/matcher/test_dependency_matcher.py @@ -3,7 +3,7 @@ import pickle import re import pytest -from mock import Mock +from unittest.mock import Mock from spacy.matcher import DependencyMatcher from spacy.tokens import Doc, Token diff --git a/spacy/tests/matcher/test_matcher_api.py b/spacy/tests/matcher/test_matcher_api.py index c824ca392..9e3b618da 100644 --- a/spacy/tests/matcher/test_matcher_api.py +++ b/spacy/tests/matcher/test_matcher_api.py @@ -1,5 +1,5 @@ import pytest -from mock import Mock +from unittest.mock import Mock from spacy.matcher import Matcher from spacy.tokens import Doc, Span, Token diff --git a/spacy/tests/matcher/test_phrase_matcher.py b/spacy/tests/matcher/test_phrase_matcher.py index 7335bbdf1..04b0bfaf7 100644 --- a/spacy/tests/matcher/test_phrase_matcher.py +++ b/spacy/tests/matcher/test_phrase_matcher.py @@ -2,7 +2,7 @@ import warnings import pytest import srsly -from mock import Mock +from unittest.mock import Mock from spacy.lang.en import English from spacy.matcher import Matcher, PhraseMatcher diff --git a/spacy/tests/pipeline/test_analysis.py b/spacy/tests/pipeline/test_analysis.py index 503b501ce..f3fd1b203 100644 --- a/spacy/tests/pipeline/test_analysis.py +++ b/spacy/tests/pipeline/test_analysis.py @@ -1,5 +1,5 @@ import pytest -from mock import Mock +from unittest.mock import Mock from spacy.language import Language from spacy.pipe_analysis import get_attr_info, validate_attrs