Skip to content

Commit

Permalink
fix: ParamSpec introduced in 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jorwoods committed Aug 24, 2024
1 parent 01b171e commit a5f1018
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion tableauserverclient/server/request_factory.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import xml.etree.ElementTree as ET
from typing import Any, Callable, Dict, Iterable, List, Optional, ParamSpec, Set, Tuple, TypeVar, TYPE_CHECKING, Union
from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, TypeVar, TYPE_CHECKING, Union

from typing_extensions import ParamSpec

from requests.packages.urllib3.fields import RequestField
from requests.packages.urllib3.filepost import encode_multipart_formdata
Expand Down
4 changes: 2 additions & 2 deletions test/test_tagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def test_delete_tags(get_server, endpoint_type, item, tags) -> None:
urls = {r.url.split("/")[-1] for r in history}
assert urls == tag_set


@pytest.mark.parametrize("endpoint_type, item", *sample_taggable_items)
@pytest.mark.parametrize("tags", sample_tags)
def test_update_tags(get_server, endpoint_type, item, tags) -> None:
Expand All @@ -163,7 +164,7 @@ def test_update_tags(get_server, endpoint_type, item, tags) -> None:
tags = set([tags] if isinstance(tags, str) else tags)
with ExitStack() as stack:
if hasattr(item, "_initial_tags"):
initial_tags = set(['x','y','z'])
initial_tags = set(["x", "y", "z"])
item._initial_tags = initial_tags
add_tags_xml = add_tag_xml_response_factory(tags - initial_tags)
delete_tags_xml = add_tag_xml_response_factory(initial_tags - tags)
Expand All @@ -186,7 +187,6 @@ def test_update_tags(get_server, endpoint_type, item, tags) -> None:
else:
stack.enter_context(pytest.raises(NotImplementedError))


endpoint.update_tags(item)


Expand Down

0 comments on commit a5f1018

Please sign in to comment.