|
28 | 28 | A type variable with lower bound :class:`Taggable`. |
29 | 29 | """ |
30 | 30 |
|
31 | | -import sys |
32 | 31 | from dataclasses import dataclass |
33 | 32 | from typing import ( # noqa: F401 |
34 | 33 | Any, FrozenSet, Iterable, Set, Tuple, Type, TypeVar, Union) |
@@ -378,23 +377,18 @@ class IgnoredForEqualityTag(Tag): |
378 | 377 | } |
379 | 378 |
|
380 | 379 |
|
381 | | -if sys.version_info >= (3, 7): |
382 | | - def __getattr__(name): |
383 | | - replacement_and_obj = _depr_name_to_replacement_and_obj.get(name, None) |
384 | | - if replacement_and_obj is not None: |
385 | | - replacement, obj, year = replacement_and_obj |
386 | | - from warnings import warn |
387 | | - warn(f"'arraycontext.{name}' is deprecated. " |
388 | | - f"Use '{replacement}' instead. " |
389 | | - f"'arraycontext.{name}' will continue to work until {year}.", |
390 | | - DeprecationWarning, stacklevel=2) |
391 | | - return obj |
392 | | - else: |
393 | | - raise AttributeError(name) |
394 | | -else: |
395 | | - TagsType = FrozenSet[Tag] |
396 | | - TagOrIterableType = ToTagSetConvertible |
397 | | - T_co = TypeVar("TaggableT", bound="Taggable") |
| 380 | +def __getattr__(name): |
| 381 | + replacement_and_obj = _depr_name_to_replacement_and_obj.get(name, None) |
| 382 | + if replacement_and_obj is not None: |
| 383 | + replacement, obj, year = replacement_and_obj |
| 384 | + from warnings import warn |
| 385 | + warn(f"'pytools.tag.{name}' is deprecated. " |
| 386 | + f"Use '{replacement}' instead. " |
| 387 | + f"'pytools.tag.{name}' will continue to work until {year}.", |
| 388 | + DeprecationWarning, stacklevel=2) |
| 389 | + return obj |
| 390 | + else: |
| 391 | + raise AttributeError(name) |
398 | 392 |
|
399 | 393 | # }}} |
400 | 394 |
|
|
0 commit comments