diff --git a/poetry.lock b/poetry.lock index 59abf51b..328c419f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3735,4 +3735,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8,<4.0" -content-hash = "85bb7967bbd2a534d87d530fa0ef62ade69a4b8f539c2c0c85970d09fc2fc94b" +content-hash = "d275d944145b48ee56866078eeb57829ed6a69e572a93cbe2653f12a2fde700e" diff --git a/pyproject.toml b/pyproject.toml index e7851f63..f54752aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,16 +64,17 @@ pandas = [ { version = "<=2.0.3", python = "<3.9" }, { version = ">=2.1.1", python = ">=3.12" }, ] -# minimum 8.2.0 to use post-copy mesages -copier = ">=8.2.0" +# minimum 9.2.0 because of breaking dependency changes and changes to validation errors +copier = ">=9.2.0" jinja2-time = ">=0.2.0" # minimum 2.31.0 because of security vulnerability requests = ">=2.31.0" ruamel-yaml = ">=0.17.2" lazy-loader = ">=0.3" # Docutils is a requirement of snakemake, for snakebids otherwise it is merely a doc -# dependency. Can't do 0.21 with poetry because of https://github.com/python-poetry/poetry/issues/9293 -docutils = "!=0.21.1" +# dependency. 0.21.post1 needs to be excluded because of +# https://github.com/python-poetry/poetry/issues/9293 +docutils = "!=0.21.post1" [tool.poetry.group.dev.dependencies] pytest = "^7.0.0" diff --git a/snakebids/tests/test_template.py b/snakebids/tests/test_template.py index 193354a4..82f08001 100644 --- a/snakebids/tests/test_template.py +++ b/snakebids/tests/test_template.py @@ -11,7 +11,6 @@ import copier import more_itertools as itx import pathvalidate -import prompt_toolkit.validation import pytest import requests_mock from hypothesis import HealthCheck, assume, given, settings @@ -98,7 +97,7 @@ def invalid_emails(): def test_invalid_email_raises_error(email: str, tmp_path: Path): data = get_empty_data("testapp", "setuptools") data["email"] = email - with pytest.raises(prompt_toolkit.validation.ValidationError): + with pytest.raises(ValueError, match="Must be a valid email"): copier.run_copy( str(Path(itx.first(snakebids.__path__), "project_template")), tmp_path / data["app_full_name"], @@ -184,7 +183,7 @@ def test_gets_correct_snakebids_version( @allow_function_scoped def test_invalid_app_name_raises_error(name: str, tmp_path: Path): data = get_empty_data(name, "setuptools") - with pytest.raises(prompt_toolkit.validation.ValidationError): + with pytest.raises(ValueError, match="Name must be a valid"): copier.run_copy( str(Path(itx.first(snakebids.__path__), "project_template")), tmp_path / data["app_full_name"], diff --git a/typings/importlib_metadata/__init__.pyi b/typings/importlib_metadata/__init__.pyi deleted file mode 100644 index 9fcb412e..00000000 --- a/typings/importlib_metadata/__init__.pyi +++ /dev/null @@ -1,15 +0,0 @@ -def version(distribution_name: str) -> str: - """Get the version string for the named package. - - :param distribution_name: The name of the distribution package to query. - :return: The version string for the package as defined in the package's - "Version" metadata key. - """ - ... - -class PackageNotFoundError(ModuleNotFoundError): - """The package was not found.""" - - def __str__(self) -> str: ... - @property - def name(self) -> str: ...