Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.10.1
current_version = 1.10.2
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion nwastdlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
"""The NWA-stdlib module."""

__version__ = "1.10.1"
__version__ = "1.10.2"

from nwastdlib.f import const, identity

Expand Down
2 changes: 1 addition & 1 deletion nwastdlib/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def make_args(func_args: Iterable | object) -> Iterable:
return func_args

limiter = CapacityLimiter(limit)
tasks = [to_thread.run_sync(function, *make_args(arg), limiter=limiter) for arg in args] # type: ignore
tasks = [to_thread.run_sync(function, *make_args(arg), limiter=limiter) for arg in args]
return await asyncio.gather(*tasks, return_exceptions=return_exceptions)


Expand Down
10 changes: 10 additions & 0 deletions nwastdlib/graphql/extensions/deprecation_checker_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ def get_root_path(path: Path) -> Path:


def get_field_deprecation(info: GraphQLResolveInfo) -> str | None:
if not hasattr(info.context, "__field_deprecations_checked__"):
info.context.__field_deprecations_checked__ = set()

field_tuple = (info.parent_type.name, info.field_name)
if field_tuple in info.context.__field_deprecations_checked__:
# Prevent checking the same field twice, i.e. in lists
return None

info.context.__field_deprecations_checked__.add(field_tuple)

field = info.parent_type.fields.get(info.field_name)
if isinstance(field, GraphQLField):
return field.deprecation_reason
Expand Down