From 1c983eb15e23bd85723a8b3e379af37509d824c7 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Wed, 31 Mar 2021 06:49:38 -0700 Subject: [PATCH 001/108] wip --- Lib/enum.py | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++- Lib/re.py | 6 ++-- 2 files changed, 98 insertions(+), 3 deletions(-) diff --git a/Lib/enum.py b/Lib/enum.py index f31779baa0d65a..e6ab45143fea4f 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -10,6 +10,7 @@ 'property', 'FlagBoundary', 'STRICT', 'CONFORM', 'EJECT', 'KEEP', 'global_flag_repr', 'global_enum_repr', 'global_enum', + 'simple_enum', ] @@ -390,13 +391,16 @@ def __prepare__(metacls, cls, bases, **kwds): ) return enum_dict - def __new__(metacls, cls, bases, classdict, boundary=None, **kwds): + def __new__(metacls, cls, bases, classdict, boundary=None, _simple=False, **kwds): # an Enum class is final once enumeration items have been defined; it # cannot be mixed with other types (int, float, etc.) if it has an # inherited __new__ unless a new __new__ is defined (or the resulting # class will fail). # # remove any keys listed in _ignore_ + if _simple: + # print('classdict:', classdict) + return super().__new__(metacls, cls, bases, classdict, **kwds) classdict.setdefault('_ignore_', []).append('_ignore_') ignore = classdict['_ignore_'] for key in ignore: @@ -1375,3 +1379,92 @@ def global_enum(cls): cls.__repr__ = global_enum_repr sys.modules[cls.__module__].__dict__.update(cls.__members__) return cls + +def simple_enum(etype=Enum, boundary=None): + """ + Directly converts a class into an Enum, bypassing all safety checks, etc. + """ + def convert_class(cls): + cls_name = cls.__name__ + attrs = {} + body = {} + body['_new_member_'] = new_member = etype._new_member_ + print('new is %r' % (new_member, )) + body['_use_args_'] = use_args = etype._use_args_ + body['_member_names_'] = member_names = [] + body['_member_map_'] = member_map = {} + body['_value2member_map_'] = value2member_map = {} + body['_member_type_'] = etype._member_type_ + if issubclass(etype, Flag): + body['_boundary_'] = boundary or etype._boundary_ + body['_flag_mask_'] = None + body['_all_bits_'] = None + body['_inverted_'] = None + for name, obj in cls.__dict__.items(): + if _is_dunder(name) or _is_private(cls_name, name) or _is_sunder(name) or _is_descriptor(obj): + body[name] = obj + else: + attrs[name] = obj + # + # double check that repr and friends are not the mixin's or various + # things break (such as pickle) + # however, if the method is defined in the Enum itself, don't replace + # it + for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): + if name not in body: + body[name] = getattr(etype, name) + enum_cls = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) + if issubclass(enum_cls, Flag): + # Flag / IntFlag + flag_mask = 0 + for order, (name, value) in enumerate(attrs.items()): + flag_mask |= value + if value in value2member_map: + # an alias to an existing member + member_map[name] = value2member_map[value] + else: + # create the member + if use_args: + member = new_member(enum_cls, value) + else: + member = new_member(enum_cls) + member._value_ = value + member._name_ = name + member._sort_order_ = order + member.__objclass__ = enum_cls + member_map[name] = member + value2member_map[value] = member + if _is_single_bit(value): + # not a multi-bit alias, record in _member_names_ + member_names.append(name) + flag_mask |= value + enum_cls._flag_mask_ = flag_mask + enum_cls._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 + # set correct __iter__ + member_list = [m._value_ for m in enum_class] + if member_list != sorted(member_list): + enum_class._iter_member_ = enum_class._iter_member_by_def_ + else: + # Enum / IntEnum / StrEnum + for name, value in attrs.items(): + if value in value2member_map: + # an alias to an existing member + member_map[name] = value2member_map[value] + else: + # create the member + if use_args: + member = new_member(enum_cls, value) + else: + member = new_member(enum_cls) + member._value_ = value + member._name_ = name + member._sort_order_ = order + member.__objclass__ = enum_cls + member_map[name] = member + value2member_map[value] = member + member_names.append(name) + if '__new__' in body: + enum_cls.__new_member__ = __new__ + enum_cls.__new__ = Enum.__new__ + return enum_cls + return convert_class diff --git a/Lib/re.py b/Lib/re.py index 5e40c7b9bb17d8..697db86757d8fc 100644 --- a/Lib/re.py +++ b/Lib/re.py @@ -142,8 +142,10 @@ __version__ = "2.2.1" -@enum.global_enum -class RegexFlag(enum.IntFlag, boundary=enum.KEEP): +@enum.simple_enum(enum.IntFlag, boundary=enum.KEEP) + +# class RegexFlag(enum.IntFlag, boundary=enum.KEEP): +class RegexFlag: ASCII = A = sre_compile.SRE_FLAG_ASCII # assume ascii "locale" IGNORECASE = I = sre_compile.SRE_FLAG_IGNORECASE # ignore case LOCALE = L = sre_compile.SRE_FLAG_LOCALE # assume current 8-bit locale From dc8173212e885e12f95419dda745df1a96cddeaf Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Wed, 31 Mar 2021 20:04:09 -0700 Subject: [PATCH 002/108] wip --- Lib/enum.py | 62 ++++++++++++++++++++++++++++++++++++----------------- Lib/re.py | 3 +-- 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/Lib/enum.py b/Lib/enum.py index e6ab45143fea4f..bfff0665628b27 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -399,7 +399,6 @@ def __new__(metacls, cls, bases, classdict, boundary=None, _simple=False, **kwds # # remove any keys listed in _ignore_ if _simple: - # print('classdict:', classdict) return super().__new__(metacls, cls, bases, classdict, **kwds) classdict.setdefault('_ignore_', []).append('_ignore_') ignore = classdict['_ignore_'] @@ -1388,19 +1387,20 @@ def convert_class(cls): cls_name = cls.__name__ attrs = {} body = {} - body['_new_member_'] = new_member = etype._new_member_ - print('new is %r' % (new_member, )) + body['_new_member_'] = new_member = etype._member_type_.__new__ body['_use_args_'] = use_args = etype._use_args_ body['_member_names_'] = member_names = [] body['_member_map_'] = member_map = {} body['_value2member_map_'] = value2member_map = {} - body['_member_type_'] = etype._member_type_ + body['_member_type_'] = member_type = etype._member_type_ if issubclass(etype, Flag): body['_boundary_'] = boundary or etype._boundary_ body['_flag_mask_'] = None body['_all_bits_'] = None body['_inverted_'] = None for name, obj in cls.__dict__.items(): + if name in ('__dict__', '__weakref__'): + continue if _is_dunder(name) or _is_private(cls_name, name) or _is_sunder(name) or _is_descriptor(obj): body[name] = obj else: @@ -1410,61 +1410,83 @@ def convert_class(cls): # things break (such as pickle) # however, if the method is defined in the Enum itself, don't replace # it + # for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): + # if name not in body: + # body[name] = getattr(etype, name) + enum_class = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): - if name not in body: - body[name] = getattr(etype, name) - enum_cls = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) - if issubclass(enum_cls, Flag): + if name in body: + continue + class_method = getattr(enum_class, name) + obj_method = getattr(member_type, name, None) + enum_method = getattr(etype, name, None) + if obj_method is not None and obj_method is class_method: + setattr(enum_class, name, enum_method) + if issubclass(enum_class, Flag): # Flag / IntFlag flag_mask = 0 for order, (name, value) in enumerate(attrs.items()): flag_mask |= value if value in value2member_map: # an alias to an existing member + redirect = property() + redirect.__set_name__(enum_class, name) + setattr(enum_class, name, redirect) member_map[name] = value2member_map[value] else: # create the member if use_args: - member = new_member(enum_cls, value) + member = new_member(enum_class, value) else: - member = new_member(enum_cls) + member = new_member(enum_class) member._value_ = value member._name_ = name + member.__objclass__ = enum_class + member.__init__(value) member._sort_order_ = order - member.__objclass__ = enum_cls + redirect = property() + redirect.__set_name__(enum_class, name) + setattr(enum_class, name, redirect) member_map[name] = member value2member_map[value] = member if _is_single_bit(value): # not a multi-bit alias, record in _member_names_ member_names.append(name) flag_mask |= value - enum_cls._flag_mask_ = flag_mask - enum_cls._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 + enum_class._flag_mask_ = flag_mask + enum_class._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 # set correct __iter__ member_list = [m._value_ for m in enum_class] if member_list != sorted(member_list): enum_class._iter_member_ = enum_class._iter_member_by_def_ else: # Enum / IntEnum / StrEnum - for name, value in attrs.items(): + for order, (name, value) in enumerate(attrs.items()): if value in value2member_map: # an alias to an existing member member_map[name] = value2member_map[value] + redirect = property() + redirect.__set_name__(enum_class, name) + setattr(enum_class, name, redirect) else: # create the member if use_args: - member = new_member(enum_cls, value) + member = new_member(enum_class, value) else: - member = new_member(enum_cls) + member = new_member(enum_class) member._value_ = value member._name_ = name + member.__objclass__ = enum_class + member.__init__(value) member._sort_order_ = order - member.__objclass__ = enum_cls + redirect = property() + redirect.__set_name__(enum_class, name) + setattr(enum_class, name, redirect) member_map[name] = member value2member_map[value] = member member_names.append(name) if '__new__' in body: - enum_cls.__new_member__ = __new__ - enum_cls.__new__ = Enum.__new__ - return enum_cls + enum_class.__new_member__ = enum_class.__new__ + enum_class.__new__ = Enum.__new__ + return enum_class return convert_class diff --git a/Lib/re.py b/Lib/re.py index 697db86757d8fc..b7427e77daf626 100644 --- a/Lib/re.py +++ b/Lib/re.py @@ -142,9 +142,8 @@ __version__ = "2.2.1" +@enum.global_enum @enum.simple_enum(enum.IntFlag, boundary=enum.KEEP) - -# class RegexFlag(enum.IntFlag, boundary=enum.KEEP): class RegexFlag: ASCII = A = sre_compile.SRE_FLAG_ASCII # assume ascii "locale" IGNORECASE = I = sre_compile.SRE_FLAG_IGNORECASE # ignore case From 8d5a199881bcf7cfa8e50ac61c9ef5e89333bf4b Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 8 Apr 2021 12:05:47 -0700 Subject: [PATCH 003/108] add simple_enum and test_simple_enum --- Doc/library/enum.rst | 39 ++++ Lib/ast.py | 5 +- Lib/enum.py | 208 ++++++++++++++++-- Lib/http/__init__.py | 6 +- Lib/pstats.py | 5 +- Lib/ssl.py | 13 +- Lib/test/test_ast.py | 30 +++ Lib/test/test_httplib.py | 145 ++++++++++++ Lib/test/test_pstats.py | 20 ++ Lib/test/test_ssl.py | 104 ++++++++- Lib/test/test_unicode.py | 9 +- Lib/test/test_uuid.py | 8 + Lib/tkinter/__init__.py | 5 +- Lib/tkinter/test/test_tkinter/test_misc.py | 44 ++++ Lib/uuid.py | 5 +- .../2021-04-08-11-47-31.bpo-38659.r_HFnU.rst | 4 + 16 files changed, 612 insertions(+), 38 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-08-11-47-31.bpo-38659.r_HFnU.rst diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index bc88303b789dea..494171e2f75386 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -117,6 +117,19 @@ Module Contents Enum class decorator that ensures only one name is bound to any one value. + :func:`simple_enum` + + Class decorator that converts a normal class into an :class:`Enum`. No + safety checks are done, and some advanced behavior (such as + :func:`__init_subclass__`) is not available. Enum creation can be faster + using :func:`simple_enum`. + + :func:`test_simple_enum` + + Function that can be used to test an enum created with + :func:`simple_enum` with the corresponding :class:`Enum`-subclassed + version. + .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` .. versionadded:: 3.10 ``StrEnum`` @@ -622,3 +635,29 @@ Utilites and Decorators ... ValueError: duplicate values found in : FOUR -> THREE +.. decorator:: simple_enum + + A :keyword:`class` decorator that converts a normal class into an enum:: + + >>> from enum import Enum, simple_enum + >>> @simple_enum(Enum): + ... class Color: + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> Color + + +.. function:: test_simple_enum + + A function that can be used to test an enum created with :func:`simple_enum` + against the version created by subclassing :class:`Enum`:: + + >>> from enum import Enum, test_simple_enum + >>> class CheckedColor(Enum): + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> test_simple_enum(CheckedColor, Color) + + If differences are found, a :exc:`ValueError` is raised. diff --git a/Lib/ast.py b/Lib/ast.py index e46ab43d5cfd30..ac4fc074961736 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -27,7 +27,7 @@ import sys from _ast import * from contextlib import contextmanager, nullcontext -from enum import IntEnum, auto +from enum import IntEnum, auto, simple_enum def parse(source, filename='', mode='exec', *, @@ -636,7 +636,8 @@ class Param(expr_context): # We unparse those infinities to INFSTR. _INFSTR = "1e" + repr(sys.float_info.max_10_exp + 1) -class _Precedence(IntEnum): +@simple_enum(IntEnum) +class _Precedence: """Precedence table that originated from python grammar.""" TUPLE = auto() diff --git a/Lib/enum.py b/Lib/enum.py index bfff0665628b27..2f5fc44a5ca20d 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -10,7 +10,7 @@ 'property', 'FlagBoundary', 'STRICT', 'CONFORM', 'EJECT', 'KEEP', 'global_flag_repr', 'global_enum_repr', 'global_enum', - 'simple_enum', + 'simple_enum', 'test_simple_enum', ] @@ -697,7 +697,7 @@ def __setattr__(cls, name, value): """ member_map = cls.__dict__.get('_member_map_', {}) if name in member_map: - raise AttributeError('Cannot reassign members.') + raise AttributeError('Cannot reassign member %r.' % (name, )) super().__setattr__(name, value) def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, start=1, boundary=None): @@ -785,6 +785,42 @@ def _convert_(cls, name, module, filter, source=None, boundary=None): module_globals[name] = cls return cls + def _convert_new_(cls, name, module, filter, source=None, boundary=None): + """ + Create a new Enum subclass that replaces a collection of global constants + """ + # convert all constants from source (or module) that pass filter() to + # a new Enum called name, and export the enum and its members back to + # module; + # also, replace the __reduce_ex__ method so unpickling works in + # previous Python versions + module_globals = sys.modules[module].__dict__ + if source: + source = source.__dict__ + else: + source = module_globals + # _value2member_map_ is populated in the same order every time + # for a consistent reverse mapping of number to name when there + # are multiple names for the same number. + members = [ + (name, value) + for name, value in source.items() + if filter(name)] + try: + # sort by value + members.sort(key=lambda t: (t[1], t[0])) + except TypeError: + # unless some values aren't comparable, in which case sort by name + members.sort(key=lambda t: t[0]) + body = {t[0]: t[1] for t in members} + body['__module__'] = module + tmp_cls = type(name, (object, ), body) + cls = simple_enum(etype=cls, boundary=boundary)(tmp_cls) + # cls = cls(name, members, module=module, boundary=boundary or KEEP) + global_enum(cls) + module_globals[name] = cls + return cls + @staticmethod def _check_for_existing_members(class_name, bases): for chain in bases: @@ -857,7 +893,7 @@ def _find_new_(classdict, member_type, first_enum): __new__ = classdict.get('__new__', None) # should __new__ be saved as __new_member__ later? - save_new = __new__ is not None + save_new = first_enum is not None and __new__ is not None if __new__ is None: # check all possibles for __new_member__ before falling back to @@ -881,7 +917,7 @@ def _find_new_(classdict, member_type, first_enum): # if a non-object.__new__ is used then whatever value/tuple was # assigned to the enum member name will be passed to __new__ and to the # new enum member's __init__ - if __new__ is object.__new__: + if first_enum is None or __new__ in (Enum.__new__, object.__new__): use_args = False else: use_args = True @@ -1379,16 +1415,27 @@ def global_enum(cls): sys.modules[cls.__module__].__dict__.update(cls.__members__) return cls -def simple_enum(etype=Enum, boundary=None): +def simple_enum(etype=Enum, *, boundary=None, use_args=None): """ Directly converts a class into an Enum, bypassing all safety checks, etc. """ def convert_class(cls): + nonlocal use_args cls_name = cls.__name__ + if use_args is None: + use_args = etype._use_args_ + __new__ = cls.__dict__.get('__new__') + if __new__ is not None: + new_member = __new__.__func__ + else: + new_member = etype._member_type_.__new__ attrs = {} body = {} - body['_new_member_'] = new_member = etype._member_type_.__new__ - body['_use_args_'] = use_args = etype._use_args_ + if __new__ is not None: + body['__new_member__'] = new_member + body['_new_member_'] = new_member + body['_use_args_'] = use_args + body['_generate_next_value_'] = gnv = etype._generate_next_value_ body['_member_names_'] = member_names = [] body['_member_map_'] = member_map = {} body['_value2member_map_'] = value2member_map = {} @@ -1405,14 +1452,13 @@ def convert_class(cls): body[name] = obj else: attrs[name] = obj + if cls.__dict__.get('__doc__') is None: + body['__doc__'] = 'An enumeration.' # # double check that repr and friends are not the mixin's or various # things break (such as pickle) # however, if the method is defined in the Enum itself, don't replace # it - # for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): - # if name not in body: - # body[name] = getattr(etype, name) enum_class = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): if name in body: @@ -1422,10 +1468,14 @@ def convert_class(cls): enum_method = getattr(etype, name, None) if obj_method is not None and obj_method is class_method: setattr(enum_class, name, enum_method) + gnv_last_values = [] if issubclass(enum_class, Flag): # Flag / IntFlag flag_mask = 0 - for order, (name, value) in enumerate(attrs.items()): + order = 0 + for name, value in attrs.items(): + if isinstance(value, auto) and auto.value is _auto_null: + value = gnv(name, 1, order, gnv_last_values) flag_mask |= value if value in value2member_map: # an alias to an existing member @@ -1436,10 +1486,14 @@ def convert_class(cls): else: # create the member if use_args: - member = new_member(enum_class, value) + if not isinstance(value, tuple): + value = (value, ) + member = new_member(enum_class, *value) + value = value[0] else: member = new_member(enum_class) - member._value_ = value + if __new__ is None: + member._value_ = value member._name_ = name member.__objclass__ = enum_class member.__init__(value) @@ -1452,7 +1506,8 @@ def convert_class(cls): if _is_single_bit(value): # not a multi-bit alias, record in _member_names_ member_names.append(name) - flag_mask |= value + order += 1 + gnv_last_values.append(value) enum_class._flag_mask_ = flag_mask enum_class._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 # set correct __iter__ @@ -1461,20 +1516,29 @@ def convert_class(cls): enum_class._iter_member_ = enum_class._iter_member_by_def_ else: # Enum / IntEnum / StrEnum - for order, (name, value) in enumerate(attrs.items()): + order = 0 + for name, value in attrs.items(): + if isinstance(value, auto): + if value.value is _auto_null: + value.value = gnv(name, 1, order, gnv_last_values) + value = value.value if value in value2member_map: # an alias to an existing member - member_map[name] = value2member_map[value] redirect = property() redirect.__set_name__(enum_class, name) setattr(enum_class, name, redirect) + member_map[name] = value2member_map[value] else: # create the member if use_args: - member = new_member(enum_class, value) + if not isinstance(value, tuple): + value = (value, ) + member = new_member(enum_class, *value) + value = value[0] else: member = new_member(enum_class) - member._value_ = value + if __new__ is None: + member._value_ = value member._name_ = name member.__objclass__ = enum_class member.__init__(value) @@ -1485,8 +1549,116 @@ def convert_class(cls): member_map[name] = member value2member_map[value] = member member_names.append(name) + order += 1 + gnv_last_values.append(value) if '__new__' in body: enum_class.__new_member__ = enum_class.__new__ enum_class.__new__ = Enum.__new__ return enum_class return convert_class + +def test_simple_enum(checked_enum, simple_enum): + """ + Compare a simple enum with the equivalent fully-checked enum. + """ + failed = [] + if checked_enum.__dict__ != simple_enum.__dict__: + checked_dict = checked_enum.__dict__ + checked_keys = list(checked_dict.keys()) + simple_dict = simple_enum.__dict__ + simple_keys = list(simple_dict.keys()) + member_names = set( + list(checked_enum._member_map_.keys()) + + list(simple_enum._member_map_.keys()) + ) + for key in set(checked_keys + simple_keys): + if key in ('__module__', '_member_map_', '_value2member_map_'): + # keys known to be different + continue + elif key in member_names: + # members are checked below + continue + elif key not in simple_keys: + failed.append("missing key: %r" % (key, )) + elif key not in checked_keys: + failed.append("extra key: %r" % (key, )) + else: + checked_value = checked_dict[key] + simple_value = simple_dict[key] + if callable(checked_value): + continue + if key == '__doc__': + # remove all spaces/tabs + compressed_checked_value = checked_value.replace(' ','').replace('\t','') + compressed_simple_value = simple_value.replace(' ','').replace('\t','') + if compressed_checked_value != compressed_simple_value: + failed.append("%r:\n %s\n %s" % ( + key, + "checked -> %r" % (checked_value, ), + "simple -> %r" % (simple_value, ), + )) + elif checked_value != simple_value: + failed.append("%r:\n %s\n %s" % ( + key, + "checked -> %r" % (checked_value, ), + "simple -> %r" % (simple_value, ), + )) + failed.sort() + for name in member_names: + failed_member = [] + if name not in simple_keys: + failed.append('missing member from simple enum: %r' % name) + elif name not in checked_keys: + failed.append('extra member in simple enum: %r' % name) + else: + checked_member_dict = checked_enum[name].__dict__ + checked_member_keys = list(checked_member_dict.keys()) + simple_member_dict = simple_enum[name].__dict__ + simple_member_keys = list(simple_member_dict.keys()) + for key in set(checked_member_keys + simple_member_keys): + if key in ('__module__', '__objclass__'): + # keys known to be different + continue + elif key not in simple_member_keys: + failed_member.append("missing key %r not in the simple enum member %r" % (key, name)) + elif key not in checked_member_keys: + failed_member.append("extra key %r in simple enum member %r" % (key, name)) + else: + checked_value = checked_member_dict[key] + simple_value = simple_member_dict[key] + if checked_value != simple_value: + failed_member.append("%r:\n %s\n %s" % ( + key, + "checked member -> %r" % (checked_value, ), + "simple member -> %r" % (simple_value, ), + )) + if failed_member: + failed.append('%r member mismatch:\n %s' % ( + name, '\n '.join(failed_member), + )) + for method in ( + '__str__', '__repr__', '__reduce_ex__', '__format__', + '__getnewargs_ex__', '__getnewargs__', '__reduce_ex__', '__reduce__' + ): + if method in simple_keys and method in checked_keys: + # cannot compare functions, and it exists in both, so we're good + continue + elif method not in simple_keys and method not in checked_keys: + # method is inherited -- check it out + checked_method = getattr(checked_enum, method, None) + simple_method = getattr(simple_enum, method, None) + if hasattr(checked_method, '__func__'): + checked_method = checked_method.__func__ + simple_method = simple_method.__func__ + if checked_method != simple_method: + failed.append("%r: %-30s %s" % ( + method, + "checked -> %r" % (checked_method, ), + "simple -> %r" % (simple_method, ), + )) + else: + # if the method existed in only one of the enums, it will have been caught + # in the first checks above + pass + if failed: + raise ValueError('enum mismatch:\n %s' % '\n '.join(failed)) diff --git a/Lib/http/__init__.py b/Lib/http/__init__.py index 37be765349ea00..7418a100625661 100644 --- a/Lib/http/__init__.py +++ b/Lib/http/__init__.py @@ -1,8 +1,10 @@ -from enum import IntEnum +from enum import IntEnum, simple_enum __all__ = ['HTTPStatus'] -class HTTPStatus(IntEnum): + +@simple_enum(IntEnum) +class HTTPStatus: """HTTP status codes and reason phrases Status codes from the following RFCs are all observed: diff --git a/Lib/pstats.py b/Lib/pstats.py index 0f93ae02c95074..ab848a4b681025 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -26,14 +26,15 @@ import marshal import re -from enum import Enum +from enum import StrEnum, simple_enum from functools import cmp_to_key from dataclasses import dataclass from typing import Dict __all__ = ["Stats", "SortKey", "FunctionProfile", "StatsProfile"] -class SortKey(str, Enum): +@simple_enum(StrEnum) +class SortKey: CALLS = 'calls', 'ncalls' CUMULATIVE = 'cumulative', 'cumtime' FILENAME = 'filename', 'module' diff --git a/Lib/ssl.py b/Lib/ssl.py index 30f4e5934febf9..08980be2f830a1 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -94,6 +94,7 @@ import os from collections import namedtuple from enum import Enum as _Enum, IntEnum as _IntEnum, IntFlag as _IntFlag +from enum import simple_enum as _simple_enum import _ssl # if we can't import it, let the error propagate @@ -155,7 +156,8 @@ _SSLv2_IF_EXISTS = getattr(_SSLMethod, 'PROTOCOL_SSLv2', None) -class TLSVersion(_IntEnum): +@_simple_enum(_IntEnum) +class TLSVersion: MINIMUM_SUPPORTED = _ssl.PROTO_MINIMUM_SUPPORTED SSLv3 = _ssl.PROTO_SSLv3 TLSv1 = _ssl.PROTO_TLSv1 @@ -165,7 +167,8 @@ class TLSVersion(_IntEnum): MAXIMUM_SUPPORTED = _ssl.PROTO_MAXIMUM_SUPPORTED -class _TLSContentType(_IntEnum): +@_simple_enum(_IntEnum) +class _TLSContentType: """Content types (record layer) See RFC 8446, section B.1 @@ -179,7 +182,8 @@ class _TLSContentType(_IntEnum): INNER_CONTENT_TYPE = 0x101 -class _TLSAlertType(_IntEnum): +@_simple_enum(_IntEnum) +class _TLSAlertType: """Alert types for TLSContentType.ALERT messages See RFC 8466, section B.2 @@ -220,7 +224,8 @@ class _TLSAlertType(_IntEnum): NO_APPLICATION_PROTOCOL = 120 -class _TLSMessageType(_IntEnum): +@_simple_enum(_IntEnum) +class _TLSMessageType: """Message types (handshake protocol) See RFC 8446, section B.3 diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index bddb3de2f090bf..14f51a89b35655 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -1,6 +1,7 @@ import ast import builtins import dis +import enum import os import sys import types @@ -678,6 +679,35 @@ def test_constant_as_name(self): with self.assertRaisesRegex(ValueError, f"Name node can't be used with '{constant}' constant"): compile(expr, "", "eval") + def test_precedence_enum(self): + class _Precedence(enum.IntEnum): + """Precedence table that originated from python grammar.""" + TUPLE = enum.auto() + YIELD = enum.auto() # 'yield', 'yield from' + TEST = enum.auto() # 'if'-'else', 'lambda' + OR = enum.auto() # 'or' + AND = enum.auto() # 'and' + NOT = enum.auto() # 'not' + CMP = enum.auto() # '<', '>', '==', '>=', '<=', '!=', + # 'in', 'not in', 'is', 'is not' + EXPR = enum.auto() + BOR = EXPR # '|' + BXOR = enum.auto() # '^' + BAND = enum.auto() # '&' + SHIFT = enum.auto() # '<<', '>>' + ARITH = enum.auto() # '+', '-' + TERM = enum.auto() # '*', '@', '/', '%', '//' + FACTOR = enum.auto() # unary '+', '-', '~' + POWER = enum.auto() # '**' + AWAIT = enum.auto() # 'await' + ATOM = enum.auto() + def next(self): + try: + return self.__class__(self + 1) + except ValueError: + return self + enum.test_simple_enum(_Precedence, ast._Precedence) + class ASTHelpers_Test(unittest.TestCase): maxDiff = None diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index 5fb45924e50822..b26f1f1ad2b798 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -1,3 +1,4 @@ +import enum import errno from http import client, HTTPStatus import io @@ -524,6 +525,150 @@ def test_dir_with_added_behavior_on_status(self): # see issue40084 self.assertTrue({'description', 'name', 'phrase', 'value'} <= set(dir(HTTPStatus(404)))) + def test_simple_httpstatus(self): + class CheckedHTTPStatus(enum.IntEnum): + """HTTP status codes and reason phrases + + Status codes from the following RFCs are all observed: + + * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 + * RFC 6585: Additional HTTP Status Codes + * RFC 3229: Delta encoding in HTTP + * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 + * RFC 5842: Binding Extensions to WebDAV + * RFC 7238: Permanent Redirect + * RFC 2295: Transparent Content Negotiation in HTTP + * RFC 2774: An HTTP Extension Framework + * RFC 7725: An HTTP Status Code to Report Legal Obstacles + * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) + * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) + * RFC 8297: An HTTP Status Code for Indicating Hints + * RFC 8470: Using Early Data in HTTP + """ + def __new__(cls, value, phrase, description=''): + obj = int.__new__(cls, value) + obj._value_ = value + + obj.phrase = phrase + obj.description = description + return obj + # informational + CONTINUE = 100, 'Continue', 'Request received, please continue' + SWITCHING_PROTOCOLS = (101, 'Switching Protocols', + 'Switching to new protocol; obey Upgrade header') + PROCESSING = 102, 'Processing' + EARLY_HINTS = 103, 'Early Hints' + # success + OK = 200, 'OK', 'Request fulfilled, document follows' + CREATED = 201, 'Created', 'Document created, URL follows' + ACCEPTED = (202, 'Accepted', + 'Request accepted, processing continues off-line') + NON_AUTHORITATIVE_INFORMATION = (203, + 'Non-Authoritative Information', 'Request fulfilled from cache') + NO_CONTENT = 204, 'No Content', 'Request fulfilled, nothing follows' + RESET_CONTENT = 205, 'Reset Content', 'Clear input form for further input' + PARTIAL_CONTENT = 206, 'Partial Content', 'Partial content follows' + MULTI_STATUS = 207, 'Multi-Status' + ALREADY_REPORTED = 208, 'Already Reported' + IM_USED = 226, 'IM Used' + # redirection + MULTIPLE_CHOICES = (300, 'Multiple Choices', + 'Object has several resources -- see URI list') + MOVED_PERMANENTLY = (301, 'Moved Permanently', + 'Object moved permanently -- see URI list') + FOUND = 302, 'Found', 'Object moved temporarily -- see URI list' + SEE_OTHER = 303, 'See Other', 'Object moved -- see Method and URL list' + NOT_MODIFIED = (304, 'Not Modified', + 'Document has not changed since given time') + USE_PROXY = (305, 'Use Proxy', + 'You must use proxy specified in Location to access this resource') + TEMPORARY_REDIRECT = (307, 'Temporary Redirect', + 'Object moved temporarily -- see URI list') + PERMANENT_REDIRECT = (308, 'Permanent Redirect', + 'Object moved permanently -- see URI list') + # client error + BAD_REQUEST = (400, 'Bad Request', + 'Bad request syntax or unsupported method') + UNAUTHORIZED = (401, 'Unauthorized', + 'No permission -- see authorization schemes') + PAYMENT_REQUIRED = (402, 'Payment Required', + 'No payment -- see charging schemes') + FORBIDDEN = (403, 'Forbidden', + 'Request forbidden -- authorization will not help') + NOT_FOUND = (404, 'Not Found', + 'Nothing matches the given URI') + METHOD_NOT_ALLOWED = (405, 'Method Not Allowed', + 'Specified method is invalid for this resource') + NOT_ACCEPTABLE = (406, 'Not Acceptable', + 'URI not available in preferred format') + PROXY_AUTHENTICATION_REQUIRED = (407, + 'Proxy Authentication Required', + 'You must authenticate with this proxy before proceeding') + REQUEST_TIMEOUT = (408, 'Request Timeout', + 'Request timed out; try again later') + CONFLICT = 409, 'Conflict', 'Request conflict' + GONE = (410, 'Gone', + 'URI no longer exists and has been permanently removed') + LENGTH_REQUIRED = (411, 'Length Required', + 'Client must specify Content-Length') + PRECONDITION_FAILED = (412, 'Precondition Failed', + 'Precondition in headers is false') + REQUEST_ENTITY_TOO_LARGE = (413, 'Request Entity Too Large', + 'Entity is too large') + REQUEST_URI_TOO_LONG = (414, 'Request-URI Too Long', + 'URI is too long') + UNSUPPORTED_MEDIA_TYPE = (415, 'Unsupported Media Type', + 'Entity body in unsupported format') + REQUESTED_RANGE_NOT_SATISFIABLE = (416, + 'Requested Range Not Satisfiable', + 'Cannot satisfy request range') + EXPECTATION_FAILED = (417, 'Expectation Failed', + 'Expect condition could not be satisfied') + IM_A_TEAPOT = (418, 'I\'m a Teapot', + 'Server refuses to brew coffee because it is a teapot.') + MISDIRECTED_REQUEST = (421, 'Misdirected Request', + 'Server is not able to produce a response') + UNPROCESSABLE_ENTITY = 422, 'Unprocessable Entity' + LOCKED = 423, 'Locked' + FAILED_DEPENDENCY = 424, 'Failed Dependency' + TOO_EARLY = 425, 'Too Early' + UPGRADE_REQUIRED = 426, 'Upgrade Required' + PRECONDITION_REQUIRED = (428, 'Precondition Required', + 'The origin server requires the request to be conditional') + TOO_MANY_REQUESTS = (429, 'Too Many Requests', + 'The user has sent too many requests in ' + 'a given amount of time ("rate limiting")') + REQUEST_HEADER_FIELDS_TOO_LARGE = (431, + 'Request Header Fields Too Large', + 'The server is unwilling to process the request because its header ' + 'fields are too large') + UNAVAILABLE_FOR_LEGAL_REASONS = (451, + 'Unavailable For Legal Reasons', + 'The server is denying access to the ' + 'resource as a consequence of a legal demand') + # server errors + INTERNAL_SERVER_ERROR = (500, 'Internal Server Error', + 'Server got itself in trouble') + NOT_IMPLEMENTED = (501, 'Not Implemented', + 'Server does not support this operation') + BAD_GATEWAY = (502, 'Bad Gateway', + 'Invalid responses from another server/proxy') + SERVICE_UNAVAILABLE = (503, 'Service Unavailable', + 'The server cannot process the request due to a high load') + GATEWAY_TIMEOUT = (504, 'Gateway Timeout', + 'The gateway server did not receive a timely response') + HTTP_VERSION_NOT_SUPPORTED = (505, 'HTTP Version Not Supported', + 'Cannot fulfill request') + VARIANT_ALSO_NEGOTIATES = 506, 'Variant Also Negotiates' + INSUFFICIENT_STORAGE = 507, 'Insufficient Storage' + LOOP_DETECTED = 508, 'Loop Detected' + NOT_EXTENDED = 510, 'Not Extended' + NETWORK_AUTHENTICATION_REQUIRED = (511, + 'Network Authentication Required', + 'The client needs to authenticate to gain network access') + enum.test_simple_enum(CheckedHTTPStatus, HTTPStatus) + + def test_status_lines(self): # Test HTTP status lines diff --git a/Lib/test/test_pstats.py b/Lib/test/test_pstats.py index 4f78b99fd1cae7..a73482df6292b0 100644 --- a/Lib/test/test_pstats.py +++ b/Lib/test/test_pstats.py @@ -3,6 +3,7 @@ from test import support from io import StringIO from pstats import SortKey +from enum import StrEnum, test_simple_enum import pstats import cProfile @@ -67,6 +68,25 @@ def test_sort_stats_enum(self): self.assertEqual( self.stats.sort_type, self.stats.sort_arg_dict_default[member.value][-1]) + class CheckedSortKey(StrEnum): + CALLS = 'calls', 'ncalls' + CUMULATIVE = 'cumulative', 'cumtime' + FILENAME = 'filename', 'module' + LINE = 'line' + NAME = 'name' + NFL = 'nfl' + PCALLS = 'pcalls' + STDNAME = 'stdname' + TIME = 'time', 'tottime' + def __new__(cls, *values): + value = values[0] + obj = str.__new__(cls, value) + obj._value_ = value + for other_value in values[1:]: + cls._value2member_map_[other_value] = obj + obj._all_values = values + return obj + test_simple_enum(CheckedSortKey, SortKey) def test_sort_starts_mix(self): self.assertRaises(TypeError, self.stats.sort_stats, diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 831f411b12be6f..e4486b914fc50a 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -13,6 +13,7 @@ import select import time import datetime +import enum import gc import os import errno @@ -32,7 +33,7 @@ ssl = import_helper.import_module("ssl") -from ssl import TLSVersion, _TLSContentType, _TLSMessageType +from ssl import TLSVersion, _TLSContentType, _TLSMessageType, _TLSAlertType Py_DEBUG = hasattr(sys, 'gettotalrefcount') Py_DEBUG_WIN32 = Py_DEBUG and sys.platform == 'win32' @@ -4796,6 +4797,107 @@ def sni_cb(sock, servername, ctx): s.connect((HOST, server.port)) +class TestEnumerations(unittest.TestCase): + + def test_tlsversion(self): + class CheckedTLSVersion(enum.IntEnum): + MINIMUM_SUPPORTED = _ssl.PROTO_MINIMUM_SUPPORTED + SSLv3 = _ssl.PROTO_SSLv3 + TLSv1 = _ssl.PROTO_TLSv1 + TLSv1_1 = _ssl.PROTO_TLSv1_1 + TLSv1_2 = _ssl.PROTO_TLSv1_2 + TLSv1_3 = _ssl.PROTO_TLSv1_3 + MAXIMUM_SUPPORTED = _ssl.PROTO_MAXIMUM_SUPPORTED + enum.test_simple_enum(CheckedTLSVersion, TLSVersion) + + def test_tlscontenttype(self): + class Checked_TLSContentType(enum.IntEnum): + """Content types (record layer) + + See RFC 8446, section B.1 + """ + CHANGE_CIPHER_SPEC = 20 + ALERT = 21 + HANDSHAKE = 22 + APPLICATION_DATA = 23 + # pseudo content types + HEADER = 0x100 + INNER_CONTENT_TYPE = 0x101 + enum.test_simple_enum(Checked_TLSContentType, _TLSContentType) + + def test_tlsalerttype(self): + class Checked_TLSAlertType(enum.IntEnum): + """Alert types for TLSContentType.ALERT messages + + See RFC 8466, section B.2 + """ + CLOSE_NOTIFY = 0 + UNEXPECTED_MESSAGE = 10 + BAD_RECORD_MAC = 20 + DECRYPTION_FAILED = 21 + RECORD_OVERFLOW = 22 + DECOMPRESSION_FAILURE = 30 + HANDSHAKE_FAILURE = 40 + NO_CERTIFICATE = 41 + BAD_CERTIFICATE = 42 + UNSUPPORTED_CERTIFICATE = 43 + CERTIFICATE_REVOKED = 44 + CERTIFICATE_EXPIRED = 45 + CERTIFICATE_UNKNOWN = 46 + ILLEGAL_PARAMETER = 47 + UNKNOWN_CA = 48 + ACCESS_DENIED = 49 + DECODE_ERROR = 50 + DECRYPT_ERROR = 51 + EXPORT_RESTRICTION = 60 + PROTOCOL_VERSION = 70 + INSUFFICIENT_SECURITY = 71 + INTERNAL_ERROR = 80 + INAPPROPRIATE_FALLBACK = 86 + USER_CANCELED = 90 + NO_RENEGOTIATION = 100 + MISSING_EXTENSION = 109 + UNSUPPORTED_EXTENSION = 110 + CERTIFICATE_UNOBTAINABLE = 111 + UNRECOGNIZED_NAME = 112 + BAD_CERTIFICATE_STATUS_RESPONSE = 113 + BAD_CERTIFICATE_HASH_VALUE = 114 + UNKNOWN_PSK_IDENTITY = 115 + CERTIFICATE_REQUIRED = 116 + NO_APPLICATION_PROTOCOL = 120 + enum.test_simple_enum(Checked_TLSAlertType, _TLSAlertType) + + def test_tlsmessagetype(self): + class Checked_TLSMessageType(enum.IntEnum): + """Message types (handshake protocol) + + See RFC 8446, section B.3 + """ + HELLO_REQUEST = 0 + CLIENT_HELLO = 1 + SERVER_HELLO = 2 + HELLO_VERIFY_REQUEST = 3 + NEWSESSION_TICKET = 4 + END_OF_EARLY_DATA = 5 + HELLO_RETRY_REQUEST = 6 + ENCRYPTED_EXTENSIONS = 8 + CERTIFICATE = 11 + SERVER_KEY_EXCHANGE = 12 + CERTIFICATE_REQUEST = 13 + SERVER_DONE = 14 + CERTIFICATE_VERIFY = 15 + CLIENT_KEY_EXCHANGE = 16 + FINISHED = 20 + CERTIFICATE_URL = 21 + CERTIFICATE_STATUS = 22 + SUPPLEMENTAL_DATA = 23 + KEY_UPDATE = 24 + NEXT_PROTO = 67 + MESSAGE_HASH = 254 + CHANGE_CIPHER_SPEC = 0x0101 + enum.test_simple_enum(Checked_TLSMessageType, _TLSMessageType) + + def test_main(verbose=False): if support.verbose: plats = { diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index d47cf28782dd7e..0e6cbb61b2298b 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -1463,20 +1463,21 @@ class Float(float, enum.Enum): PI = 3.1415926 class Int(enum.IntEnum): IDES = 15 - class Str(str, enum.Enum): + class Str(enum.StrEnum): + # StrEnum uses the value and not the name for %s etc. ABC = 'abc' # Testing Unicode formatting strings... self.assertEqual("%s, %s" % (Str.ABC, Str.ABC), - 'ABC, ABC') + 'abc, abc') self.assertEqual("%s, %s, %d, %i, %u, %f, %5.2f" % (Str.ABC, Str.ABC, Int.IDES, Int.IDES, Int.IDES, Float.PI, Float.PI), - 'ABC, ABC, 15, 15, 15, 3.141593, 3.14') + 'abc, abc, 15, 15, 15, 3.141593, 3.14') # formatting jobs delegated from the string implementation: self.assertEqual('...%(foo)s...' % {'foo':Str.ABC}, - '...ABC...') + '...abc...') self.assertEqual('...%(foo)s...' % {'foo':Int.IDES}, '...IDES...') self.assertEqual('...%(foo)i...' % {'foo':Int.IDES}, diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py index d6a8333427a4a2..cfd6301059515d 100755 --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -4,6 +4,7 @@ import builtins import contextlib import copy +import enum import io import os import pickle @@ -31,6 +32,13 @@ def get_command_stdout(command, args): class BaseTestUUID: uuid = None + def test_safe_uuid_enum(self): + class CheckedSafeUUID(enum.Enum): + safe = 0 + unsafe = -1 + unknown = None + enum.test_simple_enum(CheckedSafeUUID, py_uuid.SafeUUID) + def test_UUID(self): equal = self.assertEqual ascending = [] diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 01dce7eff25c54..342429072f03aa 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -144,7 +144,8 @@ def _splitdict(tk, v, cut_minus=True, conv=None): return dict -class EventType(enum.StrEnum): +@enum.simple_enum(enum.StrEnum) +class EventType: KeyPress = '2' Key = KeyPress KeyRelease = '3' @@ -185,8 +186,6 @@ class EventType(enum.StrEnum): Deactivate = '37' MouseWheel = '38' - __str__ = str.__str__ - class Event: """Container for the properties of an event. diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index f6e5b4db1ae1fb..aa5becd0147b5e 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -1,5 +1,6 @@ import unittest import tkinter +import enum from test import support from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest @@ -261,6 +262,49 @@ def test_event_repr(self): " num=3 delta=-1 focus=True" " x=10 y=20 width=300 height=200>") + def test_eventtype_enum(self): + class CheckedEventType(enum.StrEnum): + KeyPress = '2' + Key = KeyPress + KeyRelease = '3' + ButtonPress = '4' + Button = ButtonPress + ButtonRelease = '5' + Motion = '6' + Enter = '7' + Leave = '8' + FocusIn = '9' + FocusOut = '10' + Keymap = '11' # undocumented + Expose = '12' + GraphicsExpose = '13' # undocumented + NoExpose = '14' # undocumented + Visibility = '15' + Create = '16' + Destroy = '17' + Unmap = '18' + Map = '19' + MapRequest = '20' + Reparent = '21' + Configure = '22' + ConfigureRequest = '23' + Gravity = '24' + ResizeRequest = '25' + Circulate = '26' + CirculateRequest = '27' + Property = '28' + SelectionClear = '29' # undocumented + SelectionRequest = '30' # undocumented + Selection = '31' # undocumented + Colormap = '32' + ClientMessage = '33' # undocumented + Mapping = '34' # undocumented + VirtualEvent = '35' # undocumented + Activate = '36' + Deactivate = '37' + MouseWheel = '38' + enum.test_simple_enum(CheckedEventType, tkinter.EventType) + def test_getboolean(self): for v in 'true', 'yes', 'on', '1', 't', 'y', 1, True: self.assertIs(self.root.getboolean(v), True) diff --git a/Lib/uuid.py b/Lib/uuid.py index 5ae0a3e5fa449d..44cc541d0cb9ad 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -47,7 +47,7 @@ import os import sys -from enum import Enum +from enum import Enum, simple_enum __author__ = 'Ka-Ping Yee ' @@ -75,7 +75,8 @@ bytes_ = bytes # The built-in bytes type -class SafeUUID(Enum): +@simple_enum(Enum) +class SafeUUID: safe = 0 unsafe = -1 unknown = None diff --git a/Misc/NEWS.d/next/Library/2021-04-08-11-47-31.bpo-38659.r_HFnU.rst b/Misc/NEWS.d/next/Library/2021-04-08-11-47-31.bpo-38659.r_HFnU.rst new file mode 100644 index 00000000000000..822584be1b221c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-08-11-47-31.bpo-38659.r_HFnU.rst @@ -0,0 +1,4 @@ +A ``simple_enum`` decorator is added to the ``enum`` module to convert a +normal class into an Enum. ``test_simple_enum`` added to test simple enums +against a corresponding normal Enum. Standard library modules updated to +use ``simple_enum``. From 84d2b26e8f52adbc40684634d7ce8d45c3fbbe97 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 8 Apr 2021 12:58:51 -0700 Subject: [PATCH 004/108] raise TypeError from test_simple_enum Instead of raising ValueError on mismatch, raise a TypeError instead. --- Doc/library/enum.rst | 2 +- Lib/enum.py | 2 +- Lib/test/test_enum.py | 19 ++++++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 494171e2f75386..4bfdffd1504ff2 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -660,4 +660,4 @@ Utilites and Decorators ... BLUE = auto() >>> test_simple_enum(CheckedColor, Color) - If differences are found, a :exc:`ValueError` is raised. + If differences are found, a :exc:`TypeError` is raised. diff --git a/Lib/enum.py b/Lib/enum.py index 2f5fc44a5ca20d..3fdfd17cee1fcc 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -1661,4 +1661,4 @@ def test_simple_enum(checked_enum, simple_enum): # in the first checks above pass if failed: - raise ValueError('enum mismatch:\n %s' % '\n '.join(failed)) + raise TypeError('enum mismatch:\n %s' % '\n '.join(failed)) diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 6002cd85622cfe..af8a9c56a15ffb 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -8,7 +8,7 @@ import threading from collections import OrderedDict from enum import Enum, IntEnum, StrEnum, EnumType, Flag, IntFlag, unique, auto -from enum import STRICT, CONFORM, EJECT, KEEP +from enum import STRICT, CONFORM, EJECT, KEEP, simple_enum, test_simple_enum from io import StringIO from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL from test import support @@ -3520,6 +3520,23 @@ def test_inspect_classify_class_attrs(self): if failed: self.fail("result does not equal expected, see print above") + def test_test_simple_enum(self): + @simple_enum(Enum) + class SimpleColor: + RED = 1 + GREEN = 2 + BLUE = 3 + class CheckedColor(Enum): + RED = 1 + GREEN = 2 + BLUE = 3 + self.assertTrue(test_simple_enum(CheckedColor, SimpleColor) is None) + SimpleColor.GREEN._value_ = 9 + self.assertRaisesRegex( + TypeError, "enum mismatch", + test_simple_enum, CheckedColor, SimpleColor, + ) + class MiscTestCase(unittest.TestCase): def test__all__(self): From bed88511aad7e85ccf314e7e35e08153818cbcac Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Sat, 10 Apr 2021 20:28:20 -0700 Subject: [PATCH 005/108] changes: - make simple_enum and test_simple_enum private - add _old_convert_ to enable testing `IntEnum._convert_` and `IntFlag._convert_` transformations - add tests for the `_convert_`s --- Doc/library/enum.rst | 40 ------ Lib/ast.py | 4 +- Lib/enum.py | 135 ++++++++++++--------- Lib/http/__init__.py | 4 +- Lib/pstats.py | 4 +- Lib/re.py | 2 +- Lib/ssl.py | 2 +- Lib/test/test_ast.py | 2 +- Lib/test/test_enum.py | 50 ++++++-- Lib/test/test_httplib.py | 2 +- Lib/test/test_pstats.py | 4 +- Lib/test/test_signal.py | 27 +++++ Lib/test/test_socket.py | 35 ++++++ Lib/test/test_ssl.py | 61 +++++++++- Lib/test/test_uuid.py | 2 +- Lib/tkinter/__init__.py | 2 +- Lib/tkinter/test/test_tkinter/test_misc.py | 2 +- Lib/uuid.py | 4 +- 18 files changed, 257 insertions(+), 125 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 4bfdffd1504ff2..91c214eb668d11 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -117,19 +117,6 @@ Module Contents Enum class decorator that ensures only one name is bound to any one value. - :func:`simple_enum` - - Class decorator that converts a normal class into an :class:`Enum`. No - safety checks are done, and some advanced behavior (such as - :func:`__init_subclass__`) is not available. Enum creation can be faster - using :func:`simple_enum`. - - :func:`test_simple_enum` - - Function that can be used to test an enum created with - :func:`simple_enum` with the corresponding :class:`Enum`-subclassed - version. - .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` .. versionadded:: 3.10 ``StrEnum`` @@ -634,30 +621,3 @@ Utilites and Decorators Traceback (most recent call last): ... ValueError: duplicate values found in : FOUR -> THREE - -.. decorator:: simple_enum - - A :keyword:`class` decorator that converts a normal class into an enum:: - - >>> from enum import Enum, simple_enum - >>> @simple_enum(Enum): - ... class Color: - ... RED = auto() - ... GREEN = auto() - ... BLUE = auto() - >>> Color - - -.. function:: test_simple_enum - - A function that can be used to test an enum created with :func:`simple_enum` - against the version created by subclassing :class:`Enum`:: - - >>> from enum import Enum, test_simple_enum - >>> class CheckedColor(Enum): - ... RED = auto() - ... GREEN = auto() - ... BLUE = auto() - >>> test_simple_enum(CheckedColor, Color) - - If differences are found, a :exc:`TypeError` is raised. diff --git a/Lib/ast.py b/Lib/ast.py index ac4fc074961736..703f68ace6068f 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -27,7 +27,7 @@ import sys from _ast import * from contextlib import contextmanager, nullcontext -from enum import IntEnum, auto, simple_enum +from enum import IntEnum, auto, _simple_enum def parse(source, filename='', mode='exec', *, @@ -636,7 +636,7 @@ class Param(expr_context): # We unparse those infinities to INFSTR. _INFSTR = "1e" + repr(sys.float_info.max_10_exp + 1) -@simple_enum(IntEnum) +@_simple_enum(IntEnum) class _Precedence: """Precedence table that originated from python grammar.""" diff --git a/Lib/enum.py b/Lib/enum.py index 3fdfd17cee1fcc..227e961bcda934 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -10,7 +10,6 @@ 'property', 'FlagBoundary', 'STRICT', 'CONFORM', 'EJECT', 'KEEP', 'global_flag_repr', 'global_enum_repr', 'global_enum', - 'simple_enum', 'test_simple_enum', ] @@ -391,7 +390,7 @@ def __prepare__(metacls, cls, bases, **kwds): ) return enum_dict - def __new__(metacls, cls, bases, classdict, boundary=None, _simple=False, **kwds): + def __new__(metacls, cls, bases, classdict, *, boundary=None, _simple=False, **kwds): # an Enum class is final once enumeration items have been defined; it # cannot be mixed with other types (int, float, etc.) if it has an # inherited __new__ unless a new __new__ is defined (or the resulting @@ -752,40 +751,8 @@ def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, s return metacls.__new__(metacls, class_name, bases, classdict, boundary=boundary) - def _convert_(cls, name, module, filter, source=None, boundary=None): - """ - Create a new Enum subclass that replaces a collection of global constants - """ - # convert all constants from source (or module) that pass filter() to - # a new Enum called name, and export the enum and its members back to - # module; - # also, replace the __reduce_ex__ method so unpickling works in - # previous Python versions - module_globals = sys.modules[module].__dict__ - if source: - source = source.__dict__ - else: - source = module_globals - # _value2member_map_ is populated in the same order every time - # for a consistent reverse mapping of number to name when there - # are multiple names for the same number. - members = [ - (name, value) - for name, value in source.items() - if filter(name)] - try: - # sort by value - members.sort(key=lambda t: (t[1], t[0])) - except TypeError: - # unless some values aren't comparable, in which case sort by name - members.sort(key=lambda t: t[0]) - cls = cls(name, members, module=module, boundary=boundary or KEEP) - cls.__reduce_ex__ = _reduce_ex_by_name - global_enum(cls) - module_globals[name] = cls - return cls + def _convert_(cls, name, module, filter, source=None, *, boundary=None): - def _convert_new_(cls, name, module, filter, source=None, boundary=None): """ Create a new Enum subclass that replaces a collection of global constants """ @@ -815,8 +782,8 @@ def _convert_new_(cls, name, module, filter, source=None, boundary=None): body = {t[0]: t[1] for t in members} body['__module__'] = module tmp_cls = type(name, (object, ), body) - cls = simple_enum(etype=cls, boundary=boundary)(tmp_cls) - # cls = cls(name, members, module=module, boundary=boundary or KEEP) + cls = _simple_enum(etype=cls, boundary=boundary or KEEP)(tmp_cls) + cls.__reduce_ex__ = _reduce_ex_by_name global_enum(cls) module_globals[name] = cls return cls @@ -1220,7 +1187,7 @@ def _missing_(cls, value): pseudo_member = object.__new__(cls) else: pseudo_member = (__new__ or cls._member_type_.__new__)(cls, value) - if not hasattr(pseudo_member, 'value'): + if not hasattr(pseudo_member, '_value_'): pseudo_member._value_ = value if member_value: pseudo_member._name_ = '|'.join([ @@ -1415,9 +1382,21 @@ def global_enum(cls): sys.modules[cls.__module__].__dict__.update(cls.__members__) return cls -def simple_enum(etype=Enum, *, boundary=None, use_args=None): +def _simple_enum(etype=Enum, *, boundary=None, use_args=None): """ - Directly converts a class into an Enum, bypassing all safety checks, etc. + Class decorator that converts a normal class into an :class:`Enum`. No + safety checks are done, and some advanced behavior (such as + :func:`__init_subclass__`) is not available. Enum creation can be faster + using :func:`simple_enum`. + + >>> from enum import Enum, _simple_enum + >>> @_simple_enum(Enum) + ... class Color: + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> Color + """ def convert_class(cls): nonlocal use_args @@ -1471,12 +1450,10 @@ def convert_class(cls): gnv_last_values = [] if issubclass(enum_class, Flag): # Flag / IntFlag - flag_mask = 0 - order = 0 + single_bits = multi_bits = 0 for name, value in attrs.items(): if isinstance(value, auto) and auto.value is _auto_null: - value = gnv(name, 1, order, gnv_last_values) - flag_mask |= value + value = gnv(name, 1, len(member_names), gnv_last_values) if value in value2member_map: # an alias to an existing member redirect = property() @@ -1497,30 +1474,31 @@ def convert_class(cls): member._name_ = name member.__objclass__ = enum_class member.__init__(value) - member._sort_order_ = order redirect = property() redirect.__set_name__(enum_class, name) setattr(enum_class, name, redirect) member_map[name] = member + member._sort_order_ = len(member_names) value2member_map[value] = member if _is_single_bit(value): - # not a multi-bit alias, record in _member_names_ + # not a multi-bit alias, record in _member_names_ and _flag_mask_ member_names.append(name) - order += 1 + single_bits |= value + else: + multi_bits |= value gnv_last_values.append(value) - enum_class._flag_mask_ = flag_mask - enum_class._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 + enum_class._flag_mask_ = single_bits + enum_class._all_bits_ = 2 ** ((single_bits|multi_bits).bit_length()) - 1 # set correct __iter__ member_list = [m._value_ for m in enum_class] if member_list != sorted(member_list): enum_class._iter_member_ = enum_class._iter_member_by_def_ else: # Enum / IntEnum / StrEnum - order = 0 for name, value in attrs.items(): if isinstance(value, auto): if value.value is _auto_null: - value.value = gnv(name, 1, order, gnv_last_values) + value.value = gnv(name, 1, len(member_names), gnv_last_values) value = value.value if value in value2member_map: # an alias to an existing member @@ -1542,14 +1520,13 @@ def convert_class(cls): member._name_ = name member.__objclass__ = enum_class member.__init__(value) - member._sort_order_ = order + member._sort_order_ = len(member_names) redirect = property() redirect.__set_name__(enum_class, name) setattr(enum_class, name, redirect) member_map[name] = member value2member_map[value] = member member_names.append(name) - order += 1 gnv_last_values.append(value) if '__new__' in body: enum_class.__new_member__ = enum_class.__new__ @@ -1557,9 +1534,24 @@ def convert_class(cls): return enum_class return convert_class -def test_simple_enum(checked_enum, simple_enum): +def _test_simple_enum(checked_enum, simple_enum): """ - Compare a simple enum with the equivalent fully-checked enum. + A function that can be used to test an enum created with :func:`_simple_enum` + against the version created by subclassing :class:`Enum`:: + + >>> from enum import Enum, _simple_enum, _test_simple_enum + >>> @_simple_enum(Enum) + ... class Color: + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> class CheckedColor(Enum): + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> _test_simple_enum(CheckedColor, Color) + + If differences are found, a :exc:`TypeError` is raised. """ failed = [] if checked_enum.__dict__ != simple_enum.__dict__: @@ -1662,3 +1654,36 @@ def test_simple_enum(checked_enum, simple_enum): pass if failed: raise TypeError('enum mismatch:\n %s' % '\n '.join(failed)) + +def _old_convert_(etype, name, module, filter, source=None, *, boundary=None): + """ + Create a new Enum subclass that replaces a collection of global constants + """ + # convert all constants from source (or module) that pass filter() to + # a new Enum called name, and export the enum and its members back to + # module; + # also, replace the __reduce_ex__ method so unpickling works in + # previous Python versions + module_globals = sys.modules[module].__dict__ + if source: + source = source.__dict__ + else: + source = module_globals + # _value2member_map_ is populated in the same order every time + # for a consistent reverse mapping of number to name when there + # are multiple names for the same number. + members = [ + (name, value) + for name, value in source.items() + if filter(name)] + try: + # sort by value + members.sort(key=lambda t: (t[1], t[0])) + except TypeError: + # unless some values aren't comparable, in which case sort by name + members.sort(key=lambda t: t[0]) + cls = etype(name, members, module=module, boundary=boundary or KEEP) + cls.__reduce_ex__ = _reduce_ex_by_name + cls.__repr__ = global_enum_repr + return cls + diff --git a/Lib/http/__init__.py b/Lib/http/__init__.py index 7418a100625661..8b980e24a5603f 100644 --- a/Lib/http/__init__.py +++ b/Lib/http/__init__.py @@ -1,9 +1,9 @@ -from enum import IntEnum, simple_enum +from enum import IntEnum, _simple_enum __all__ = ['HTTPStatus'] -@simple_enum(IntEnum) +@_simple_enum(IntEnum) class HTTPStatus: """HTTP status codes and reason phrases diff --git a/Lib/pstats.py b/Lib/pstats.py index ab848a4b681025..e77459d38b33ec 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -26,14 +26,14 @@ import marshal import re -from enum import StrEnum, simple_enum +from enum import StrEnum, _simple_enum from functools import cmp_to_key from dataclasses import dataclass from typing import Dict __all__ = ["Stats", "SortKey", "FunctionProfile", "StatsProfile"] -@simple_enum(StrEnum) +@_simple_enum(StrEnum) class SortKey: CALLS = 'calls', 'ncalls' CUMULATIVE = 'cumulative', 'cumtime' diff --git a/Lib/re.py b/Lib/re.py index b7427e77daf626..ea41217ce08c2d 100644 --- a/Lib/re.py +++ b/Lib/re.py @@ -143,7 +143,7 @@ __version__ = "2.2.1" @enum.global_enum -@enum.simple_enum(enum.IntFlag, boundary=enum.KEEP) +@enum._simple_enum(enum.IntFlag, boundary=enum.KEEP) class RegexFlag: ASCII = A = sre_compile.SRE_FLAG_ASCII # assume ascii "locale" IGNORECASE = I = sre_compile.SRE_FLAG_IGNORECASE # ignore case diff --git a/Lib/ssl.py b/Lib/ssl.py index 08980be2f830a1..cfd6c7cab845cb 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -94,7 +94,7 @@ import os from collections import namedtuple from enum import Enum as _Enum, IntEnum as _IntEnum, IntFlag as _IntFlag -from enum import simple_enum as _simple_enum +from enum import _simple_enum, _test_simple_enum import _ssl # if we can't import it, let the error propagate diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index 14f51a89b35655..dcd9fe05692b13 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -706,7 +706,7 @@ def next(self): return self.__class__(self + 1) except ValueError: return self - enum.test_simple_enum(_Precedence, ast._Precedence) + enum._test_simple_enum(_Precedence, ast._Precedence) class ASTHelpers_Test(unittest.TestCase): diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index af8a9c56a15ffb..3cf2d48af818dc 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -8,7 +8,7 @@ import threading from collections import OrderedDict from enum import Enum, IntEnum, StrEnum, EnumType, Flag, IntFlag, unique, auto -from enum import STRICT, CONFORM, EJECT, KEEP, simple_enum, test_simple_enum +from enum import STRICT, CONFORM, EJECT, KEEP, _simple_enum, _test_simple_enum from io import StringIO from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL from test import support @@ -2479,10 +2479,13 @@ class Bizarre(Flag, boundary=KEEP): d = 6 # self.assertRaisesRegex(ValueError, 'invalid value: 7', Iron, 7) + # self.assertIs(Water(7), Water.ONE|Water.TWO) self.assertIs(Water(~9), Water.TWO) + # self.assertEqual(Space(7), 7) self.assertTrue(type(Space(7)) is int) + # self.assertEqual(list(Bizarre), [Bizarre.c]) self.assertIs(Bizarre(3), Bizarre.b) self.assertIs(Bizarre(6), Bizarre.d) @@ -3021,16 +3024,20 @@ class Space(IntFlag, boundary=EJECT): EIGHT = 8 self.assertIs(Space._boundary_, EJECT) # + # class Bizarre(IntFlag, boundary=KEEP): b = 3 c = 4 d = 6 # self.assertRaisesRegex(ValueError, 'invalid value: 5', Iron, 5) + # self.assertIs(Water(7), Water.ONE|Water.TWO) self.assertIs(Water(~9), Water.TWO) + # self.assertEqual(Space(7), 7) self.assertTrue(type(Space(7)) is int) + # self.assertEqual(list(Bizarre), [Bizarre.c]) self.assertIs(Bizarre(3), Bizarre.b) self.assertIs(Bizarre(6), Bizarre.d) @@ -3521,7 +3528,7 @@ def test_inspect_classify_class_attrs(self): self.fail("result does not equal expected, see print above") def test_test_simple_enum(self): - @simple_enum(Enum) + @_simple_enum(Enum) class SimpleColor: RED = 1 GREEN = 2 @@ -3530,12 +3537,30 @@ class CheckedColor(Enum): RED = 1 GREEN = 2 BLUE = 3 - self.assertTrue(test_simple_enum(CheckedColor, SimpleColor) is None) + self.assertTrue(_test_simple_enum(CheckedColor, SimpleColor) is None) SimpleColor.GREEN._value_ = 9 self.assertRaisesRegex( TypeError, "enum mismatch", - test_simple_enum, CheckedColor, SimpleColor, + _test_simple_enum, CheckedColor, SimpleColor, ) + class CheckedMissing(IntFlag, boundary=KEEP): + SIXTY_FOUR = 64 + ONE_TWENTY_EIGHT = 128 + TWENTY_FORTY_EIGHT = 2048 + ALL = 2048 + 128 + 64 + 12 + CM = CheckedMissing + self.assertEqual(list(CheckedMissing), [CM.SIXTY_FOUR, CM.ONE_TWENTY_EIGHT, CM.TWENTY_FORTY_EIGHT]) + # + @_simple_enum(IntFlag, boundary=KEEP) + class Missing: + SIXTY_FOUR = 64 + ONE_TWENTY_EIGHT = 128 + TWENTY_FORTY_EIGHT = 2048 + ALL = 2048 + 128 + 64 + 12 + M = Missing + self.assertEqual(list(CheckedMissing), [M.SIXTY_FOUR, M.ONE_TWENTY_EIGHT, M.TWENTY_FORTY_EIGHT]) + # + _test_simple_enum(CheckedMissing, Missing) class MiscTestCase(unittest.TestCase): @@ -3552,6 +3577,13 @@ def test__all__(self): CONVERT_TEST_NAME_E = 5 CONVERT_TEST_NAME_F = 5 +CONVERT_STRING_TEST_NAME_D = 5 +CONVERT_STRING_TEST_NAME_C = 5 +CONVERT_STRING_TEST_NAME_B = 5 +CONVERT_STRING_TEST_NAME_A = 5 # This one should sort first. +CONVERT_STRING_TEST_NAME_E = 5 +CONVERT_STRING_TEST_NAME_F = 5 + class TestIntEnumConvert(unittest.TestCase): def test_convert_value_lookup_priority(self): test_type = enum.IntEnum._convert_( @@ -3599,14 +3631,16 @@ def test_convert_raise(self): filter=lambda x: x.startswith('CONVERT_TEST_')) def test_convert_repr_and_str(self): + # reset global constants, as previous tests could have converted the + # integer values to enums module = ('test.test_enum', '__main__')[__name__=='__main__'] test_type = enum.IntEnum._convert_( 'UnittestConvert', module, - filter=lambda x: x.startswith('CONVERT_TEST_')) - self.assertEqual(repr(test_type.CONVERT_TEST_NAME_A), '%s.CONVERT_TEST_NAME_A' % module) - self.assertEqual(str(test_type.CONVERT_TEST_NAME_A), 'CONVERT_TEST_NAME_A') - self.assertEqual(format(test_type.CONVERT_TEST_NAME_A), '5') + filter=lambda x: x.startswith('CONVERT_STRING_TEST_')) + self.assertEqual(repr(test_type.CONVERT_STRING_TEST_NAME_A), '%s.CONVERT_STRING_TEST_NAME_A' % module) + self.assertEqual(str(test_type.CONVERT_STRING_TEST_NAME_A), 'CONVERT_STRING_TEST_NAME_A') + self.assertEqual(format(test_type.CONVERT_STRING_TEST_NAME_A), '5') # global names for StrEnum._convert_ test CONVERT_STR_TEST_2 = 'goodbye' diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index b26f1f1ad2b798..438c2ebbb3d4db 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -666,7 +666,7 @@ def __new__(cls, value, phrase, description=''): NETWORK_AUTHENTICATION_REQUIRED = (511, 'Network Authentication Required', 'The client needs to authenticate to gain network access') - enum.test_simple_enum(CheckedHTTPStatus, HTTPStatus) + enum._test_simple_enum(CheckedHTTPStatus, HTTPStatus) def test_status_lines(self): diff --git a/Lib/test/test_pstats.py b/Lib/test/test_pstats.py index a73482df6292b0..acc2fa5385d923 100644 --- a/Lib/test/test_pstats.py +++ b/Lib/test/test_pstats.py @@ -3,7 +3,7 @@ from test import support from io import StringIO from pstats import SortKey -from enum import StrEnum, test_simple_enum +from enum import StrEnum, _test_simple_enum import pstats import cProfile @@ -86,7 +86,7 @@ def __new__(cls, *values): cls._value2member_map_[other_value] = obj obj._all_values = values return obj - test_simple_enum(CheckedSortKey, SortKey) + _test_simple_enum(CheckedSortKey, SortKey) def test_sort_starts_mix(self): self.assertRaises(TypeError, self.stats.sort_stats, diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 8f943bedce3959..06b644e764aa7c 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -1,3 +1,4 @@ +import enum import errno import os import random @@ -33,6 +34,32 @@ def test_enums(self): self.assertIsInstance(sig, signal.Signals) self.assertEqual(sys.platform, "win32") + CheckedSignals = enum._old_convert_( + enum.IntEnum, 'Signals', 'signal', + lambda name: + name.isupper() + and (name.startswith('SIG') and not name.startswith('SIG_')) + or name.startswith('CTRL_'), + source=signal, + ) + enum._test_simple_enum(CheckedSignals, signal.Signals) + + CheckedHandlers = enum._old_convert_( + enum.IntEnum, 'Handlers', 'signal', + lambda name: name in ('SIG_DFL', 'SIG_IGN'), + source=signal, + ) + enum._test_simple_enum(CheckedHandlers, signal.Handlers) + + Sigmasks = getattr(signal, 'Sigmasks', None) + if Sigmasks is not None: + CheckedSigmasks = enum._old_convert_( + enum.IntEnum, 'Sigmasks', 'signal', + lambda name: name in ('SIG_BLOCK', 'SIG_UNBLOCK', 'SIG_SETMASK'), + source=signal, + ) + enum._test_simple_enum(CheckedSigmasks, Sigmasks) + @unittest.skipIf(sys.platform == "win32", "Not valid on Windows") class PosixTests(unittest.TestCase): diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index f91e00059daaa7..43a1d5bdcf5361 100755 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1941,6 +1941,41 @@ def test_socket_fileno_requires_socket_fd(self): fileno=afile.fileno()) self.assertEqual(cm.exception.errno, errno.ENOTSOCK) + def test_addressfamily_enum(self): + import _socket, enum + CheckedAddressFamily = enum._old_convert_( + enum.IntEnum, 'AddressFamily', 'socket', + lambda C: C.isupper() and C.startswith('AF_'), + source=_socket, + ) + enum._test_simple_enum(CheckedAddressFamily, socket.AddressFamily) + + def test_socketkind_enum(self): + import _socket, enum + CheckedSocketKind = enum._old_convert_( + enum.IntEnum, 'SocketKind', 'socket', + lambda C: C.isupper() and C.startswith('SOCK_'), + source=_socket, + ) + enum._test_simple_enum(CheckedSocketKind, socket.SocketKind) + + def test_msgflag_enum(self): + import _socket, enum + CheckedMsgFlag = enum._old_convert_( + enum.IntFlag, 'MsgFlag', 'socket', + lambda C: C.isupper() and C.startswith('MSG_'), + source=_socket, + ) + enum._test_simple_enum(CheckedMsgFlag, socket.MsgFlag) + + def test_addressinfo_enum(self): + import _socket, enum + CheckedAddressInfo = enum._old_convert_( + enum.IntFlag, 'AddressInfo', 'socket', + lambda C: C.isupper() and C.startswith('AI_'), + source=_socket) + enum._test_simple_enum(CheckedAddressInfo, socket.AddressInfo) + @unittest.skipUnless(HAVE_SOCKET_CAN, 'SocketCan required for this test.') class BasicCANTest(unittest.TestCase): diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index e4486b914fc50a..e9d67d88d107d4 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1177,7 +1177,10 @@ def test_options(self): self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options) if can_clear_options(): ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1) - self.assertEqual(default, ctx.options) + self.assertEqual( + default, ctx.options, + 'Failed comparison:\n ssl.OP_ALL: %50s %s\n default: %50s %s\n ctx.options: %50s %s' % (enum.bin(ssl.OP_ALL), ssl.OP_ALL, enum.bin(default), default, enum.bin(ctx.options), ctx.options), + ) ctx.options = 0 # Ubuntu has OP_NO_SSLv3 forced on by default self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3) @@ -4808,7 +4811,7 @@ class CheckedTLSVersion(enum.IntEnum): TLSv1_2 = _ssl.PROTO_TLSv1_2 TLSv1_3 = _ssl.PROTO_TLSv1_3 MAXIMUM_SUPPORTED = _ssl.PROTO_MAXIMUM_SUPPORTED - enum.test_simple_enum(CheckedTLSVersion, TLSVersion) + enum._test_simple_enum(CheckedTLSVersion, TLSVersion) def test_tlscontenttype(self): class Checked_TLSContentType(enum.IntEnum): @@ -4823,7 +4826,7 @@ class Checked_TLSContentType(enum.IntEnum): # pseudo content types HEADER = 0x100 INNER_CONTENT_TYPE = 0x101 - enum.test_simple_enum(Checked_TLSContentType, _TLSContentType) + enum._test_simple_enum(Checked_TLSContentType, _TLSContentType) def test_tlsalerttype(self): class Checked_TLSAlertType(enum.IntEnum): @@ -4865,7 +4868,7 @@ class Checked_TLSAlertType(enum.IntEnum): UNKNOWN_PSK_IDENTITY = 115 CERTIFICATE_REQUIRED = 116 NO_APPLICATION_PROTOCOL = 120 - enum.test_simple_enum(Checked_TLSAlertType, _TLSAlertType) + enum._test_simple_enum(Checked_TLSAlertType, _TLSAlertType) def test_tlsmessagetype(self): class Checked_TLSMessageType(enum.IntEnum): @@ -4895,8 +4898,56 @@ class Checked_TLSMessageType(enum.IntEnum): NEXT_PROTO = 67 MESSAGE_HASH = 254 CHANGE_CIPHER_SPEC = 0x0101 - enum.test_simple_enum(Checked_TLSMessageType, _TLSMessageType) + enum._test_simple_enum(Checked_TLSMessageType, _TLSMessageType) + + def test_sslmethod(self): + Checked_SSLMethod = enum._old_convert_( + enum.IntEnum, '_SSLMethod', 'ssl', + lambda name: name.startswith('PROTOCOL_') and name != 'PROTOCOL_SSLv23', + source=ssl._ssl, + ) + enum._test_simple_enum(Checked_SSLMethod, ssl._SSLMethod) + def test_options(self): + CheckedOptions = enum._old_convert_( + enum.FlagEnum, 'Options', 'ssl', + lambda name: name.startswith('OP_'), + source=ssl._ssl, + ) + enum._test_simple_enum(CheckedOptions, ssl.Options) + + + def test_alertdescription(self): + CheckedAlertDescription = enum._old_convert_( + enum.IntEnum, 'AlertDescription', 'ssl', + lambda name: name.startswith('ALERT_DESCRIPTION_'), + source=ssl._ssl, + ) + enum._test_simple_enum(CheckedAlertDescription, ssl.AlertDescription) + + def test_sslerrornumber(self): + Checked_SSLMethod = enum._old_convert_( + enum.IntEnum, '_SSLMethod', 'ssl', + lambda name: name.startswith('PROTOCOL_') and name != 'PROTOCOL_SSLv23', + source=ssl._ssl, + ) + enum._test_simple_enum(Checked_SSLMethod, ssl._SSLMethod) + + def test_verifyflags(self): + CheckedVerifyFlags = enum._old_convert_( + enum.FlagEnum, 'VerifyFlags', 'ssl', + lambda name: name.startswith('VERIFY_'), + source=ssl._ssl, + ) + enum._test_simple_enum(CheckedVerifyFlags, ssl.VerifyFlags) + + def test_verifymode(self): + CheckedVerifyMode = enum._old_convert_( + enum.IntEnum, 'VerifyMode', 'ssl', + lambda name: name.startswith('CERT_'), + source=ssl._ssl, + ) + enum._test_simple_enum(CheckedVerifyMode, ssl.VerifyMode) def test_main(verbose=False): if support.verbose: diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py index cfd6301059515d..3f56192c70e846 100755 --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -37,7 +37,7 @@ class CheckedSafeUUID(enum.Enum): safe = 0 unsafe = -1 unknown = None - enum.test_simple_enum(CheckedSafeUUID, py_uuid.SafeUUID) + enum._test_simple_enum(CheckedSafeUUID, py_uuid.SafeUUID) def test_UUID(self): equal = self.assertEqual diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 342429072f03aa..369004c9d1b3d4 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -144,7 +144,7 @@ def _splitdict(tk, v, cut_minus=True, conv=None): return dict -@enum.simple_enum(enum.StrEnum) +@enum._simple_enum(enum.StrEnum) class EventType: KeyPress = '2' Key = KeyPress diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index aa5becd0147b5e..d4b7cbd867bc04 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -303,7 +303,7 @@ class CheckedEventType(enum.StrEnum): Activate = '36' Deactivate = '37' MouseWheel = '38' - enum.test_simple_enum(CheckedEventType, tkinter.EventType) + enum._test_simple_enum(CheckedEventType, tkinter.EventType) def test_getboolean(self): for v in 'true', 'yes', 'on', '1', 't', 'y', 1, True: diff --git a/Lib/uuid.py b/Lib/uuid.py index 44cc541d0cb9ad..67da88560cfb12 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -47,7 +47,7 @@ import os import sys -from enum import Enum, simple_enum +from enum import Enum, _simple_enum __author__ = 'Ka-Ping Yee ' @@ -75,7 +75,7 @@ bytes_ = bytes # The built-in bytes type -@simple_enum(Enum) +@_simple_enum(Enum) class SafeUUID: safe = 0 unsafe = -1 From dfb45323ce8a543ca844c311e32c994ec9554c1b Mon Sep 17 00:00:00 2001 From: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> Date: Sun, 11 Apr 2021 00:51:35 -0400 Subject: [PATCH 006/108] bpo-43751: Fix anext() bug where it erroneously returned None (GH-25238) --- Lib/test/test_asyncgen.py | 140 +++++++++++++++++- .../2021-04-07-18-00-05.bpo-43751.8fHsqQ.rst | 1 + Objects/iterobject.c | 47 +++++- 3 files changed, 182 insertions(+), 6 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-07-18-00-05.bpo-43751.8fHsqQ.rst diff --git a/Lib/test/test_asyncgen.py b/Lib/test/test_asyncgen.py index 99464e3d0929fd..77c15c02bc8914 100644 --- a/Lib/test/test_asyncgen.py +++ b/Lib/test/test_asyncgen.py @@ -372,11 +372,8 @@ def tearDown(self): self.loop = None asyncio.set_event_loop_policy(None) - def test_async_gen_anext(self): - async def gen(): - yield 1 - yield 2 - g = gen() + def check_async_iterator_anext(self, ait_class): + g = ait_class() async def consume(): results = [] results.append(await anext(g)) @@ -388,6 +385,66 @@ async def consume(): with self.assertRaises(StopAsyncIteration): self.loop.run_until_complete(consume()) + async def test_2(): + g1 = ait_class() + self.assertEqual(await anext(g1), 1) + self.assertEqual(await anext(g1), 2) + with self.assertRaises(StopAsyncIteration): + await anext(g1) + with self.assertRaises(StopAsyncIteration): + await anext(g1) + + g2 = ait_class() + self.assertEqual(await anext(g2, "default"), 1) + self.assertEqual(await anext(g2, "default"), 2) + self.assertEqual(await anext(g2, "default"), "default") + self.assertEqual(await anext(g2, "default"), "default") + + return "completed" + + result = self.loop.run_until_complete(test_2()) + self.assertEqual(result, "completed") + + def test_async_generator_anext(self): + async def agen(): + yield 1 + yield 2 + self.check_async_iterator_anext(agen) + + def test_python_async_iterator_anext(self): + class MyAsyncIter: + """Asynchronously yield 1, then 2.""" + def __init__(self): + self.yielded = 0 + def __aiter__(self): + return self + async def __anext__(self): + if self.yielded >= 2: + raise StopAsyncIteration() + else: + self.yielded += 1 + return self.yielded + self.check_async_iterator_anext(MyAsyncIter) + + def test_python_async_iterator_types_coroutine_anext(self): + import types + class MyAsyncIterWithTypesCoro: + """Asynchronously yield 1, then 2.""" + def __init__(self): + self.yielded = 0 + def __aiter__(self): + return self + @types.coroutine + def __anext__(self): + if False: + yield "this is a generator-based coroutine" + if self.yielded >= 2: + raise StopAsyncIteration() + else: + self.yielded += 1 + return self.yielded + self.check_async_iterator_anext(MyAsyncIterWithTypesCoro) + def test_async_gen_aiter(self): async def gen(): yield 1 @@ -431,12 +488,85 @@ async def call_with_too_many_args(): await anext(gen(), 1, 3) async def call_with_wrong_type_args(): await anext(1, gen()) + async def call_with_kwarg(): + await anext(aiterator=gen()) with self.assertRaises(TypeError): self.loop.run_until_complete(call_with_too_few_args()) with self.assertRaises(TypeError): self.loop.run_until_complete(call_with_too_many_args()) with self.assertRaises(TypeError): self.loop.run_until_complete(call_with_wrong_type_args()) + with self.assertRaises(TypeError): + self.loop.run_until_complete(call_with_kwarg()) + + def test_anext_bad_await(self): + async def bad_awaitable(): + class BadAwaitable: + def __await__(self): + return 42 + class MyAsyncIter: + def __aiter__(self): + return self + def __anext__(self): + return BadAwaitable() + regex = r"__await__.*iterator" + awaitable = anext(MyAsyncIter(), "default") + with self.assertRaisesRegex(TypeError, regex): + await awaitable + awaitable = anext(MyAsyncIter()) + with self.assertRaisesRegex(TypeError, regex): + await awaitable + return "completed" + result = self.loop.run_until_complete(bad_awaitable()) + self.assertEqual(result, "completed") + + async def check_anext_returning_iterator(self, aiter_class): + awaitable = anext(aiter_class(), "default") + with self.assertRaises(TypeError): + await awaitable + awaitable = anext(aiter_class()) + with self.assertRaises(TypeError): + await awaitable + return "completed" + + def test_anext_return_iterator(self): + class WithIterAnext: + def __aiter__(self): + return self + def __anext__(self): + return iter("abc") + result = self.loop.run_until_complete(self.check_anext_returning_iterator(WithIterAnext)) + self.assertEqual(result, "completed") + + def test_anext_return_generator(self): + class WithGenAnext: + def __aiter__(self): + return self + def __anext__(self): + yield + result = self.loop.run_until_complete(self.check_anext_returning_iterator(WithGenAnext)) + self.assertEqual(result, "completed") + + def test_anext_await_raises(self): + class RaisingAwaitable: + def __await__(self): + raise ZeroDivisionError() + yield + class WithRaisingAwaitableAnext: + def __aiter__(self): + return self + def __anext__(self): + return RaisingAwaitable() + async def do_test(): + awaitable = anext(WithRaisingAwaitableAnext()) + with self.assertRaises(ZeroDivisionError): + await awaitable + awaitable = anext(WithRaisingAwaitableAnext(), "default") + with self.assertRaises(ZeroDivisionError): + await awaitable + return "completed" + result = self.loop.run_until_complete(do_test()) + self.assertEqual(result, "completed") def test_aiter_bad_args(self): async def gen(): diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-07-18-00-05.bpo-43751.8fHsqQ.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-07-18-00-05.bpo-43751.8fHsqQ.rst new file mode 100644 index 00000000000000..75951ae794d106 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-07-18-00-05.bpo-43751.8fHsqQ.rst @@ -0,0 +1 @@ +Fixed a bug where ``anext(ait, default)`` would erroneously return None. \ No newline at end of file diff --git a/Objects/iterobject.c b/Objects/iterobject.c index 65af18abf79deb..6961fc3b4a9497 100644 --- a/Objects/iterobject.c +++ b/Objects/iterobject.c @@ -316,7 +316,52 @@ anextawaitable_traverse(anextawaitableobject *obj, visitproc visit, void *arg) static PyObject * anextawaitable_iternext(anextawaitableobject *obj) { - PyObject *result = PyIter_Next(obj->wrapped); + /* Consider the following class: + * + * class A: + * async def __anext__(self): + * ... + * a = A() + * + * Then `await anext(a)` should call + * a.__anext__().__await__().__next__() + * + * On the other hand, given + * + * async def agen(): + * yield 1 + * yield 2 + * gen = agen() + * + * Then `await anext(gen)` can just call + * gen.__anext__().__next__() + */ + assert(obj->wrapped != NULL); + PyObject *awaitable = _PyCoro_GetAwaitableIter(obj->wrapped); + if (awaitable == NULL) { + return NULL; + } + if (Py_TYPE(awaitable)->tp_iternext == NULL) { + /* _PyCoro_GetAwaitableIter returns a Coroutine, a Generator, + * or an iterator. Of these, only coroutines lack tp_iternext. + */ + assert(PyCoro_CheckExact(awaitable)); + unaryfunc getter = Py_TYPE(awaitable)->tp_as_async->am_await; + PyObject *new_awaitable = getter(awaitable); + if (new_awaitable == NULL) { + Py_DECREF(awaitable); + return NULL; + } + Py_SETREF(awaitable, new_awaitable); + if (Py_TYPE(awaitable)->tp_iternext == NULL) { + PyErr_SetString(PyExc_TypeError, + "__await__ returned a non-iterable"); + Py_DECREF(awaitable); + return NULL; + } + } + PyObject *result = (*Py_TYPE(awaitable)->tp_iternext)(awaitable); + Py_DECREF(awaitable); if (result != NULL) { return result; } From 79650d0118b0a8861428b9dd063089de405cf137 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 11 Apr 2021 09:33:59 +0100 Subject: [PATCH 007/108] Fix description of behaviour of an exception class in 'from' clause (GH-24303) --- Doc/reference/simple_stmts.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 3fff8484856ab1..941b3427d635e5 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -591,10 +591,13 @@ instance, with its traceback set to its argument), like so:: __context__ (exception attribute) The ``from`` clause is used for exception chaining: if given, the second -*expression* must be another exception class or instance, which will then be -attached to the raised exception as the :attr:`__cause__` attribute (which is -writable). If the raised exception is not handled, both exceptions will be -printed:: +*expression* must be another exception class or instance. If the second +expression is an exception instance, it will be attached to the raised +exception as the :attr:`__cause__` attribute (which is writable). If the +expression is an exception class, the class will be instantiated and the +resulting exception instance will be attached to the raised exception as the +:attr:`__cause__` attribute. If the raised exception is not handled, both +exceptions will be printed:: >>> try: ... print(1 / 0) From 63bf1abfdc2db2798e477c38f41c486e702b7542 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev <2155800+skirpichev@users.noreply.github.com> Date: Sun, 11 Apr 2021 11:50:42 +0300 Subject: [PATCH 008/108] Fix typo in 3.10.0a7.rst (GH-25340) --- Misc/NEWS.d/3.10.0a7.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/3.10.0a7.rst b/Misc/NEWS.d/3.10.0a7.rst index e53f6ba84e43d0..a20072b7ae11e0 100644 --- a/Misc/NEWS.d/3.10.0a7.rst +++ b/Misc/NEWS.d/3.10.0a7.rst @@ -534,7 +534,7 @@ during connection setup. .. nonce: cee_X5 .. section: Library -Improve performance of class:`fractions.Fraction` arithmetics for large +Improve performance of :class:`fractions.Fraction` arithmetics for large components. Contributed by Sergey B. Kirpichev. .. From b38601d49675d90e1ee6faa47f7adaeca992d02d Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sun, 11 Apr 2021 21:26:09 +0800 Subject: [PATCH 009/108] bpo-42967: coerce bytes separator to string in urllib.parse_qs(l) (#24818) * coerce bytes separator to string * Add news * Update Misc/NEWS.d/next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst --- Lib/test/test_urlparse.py | 4 ++++ Lib/urllib/parse.py | 1 + .../next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py index 3b1c360625b5a6..c543ac9a4ba72e 100644 --- a/Lib/test/test_urlparse.py +++ b/Lib/test/test_urlparse.py @@ -893,6 +893,8 @@ def test_parse_qs_separator(self): with self.subTest(f"Original: {orig!r}, Expected: {expect!r}"): result = urllib.parse.parse_qs(orig, separator=';') self.assertEqual(result, expect, "Error parsing %r" % orig) + result_bytes = urllib.parse.parse_qs(orig, separator=b';') + self.assertEqual(result_bytes, expect, "Error parsing %r" % orig) def test_parse_qsl_separator(self): @@ -912,6 +914,8 @@ def test_parse_qsl_separator(self): with self.subTest(f"Original: {orig!r}, Expected: {expect!r}"): result = urllib.parse.parse_qsl(orig, separator=';') self.assertEqual(result, expect, "Error parsing %r" % orig) + result_bytes = urllib.parse.parse_qsl(orig, separator=b';') + self.assertEqual(result_bytes, expect, "Error parsing %r" % orig) def test_urlencode_sequences(self): diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py index 335e183498d8bd..21cae47bf38a36 100644 --- a/Lib/urllib/parse.py +++ b/Lib/urllib/parse.py @@ -733,6 +733,7 @@ def parse_qsl(qs, keep_blank_values=False, strict_parsing=False, Returns a list, as G-d intended. """ qs, _coerce_result = _coerce_args(qs) + separator, _ = _coerce_args(separator) if not separator or (not isinstance(separator, (str, bytes))): raise ValueError("Separator must be of type string or bytes.") diff --git a/Misc/NEWS.d/next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst b/Misc/NEWS.d/next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst new file mode 100644 index 00000000000000..f8ad3eaaedd785 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-03-11-00-31-41.bpo-42967.2PeQRw.rst @@ -0,0 +1,3 @@ +Allow :class:`bytes` ``separator`` argument in ``urllib.parse.parse_qs`` and +``urllib.parse.parse_qsl`` when parsing :class:`str` query strings. Previously, +this raised a ``TypeError``. From 53114ffef1d4facf9aa5545e711abbbda66f672a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 11 Apr 2021 23:57:09 +0200 Subject: [PATCH 010/108] bpo-43770: Refactor PyType_Ready() function (GH-25336) * Split PyType_Ready() into sub-functions. * type_ready_mro() now checks if bases are static types earlier. * Check tp_name earlier, in type_ready_checks(). * Add _PyType_IsReady() macro to check if a type is ready. --- Include/internal/pycore_object.h | 4 + Objects/typeobject.c | 424 ++++++++++++++++++++----------- 2 files changed, 274 insertions(+), 154 deletions(-) diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 79c1c44ae72d60..9dfc8c62babadb 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -174,6 +174,10 @@ extern int _Py_CheckSlotResult( const char *slot_name, int success); +// PyType_Ready() must be called if _PyType_IsReady() is false. +// See also the Py_TPFLAGS_READY flag. +#define _PyType_IsReady(type) ((type)->tp_dict != NULL) + #ifdef __cplusplus } #endif diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 6386b3b39144f9..75dd604d39c457 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -1815,7 +1815,7 @@ mro_implementation(PyTypeObject *type) PyObject **to_merge; Py_ssize_t i, n; - if (type->tp_dict == NULL) { + if (!_PyType_IsReady(type)) { if (PyType_Ready(type) < 0) return NULL; } @@ -2084,7 +2084,7 @@ best_base(PyObject *bases) return NULL; } base_i = (PyTypeObject *)base_proto; - if (base_i->tp_dict == NULL) { + if (!_PyType_IsReady(base_i)) { if (PyType_Ready(base_i) < 0) return NULL; } @@ -2429,6 +2429,7 @@ typedef struct { } type_new_ctx; +/* Check for valid slot names and two special cases */ static int type_new_visit_slots(type_new_ctx *ctx) { @@ -2464,6 +2465,10 @@ type_new_visit_slots(type_new_ctx *ctx) } +/* Copy slots into a list, mangle names and sort them. + Sorted names are needed for __class__ assignment. + Convert them back to tuple at the end. +*/ static PyObject* type_new_copy_slots(type_new_ctx *ctx, PyObject *dict) { @@ -2554,7 +2559,7 @@ type_new_slots_bases(type_new_ctx *ctx) if (ctx->may_add_dict && ctx->add_dict == 0 && type->tp_dictoffset != 0) { - (ctx->add_dict)++; + ctx->add_dict++; } if (ctx->may_add_weak && ctx->add_weak == 0 && type->tp_weaklistoffset != 0) @@ -2585,15 +2590,10 @@ type_new_slots_impl(type_new_ctx *ctx, PyObject *dict) return -1; } - /* Check for valid slot names and two special cases */ if (type_new_visit_slots(ctx) < 0) { return -1; } - /* Copy slots into a list, mangle names and sort them. - Sorted names are needed for __class__ assignment. - Convert them back to tuple at the end. - */ PyObject *new_slots = type_new_copy_slots(ctx, dict); if (new_slots == NULL) { return -1; @@ -2698,6 +2698,7 @@ type_new_set_name(const type_new_ctx *ctx, PyTypeObject *type) } +/* Set __module__ in the dict */ static int type_new_set_module(PyTypeObject *type) { @@ -2729,6 +2730,8 @@ type_new_set_module(PyTypeObject *type) } +/* Set ht_qualname to dict['__qualname__'] if available, else to + __name__. The __qualname__ accessor will look for ht_qualname. */ static int type_new_set_ht_name(PyTypeObject *type) { @@ -2757,6 +2760,9 @@ type_new_set_ht_name(PyTypeObject *type) } +/* Set tp_doc to a copy of dict['__doc__'], if the latter is there + and is a string. The __doc__ accessor will first look for tp_doc; + if that fails, it will still look into __dict__. */ static int type_new_set_doc(PyTypeObject *type) { @@ -2847,6 +2853,7 @@ type_new_classmethod(PyTypeObject *type, _Py_Identifier *attr_id) } +/* Add descriptors for custom slots from __slots__, or for __dict__ */ static int type_new_descriptors(const type_new_ctx *ctx, PyTypeObject *type) { @@ -2924,6 +2931,7 @@ type_new_set_slots(const type_new_ctx *ctx, PyTypeObject *type) } +/* store type in class' cell if one is supplied */ static int type_new_set_classcell(PyTypeObject *type) { @@ -2959,20 +2967,14 @@ type_new_set_attrs(const type_new_ctx *ctx, PyTypeObject *type) return -1; } - /* Set __module__ in the dict */ if (type_new_set_module(type) < 0) { return -1; } - /* Set ht_qualname to dict['__qualname__'] if available, else to - __name__. The __qualname__ accessor will look for ht_qualname. */ if (type_new_set_ht_name(type) < 0) { return -1; } - /* Set tp_doc to a copy of dict['__doc__'], if the latter is there - and is a string. The __doc__ accessor will first look for tp_doc; - if that fails, it will still look into __dict__. */ if (type_new_set_doc(type) < 0) { return -1; } @@ -2992,14 +2994,12 @@ type_new_set_attrs(const type_new_ctx *ctx, PyTypeObject *type) return -1; } - /* Add descriptors for custom slots from __slots__, or for __dict__ */ if (type_new_descriptors(ctx, type) < 0) { return -1; } type_new_set_slots(ctx, type); - /* store type in class' cell if one is supplied */ if (type_new_set_classcell(type) < 0) { return -1; } @@ -3784,7 +3784,7 @@ type_getattro(PyTypeObject *type, PyObject *name) } /* Initialize this type (we'll assume the metatype is initialized) */ - if (type->tp_dict == NULL) { + if (!_PyType_IsReady(type)) { if (PyType_Ready(type) < 0) return NULL; } @@ -5817,20 +5817,10 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base) static int add_operators(PyTypeObject *); -int -PyType_Ready(PyTypeObject *type) -{ - PyObject *dict, *bases; - PyTypeObject *base; - Py_ssize_t i, n; - - if (type->tp_flags & Py_TPFLAGS_READY) { - assert(_PyType_CheckConsistency(type)); - return 0; - } - _PyObject_ASSERT((PyObject *)type, - (type->tp_flags & Py_TPFLAGS_READYING) == 0); +static int +type_ready_checks(PyTypeObject *type) +{ /* Consistency checks for PEP 590: * - Py_TPFLAGS_METHOD_DESCRIPTOR requires tp_descr_get * - Py_TPFLAGS_HAVE_VECTORCALL requires tp_call and @@ -5844,6 +5834,7 @@ PyType_Ready(PyTypeObject *type) _PyObject_ASSERT((PyObject *)type, type->tp_vectorcall_offset > 0); _PyObject_ASSERT((PyObject *)type, type->tp_call != NULL); } + /* Consistency check for Py_TPFLAGS_HAVE_AM_SEND - flag requires * type->tp_as_async->am_send to be present. */ @@ -5852,25 +5843,20 @@ PyType_Ready(PyTypeObject *type) _PyObject_ASSERT((PyObject *)type, type->tp_as_async->am_send != NULL); } - type->tp_flags |= Py_TPFLAGS_READYING; - -#ifdef Py_TRACE_REFS - /* PyType_Ready is the closest thing we have to a choke point - * for type objects, so is the best place I can think of to try - * to get type objects into the doubly-linked list of all objects. - * Still, not all type objects go through PyType_Ready. - */ - _Py_AddToAllObjects((PyObject *)type, 0); -#endif - if (type->tp_name == NULL) { PyErr_Format(PyExc_SystemError, "Type does not define the tp_name field."); - goto error; + return -1; } + return 0; +} + +static int +type_ready_set_base(PyTypeObject *type) +{ /* Initialize tp_base (defaults to BaseObject unless that's us) */ - base = type->tp_base; + PyTypeObject *base = type->tp_base; if (base == NULL && type != &PyBaseObject_Type) { base = &PyBaseObject_Type; if (type->tp_flags & Py_TPFLAGS_HEAPTYPE) { @@ -5882,13 +5868,13 @@ PyType_Ready(PyTypeObject *type) } /* Now the only way base can still be NULL is if type is - * &PyBaseObject_Type. - */ + * &PyBaseObject_Type. */ /* Initialize the base class */ - if (base != NULL && base->tp_dict == NULL) { - if (PyType_Ready(base) < 0) - goto error; + if (base != NULL && !_PyType_IsReady(base)) { + if (PyType_Ready(base) < 0) { + return -1; + } } /* Initialize ob_type if NULL. This means extensions that want to be @@ -5901,83 +5887,115 @@ PyType_Ready(PyTypeObject *type) if (Py_IS_TYPE(type, NULL) && base != NULL) { Py_SET_TYPE(type, Py_TYPE(base)); } + return 0; +} + +static int +type_ready_add_attrs(PyTypeObject *type) +{ /* Initialize tp_bases */ - bases = type->tp_bases; + PyObject *bases = type->tp_bases; if (bases == NULL) { - if (base == NULL) + PyTypeObject *base = type->tp_base; + if (base == NULL) { bases = PyTuple_New(0); - else + } + else { bases = PyTuple_Pack(1, base); - if (bases == NULL) - goto error; + } + if (bases == NULL) { + return -1; + } type->tp_bases = bases; } /* Initialize tp_dict */ - dict = type->tp_dict; + PyObject *dict = type->tp_dict; if (dict == NULL) { dict = PyDict_New(); - if (dict == NULL) - goto error; + if (dict == NULL) { + return -1; + } type->tp_dict = dict; } /* Add type-specific descriptors to tp_dict */ - if (add_operators(type) < 0) - goto error; + if (add_operators(type) < 0) { + return -1; + } if (type->tp_methods != NULL) { - if (add_methods(type, type->tp_methods) < 0) - goto error; + if (add_methods(type, type->tp_methods) < 0) { + return -1; + } } if (type->tp_members != NULL) { - if (add_members(type, type->tp_members) < 0) - goto error; + if (add_members(type, type->tp_members) < 0) { + return -1; + } } if (type->tp_getset != NULL) { - if (add_getset(type, type->tp_getset) < 0) - goto error; + if (add_getset(type, type->tp_getset) < 0) { + return -1; + } } + return 0; +} + +static int +type_ready_mro(PyTypeObject *type) +{ /* Calculate method resolution order */ - if (mro_internal(type, NULL) < 0) - goto error; + if (mro_internal(type, NULL) < 0) { + return -1; + } + assert(type->tp_mro != NULL); + assert(PyTuple_Check(type->tp_mro)); + + /* All bases of statically allocated type should be statically allocated */ + if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) { + PyObject *mro = type->tp_mro; + Py_ssize_t n = PyTuple_GET_SIZE(mro); + for (Py_ssize_t i = 0; i < n; i++) { + PyTypeObject *base = (PyTypeObject *)PyTuple_GET_ITEM(mro, i); + if (PyType_Check(base) && (base->tp_flags & Py_TPFLAGS_HEAPTYPE)) { + PyErr_Format(PyExc_TypeError, + "type '%.100s' is not dynamically allocated but " + "its base type '%.100s' is dynamically allocated", + type->tp_name, base->tp_name); + return -1; + } + } + } + return 0; +} + +static int +type_ready_inherit(PyTypeObject *type) +{ /* Inherit special flags from dominant base */ - if (type->tp_base != NULL) + if (type->tp_base != NULL) { inherit_special(type, type->tp_base); + } /* Initialize tp_dict properly */ - bases = type->tp_mro; - assert(bases != NULL); - assert(PyTuple_Check(bases)); - n = PyTuple_GET_SIZE(bases); - for (i = 1; i < n; i++) { - PyObject *b = PyTuple_GET_ITEM(bases, i); + PyObject *mro = type->tp_mro; + Py_ssize_t n = PyTuple_GET_SIZE(type->tp_mro); + for (Py_ssize_t i = 1; i < n; i++) { + PyObject *b = PyTuple_GET_ITEM(mro, i); if (PyType_Check(b)) { if (inherit_slots(type, (PyTypeObject *)b) < 0) { - goto error; + return -1; } } } - /* All bases of statically allocated type should be statically allocated */ - if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) - for (i = 0; i < n; i++) { - PyObject *b = PyTuple_GET_ITEM(bases, i); - if (PyType_Check(b) && - (((PyTypeObject *)b)->tp_flags & Py_TPFLAGS_HEAPTYPE)) { - PyErr_Format(PyExc_TypeError, - "type '%.100s' is not dynamically allocated but " - "its base type '%.100s' is dynamically allocated", - type->tp_name, ((PyTypeObject *)b)->tp_name); - goto error; - } - } - /* Sanity check for tp_free. */ if (_PyType_IS_GC(type) && (type->tp_flags & Py_TPFLAGS_BASETYPE) && - (type->tp_free == NULL || type->tp_free == PyObject_Del)) { + (type->tp_free == NULL || type->tp_free == PyObject_Del)) + { /* This base class needs to call tp_free, but doesn't have * one, or its tp_free is for non-gc'ed objects. */ @@ -5985,89 +6003,187 @@ PyType_Ready(PyTypeObject *type) "gc and is a base type but has inappropriate " "tp_free slot", type->tp_name); - goto error; + return -1; } + return 0; +} - /* if the type dictionary doesn't contain a __doc__, set it from - the tp_doc slot. - */ + +/* If the type dictionary doesn't contain a __doc__, set it from + the tp_doc slot. */ +static int +type_ready_set_doc(PyTypeObject *type) +{ int r = _PyDict_ContainsId(type->tp_dict, &PyId___doc__); if (r < 0) { - goto error; + return -1; } - if (r == 0) { - if (type->tp_doc != NULL) { - const char *old_doc = _PyType_DocWithoutSignature(type->tp_name, - type->tp_doc); - PyObject *doc = PyUnicode_FromString(old_doc); - if (doc == NULL) - goto error; - if (_PyDict_SetItemId(type->tp_dict, &PyId___doc__, doc) < 0) { - Py_DECREF(doc); - goto error; - } - Py_DECREF(doc); - } else { - if (_PyDict_SetItemId(type->tp_dict, - &PyId___doc__, Py_None) < 0) - goto error; - } + if (r > 0) { + return 0; } - /* Hack for tp_hash and __hash__. - If after all that, tp_hash is still NULL, and __hash__ is not in - tp_dict, set tp_hash to PyObject_HashNotImplemented and - tp_dict['__hash__'] equal to None. - This signals that __hash__ is not inherited. - */ - if (type->tp_hash == NULL) { - r = _PyDict_ContainsId(type->tp_dict, &PyId___hash__); - if (r < 0) { - goto error; + if (type->tp_doc != NULL) { + const char *doc_str; + doc_str = _PyType_DocWithoutSignature(type->tp_name, type->tp_doc); + PyObject *doc = PyUnicode_FromString(doc_str); + if (doc == NULL) { + return -1; } - if (r == 0) { - if (_PyDict_SetItemId(type->tp_dict, &PyId___hash__, Py_None) < 0) { - goto error; - } - type->tp_hash = PyObject_HashNotImplemented; + + if (_PyDict_SetItemId(type->tp_dict, &PyId___doc__, doc) < 0) { + Py_DECREF(doc); + return -1; + } + Py_DECREF(doc); + } + else { + if (_PyDict_SetItemId(type->tp_dict, &PyId___doc__, Py_None) < 0) { + return -1; } } + return 0; +} - /* Some more special stuff */ - base = type->tp_base; - if (base != NULL) { - if (type->tp_as_async == NULL) - type->tp_as_async = base->tp_as_async; - if (type->tp_as_number == NULL) - type->tp_as_number = base->tp_as_number; - if (type->tp_as_sequence == NULL) - type->tp_as_sequence = base->tp_as_sequence; - if (type->tp_as_mapping == NULL) - type->tp_as_mapping = base->tp_as_mapping; - if (type->tp_as_buffer == NULL) - type->tp_as_buffer = base->tp_as_buffer; - } - - /* Link into each base class's list of subclasses */ - bases = type->tp_bases; - n = PyTuple_GET_SIZE(bases); - for (i = 0; i < n; i++) { + +/* Hack for tp_hash and __hash__. + If after all that, tp_hash is still NULL, and __hash__ is not in + tp_dict, set tp_hash to PyObject_HashNotImplemented and + tp_dict['__hash__'] equal to None. + This signals that __hash__ is not inherited. */ +static int +type_ready_set_hash(PyTypeObject *type) +{ + if (type->tp_hash != NULL) { + return 0; + } + + int r = _PyDict_ContainsId(type->tp_dict, &PyId___hash__); + if (r < 0) { + return -1; + } + if (r > 0) { + return 0; + } + + if (_PyDict_SetItemId(type->tp_dict, &PyId___hash__, Py_None) < 0) { + return -1; + } + type->tp_hash = PyObject_HashNotImplemented; + return 0; +} + + +/* Some more special stuff */ +static void +type_ready_inherit_special(PyTypeObject *type) +{ + PyTypeObject *base = type->tp_base; + if (base == NULL) { + return; + } + + if (type->tp_as_async == NULL) { + type->tp_as_async = base->tp_as_async; + } + if (type->tp_as_number == NULL) { + type->tp_as_number = base->tp_as_number; + } + if (type->tp_as_sequence == NULL) { + type->tp_as_sequence = base->tp_as_sequence; + } + if (type->tp_as_mapping == NULL) { + type->tp_as_mapping = base->tp_as_mapping; + } + if (type->tp_as_buffer == NULL) { + type->tp_as_buffer = base->tp_as_buffer; + } +} + + +/* Link into each base class's list of subclasses */ +static int +type_ready_add_subclasses(PyTypeObject *type) +{ + PyObject *bases = type->tp_bases; + Py_ssize_t nbase = PyTuple_GET_SIZE(bases); + for (Py_ssize_t i = 0; i < nbase; i++) { PyObject *b = PyTuple_GET_ITEM(bases, i); - if (PyType_Check(b) && - add_subclass((PyTypeObject *)b, type) < 0) - goto error; + if (PyType_Check(b) && add_subclass((PyTypeObject *)b, type) < 0) { + return -1; + } + } + return 0; +} + + +static int +type_ready(PyTypeObject *type) +{ + if (type_ready_checks(type) < 0) { + return -1; + } + +#ifdef Py_TRACE_REFS + /* PyType_Ready is the closest thing we have to a choke point + * for type objects, so is the best place I can think of to try + * to get type objects into the doubly-linked list of all objects. + * Still, not all type objects go through PyType_Ready. + */ + _Py_AddToAllObjects((PyObject *)type, 0); +#endif + + if (type_ready_set_base(type) < 0) { + return -1; + } + if (type_ready_add_attrs(type) < 0) { + return -1; + } + if (type_ready_mro(type) < 0) { + return -1; + } + if (type_ready_inherit(type) < 0) { + return -1; } + if (type_ready_set_doc(type) < 0) { + return -1; + } + if (type_ready_set_hash(type) < 0) { + return -1; + } + + type_ready_inherit_special(type); + + if (type_ready_add_subclasses(type) < 0) { + return -1; + } + return 0; +} + + +int +PyType_Ready(PyTypeObject *type) +{ + if (type->tp_flags & Py_TPFLAGS_READY) { + assert(_PyType_CheckConsistency(type)); + return 0; + } + _PyObject_ASSERT((PyObject *)type, + (type->tp_flags & Py_TPFLAGS_READYING) == 0); + + type->tp_flags |= Py_TPFLAGS_READYING; + + if (type_ready(type) < 0) { + type->tp_flags &= ~Py_TPFLAGS_READYING; + return -1; + } + /* All done -- set the ready flag */ - type->tp_flags = - (type->tp_flags & ~Py_TPFLAGS_READYING) | Py_TPFLAGS_READY; + type->tp_flags = (type->tp_flags & ~Py_TPFLAGS_READYING) | Py_TPFLAGS_READY; assert(_PyType_CheckConsistency(type)); return 0; - - error: - type->tp_flags &= ~Py_TPFLAGS_READYING; - return -1; } + static int add_subclass(PyTypeObject *base, PyTypeObject *type) { From 553ee2781a37ac9d2068da3e1325a780ca79e21e Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 12 Apr 2021 00:21:22 +0200 Subject: [PATCH 011/108] bpo-43682: Make staticmethod objects callable (GH-25117) Static methods (@staticmethod) are now callable as regular functions. --- Doc/library/functions.rst | 15 ++++++++++----- Doc/reference/datamodel.rst | 5 ++--- Doc/whatsnew/3.10.rst | 1 + Lib/test/test_decorators.py | 12 ++++++++---- Lib/test/test_pydoc.py | 2 +- .../2021-03-31-16-32-57.bpo-43682.VSF3vg.rst | 2 ++ Objects/funcobject.c | 9 ++++++++- 7 files changed, 32 insertions(+), 14 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-03-31-16-32-57.bpo-43682.VSF3vg.rst diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index dca8b9334877d6..30f62e69e7fb9f 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1619,8 +1619,9 @@ are always available. They are listed here in alphabetical order. The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:`function` for details. - A static method can be called either on the class (such as ``C.f()``) or on an instance (such - as ``C().f()``). + A static method can be called either on the class (such as ``C.f()``) or on + an instance (such as ``C().f()``). Moreover, they can be called as regular + functions (such as ``f()``). Static methods in Python are similar to those found in Java or C++. Also see :func:`classmethod` for a variant that is useful for creating alternate class @@ -1632,15 +1633,19 @@ are always available. They are listed here in alphabetical order. body and you want to avoid the automatic transformation to instance method. For these cases, use this idiom:: + def regular_function(): + ... + class C: - builtin_open = staticmethod(open) + method = staticmethod(regular_function) For more information on static methods, see :ref:`types`. .. versionchanged:: 3.10 Static methods now inherit the method attributes (``__module__``, - ``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``) and - have a new ``__wrapped__`` attribute. + ``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``), + have a new ``__wrapped__`` attribute, and are now callable as regular + functions. .. index:: diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 9c819b7ae6d28f..3b8780d834bf0c 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1132,9 +1132,8 @@ Internal types around any other object, usually a user-defined method object. When a static method object is retrieved from a class or a class instance, the object actually returned is the wrapped object, which is not subject to any further - transformation. Static method objects are not themselves callable, although the - objects they wrap usually are. Static method objects are created by the built-in - :func:`staticmethod` constructor. + transformation. Static method objects are also callable. Static method + objects are created by the built-in :func:`staticmethod` constructor. Class method objects A class method object, like a static method object, is a wrapper around another diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 50c8d53e57d835..9f6b7a469ca492 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -623,6 +623,7 @@ Other Language Changes (:func:`@classmethod `) now inherit the method attributes (``__module__``, ``__name__``, ``__qualname__``, ``__doc__``, ``__annotations__``) and have a new ``__wrapped__`` attribute. + Moreover, static methods are now callable as regular functions. (Contributed by Victor Stinner in :issue:`43682`.) diff --git a/Lib/test/test_decorators.py b/Lib/test/test_decorators.py index 7d0243ab199393..d4353457933f3d 100644 --- a/Lib/test/test_decorators.py +++ b/Lib/test/test_decorators.py @@ -91,14 +91,18 @@ def func(x): getattr(func, attr)) self.assertEqual(repr(wrapper), format_str.format(func)) - - self.assertRaises(TypeError, wrapper, 1) + return wrapper def test_staticmethod(self): - self.check_wrapper_attrs(staticmethod, '') + wrapper = self.check_wrapper_attrs(staticmethod, '') + + # bpo-43682: Static methods are callable since Python 3.10 + self.assertEqual(wrapper(1), 1) def test_classmethod(self): - self.check_wrapper_attrs(classmethod, '') + wrapper = self.check_wrapper_attrs(classmethod, '') + + self.assertRaises(TypeError, wrapper, 1) def test_dotted(self): decorators = MiscDecorators() diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index e94ebd30160e02..9bde0c75bc9067 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -1142,7 +1142,7 @@ def sm(x, y): '''A static method''' ... self.assertEqual(self._get_summary_lines(X.__dict__['sm']), - 'sm(...)\n' + 'sm(x, y)\n' ' A static method\n') self.assertEqual(self._get_summary_lines(X.sm), """\ sm(x, y) diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-03-31-16-32-57.bpo-43682.VSF3vg.rst b/Misc/NEWS.d/next/Core and Builtins/2021-03-31-16-32-57.bpo-43682.VSF3vg.rst new file mode 100644 index 00000000000000..1ad949389a1f64 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-03-31-16-32-57.bpo-43682.VSF3vg.rst @@ -0,0 +1,2 @@ +Static methods (:func:`@staticmethod `) are now callable as +regular functions. Patch by Victor Stinner. diff --git a/Objects/funcobject.c b/Objects/funcobject.c index df59131912190b..f0b0b673d4fa40 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -1040,6 +1040,13 @@ sm_init(PyObject *self, PyObject *args, PyObject *kwds) return 0; } +static PyObject* +sm_call(PyObject *callable, PyObject *args, PyObject *kwargs) +{ + staticmethod *sm = (staticmethod *)callable; + return PyObject_Call(sm->sm_callable, args, kwargs); +} + static PyMemberDef sm_memberlist[] = { {"__func__", T_OBJECT, offsetof(staticmethod, sm_callable), READONLY}, {"__wrapped__", T_OBJECT, offsetof(staticmethod, sm_callable), READONLY}, @@ -1107,7 +1114,7 @@ PyTypeObject PyStaticMethod_Type = { 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ - 0, /* tp_call */ + sm_call, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ From cc2ffcdfd78df3a18edae60df81b2f1b044b1634 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Mon, 12 Apr 2021 14:46:53 +0900 Subject: [PATCH 012/108] bpo-43785: Improve BZ2File performance by removing RLock (GH-25299) Remove `RLock` from `BZ2File`. It makes `BZ2File` to thread unsafe, but gzip and lzma don't use it too. Co-authored-by: Gregory P. Smith --- Lib/bz2.py | 103 ++++++++---------- .../2021-04-09-14-51-58.bpo-43785.1mM5xE.rst | 4 + 2 files changed, 48 insertions(+), 59 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-09-14-51-58.bpo-43785.1mM5xE.rst diff --git a/Lib/bz2.py b/Lib/bz2.py index 1da3ce65c81b7d..43f321ae852398 100644 --- a/Lib/bz2.py +++ b/Lib/bz2.py @@ -13,7 +13,6 @@ import io import os import _compression -from threading import RLock from _bz2 import BZ2Compressor, BZ2Decompressor @@ -53,9 +52,6 @@ def __init__(self, filename, mode="r", *, compresslevel=9): If mode is 'r', the input file may be the concatenation of multiple compressed streams. """ - # This lock must be recursive, so that BufferedIOBase's - # writelines() does not deadlock. - self._lock = RLock() self._fp = None self._closefp = False self._mode = _MODE_CLOSED @@ -104,24 +100,23 @@ def close(self): May be called more than once without error. Once the file is closed, any other operation on it will raise a ValueError. """ - with self._lock: - if self._mode == _MODE_CLOSED: - return + if self._mode == _MODE_CLOSED: + return + try: + if self._mode == _MODE_READ: + self._buffer.close() + elif self._mode == _MODE_WRITE: + self._fp.write(self._compressor.flush()) + self._compressor = None + finally: try: - if self._mode == _MODE_READ: - self._buffer.close() - elif self._mode == _MODE_WRITE: - self._fp.write(self._compressor.flush()) - self._compressor = None + if self._closefp: + self._fp.close() finally: - try: - if self._closefp: - self._fp.close() - finally: - self._fp = None - self._closefp = False - self._mode = _MODE_CLOSED - self._buffer = None + self._fp = None + self._closefp = False + self._mode = _MODE_CLOSED + self._buffer = None @property def closed(self): @@ -153,12 +148,11 @@ def peek(self, n=0): Always returns at least one byte of data, unless at EOF. The exact number of bytes returned is unspecified. """ - with self._lock: - self._check_can_read() - # Relies on the undocumented fact that BufferedReader.peek() - # always returns at least one byte (except at EOF), independent - # of the value of n - return self._buffer.peek(n) + self._check_can_read() + # Relies on the undocumented fact that BufferedReader.peek() + # always returns at least one byte (except at EOF), independent + # of the value of n + return self._buffer.peek(n) def read(self, size=-1): """Read up to size uncompressed bytes from the file. @@ -166,9 +160,8 @@ def read(self, size=-1): If size is negative or omitted, read until EOF is reached. Returns b'' if the file is already at EOF. """ - with self._lock: - self._check_can_read() - return self._buffer.read(size) + self._check_can_read() + return self._buffer.read(size) def read1(self, size=-1): """Read up to size uncompressed bytes, while trying to avoid @@ -177,20 +170,18 @@ def read1(self, size=-1): Returns b'' if the file is at EOF. """ - with self._lock: - self._check_can_read() - if size < 0: - size = io.DEFAULT_BUFFER_SIZE - return self._buffer.read1(size) + self._check_can_read() + if size < 0: + size = io.DEFAULT_BUFFER_SIZE + return self._buffer.read1(size) def readinto(self, b): """Read bytes into b. Returns the number of bytes read (0 for EOF). """ - with self._lock: - self._check_can_read() - return self._buffer.readinto(b) + self._check_can_read() + return self._buffer.readinto(b) def readline(self, size=-1): """Read a line of uncompressed bytes from the file. @@ -203,9 +194,8 @@ def readline(self, size=-1): if not hasattr(size, "__index__"): raise TypeError("Integer argument expected") size = size.__index__() - with self._lock: - self._check_can_read() - return self._buffer.readline(size) + self._check_can_read() + return self._buffer.readline(size) def readlines(self, size=-1): """Read a list of lines of uncompressed bytes from the file. @@ -218,9 +208,8 @@ def readlines(self, size=-1): if not hasattr(size, "__index__"): raise TypeError("Integer argument expected") size = size.__index__() - with self._lock: - self._check_can_read() - return self._buffer.readlines(size) + self._check_can_read() + return self._buffer.readlines(size) def write(self, data): """Write a byte string to the file. @@ -229,12 +218,11 @@ def write(self, data): always len(data). Note that due to buffering, the file on disk may not reflect the data written until close() is called. """ - with self._lock: - self._check_can_write() - compressed = self._compressor.compress(data) - self._fp.write(compressed) - self._pos += len(data) - return len(data) + self._check_can_write() + compressed = self._compressor.compress(data) + self._fp.write(compressed) + self._pos += len(data) + return len(data) def writelines(self, seq): """Write a sequence of byte strings to the file. @@ -244,8 +232,7 @@ def writelines(self, seq): Line separators are not added between the written byte strings. """ - with self._lock: - return _compression.BaseStream.writelines(self, seq) + return _compression.BaseStream.writelines(self, seq) def seek(self, offset, whence=io.SEEK_SET): """Change the file position. @@ -262,17 +249,15 @@ def seek(self, offset, whence=io.SEEK_SET): Note that seeking is emulated, so depending on the parameters, this operation may be extremely slow. """ - with self._lock: - self._check_can_seek() - return self._buffer.seek(offset, whence) + self._check_can_seek() + return self._buffer.seek(offset, whence) def tell(self): """Return the current file position.""" - with self._lock: - self._check_not_closed() - if self._mode == _MODE_READ: - return self._buffer.tell() - return self._pos + self._check_not_closed() + if self._mode == _MODE_READ: + return self._buffer.tell() + return self._pos def open(filename, mode="rb", compresslevel=9, diff --git a/Misc/NEWS.d/next/Library/2021-04-09-14-51-58.bpo-43785.1mM5xE.rst b/Misc/NEWS.d/next/Library/2021-04-09-14-51-58.bpo-43785.1mM5xE.rst new file mode 100644 index 00000000000000..b4ed5e51e22475 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-09-14-51-58.bpo-43785.1mM5xE.rst @@ -0,0 +1,4 @@ +Improve ``bz2.BZ2File`` performance by removing the RLock from BZ2File. +This makes BZ2File thread unsafe in the face of multiple simultaneous +readers or writers, just like its equivalent classes in :mod:`gzip` and +:mod:`lzma` have always been. Patch by Inada Naoki. From 9825bdfbd5c966abf1f1b7264992d722a94c9613 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 12 Apr 2021 01:42:53 -0700 Subject: [PATCH 013/108] bpo-43723: Deprecate camelCase aliases from threading (GH-25174) The snake_case names have existed since Python 2.6, so there is no reason to keep the old camelCase names around. One similar method, threading.Thread.isAlive, was already removed in Python 3.9 (bpo-37804). --- Doc/faq/library.rst | 4 +- Doc/library/idle.rst | 2 +- Doc/library/threading.rst | 22 ++++-- Doc/whatsnew/3.10.rst | 21 +++++ Lib/test/test_threading.py | 35 +++++++-- Lib/threading.py | 76 ++++++++++++++++++- .../2021-04-03-18-03-44.bpo-43723.uBhBZS.rst | 19 +++++ 7 files changed, 159 insertions(+), 20 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-03-18-03-44.bpo-43723.uBhBZS.rst diff --git a/Doc/faq/library.rst b/Doc/faq/library.rst index 97058b5806a35c..4d27abd4351ec0 100644 --- a/Doc/faq/library.rst +++ b/Doc/faq/library.rst @@ -319,11 +319,11 @@ Here's a trivial example:: try: arg = q.get(block=False) except queue.Empty: - print('Worker', threading.currentThread(), end=' ') + print('Worker', threading.current_thread(), end=' ') print('queue empty') break else: - print('Worker', threading.currentThread(), end=' ') + print('Worker', threading.current_thread(), end=' ') print('running with argument', arg) time.sleep(0.5) diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index 6ef15653eacb55..3c302115b5f408 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -732,7 +732,7 @@ intended to be the same as executing the same code by the default method, directly with Python in a text-mode system console or terminal window. However, the different interface and operation occasionally affect visible results. For instance, ``sys.modules`` starts with more entries, -and ``threading.activeCount()`` returns 2 instead of 1. +and ``threading.active_count()`` returns 2 instead of 1. By default, IDLE runs user code in a separate OS process rather than in the user interface process that runs the shell and editor. In the execution diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index bb982f2edcf1b2..16f23c3a0c3548 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -16,9 +16,9 @@ level :mod:`_thread` module. See also the :mod:`queue` module. .. note:: - While they are not listed below, the ``camelCase`` names used for some - methods and functions in this module in the Python 2.x series are still - supported by this module. + In the Python 2.x series, this module contained ``camelCase`` names + for some methods and functions. These are deprecated as of Python 3.10, + but they are still supported for compatibility with Python 2.5 and lower. .. impl-detail:: @@ -42,6 +42,8 @@ This module defines the following functions: Return the number of :class:`Thread` objects currently alive. The returned count is equal to the length of the list returned by :func:`.enumerate`. + The function ``activeCount`` is a deprecated alias for this function. + .. function:: current_thread() @@ -50,6 +52,8 @@ This module defines the following functions: :mod:`threading` module, a dummy thread object with limited functionality is returned. + The function ``currentThread`` is a deprecated alias for this function. + .. function:: excepthook(args, /) @@ -381,9 +385,11 @@ since it is impossible to detect the termination of alien threads. .. method:: getName() setName() - Old getter/setter API for :attr:`~Thread.name`; use it directly as a + Deprecated getter/setter API for :attr:`~Thread.name`; use it directly as a property instead. + .. deprecated:: 3.10 + .. attribute:: ident The 'thread identifier' of this thread or ``None`` if the thread has not @@ -433,9 +439,11 @@ since it is impossible to detect the termination of alien threads. .. method:: isDaemon() setDaemon() - Old getter/setter API for :attr:`~Thread.daemon`; use it directly as a + Deprecated getter/setter API for :attr:`~Thread.daemon`; use it directly as a property instead. + .. deprecated:: 3.10 + .. _lock-objects: @@ -771,6 +779,8 @@ item to the buffer only needs to wake up one consumer thread. calling thread has not acquired the lock when this method is called, a :exc:`RuntimeError` is raised. + The method ``notifyAll`` is a deprecated alias for this method. + .. _semaphore-objects: @@ -908,6 +918,8 @@ method. The :meth:`~Event.wait` method blocks until the flag is true. Return ``True`` if and only if the internal flag is true. + The method ``isSet`` is a deprecated alias for this method. + .. method:: set() Set the internal flag to true. All threads waiting for it to become true diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 9f6b7a469ca492..85f229cd787173 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -1129,6 +1129,27 @@ Deprecated ``cache=shared`` query parameter. (Contributed by Erlend E. Aasland in :issue:`24464`.) +* The following ``threading`` methods are now deprecated: + + * ``threading.currentThread`` => :func:`threading.current_thread` + + * ``threading.activeCount`` => :func:`threading.active_count` + + * ``threading.Condition.notifyAll`` => + :meth:`threading.Condition.notify_all` + + * ``threading.Event.isSet`` => :meth:`threading.Event.is_set` + + * ``threading.Thread.setName`` => :attr:`threading.Thread.name` + + * ``threading.thread.getName`` => :attr:`threading.Thread.name` + + * ``threading.Thread.isDaemon`` => :attr:`threading.Thread.daemon` + + * ``threading.Thread.setDaemon`` => :attr:`threading.Thread.daemon` + + (Contributed by Jelle Zijlstra in :issue:`21574`.) + Removed ======= diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 933935ba2ce2c8..49a4af8365afce 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -154,9 +154,9 @@ def test_various_ops(self): def test_ident_of_no_threading_threads(self): # The ident still must work for the main thread and dummy threads. - self.assertIsNotNone(threading.currentThread().ident) + self.assertIsNotNone(threading.current_thread().ident) def f(): - ident.append(threading.currentThread().ident) + ident.append(threading.current_thread().ident) done.set() done = threading.Event() ident = [] @@ -447,13 +447,32 @@ def test_old_threading_api(self): # Just a quick sanity check to make sure the old method names are # still present t = threading.Thread() - t.isDaemon() - t.setDaemon(True) - t.getName() - t.setName("name") + with self.assertWarnsRegex(DeprecationWarning, + r'get the daemon attribute'): + t.isDaemon() + with self.assertWarnsRegex(DeprecationWarning, + r'set the daemon attribute'): + t.setDaemon(True) + with self.assertWarnsRegex(DeprecationWarning, + r'get the name attribute'): + t.getName() + with self.assertWarnsRegex(DeprecationWarning, + r'set the name attribute'): + t.setName("name") + e = threading.Event() - e.isSet() - threading.activeCount() + with self.assertWarnsRegex(DeprecationWarning, 'use is_set()'): + e.isSet() + + cond = threading.Condition() + cond.acquire() + with self.assertWarnsRegex(DeprecationWarning, 'use notify_all()'): + cond.notifyAll() + + with self.assertWarnsRegex(DeprecationWarning, 'use active_count()'): + threading.activeCount() + with self.assertWarnsRegex(DeprecationWarning, 'use current_thread()'): + threading.currentThread() def test_repr_daemon(self): t = threading.Thread() diff --git a/Lib/threading.py b/Lib/threading.py index ff2624a3e1e49e..4dcf84715c439d 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -388,7 +388,16 @@ def notify_all(self): """ self.notify(len(self._waiters)) - notifyAll = notify_all + def notifyAll(self): + """Wake up all threads waiting on this condition. + + This method is deprecated, use notify_all() instead. + + """ + import warnings + warnings.warn('notifyAll() is deprecated, use notify_all() instead', + DeprecationWarning, stacklevel=2) + self.notify_all() class Semaphore: @@ -538,7 +547,16 @@ def is_set(self): """Return true if and only if the internal flag is true.""" return self._flag - isSet = is_set + def isSet(self): + """Return true if and only if the internal flag is true. + + This method is deprecated, use notify_all() instead. + + """ + import warnings + warnings.warn('isSet() is deprecated, use is_set() instead', + DeprecationWarning, stacklevel=2) + return self.is_set() def set(self): """Set the internal flag to true. @@ -1146,15 +1164,47 @@ def daemon(self, daemonic): self._daemonic = daemonic def isDaemon(self): + """Return whether this thread is a daemon. + + This method is deprecated, use the daemon attribute instead. + + """ + import warnings + warnings.warn('isDaemon() is deprecated, get the daemon attribute instead', + DeprecationWarning, stacklevel=2) return self.daemon def setDaemon(self, daemonic): + """Set whether this thread is a daemon. + + This method is deprecated, use the .daemon property instead. + + """ + import warnings + warnings.warn('setDaemon() is deprecated, set the daemon attribute instead', + DeprecationWarning, stacklevel=2) self.daemon = daemonic def getName(self): + """Return a string used for identification purposes only. + + This method is deprecated, use the name attribute instead. + + """ + import warnings + warnings.warn('getName() is deprecated, get the name attribute instead', + DeprecationWarning, stacklevel=2) return self.name def setName(self, name): + """Set the name string for this thread. + + This method is deprecated, use the name attribute instead. + + """ + import warnings + warnings.warn('setName() is deprecated, set the name attribute instead', + DeprecationWarning, stacklevel=2) self.name = name @@ -1349,7 +1399,16 @@ def current_thread(): except KeyError: return _DummyThread() -currentThread = current_thread +def currentThread(): + """Return the current Thread object, corresponding to the caller's thread of control. + + This function is deprecated, use current_thread() instead. + + """ + import warnings + warnings.warn('currentThread() is deprecated, use current_thread() instead', + DeprecationWarning, stacklevel=2) + return current_thread() def active_count(): """Return the number of Thread objects currently alive. @@ -1361,7 +1420,16 @@ def active_count(): with _active_limbo_lock: return len(_active) + len(_limbo) -activeCount = active_count +def activeCount(): + """Return the number of Thread objects currently alive. + + This function is deprecated, use active_count() instead. + + """ + import warnings + warnings.warn('activeCount() is deprecated, use active_count() instead', + DeprecationWarning, stacklevel=2) + return active_count() def _enumerate(): # Same as enumerate(), but without the lock. Internal use only. diff --git a/Misc/NEWS.d/next/Library/2021-04-03-18-03-44.bpo-43723.uBhBZS.rst b/Misc/NEWS.d/next/Library/2021-04-03-18-03-44.bpo-43723.uBhBZS.rst new file mode 100644 index 00000000000000..27cf7aa716273c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-03-18-03-44.bpo-43723.uBhBZS.rst @@ -0,0 +1,19 @@ +The following ``threading`` methods are now deprecated and should be replaced: + +- ``currentThread`` => :func:`threading.current_thread` + +- ``activeCount`` => :func:`threading.active_count` + +- ``Condition.notifyAll`` => :meth:`threading.Condition.notify_all` + +- ``Event.isSet`` => :meth:`threading.Event.is_set` + +- ``Thread.setName`` => :attr:`threading.Thread.name` + +- ``thread.getName`` => :attr:`threading.Thread.name` + +- ``Thread.isDaemon`` => :attr:`threading.Thread.daemon` + +- ``Thread.setDaemon`` => :attr:`threading.Thread.daemon` + +Patch by Jelle Zijlstra. From 77d668b1221d0f8c3e9d6b6199f67aaf3c45f040 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 12 Apr 2021 10:44:53 +0200 Subject: [PATCH 014/108] bpo-43680: _pyio.open() becomes a static method (GH-25354) The Python _pyio.open() function becomes a static method to behave as io.open() built-in function: don't become a bound method when stored as a class variable. It becomes possible since static methods are now callable in Python 3.10. Moreover, _pyio.OpenWrapper becomes a simple alias to _pyio.open. init_set_builtins_open() now sets builtins.open to io.open, rather than setting it to io.OpenWrapper, since OpenWrapper is now an alias to open in the io and _pyio modules. --- Lib/_pyio.py | 20 +++++++++---------- .../2021-04-12-09-57-37.bpo-43680.o1zEk_.rst | 6 ++++++ Python/pylifecycle.c | 6 +++--- 3 files changed, 18 insertions(+), 14 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-12-09-57-37.bpo-43680.o1zEk_.rst diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 0f182d42402063..cb5a619f02a48c 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -63,6 +63,13 @@ def text_encoding(encoding, stacklevel=2): return encoding +# Wrapper for builtins.open +# +# Trick so that open() won't become a bound method when stored +# as a class variable (as dbm.dumb does). +# +# See init_set_builtins_open() in Python/pylifecycle.c. +@staticmethod def open(file, mode="r", buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None): @@ -313,18 +320,9 @@ def __get__(self, obj, typ=None): "errors=None, newline=None, closefd=True)\n\n" + open.__doc__) -class OpenWrapper: - """Wrapper for builtins.open - Trick so that open won't become a bound method when stored - as a class variable (as dbm.dumb does). - - See initstdio() in Python/pylifecycle.c. - """ - __doc__ = DocDescriptor() - - def __new__(cls, *args, **kwargs): - return open(*args, **kwargs) +# bpo-43680: Alias to open() kept for backward compatibility +OpenWrapper = open # In normal operation, both `UnsupportedOperation`s should be bound to the diff --git a/Misc/NEWS.d/next/Library/2021-04-12-09-57-37.bpo-43680.o1zEk_.rst b/Misc/NEWS.d/next/Library/2021-04-12-09-57-37.bpo-43680.o1zEk_.rst new file mode 100644 index 00000000000000..cb561ae586a98d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-12-09-57-37.bpo-43680.o1zEk_.rst @@ -0,0 +1,6 @@ +The Python :func:`_pyio.open` function becomes a static method to behave as +:func:`io.open` built-in function: don't become a bound method when stored as a +class variable. It becomes possible since static methods are now callable in +Python 3.10. Moreover, :func:`_pyio.OpenWrapper` becomes a simple alias to +:func:`_pyio.open`. +Patch by Victor Stinner. diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 0ad1796e3cbc6e..2dbebe45fd4b0b 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -2241,7 +2241,7 @@ create_stdio(const PyConfig *config, PyObject* io, return NULL; } -/* Set builtins.open to io.OpenWrapper */ +/* Set builtins.open to io.open */ static PyStatus init_set_builtins_open(void) { @@ -2257,7 +2257,7 @@ init_set_builtins_open(void) goto error; } - if (!(wrapper = PyObject_GetAttrString(iomod, "OpenWrapper"))) { + if (!(wrapper = PyObject_GetAttrString(iomod, "open"))) { goto error; } @@ -2279,7 +2279,7 @@ init_set_builtins_open(void) } -/* Initialize sys.stdin, stdout, stderr and builtins.open */ +/* Create sys.stdin, sys.stdout and sys.stderr */ static PyStatus init_sys_streams(PyThreadState *tstate) { From 06e971fc0eeaf6301ea6230c54957ac045f054a9 Mon Sep 17 00:00:00 2001 From: Chris Withers Date: Mon, 12 Apr 2021 10:44:42 +0100 Subject: [PATCH 015/108] try and get a peak at mock-related PRs before they land (#25356) --- .github/CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 19ac3aac713fca..5b86d39dc9c259 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -91,6 +91,10 @@ Parser/asdl.py @isidentical Parser/asdl_c.py @isidentical Lib/ast.py @isidentical +# Mock +/Lib/unittest/mock.py @cjw296 +/Lib/unittest/test/testmock/* @cjw296 + # SQLite 3 **/*sqlite* @berkerpeksag From 3447750073aff229b049e4ccd6217db2811dcfd1 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 12 Apr 2021 12:00:38 +0200 Subject: [PATCH 016/108] bpo-41561: Fix testing with OpenSSL 1.0.2 (GH-25355) Signed-off-by: Christian Heimes --- Lib/test/test_ssl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 831f411b12be6f..140aecc712738e 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -168,7 +168,10 @@ def is_ubuntu(): def seclevel_workaround(*ctxs): """"Lower security level to '1' and allow all ciphers for TLS 1.0/1""" for ctx in ctxs: - if ctx.minimum_version <= ssl.TLSVersion.TLSv1_1: + if ( + hasattr(ctx, "minimum_version") and + ctx.minimum_version <= ssl.TLSVersion.TLSv1_1 + ): ctx.set_ciphers("@SECLEVEL=1:ALL") else: def seclevel_workaround(*ctxs): From 95bbb331ecb3ef5d05859d90b287cc3d27613c86 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 12 Apr 2021 13:12:36 +0200 Subject: [PATCH 017/108] bpo-43723: Fix deprecation error caused by thread.setDaemon() (GH-25361) --- Lib/test/test_asyncio/test_streams.py | 2 +- Lib/test/test_logging.py | 4 ++-- Lib/test/test_telnetlib.py | 2 +- Tools/ccbench/ccbench.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py index aa3977977588e7..a0753589039202 100644 --- a/Lib/test/test_asyncio/test_streams.py +++ b/Lib/test/test_asyncio/test_streams.py @@ -799,7 +799,7 @@ async def client(host, port): # Start the server thread and wait for it to be listening. thread = threading.Thread(target=server) - thread.setDaemon(True) + thread.daemon = True thread.start() addr = q.get() diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 452ba78523443e..6179e28759cceb 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -849,7 +849,7 @@ def start(self): """ self._thread = t = threading.Thread(target=self.serve_forever, args=(self.poll_interval,)) - t.setDaemon(True) + t.daemon = True t.start() def serve_forever(self, poll_interval): @@ -901,7 +901,7 @@ def start(self): """ self._thread = t = threading.Thread(target=self.serve_forever, args=(self.poll_interval,)) - t.setDaemon(True) + t.daemon = True t.start() def serve_forever(self, poll_interval): diff --git a/Lib/test/test_telnetlib.py b/Lib/test/test_telnetlib.py index 8e36051cd095ba..41c4fcd4195e3a 100644 --- a/Lib/test/test_telnetlib.py +++ b/Lib/test/test_telnetlib.py @@ -29,7 +29,7 @@ def setUp(self): self.sock.settimeout(60) # Safety net. Look issue 11812 self.port = socket_helper.bind_port(self.sock) self.thread = threading.Thread(target=server, args=(self.evt,self.sock)) - self.thread.setDaemon(True) + self.thread.daemon = True self.thread.start() self.evt.wait() diff --git a/Tools/ccbench/ccbench.py b/Tools/ccbench/ccbench.py index ab1465a2760923..d52701a82948da 100644 --- a/Tools/ccbench/ccbench.py +++ b/Tools/ccbench/ccbench.py @@ -221,7 +221,7 @@ def run(): for i in range(nthreads): threads.append(threading.Thread(target=run)) for t in threads: - t.setDaemon(True) + t.daemon = True t.start() # We don't want measurements to include thread startup overhead, # so we arrange for timing to start after all threads are ready. @@ -328,7 +328,7 @@ def run(): for i in range(nthreads): threads.append(threading.Thread(target=run)) for t in threads: - t.setDaemon(True) + t.daemon = True t.start() # Wait for threads to be ready with ready_cond: @@ -460,7 +460,7 @@ def run(): for i in range(nthreads): threads.append(threading.Thread(target=run)) for t in threads: - t.setDaemon(True) + t.daemon = True t.start() # Wait for threads to be ready with ready_cond: From e126547c070fbc080562abb08e16a2c93a8a805d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 12 Apr 2021 14:17:40 +0200 Subject: [PATCH 018/108] bpo-34311: Add locale.localize (GH-15275) * Add method localize to the locale module * Update the documentation of the locale module --- Doc/library/locale.rst | 8 ++++++ Lib/locale.py | 16 +++++++++-- Lib/test/test_locale.py | 28 +++++++++++++++++++ .../2019-08-14-13-19-50.bpo-33731.9esS0d.rst | 2 ++ 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2019-08-14-13-19-50.bpo-33731.9esS0d.rst diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst index 0a77be47fb8994..60d0c59d017c73 100644 --- a/Doc/library/locale.rst +++ b/Doc/library/locale.rst @@ -427,6 +427,14 @@ The :mod:`locale` module defines the following exception and functions: .. versionadded:: 3.5 +.. function:: localize(string, grouping=False, monetary=False) + + Converts a normalized number string into a formatted string following the + :const:`LC_NUMERIC` settings. + + .. versionadded:: 3.10 + + .. function:: atof(string) Converts a string to a floating point number, following the :const:`LC_NUMERIC` diff --git a/Lib/locale.py b/Lib/locale.py index ee841e8b8655ea..6d4f51929923f6 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -185,8 +185,14 @@ def _format(percent, value, grouping=False, monetary=False, *additional): formatted = percent % ((value,) + additional) else: formatted = percent % value + if percent[-1] in 'eEfFgGdiu': + formatted = _localize(formatted, grouping, monetary) + return formatted + +# Transform formatted as locale number according to the locale settings +def _localize(formatted, grouping=False, monetary=False): # floats and decimal ints need special action! - if percent[-1] in 'eEfFgG': + if '.' in formatted: seps = 0 parts = formatted.split('.') if grouping: @@ -196,7 +202,7 @@ def _format(percent, value, grouping=False, monetary=False, *additional): formatted = decimal_point.join(parts) if seps: formatted = _strip_padding(formatted, seps) - elif percent[-1] in 'diu': + else: seps = 0 if grouping: formatted, seps = _group(formatted, monetary=monetary) @@ -267,7 +273,7 @@ def currency(val, symbol=True, grouping=False, international=False): raise ValueError("Currency formatting is not possible using " "the 'C' locale.") - s = _format('%%.%if' % digits, abs(val), grouping, monetary=True) + s = _localize(f'{abs(val):.{digits}f}', grouping, monetary=True) # '<' and '>' are markers if the sign must be inserted between symbol and value s = '<' + s + '>' @@ -323,6 +329,10 @@ def delocalize(string): string = string.replace(dd, '.') return string +def localize(string, grouping=False, monetary=False): + """Parses a string as locale number according to the locale settings.""" + return _localize(string, grouping, monetary) + def atof(string, func=float): "Parses a string as a float according to the locale settings." return func(delocalize(string)) diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py index 4bb4c5541d077d..2c788f2dfa65e6 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py @@ -1,3 +1,4 @@ +from decimal import Decimal from test.support import verbose, is_android from test.support.warnings_helper import check_warnings import unittest @@ -636,5 +637,32 @@ def test_atoi(self): self._test_atoi('50 000', 50000) +class BaseLocalizeTest(BaseLocalizedTest): + + def _test_localize(self, value, out, grouping=False): + self.assertEqual(locale.localize(value, grouping=grouping), out) + + +class TestEnUSLocalize(EnUSCookedTest, BaseLocalizeTest): + + def test_localize(self): + self._test_localize('50000.00', '50000.00') + self._test_localize( + '{0:.16f}'.format(Decimal('1.15')), '1.1500000000000000') + + +class TestCLocalize(CCookedTest, BaseLocalizeTest): + + def test_localize(self): + self._test_localize('50000.00', '50000.00') + + +class TestfrFRLocalize(FrFRCookedTest, BaseLocalizeTest): + + def test_localize(self): + self._test_localize('50000.00', '50000,00') + self._test_localize('50000.00', '50 000,00', grouping=True) + + if __name__ == '__main__': unittest.main() diff --git a/Misc/NEWS.d/next/Library/2019-08-14-13-19-50.bpo-33731.9esS0d.rst b/Misc/NEWS.d/next/Library/2019-08-14-13-19-50.bpo-33731.9esS0d.rst new file mode 100644 index 00000000000000..2fedb0696c3266 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-08-14-13-19-50.bpo-33731.9esS0d.rst @@ -0,0 +1,2 @@ +Provide a locale.localize() function, which converts a normalized number string +into a locale format. From 67c0b3d89c4da9750fdb43fc66d3924681b22d2e Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Mon, 12 Apr 2021 09:39:31 -0600 Subject: [PATCH 019/108] bpo-41661: Document os.path.relpath() exception on Windows with different drives (GH-25346) --- Doc/library/os.path.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst index e2f335ee8c3091..4cab3113c9e4e5 100644 --- a/Doc/library/os.path.rst +++ b/Doc/library/os.path.rst @@ -366,7 +366,8 @@ the :mod:`glob` module.) Return a relative filepath to *path* either from the current directory or from an optional *start* directory. This is a path computation: the filesystem is not accessed to confirm the existence or nature of *path* or - *start*. + *start*. On Windows, :exc:`ValueError` is raised when *path* and *start* + are on different drives. *start* defaults to :attr:`os.curdir`. From 8c14f5a787b21d5a1eae5d5ee981431d1c0e055f Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Mon, 12 Apr 2021 08:51:20 -0700 Subject: [PATCH 020/108] bpo-42248: [Enum] ensure exceptions raised in ``_missing_`` are released (GH-25350) --- Lib/enum.py | 43 +++++++++++-------- Lib/test/test_enum.py | 32 ++++++++++++++ .../2021-04-11-21-10-57.bpo-42248.pedB1E.rst | 1 + 3 files changed, 57 insertions(+), 19 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-11-21-10-57.bpo-42248.pedB1E.rst diff --git a/Lib/enum.py b/Lib/enum.py index f31779baa0d65a..b102a4e4cc7820 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -919,25 +919,30 @@ def __new__(cls, value): except Exception as e: exc = e result = None - if isinstance(result, cls): - return result - elif ( - Flag is not None and issubclass(cls, Flag) - and cls._boundary_ is EJECT and isinstance(result, int) - ): - return result - else: - ve_exc = ValueError("%r is not a valid %s" % (value, cls.__qualname__)) - if result is None and exc is None: - raise ve_exc - elif exc is None: - exc = TypeError( - 'error in %s._missing_: returned %r instead of None or a valid member' - % (cls.__name__, result) - ) - if not isinstance(exc, ValueError): - exc.__context__ = ve_exc - raise exc + try: + if isinstance(result, cls): + return result + elif ( + Flag is not None and issubclass(cls, Flag) + and cls._boundary_ is EJECT and isinstance(result, int) + ): + return result + else: + ve_exc = ValueError("%r is not a valid %s" % (value, cls.__qualname__)) + if result is None and exc is None: + raise ve_exc + elif exc is None: + exc = TypeError( + 'error in %s._missing_: returned %r instead of None or a valid member' + % (cls.__name__, result) + ) + if not isinstance(exc, ValueError): + exc.__context__ = ve_exc + raise exc + finally: + # ensure all variables that could hold an exception are destroyed + exc = None + ve_exc = None def _generate_next_value_(name, start, count, last_values): """ diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 6002cd85622cfe..5af7cd2ca57edf 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -1932,6 +1932,38 @@ def _missing_(cls, item): else: raise Exception('Exception not raised.') + def test_missing_exceptions_reset(self): + import weakref + # + class TestEnum(enum.Enum): + VAL1 = 'val1' + VAL2 = 'val2' + # + class Class1: + def __init__(self): + # Gracefully handle an exception of our own making + try: + raise ValueError() + except ValueError: + pass + # + class Class2: + def __init__(self): + # Gracefully handle an exception of Enum's making + try: + TestEnum('invalid_value') + except ValueError: + pass + # No strong refs here so these are free to die. + class_1_ref = weakref.ref(Class1()) + class_2_ref = weakref.ref(Class2()) + # + # The exception raised by Enum creates a reference loop and thus + # Class2 instances will stick around until the next gargage collection + # cycle, unlike Class1. + self.assertIs(class_1_ref(), None) + self.assertIs(class_2_ref(), None) + def test_multiple_mixin(self): class MaxMixin: @classproperty diff --git a/Misc/NEWS.d/next/Library/2021-04-11-21-10-57.bpo-42248.pedB1E.rst b/Misc/NEWS.d/next/Library/2021-04-11-21-10-57.bpo-42248.pedB1E.rst new file mode 100644 index 00000000000000..0722d35a37a1fa --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-11-21-10-57.bpo-42248.pedB1E.rst @@ -0,0 +1 @@ +[Enum] ensure exceptions raised in ``_missing__`` are released From 2459b92a4db69d9b14d0a86a9b81cc075894e910 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 12 Apr 2021 17:58:45 +0200 Subject: [PATCH 021/108] bpo-43774: Remove --without-cycle-gc doc (GH-25364) The configure --without-cycle-gc option has been removed in Python 2.3 by the commit cccd1e72481106b0a373117f32fda6261f3141a7. It's now time to remove the last reference to it in the documentation. --- Doc/extending/extending.rst | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index bc85a05ff2f850..561d1c616cc10e 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -911,12 +911,7 @@ the cycle itself. The cycle detector is able to detect garbage cycles and can reclaim them. The :mod:`gc` module exposes a way to run the detector (the :func:`~gc.collect` function), as well as configuration -interfaces and the ability to disable the detector at runtime. The cycle -detector is considered an optional component; though it is included by default, -it can be disabled at build time using the :option:`!--without-cycle-gc` option -to the :program:`configure` script on Unix platforms (including Mac OS X). If -the cycle detector is disabled in this way, the :mod:`gc` module will not be -available. +interfaces and the ability to disable the detector at runtime. .. _refcountsinpython: From b86ed8e3bb41ede77eeab4a8bb4e2b91a8065283 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 12 Apr 2021 16:59:30 +0100 Subject: [PATCH 022/108] bpo-43797: Improve syntax error for invalid comparisons (#25317) * bpo-43797: Improve syntax error for invalid comparisons * Update Lib/test/test_fstring.py Co-authored-by: Guido van Rossum * Apply review comments * can't -> cannot Co-authored-by: Guido van Rossum --- Grammar/python.gram | 33 +- Lib/test/test_cmd_line_script.py | 8 +- Lib/test/test_codeop.py | 1 - Lib/test/test_exceptions.py | 2 +- Lib/test/test_fstring.py | 6 +- Lib/test/test_generators.py | 2 +- Lib/test/test_genexps.py | 2 +- Lib/test/test_syntax.py | 116 +- Lib/test/test_unpack_ex.py | 10 +- .../2021-04-09-19-12-48.bpo-43797.HfRqNP.rst | 2 + Parser/parser.c | 1736 +++++++++++------ Parser/pegen.c | 8 +- 12 files changed, 1261 insertions(+), 665 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-09-19-12-48.bpo-43797.HfRqNP.rst diff --git a/Grammar/python.gram b/Grammar/python.gram index eb10fc211051cf..324793c88af2a2 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -163,17 +163,20 @@ dotted_name[expr_ty]: | NAME if_stmt[stmt_ty]: - | 'if' a=named_expression &&':' b=block c=elif_stmt { + | 'if' a=named_expression ':' b=block c=elif_stmt { _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) } - | 'if' a=named_expression &&':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) } + | 'if' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) } + | invalid_if_stmt elif_stmt[stmt_ty]: - | 'elif' a=named_expression &&':' b=block c=elif_stmt { + | 'elif' a=named_expression ':' b=block c=elif_stmt { _PyAST_If(a, b, CHECK(asdl_stmt_seq*, _PyPegen_singleton_seq(p, c)), EXTRA) } - | 'elif' a=named_expression &&':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) } + | 'elif' a=named_expression ':' b=block c=[else_block] { _PyAST_If(a, b, c, EXTRA) } + | invalid_elif_stmt else_block[asdl_stmt_seq*]: 'else' &&':' b=block { b } while_stmt[stmt_ty]: - | 'while' a=named_expression &&':' b=block c=[else_block] { _PyAST_While(a, b, c, EXTRA) } + | 'while' a=named_expression ':' b=block c=[else_block] { _PyAST_While(a, b, c, EXTRA) } + | invalid_while_stmt for_stmt[stmt_ty]: | 'for' t=star_targets 'in' ~ ex=star_expressions &&':' tc=[TYPE_COMMENT] b=block el=[else_block] { @@ -438,10 +441,11 @@ star_named_expressions[asdl_expr_seq*]: a[asdl_expr_seq*]=','.star_named_express star_named_expression[expr_ty]: | '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) } | named_expression + named_expression[expr_ty]: | a=NAME ':=' ~ b=expression { _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA) } - | expression !':=' | invalid_named_expression + | expression !':=' annotated_rhs[expr_ty]: yield_expr | star_expressions @@ -772,6 +776,12 @@ invalid_named_expression: | a=expression ':=' expression { RAISE_SYNTAX_ERROR_KNOWN_LOCATION( a, "cannot use assignment expressions with %s", _PyPegen_get_expr_name(a)) } + | a=NAME b='=' bitwise_or !('='|':='|',') { + RAISE_SYNTAX_ERROR_KNOWN_LOCATION(b, "invalid syntax. Maybe you meant '==' or ':=' instead of '='?") } + | !(list|tuple|genexp|'True'|'None'|'False') a=bitwise_or b='=' bitwise_or !('='|':='|',') { + RAISE_SYNTAX_ERROR_KNOWN_LOCATION(b, "cannot assign to %s here. Maybe you meant '==' instead of '='?", + _PyPegen_get_expr_name(a)) } + invalid_assignment: | a=invalid_ann_assign_target ':' expression { RAISE_SYNTAX_ERROR_KNOWN_LOCATION( @@ -841,9 +851,9 @@ invalid_for_target: invalid_group: | '(' a=starred_expression ')' { - RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "can't use starred expression here") } + RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use starred expression here") } | '(' a='**' expression ')' { - RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "can't use double starred expression here") } + RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use double starred expression here") } invalid_import_from_targets: | import_from_as_names ',' { RAISE_SYNTAX_ERROR("trailing comma not allowed without surrounding parentheses") } @@ -860,6 +870,11 @@ invalid_except_block: invalid_match_stmt: | "match" subject_expr !':' { CHECK_VERSION(void*, 10, "Pattern matching is", RAISE_SYNTAX_ERROR("expected ':'") ) } - invalid_case_block: | "case" patterns guard? !':' { RAISE_SYNTAX_ERROR("expected ':'") } +invalid_if_stmt: + | 'if' named_expression NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") } +invalid_elif_stmt: + | 'elif' named_expression NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") } +invalid_while_stmt: + | 'while' named_expression NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") } diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index 8f12b1e19bcfc6..2e0b5f72c22291 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -600,8 +600,8 @@ def test_syntaxerror_unindented_caret_position(self): script_name = _make_test_script(script_dir, 'script', script) exitcode, stdout, stderr = assert_python_failure(script_name) text = io.TextIOWrapper(io.BytesIO(stderr), 'ascii').read() - # Confirm that the caret is located under the first 1 character - self.assertIn("\n 1 + 1 = 2\n ^", text) + # Confirm that the caret is located under the '=' sign + self.assertIn("\n 1 + 1 = 2\n ^\n", text) def test_syntaxerror_indented_caret_position(self): script = textwrap.dedent("""\ @@ -613,7 +613,7 @@ def test_syntaxerror_indented_caret_position(self): exitcode, stdout, stderr = assert_python_failure(script_name) text = io.TextIOWrapper(io.BytesIO(stderr), 'ascii').read() # Confirm that the caret is located under the first 1 character - self.assertIn("\n 1 + 1 = 2\n ^", text) + self.assertIn("\n 1 + 1 = 2\n ^\n", text) # Try the same with a form feed at the start of the indented line script = ( @@ -624,7 +624,7 @@ def test_syntaxerror_indented_caret_position(self): exitcode, stdout, stderr = assert_python_failure(script_name) text = io.TextIOWrapper(io.BytesIO(stderr), "ascii").read() self.assertNotIn("\f", text) - self.assertIn("\n 1 + 1 = 2\n ^", text) + self.assertIn("\n 1 + 1 = 2\n ^\n", text) def test_syntaxerror_multi_line_fstring(self): script = 'foo = f"""{}\nfoo"""\n' diff --git a/Lib/test/test_codeop.py b/Lib/test/test_codeop.py index ecc46affea2629..07b46afbe1bd89 100644 --- a/Lib/test/test_codeop.py +++ b/Lib/test/test_codeop.py @@ -275,7 +275,6 @@ def test_invalid(self): ai("a = 'a\\\n") ai("a = 1","eval") - ai("a = (","eval") ai("]","eval") ai("())","eval") ai("[}","eval") diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 1e6f525cbb5092..9dc3a81ffedbd6 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -260,7 +260,7 @@ def baz(): check('[*x for x in xs]', 1, 2) check('foo(x for x in range(10), 100)', 1, 5) check('for 1 in []: pass', 1, 5) - check('(yield i) = 2', 1, 2) + check('(yield i) = 2', 1, 11) check('def f(*):\n pass', 1, 8) @cpython_only diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py index 296cb05285c480..caae1b7c4f8535 100644 --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -990,7 +990,7 @@ def test_conversions(self): ]) def test_assignment(self): - self.assertAllRaise(SyntaxError, 'invalid syntax', + self.assertAllRaise(SyntaxError, r'invalid syntax', ["f'' = 3", "f'{0}' = x", "f'{x}' = x", @@ -1276,11 +1276,11 @@ def test_with_an_underscore_and_a_comma_in_format_specifier(self): f'{1:_,}' def test_syntax_error_for_starred_expressions(self): - error_msg = re.escape("can't use starred expression here") + error_msg = re.escape("cannot use starred expression here") with self.assertRaisesRegex(SyntaxError, error_msg): compile("f'{*a}'", "?", "exec") - error_msg = re.escape("can't use double starred expression here") + error_msg = re.escape("cannot use double starred expression here") with self.assertRaisesRegex(SyntaxError, error_msg): compile("f'{**a}'", "?", "exec") diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index a634ccd517399e..ebf8bb7e320982 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -2013,7 +2013,7 @@ def printsolution(self, x): >>> def f(): (yield bar) = y Traceback (most recent call last): ... -SyntaxError: cannot assign to yield expression +SyntaxError: cannot assign to yield expression here. Maybe you meant '==' instead of '='? >>> def f(): (yield bar) += y Traceback (most recent call last): diff --git a/Lib/test/test_genexps.py b/Lib/test/test_genexps.py index 5c1a209b0e9908..70fe2bba3a6982 100644 --- a/Lib/test/test_genexps.py +++ b/Lib/test/test_genexps.py @@ -103,7 +103,7 @@ >>> dict(a = i for i in range(10)) Traceback (most recent call last): ... - SyntaxError: invalid syntax + SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? Verify that parenthesis are required when used as a keyword argument value diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 730c297717af5d..78b11c93351215 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -61,7 +61,7 @@ >>> f() = 1 Traceback (most recent call last): -SyntaxError: cannot assign to function call +SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='? >>> yield = 1 Traceback (most recent call last): @@ -73,7 +73,7 @@ >>> a + 1 = 2 Traceback (most recent call last): -SyntaxError: cannot assign to operator +SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='? >>> (x for x in x) = 1 Traceback (most recent call last): @@ -81,19 +81,19 @@ >>> 1 = 1 Traceback (most recent call last): -SyntaxError: cannot assign to literal +SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='? >>> "abc" = 1 Traceback (most recent call last): -SyntaxError: cannot assign to literal +SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='? >>> b"" = 1 Traceback (most recent call last): -SyntaxError: cannot assign to literal +SyntaxError: cannot assign to literal here. Maybe you meant '==' instead of '='? >>> ... = 1 Traceback (most recent call last): -SyntaxError: cannot assign to Ellipsis +SyntaxError: cannot assign to Ellipsis here. Maybe you meant '==' instead of '='? >>> `1` = 1 Traceback (most recent call last): @@ -126,15 +126,15 @@ >>> [a, b, c + 1] = [1, 2, 3] Traceback (most recent call last): -SyntaxError: cannot assign to operator +SyntaxError: cannot assign to expression >>> [a, b[1], c + 1] = [1, 2, 3] Traceback (most recent call last): -SyntaxError: cannot assign to operator +SyntaxError: cannot assign to expression >>> [a, b.c.d, c + 1] = [1, 2, 3] Traceback (most recent call last): -SyntaxError: cannot assign to operator +SyntaxError: cannot assign to expression >>> a if 1 else b = 1 Traceback (most recent call last): @@ -181,7 +181,7 @@ >>> for (*a, b, c+1) in b: pass Traceback (most recent call last): -SyntaxError: cannot assign to operator +SyntaxError: cannot assign to expression >>> for (x, *(y, z.d())) in b: pass Traceback (most recent call last): @@ -193,7 +193,7 @@ >>> for a, b, (c + 1, d()): pass Traceback (most recent call last): -SyntaxError: cannot assign to operator +SyntaxError: cannot assign to expression >>> for i < (): pass Traceback (most recent call last): @@ -217,7 +217,7 @@ >>> with a as (*b, c, d+1): pass Traceback (most recent call last): -SyntaxError: cannot assign to operator +SyntaxError: cannot assign to expression >>> with a as (x, *(y, z.d())): pass Traceback (most recent call last): @@ -465,7 +465,7 @@ # SyntaxError: expression cannot contain assignment, perhaps you meant "=="? # >>> f(True=2) # Traceback (most recent call last): -# SyntaxError: cannot assign to True +# SyntaxError: cannot assign to True here. Maybe you meant '==' instead of '='? >>> f(__debug__=1) Traceback (most recent call last): SyntaxError: cannot assign to __debug__ @@ -684,7 +684,7 @@ ... pass Traceback (most recent call last): ... - SyntaxError: cannot assign to function call + SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='? >>> if 1: ... pass @@ -692,7 +692,7 @@ ... x() = 1 Traceback (most recent call last): ... - SyntaxError: cannot assign to function call + SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='? >>> if 1: ... x() = 1 @@ -702,7 +702,7 @@ ... pass Traceback (most recent call last): ... - SyntaxError: cannot assign to function call + SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='? >>> if 1: ... pass @@ -712,7 +712,7 @@ ... pass Traceback (most recent call last): ... - SyntaxError: cannot assign to function call + SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='? >>> if 1: ... pass @@ -722,7 +722,7 @@ ... x() = 1 Traceback (most recent call last): ... - SyntaxError: cannot assign to function call + SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='? Missing ':' before suites: @@ -843,6 +843,26 @@ Traceback (most recent call last): SyntaxError: expected ':' + >>> if x = 3: + ... pass + Traceback (most recent call last): + SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? + + >>> while x = 3: + ... pass + Traceback (most recent call last): + SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? + + >>> if x.a = 3: + ... pass + Traceback (most recent call last): + SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='? + + >>> while x.a = 3: + ... pass + Traceback (most recent call last): + SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='? + Make sure that the old "raise X, Y[, Z]" form is gone: >>> raise X, Y Traceback (most recent call last): @@ -894,19 +914,19 @@ >>> {1, 2, 3} = 42 Traceback (most recent call last): -SyntaxError: cannot assign to set display +SyntaxError: cannot assign to set display here. Maybe you meant '==' instead of '='? >>> {1: 2, 3: 4} = 42 Traceback (most recent call last): -SyntaxError: cannot assign to dict display +SyntaxError: cannot assign to dict literal here. Maybe you meant '==' instead of '='? >>> f'{x}' = 42 Traceback (most recent call last): -SyntaxError: cannot assign to f-string expression +SyntaxError: cannot assign to f-string expression here. Maybe you meant '==' instead of '='? >>> f'{x}-{y}' = 42 Traceback (most recent call last): -SyntaxError: cannot assign to f-string expression +SyntaxError: cannot assign to f-string expression here. Maybe you meant '==' instead of '='? >>> from t import x, Traceback (most recent call last): @@ -988,7 +1008,7 @@ def _check_error(self, code, errtext, def test_expression_with_assignment(self): self._check_error( "print(end1 + end2 = ' ')", - 'expression cannot contain assignment, perhaps you meant "=="?', + "cannot assign to expression here. Maybe you meant '==' instead of '='?", offset=19 ) @@ -1000,31 +1020,31 @@ def test_assign_call(self): def test_assign_del(self): self._check_error("del (,)", "invalid syntax") - self._check_error("del 1", "delete literal") - self._check_error("del (1, 2)", "delete literal") - self._check_error("del None", "delete None") - self._check_error("del *x", "delete starred") - self._check_error("del (*x)", "use starred expression") - self._check_error("del (*x,)", "delete starred") - self._check_error("del [*x,]", "delete starred") - self._check_error("del f()", "delete function call") - self._check_error("del f(a, b)", "delete function call") - self._check_error("del o.f()", "delete function call") - self._check_error("del a[0]()", "delete function call") - self._check_error("del x, f()", "delete function call") - self._check_error("del f(), x", "delete function call") - self._check_error("del [a, b, ((c), (d,), e.f())]", "delete function call") - self._check_error("del (a if True else b)", "delete conditional") - self._check_error("del +a", "delete operator") - self._check_error("del a, +b", "delete operator") - self._check_error("del a + b", "delete operator") - self._check_error("del (a + b, c)", "delete operator") - self._check_error("del (c[0], a + b)", "delete operator") - self._check_error("del a.b.c + 2", "delete operator") - self._check_error("del a.b.c[0] + 2", "delete operator") - self._check_error("del (a, b, (c, d.e.f + 2))", "delete operator") - self._check_error("del [a, b, (c, d.e.f[0] + 2)]", "delete operator") - self._check_error("del (a := 5)", "delete named expression") + self._check_error("del 1", "cannot delete literal") + self._check_error("del (1, 2)", "cannot delete literal") + self._check_error("del None", "cannot delete None") + self._check_error("del *x", "cannot delete starred") + self._check_error("del (*x)", "cannot use starred expression") + self._check_error("del (*x,)", "cannot delete starred") + self._check_error("del [*x,]", "cannot delete starred") + self._check_error("del f()", "cannot delete function call") + self._check_error("del f(a, b)", "cannot delete function call") + self._check_error("del o.f()", "cannot delete function call") + self._check_error("del a[0]()", "cannot delete function call") + self._check_error("del x, f()", "cannot delete function call") + self._check_error("del f(), x", "cannot delete function call") + self._check_error("del [a, b, ((c), (d,), e.f())]", "cannot delete function call") + self._check_error("del (a if True else b)", "cannot delete conditional") + self._check_error("del +a", "cannot delete expression") + self._check_error("del a, +b", "cannot delete expression") + self._check_error("del a + b", "cannot delete expression") + self._check_error("del (a + b, c)", "cannot delete expression") + self._check_error("del (c[0], a + b)", "cannot delete expression") + self._check_error("del a.b.c + 2", "cannot delete expression") + self._check_error("del a.b.c[0] + 2", "cannot delete expression") + self._check_error("del (a, b, (c, d.e.f + 2))", "cannot delete expression") + self._check_error("del [a, b, (c, d.e.f[0] + 2)]", "cannot delete expression") + self._check_error("del (a := 5)", "cannot delete named expression") # We don't have a special message for this, but make sure we don't # report "cannot delete name" self._check_error("del a += b", "invalid syntax") diff --git a/Lib/test/test_unpack_ex.py b/Lib/test/test_unpack_ex.py index 049e48b13fa1f9..bd79421e6e2b37 100644 --- a/Lib/test/test_unpack_ex.py +++ b/Lib/test/test_unpack_ex.py @@ -349,27 +349,27 @@ >>> (*x),y = 1, 2 # doctest:+ELLIPSIS Traceback (most recent call last): ... - SyntaxError: can't use starred expression here + SyntaxError: cannot use starred expression here >>> (((*x))),y = 1, 2 # doctest:+ELLIPSIS Traceback (most recent call last): ... - SyntaxError: can't use starred expression here + SyntaxError: cannot use starred expression here >>> z,(*x),y = 1, 2, 4 # doctest:+ELLIPSIS Traceback (most recent call last): ... - SyntaxError: can't use starred expression here + SyntaxError: cannot use starred expression here >>> z,(*x) = 1, 2 # doctest:+ELLIPSIS Traceback (most recent call last): ... - SyntaxError: can't use starred expression here + SyntaxError: cannot use starred expression here >>> ((*x),y) = 1, 2 # doctest:+ELLIPSIS Traceback (most recent call last): ... - SyntaxError: can't use starred expression here + SyntaxError: cannot use starred expression here Some size constraints (all fail.) diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-09-19-12-48.bpo-43797.HfRqNP.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-09-19-12-48.bpo-43797.HfRqNP.rst new file mode 100644 index 00000000000000..2c10bb6ddc8c38 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-09-19-12-48.bpo-43797.HfRqNP.rst @@ -0,0 +1,2 @@ +Improve ``SyntaxError`` error messages for invalid comparisons. Patch by +Pablo Galindo. diff --git a/Parser/parser.c b/Parser/parser.c index af0c088694c2cb..099186e6232603 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -264,188 +264,194 @@ static KeywordToken *reserved_keywords[] = { #define invalid_except_block_type 1196 #define invalid_match_stmt_type 1197 #define invalid_case_block_type 1198 -#define _loop0_1_type 1199 -#define _loop0_2_type 1200 -#define _loop0_4_type 1201 -#define _gather_3_type 1202 -#define _loop0_6_type 1203 -#define _gather_5_type 1204 -#define _loop0_8_type 1205 -#define _gather_7_type 1206 -#define _loop0_10_type 1207 -#define _gather_9_type 1208 -#define _loop1_11_type 1209 -#define _loop0_13_type 1210 -#define _gather_12_type 1211 -#define _tmp_14_type 1212 -#define _tmp_15_type 1213 -#define _tmp_16_type 1214 -#define _tmp_17_type 1215 -#define _tmp_18_type 1216 -#define _tmp_19_type 1217 -#define _tmp_20_type 1218 -#define _tmp_21_type 1219 -#define _loop1_22_type 1220 -#define _tmp_23_type 1221 -#define _tmp_24_type 1222 -#define _loop0_26_type 1223 -#define _gather_25_type 1224 -#define _loop0_28_type 1225 -#define _gather_27_type 1226 -#define _tmp_29_type 1227 -#define _tmp_30_type 1228 -#define _loop0_31_type 1229 -#define _loop1_32_type 1230 -#define _loop0_34_type 1231 -#define _gather_33_type 1232 -#define _tmp_35_type 1233 -#define _loop0_37_type 1234 -#define _gather_36_type 1235 -#define _tmp_38_type 1236 -#define _loop0_40_type 1237 -#define _gather_39_type 1238 -#define _loop0_42_type 1239 -#define _gather_41_type 1240 -#define _loop0_44_type 1241 -#define _gather_43_type 1242 -#define _loop0_46_type 1243 -#define _gather_45_type 1244 -#define _tmp_47_type 1245 -#define _loop1_48_type 1246 -#define _tmp_49_type 1247 -#define _loop1_50_type 1248 -#define _loop0_52_type 1249 -#define _gather_51_type 1250 -#define _tmp_53_type 1251 -#define _tmp_54_type 1252 -#define _tmp_55_type 1253 -#define _loop0_57_type 1254 -#define _gather_56_type 1255 -#define _tmp_58_type 1256 -#define _loop0_60_type 1257 -#define _gather_59_type 1258 -#define _tmp_61_type 1259 -#define _loop0_63_type 1260 -#define _gather_62_type 1261 -#define _loop0_65_type 1262 -#define _gather_64_type 1263 -#define _tmp_66_type 1264 -#define _tmp_67_type 1265 -#define _tmp_68_type 1266 -#define _tmp_69_type 1267 -#define _loop0_70_type 1268 -#define _loop0_71_type 1269 -#define _loop0_72_type 1270 -#define _loop1_73_type 1271 -#define _loop0_74_type 1272 -#define _loop1_75_type 1273 -#define _loop1_76_type 1274 -#define _loop1_77_type 1275 -#define _loop0_78_type 1276 -#define _loop1_79_type 1277 -#define _loop0_80_type 1278 -#define _loop1_81_type 1279 -#define _loop0_82_type 1280 -#define _loop1_83_type 1281 -#define _loop1_84_type 1282 -#define _tmp_85_type 1283 -#define _loop1_86_type 1284 -#define _loop0_88_type 1285 -#define _gather_87_type 1286 -#define _loop1_89_type 1287 -#define _loop0_90_type 1288 -#define _loop0_91_type 1289 -#define _loop0_92_type 1290 -#define _loop1_93_type 1291 -#define _loop0_94_type 1292 -#define _loop1_95_type 1293 -#define _loop1_96_type 1294 -#define _loop1_97_type 1295 -#define _loop0_98_type 1296 -#define _loop1_99_type 1297 -#define _loop0_100_type 1298 -#define _loop1_101_type 1299 -#define _loop0_102_type 1300 -#define _loop1_103_type 1301 -#define _loop1_104_type 1302 -#define _loop1_105_type 1303 -#define _loop1_106_type 1304 -#define _tmp_107_type 1305 -#define _loop0_109_type 1306 -#define _gather_108_type 1307 -#define _tmp_110_type 1308 -#define _tmp_111_type 1309 -#define _tmp_112_type 1310 -#define _tmp_113_type 1311 -#define _loop1_114_type 1312 -#define _tmp_115_type 1313 -#define _tmp_116_type 1314 -#define _loop0_118_type 1315 -#define _gather_117_type 1316 -#define _loop1_119_type 1317 -#define _loop0_120_type 1318 -#define _loop0_121_type 1319 -#define _loop0_123_type 1320 -#define _gather_122_type 1321 -#define _tmp_124_type 1322 -#define _loop0_126_type 1323 -#define _gather_125_type 1324 -#define _loop0_128_type 1325 -#define _gather_127_type 1326 -#define _loop0_130_type 1327 -#define _gather_129_type 1328 -#define _loop0_132_type 1329 -#define _gather_131_type 1330 -#define _loop0_133_type 1331 -#define _loop0_135_type 1332 -#define _gather_134_type 1333 -#define _loop1_136_type 1334 -#define _tmp_137_type 1335 -#define _loop0_139_type 1336 -#define _gather_138_type 1337 -#define _loop0_141_type 1338 -#define _gather_140_type 1339 -#define _tmp_142_type 1340 -#define _loop0_143_type 1341 -#define _loop0_144_type 1342 -#define _loop0_145_type 1343 -#define _tmp_146_type 1344 -#define _tmp_147_type 1345 -#define _tmp_148_type 1346 -#define _loop0_149_type 1347 -#define _loop1_150_type 1348 -#define _loop0_151_type 1349 -#define _loop1_152_type 1350 -#define _tmp_153_type 1351 -#define _tmp_154_type 1352 -#define _tmp_155_type 1353 -#define _loop0_157_type 1354 -#define _gather_156_type 1355 -#define _loop0_159_type 1356 -#define _gather_158_type 1357 -#define _tmp_160_type 1358 -#define _tmp_161_type 1359 -#define _tmp_162_type 1360 -#define _tmp_163_type 1361 -#define _tmp_164_type 1362 -#define _tmp_165_type 1363 -#define _tmp_166_type 1364 -#define _tmp_167_type 1365 -#define _tmp_168_type 1366 -#define _tmp_169_type 1367 -#define _tmp_170_type 1368 -#define _tmp_171_type 1369 -#define _tmp_172_type 1370 -#define _tmp_173_type 1371 -#define _tmp_174_type 1372 -#define _tmp_175_type 1373 -#define _tmp_176_type 1374 -#define _tmp_177_type 1375 -#define _tmp_178_type 1376 -#define _tmp_179_type 1377 -#define _tmp_180_type 1378 -#define _tmp_181_type 1379 -#define _tmp_182_type 1380 +#define invalid_if_stmt_type 1199 +#define invalid_elif_stmt_type 1200 +#define invalid_while_stmt_type 1201 +#define _loop0_1_type 1202 +#define _loop0_2_type 1203 +#define _loop0_4_type 1204 +#define _gather_3_type 1205 +#define _loop0_6_type 1206 +#define _gather_5_type 1207 +#define _loop0_8_type 1208 +#define _gather_7_type 1209 +#define _loop0_10_type 1210 +#define _gather_9_type 1211 +#define _loop1_11_type 1212 +#define _loop0_13_type 1213 +#define _gather_12_type 1214 +#define _tmp_14_type 1215 +#define _tmp_15_type 1216 +#define _tmp_16_type 1217 +#define _tmp_17_type 1218 +#define _tmp_18_type 1219 +#define _tmp_19_type 1220 +#define _tmp_20_type 1221 +#define _tmp_21_type 1222 +#define _loop1_22_type 1223 +#define _tmp_23_type 1224 +#define _tmp_24_type 1225 +#define _loop0_26_type 1226 +#define _gather_25_type 1227 +#define _loop0_28_type 1228 +#define _gather_27_type 1229 +#define _tmp_29_type 1230 +#define _tmp_30_type 1231 +#define _loop0_31_type 1232 +#define _loop1_32_type 1233 +#define _loop0_34_type 1234 +#define _gather_33_type 1235 +#define _tmp_35_type 1236 +#define _loop0_37_type 1237 +#define _gather_36_type 1238 +#define _tmp_38_type 1239 +#define _loop0_40_type 1240 +#define _gather_39_type 1241 +#define _loop0_42_type 1242 +#define _gather_41_type 1243 +#define _loop0_44_type 1244 +#define _gather_43_type 1245 +#define _loop0_46_type 1246 +#define _gather_45_type 1247 +#define _tmp_47_type 1248 +#define _loop1_48_type 1249 +#define _tmp_49_type 1250 +#define _loop1_50_type 1251 +#define _loop0_52_type 1252 +#define _gather_51_type 1253 +#define _tmp_53_type 1254 +#define _tmp_54_type 1255 +#define _tmp_55_type 1256 +#define _loop0_57_type 1257 +#define _gather_56_type 1258 +#define _tmp_58_type 1259 +#define _loop0_60_type 1260 +#define _gather_59_type 1261 +#define _tmp_61_type 1262 +#define _loop0_63_type 1263 +#define _gather_62_type 1264 +#define _loop0_65_type 1265 +#define _gather_64_type 1266 +#define _tmp_66_type 1267 +#define _tmp_67_type 1268 +#define _tmp_68_type 1269 +#define _tmp_69_type 1270 +#define _loop0_70_type 1271 +#define _loop0_71_type 1272 +#define _loop0_72_type 1273 +#define _loop1_73_type 1274 +#define _loop0_74_type 1275 +#define _loop1_75_type 1276 +#define _loop1_76_type 1277 +#define _loop1_77_type 1278 +#define _loop0_78_type 1279 +#define _loop1_79_type 1280 +#define _loop0_80_type 1281 +#define _loop1_81_type 1282 +#define _loop0_82_type 1283 +#define _loop1_83_type 1284 +#define _loop1_84_type 1285 +#define _tmp_85_type 1286 +#define _loop1_86_type 1287 +#define _loop0_88_type 1288 +#define _gather_87_type 1289 +#define _loop1_89_type 1290 +#define _loop0_90_type 1291 +#define _loop0_91_type 1292 +#define _loop0_92_type 1293 +#define _loop1_93_type 1294 +#define _loop0_94_type 1295 +#define _loop1_95_type 1296 +#define _loop1_96_type 1297 +#define _loop1_97_type 1298 +#define _loop0_98_type 1299 +#define _loop1_99_type 1300 +#define _loop0_100_type 1301 +#define _loop1_101_type 1302 +#define _loop0_102_type 1303 +#define _loop1_103_type 1304 +#define _loop1_104_type 1305 +#define _loop1_105_type 1306 +#define _loop1_106_type 1307 +#define _tmp_107_type 1308 +#define _loop0_109_type 1309 +#define _gather_108_type 1310 +#define _tmp_110_type 1311 +#define _tmp_111_type 1312 +#define _tmp_112_type 1313 +#define _tmp_113_type 1314 +#define _loop1_114_type 1315 +#define _tmp_115_type 1316 +#define _tmp_116_type 1317 +#define _loop0_118_type 1318 +#define _gather_117_type 1319 +#define _loop1_119_type 1320 +#define _loop0_120_type 1321 +#define _loop0_121_type 1322 +#define _loop0_123_type 1323 +#define _gather_122_type 1324 +#define _tmp_124_type 1325 +#define _loop0_126_type 1326 +#define _gather_125_type 1327 +#define _loop0_128_type 1328 +#define _gather_127_type 1329 +#define _loop0_130_type 1330 +#define _gather_129_type 1331 +#define _loop0_132_type 1332 +#define _gather_131_type 1333 +#define _loop0_133_type 1334 +#define _loop0_135_type 1335 +#define _gather_134_type 1336 +#define _loop1_136_type 1337 +#define _tmp_137_type 1338 +#define _loop0_139_type 1339 +#define _gather_138_type 1340 +#define _loop0_141_type 1341 +#define _gather_140_type 1342 +#define _tmp_142_type 1343 +#define _tmp_143_type 1344 +#define _tmp_144_type 1345 +#define _tmp_145_type 1346 +#define _loop0_146_type 1347 +#define _loop0_147_type 1348 +#define _loop0_148_type 1349 +#define _tmp_149_type 1350 +#define _tmp_150_type 1351 +#define _tmp_151_type 1352 +#define _loop0_152_type 1353 +#define _loop1_153_type 1354 +#define _loop0_154_type 1355 +#define _loop1_155_type 1356 +#define _tmp_156_type 1357 +#define _tmp_157_type 1358 +#define _tmp_158_type 1359 +#define _loop0_160_type 1360 +#define _gather_159_type 1361 +#define _loop0_162_type 1362 +#define _gather_161_type 1363 +#define _tmp_163_type 1364 +#define _tmp_164_type 1365 +#define _tmp_165_type 1366 +#define _tmp_166_type 1367 +#define _tmp_167_type 1368 +#define _tmp_168_type 1369 +#define _tmp_169_type 1370 +#define _tmp_170_type 1371 +#define _tmp_171_type 1372 +#define _tmp_172_type 1373 +#define _tmp_173_type 1374 +#define _tmp_174_type 1375 +#define _tmp_175_type 1376 +#define _tmp_176_type 1377 +#define _tmp_177_type 1378 +#define _tmp_178_type 1379 +#define _tmp_179_type 1380 +#define _tmp_180_type 1381 +#define _tmp_181_type 1382 +#define _tmp_182_type 1383 +#define _tmp_183_type 1384 +#define _tmp_184_type 1385 +#define _tmp_185_type 1386 static mod_ty file_rule(Parser *p); static mod_ty interactive_rule(Parser *p); @@ -646,6 +652,9 @@ static void *invalid_with_stmt_rule(Parser *p); static void *invalid_except_block_rule(Parser *p); static void *invalid_match_stmt_rule(Parser *p); static void *invalid_case_block_rule(Parser *p); +static void *invalid_if_stmt_rule(Parser *p); +static void *invalid_elif_stmt_rule(Parser *p); +static void *invalid_while_stmt_rule(Parser *p); static asdl_seq *_loop0_1_rule(Parser *p); static asdl_seq *_loop0_2_rule(Parser *p); static asdl_seq *_loop0_4_rule(Parser *p); @@ -788,26 +797,26 @@ static asdl_seq *_gather_138_rule(Parser *p); static asdl_seq *_loop0_141_rule(Parser *p); static asdl_seq *_gather_140_rule(Parser *p); static void *_tmp_142_rule(Parser *p); -static asdl_seq *_loop0_143_rule(Parser *p); -static asdl_seq *_loop0_144_rule(Parser *p); -static asdl_seq *_loop0_145_rule(Parser *p); -static void *_tmp_146_rule(Parser *p); -static void *_tmp_147_rule(Parser *p); -static void *_tmp_148_rule(Parser *p); -static asdl_seq *_loop0_149_rule(Parser *p); -static asdl_seq *_loop1_150_rule(Parser *p); -static asdl_seq *_loop0_151_rule(Parser *p); -static asdl_seq *_loop1_152_rule(Parser *p); -static void *_tmp_153_rule(Parser *p); -static void *_tmp_154_rule(Parser *p); -static void *_tmp_155_rule(Parser *p); -static asdl_seq *_loop0_157_rule(Parser *p); -static asdl_seq *_gather_156_rule(Parser *p); -static asdl_seq *_loop0_159_rule(Parser *p); -static asdl_seq *_gather_158_rule(Parser *p); -static void *_tmp_160_rule(Parser *p); -static void *_tmp_161_rule(Parser *p); -static void *_tmp_162_rule(Parser *p); +static void *_tmp_143_rule(Parser *p); +static void *_tmp_144_rule(Parser *p); +static void *_tmp_145_rule(Parser *p); +static asdl_seq *_loop0_146_rule(Parser *p); +static asdl_seq *_loop0_147_rule(Parser *p); +static asdl_seq *_loop0_148_rule(Parser *p); +static void *_tmp_149_rule(Parser *p); +static void *_tmp_150_rule(Parser *p); +static void *_tmp_151_rule(Parser *p); +static asdl_seq *_loop0_152_rule(Parser *p); +static asdl_seq *_loop1_153_rule(Parser *p); +static asdl_seq *_loop0_154_rule(Parser *p); +static asdl_seq *_loop1_155_rule(Parser *p); +static void *_tmp_156_rule(Parser *p); +static void *_tmp_157_rule(Parser *p); +static void *_tmp_158_rule(Parser *p); +static asdl_seq *_loop0_160_rule(Parser *p); +static asdl_seq *_gather_159_rule(Parser *p); +static asdl_seq *_loop0_162_rule(Parser *p); +static asdl_seq *_gather_161_rule(Parser *p); static void *_tmp_163_rule(Parser *p); static void *_tmp_164_rule(Parser *p); static void *_tmp_165_rule(Parser *p); @@ -828,6 +837,9 @@ static void *_tmp_179_rule(Parser *p); static void *_tmp_180_rule(Parser *p); static void *_tmp_181_rule(Parser *p); static void *_tmp_182_rule(Parser *p); +static void *_tmp_183_rule(Parser *p); +static void *_tmp_184_rule(Parser *p); +static void *_tmp_185_rule(Parser *p); // file: statements? $ @@ -3737,8 +3749,9 @@ dotted_name_raw(Parser *p) } // if_stmt: -// | 'if' named_expression &&':' block elif_stmt -// | 'if' named_expression &&':' block else_block? +// | 'if' named_expression ':' block elif_stmt +// | 'if' named_expression ':' block else_block? +// | invalid_if_stmt static stmt_ty if_stmt_rule(Parser *p) { @@ -3758,12 +3771,12 @@ if_stmt_rule(Parser *p) UNUSED(_start_lineno); // Only used by EXTRA macro int _start_col_offset = p->tokens[_mark]->col_offset; UNUSED(_start_col_offset); // Only used by EXTRA macro - { // 'if' named_expression &&':' block elif_stmt + { // 'if' named_expression ':' block elif_stmt if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> if_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' named_expression &&':' block elif_stmt")); + D(fprintf(stderr, "%*c> if_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' named_expression ':' block elif_stmt")); Token * _keyword; Token * _literal; expr_ty a; @@ -3774,14 +3787,14 @@ if_stmt_rule(Parser *p) && (a = named_expression_rule(p)) // named_expression && - (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' + (_literal = _PyPegen_expect_token(p, 11)) // token=':' && (b = block_rule(p)) // block && (c = elif_stmt_rule(p)) // elif_stmt ) { - D(fprintf(stderr, "%*c+ if_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' named_expression &&':' block elif_stmt")); + D(fprintf(stderr, "%*c+ if_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' named_expression ':' block elif_stmt")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -3801,14 +3814,14 @@ if_stmt_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s if_stmt[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' named_expression &&':' block elif_stmt")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' named_expression ':' block elif_stmt")); } - { // 'if' named_expression &&':' block else_block? + { // 'if' named_expression ':' block else_block? if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> if_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' named_expression &&':' block else_block?")); + D(fprintf(stderr, "%*c> if_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' named_expression ':' block else_block?")); Token * _keyword; Token * _literal; expr_ty a; @@ -3819,14 +3832,14 @@ if_stmt_rule(Parser *p) && (a = named_expression_rule(p)) // named_expression && - (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' + (_literal = _PyPegen_expect_token(p, 11)) // token=':' && (b = block_rule(p)) // block && (c = else_block_rule(p), 1) // else_block? ) { - D(fprintf(stderr, "%*c+ if_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' named_expression &&':' block else_block?")); + D(fprintf(stderr, "%*c+ if_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' named_expression ':' block else_block?")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -3846,7 +3859,26 @@ if_stmt_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s if_stmt[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' named_expression &&':' block else_block?")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' named_expression ':' block else_block?")); + } + if (p->call_invalid_rules) { // invalid_if_stmt + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> if_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "invalid_if_stmt")); + void *invalid_if_stmt_var; + if ( + (invalid_if_stmt_var = invalid_if_stmt_rule(p)) // invalid_if_stmt + ) + { + D(fprintf(stderr, "%*c+ if_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "invalid_if_stmt")); + _res = invalid_if_stmt_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s if_stmt[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "invalid_if_stmt")); } _res = NULL; done: @@ -3855,8 +3887,9 @@ if_stmt_rule(Parser *p) } // elif_stmt: -// | 'elif' named_expression &&':' block elif_stmt -// | 'elif' named_expression &&':' block else_block? +// | 'elif' named_expression ':' block elif_stmt +// | 'elif' named_expression ':' block else_block? +// | invalid_elif_stmt static stmt_ty elif_stmt_rule(Parser *p) { @@ -3876,12 +3909,12 @@ elif_stmt_rule(Parser *p) UNUSED(_start_lineno); // Only used by EXTRA macro int _start_col_offset = p->tokens[_mark]->col_offset; UNUSED(_start_col_offset); // Only used by EXTRA macro - { // 'elif' named_expression &&':' block elif_stmt + { // 'elif' named_expression ':' block elif_stmt if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> elif_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'elif' named_expression &&':' block elif_stmt")); + D(fprintf(stderr, "%*c> elif_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'elif' named_expression ':' block elif_stmt")); Token * _keyword; Token * _literal; expr_ty a; @@ -3892,14 +3925,14 @@ elif_stmt_rule(Parser *p) && (a = named_expression_rule(p)) // named_expression && - (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' + (_literal = _PyPegen_expect_token(p, 11)) // token=':' && (b = block_rule(p)) // block && (c = elif_stmt_rule(p)) // elif_stmt ) { - D(fprintf(stderr, "%*c+ elif_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'elif' named_expression &&':' block elif_stmt")); + D(fprintf(stderr, "%*c+ elif_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'elif' named_expression ':' block elif_stmt")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -3919,14 +3952,14 @@ elif_stmt_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s elif_stmt[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'elif' named_expression &&':' block elif_stmt")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'elif' named_expression ':' block elif_stmt")); } - { // 'elif' named_expression &&':' block else_block? + { // 'elif' named_expression ':' block else_block? if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> elif_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'elif' named_expression &&':' block else_block?")); + D(fprintf(stderr, "%*c> elif_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'elif' named_expression ':' block else_block?")); Token * _keyword; Token * _literal; expr_ty a; @@ -3937,14 +3970,14 @@ elif_stmt_rule(Parser *p) && (a = named_expression_rule(p)) // named_expression && - (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' + (_literal = _PyPegen_expect_token(p, 11)) // token=':' && (b = block_rule(p)) // block && (c = else_block_rule(p), 1) // else_block? ) { - D(fprintf(stderr, "%*c+ elif_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'elif' named_expression &&':' block else_block?")); + D(fprintf(stderr, "%*c+ elif_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'elif' named_expression ':' block else_block?")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -3964,7 +3997,26 @@ elif_stmt_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s elif_stmt[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'elif' named_expression &&':' block else_block?")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'elif' named_expression ':' block else_block?")); + } + if (p->call_invalid_rules) { // invalid_elif_stmt + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> elif_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "invalid_elif_stmt")); + void *invalid_elif_stmt_var; + if ( + (invalid_elif_stmt_var = invalid_elif_stmt_rule(p)) // invalid_elif_stmt + ) + { + D(fprintf(stderr, "%*c+ elif_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "invalid_elif_stmt")); + _res = invalid_elif_stmt_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s elif_stmt[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "invalid_elif_stmt")); } _res = NULL; done: @@ -4019,7 +4071,7 @@ else_block_rule(Parser *p) return _res; } -// while_stmt: 'while' named_expression &&':' block else_block? +// while_stmt: 'while' named_expression ':' block else_block? | invalid_while_stmt static stmt_ty while_stmt_rule(Parser *p) { @@ -4039,12 +4091,12 @@ while_stmt_rule(Parser *p) UNUSED(_start_lineno); // Only used by EXTRA macro int _start_col_offset = p->tokens[_mark]->col_offset; UNUSED(_start_col_offset); // Only used by EXTRA macro - { // 'while' named_expression &&':' block else_block? + { // 'while' named_expression ':' block else_block? if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> while_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'while' named_expression &&':' block else_block?")); + D(fprintf(stderr, "%*c> while_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'while' named_expression ':' block else_block?")); Token * _keyword; Token * _literal; expr_ty a; @@ -4055,14 +4107,14 @@ while_stmt_rule(Parser *p) && (a = named_expression_rule(p)) // named_expression && - (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' + (_literal = _PyPegen_expect_token(p, 11)) // token=':' && (b = block_rule(p)) // block && (c = else_block_rule(p), 1) // else_block? ) { - D(fprintf(stderr, "%*c+ while_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'while' named_expression &&':' block else_block?")); + D(fprintf(stderr, "%*c+ while_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'while' named_expression ':' block else_block?")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -4082,7 +4134,26 @@ while_stmt_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s while_stmt[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'while' named_expression &&':' block else_block?")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'while' named_expression ':' block else_block?")); + } + if (p->call_invalid_rules) { // invalid_while_stmt + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> while_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "invalid_while_stmt")); + void *invalid_while_stmt_var; + if ( + (invalid_while_stmt_var = invalid_while_stmt_rule(p)) // invalid_while_stmt + ) + { + D(fprintf(stderr, "%*c+ while_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "invalid_while_stmt")); + _res = invalid_while_stmt_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s while_stmt[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "invalid_while_stmt")); } _res = NULL; done: @@ -9214,7 +9285,7 @@ star_named_expression_rule(Parser *p) return _res; } -// named_expression: NAME ':=' ~ expression | expression !':=' | invalid_named_expression +// named_expression: NAME ':=' ~ expression | invalid_named_expression | expression !':=' static expr_ty named_expression_rule(Parser *p) { @@ -9280,45 +9351,45 @@ named_expression_rule(Parser *p) return NULL; } } - { // expression !':=' + if (p->call_invalid_rules) { // invalid_named_expression if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> named_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression !':='")); - expr_ty expression_var; + D(fprintf(stderr, "%*c> named_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "invalid_named_expression")); + void *invalid_named_expression_var; if ( - (expression_var = expression_rule(p)) // expression - && - _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 53) // token=':=' + (invalid_named_expression_var = invalid_named_expression_rule(p)) // invalid_named_expression ) { - D(fprintf(stderr, "%*c+ named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !':='")); - _res = expression_var; + D(fprintf(stderr, "%*c+ named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "invalid_named_expression")); + _res = invalid_named_expression_var; goto done; } p->mark = _mark; D(fprintf(stderr, "%*c%s named_expression[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression !':='")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "invalid_named_expression")); } - if (p->call_invalid_rules) { // invalid_named_expression + { // expression !':=' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> named_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "invalid_named_expression")); - void *invalid_named_expression_var; + D(fprintf(stderr, "%*c> named_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression !':='")); + expr_ty expression_var; if ( - (invalid_named_expression_var = invalid_named_expression_rule(p)) // invalid_named_expression + (expression_var = expression_rule(p)) // expression + && + _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 53) // token=':=' ) { - D(fprintf(stderr, "%*c+ named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "invalid_named_expression")); - _res = invalid_named_expression_var; + D(fprintf(stderr, "%*c+ named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !':='")); + _res = expression_var; goto done; } p->mark = _mark; D(fprintf(stderr, "%*c%s named_expression[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "invalid_named_expression")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression !':='")); } _res = NULL; done: @@ -17242,7 +17313,10 @@ invalid_kwarg_rule(Parser *p) return _res; } -// invalid_named_expression: expression ':=' expression +// invalid_named_expression: +// | expression ':=' expression +// | NAME '=' bitwise_or !('=' | ':=' | ',') +// | !(list | tuple | genexp | 'True' | 'None' | 'False') bitwise_or '=' bitwise_or !('=' | ':=' | ',') static void * invalid_named_expression_rule(Parser *p) { @@ -17283,6 +17357,72 @@ invalid_named_expression_rule(Parser *p) D(fprintf(stderr, "%*c%s invalid_named_expression[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ':=' expression")); } + { // NAME '=' bitwise_or !('=' | ':=' | ',') + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_named_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "NAME '=' bitwise_or !('=' | ':=' | ',')")); + expr_ty a; + Token * b; + expr_ty bitwise_or_var; + if ( + (a = _PyPegen_name_token(p)) // NAME + && + (b = _PyPegen_expect_token(p, 22)) // token='=' + && + (bitwise_or_var = bitwise_or_rule(p)) // bitwise_or + && + _PyPegen_lookahead(0, _tmp_143_rule, p) + ) + { + D(fprintf(stderr, "%*c+ invalid_named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "NAME '=' bitwise_or !('=' | ':=' | ',')")); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( b , "invalid syntax. Maybe you meant '==' or ':=' instead of '='?" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_named_expression[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "NAME '=' bitwise_or !('=' | ':=' | ',')")); + } + { // !(list | tuple | genexp | 'True' | 'None' | 'False') bitwise_or '=' bitwise_or !('=' | ':=' | ',') + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_named_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "!(list | tuple | genexp | 'True' | 'None' | 'False') bitwise_or '=' bitwise_or !('=' | ':=' | ',')")); + expr_ty a; + Token * b; + expr_ty bitwise_or_var; + if ( + _PyPegen_lookahead(0, _tmp_144_rule, p) + && + (a = bitwise_or_rule(p)) // bitwise_or + && + (b = _PyPegen_expect_token(p, 22)) // token='=' + && + (bitwise_or_var = bitwise_or_rule(p)) // bitwise_or + && + _PyPegen_lookahead(0, _tmp_145_rule, p) + ) + { + D(fprintf(stderr, "%*c+ invalid_named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!(list | tuple | genexp | 'True' | 'None' | 'False') bitwise_or '=' bitwise_or !('=' | ':=' | ',')")); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( b , "cannot assign to %s here. Maybe you meant '==' instead of '='?" , _PyPegen_get_expr_name ( a ) ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_named_expression[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "!(list | tuple | genexp | 'True' | 'None' | 'False') bitwise_or '=' bitwise_or !('=' | ':=' | ',')")); + } _res = NULL; done: D(p->level--); @@ -17344,7 +17484,7 @@ invalid_assignment_rule(Parser *p) D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expression ',' star_named_expressions* ':' expression")); Token * _literal; Token * _literal_1; - asdl_seq * _loop0_143_var; + asdl_seq * _loop0_146_var; expr_ty a; expr_ty expression_var; if ( @@ -17352,7 +17492,7 @@ invalid_assignment_rule(Parser *p) && (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_loop0_143_var = _loop0_143_rule(p)) // star_named_expressions* + (_loop0_146_var = _loop0_146_rule(p)) // star_named_expressions* && (_literal_1 = _PyPegen_expect_token(p, 11)) // token=':' && @@ -17409,10 +17549,10 @@ invalid_assignment_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* star_expressions '='")); Token * _literal; - asdl_seq * _loop0_144_var; + asdl_seq * _loop0_147_var; expr_ty a; if ( - (_loop0_144_var = _loop0_144_rule(p)) // ((star_targets '='))* + (_loop0_147_var = _loop0_147_rule(p)) // ((star_targets '='))* && (a = star_expressions_rule(p)) // star_expressions && @@ -17439,10 +17579,10 @@ invalid_assignment_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* yield_expr '='")); Token * _literal; - asdl_seq * _loop0_145_var; + asdl_seq * _loop0_148_var; expr_ty a; if ( - (_loop0_145_var = _loop0_145_rule(p)) // ((star_targets '='))* + (_loop0_148_var = _loop0_148_rule(p)) // ((star_targets '='))* && (a = yield_expr_rule(p)) // yield_expr && @@ -17468,7 +17608,7 @@ invalid_assignment_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)")); - void *_tmp_146_var; + void *_tmp_149_var; expr_ty a; AugOperator* augassign_var; if ( @@ -17476,7 +17616,7 @@ invalid_assignment_rule(Parser *p) && (augassign_var = augassign_rule(p)) // augassign && - (_tmp_146_var = _tmp_146_rule(p)) // yield_expr | star_expressions + (_tmp_149_var = _tmp_149_rule(p)) // yield_expr | star_expressions ) { D(fprintf(stderr, "%*c+ invalid_assignment[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)")); @@ -17734,11 +17874,11 @@ invalid_comprehension_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_comprehension[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('[' | '(' | '{') starred_expression for_if_clauses")); - void *_tmp_147_var; + void *_tmp_150_var; expr_ty a; asdl_comprehension_seq* for_if_clauses_var; if ( - (_tmp_147_var = _tmp_147_rule(p)) // '[' | '(' | '{' + (_tmp_150_var = _tmp_150_rule(p)) // '[' | '(' | '{' && (a = starred_expression_rule(p)) // starred_expression && @@ -17767,11 +17907,11 @@ invalid_comprehension_rule(Parser *p) Token * _literal; void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings - void *_tmp_148_var; + void *_tmp_151_var; expr_ty a; asdl_comprehension_seq* for_if_clauses_var; if ( - (_tmp_148_var = _tmp_148_rule(p)) // '[' | '{' + (_tmp_151_var = _tmp_151_rule(p)) // '[' | '{' && (a = star_named_expression_rule(p)) // star_named_expression && @@ -17871,11 +18011,11 @@ invalid_parameters_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default* invalid_parameters_helper param_no_default")); - asdl_seq * _loop0_149_var; + asdl_seq * _loop0_152_var; void *invalid_parameters_helper_var; arg_ty param_no_default_var; if ( - (_loop0_149_var = _loop0_149_rule(p)) // param_no_default* + (_loop0_152_var = _loop0_152_rule(p)) // param_no_default* && (invalid_parameters_helper_var = invalid_parameters_helper_rule(p)) // invalid_parameters_helper && @@ -17942,13 +18082,13 @@ invalid_parameters_helper_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - asdl_seq * _loop1_150_var; + asdl_seq * _loop1_153_var; if ( - (_loop1_150_var = _loop1_150_rule(p)) // param_with_default+ + (_loop1_153_var = _loop1_153_rule(p)) // param_with_default+ ) { D(fprintf(stderr, "%*c+ invalid_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - _res = _loop1_150_var; + _res = _loop1_153_var; goto done; } p->mark = _mark; @@ -17979,11 +18119,11 @@ invalid_lambda_parameters_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_lambda_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default* invalid_lambda_parameters_helper lambda_param_no_default")); - asdl_seq * _loop0_151_var; + asdl_seq * _loop0_154_var; void *invalid_lambda_parameters_helper_var; arg_ty lambda_param_no_default_var; if ( - (_loop0_151_var = _loop0_151_rule(p)) // lambda_param_no_default* + (_loop0_154_var = _loop0_154_rule(p)) // lambda_param_no_default* && (invalid_lambda_parameters_helper_var = invalid_lambda_parameters_helper_rule(p)) // invalid_lambda_parameters_helper && @@ -18052,13 +18192,13 @@ invalid_lambda_parameters_helper_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_lambda_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - asdl_seq * _loop1_152_var; + asdl_seq * _loop1_155_var; if ( - (_loop1_152_var = _loop1_152_rule(p)) // lambda_param_with_default+ + (_loop1_155_var = _loop1_155_rule(p)) // lambda_param_with_default+ ) { D(fprintf(stderr, "%*c+ invalid_lambda_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - _res = _loop1_152_var; + _res = _loop1_155_var; goto done; } p->mark = _mark; @@ -18089,11 +18229,11 @@ invalid_star_etc_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); Token * _literal; - void *_tmp_153_var; + void *_tmp_156_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_153_var = _tmp_153_rule(p)) // ')' | ',' (')' | '**') + (_tmp_156_var = _tmp_156_rule(p)) // ')' | ',' (')' | '**') ) { D(fprintf(stderr, "%*c+ invalid_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); @@ -18163,11 +18303,11 @@ invalid_lambda_star_etc_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_lambda_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); Token * _literal; - void *_tmp_154_var; + void *_tmp_157_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_154_var = _tmp_154_rule(p)) // ':' | ',' (':' | '**') + (_tmp_157_var = _tmp_157_rule(p)) // ':' | ',' (':' | '**') ) { D(fprintf(stderr, "%*c+ invalid_lambda_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); @@ -18269,7 +18409,7 @@ invalid_with_item_rule(Parser *p) && (a = expression_rule(p)) // expression && - _PyPegen_lookahead(1, _tmp_155_rule, p) + _PyPegen_lookahead(1, _tmp_158_rule, p) ) { D(fprintf(stderr, "%*c+ invalid_with_item[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression 'as' expression &(',' | ')' | ':')")); @@ -18368,7 +18508,7 @@ invalid_group_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ invalid_group[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' starred_expression ')'")); - _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "can't use starred expression here" ); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "cannot use starred expression here" ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; D(p->level--); @@ -18401,7 +18541,7 @@ invalid_group_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ invalid_group[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' '**' expression ')'")); - _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "can't use double starred expression here" ); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "cannot use double starred expression here" ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; D(p->level--); @@ -18482,7 +18622,7 @@ invalid_with_stmt_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ &&':'")); - asdl_seq * _gather_156_var; + asdl_seq * _gather_159_var; Token * _keyword; Token * _literal; void *_opt_var; @@ -18492,13 +18632,13 @@ invalid_with_stmt_rule(Parser *p) && (_keyword = _PyPegen_expect_token(p, 519)) // token='with' && - (_gather_156_var = _gather_156_rule(p)) // ','.(expression ['as' star_target])+ + (_gather_159_var = _gather_159_rule(p)) // ','.(expression ['as' star_target])+ && (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' ) { D(fprintf(stderr, "%*c+ invalid_with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ &&':'")); - _res = _PyPegen_dummy_name(p, _opt_var, _keyword, _gather_156_var, _literal); + _res = _PyPegen_dummy_name(p, _opt_var, _keyword, _gather_159_var, _literal); goto done; } p->mark = _mark; @@ -18511,7 +18651,7 @@ invalid_with_stmt_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' &&':'")); - asdl_seq * _gather_158_var; + asdl_seq * _gather_161_var; Token * _keyword; Token * _literal; Token * _literal_1; @@ -18527,7 +18667,7 @@ invalid_with_stmt_rule(Parser *p) && (_literal = _PyPegen_expect_token(p, 7)) // token='(' && - (_gather_158_var = _gather_158_rule(p)) // ','.(expressions ['as' star_target])+ + (_gather_161_var = _gather_161_rule(p)) // ','.(expressions ['as' star_target])+ && (_opt_var_1 = _PyPegen_expect_token(p, 12), 1) // ','? && @@ -18537,7 +18677,7 @@ invalid_with_stmt_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ invalid_with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' &&':'")); - _res = _PyPegen_dummy_name(p, _opt_var, _keyword, _literal, _gather_158_var, _opt_var_1, _literal_1, _literal_2); + _res = _PyPegen_dummy_name(p, _opt_var, _keyword, _literal, _gather_161_var, _opt_var_1, _literal_1, _literal_2); goto done; } p->mark = _mark; @@ -18586,7 +18726,7 @@ invalid_except_block_rule(Parser *p) && (expressions_var = expressions_rule(p)) // expressions && - (_opt_var = _tmp_160_rule(p), 1) // ['as' NAME] + (_opt_var = _tmp_163_rule(p), 1) // ['as' NAME] && (_literal_1 = _PyPegen_expect_token(p, 11)) // token=':' ) @@ -18620,7 +18760,7 @@ invalid_except_block_rule(Parser *p) && (expression_var = expression_rule(p)) // expression && - (_opt_var = _tmp_161_rule(p), 1) // ['as' NAME] + (_opt_var = _tmp_164_rule(p), 1) // ['as' NAME] && (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' ) @@ -18757,6 +18897,147 @@ invalid_case_block_rule(Parser *p) return _res; } +// invalid_if_stmt: 'if' named_expression NEWLINE +static void * +invalid_if_stmt_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // 'if' named_expression NEWLINE + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_if_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' named_expression NEWLINE")); + Token * _keyword; + expr_ty named_expression_var; + Token * newline_var; + if ( + (_keyword = _PyPegen_expect_token(p, 510)) // token='if' + && + (named_expression_var = named_expression_rule(p)) // named_expression + && + (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' + ) + { + D(fprintf(stderr, "%*c+ invalid_if_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' named_expression NEWLINE")); + _res = RAISE_SYNTAX_ERROR ( "expected ':'" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_if_stmt[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' named_expression NEWLINE")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// invalid_elif_stmt: 'elif' named_expression NEWLINE +static void * +invalid_elif_stmt_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // 'elif' named_expression NEWLINE + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_elif_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'elif' named_expression NEWLINE")); + Token * _keyword; + expr_ty named_expression_var; + Token * newline_var; + if ( + (_keyword = _PyPegen_expect_token(p, 515)) // token='elif' + && + (named_expression_var = named_expression_rule(p)) // named_expression + && + (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' + ) + { + D(fprintf(stderr, "%*c+ invalid_elif_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'elif' named_expression NEWLINE")); + _res = RAISE_SYNTAX_ERROR ( "expected ':'" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_elif_stmt[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'elif' named_expression NEWLINE")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// invalid_while_stmt: 'while' named_expression NEWLINE +static void * +invalid_while_stmt_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // 'while' named_expression NEWLINE + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_while_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'while' named_expression NEWLINE")); + Token * _keyword; + expr_ty named_expression_var; + Token * newline_var; + if ( + (_keyword = _PyPegen_expect_token(p, 512)) // token='while' + && + (named_expression_var = named_expression_rule(p)) // named_expression + && + (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' + ) + { + D(fprintf(stderr, "%*c+ invalid_while_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'while' named_expression NEWLINE")); + _res = RAISE_SYNTAX_ERROR ( "expected ':'" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_while_stmt[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'while' named_expression NEWLINE")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + // _loop0_1: NEWLINE static asdl_seq * _loop0_1_rule(Parser *p) @@ -20005,12 +20286,12 @@ _loop1_22_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_22[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_162_var; + void *_tmp_165_var; while ( - (_tmp_162_var = _tmp_162_rule(p)) // star_targets '=' + (_tmp_165_var = _tmp_165_rule(p)) // star_targets '=' ) { - _res = _tmp_162_var; + _res = _tmp_165_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -20513,12 +20794,12 @@ _loop0_31_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_31[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_163_var; + void *_tmp_166_var; while ( - (_tmp_163_var = _tmp_163_rule(p)) // '.' | '...' + (_tmp_166_var = _tmp_166_rule(p)) // '.' | '...' ) { - _res = _tmp_163_var; + _res = _tmp_166_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -20579,12 +20860,12 @@ _loop1_32_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_32[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_164_var; + void *_tmp_167_var; while ( - (_tmp_164_var = _tmp_164_rule(p)) // '.' | '...' + (_tmp_167_var = _tmp_167_rule(p)) // '.' | '...' ) { - _res = _tmp_164_var; + _res = _tmp_167_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23695,12 +23976,12 @@ _loop1_84_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_84[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('@' named_expression NEWLINE)")); - void *_tmp_165_var; + void *_tmp_168_var; while ( - (_tmp_165_var = _tmp_165_rule(p)) // '@' named_expression NEWLINE + (_tmp_168_var = _tmp_168_rule(p)) // '@' named_expression NEWLINE ) { - _res = _tmp_165_var; + _res = _tmp_168_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23813,12 +24094,12 @@ _loop1_86_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_86[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_expression)")); - void *_tmp_166_var; + void *_tmp_169_var; while ( - (_tmp_166_var = _tmp_166_rule(p)) // ',' star_expression + (_tmp_169_var = _tmp_169_rule(p)) // ',' star_expression ) { - _res = _tmp_166_var; + _res = _tmp_169_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -23998,12 +24279,12 @@ _loop1_89_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_89[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' expression)")); - void *_tmp_167_var; + void *_tmp_170_var; while ( - (_tmp_167_var = _tmp_167_rule(p)) // ',' expression + (_tmp_170_var = _tmp_170_rule(p)) // ',' expression ) { - _res = _tmp_167_var; + _res = _tmp_170_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -25028,12 +25309,12 @@ _loop1_104_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_104[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('or' conjunction)")); - void *_tmp_168_var; + void *_tmp_171_var; while ( - (_tmp_168_var = _tmp_168_rule(p)) // 'or' conjunction + (_tmp_171_var = _tmp_171_rule(p)) // 'or' conjunction ) { - _res = _tmp_168_var; + _res = _tmp_171_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -25099,12 +25380,12 @@ _loop1_105_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_105[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('and' inversion)")); - void *_tmp_169_var; + void *_tmp_172_var; while ( - (_tmp_169_var = _tmp_169_rule(p)) // 'and' inversion + (_tmp_172_var = _tmp_172_rule(p)) // 'and' inversion ) { - _res = _tmp_169_var; + _res = _tmp_172_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26020,12 +26301,12 @@ _loop0_120_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_170_var; + void *_tmp_173_var; while ( - (_tmp_170_var = _tmp_170_rule(p)) // 'if' disjunction + (_tmp_173_var = _tmp_173_rule(p)) // 'if' disjunction ) { - _res = _tmp_170_var; + _res = _tmp_173_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26086,12 +26367,12 @@ _loop0_121_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_171_var; + void *_tmp_174_var; while ( - (_tmp_171_var = _tmp_171_rule(p)) // 'if' disjunction + (_tmp_174_var = _tmp_174_rule(p)) // 'if' disjunction ) { - _res = _tmp_171_var; + _res = _tmp_174_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26157,7 +26438,7 @@ _loop0_123_rule(Parser *p) while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_172_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_175_rule(p)) // starred_expression | named_expression !'=' ) { _res = elem; @@ -26220,7 +26501,7 @@ _gather_122_rule(Parser *p) void *elem; asdl_seq * seq; if ( - (elem = _tmp_172_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_175_rule(p)) // starred_expression | named_expression !'=' && (seq = _loop0_123_rule(p)) // _loop0_123 ) @@ -26766,12 +27047,12 @@ _loop0_133_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_173_var; + void *_tmp_176_var; while ( - (_tmp_173_var = _tmp_173_rule(p)) // ',' star_target + (_tmp_176_var = _tmp_176_rule(p)) // ',' star_target ) { - _res = _tmp_173_var; + _res = _tmp_176_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26946,12 +27227,12 @@ _loop1_136_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_174_var; + void *_tmp_177_var; while ( - (_tmp_174_var = _tmp_174_rule(p)) // ',' star_target + (_tmp_177_var = _tmp_177_rule(p)) // ',' star_target ) { - _res = _tmp_174_var; + _res = _tmp_177_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -27314,9 +27595,288 @@ _tmp_142_rule(Parser *p) return _res; } -// _loop0_143: star_named_expressions +// _tmp_143: '=' | ':=' | ',' +static void * +_tmp_143_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // '=' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'='")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 22)) // token='=' + ) + { + D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'='")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'='")); + } + { // ':=' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':='")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 53)) // token=':=' + ) + { + D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':='")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':='")); + } + { // ',' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + ) + { + D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _tmp_144: list | tuple | genexp | 'True' | 'None' | 'False' +static void * +_tmp_144_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // list + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "list")); + expr_ty list_var; + if ( + (list_var = list_rule(p)) // list + ) + { + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "list")); + _res = list_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "list")); + } + { // tuple + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "tuple")); + expr_ty tuple_var; + if ( + (tuple_var = tuple_rule(p)) // tuple + ) + { + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "tuple")); + _res = tuple_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "tuple")); + } + { // genexp + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "genexp")); + expr_ty genexp_var; + if ( + (genexp_var = genexp_rule(p)) // genexp + ) + { + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "genexp")); + _res = genexp_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "genexp")); + } + { // 'True' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'True'")); + Token * _keyword; + if ( + (_keyword = _PyPegen_expect_token(p, 524)) // token='True' + ) + { + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'True'")); + _res = _keyword; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'True'")); + } + { // 'None' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'None'")); + Token * _keyword; + if ( + (_keyword = _PyPegen_expect_token(p, 523)) // token='None' + ) + { + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'None'")); + _res = _keyword; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'None'")); + } + { // 'False' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'False'")); + Token * _keyword; + if ( + (_keyword = _PyPegen_expect_token(p, 525)) // token='False' + ) + { + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'False'")); + _res = _keyword; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'False'")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _tmp_145: '=' | ':=' | ',' +static void * +_tmp_145_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // '=' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'='")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 22)) // token='=' + ) + { + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'='")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'='")); + } + { // ':=' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':='")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 53)) // token=':=' + ) + { + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':='")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':='")); + } + { // ',' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + ) + { + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _loop0_146: star_named_expressions static asdl_seq * -_loop0_143_rule(Parser *p) +_loop0_146_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27340,7 +27900,7 @@ _loop0_143_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions")); + D(fprintf(stderr, "%*c> _loop0_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions")); asdl_expr_seq* star_named_expressions_var; while ( (star_named_expressions_var = star_named_expressions_rule(p)) // star_named_expressions @@ -27362,7 +27922,7 @@ _loop0_143_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_143[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_146[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_named_expressions")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -27375,14 +27935,14 @@ _loop0_143_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_143_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_146_type, _seq); D(p->level--); return _seq; } -// _loop0_144: (star_targets '=') +// _loop0_147: (star_targets '=') static asdl_seq * -_loop0_144_rule(Parser *p) +_loop0_147_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27406,13 +27966,13 @@ _loop0_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_175_var; + D(fprintf(stderr, "%*c> _loop0_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); + void *_tmp_178_var; while ( - (_tmp_175_var = _tmp_175_rule(p)) // star_targets '=' + (_tmp_178_var = _tmp_178_rule(p)) // star_targets '=' ) { - _res = _tmp_175_var; + _res = _tmp_178_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -27428,7 +27988,7 @@ _loop0_144_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_147[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -27441,14 +28001,14 @@ _loop0_144_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_144_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_147_type, _seq); D(p->level--); return _seq; } -// _loop0_145: (star_targets '=') +// _loop0_148: (star_targets '=') static asdl_seq * -_loop0_145_rule(Parser *p) +_loop0_148_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27472,13 +28032,13 @@ _loop0_145_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_176_var; + D(fprintf(stderr, "%*c> _loop0_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); + void *_tmp_179_var; while ( - (_tmp_176_var = _tmp_176_rule(p)) // star_targets '=' + (_tmp_179_var = _tmp_179_rule(p)) // star_targets '=' ) { - _res = _tmp_176_var; + _res = _tmp_179_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -27494,7 +28054,7 @@ _loop0_145_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_145[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_148[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -27507,14 +28067,14 @@ _loop0_145_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_145_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_148_type, _seq); D(p->level--); return _seq; } -// _tmp_146: yield_expr | star_expressions +// _tmp_149: yield_expr | star_expressions static void * -_tmp_146_rule(Parser *p) +_tmp_149_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27528,18 +28088,18 @@ _tmp_146_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr")); + D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr")); expr_ty yield_expr_var; if ( (yield_expr_var = yield_expr_rule(p)) // yield_expr ) { - D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr")); + D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr")); _res = yield_expr_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "yield_expr")); } { // star_expressions @@ -27547,18 +28107,18 @@ _tmp_146_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); expr_ty star_expressions_var; if ( (star_expressions_var = star_expressions_rule(p)) // star_expressions ) { - D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); _res = star_expressions_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_expressions")); } _res = NULL; @@ -27567,9 +28127,9 @@ _tmp_146_rule(Parser *p) return _res; } -// _tmp_147: '[' | '(' | '{' +// _tmp_150: '[' | '(' | '{' static void * -_tmp_147_rule(Parser *p) +_tmp_150_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27583,18 +28143,18 @@ _tmp_147_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 9)) // token='[' ) { - D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'['")); } { // '(' @@ -27602,18 +28162,18 @@ _tmp_147_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('")); + D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' ) { - D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('")); + D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'('")); } { // '{' @@ -27621,18 +28181,18 @@ _tmp_147_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 25)) // token='{' ) { - D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{'")); } _res = NULL; @@ -27641,9 +28201,9 @@ _tmp_147_rule(Parser *p) return _res; } -// _tmp_148: '[' | '{' +// _tmp_151: '[' | '{' static void * -_tmp_148_rule(Parser *p) +_tmp_151_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27657,18 +28217,18 @@ _tmp_148_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 9)) // token='[' ) { - D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'['")); } { // '{' @@ -27676,18 +28236,18 @@ _tmp_148_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 25)) // token='{' ) { - D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{'")); } _res = NULL; @@ -27696,9 +28256,9 @@ _tmp_148_rule(Parser *p) return _res; } -// _loop0_149: param_no_default +// _loop0_152: param_no_default static asdl_seq * -_loop0_149_rule(Parser *p) +_loop0_152_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27722,7 +28282,7 @@ _loop0_149_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); + D(fprintf(stderr, "%*c> _loop0_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); arg_ty param_no_default_var; while ( (param_no_default_var = param_no_default_rule(p)) // param_no_default @@ -27744,7 +28304,7 @@ _loop0_149_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_149[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_152[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_no_default")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -27757,14 +28317,14 @@ _loop0_149_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_149_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_152_type, _seq); D(p->level--); return _seq; } -// _loop1_150: param_with_default +// _loop1_153: param_with_default static asdl_seq * -_loop1_150_rule(Parser *p) +_loop1_153_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27788,7 +28348,7 @@ _loop1_150_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); + D(fprintf(stderr, "%*c> _loop1_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); NameDefaultPair* param_with_default_var; while ( (param_with_default_var = param_with_default_rule(p)) // param_with_default @@ -27810,7 +28370,7 @@ _loop1_150_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_150[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_153[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -27828,14 +28388,14 @@ _loop1_150_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop1_150_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_153_type, _seq); D(p->level--); return _seq; } -// _loop0_151: lambda_param_no_default +// _loop0_154: lambda_param_no_default static asdl_seq * -_loop0_151_rule(Parser *p) +_loop0_154_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27859,7 +28419,7 @@ _loop0_151_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); + D(fprintf(stderr, "%*c> _loop0_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); arg_ty lambda_param_no_default_var; while ( (lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default @@ -27881,7 +28441,7 @@ _loop0_151_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_151[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_154[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_no_default")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -27894,14 +28454,14 @@ _loop0_151_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_151_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_154_type, _seq); D(p->level--); return _seq; } -// _loop1_152: lambda_param_with_default +// _loop1_155: lambda_param_with_default static asdl_seq * -_loop1_152_rule(Parser *p) +_loop1_155_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27925,7 +28485,7 @@ _loop1_152_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); + D(fprintf(stderr, "%*c> _loop1_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); NameDefaultPair* lambda_param_with_default_var; while ( (lambda_param_with_default_var = lambda_param_with_default_rule(p)) // lambda_param_with_default @@ -27947,7 +28507,7 @@ _loop1_152_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_152[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_155[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -27965,14 +28525,14 @@ _loop1_152_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop1_152_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_155_type, _seq); D(p->level--); return _seq; } -// _tmp_153: ')' | ',' (')' | '**') +// _tmp_156: ')' | ',' (')' | '**') static void * -_tmp_153_rule(Parser *p) +_tmp_156_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27986,18 +28546,18 @@ _tmp_153_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // ',' (')' | '**') @@ -28005,21 +28565,21 @@ _tmp_153_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); Token * _literal; - void *_tmp_177_var; + void *_tmp_180_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_177_var = _tmp_177_rule(p)) // ')' | '**' + (_tmp_180_var = _tmp_180_rule(p)) // ')' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_177_var); + D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_180_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (')' | '**')")); } _res = NULL; @@ -28028,9 +28588,9 @@ _tmp_153_rule(Parser *p) return _res; } -// _tmp_154: ':' | ',' (':' | '**') +// _tmp_157: ':' | ',' (':' | '**') static void * -_tmp_154_rule(Parser *p) +_tmp_157_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28044,18 +28604,18 @@ _tmp_154_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_157[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_157[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_157[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // ',' (':' | '**') @@ -28063,21 +28623,21 @@ _tmp_154_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); + D(fprintf(stderr, "%*c> _tmp_157[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); Token * _literal; - void *_tmp_178_var; + void *_tmp_181_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_178_var = _tmp_178_rule(p)) // ':' | '**' + (_tmp_181_var = _tmp_181_rule(p)) // ':' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_178_var); + D(fprintf(stderr, "%*c+ _tmp_157[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_181_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_157[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (':' | '**')")); } _res = NULL; @@ -28086,9 +28646,9 @@ _tmp_154_rule(Parser *p) return _res; } -// _tmp_155: ',' | ')' | ':' +// _tmp_158: ',' | ')' | ':' static void * -_tmp_155_rule(Parser *p) +_tmp_158_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28102,18 +28662,18 @@ _tmp_155_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c> _tmp_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' ) { - D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c+ _tmp_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_158[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','")); } { // ')' @@ -28121,18 +28681,18 @@ _tmp_155_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_158[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // ':' @@ -28140,18 +28700,18 @@ _tmp_155_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_158[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } _res = NULL; @@ -28160,9 +28720,9 @@ _tmp_155_rule(Parser *p) return _res; } -// _loop0_157: ',' (expression ['as' star_target]) +// _loop0_160: ',' (expression ['as' star_target]) static asdl_seq * -_loop0_157_rule(Parser *p) +_loop0_160_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28186,13 +28746,13 @@ _loop0_157_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_157[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (expression ['as' star_target])")); + D(fprintf(stderr, "%*c> _loop0_160[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (expression ['as' star_target])")); Token * _literal; void *elem; while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_179_rule(p)) // expression ['as' star_target] + (elem = _tmp_182_rule(p)) // expression ['as' star_target] ) { _res = elem; @@ -28217,7 +28777,7 @@ _loop0_157_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_157[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_160[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (expression ['as' star_target])")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -28230,14 +28790,14 @@ _loop0_157_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_157_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_160_type, _seq); D(p->level--); return _seq; } -// _gather_156: (expression ['as' star_target]) _loop0_157 +// _gather_159: (expression ['as' star_target]) _loop0_160 static asdl_seq * -_gather_156_rule(Parser *p) +_gather_159_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28246,27 +28806,27 @@ _gather_156_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // (expression ['as' star_target]) _loop0_157 + { // (expression ['as' star_target]) _loop0_160 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(expression ['as' star_target]) _loop0_157")); + D(fprintf(stderr, "%*c> _gather_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(expression ['as' star_target]) _loop0_160")); void *elem; asdl_seq * seq; if ( - (elem = _tmp_179_rule(p)) // expression ['as' star_target] + (elem = _tmp_182_rule(p)) // expression ['as' star_target] && - (seq = _loop0_157_rule(p)) // _loop0_157 + (seq = _loop0_160_rule(p)) // _loop0_160 ) { - D(fprintf(stderr, "%*c+ _gather_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(expression ['as' star_target]) _loop0_157")); + D(fprintf(stderr, "%*c+ _gather_159[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(expression ['as' star_target]) _loop0_160")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_156[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(expression ['as' star_target]) _loop0_157")); + D(fprintf(stderr, "%*c%s _gather_159[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(expression ['as' star_target]) _loop0_160")); } _res = NULL; done: @@ -28274,9 +28834,9 @@ _gather_156_rule(Parser *p) return _res; } -// _loop0_159: ',' (expressions ['as' star_target]) +// _loop0_162: ',' (expressions ['as' star_target]) static asdl_seq * -_loop0_159_rule(Parser *p) +_loop0_162_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28300,13 +28860,13 @@ _loop0_159_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (expressions ['as' star_target])")); + D(fprintf(stderr, "%*c> _loop0_162[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (expressions ['as' star_target])")); Token * _literal; void *elem; while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_180_rule(p)) // expressions ['as' star_target] + (elem = _tmp_183_rule(p)) // expressions ['as' star_target] ) { _res = elem; @@ -28331,7 +28891,7 @@ _loop0_159_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_159[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_162[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (expressions ['as' star_target])")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -28344,14 +28904,14 @@ _loop0_159_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_159_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_162_type, _seq); D(p->level--); return _seq; } -// _gather_158: (expressions ['as' star_target]) _loop0_159 +// _gather_161: (expressions ['as' star_target]) _loop0_162 static asdl_seq * -_gather_158_rule(Parser *p) +_gather_161_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28360,27 +28920,27 @@ _gather_158_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // (expressions ['as' star_target]) _loop0_159 + { // (expressions ['as' star_target]) _loop0_162 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(expressions ['as' star_target]) _loop0_159")); + D(fprintf(stderr, "%*c> _gather_161[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(expressions ['as' star_target]) _loop0_162")); void *elem; asdl_seq * seq; if ( - (elem = _tmp_180_rule(p)) // expressions ['as' star_target] + (elem = _tmp_183_rule(p)) // expressions ['as' star_target] && - (seq = _loop0_159_rule(p)) // _loop0_159 + (seq = _loop0_162_rule(p)) // _loop0_162 ) { - D(fprintf(stderr, "%*c+ _gather_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(expressions ['as' star_target]) _loop0_159")); + D(fprintf(stderr, "%*c+ _gather_161[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(expressions ['as' star_target]) _loop0_162")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_158[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(expressions ['as' star_target]) _loop0_159")); + D(fprintf(stderr, "%*c%s _gather_161[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(expressions ['as' star_target]) _loop0_162")); } _res = NULL; done: @@ -28388,9 +28948,9 @@ _gather_158_rule(Parser *p) return _res; } -// _tmp_160: 'as' NAME +// _tmp_163: 'as' NAME static void * -_tmp_160_rule(Parser *p) +_tmp_163_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28404,7 +28964,7 @@ _tmp_160_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_160[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME")); + D(fprintf(stderr, "%*c> _tmp_163[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME")); Token * _keyword; expr_ty name_var; if ( @@ -28413,12 +28973,12 @@ _tmp_160_rule(Parser *p) (name_var = _PyPegen_name_token(p)) // NAME ) { - D(fprintf(stderr, "%*c+ _tmp_160[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME")); + D(fprintf(stderr, "%*c+ _tmp_163[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME")); _res = _PyPegen_dummy_name(p, _keyword, name_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_160[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_163[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' NAME")); } _res = NULL; @@ -28427,9 +28987,9 @@ _tmp_160_rule(Parser *p) return _res; } -// _tmp_161: 'as' NAME +// _tmp_164: 'as' NAME static void * -_tmp_161_rule(Parser *p) +_tmp_164_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28443,7 +29003,7 @@ _tmp_161_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_161[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME")); + D(fprintf(stderr, "%*c> _tmp_164[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME")); Token * _keyword; expr_ty name_var; if ( @@ -28452,12 +29012,12 @@ _tmp_161_rule(Parser *p) (name_var = _PyPegen_name_token(p)) // NAME ) { - D(fprintf(stderr, "%*c+ _tmp_161[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME")); + D(fprintf(stderr, "%*c+ _tmp_164[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME")); _res = _PyPegen_dummy_name(p, _keyword, name_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_161[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_164[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' NAME")); } _res = NULL; @@ -28466,9 +29026,9 @@ _tmp_161_rule(Parser *p) return _res; } -// _tmp_162: star_targets '=' +// _tmp_165: star_targets '=' static void * -_tmp_162_rule(Parser *p) +_tmp_165_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28482,7 +29042,7 @@ _tmp_162_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_162[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_165[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty z; if ( @@ -28491,7 +29051,7 @@ _tmp_162_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_162[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_165[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -28501,7 +29061,7 @@ _tmp_162_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_162[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_165[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -28510,9 +29070,9 @@ _tmp_162_rule(Parser *p) return _res; } -// _tmp_163: '.' | '...' +// _tmp_166: '.' | '...' static void * -_tmp_163_rule(Parser *p) +_tmp_166_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28526,18 +29086,18 @@ _tmp_163_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_163[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_166[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_163[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_166[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_163[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_166[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -28545,18 +29105,18 @@ _tmp_163_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_163[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_166[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_163[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_166[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_163[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_166[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -28565,9 +29125,9 @@ _tmp_163_rule(Parser *p) return _res; } -// _tmp_164: '.' | '...' +// _tmp_167: '.' | '...' static void * -_tmp_164_rule(Parser *p) +_tmp_167_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28581,18 +29141,18 @@ _tmp_164_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_164[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_164[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_164[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -28600,18 +29160,18 @@ _tmp_164_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_164[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_164[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_164[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -28620,9 +29180,9 @@ _tmp_164_rule(Parser *p) return _res; } -// _tmp_165: '@' named_expression NEWLINE +// _tmp_168: '@' named_expression NEWLINE static void * -_tmp_165_rule(Parser *p) +_tmp_168_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28636,7 +29196,7 @@ _tmp_165_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_165[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c> _tmp_168[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); Token * _literal; expr_ty f; Token * newline_var; @@ -28648,7 +29208,7 @@ _tmp_165_rule(Parser *p) (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' ) { - D(fprintf(stderr, "%*c+ _tmp_165[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c+ _tmp_168[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); _res = f; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -28658,7 +29218,7 @@ _tmp_165_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_165[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_168[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'@' named_expression NEWLINE")); } _res = NULL; @@ -28667,9 +29227,9 @@ _tmp_165_rule(Parser *p) return _res; } -// _tmp_166: ',' star_expression +// _tmp_169: ',' star_expression static void * -_tmp_166_rule(Parser *p) +_tmp_169_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28683,7 +29243,7 @@ _tmp_166_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_166[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c> _tmp_169[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); Token * _literal; expr_ty c; if ( @@ -28692,7 +29252,7 @@ _tmp_166_rule(Parser *p) (c = star_expression_rule(p)) // star_expression ) { - D(fprintf(stderr, "%*c+ _tmp_166[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c+ _tmp_169[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -28702,7 +29262,7 @@ _tmp_166_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_166[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_169[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_expression")); } _res = NULL; @@ -28711,9 +29271,9 @@ _tmp_166_rule(Parser *p) return _res; } -// _tmp_167: ',' expression +// _tmp_170: ',' expression static void * -_tmp_167_rule(Parser *p) +_tmp_170_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28727,7 +29287,7 @@ _tmp_167_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); Token * _literal; expr_ty c; if ( @@ -28736,7 +29296,7 @@ _tmp_167_rule(Parser *p) (c = expression_rule(p)) // expression ) { - D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -28746,7 +29306,7 @@ _tmp_167_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' expression")); } _res = NULL; @@ -28755,9 +29315,9 @@ _tmp_167_rule(Parser *p) return _res; } -// _tmp_168: 'or' conjunction +// _tmp_171: 'or' conjunction static void * -_tmp_168_rule(Parser *p) +_tmp_171_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28771,7 +29331,7 @@ _tmp_168_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_168[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); Token * _keyword; expr_ty c; if ( @@ -28780,7 +29340,7 @@ _tmp_168_rule(Parser *p) (c = conjunction_rule(p)) // conjunction ) { - D(fprintf(stderr, "%*c+ _tmp_168[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -28790,7 +29350,7 @@ _tmp_168_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_168[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'or' conjunction")); } _res = NULL; @@ -28799,9 +29359,9 @@ _tmp_168_rule(Parser *p) return _res; } -// _tmp_169: 'and' inversion +// _tmp_172: 'and' inversion static void * -_tmp_169_rule(Parser *p) +_tmp_172_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28815,7 +29375,7 @@ _tmp_169_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_169[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c> _tmp_172[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); Token * _keyword; expr_ty c; if ( @@ -28824,7 +29384,7 @@ _tmp_169_rule(Parser *p) (c = inversion_rule(p)) // inversion ) { - D(fprintf(stderr, "%*c+ _tmp_169[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c+ _tmp_172[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -28834,7 +29394,7 @@ _tmp_169_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_169[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_172[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'and' inversion")); } _res = NULL; @@ -28843,9 +29403,9 @@ _tmp_169_rule(Parser *p) return _res; } -// _tmp_170: 'if' disjunction +// _tmp_173: 'if' disjunction static void * -_tmp_170_rule(Parser *p) +_tmp_173_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28859,7 +29419,7 @@ _tmp_170_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_173[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -28868,7 +29428,7 @@ _tmp_170_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_173[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -28878,7 +29438,7 @@ _tmp_170_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_173[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -28887,9 +29447,9 @@ _tmp_170_rule(Parser *p) return _res; } -// _tmp_171: 'if' disjunction +// _tmp_174: 'if' disjunction static void * -_tmp_171_rule(Parser *p) +_tmp_174_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28903,7 +29463,7 @@ _tmp_171_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_174[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -28912,7 +29472,7 @@ _tmp_171_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_174[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -28922,7 +29482,7 @@ _tmp_171_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_174[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -28931,9 +29491,9 @@ _tmp_171_rule(Parser *p) return _res; } -// _tmp_172: starred_expression | named_expression !'=' +// _tmp_175: starred_expression | named_expression !'=' static void * -_tmp_172_rule(Parser *p) +_tmp_175_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28947,18 +29507,18 @@ _tmp_172_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_172[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); expr_ty starred_expression_var; if ( (starred_expression_var = starred_expression_rule(p)) // starred_expression ) { - D(fprintf(stderr, "%*c+ _tmp_172[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); _res = starred_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_172[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression")); } { // named_expression !'=' @@ -28966,7 +29526,7 @@ _tmp_172_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_172[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); + D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); expr_ty named_expression_var; if ( (named_expression_var = named_expression_rule(p)) // named_expression @@ -28974,12 +29534,12 @@ _tmp_172_rule(Parser *p) _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_172[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); + D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); _res = named_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_172[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "named_expression !'='")); } _res = NULL; @@ -28988,9 +29548,9 @@ _tmp_172_rule(Parser *p) return _res; } -// _tmp_173: ',' star_target +// _tmp_176: ',' star_target static void * -_tmp_173_rule(Parser *p) +_tmp_176_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29004,7 +29564,7 @@ _tmp_173_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_173[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c> _tmp_176[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -29013,7 +29573,7 @@ _tmp_173_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_173[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c+ _tmp_176[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29023,7 +29583,7 @@ _tmp_173_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_173[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_176[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -29032,9 +29592,9 @@ _tmp_173_rule(Parser *p) return _res; } -// _tmp_174: ',' star_target +// _tmp_177: ',' star_target static void * -_tmp_174_rule(Parser *p) +_tmp_177_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29048,7 +29608,7 @@ _tmp_174_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_174[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c> _tmp_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -29057,7 +29617,7 @@ _tmp_174_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_174[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c+ _tmp_177[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29067,7 +29627,7 @@ _tmp_174_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_174[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_177[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -29076,9 +29636,9 @@ _tmp_174_rule(Parser *p) return _res; } -// _tmp_175: star_targets '=' +// _tmp_178: star_targets '=' static void * -_tmp_175_rule(Parser *p) +_tmp_178_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29092,7 +29652,7 @@ _tmp_175_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -29101,12 +29661,12 @@ _tmp_175_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -29115,9 +29675,9 @@ _tmp_175_rule(Parser *p) return _res; } -// _tmp_176: star_targets '=' +// _tmp_179: star_targets '=' static void * -_tmp_176_rule(Parser *p) +_tmp_179_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29131,7 +29691,7 @@ _tmp_176_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_176[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -29140,12 +29700,12 @@ _tmp_176_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_176[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_176[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -29154,9 +29714,9 @@ _tmp_176_rule(Parser *p) return _res; } -// _tmp_177: ')' | '**' +// _tmp_180: ')' | '**' static void * -_tmp_177_rule(Parser *p) +_tmp_180_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29170,18 +29730,18 @@ _tmp_177_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_177[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_177[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // '**' @@ -29189,18 +29749,18 @@ _tmp_177_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_177[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_177[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -29209,9 +29769,9 @@ _tmp_177_rule(Parser *p) return _res; } -// _tmp_178: ':' | '**' +// _tmp_181: ':' | '**' static void * -_tmp_178_rule(Parser *p) +_tmp_181_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29225,18 +29785,18 @@ _tmp_178_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // '**' @@ -29244,18 +29804,18 @@ _tmp_178_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -29264,9 +29824,9 @@ _tmp_178_rule(Parser *p) return _res; } -// _tmp_179: expression ['as' star_target] +// _tmp_182: expression ['as' star_target] static void * -_tmp_179_rule(Parser *p) +_tmp_182_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29280,22 +29840,22 @@ _tmp_179_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); + D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings expr_ty expression_var; if ( (expression_var = expression_rule(p)) // expression && - (_opt_var = _tmp_181_rule(p), 1) // ['as' star_target] + (_opt_var = _tmp_184_rule(p), 1) // ['as' star_target] ) { - D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); + D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); _res = _PyPegen_dummy_name(p, expression_var, _opt_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ['as' star_target]")); } _res = NULL; @@ -29304,9 +29864,9 @@ _tmp_179_rule(Parser *p) return _res; } -// _tmp_180: expressions ['as' star_target] +// _tmp_183: expressions ['as' star_target] static void * -_tmp_180_rule(Parser *p) +_tmp_183_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29320,22 +29880,22 @@ _tmp_180_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); + D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings expr_ty expressions_var; if ( (expressions_var = expressions_rule(p)) // expressions && - (_opt_var = _tmp_182_rule(p), 1) // ['as' star_target] + (_opt_var = _tmp_185_rule(p), 1) // ['as' star_target] ) { - D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); + D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); _res = _PyPegen_dummy_name(p, expressions_var, _opt_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expressions ['as' star_target]")); } _res = NULL; @@ -29344,9 +29904,9 @@ _tmp_180_rule(Parser *p) return _res; } -// _tmp_181: 'as' star_target +// _tmp_184: 'as' star_target static void * -_tmp_181_rule(Parser *p) +_tmp_184_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29360,7 +29920,7 @@ _tmp_181_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); Token * _keyword; expr_ty star_target_var; if ( @@ -29369,12 +29929,12 @@ _tmp_181_rule(Parser *p) (star_target_var = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); _res = _PyPegen_dummy_name(p, _keyword, star_target_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target")); } _res = NULL; @@ -29383,9 +29943,9 @@ _tmp_181_rule(Parser *p) return _res; } -// _tmp_182: 'as' star_target +// _tmp_185: 'as' star_target static void * -_tmp_182_rule(Parser *p) +_tmp_185_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29399,7 +29959,7 @@ _tmp_182_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c> _tmp_185[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); Token * _keyword; expr_ty star_target_var; if ( @@ -29408,12 +29968,12 @@ _tmp_182_rule(Parser *p) (star_target_var = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c+ _tmp_185[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); _res = _PyPegen_dummy_name(p, _keyword, star_target_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_185[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target")); } _res = NULL; diff --git a/Parser/pegen.c b/Parser/pegen.c index f841ace28e7172..7258cafca58cac 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -147,8 +147,8 @@ byte_offset_to_character_offset(PyObject *line, Py_ssize_t col_offset) return 0; } Py_ssize_t len = strlen(str); - if (col_offset > len) { - col_offset = len; + if (col_offset > len + 1) { + col_offset = len + 1; } assert(col_offset >= 0); PyObject *text = PyUnicode_DecodeUTF8(str, col_offset, "replace"); @@ -184,7 +184,7 @@ _PyPegen_get_expr_name(expr_ty e) case BoolOp_kind: case BinOp_kind: case UnaryOp_kind: - return "operator"; + return "expression"; case GeneratorExp_kind: return "generator expression"; case Yield_kind: @@ -199,7 +199,7 @@ _PyPegen_get_expr_name(expr_ty e) case DictComp_kind: return "dict comprehension"; case Dict_kind: - return "dict display"; + return "dict literal"; case Set_kind: return "set display"; case JoinedStr_kind: From 37a5e220234dd4afb8f97b810393e3d58db674a1 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Tue, 13 Apr 2021 01:03:20 +0800 Subject: [PATCH 023/108] Use double quotes over single quotes for match statement grammar (GH-24943) --- Doc/reference/compound_stmts.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 2da90682a1f9bd..8e680812706841 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -533,7 +533,7 @@ The match statement is used for pattern matching. Syntax: match_stmt: 'match' `subject_expr` ":" NEWLINE INDENT `case_block`+ DEDENT subject_expr: `star_named_expression` "," `star_named_expressions`? : | `named_expression` - case_block: 'case' `patterns` [`guard`] ':' `block` + case_block: 'case' `patterns` [`guard`] ":" `block` .. note:: This section uses single quotes to denote @@ -861,7 +861,7 @@ emphasize the intended grouping. Otherwise, it has no additional syntax. Syntax: .. productionlist:: python-grammar - group_pattern: '(' `pattern` ')' + group_pattern: "(" `pattern` ")" In simple terms ``(P)`` has the same effect as ``P``. From 852150ddfe68bc2696fc880175aeb855a0c16ae6 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Tue, 13 Apr 2021 01:23:12 +0800 Subject: [PATCH 024/108] bpo-42904: Fix get_type_hints for class local namespaces (GH-24201) --- Lib/test/test_typing.py | 9 ++++++++- Lib/typing.py | 3 ++- .../Library/2021-01-12-23-17-02.bpo-42904.-4qkTD.rst | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-01-12-23-17-02.bpo-42904.-4qkTD.rst diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 82c517a4e60024..062163ccf4b65b 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -2874,7 +2874,7 @@ def test_get_type_hints_classes(self): {'x': int, 'y': int}) self.assertEqual(gth(mod_generics_cache.B), {'my_inner_a1': mod_generics_cache.B.A, - 'my_inner_a2': mod_generics_cache.A, + 'my_inner_a2': mod_generics_cache.B.A, 'my_outer_a': mod_generics_cache.A}) def test_respect_no_type_check(self): @@ -3010,6 +3010,13 @@ def __iand__(self, other: Const["MySet[T]"]) -> "MySet[T]": {'other': MySet[T], 'return': MySet[T]} ) + def test_get_type_hints_classes(self): + class Foo: + y = str + x: y + # This previously raised an error under PEP 563. + self.assertEqual(get_type_hints(Foo), {'x': str}) + class GetUtilitiesTestCase(TestCase): def test_get_origin(self): diff --git a/Lib/typing.py b/Lib/typing.py index a24c01f0e3b9e3..583438e4740ab1 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -1632,12 +1632,13 @@ def get_type_hints(obj, globalns=None, localns=None, include_extras=False): else: base_globals = globalns ann = base.__dict__.get('__annotations__', {}) + base_locals = dict(vars(base)) if localns is None else localns for name, value in ann.items(): if value is None: value = type(None) if isinstance(value, str): value = ForwardRef(value, is_argument=False) - value = _eval_type(value, base_globals, localns) + value = _eval_type(value, base_globals, base_locals) hints[name] = value return hints if include_extras else {k: _strip_annotations(t) for k, t in hints.items()} diff --git a/Misc/NEWS.d/next/Library/2021-01-12-23-17-02.bpo-42904.-4qkTD.rst b/Misc/NEWS.d/next/Library/2021-01-12-23-17-02.bpo-42904.-4qkTD.rst new file mode 100644 index 00000000000000..ef4b4e56fbebcd --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-12-23-17-02.bpo-42904.-4qkTD.rst @@ -0,0 +1,2 @@ +:func:`typing.get_type_hints` now checks the local namespace of a class when +evaluating :pep:`563` annotations inside said class. From a9cf69df2e031d6157f01289f66ca9cf723ceb5c Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Mon, 12 Apr 2021 23:47:25 +0530 Subject: [PATCH 025/108] bpo-41515: Fix KeyError raised in get_type_hints (GH-25352) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: efahl <36704995+efahl@users.noreply.github.com> --- Lib/test/test_typing.py | 6 ++++++ Lib/typing.py | 5 ++++- .../next/Library/2021-04-12-06-01-10.bpo-41515.YaVReb.rst | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-12-06-01-10.bpo-41515.YaVReb.rst diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 062163ccf4b65b..a6afd35944f2e7 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -2267,6 +2267,12 @@ def test_no_isinstance(self): with self.assertRaises(TypeError): issubclass(int, ClassVar) + def test_bad_module(self): + # bpo-41515 + class BadModule: + pass + BadModule.__module__ = 'bad' # Something not in sys.modules + assert(get_type_hints(BadModule), {}) class FinalTests(BaseTestCase): diff --git a/Lib/typing.py b/Lib/typing.py index 583438e4740ab1..dc2a7a478835db 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -1628,7 +1628,10 @@ def get_type_hints(obj, globalns=None, localns=None, include_extras=False): hints = {} for base in reversed(obj.__mro__): if globalns is None: - base_globals = sys.modules[base.__module__].__dict__ + try: + base_globals = sys.modules[base.__module__].__dict__ + except KeyError: + continue else: base_globals = globalns ann = base.__dict__.get('__annotations__', {}) diff --git a/Misc/NEWS.d/next/Library/2021-04-12-06-01-10.bpo-41515.YaVReb.rst b/Misc/NEWS.d/next/Library/2021-04-12-06-01-10.bpo-41515.YaVReb.rst new file mode 100644 index 00000000000000..aef5c1791dfeac --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-12-06-01-10.bpo-41515.YaVReb.rst @@ -0,0 +1,2 @@ +Fix :exc:`KeyError` raised in :func:`typing.get_type_hints` due to +synthetic modules that don't appear in ``sys.modules``. From 20ac34772aa9805ccbf082e700f2b033291ff5d2 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 12 Apr 2021 20:53:15 +0100 Subject: [PATCH 026/108] Fix Sphinx errors in the documentation and re-activate the suspicious check (GH-25368) The suspicious check is still executed as part of the release process and release managers have been lately fixing some actual errors that the suspicious target can find. For this reason, reactivate the suspicious until we decide what to do in a coordinated fashion. --- .github/workflows/doc.yml | 2 +- .travis.yml | 2 +- Doc/c-api/init_config.rst | 2 +- Doc/tools/susp-ignored.csv | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 864303bfff8505..8924fc992e25e6 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -36,7 +36,7 @@ jobs: - name: 'Install build dependencies' run: make -C Doc/ PYTHON=../python venv - name: 'Build documentation' - run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest html + run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest html suspicious - name: 'Upload' uses: actions/upload-artifact@v2.2.2 with: diff --git a/.travis.yml b/.travis.yml index 7050d2557a7fc6..fc063216914446 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ matrix: - cd Doc - make venv PYTHON=python script: - - make check html SPHINXOPTS="-q -W -j4" + - make check html suspicious SPHINXOPTS="-q -W -j4" - name: "Documentation tests" os: linux language: c diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst index 7ececeb6c6269b..d364f4a3c98b5d 100644 --- a/Doc/c-api/init_config.rst +++ b/Doc/c-api/init_config.rst @@ -831,7 +831,7 @@ PyConfig Set by the :envvar:`PYTHONPLATLIBDIR` environment variable. Default: value of the ``PLATLIBDIR`` macro which is set by the - :option`configure --with-platlibdir option <--with-platlibdir>` (default: + :option:`configure --with-platlibdir option <--with-platlibdir>` (default: ``"lib"``). Part of the :ref:`Python Path Configuration ` input. diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv index fd27ab5d80dc23..325c5fa35eed7a 100644 --- a/Doc/tools/susp-ignored.csv +++ b/Doc/tools/susp-ignored.csv @@ -365,3 +365,4 @@ whatsnew/changelog,,::,default::DeprecationWarning library/importlib.metadata,,:main,"EntryPoint(name='wheel', value='wheel.cli:main', group='console_scripts')" library/importlib.metadata,,`,loading the metadata for packages for the indicated ``context``. library/re,,`,"`" +using/configure,84,:db2,=db1:db2:... From 85918e4ab6e9410008aef6dedf000d24b3e120ea Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 12 Apr 2021 23:27:35 +0200 Subject: [PATCH 027/108] bpo-43774: Add more links to configure options (GH-25363) --- Doc/c-api/init_config.rst | 8 ++++---- Doc/howto/instrumentation.rst | 8 +++++--- Doc/library/decimal.rst | 4 ++-- Doc/library/sqlite3.rst | 4 ++-- Doc/library/sys.rst | 5 +++-- Doc/library/zoneinfo.rst | 5 +++-- Doc/using/configure.rst | 13 ++++++++++--- Doc/using/unix.rst | 1 + Doc/whatsnew/3.10.rst | 25 +++++++++++++------------ Doc/whatsnew/3.9.rst | 4 ++-- 10 files changed, 45 insertions(+), 32 deletions(-) diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst index d364f4a3c98b5d..5e9296a5470d44 100644 --- a/Doc/c-api/init_config.rst +++ b/Doc/c-api/init_config.rst @@ -638,7 +638,7 @@ PyConfig Set to ``1`` by the :envvar:`PYTHONDUMPREFS` environment variable. Need a special build of Python with the ``Py_TRACE_REFS`` macro defined: - see :option:`configure --with-trace-refs <--with-trace-refs>`. + see the :option:`configure --with-trace-refs option <--with-trace-refs>`. Default: ``0``. @@ -820,7 +820,7 @@ PyConfig Set to ``1`` by the :envvar:`PYTHONMALLOCSTATS` environment variable. The option is ignored if Python is :option:`configured using - --without-pymalloc <--without-pymalloc>`. + the --without-pymalloc option <--without-pymalloc>`. Default: ``0``. @@ -831,8 +831,8 @@ PyConfig Set by the :envvar:`PYTHONPLATLIBDIR` environment variable. Default: value of the ``PLATLIBDIR`` macro which is set by the - :option:`configure --with-platlibdir option <--with-platlibdir>` (default: - ``"lib"``). + :option:`configure --with-platlibdir option <--with-platlibdir>` + (default: ``"lib"``). Part of the :ref:`Python Path Configuration ` input. diff --git a/Doc/howto/instrumentation.rst b/Doc/howto/instrumentation.rst index ab6240d1c02e7f..4a59ae82f96e2d 100644 --- a/Doc/howto/instrumentation.rst +++ b/Doc/howto/instrumentation.rst @@ -46,7 +46,8 @@ or:: $ sudo apt-get install systemtap-sdt-dev -CPython must then be configured ``--with-dtrace``: +CPython must then be :option:`configured with the --with-dtrace option +<--with-dtrace>`: .. code-block:: none @@ -77,7 +78,8 @@ the built binary by seeing if it contains a ".note.stapsdt" section. $ readelf -S ./python | grep .note.stapsdt [30] .note.stapsdt NOTE 0000000000000000 00308d78 -If you've built Python as a shared library (with --enable-shared), you +If you've built Python as a shared library +(with the :option:`--enable-shared` configure option), you need to look instead within the shared library. For example:: $ readelf -S libpython3.3dm.so.1.0 | grep .note.stapsdt @@ -252,7 +254,7 @@ where the columns are: and the remainder indicates the call/return hierarchy as the script executes. -For a `--enable-shared` build of CPython, the markers are contained within the +For a :option:`--enable-shared` build of CPython, the markers are contained within the libpython shared library, and the probe's dotted path needs to reflect this. For example, this line from the above example: diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index 35a263a659eafa..e759c5cf23b9e7 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -1484,8 +1484,8 @@ are also included in the pure Python version for compatibility. .. data:: HAVE_CONTEXTVAR - The default value is ``True``. If Python is :option:`configured with - --without-decimal-contextvar <--without-decimal-contextvar>`, + The default value is ``True``. If Python is :option:`configured using + the --without-decimal-contextvar option <--without-decimal-contextvar>`, the C version uses a thread-local rather than a coroutine-local context and the value is ``False``. This is slightly faster in some nested context scenarios. diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 1da5c7f3ab187a..aee58a4bbfc07c 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -1090,5 +1090,5 @@ committed: .. [#f1] The sqlite3 module is not built with loadable extension support by default, because some platforms (notably Mac OS X) have SQLite libraries which are compiled without this feature. To get loadable - extension support, you must pass ``--enable-loadable-sqlite-extensions`` to - configure. + extension support, you must pass the + :option:`--enable-loadable-sqlite-extensions` option to configure. diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index d85eadbf5a8fa5..721edd1495aa5b 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -250,8 +250,9 @@ always available. Print low-level information to stderr about the state of CPython's memory allocator. - If Python is :option:`configured --with-pydebug <--with-pydebug>`, it also - performs some expensive internal consistency checks. + If Python is `built in debug mode ` (:option:`configure + --with-pydebug option <--with-pydebug>`), it also performs some expensive + internal consistency checks. .. versionadded:: 3.3 diff --git a/Doc/library/zoneinfo.rst b/Doc/library/zoneinfo.rst index 3a4c12a73acd72..1b2ba2af2ae6fb 100644 --- a/Doc/library/zoneinfo.rst +++ b/Doc/library/zoneinfo.rst @@ -124,8 +124,9 @@ time zone database (except on Windows, where there are no "well-known" locations for time zone data). On POSIX systems, downstream distributors and those building Python from source who know where their system time zone data is deployed may change the default time zone path by specifying -the compile-time option ``TZPATH`` (or, more likely, the ``configure`` flag -``--with-tzpath``), which should be a string delimited by :data:`os.pathsep`. +the compile-time option ``TZPATH`` (or, more likely, the :option:`configure +flag --with-tzpath <--with-tzpath>`), which should be a string delimited by +:data:`os.pathsep`. On all platforms, the configured value is available as the ``TZPATH`` key in :func:`sysconfig.get_config_var`. diff --git a/Doc/using/configure.rst b/Doc/using/configure.rst index 85c9018067e047..e7fad7f2e622b9 100644 --- a/Doc/using/configure.rst +++ b/Doc/using/configure.rst @@ -19,7 +19,10 @@ General Options .. cmdoption:: --enable-loadable-sqlite-extensions Support loadable extensions in the :mod:`_sqlite` extension module (default - is no), see the :mod:`sqlite3` module. + is no). + + See the :meth:`sqlite3.Connection.enable_load_extension` method of the + :mod:`sqlite3` module. .. versionadded:: 3.6 @@ -54,8 +57,9 @@ General Options .. cmdoption:: --with-tzpath= - Select the default time zone search path for :data:`zoneinfo.TZPATH`, - see the :mod:`zoneinfo` module. + Select the default time zone search path for :data:`zoneinfo.TZPATH`. + See the :ref:`Compile-time configuration + ` of the :mod:`zoneinfo` module. Default: ``/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo``. @@ -287,6 +291,9 @@ Debug options Enable DTrace support (default is no). + See :ref:`Instrumenting CPython with DTrace and SystemTap + `. + .. versionadded:: 3.6 .. cmdoption:: --with-address-sanitizer diff --git a/Doc/using/unix.rst b/Doc/using/unix.rst index b5b26ecef20fb7..09dd5b0ac6e909 100644 --- a/Doc/using/unix.rst +++ b/Doc/using/unix.rst @@ -168,6 +168,7 @@ Custom OpenSSL $ popd 3. Build Python with custom OpenSSL + (see the configure `--with-openssl` and `--with-openssl-rpath` options) .. code-block:: shell-session diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 85f229cd787173..6af0f834a9d4ce 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -986,9 +986,9 @@ Optimizations van Rossum in :issue:`42927`, based on ideas implemented originally in PyPy and MicroPython.) -* When building Python with ``--enable-optimizations`` now +* When building Python with :option:`--enable-optimizations` now ``-fno-semantic-interposition`` is added to both the compile and link line. - This speeds builds of the Python interpreter created with ``--enable-shared`` + This speeds builds of the Python interpreter created with :option:`--enable-shared` with ``gcc`` by up to 30%. See `this article `_ for more details. (Contributed by Victor Stinner and Pablo Galindo in @@ -1300,11 +1300,12 @@ Build Changes * The :mod:`atexit` module must now always be built as a built-in module. (Contributed by Victor Stinner in :issue:`42639`.) -* Added ``--disable-test-modules`` option to the ``configure`` script: +* Added :option:`--disable-test-modules` option to the ``configure`` script: don't build nor install test modules. (Contributed by Xavier de Gaye, Thomas Petazzoni and Peixing Xin in :issue:`27640`.) -* Add ``--with-wheel-pkg-dir=PATH`` option to the ``./configure`` script. If +* Add :option:`--with-wheel-pkg-dir=PATH option <--with-wheel-pkg-dir>` + to the ``./configure`` script. If specified, the :mod:`ensurepip` module looks for ``setuptools`` and ``pip`` wheel packages in this directory: if both are present, these wheel packages are used instead of ensurepip bundled wheel packages. @@ -1316,19 +1317,19 @@ Build Changes (Contributed by Victor Stinner in :issue:`42856`.) -* Add a new configure ``--without-static-libpython`` option to not build the - ``libpythonMAJOR.MINOR.a`` static library and not install the ``python.o`` - object file. +* Add a new :option:`configure --without-static-libpython option + <--without-static-libpython>` to not build the ``libpythonMAJOR.MINOR.a`` + static library and not install the ``python.o`` object file. (Contributed by Victor Stinner in :issue:`43103`.) * The ``configure`` script now uses the ``pkg-config`` utility, if available, to detect the location of Tcl/Tk headers and libraries. As before, those - locations can be explicitly specified with the ``--with-tcltk-includes`` - and ``--with-tcltk-libs`` configuration options. + locations can be explicitly specified with the :option:`--with-tcltk-includes` + and :option:`--with-tcltk-libs` configuration options. (Contributed by Manolis Stamatogiannakis in :issue:`42603`.) -* Add ``--with-openssl-rpath`` option to ``configure`` script. The option +* Add :option:`--with-openssl-rpath` option to ``configure`` script. The option simplifies building Python with a custom OpenSSL installation, e.g. ``./configure --with-openssl=/path/to/openssl --with-openssl-rpath=auto``. (Contributed by Christian Heimes in :issue:`43466`.) @@ -1405,8 +1406,8 @@ New Features in debug mode because the :c:type:`PyObject` structure is the same in release and debug mode since Python 3.8 (see :issue:`36465`). - The limited C API is still not supported in the ``--with-trace-refs`` special - build (``Py_TRACE_REFS`` macro). + The limited C API is still not supported in the :option:`--with-trace-refs` + special build (``Py_TRACE_REFS`` macro). (Contributed by Victor Stinner in :issue:`43688`.) * Add the :c:func:`Py_Is(x, y) ` function to test if the *x* object is diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index c16b9a70fbdd15..174d9e24be319b 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -1211,9 +1211,9 @@ Build Changes non-system Tcl and Tk frameworks if they are installed in ``/Library/Frameworks``, as had been the case on older releases of macOS. If a macOS SDK is explicitly configured, by using - ``--enable-universalsdk=`` or ``-isysroot``, only the SDK itself is + :option:`--enable-universalsdk` or ``-isysroot``, only the SDK itself is searched. The default behavior can still be overridden with - ``--with-tcltk-includes`` and ``--with-tcltk-libs``. + :option:`--with-tcltk-includes` and :option:`--with-tcltk-libs`. (Contributed by Ned Deily in :issue:`34956`.) * Python can now be built for Windows 10 ARM64. From c1a66bdd6f884e2ec813891c5c7e2b1ceeede8f1 Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Mon, 12 Apr 2021 21:02:02 -0400 Subject: [PATCH 028/108] Remove an unnecessary copy of the 'namespace' parameter to make_dataclass(). (GH-25372) --- Lib/dataclasses.py | 21 ++++++++++++------- .../2021-04-12-18-01-10.bpo-43820.YkqYW4.rst | 2 ++ 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-12-18-01-10.bpo-43820.YkqYW4.rst diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py index e8eb2060f6df17..3ccfbbd92035a2 100644 --- a/Lib/dataclasses.py +++ b/Lib/dataclasses.py @@ -1233,14 +1233,12 @@ class C(Base): if namespace is None: namespace = {} - else: - # Copy namespace since we're going to mutate it. - namespace = namespace.copy() # While we're looking through the field names, validate that they # are identifiers, are not keywords, and not duplicates. seen = set() - anns = {} + annotations = {} + defaults = {} for item in fields: if isinstance(item, str): name = item @@ -1249,7 +1247,7 @@ class C(Base): name, tp, = item elif len(item) == 3: name, tp, spec = item - namespace[name] = spec + defaults[name] = spec else: raise TypeError(f'Invalid field: {item!r}') @@ -1261,12 +1259,19 @@ class C(Base): raise TypeError(f'Field name duplicated: {name!r}') seen.add(name) - anns[name] = tp + annotations[name] = tp + + # Update 'ns' with the user-supplied namespace plus our calculated values. + def exec_body_callback(ns): + ns.update(namespace) + ns.update(defaults) + ns['__annotations__'] = annotations - namespace['__annotations__'] = anns # We use `types.new_class()` instead of simply `type()` to allow dynamic creation # of generic dataclassses. - cls = types.new_class(cls_name, bases, {}, lambda ns: ns.update(namespace)) + cls = types.new_class(cls_name, bases, {}, exec_body_callback) + + # Apply the normal decorator. return dataclass(cls, init=init, repr=repr, eq=eq, order=order, unsafe_hash=unsafe_hash, frozen=frozen, match_args=match_args) diff --git a/Misc/NEWS.d/next/Library/2021-04-12-18-01-10.bpo-43820.YkqYW4.rst b/Misc/NEWS.d/next/Library/2021-04-12-18-01-10.bpo-43820.YkqYW4.rst new file mode 100644 index 00000000000000..2c870ac8b97de8 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-12-18-01-10.bpo-43820.YkqYW4.rst @@ -0,0 +1,2 @@ +Remove an unneeded copy of the namespace passed to +dataclasses.make_dataclass(). From d9151cb45371836d39b6d53afb50c5bcd353c661 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Tue, 13 Apr 2021 02:32:33 +0100 Subject: [PATCH 029/108] Ensure that early = are not matched by the parser as invalid comparisons (GH-25375) --- Grammar/python.gram | 6 +- Lib/test/test_syntax.py | 5 + Parser/parser.c | 731 +++++++++++++++++++++++----------------- 3 files changed, 423 insertions(+), 319 deletions(-) diff --git a/Grammar/python.gram b/Grammar/python.gram index 324793c88af2a2..8524a1206b054e 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -447,6 +447,10 @@ named_expression[expr_ty]: | invalid_named_expression | expression !':=' +direct_named_expression[expr_ty]: + | a=NAME ':=' ~ b=expression { _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA) } + | expression !':=' + annotated_rhs[expr_ty]: yield_expr | star_expressions expressions[expr_ty]: @@ -671,7 +675,7 @@ arguments[expr_ty] (memo): | a=args [','] &')' { a } | invalid_arguments args[expr_ty]: - | a[asdl_expr_seq*]=','.(starred_expression | named_expression !'=')+ b=[',' k=kwargs {k}] { _PyPegen_collect_call_seqs(p, a, b, EXTRA) } + | a[asdl_expr_seq*]=','.(starred_expression | direct_named_expression !'=')+ b=[',' k=kwargs {k}] { _PyPegen_collect_call_seqs(p, a, b, EXTRA) } | a=kwargs { _PyAST_Call(_PyPegen_dummy_name(p), CHECK_NULL_ALLOWED(asdl_expr_seq*, _PyPegen_seq_extract_starred_exprs(p, a)), CHECK_NULL_ALLOWED(asdl_keyword_seq*, _PyPegen_seq_delete_starred_exprs(p, a)), diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 78b11c93351215..0e6942f6a6fa2d 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -863,6 +863,11 @@ Traceback (most recent call last): SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='? +Ensure that early = are not matched by the parser as invalid comparisons + >>> f(2, 4, x=34); {1,2 a} + Traceback (most recent call last): + SyntaxError: invalid syntax + Make sure that the old "raise X, Y[, Z]" form is gone: >>> raise X, Y Traceback (most recent call last): diff --git a/Parser/parser.c b/Parser/parser.c index 099186e6232603..38bab96ae39819 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -159,299 +159,300 @@ static KeywordToken *reserved_keywords[] = { #define star_named_expressions_type 1091 #define star_named_expression_type 1092 #define named_expression_type 1093 -#define annotated_rhs_type 1094 -#define expressions_type 1095 -#define expression_type 1096 -#define lambdef_type 1097 -#define lambda_params_type 1098 -#define lambda_parameters_type 1099 -#define lambda_slash_no_default_type 1100 -#define lambda_slash_with_default_type 1101 -#define lambda_star_etc_type 1102 -#define lambda_kwds_type 1103 -#define lambda_param_no_default_type 1104 -#define lambda_param_with_default_type 1105 -#define lambda_param_maybe_default_type 1106 -#define lambda_param_type 1107 -#define disjunction_type 1108 -#define conjunction_type 1109 -#define inversion_type 1110 -#define comparison_type 1111 -#define compare_op_bitwise_or_pair_type 1112 -#define eq_bitwise_or_type 1113 -#define noteq_bitwise_or_type 1114 -#define lte_bitwise_or_type 1115 -#define lt_bitwise_or_type 1116 -#define gte_bitwise_or_type 1117 -#define gt_bitwise_or_type 1118 -#define notin_bitwise_or_type 1119 -#define in_bitwise_or_type 1120 -#define isnot_bitwise_or_type 1121 -#define is_bitwise_or_type 1122 -#define bitwise_or_type 1123 // Left-recursive -#define bitwise_xor_type 1124 // Left-recursive -#define bitwise_and_type 1125 // Left-recursive -#define shift_expr_type 1126 // Left-recursive -#define sum_type 1127 // Left-recursive -#define term_type 1128 // Left-recursive -#define factor_type 1129 -#define power_type 1130 -#define await_primary_type 1131 -#define primary_type 1132 // Left-recursive -#define slices_type 1133 -#define slice_type 1134 -#define atom_type 1135 -#define strings_type 1136 -#define list_type 1137 -#define listcomp_type 1138 -#define tuple_type 1139 -#define group_type 1140 -#define genexp_type 1141 -#define set_type 1142 -#define setcomp_type 1143 -#define dict_type 1144 -#define dictcomp_type 1145 -#define double_starred_kvpairs_type 1146 -#define double_starred_kvpair_type 1147 -#define kvpair_type 1148 -#define for_if_clauses_type 1149 -#define for_if_clause_type 1150 -#define yield_expr_type 1151 -#define arguments_type 1152 -#define args_type 1153 -#define kwargs_type 1154 -#define starred_expression_type 1155 -#define kwarg_or_starred_type 1156 -#define kwarg_or_double_starred_type 1157 -#define star_targets_type 1158 -#define star_targets_list_seq_type 1159 -#define star_targets_tuple_seq_type 1160 -#define star_target_type 1161 -#define target_with_star_atom_type 1162 -#define star_atom_type 1163 -#define single_target_type 1164 -#define single_subscript_attribute_target_type 1165 -#define del_targets_type 1166 -#define del_target_type 1167 -#define del_t_atom_type 1168 -#define targets_type 1169 -#define target_type 1170 -#define t_primary_type 1171 // Left-recursive -#define t_lookahead_type 1172 -#define t_atom_type 1173 -#define invalid_arguments_type 1174 -#define invalid_kwarg_type 1175 -#define invalid_named_expression_type 1176 -#define invalid_assignment_type 1177 -#define invalid_ann_assign_target_type 1178 -#define invalid_del_stmt_type 1179 -#define invalid_block_type 1180 -#define invalid_primary_type 1181 // Left-recursive -#define invalid_comprehension_type 1182 -#define invalid_dict_comprehension_type 1183 -#define invalid_parameters_type 1184 -#define invalid_parameters_helper_type 1185 -#define invalid_lambda_parameters_type 1186 -#define invalid_lambda_parameters_helper_type 1187 -#define invalid_star_etc_type 1188 -#define invalid_lambda_star_etc_type 1189 -#define invalid_double_type_comments_type 1190 -#define invalid_with_item_type 1191 -#define invalid_for_target_type 1192 -#define invalid_group_type 1193 -#define invalid_import_from_targets_type 1194 -#define invalid_with_stmt_type 1195 -#define invalid_except_block_type 1196 -#define invalid_match_stmt_type 1197 -#define invalid_case_block_type 1198 -#define invalid_if_stmt_type 1199 -#define invalid_elif_stmt_type 1200 -#define invalid_while_stmt_type 1201 -#define _loop0_1_type 1202 -#define _loop0_2_type 1203 -#define _loop0_4_type 1204 -#define _gather_3_type 1205 -#define _loop0_6_type 1206 -#define _gather_5_type 1207 -#define _loop0_8_type 1208 -#define _gather_7_type 1209 -#define _loop0_10_type 1210 -#define _gather_9_type 1211 -#define _loop1_11_type 1212 -#define _loop0_13_type 1213 -#define _gather_12_type 1214 -#define _tmp_14_type 1215 -#define _tmp_15_type 1216 -#define _tmp_16_type 1217 -#define _tmp_17_type 1218 -#define _tmp_18_type 1219 -#define _tmp_19_type 1220 -#define _tmp_20_type 1221 -#define _tmp_21_type 1222 -#define _loop1_22_type 1223 -#define _tmp_23_type 1224 -#define _tmp_24_type 1225 -#define _loop0_26_type 1226 -#define _gather_25_type 1227 -#define _loop0_28_type 1228 -#define _gather_27_type 1229 -#define _tmp_29_type 1230 -#define _tmp_30_type 1231 -#define _loop0_31_type 1232 -#define _loop1_32_type 1233 -#define _loop0_34_type 1234 -#define _gather_33_type 1235 -#define _tmp_35_type 1236 -#define _loop0_37_type 1237 -#define _gather_36_type 1238 -#define _tmp_38_type 1239 -#define _loop0_40_type 1240 -#define _gather_39_type 1241 -#define _loop0_42_type 1242 -#define _gather_41_type 1243 -#define _loop0_44_type 1244 -#define _gather_43_type 1245 -#define _loop0_46_type 1246 -#define _gather_45_type 1247 -#define _tmp_47_type 1248 -#define _loop1_48_type 1249 -#define _tmp_49_type 1250 -#define _loop1_50_type 1251 -#define _loop0_52_type 1252 -#define _gather_51_type 1253 -#define _tmp_53_type 1254 -#define _tmp_54_type 1255 -#define _tmp_55_type 1256 -#define _loop0_57_type 1257 -#define _gather_56_type 1258 -#define _tmp_58_type 1259 -#define _loop0_60_type 1260 -#define _gather_59_type 1261 -#define _tmp_61_type 1262 -#define _loop0_63_type 1263 -#define _gather_62_type 1264 -#define _loop0_65_type 1265 -#define _gather_64_type 1266 -#define _tmp_66_type 1267 -#define _tmp_67_type 1268 -#define _tmp_68_type 1269 -#define _tmp_69_type 1270 -#define _loop0_70_type 1271 -#define _loop0_71_type 1272 -#define _loop0_72_type 1273 -#define _loop1_73_type 1274 -#define _loop0_74_type 1275 -#define _loop1_75_type 1276 -#define _loop1_76_type 1277 -#define _loop1_77_type 1278 -#define _loop0_78_type 1279 -#define _loop1_79_type 1280 -#define _loop0_80_type 1281 -#define _loop1_81_type 1282 -#define _loop0_82_type 1283 -#define _loop1_83_type 1284 -#define _loop1_84_type 1285 -#define _tmp_85_type 1286 -#define _loop1_86_type 1287 -#define _loop0_88_type 1288 -#define _gather_87_type 1289 -#define _loop1_89_type 1290 -#define _loop0_90_type 1291 -#define _loop0_91_type 1292 -#define _loop0_92_type 1293 -#define _loop1_93_type 1294 -#define _loop0_94_type 1295 -#define _loop1_95_type 1296 -#define _loop1_96_type 1297 -#define _loop1_97_type 1298 -#define _loop0_98_type 1299 -#define _loop1_99_type 1300 -#define _loop0_100_type 1301 -#define _loop1_101_type 1302 -#define _loop0_102_type 1303 -#define _loop1_103_type 1304 -#define _loop1_104_type 1305 -#define _loop1_105_type 1306 -#define _loop1_106_type 1307 -#define _tmp_107_type 1308 -#define _loop0_109_type 1309 -#define _gather_108_type 1310 -#define _tmp_110_type 1311 -#define _tmp_111_type 1312 -#define _tmp_112_type 1313 -#define _tmp_113_type 1314 -#define _loop1_114_type 1315 -#define _tmp_115_type 1316 -#define _tmp_116_type 1317 -#define _loop0_118_type 1318 -#define _gather_117_type 1319 -#define _loop1_119_type 1320 -#define _loop0_120_type 1321 -#define _loop0_121_type 1322 -#define _loop0_123_type 1323 -#define _gather_122_type 1324 -#define _tmp_124_type 1325 -#define _loop0_126_type 1326 -#define _gather_125_type 1327 -#define _loop0_128_type 1328 -#define _gather_127_type 1329 -#define _loop0_130_type 1330 -#define _gather_129_type 1331 -#define _loop0_132_type 1332 -#define _gather_131_type 1333 -#define _loop0_133_type 1334 -#define _loop0_135_type 1335 -#define _gather_134_type 1336 -#define _loop1_136_type 1337 -#define _tmp_137_type 1338 -#define _loop0_139_type 1339 -#define _gather_138_type 1340 -#define _loop0_141_type 1341 -#define _gather_140_type 1342 -#define _tmp_142_type 1343 -#define _tmp_143_type 1344 -#define _tmp_144_type 1345 -#define _tmp_145_type 1346 -#define _loop0_146_type 1347 -#define _loop0_147_type 1348 -#define _loop0_148_type 1349 -#define _tmp_149_type 1350 -#define _tmp_150_type 1351 -#define _tmp_151_type 1352 -#define _loop0_152_type 1353 -#define _loop1_153_type 1354 -#define _loop0_154_type 1355 -#define _loop1_155_type 1356 -#define _tmp_156_type 1357 -#define _tmp_157_type 1358 -#define _tmp_158_type 1359 -#define _loop0_160_type 1360 -#define _gather_159_type 1361 -#define _loop0_162_type 1362 -#define _gather_161_type 1363 -#define _tmp_163_type 1364 -#define _tmp_164_type 1365 -#define _tmp_165_type 1366 -#define _tmp_166_type 1367 -#define _tmp_167_type 1368 -#define _tmp_168_type 1369 -#define _tmp_169_type 1370 -#define _tmp_170_type 1371 -#define _tmp_171_type 1372 -#define _tmp_172_type 1373 -#define _tmp_173_type 1374 -#define _tmp_174_type 1375 -#define _tmp_175_type 1376 -#define _tmp_176_type 1377 -#define _tmp_177_type 1378 -#define _tmp_178_type 1379 -#define _tmp_179_type 1380 -#define _tmp_180_type 1381 -#define _tmp_181_type 1382 -#define _tmp_182_type 1383 -#define _tmp_183_type 1384 -#define _tmp_184_type 1385 -#define _tmp_185_type 1386 +#define direct_named_expression_type 1094 +#define annotated_rhs_type 1095 +#define expressions_type 1096 +#define expression_type 1097 +#define lambdef_type 1098 +#define lambda_params_type 1099 +#define lambda_parameters_type 1100 +#define lambda_slash_no_default_type 1101 +#define lambda_slash_with_default_type 1102 +#define lambda_star_etc_type 1103 +#define lambda_kwds_type 1104 +#define lambda_param_no_default_type 1105 +#define lambda_param_with_default_type 1106 +#define lambda_param_maybe_default_type 1107 +#define lambda_param_type 1108 +#define disjunction_type 1109 +#define conjunction_type 1110 +#define inversion_type 1111 +#define comparison_type 1112 +#define compare_op_bitwise_or_pair_type 1113 +#define eq_bitwise_or_type 1114 +#define noteq_bitwise_or_type 1115 +#define lte_bitwise_or_type 1116 +#define lt_bitwise_or_type 1117 +#define gte_bitwise_or_type 1118 +#define gt_bitwise_or_type 1119 +#define notin_bitwise_or_type 1120 +#define in_bitwise_or_type 1121 +#define isnot_bitwise_or_type 1122 +#define is_bitwise_or_type 1123 +#define bitwise_or_type 1124 // Left-recursive +#define bitwise_xor_type 1125 // Left-recursive +#define bitwise_and_type 1126 // Left-recursive +#define shift_expr_type 1127 // Left-recursive +#define sum_type 1128 // Left-recursive +#define term_type 1129 // Left-recursive +#define factor_type 1130 +#define power_type 1131 +#define await_primary_type 1132 +#define primary_type 1133 // Left-recursive +#define slices_type 1134 +#define slice_type 1135 +#define atom_type 1136 +#define strings_type 1137 +#define list_type 1138 +#define listcomp_type 1139 +#define tuple_type 1140 +#define group_type 1141 +#define genexp_type 1142 +#define set_type 1143 +#define setcomp_type 1144 +#define dict_type 1145 +#define dictcomp_type 1146 +#define double_starred_kvpairs_type 1147 +#define double_starred_kvpair_type 1148 +#define kvpair_type 1149 +#define for_if_clauses_type 1150 +#define for_if_clause_type 1151 +#define yield_expr_type 1152 +#define arguments_type 1153 +#define args_type 1154 +#define kwargs_type 1155 +#define starred_expression_type 1156 +#define kwarg_or_starred_type 1157 +#define kwarg_or_double_starred_type 1158 +#define star_targets_type 1159 +#define star_targets_list_seq_type 1160 +#define star_targets_tuple_seq_type 1161 +#define star_target_type 1162 +#define target_with_star_atom_type 1163 +#define star_atom_type 1164 +#define single_target_type 1165 +#define single_subscript_attribute_target_type 1166 +#define del_targets_type 1167 +#define del_target_type 1168 +#define del_t_atom_type 1169 +#define targets_type 1170 +#define target_type 1171 +#define t_primary_type 1172 // Left-recursive +#define t_lookahead_type 1173 +#define t_atom_type 1174 +#define invalid_arguments_type 1175 +#define invalid_kwarg_type 1176 +#define invalid_named_expression_type 1177 +#define invalid_assignment_type 1178 +#define invalid_ann_assign_target_type 1179 +#define invalid_del_stmt_type 1180 +#define invalid_block_type 1181 +#define invalid_primary_type 1182 // Left-recursive +#define invalid_comprehension_type 1183 +#define invalid_dict_comprehension_type 1184 +#define invalid_parameters_type 1185 +#define invalid_parameters_helper_type 1186 +#define invalid_lambda_parameters_type 1187 +#define invalid_lambda_parameters_helper_type 1188 +#define invalid_star_etc_type 1189 +#define invalid_lambda_star_etc_type 1190 +#define invalid_double_type_comments_type 1191 +#define invalid_with_item_type 1192 +#define invalid_for_target_type 1193 +#define invalid_group_type 1194 +#define invalid_import_from_targets_type 1195 +#define invalid_with_stmt_type 1196 +#define invalid_except_block_type 1197 +#define invalid_match_stmt_type 1198 +#define invalid_case_block_type 1199 +#define invalid_if_stmt_type 1200 +#define invalid_elif_stmt_type 1201 +#define invalid_while_stmt_type 1202 +#define _loop0_1_type 1203 +#define _loop0_2_type 1204 +#define _loop0_4_type 1205 +#define _gather_3_type 1206 +#define _loop0_6_type 1207 +#define _gather_5_type 1208 +#define _loop0_8_type 1209 +#define _gather_7_type 1210 +#define _loop0_10_type 1211 +#define _gather_9_type 1212 +#define _loop1_11_type 1213 +#define _loop0_13_type 1214 +#define _gather_12_type 1215 +#define _tmp_14_type 1216 +#define _tmp_15_type 1217 +#define _tmp_16_type 1218 +#define _tmp_17_type 1219 +#define _tmp_18_type 1220 +#define _tmp_19_type 1221 +#define _tmp_20_type 1222 +#define _tmp_21_type 1223 +#define _loop1_22_type 1224 +#define _tmp_23_type 1225 +#define _tmp_24_type 1226 +#define _loop0_26_type 1227 +#define _gather_25_type 1228 +#define _loop0_28_type 1229 +#define _gather_27_type 1230 +#define _tmp_29_type 1231 +#define _tmp_30_type 1232 +#define _loop0_31_type 1233 +#define _loop1_32_type 1234 +#define _loop0_34_type 1235 +#define _gather_33_type 1236 +#define _tmp_35_type 1237 +#define _loop0_37_type 1238 +#define _gather_36_type 1239 +#define _tmp_38_type 1240 +#define _loop0_40_type 1241 +#define _gather_39_type 1242 +#define _loop0_42_type 1243 +#define _gather_41_type 1244 +#define _loop0_44_type 1245 +#define _gather_43_type 1246 +#define _loop0_46_type 1247 +#define _gather_45_type 1248 +#define _tmp_47_type 1249 +#define _loop1_48_type 1250 +#define _tmp_49_type 1251 +#define _loop1_50_type 1252 +#define _loop0_52_type 1253 +#define _gather_51_type 1254 +#define _tmp_53_type 1255 +#define _tmp_54_type 1256 +#define _tmp_55_type 1257 +#define _loop0_57_type 1258 +#define _gather_56_type 1259 +#define _tmp_58_type 1260 +#define _loop0_60_type 1261 +#define _gather_59_type 1262 +#define _tmp_61_type 1263 +#define _loop0_63_type 1264 +#define _gather_62_type 1265 +#define _loop0_65_type 1266 +#define _gather_64_type 1267 +#define _tmp_66_type 1268 +#define _tmp_67_type 1269 +#define _tmp_68_type 1270 +#define _tmp_69_type 1271 +#define _loop0_70_type 1272 +#define _loop0_71_type 1273 +#define _loop0_72_type 1274 +#define _loop1_73_type 1275 +#define _loop0_74_type 1276 +#define _loop1_75_type 1277 +#define _loop1_76_type 1278 +#define _loop1_77_type 1279 +#define _loop0_78_type 1280 +#define _loop1_79_type 1281 +#define _loop0_80_type 1282 +#define _loop1_81_type 1283 +#define _loop0_82_type 1284 +#define _loop1_83_type 1285 +#define _loop1_84_type 1286 +#define _tmp_85_type 1287 +#define _loop1_86_type 1288 +#define _loop0_88_type 1289 +#define _gather_87_type 1290 +#define _loop1_89_type 1291 +#define _loop0_90_type 1292 +#define _loop0_91_type 1293 +#define _loop0_92_type 1294 +#define _loop1_93_type 1295 +#define _loop0_94_type 1296 +#define _loop1_95_type 1297 +#define _loop1_96_type 1298 +#define _loop1_97_type 1299 +#define _loop0_98_type 1300 +#define _loop1_99_type 1301 +#define _loop0_100_type 1302 +#define _loop1_101_type 1303 +#define _loop0_102_type 1304 +#define _loop1_103_type 1305 +#define _loop1_104_type 1306 +#define _loop1_105_type 1307 +#define _loop1_106_type 1308 +#define _tmp_107_type 1309 +#define _loop0_109_type 1310 +#define _gather_108_type 1311 +#define _tmp_110_type 1312 +#define _tmp_111_type 1313 +#define _tmp_112_type 1314 +#define _tmp_113_type 1315 +#define _loop1_114_type 1316 +#define _tmp_115_type 1317 +#define _tmp_116_type 1318 +#define _loop0_118_type 1319 +#define _gather_117_type 1320 +#define _loop1_119_type 1321 +#define _loop0_120_type 1322 +#define _loop0_121_type 1323 +#define _loop0_123_type 1324 +#define _gather_122_type 1325 +#define _tmp_124_type 1326 +#define _loop0_126_type 1327 +#define _gather_125_type 1328 +#define _loop0_128_type 1329 +#define _gather_127_type 1330 +#define _loop0_130_type 1331 +#define _gather_129_type 1332 +#define _loop0_132_type 1333 +#define _gather_131_type 1334 +#define _loop0_133_type 1335 +#define _loop0_135_type 1336 +#define _gather_134_type 1337 +#define _loop1_136_type 1338 +#define _tmp_137_type 1339 +#define _loop0_139_type 1340 +#define _gather_138_type 1341 +#define _loop0_141_type 1342 +#define _gather_140_type 1343 +#define _tmp_142_type 1344 +#define _tmp_143_type 1345 +#define _tmp_144_type 1346 +#define _tmp_145_type 1347 +#define _loop0_146_type 1348 +#define _loop0_147_type 1349 +#define _loop0_148_type 1350 +#define _tmp_149_type 1351 +#define _tmp_150_type 1352 +#define _tmp_151_type 1353 +#define _loop0_152_type 1354 +#define _loop1_153_type 1355 +#define _loop0_154_type 1356 +#define _loop1_155_type 1357 +#define _tmp_156_type 1358 +#define _tmp_157_type 1359 +#define _tmp_158_type 1360 +#define _loop0_160_type 1361 +#define _gather_159_type 1362 +#define _loop0_162_type 1363 +#define _gather_161_type 1364 +#define _tmp_163_type 1365 +#define _tmp_164_type 1366 +#define _tmp_165_type 1367 +#define _tmp_166_type 1368 +#define _tmp_167_type 1369 +#define _tmp_168_type 1370 +#define _tmp_169_type 1371 +#define _tmp_170_type 1372 +#define _tmp_171_type 1373 +#define _tmp_172_type 1374 +#define _tmp_173_type 1375 +#define _tmp_174_type 1376 +#define _tmp_175_type 1377 +#define _tmp_176_type 1378 +#define _tmp_177_type 1379 +#define _tmp_178_type 1380 +#define _tmp_179_type 1381 +#define _tmp_180_type 1382 +#define _tmp_181_type 1383 +#define _tmp_182_type 1384 +#define _tmp_183_type 1385 +#define _tmp_184_type 1386 +#define _tmp_185_type 1387 static mod_ty file_rule(Parser *p); static mod_ty interactive_rule(Parser *p); @@ -547,6 +548,7 @@ static expr_ty star_expression_rule(Parser *p); static asdl_expr_seq* star_named_expressions_rule(Parser *p); static expr_ty star_named_expression_rule(Parser *p); static expr_ty named_expression_rule(Parser *p); +static expr_ty direct_named_expression_rule(Parser *p); static expr_ty annotated_rhs_rule(Parser *p); static expr_ty expressions_rule(Parser *p); static expr_ty expression_rule(Parser *p); @@ -9397,6 +9399,99 @@ named_expression_rule(Parser *p) return _res; } +// direct_named_expression: NAME ':=' ~ expression | expression !':=' +static expr_ty +direct_named_expression_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + expr_ty _res = NULL; + int _mark = p->mark; + if (p->mark == p->fill && _PyPegen_fill_token(p) < 0) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + int _start_lineno = p->tokens[_mark]->lineno; + UNUSED(_start_lineno); // Only used by EXTRA macro + int _start_col_offset = p->tokens[_mark]->col_offset; + UNUSED(_start_col_offset); // Only used by EXTRA macro + { // NAME ':=' ~ expression + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> direct_named_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "NAME ':=' ~ expression")); + int _cut_var = 0; + Token * _literal; + expr_ty a; + expr_ty b; + if ( + (a = _PyPegen_name_token(p)) // NAME + && + (_literal = _PyPegen_expect_token(p, 53)) // token=':=' + && + (_cut_var = 1) + && + (b = expression_rule(p)) // expression + ) + { + D(fprintf(stderr, "%*c+ direct_named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "NAME ':=' ~ expression")); + Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); + if (_token == NULL) { + D(p->level--); + return NULL; + } + int _end_lineno = _token->end_lineno; + UNUSED(_end_lineno); // Only used by EXTRA macro + int _end_col_offset = _token->end_col_offset; + UNUSED(_end_col_offset); // Only used by EXTRA macro + _res = _PyAST_NamedExpr ( CHECK ( expr_ty , _PyPegen_set_expr_context ( p , a , Store ) ) , b , EXTRA ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s direct_named_expression[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "NAME ':=' ~ expression")); + if (_cut_var) { + D(p->level--); + return NULL; + } + } + { // expression !':=' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> direct_named_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression !':='")); + expr_ty expression_var; + if ( + (expression_var = expression_rule(p)) // expression + && + _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 53) // token=':=' + ) + { + D(fprintf(stderr, "%*c+ direct_named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !':='")); + _res = expression_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s direct_named_expression[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression !':='")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + // annotated_rhs: yield_expr | star_expressions static expr_ty annotated_rhs_rule(Parser *p) @@ -14807,7 +14902,7 @@ arguments_rule(Parser *p) return _res; } -// args: ','.(starred_expression | named_expression !'=')+ [',' kwargs] | kwargs +// args: ','.(starred_expression | direct_named_expression !'=')+ [',' kwargs] | kwargs static expr_ty args_rule(Parser *p) { @@ -14827,21 +14922,21 @@ args_rule(Parser *p) UNUSED(_start_lineno); // Only used by EXTRA macro int _start_col_offset = p->tokens[_mark]->col_offset; UNUSED(_start_col_offset); // Only used by EXTRA macro - { // ','.(starred_expression | named_expression !'=')+ [',' kwargs] + { // ','.(starred_expression | direct_named_expression !'=')+ [',' kwargs] if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> args[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.(starred_expression | named_expression !'=')+ [',' kwargs]")); + D(fprintf(stderr, "%*c> args[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.(starred_expression | direct_named_expression !'=')+ [',' kwargs]")); asdl_expr_seq* a; void *b; if ( - (a = (asdl_expr_seq*)_gather_122_rule(p)) // ','.(starred_expression | named_expression !'=')+ + (a = (asdl_expr_seq*)_gather_122_rule(p)) // ','.(starred_expression | direct_named_expression !'=')+ && (b = _tmp_124_rule(p), 1) // [',' kwargs] ) { - D(fprintf(stderr, "%*c+ args[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.(starred_expression | named_expression !'=')+ [',' kwargs]")); + D(fprintf(stderr, "%*c+ args[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.(starred_expression | direct_named_expression !'=')+ [',' kwargs]")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -14861,7 +14956,7 @@ args_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s args[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','.(starred_expression | named_expression !'=')+ [',' kwargs]")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','.(starred_expression | direct_named_expression !'=')+ [',' kwargs]")); } { // kwargs if (p->error_indicator) { @@ -26406,7 +26501,7 @@ _loop0_121_rule(Parser *p) return _seq; } -// _loop0_123: ',' (starred_expression | named_expression !'=') +// _loop0_123: ',' (starred_expression | direct_named_expression !'=') static asdl_seq * _loop0_123_rule(Parser *p) { @@ -26427,18 +26522,18 @@ _loop0_123_rule(Parser *p) } Py_ssize_t _children_capacity = 1; Py_ssize_t _n = 0; - { // ',' (starred_expression | named_expression !'=') + { // ',' (starred_expression | direct_named_expression !'=') if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_123[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (starred_expression | named_expression !'=')")); + D(fprintf(stderr, "%*c> _loop0_123[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (starred_expression | direct_named_expression !'=')")); Token * _literal; void *elem; while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_175_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_175_rule(p)) // starred_expression | direct_named_expression !'=' ) { _res = elem; @@ -26464,7 +26559,7 @@ _loop0_123_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s _loop0_123[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (starred_expression | named_expression !'=')")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (starred_expression | direct_named_expression !'=')")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); if (!_seq) { @@ -26481,7 +26576,7 @@ _loop0_123_rule(Parser *p) return _seq; } -// _gather_122: (starred_expression | named_expression !'=') _loop0_123 +// _gather_122: (starred_expression | direct_named_expression !'=') _loop0_123 static asdl_seq * _gather_122_rule(Parser *p) { @@ -26492,27 +26587,27 @@ _gather_122_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // (starred_expression | named_expression !'=') _loop0_123 + { // (starred_expression | direct_named_expression !'=') _loop0_123 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(starred_expression | named_expression !'=') _loop0_123")); + D(fprintf(stderr, "%*c> _gather_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(starred_expression | direct_named_expression !'=') _loop0_123")); void *elem; asdl_seq * seq; if ( - (elem = _tmp_175_rule(p)) // starred_expression | named_expression !'=' + (elem = _tmp_175_rule(p)) // starred_expression | direct_named_expression !'=' && (seq = _loop0_123_rule(p)) // _loop0_123 ) { - D(fprintf(stderr, "%*c+ _gather_122[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(starred_expression | named_expression !'=') _loop0_123")); + D(fprintf(stderr, "%*c+ _gather_122[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(starred_expression | direct_named_expression !'=') _loop0_123")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; D(fprintf(stderr, "%*c%s _gather_122[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(starred_expression | named_expression !'=') _loop0_123")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(starred_expression | direct_named_expression !'=') _loop0_123")); } _res = NULL; done: @@ -29491,7 +29586,7 @@ _tmp_174_rule(Parser *p) return _res; } -// _tmp_175: starred_expression | named_expression !'=' +// _tmp_175: starred_expression | direct_named_expression !'=' static void * _tmp_175_rule(Parser *p) { @@ -29521,26 +29616,26 @@ _tmp_175_rule(Parser *p) D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression")); } - { // named_expression !'=' + { // direct_named_expression !'=' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); - expr_ty named_expression_var; + D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); + expr_ty direct_named_expression_var; if ( - (named_expression_var = named_expression_rule(p)) // named_expression + (direct_named_expression_var = direct_named_expression_rule(p)) // direct_named_expression && _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='")); - _res = named_expression_var; + D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); + _res = direct_named_expression_var; goto done; } p->mark = _mark; D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "named_expression !'='")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "direct_named_expression !'='")); } _res = NULL; done: From d2a8e69c2c605fbaa3656a5f99aa8d295f74c80e Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 13 Apr 2021 13:51:49 +0900 Subject: [PATCH 030/108] bpo-43787: Add __iter__ to GzipFile, BZ2File, and LZMAFile (GH-25353) --- Lib/bz2.py | 4 ++++ Lib/gzip.py | 4 ++++ Lib/lzma.py | 4 ++++ .../next/Library/2021-04-12-15-15-50.bpo-43787.wCy_Wd.rst | 3 +++ 4 files changed, 15 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2021-04-12-15-15-50.bpo-43787.wCy_Wd.rst diff --git a/Lib/bz2.py b/Lib/bz2.py index 43f321ae852398..a2c588e7487f3d 100644 --- a/Lib/bz2.py +++ b/Lib/bz2.py @@ -197,6 +197,10 @@ def readline(self, size=-1): self._check_can_read() return self._buffer.readline(size) + def __iter__(self): + self._check_can_read() + return self._buffer.__iter__() + def readlines(self, size=-1): """Read a list of lines of uncompressed bytes from the file. diff --git a/Lib/gzip.py b/Lib/gzip.py index 0a8993ba354711..9a4e0f9c00c580 100644 --- a/Lib/gzip.py +++ b/Lib/gzip.py @@ -398,6 +398,10 @@ def readline(self, size=-1): self._check_not_closed() return self._buffer.readline(size) + def __iter__(self): + self._check_not_closed() + return self._buffer.__iter__() + class _GzipReader(_compression.DecompressReader): def __init__(self, fp): diff --git a/Lib/lzma.py b/Lib/lzma.py index c8b197055cddce..2ada7d81d3c813 100644 --- a/Lib/lzma.py +++ b/Lib/lzma.py @@ -221,6 +221,10 @@ def readline(self, size=-1): self._check_can_read() return self._buffer.readline(size) + def __iter__(self): + self._check_can_read() + return self._buffer.__iter__() + def write(self, data): """Write a bytes object to the file. diff --git a/Misc/NEWS.d/next/Library/2021-04-12-15-15-50.bpo-43787.wCy_Wd.rst b/Misc/NEWS.d/next/Library/2021-04-12-15-15-50.bpo-43787.wCy_Wd.rst new file mode 100644 index 00000000000000..9b8d945cbb8a8b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-12-15-15-50.bpo-43787.wCy_Wd.rst @@ -0,0 +1,3 @@ +Add ``__iter__()`` method to :class:`bz2.BZ2File`, :class:`gzip.GzipFile`, and +:class:`lzma.LZMAFile`. It makes iterating them about 2x faster. Patch by +Inada Naoki. From a4833883c9b81b6b272cc7c5b67fa1658b65304c Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 13 Apr 2021 08:17:26 +0200 Subject: [PATCH 031/108] bpo-43799: OpenSSL 3.0.0: declare OPENSSL_API_COMPAT 1.1.1 (GH-25329) Signed-off-by: Christian Heimes --- .../2021-04-10-11-35-50.bpo-43799.1iV4pX.rst | 2 ++ Modules/_hashopenssl.c | 15 ++++++--- Modules/_ssl.c | 33 ++++++++----------- 3 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-10-11-35-50.bpo-43799.1iV4pX.rst diff --git a/Misc/NEWS.d/next/Library/2021-04-10-11-35-50.bpo-43799.1iV4pX.rst b/Misc/NEWS.d/next/Library/2021-04-10-11-35-50.bpo-43799.1iV4pX.rst new file mode 100644 index 00000000000000..bd79519015c7a9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-10-11-35-50.bpo-43799.1iV4pX.rst @@ -0,0 +1,2 @@ +OpenSSL 3.0.0: define ``OPENSSL_API_COMPAT`` 1.1.1 to suppress deprecation +warnings. Python requires OpenSSL 1.1.1 APIs. diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index ef927abf4859f4..272df354e6702b 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -11,20 +11,26 @@ * */ +/* Don't warn about deprecated functions, */ +#ifndef OPENSSL_API_COMPAT + // 0x10101000L == 1.1.1, 30000 == 3.0.0 + #define OPENSSL_API_COMPAT 0x10101000L +#endif +#define OPENSSL_NO_DEPRECATED 1 + #define PY_SSIZE_T_CLEAN #include "Python.h" #include "hashlib.h" #include "pystrhex.h" - /* EVP is the preferred interface to hashing in OpenSSL */ #include #include #include /* We use the object interface to discover what hashes OpenSSL supports. */ #include -#include "openssl/err.h" +#include #include // FIPS_mode() @@ -1862,12 +1868,11 @@ _hashlib_get_fips_mode_impl(PyObject *module) /*[clinic end generated code: output=87eece1bab4d3fa9 input=2db61538c41c6fef]*/ { - int result; #if OPENSSL_VERSION_NUMBER >= 0x30000000L - result = EVP_default_properties_is_fips_enabled(NULL); + return EVP_default_properties_is_fips_enabled(NULL); #else ERR_clear_error(); - result = FIPS_mode(); + int result = FIPS_mode(); if (result == 0) { // "If the library was built without support of the FIPS Object Module, // then the function will return 0 with an error code of diff --git a/Modules/_ssl.c b/Modules/_ssl.c index c08665be295fa0..d2b257e1ff462c 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -14,6 +14,13 @@ http://bugs.python.org/issue8108#msg102867 ? */ +/* Don't warn about deprecated functions, */ +#ifndef OPENSSL_API_COMPAT + // 0x10101000L == 1.1.1, 30000 == 3.0.0 + #define OPENSSL_API_COMPAT 0x10101000L +#endif +#define OPENSSL_NO_DEPRECATED 1 + #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -43,14 +50,6 @@ static PySocketModule_APIObject PySocketModule; #include #endif -/* Don't warn about deprecated functions */ -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -#endif -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wdeprecated-declarations" -#endif - /* Include OpenSSL header files */ #include "openssl/rsa.h" #include "openssl/crypto.h" @@ -148,24 +147,20 @@ static void _PySSLFixErrno(void) { # define PY_OPENSSL_1_1_API 1 #endif -/* OpenSSL API compat */ -#ifdef OPENSSL_API_COMPAT -#if OPENSSL_API_COMPAT >= 0x10100000L - -/* OpenSSL API 1.1.0+ does not include version methods */ +/* OpenSSL API 1.1.0+ does not include version methods. Define the methods + * unless OpenSSL is compiled without the methods. It's the easiest way to + * make 1.0.2, 1.1.0, 1.1.1, and 3.0.0 happy without deprecation warnings. + */ #ifndef OPENSSL_NO_TLS1_METHOD -#define OPENSSL_NO_TLS1_METHOD 1 +extern const SSL_METHOD *TLSv1_method(void); #endif #ifndef OPENSSL_NO_TLS1_1_METHOD -#define OPENSSL_NO_TLS1_1_METHOD 1 +extern const SSL_METHOD *TLSv1_1_method(void); #endif #ifndef OPENSSL_NO_TLS1_2_METHOD -#define OPENSSL_NO_TLS1_2_METHOD 1 +extern const SSL_METHOD *TLSv1_2_method(void); #endif -#endif /* >= 1.1.0 compcat */ -#endif /* OPENSSL_API_COMPAT */ - /* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */ #if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL # define PY_OPENSSL_1_1_API 1 From c2b7a66b91cdb96fbfdb160f96797208ddc5e436 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 13 Apr 2021 18:17:03 +0900 Subject: [PATCH 032/108] bpo-43731: Add an `encoding` parameter to logging.fileConfig() (GH-25273) --- Doc/library/logging.config.rst | 7 ++++++- Lib/logging/config.py | 5 +++-- .../next/Library/2021-04-08-15-19-20.bpo-43731.nnVd3h.rst | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-08-15-19-20.bpo-43731.nnVd3h.rst diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst index cab49f6072f357..f833bcdd1fcf5b 100644 --- a/Doc/library/logging.config.rst +++ b/Doc/library/logging.config.rst @@ -77,7 +77,7 @@ in :mod:`logging` itself) and defining handlers which are declared either in .. versionadded:: 3.2 -.. function:: fileConfig(fname, defaults=None, disable_existing_loggers=True) +.. function:: fileConfig(fname, defaults=None, disable_existing_loggers=True, encoding=None) Reads the logging configuration from a :mod:`configparser`\-format file. The format of the file should be as described in @@ -111,6 +111,8 @@ in :mod:`logging` itself) and defining handlers which are declared either in they or their ancestors are explicitly named in the logging configuration. + :param encoding: The encoding used to open file when *fname* is filename. + .. versionchanged:: 3.4 An instance of a subclass of :class:`~configparser.RawConfigParser` is now accepted as a value for ``fname``. This facilitates: @@ -121,6 +123,9 @@ in :mod:`logging` itself) and defining handlers which are declared either in application (e.g. based on command-line parameters or other aspects of the runtime environment) before being passed to ``fileConfig``. + .. versionadded:: 3.10 + The *encoding* parameter is added. + .. function:: listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None) Starts up a socket server on the specified port, and listens for new diff --git a/Lib/logging/config.py b/Lib/logging/config.py index fd3aded7608cbf..3bc63b78621aba 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -48,7 +48,7 @@ # _listener holds the server object doing the listening _listener = None -def fileConfig(fname, defaults=None, disable_existing_loggers=True): +def fileConfig(fname, defaults=None, disable_existing_loggers=True, encoding=None): """ Read the logging configuration from a ConfigParser-format file. @@ -66,7 +66,8 @@ def fileConfig(fname, defaults=None, disable_existing_loggers=True): if hasattr(fname, 'readline'): cp.read_file(fname) else: - cp.read(fname) + encoding = io.text_encoding(encoding) + cp.read(fname, encoding=encoding) formatters = _create_formatters(cp) diff --git a/Misc/NEWS.d/next/Library/2021-04-08-15-19-20.bpo-43731.nnVd3h.rst b/Misc/NEWS.d/next/Library/2021-04-08-15-19-20.bpo-43731.nnVd3h.rst new file mode 100644 index 00000000000000..e5309c92fddba3 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-08-15-19-20.bpo-43731.nnVd3h.rst @@ -0,0 +1 @@ +Add an ``encoding`` parameter :func:`logging.fileConfig()`. From 9e7b2076fb4380987ad0262c4c0ca900b06475ad Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Tue, 13 Apr 2021 11:08:14 +0100 Subject: [PATCH 033/108] bpo-43760: Speed up check for tracing in interpreter dispatch (#25276) * Remove redundant tracing_possible field from interpreter state. * Move 'use_tracing' from tstate onto C stack, for fastest possible checking in dispatch logic. * Add comments stressing the importance stack discipline when dealing with CFrames. * Add NEWS --- Include/cpython/pystate.h | 22 +++++++- Include/internal/pycore_interp.h | 6 -- .../2021-04-08-12-20-29.bpo-43760.tBIsD8.rst | 2 + Python/ceval.c | 55 +++++++++++-------- Python/pystate.c | 3 +- Python/sysmodule.c | 8 +-- 6 files changed, 61 insertions(+), 35 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-08-12-20-29.bpo-43760.tBIsD8.rst diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index cfaee890f97151..e3ccc543560849 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -29,6 +29,21 @@ typedef int (*Py_tracefunc)(PyObject *, PyFrameObject *, int, PyObject *); #define PyTrace_OPCODE 7 +typedef struct _cframe { + /* This struct will be threaded through the C stack + * allowing fast access to per-thread state that needs + * to be accessed quickly by the interpreter, but can + * be modified outside of the interpreter. + * + * WARNING: This makes data on the C stack accessible from + * heap objects. Care must be taken to maintain stack + * discipline and make sure that instances of this struct cannot + * accessed outside of their lifetime. + */ + int use_tracing; + struct _cframe *previous; +} CFrame; + typedef struct _err_stackitem { /* This struct represents an entry on the exception stack, which is a * per-coroutine state. (Coroutine in the computer science sense, @@ -61,7 +76,10 @@ struct _ts { This is to prevent the actual trace/profile code from being recorded in the trace/profile. */ int tracing; - int use_tracing; + + /* Pointer to current CFrame in the C stack frame of the currently, + * or most recently, executing _PyEval_EvalFrameDefault. */ + CFrame *cframe; Py_tracefunc c_profilefunc; Py_tracefunc c_tracefunc; @@ -129,6 +147,8 @@ struct _ts { /* Unique thread state id. */ uint64_t id; + CFrame root_cframe; + /* XXX signal handlers should also be here */ }; diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index fa0e26feb0f843..dbdd109bd78839 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h @@ -33,12 +33,6 @@ struct _pending_calls { struct _ceval_state { int recursion_limit; - /* Records whether tracing is on for any thread. Counts the number - of threads for which tstate->c_tracefunc is non-NULL, so if the - value is 0, we know we don't have to check this thread's - c_tracefunc. This speeds up the if statement in - _PyEval_EvalFrameDefault() after fast_next_opcode. */ - int tracing_possible; /* This single variable consolidates all requests to break out of the fast path in the eval loop. */ _Py_atomic_int eval_breaker; diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-08-12-20-29.bpo-43760.tBIsD8.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-08-12-20-29.bpo-43760.tBIsD8.rst new file mode 100644 index 00000000000000..e6612103d807e0 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-08-12-20-29.bpo-43760.tBIsD8.rst @@ -0,0 +1,2 @@ +Move the flag for checking whether tracing is enabled to the C stack, from the heap. +Should speed up dispatch in the interpreter. diff --git a/Python/ceval.c b/Python/ceval.c index c12116044b54e8..53b596b304c213 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -37,6 +37,7 @@ typedef struct { PyCodeObject *code; // The code object for the bounds. May be NULL. int instr_prev; // Only valid if code != NULL. PyCodeAddressRange bounds; // Only valid if code != NULL. + CFrame cframe; } PyTraceInfo; @@ -1109,8 +1110,6 @@ match_class(PyThreadState *tstate, PyObject *subject, PyObject *type, static int do_raise(PyThreadState *tstate, PyObject *exc, PyObject *cause); static int unpack_iterable(PyThreadState *, PyObject *, int, int, PyObject **); -#define _Py_TracingPossible(ceval) ((ceval)->tracing_possible) - PyObject * PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals) @@ -1307,7 +1306,7 @@ eval_frame_handle_pending(PyThreadState *tstate) #define DISPATCH() \ { \ - if (_Py_TracingPossible(ceval2) OR_DTRACE_LINE OR_LLTRACE) { \ + if (trace_info.cframe.use_tracing OR_DTRACE_LINE OR_LLTRACE) { \ goto tracing_dispatch; \ } \ f->f_lasti = INSTR_OFFSET(); \ @@ -1595,8 +1594,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) int oparg; /* Current opcode argument, if any */ PyObject **fastlocals, **freevars; PyObject *retval = NULL; /* Return value */ - struct _ceval_state * const ceval2 = &tstate->interp->ceval; - _Py_atomic_int * const eval_breaker = &ceval2->eval_breaker; + _Py_atomic_int * const eval_breaker = &tstate->interp->ceval.eval_breaker; PyCodeObject *co; const _Py_CODEUNIT *first_instr; @@ -1616,11 +1614,20 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) /* Mark trace_info as uninitialized */ trace_info.code = NULL; + /* WARNING: Because the CFrame lives on the C stack, + * but can be accessed from a heap allocated object (tstate) + * strict stack discipline must be maintained. + */ + CFrame *prev_cframe = tstate->cframe; + trace_info.cframe.use_tracing = prev_cframe->use_tracing; + trace_info.cframe.previous = prev_cframe; + tstate->cframe = &trace_info.cframe; + /* push frame */ tstate->frame = f; co = f->f_code; - if (tstate->use_tracing) { + if (trace_info.cframe.use_tracing) { if (tstate->c_tracefunc != NULL) { /* tstate->c_tracefunc, if defined, is a function that will be called on *every* entry @@ -1782,7 +1789,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) /* line-by-line tracing support */ - if (_Py_TracingPossible(ceval2) && + if (trace_info.cframe.use_tracing && tstate->c_tracefunc != NULL && !tstate->tracing) { int err; /* see maybe_call_line_trace() @@ -4543,7 +4550,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) PUSH(val); PUSH(exc); JUMPTO(handler); - if (_Py_TracingPossible(ceval2)) { + if (trace_info.cframe.use_tracing) { trace_info.instr_prev = INT_MAX; } /* Resume normal execution */ @@ -4567,7 +4574,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) f->f_stackdepth = 0; f->f_state = FRAME_RAISED; exiting: - if (tstate->use_tracing) { + if (trace_info.cframe.use_tracing) { if (tstate->c_tracefunc) { if (call_trace_protected(tstate->c_tracefunc, tstate->c_traceobj, tstate, f, &trace_info, PyTrace_RETURN, retval)) { @@ -4584,6 +4591,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int throwflag) /* pop frame */ exit_eval_frame: + /* Restore previous cframe */ + tstate->cframe = trace_info.cframe.previous; + tstate->cframe->use_tracing = trace_info.cframe.use_tracing; + if (PyDTrace_FUNCTION_RETURN_ENABLED()) dtrace_function_return(f); _Py_LeaveRecursiveCall(tstate); @@ -5507,7 +5518,7 @@ call_trace(Py_tracefunc func, PyObject *obj, if (tstate->tracing) return 0; tstate->tracing++; - tstate->use_tracing = 0; + tstate->cframe->use_tracing = 0; if (frame->f_lasti < 0) { frame->f_lineno = frame->f_code->co_firstlineno; } @@ -5517,7 +5528,7 @@ call_trace(Py_tracefunc func, PyObject *obj, } result = func(obj, frame, what, arg); frame->f_lineno = 0; - tstate->use_tracing = ((tstate->c_tracefunc != NULL) + tstate->cframe->use_tracing = ((tstate->c_tracefunc != NULL) || (tstate->c_profilefunc != NULL)); tstate->tracing--; return result; @@ -5528,15 +5539,15 @@ _PyEval_CallTracing(PyObject *func, PyObject *args) { PyThreadState *tstate = _PyThreadState_GET(); int save_tracing = tstate->tracing; - int save_use_tracing = tstate->use_tracing; + int save_use_tracing = tstate->cframe->use_tracing; PyObject *result; tstate->tracing = 0; - tstate->use_tracing = ((tstate->c_tracefunc != NULL) + tstate->cframe->use_tracing = ((tstate->c_tracefunc != NULL) || (tstate->c_profilefunc != NULL)); result = PyObject_Call(func, args, NULL); tstate->tracing = save_tracing; - tstate->use_tracing = save_use_tracing; + tstate->cframe->use_tracing = save_use_tracing; return result; } @@ -5590,7 +5601,7 @@ _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg) tstate->c_profilefunc = NULL; tstate->c_profileobj = NULL; /* Must make sure that tracing is not ignored if 'profileobj' is freed */ - tstate->use_tracing = tstate->c_tracefunc != NULL; + tstate->cframe->use_tracing = tstate->c_tracefunc != NULL; Py_XDECREF(profileobj); Py_XINCREF(arg); @@ -5598,7 +5609,7 @@ _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg) tstate->c_profilefunc = func; /* Flag that tracing or profiling is turned on */ - tstate->use_tracing = (func != NULL) || (tstate->c_tracefunc != NULL); + tstate->cframe->use_tracing = (func != NULL) || (tstate->c_tracefunc != NULL); return 0; } @@ -5626,14 +5637,12 @@ _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg) return -1; } - struct _ceval_state *ceval2 = &tstate->interp->ceval; PyObject *traceobj = tstate->c_traceobj; - ceval2->tracing_possible += (func != NULL) - (tstate->c_tracefunc != NULL); tstate->c_tracefunc = NULL; tstate->c_traceobj = NULL; /* Must make sure that profiling is not ignored if 'traceobj' is freed */ - tstate->use_tracing = (tstate->c_profilefunc != NULL); + tstate->cframe->use_tracing = (tstate->c_profilefunc != NULL); Py_XDECREF(traceobj); Py_XINCREF(arg); @@ -5641,7 +5650,7 @@ _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg) tstate->c_tracefunc = func; /* Flag that tracing or profiling is turned on */ - tstate->use_tracing = ((func != NULL) + tstate->cframe->use_tracing = ((func != NULL) || (tstate->c_profilefunc != NULL)); return 0; @@ -5836,7 +5845,7 @@ PyEval_GetFuncDesc(PyObject *func) } #define C_TRACE(x, call) \ -if (tstate->use_tracing && tstate->c_profilefunc) { \ +if (trace_info->cframe.use_tracing && tstate->c_profilefunc) { \ if (call_trace(tstate->c_profilefunc, tstate->c_profileobj, \ tstate, tstate->frame, trace_info, \ PyTrace_C_CALL, func)) { \ @@ -5917,7 +5926,7 @@ call_function(PyThreadState *tstate, Py_ssize_t nargs = oparg - nkwargs; PyObject **stack = (*pp_stack) - nargs - nkwargs; - if (tstate->use_tracing) { + if (trace_info->cframe.use_tracing) { x = trace_call_function(tstate, trace_info, func, stack, nargs, kwnames); } else { @@ -5950,7 +5959,7 @@ do_call_core(PyThreadState *tstate, } else if (Py_IS_TYPE(func, &PyMethodDescr_Type)) { Py_ssize_t nargs = PyTuple_GET_SIZE(callargs); - if (nargs > 0 && tstate->use_tracing) { + if (nargs > 0 && trace_info->cframe.use_tracing) { /* We need to create a temporary bound method as argument for profiling. diff --git a/Python/pystate.c b/Python/pystate.c index c8b2530f68dfe0..436f874842cc84 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -624,7 +624,8 @@ new_threadstate(PyInterpreterState *interp, int init) tstate->recursion_headroom = 0; tstate->stackcheck_counter = 0; tstate->tracing = 0; - tstate->use_tracing = 0; + tstate->root_cframe.use_tracing = 0; + tstate->cframe = &tstate->root_cframe; tstate->gilstate_counter = 0; tstate->async_exc = NULL; tstate->thread_id = PyThread_get_thread_ident(); diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 54d70ef0569759..a36d90f9de1682 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -252,7 +252,7 @@ sys_audit_tstate(PyThreadState *ts, const char *event, /* Disallow tracing in hooks unless explicitly enabled */ ts->tracing++; - ts->use_tracing = 0; + ts->cframe->use_tracing = 0; while ((hook = PyIter_Next(hooks)) != NULL) { _Py_IDENTIFIER(__cantrace__); PyObject *o; @@ -265,14 +265,14 @@ sys_audit_tstate(PyThreadState *ts, const char *event, break; } if (canTrace) { - ts->use_tracing = (ts->c_tracefunc || ts->c_profilefunc); + ts->cframe->use_tracing = (ts->c_tracefunc || ts->c_profilefunc); ts->tracing--; } PyObject* args[2] = {eventName, eventArgs}; o = _PyObject_FastCallTstate(ts, hook, args, 2); if (canTrace) { ts->tracing++; - ts->use_tracing = 0; + ts->cframe->use_tracing = 0; } if (!o) { break; @@ -280,7 +280,7 @@ sys_audit_tstate(PyThreadState *ts, const char *event, Py_DECREF(o); Py_CLEAR(hook); } - ts->use_tracing = (ts->c_tracefunc || ts->c_profilefunc); + ts->cframe->use_tracing = (ts->c_tracefunc || ts->c_profilefunc); ts->tracing--; if (_PyErr_Occurred(ts)) { goto exit; From 54db51c9114ac49030832f5134979ca866ffd21c Mon Sep 17 00:00:00 2001 From: "Andrew V. Jones" Date: Tue, 13 Apr 2021 12:27:21 +0100 Subject: [PATCH 034/108] bpo-43816: Add extern "C" to Include/cpython/pyctype.h (GH-25365) Signed-off-by: Andrew V. Jones --- Include/cpython/pyctype.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Include/cpython/pyctype.h b/Include/cpython/pyctype.h index 6bce63eeb63b82..729d93275e6c53 100644 --- a/Include/cpython/pyctype.h +++ b/Include/cpython/pyctype.h @@ -1,6 +1,9 @@ #ifndef Py_LIMITED_API #ifndef PYCTYPE_H #define PYCTYPE_H +#ifdef __cplusplus +extern "C" { +#endif #define PY_CTF_LOWER 0x01 #define PY_CTF_UPPER 0x02 @@ -29,5 +32,8 @@ PyAPI_DATA(const unsigned char) _Py_ctype_toupper[256]; #define Py_TOLOWER(c) (_Py_ctype_tolower[Py_CHARMASK(c)]) #define Py_TOUPPER(c) (_Py_ctype_toupper[Py_CHARMASK(c)]) +#ifdef __cplusplus +} +#endif #endif /* !PYCTYPE_H */ #endif /* !Py_LIMITED_API */ From 65f058eb081c9e1fe44115d1ac7966067e3650c7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 13 Apr 2021 13:33:31 +0200 Subject: [PATCH 035/108] bpo-43770: Reorder type_ready() (GH-25373) Add type_ready_create_dict() sub-function. * Start with type_ready_create_dict(). * Call type_ready_mro() earlier, before type_ready_add_attrs(). * Call type_ready_inherit_special() earlier, in type_ready_inherit(). --- Objects/typeobject.c | 104 +++++++++++++++++++++++-------------------- 1 file changed, 56 insertions(+), 48 deletions(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 75dd604d39c457..9ed77fdb250ae9 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -5853,7 +5853,7 @@ type_ready_checks(PyTypeObject *type) static int -type_ready_set_base(PyTypeObject *type) +type_ready_set_bases(PyTypeObject *type) { /* Initialize tp_base (defaults to BaseObject unless that's us) */ PyTypeObject *base = type->tp_base; @@ -5887,13 +5887,7 @@ type_ready_set_base(PyTypeObject *type) if (Py_IS_TYPE(type, NULL) && base != NULL) { Py_SET_TYPE(type, Py_TYPE(base)); } - return 0; -} - -static int -type_ready_add_attrs(PyTypeObject *type) -{ /* Initialize tp_bases */ PyObject *bases = type->tp_bases; if (bases == NULL) { @@ -5909,17 +5903,29 @@ type_ready_add_attrs(PyTypeObject *type) } type->tp_bases = bases; } + return 0; +} - /* Initialize tp_dict */ - PyObject *dict = type->tp_dict; + +static int +type_ready_set_dict(PyTypeObject *type) +{ + if (type->tp_dict != NULL) { + return 0; + } + + PyObject *dict = PyDict_New(); if (dict == NULL) { - dict = PyDict_New(); - if (dict == NULL) { - return -1; - } - type->tp_dict = dict; + return -1; } + type->tp_dict = dict; + return 0; +} + +static int +type_ready_add_attrs(PyTypeObject *type) +{ /* Add type-specific descriptors to tp_dict */ if (add_operators(type) < 0) { return -1; @@ -5972,12 +5978,35 @@ type_ready_mro(PyTypeObject *type) } +/* Some more special stuff */ +static void +type_ready_inherit_special(PyTypeObject *type, PyTypeObject *base) +{ + if (type->tp_as_async == NULL) { + type->tp_as_async = base->tp_as_async; + } + if (type->tp_as_number == NULL) { + type->tp_as_number = base->tp_as_number; + } + if (type->tp_as_sequence == NULL) { + type->tp_as_sequence = base->tp_as_sequence; + } + if (type->tp_as_mapping == NULL) { + type->tp_as_mapping = base->tp_as_mapping; + } + if (type->tp_as_buffer == NULL) { + type->tp_as_buffer = base->tp_as_buffer; + } +} + + static int type_ready_inherit(PyTypeObject *type) { /* Inherit special flags from dominant base */ - if (type->tp_base != NULL) { - inherit_special(type, type->tp_base); + PyTypeObject *base = type->tp_base; + if (base != NULL) { + inherit_special(type, base); } /* Initialize tp_dict properly */ @@ -5992,6 +6021,10 @@ type_ready_inherit(PyTypeObject *type) } } + if (base != NULL) { + type_ready_inherit_special(type, base); + } + /* Sanity check for tp_free. */ if (_PyType_IS_GC(type) && (type->tp_flags & Py_TPFLAGS_BASETYPE) && (type->tp_free == NULL || type->tp_free == PyObject_Del)) @@ -6005,6 +6038,7 @@ type_ready_inherit(PyTypeObject *type) type->tp_name); return -1; } + return 0; } @@ -6073,33 +6107,6 @@ type_ready_set_hash(PyTypeObject *type) } -/* Some more special stuff */ -static void -type_ready_inherit_special(PyTypeObject *type) -{ - PyTypeObject *base = type->tp_base; - if (base == NULL) { - return; - } - - if (type->tp_as_async == NULL) { - type->tp_as_async = base->tp_as_async; - } - if (type->tp_as_number == NULL) { - type->tp_as_number = base->tp_as_number; - } - if (type->tp_as_sequence == NULL) { - type->tp_as_sequence = base->tp_as_sequence; - } - if (type->tp_as_mapping == NULL) { - type->tp_as_mapping = base->tp_as_mapping; - } - if (type->tp_as_buffer == NULL) { - type->tp_as_buffer = base->tp_as_buffer; - } -} - - /* Link into each base class's list of subclasses */ static int type_ready_add_subclasses(PyTypeObject *type) @@ -6132,15 +6139,19 @@ type_ready(PyTypeObject *type) _Py_AddToAllObjects((PyObject *)type, 0); #endif - if (type_ready_set_base(type) < 0) { + /* Initialize tp_dict: _PyType_IsReady() tests if tp_dict != NULL */ + if (type_ready_set_dict(type) < 0) { return -1; } - if (type_ready_add_attrs(type) < 0) { + if (type_ready_set_bases(type) < 0) { return -1; } if (type_ready_mro(type) < 0) { return -1; } + if (type_ready_add_attrs(type) < 0) { + return -1; + } if (type_ready_inherit(type) < 0) { return -1; } @@ -6150,9 +6161,6 @@ type_ready(PyTypeObject *type) if (type_ready_set_hash(type) < 0) { return -1; } - - type_ready_inherit_special(type); - if (type_ready_add_subclasses(type) < 0) { return -1; } From a328d73843cfd42d2aee1434c78df1ef2845931a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 13 Apr 2021 15:25:16 +0200 Subject: [PATCH 036/108] bpo-43770: Cleanup type_ready() (GH-25388) * Rename functions * Only pass type parameter to "add_xxx" functions. * Clarify the role of the type_ready_inherit_as_structs() function. * Move type_dict_set_doc() code to call it in type_ready_fill_dict(). --- Objects/typeobject.c | 272 ++++++++++++++++++++++++------------------- 1 file changed, 153 insertions(+), 119 deletions(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 9ed77fdb250ae9..a957c832b90bd6 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -5437,72 +5437,92 @@ PyTypeObject PyBaseObject_Type = { }; -/* Add the methods from tp_methods to the __dict__ in a type object */ - static int -add_methods(PyTypeObject *type, PyMethodDef *meth) +type_add_method(PyTypeObject *type, PyMethodDef *meth) { - PyObject *dict = type->tp_dict; - PyObject *name; - - for (; meth->ml_name != NULL; meth++) { - PyObject *descr; - int err; - int isdescr = 1; - if (meth->ml_flags & METH_CLASS) { - if (meth->ml_flags & METH_STATIC) { - PyErr_SetString(PyExc_ValueError, - "method cannot be both class and static"); - return -1; - } - descr = PyDescr_NewClassMethod(type, meth); - } - else if (meth->ml_flags & METH_STATIC) { - PyObject *cfunc = PyCFunction_NewEx(meth, (PyObject*)type, NULL); - if (cfunc == NULL) - return -1; - descr = PyStaticMethod_New(cfunc); - isdescr = 0; // PyStaticMethod is not PyDescrObject - Py_DECREF(cfunc); - } - else { - descr = PyDescr_NewMethod(type, meth); - } - if (descr == NULL) + PyObject *descr; + int isdescr = 1; + if (meth->ml_flags & METH_CLASS) { + if (meth->ml_flags & METH_STATIC) { + PyErr_SetString(PyExc_ValueError, + "method cannot be both class and static"); return -1; - - if (isdescr) { - name = PyDescr_NAME(descr); } - else { - name = PyUnicode_FromString(meth->ml_name); - if (name == NULL) { - Py_DECREF(descr); - return -1; - } + descr = PyDescr_NewClassMethod(type, meth); + } + else if (meth->ml_flags & METH_STATIC) { + PyObject *cfunc = PyCFunction_NewEx(meth, (PyObject*)type, NULL); + if (cfunc == NULL) { + return -1; } + descr = PyStaticMethod_New(cfunc); + isdescr = 0; // PyStaticMethod is not PyDescrObject + Py_DECREF(cfunc); + } + else { + descr = PyDescr_NewMethod(type, meth); + } + if (descr == NULL) { + return -1; + } - if (!(meth->ml_flags & METH_COEXIST)) { - err = PyDict_SetDefault(dict, name, descr) == NULL; - } - else { - err = PyDict_SetItem(dict, name, descr) < 0; - } - if (!isdescr) { - Py_DECREF(name); + PyObject *name; + if (isdescr) { + name = PyDescr_NAME(descr); + } + else { + name = PyUnicode_FromString(meth->ml_name); + if (name == NULL) { + Py_DECREF(descr); + return -1; } - Py_DECREF(descr); - if (err) + } + + int err; + if (!(meth->ml_flags & METH_COEXIST)) { + err = PyDict_SetDefault(type->tp_dict, name, descr) == NULL; + } + else { + err = PyDict_SetItem(type->tp_dict, name, descr) < 0; + } + if (!isdescr) { + Py_DECREF(name); + } + Py_DECREF(descr); + if (err) { + return -1; + } + return 0; +} + + +/* Add the methods from tp_methods to the __dict__ in a type object */ +static int +type_add_methods(PyTypeObject *type) +{ + PyMethodDef *meth = type->tp_methods; + if (meth == NULL) { + return 0; + } + + for (; meth->ml_name != NULL; meth++) { + if (type_add_method(type, meth) < 0) { return -1; + } } return 0; } + static int -add_members(PyTypeObject *type, PyMemberDef *memb) +type_add_members(PyTypeObject *type) { - PyObject *dict = type->tp_dict; + PyMemberDef *memb = type->tp_members; + if (memb == NULL) { + return 0; + } + PyObject *dict = type->tp_dict; for (; memb->name != NULL; memb++) { PyObject *descr = PyDescr_NewMember(type, memb); if (descr == NULL) @@ -5517,15 +5537,21 @@ add_members(PyTypeObject *type, PyMemberDef *memb) return 0; } + static int -add_getset(PyTypeObject *type, PyGetSetDef *gsp) +type_add_getset(PyTypeObject *type) { - PyObject *dict = type->tp_dict; + PyGetSetDef *gsp = type->tp_getset; + if (gsp == NULL) { + return 0; + } + PyObject *dict = type->tp_dict; for (; gsp->name != NULL; gsp++) { PyObject *descr = PyDescr_NewGetSet(type, gsp); - if (descr == NULL) + if (descr == NULL) { return -1; + } if (PyDict_SetDefault(dict, PyDescr_NAME(descr), descr) == NULL) { Py_DECREF(descr); @@ -5536,6 +5562,7 @@ add_getset(PyTypeObject *type, PyGetSetDef *gsp) return 0; } + static void inherit_special(PyTypeObject *type, PyTypeObject *base) { @@ -5572,31 +5599,39 @@ inherit_special(PyTypeObject *type, PyTypeObject *base) /* Copy other non-function slots */ -#undef COPYVAL #define COPYVAL(SLOT) \ - if (type->SLOT == 0) type->SLOT = base->SLOT + if (type->SLOT == 0) { type->SLOT = base->SLOT; } COPYVAL(tp_itemsize); COPYVAL(tp_weaklistoffset); COPYVAL(tp_dictoffset); +#undef COPYVAL /* Setup fast subclass flags */ - if (PyType_IsSubtype(base, (PyTypeObject*)PyExc_BaseException)) + if (PyType_IsSubtype(base, (PyTypeObject*)PyExc_BaseException)) { type->tp_flags |= Py_TPFLAGS_BASE_EXC_SUBCLASS; - else if (PyType_IsSubtype(base, &PyType_Type)) + } + else if (PyType_IsSubtype(base, &PyType_Type)) { type->tp_flags |= Py_TPFLAGS_TYPE_SUBCLASS; - else if (PyType_IsSubtype(base, &PyLong_Type)) + } + else if (PyType_IsSubtype(base, &PyLong_Type)) { type->tp_flags |= Py_TPFLAGS_LONG_SUBCLASS; - else if (PyType_IsSubtype(base, &PyBytes_Type)) + } + else if (PyType_IsSubtype(base, &PyBytes_Type)) { type->tp_flags |= Py_TPFLAGS_BYTES_SUBCLASS; - else if (PyType_IsSubtype(base, &PyUnicode_Type)) + } + else if (PyType_IsSubtype(base, &PyUnicode_Type)) { type->tp_flags |= Py_TPFLAGS_UNICODE_SUBCLASS; - else if (PyType_IsSubtype(base, &PyTuple_Type)) + } + else if (PyType_IsSubtype(base, &PyTuple_Type)) { type->tp_flags |= Py_TPFLAGS_TUPLE_SUBCLASS; - else if (PyType_IsSubtype(base, &PyList_Type)) + } + else if (PyType_IsSubtype(base, &PyList_Type)) { type->tp_flags |= Py_TPFLAGS_LIST_SUBCLASS; - else if (PyType_IsSubtype(base, &PyDict_Type)) + } + else if (PyType_IsSubtype(base, &PyDict_Type)) { type->tp_flags |= Py_TPFLAGS_DICT_SUBCLASS; + } if (PyType_HasFeature(base, _Py_TPFLAGS_MATCH_SELF)) { type->tp_flags |= _Py_TPFLAGS_MATCH_SELF; @@ -5923,25 +5958,35 @@ type_ready_set_dict(PyTypeObject *type) } +/* If the type dictionary doesn't contain a __doc__, set it from + the tp_doc slot. */ static int -type_ready_add_attrs(PyTypeObject *type) +type_dict_set_doc(PyTypeObject *type) { - /* Add type-specific descriptors to tp_dict */ - if (add_operators(type) < 0) { + int r = _PyDict_ContainsId(type->tp_dict, &PyId___doc__); + if (r < 0) { return -1; } - if (type->tp_methods != NULL) { - if (add_methods(type, type->tp_methods) < 0) { + if (r > 0) { + return 0; + } + + if (type->tp_doc != NULL) { + const char *doc_str; + doc_str = _PyType_DocWithoutSignature(type->tp_name, type->tp_doc); + PyObject *doc = PyUnicode_FromString(doc_str); + if (doc == NULL) { return -1; } - } - if (type->tp_members != NULL) { - if (add_members(type, type->tp_members) < 0) { + + if (_PyDict_SetItemId(type->tp_dict, &PyId___doc__, doc) < 0) { + Py_DECREF(doc); return -1; } + Py_DECREF(doc); } - if (type->tp_getset != NULL) { - if (add_getset(type, type->tp_getset) < 0) { + else { + if (_PyDict_SetItemId(type->tp_dict, &PyId___doc__, Py_None) < 0) { return -1; } } @@ -5949,6 +5994,29 @@ type_ready_add_attrs(PyTypeObject *type) } +static int +type_ready_fill_dict(PyTypeObject *type) +{ + /* Add type-specific descriptors to tp_dict */ + if (add_operators(type) < 0) { + return -1; + } + if (type_add_methods(type) < 0) { + return -1; + } + if (type_add_members(type) < 0) { + return -1; + } + if (type_add_getset(type) < 0) { + return -1; + } + if (type_dict_set_doc(type) < 0) { + return -1; + } + return 0; +} + + static int type_ready_mro(PyTypeObject *type) { @@ -5978,9 +6046,13 @@ type_ready_mro(PyTypeObject *type) } -/* Some more special stuff */ +// For static types, inherit tp_as_xxx structures from the base class +// if it's NULL. +// +// For heap types, tp_as_xxx structures are not NULL: they are set to the +// PyHeapTypeObject.as_xxx fields by type_new_alloc(). static void -type_ready_inherit_special(PyTypeObject *type, PyTypeObject *base) +type_ready_inherit_as_structs(PyTypeObject *type, PyTypeObject *base) { if (type->tp_as_async == NULL) { type->tp_as_async = base->tp_as_async; @@ -6009,7 +6081,7 @@ type_ready_inherit(PyTypeObject *type) inherit_special(type, base); } - /* Initialize tp_dict properly */ + // Inherit slots PyObject *mro = type->tp_mro; Py_ssize_t n = PyTuple_GET_SIZE(type->tp_mro); for (Py_ssize_t i = 1; i < n; i++) { @@ -6022,7 +6094,7 @@ type_ready_inherit(PyTypeObject *type) } if (base != NULL) { - type_ready_inherit_special(type, base); + type_ready_inherit_as_structs(type, base); } /* Sanity check for tp_free. */ @@ -6043,42 +6115,6 @@ type_ready_inherit(PyTypeObject *type) } -/* If the type dictionary doesn't contain a __doc__, set it from - the tp_doc slot. */ -static int -type_ready_set_doc(PyTypeObject *type) -{ - int r = _PyDict_ContainsId(type->tp_dict, &PyId___doc__); - if (r < 0) { - return -1; - } - if (r > 0) { - return 0; - } - - if (type->tp_doc != NULL) { - const char *doc_str; - doc_str = _PyType_DocWithoutSignature(type->tp_name, type->tp_doc); - PyObject *doc = PyUnicode_FromString(doc_str); - if (doc == NULL) { - return -1; - } - - if (_PyDict_SetItemId(type->tp_dict, &PyId___doc__, doc) < 0) { - Py_DECREF(doc); - return -1; - } - Py_DECREF(doc); - } - else { - if (_PyDict_SetItemId(type->tp_dict, &PyId___doc__, Py_None) < 0) { - return -1; - } - } - return 0; -} - - /* Hack for tp_hash and __hash__. If after all that, tp_hash is still NULL, and __hash__ is not in tp_dict, set tp_hash to PyObject_HashNotImplemented and @@ -6149,15 +6185,12 @@ type_ready(PyTypeObject *type) if (type_ready_mro(type) < 0) { return -1; } - if (type_ready_add_attrs(type) < 0) { + if (type_ready_fill_dict(type) < 0) { return -1; } if (type_ready_inherit(type) < 0) { return -1; } - if (type_ready_set_doc(type) < 0) { - return -1; - } if (type_ready_set_hash(type) < 0) { return -1; } @@ -8431,8 +8464,9 @@ add_operators(PyTypeObject *type) } } if (type->tp_new != NULL) { - if (add_tp_new_wrapper(type) < 0) + if (add_tp_new_wrapper(type) < 0) { return -1; + } } return 0; } From eb77133564d74eb09ed63872a69b9827d4841b49 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Tue, 13 Apr 2021 19:24:23 +0530 Subject: [PATCH 037/108] bpo41515: Fix assert in test which throws SyntaxWarning. (#25379) --- Lib/test/test_typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index a6afd35944f2e7..50723c4df19908 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -2272,7 +2272,7 @@ def test_bad_module(self): class BadModule: pass BadModule.__module__ = 'bad' # Something not in sys.modules - assert(get_type_hints(BadModule), {}) + self.assertEqual(get_type_hints(BadModule), {}) class FinalTests(BaseTestCase): From fd79af7ae2574aaaa829e40ed780e17ef1f9be84 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Tue, 13 Apr 2021 18:03:22 +0200 Subject: [PATCH 038/108] Doc: Try to enhance wording on circular imports. (GH-24705) --- Doc/faq/programming.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index 514ca04ab3c528..ff78ca7320d7d8 100644 --- a/Doc/faq/programming.rst +++ b/Doc/faq/programming.rst @@ -1898,26 +1898,26 @@ How can I have modules that mutually import each other? Suppose you have the following modules: -foo.py:: +:file:`foo.py`:: from bar import bar_var foo_var = 1 -bar.py:: +:file:`bar.py`:: from foo import foo_var bar_var = 2 The problem is that the interpreter will perform the following steps: -* main imports foo -* Empty globals for foo are created -* foo is compiled and starts executing -* foo imports bar -* Empty globals for bar are created -* bar is compiled and starts executing -* bar imports foo (which is a no-op since there already is a module named foo) -* bar.foo_var = foo.foo_var +* main imports ``foo`` +* Empty globals for ``foo`` are created +* ``foo`` is compiled and starts executing +* ``foo`` imports ``bar`` +* Empty globals for ``bar`` are created +* ``bar`` is compiled and starts executing +* ``bar`` imports ``foo`` (which is a no-op since there already is a module named ``foo``) +* The import mechanism tries to read ``foo_var`` from ``foo`` globals, to set ``bar.foo_var = foo.foo_var`` The last step fails, because Python isn't done with interpreting ``foo`` yet and the global symbol dictionary for ``foo`` is still empty. From 30ed93bfec5dfa7ee05982e2df8fd810f3f49305 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Tue, 13 Apr 2021 17:51:21 +0100 Subject: [PATCH 039/108] bpo-43797: Handle correctly invalid assignments inside function calls and generators (GH-25390) --- Grammar/python.gram | 2 +- Lib/test/test_genexps.py | 2 +- Lib/test/test_syntax.py | 14 +++++++++++++- Parser/parser.c | 12 ++++++------ 4 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Grammar/python.gram b/Grammar/python.gram index 8524a1206b054e..180d952b57a8d8 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -638,7 +638,7 @@ group[expr_ty]: | '(' a=(yield_expr | named_expression) ')' { a } | invalid_group genexp[expr_ty]: - | '(' a=named_expression b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) } + | '(' a=direct_named_expression b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) } | invalid_comprehension set[expr_ty]: '{' a=star_named_expressions '}' { _PyAST_Set(a, EXTRA) } setcomp[expr_ty]: diff --git a/Lib/test/test_genexps.py b/Lib/test/test_genexps.py index 70fe2bba3a6982..5c1a209b0e9908 100644 --- a/Lib/test/test_genexps.py +++ b/Lib/test/test_genexps.py @@ -103,7 +103,7 @@ >>> dict(a = i for i in range(10)) Traceback (most recent call last): ... - SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? + SyntaxError: invalid syntax Verify that parenthesis are required when used as a keyword argument value diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 0e6942f6a6fa2d..bd6a4d339e736c 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -868,6 +868,18 @@ Traceback (most recent call last): SyntaxError: invalid syntax + >>> dict(x=34); x $ y + Traceback (most recent call last): + SyntaxError: invalid syntax + + >>> dict(x=34, (x for x in range 10), 1); x $ y + Traceback (most recent call last): + SyntaxError: invalid syntax + + >>> dict(x=34, x=1, y=2); x $ y + Traceback (most recent call last): + SyntaxError: invalid syntax + Make sure that the old "raise X, Y[, Z]" form is gone: >>> raise X, Y Traceback (most recent call last): @@ -1013,7 +1025,7 @@ def _check_error(self, code, errtext, def test_expression_with_assignment(self): self._check_error( "print(end1 + end2 = ' ')", - "cannot assign to expression here. Maybe you meant '==' instead of '='?", + 'expression cannot contain assignment, perhaps you meant "=="?', offset=19 ) diff --git a/Parser/parser.c b/Parser/parser.c index 38bab96ae39819..d158b2952baec9 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -14015,7 +14015,7 @@ group_rule(Parser *p) return _res; } -// genexp: '(' named_expression for_if_clauses ')' | invalid_comprehension +// genexp: '(' direct_named_expression for_if_clauses ')' | invalid_comprehension static expr_ty genexp_rule(Parser *p) { @@ -14035,12 +14035,12 @@ genexp_rule(Parser *p) UNUSED(_start_lineno); // Only used by EXTRA macro int _start_col_offset = p->tokens[_mark]->col_offset; UNUSED(_start_col_offset); // Only used by EXTRA macro - { // '(' named_expression for_if_clauses ')' + { // '(' direct_named_expression for_if_clauses ')' if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> genexp[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' named_expression for_if_clauses ')'")); + D(fprintf(stderr, "%*c> genexp[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' direct_named_expression for_if_clauses ')'")); Token * _literal; Token * _literal_1; expr_ty a; @@ -14048,14 +14048,14 @@ genexp_rule(Parser *p) if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' && - (a = named_expression_rule(p)) // named_expression + (a = direct_named_expression_rule(p)) // direct_named_expression && (b = for_if_clauses_rule(p)) // for_if_clauses && (_literal_1 = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ genexp[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' named_expression for_if_clauses ')'")); + D(fprintf(stderr, "%*c+ genexp[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' direct_named_expression for_if_clauses ')'")); Token *_token = _PyPegen_get_last_nonnwhitespace_token(p); if (_token == NULL) { D(p->level--); @@ -14075,7 +14075,7 @@ genexp_rule(Parser *p) } p->mark = _mark; D(fprintf(stderr, "%*c%s genexp[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' named_expression for_if_clauses ')'")); + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' direct_named_expression for_if_clauses ')'")); } if (p->call_invalid_rules) { // invalid_comprehension if (p->error_indicator) { From 8fa1489365e7af8b90286c97db55a2dc60a05cde Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 13 Apr 2021 19:23:45 +0200 Subject: [PATCH 040/108] bpo-43811: Test multiple OpenSSL versions on GHA (GH-25360) The new checks are only executed when one or more OpenSSL-related files are modified. The checks run a handful of networking and hashing test suites. All SSL checks are optional. This PR also introduces ccache to speed up compilation. In common cases it speeds up configure and compile time from about 90 seconds to less than 30 seconds. Signed-off-by: Christian Heimes --- .github/workflows/build.yml | 65 ++++++++++++++++++- .github/workflows/posix-deps-apt.sh | 1 + .../2021-04-12-11-14-28.bpo-43811.vGNbnD.rst | 2 + 3 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2021-04-12-11-14-28.bpo-43811.vGNbnD.rst diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 39c349bf6e910b..c6e6ce3085415c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,7 @@ jobs: runs-on: ubuntu-latest outputs: run_tests: ${{ steps.check.outputs.run_tests }} + run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }} steps: - uses: actions/checkout@v2 - name: Check for source changes @@ -30,6 +31,7 @@ jobs: run: | if [ -z "$GITHUB_BASE_REF" ]; then echo '::set-output name=run_tests::true' + echo '::set-output name=run_ssl_tests::true' else git fetch origin $GITHUB_BASE_REF --depth=1 # git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more @@ -46,6 +48,7 @@ jobs: # # https://github.com/python/core-workflow/issues/373 git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true + git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true fi check_generated_files: @@ -138,6 +141,11 @@ jobs: run: echo "::add-matcher::.github/problem-matchers/gcc.json" - name: Install Dependencies run: sudo ./.github/workflows/posix-deps-apt.sh + - name: Configure OpenSSL env vars + run: | + echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV + echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV - name: 'Restore OpenSSL build' id: cache-openssl uses: actions/cache@v2.1.4 @@ -146,12 +154,65 @@ jobs: key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} - name: Install OpenSSL if: steps.cache-openssl.outputs.cache-hit != 'true' - run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux + run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux + - name: Add ccache to PATH + run: | + echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV + - name: Configure ccache action + uses: hendrikmuhs/ccache-action@v1 - name: Configure CPython - run: ./configure --with-pydebug --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER + run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR - name: Build CPython run: make -j4 - name: Display build info run: make pythoninfo - name: Tests run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu" + + build_ubuntu_ssltests: + name: 'Ubuntu SSL tests with OpenSSL ${{ matrix.openssl_ver }}' + runs-on: ubuntu-20.04 + needs: check_source + if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true' + strategy: + fail-fast: false + matrix: + openssl_ver: [1.0.2u, 1.1.0l, 1.1.1k, 3.0.0-alpha14] + env: + OPENSSL_VER: ${{ matrix.openssl_ver }} + MULTISSL_DIR: ${{ github.workspace }}/multissl + OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }} + LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib + steps: + - uses: actions/checkout@v2 + - name: Register gcc problem matcher + run: echo "::add-matcher::.github/problem-matchers/gcc.json" + - name: Install Dependencies + run: sudo ./.github/workflows/posix-deps-apt.sh + - name: Configure OpenSSL env vars + run: | + echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV + echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV + - name: 'Restore OpenSSL build' + id: cache-openssl + uses: actions/cache@v2.1.4 + with: + path: ./multissl/openssl/${{ env.OPENSSL_VER }} + key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }} + - name: Install OpenSSL + if: steps.cache-openssl.outputs.cache-hit != 'true' + run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux + - name: Add ccache to PATH + run: | + echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV + - name: Configure ccache action + uses: hendrikmuhs/ccache-action@v1 + - name: Configure CPython + run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR + - name: Build CPython + run: make -j4 + - name: Display build info + run: make pythoninfo + - name: SSL tests + run: ./python Lib/test/ssltests.py diff --git a/.github/workflows/posix-deps-apt.sh b/.github/workflows/posix-deps-apt.sh index 5c7b9988be4511..56cc70edf60001 100755 --- a/.github/workflows/posix-deps-apt.sh +++ b/.github/workflows/posix-deps-apt.sh @@ -3,6 +3,7 @@ apt-get update apt-get -yq install \ build-essential \ + ccache \ gdb \ lcov \ libbz2-dev \ diff --git a/Misc/NEWS.d/next/Tests/2021-04-12-11-14-28.bpo-43811.vGNbnD.rst b/Misc/NEWS.d/next/Tests/2021-04-12-11-14-28.bpo-43811.vGNbnD.rst new file mode 100644 index 00000000000000..d4c7066013332c --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-04-12-11-14-28.bpo-43811.vGNbnD.rst @@ -0,0 +1,2 @@ +Tests multiple OpenSSL versions on GitHub Actions. Use ccache to speed up +testing. From 695d47b51e3e197de5448a1eb2f618bef6d59ac8 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Wed, 14 Apr 2021 08:22:49 +0900 Subject: [PATCH 041/108] bpo-43785: Update bz2 document (GH-25351) --- Doc/library/bz2.rst | 7 +++++-- Doc/library/lzma.rst | 4 ++-- Doc/whatsnew/3.10.rst | 5 +++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index 637baf49da1fc0..f6787ab120ed57 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -25,8 +25,6 @@ The :mod:`bz2` module contains: * The :func:`compress` and :func:`decompress` functions for one-shot (de)compression. -All of the classes in this module may safely be accessed from multiple threads. - (De)compression of files ------------------------ @@ -140,6 +138,11 @@ All of the classes in this module may safely be accessed from multiple threads. The *compresslevel* parameter became keyword-only. + .. versionchanged:: 3.10 + This class is thread unsafe in the face of multiple simultaneous + readers or writers, just like its equivalent classes in :mod:`gzip` and + :mod:`lzma` have always been. + Incremental (de)compression --------------------------- diff --git a/Doc/library/lzma.rst b/Doc/library/lzma.rst index 633c87873cd8ce..21092645366da7 100644 --- a/Doc/library/lzma.rst +++ b/Doc/library/lzma.rst @@ -19,8 +19,8 @@ interface supporting the ``.xz`` and legacy ``.lzma`` file formats used by the :program:`xz` utility, as well as raw compressed streams. The interface provided by this module is very similar to that of the :mod:`bz2` -module. However, note that :class:`LZMAFile` is *not* thread-safe, unlike -:class:`bz2.BZ2File`, so if you need to use a single :class:`LZMAFile` instance +module. Note that :class:`LZMAFile` and :class:`bz2.BZ2File` are *not* +thread-safe, so if you need to use a single :class:`LZMAFile` instance from multiple threads, it is necessary to protect it with a lock. diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 6af0f834a9d4ce..e0e7d19577e2b2 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -1013,6 +1013,11 @@ Optimizations :func:`map`, :func:`filter`, :func:`reversed`, :func:`bool` and :func:`float`. (Contributed by Dong-hee Na and Jeroen Demeyerin in :issue:`43575`, :issue:`43287`, :issue:`41922`, :issue:`41873` and :issue:`41870`) +* :class:`BZ2File` performance is improved by removing internal ``RLock``. + This makes :class:`BZ2File` thread unsafe in the face of multiple simultaneous + readers or writers, just like its equivalent classes in :mod:`gzip` and + :mod:`lzma` have always been. (Contributed by Inada Naoki in :issue:`43785`). + Deprecated ========== From 11159d2c9d6616497ef4cc62953a5c3cc8454afb Mon Sep 17 00:00:00 2001 From: Lewis Gaul Date: Wed, 14 Apr 2021 00:59:24 +0100 Subject: [PATCH 042/108] bpo-43080: pprint for dataclass instances (GH-24389) * Added pprint support for dataclass instances which don't have a custom __repr__. --- Doc/library/pprint.rst | 3 + Doc/whatsnew/3.10.rst | 6 ++ Lib/pprint.py | 52 +++++++++--- Lib/test/test_pprint.py | 85 ++++++++++++++++++- .../2021-01-31-00-23-13.bpo-43080.-fDg4Q.rst | 1 + 5 files changed, 133 insertions(+), 14 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-01-31-00-23-13.bpo-43080.-fDg4Q.rst diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst index 756c33a7a8668b..f45c66fd9f46fb 100644 --- a/Doc/library/pprint.rst +++ b/Doc/library/pprint.rst @@ -28,6 +28,9 @@ Dictionaries are sorted by key before the display is computed. .. versionchanged:: 3.9 Added support for pretty-printing :class:`types.SimpleNamespace`. +.. versionchanged:: 3.10 + Added support for pretty-printing :class:`dataclasses.dataclass`. + The :mod:`pprint` module defines one class: .. First the implementation class: diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index e0e7d19577e2b2..b1a33eeb5e61d7 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -820,6 +820,12 @@ identification from `freedesktop.org os-release `_ standard file. (Contributed by Christian Heimes in :issue:`28468`) +pprint +------ + +:mod:`pprint` can now pretty-print :class:`dataclasses.dataclass` instances. +(Contributed by Lewis Gaul in :issue:`43080`.) + py_compile ---------- diff --git a/Lib/pprint.py b/Lib/pprint.py index b45cfdd99a8e11..13819f3fef212a 100644 --- a/Lib/pprint.py +++ b/Lib/pprint.py @@ -35,6 +35,7 @@ """ import collections as _collections +import dataclasses as _dataclasses import re import sys as _sys import types as _types @@ -178,8 +179,26 @@ def _format(self, object, stream, indent, allowance, context, level): p(self, object, stream, indent, allowance, context, level + 1) del context[objid] return + elif (_dataclasses.is_dataclass(object) and + not isinstance(object, type) and + object.__dataclass_params__.repr and + # Check dataclass has generated repr method. + hasattr(object.__repr__, "__wrapped__") and + "__create_fn__" in object.__repr__.__wrapped__.__qualname__): + context[objid] = 1 + self._pprint_dataclass(object, stream, indent, allowance, context, level + 1) + del context[objid] + return stream.write(rep) + def _pprint_dataclass(self, object, stream, indent, allowance, context, level): + cls_name = object.__class__.__name__ + indent += len(cls_name) + 1 + items = [(f.name, getattr(object, f.name)) for f in _dataclasses.fields(object) if f.repr] + stream.write(cls_name + '(') + self._format_namespace_items(items, stream, indent, allowance, context, level) + stream.write(')') + _dispatch = {} def _pprint_dict(self, object, stream, indent, allowance, context, level): @@ -346,21 +365,9 @@ def _pprint_simplenamespace(self, object, stream, indent, allowance, context, le else: cls_name = object.__class__.__name__ indent += len(cls_name) + 1 - delimnl = ',\n' + ' ' * indent items = object.__dict__.items() - last_index = len(items) - 1 - stream.write(cls_name + '(') - for i, (key, ent) in enumerate(items): - stream.write(key) - stream.write('=') - - last = i == last_index - self._format(ent, stream, indent + len(key) + 1, - allowance if last else 1, - context, level) - if not last: - stream.write(delimnl) + self._format_namespace_items(items, stream, indent, allowance, context, level) stream.write(')') _dispatch[_types.SimpleNamespace.__repr__] = _pprint_simplenamespace @@ -382,6 +389,25 @@ def _format_dict_items(self, items, stream, indent, allowance, context, if not last: write(delimnl) + def _format_namespace_items(self, items, stream, indent, allowance, context, level): + write = stream.write + delimnl = ',\n' + ' ' * indent + last_index = len(items) - 1 + for i, (key, ent) in enumerate(items): + last = i == last_index + write(key) + write('=') + if id(ent) in context: + # Special-case representation of recursion to match standard + # recursive dataclass repr. + write("...") + else: + self._format(ent, stream, indent + len(key) + 1, + allowance if last else 1, + context, level) + if not last: + write(delimnl) + def _format_items(self, items, stream, indent, allowance, context, level): write = stream.write indent += self._indent_per_level diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py index e5d2ac52d12836..6c714fd39e203a 100644 --- a/Lib/test/test_pprint.py +++ b/Lib/test/test_pprint.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import collections +import dataclasses import io import itertools import pprint @@ -66,6 +67,38 @@ class dict_custom_repr(dict): def __repr__(self): return '*'*len(dict.__repr__(self)) +@dataclasses.dataclass +class dataclass1: + field1: str + field2: int + field3: bool = False + field4: int = dataclasses.field(default=1, repr=False) + +@dataclasses.dataclass +class dataclass2: + a: int = 1 + def __repr__(self): + return "custom repr that doesn't fit within pprint width" + +@dataclasses.dataclass(repr=False) +class dataclass3: + a: int = 1 + +@dataclasses.dataclass +class dataclass4: + a: "dataclass4" + b: int = 1 + +@dataclasses.dataclass +class dataclass5: + a: "dataclass6" + b: int = 1 + +@dataclasses.dataclass +class dataclass6: + c: "dataclass5" + d: int = 1 + class Unorderable: def __repr__(self): return str(id(self)) @@ -428,7 +461,7 @@ def test_simple_namespace(self): lazy=7, dog=8, ) - formatted = pprint.pformat(ns, width=60) + formatted = pprint.pformat(ns, width=60, indent=4) self.assertEqual(formatted, """\ namespace(the=0, quick=1, @@ -465,6 +498,56 @@ class AdvancedNamespace(types.SimpleNamespace): pass lazy=7, dog=8)""") + def test_empty_dataclass(self): + dc = dataclasses.make_dataclass("MyDataclass", ())() + formatted = pprint.pformat(dc) + self.assertEqual(formatted, "MyDataclass()") + + def test_small_dataclass(self): + dc = dataclass1("text", 123) + formatted = pprint.pformat(dc) + self.assertEqual(formatted, "dataclass1(field1='text', field2=123, field3=False)") + + def test_larger_dataclass(self): + dc = dataclass1("some fairly long text", int(1e10), True) + formatted = pprint.pformat([dc, dc], width=60, indent=4) + self.assertEqual(formatted, """\ +[ dataclass1(field1='some fairly long text', + field2=10000000000, + field3=True), + dataclass1(field1='some fairly long text', + field2=10000000000, + field3=True)]""") + + def test_dataclass_with_repr(self): + dc = dataclass2() + formatted = pprint.pformat(dc, width=20) + self.assertEqual(formatted, "custom repr that doesn't fit within pprint width") + + def test_dataclass_no_repr(self): + dc = dataclass3() + formatted = pprint.pformat(dc, width=10) + self.assertRegex(formatted, r"") + + def test_recursive_dataclass(self): + dc = dataclass4(None) + dc.a = dc + formatted = pprint.pformat(dc, width=10) + self.assertEqual(formatted, """\ +dataclass4(a=..., + b=1)""") + + def test_cyclic_dataclass(self): + dc5 = dataclass5(None) + dc6 = dataclass6(None) + dc5.a = dc6 + dc6.c = dc5 + formatted = pprint.pformat(dc5, width=10) + self.assertEqual(formatted, """\ +dataclass5(a=dataclass6(c=..., + d=1), + b=1)""") + def test_subclassing(self): # length(repr(obj)) > width o = {'names with spaces': 'should be presented using repr()', diff --git a/Misc/NEWS.d/next/Library/2021-01-31-00-23-13.bpo-43080.-fDg4Q.rst b/Misc/NEWS.d/next/Library/2021-01-31-00-23-13.bpo-43080.-fDg4Q.rst new file mode 100644 index 00000000000000..aa59b901739b49 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-01-31-00-23-13.bpo-43080.-fDg4Q.rst @@ -0,0 +1 @@ +:mod:`pprint` now has support for :class:`dataclasses.dataclass`. Patch by Lewis Gaul. \ No newline at end of file From 3bc694d5f3d4eb2e5d2f0b83e498b19662845d4e Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 14 Apr 2021 03:24:33 +0200 Subject: [PATCH 043/108] bpo-43680: Deprecate io.OpenWrapper (GH-25357) Deprecate io.OpenWrapper and _pyio.OpenWrapper: use io.open and _pyio.open instead. Until Python 3.9, _pyio.open was not a static method and builtins.open was set to OpenWrapper to not become a bound method when set to a class variable. _io.open is a built-in function whereas _pyio.open is a Python function. In Python 3.10, _pyio.open() is now a static method, and builtins.open() is now io.open(). --- Lib/_pyio.py | 26 ++++++++++--------- Lib/io.py | 17 +++++++++++- Lib/test/test_io.py | 10 +++++-- .../2021-04-12-11-20-34.bpo-43680.SR0Epv.rst | 6 +++++ 4 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-12-11-20-34.bpo-43680.SR0Epv.rst diff --git a/Lib/_pyio.py b/Lib/_pyio.py index cb5a619f02a48c..56e9a0cb33c5fd 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -311,18 +311,20 @@ def _open_code_with_warning(path): open_code = _open_code_with_warning -class DocDescriptor: - """Helper for builtins.open.__doc__ - """ - def __get__(self, obj, typ=None): - return ( - "open(file, mode='r', buffering=-1, encoding=None, " - "errors=None, newline=None, closefd=True)\n\n" + - open.__doc__) - - -# bpo-43680: Alias to open() kept for backward compatibility -OpenWrapper = open +def __getattr__(name): + if name == "OpenWrapper": + # bpo-43680: Until Python 3.9, _pyio.open was not a static method and + # builtins.open was set to OpenWrapper to not become a bound method + # when set to a class variable. _io.open is a built-in function whereas + # _pyio.open is a Python function. In Python 3.10, _pyio.open() is now + # a static method, and builtins.open() is now io.open(). + import warnings + warnings.warn('OpenWrapper is deprecated, use open instead', + DeprecationWarning, stacklevel=2) + global OpenWrapper + OpenWrapper = open + return OpenWrapper + raise AttributeError(name) # In normal operation, both `UnsupportedOperation`s should be bound to the diff --git a/Lib/io.py b/Lib/io.py index 01f1df80ded297..2a6140c3dd5094 100644 --- a/Lib/io.py +++ b/Lib/io.py @@ -56,7 +56,22 @@ BufferedWriter, BufferedRWPair, BufferedRandom, IncrementalNewlineDecoder, text_encoding, TextIOWrapper) -OpenWrapper = _io.open # for compatibility with _pyio + +def __getattr__(name): + if name == "OpenWrapper": + # bpo-43680: Until Python 3.9, _pyio.open was not a static method and + # builtins.open was set to OpenWrapper to not become a bound method + # when set to a class variable. _io.open is a built-in function whereas + # _pyio.open is a Python function. In Python 3.10, _pyio.open() is now + # a static method, and builtins.open() is now io.open(). + import warnings + warnings.warn('OpenWrapper is deprecated, use open instead', + DeprecationWarning, stacklevel=2) + global OpenWrapper + OpenWrapper = open + return OpenWrapper + raise AttributeError(name) + # Pretend this exception was created here. UnsupportedOperation.__module__ = "io" diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 48a3cca3fbde4f..32c29ea5dc4a76 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -4283,6 +4283,14 @@ def test_check_encoding_warning(self): self.assertTrue( warnings[1].startswith(b":8: EncodingWarning: ")) + @support.cpython_only + # Depending if OpenWrapper was already created or not, the warning is + # emitted or not. For example, the attribute is already created when this + # test is run multiple times. + @warnings_helper.ignore_warnings(category=DeprecationWarning) + def test_openwrapper(self): + self.assertIs(self.io.OpenWrapper, self.io.open) + class CMiscIOTest(MiscIOTest): io = io @@ -4598,8 +4606,6 @@ def load_tests(*args): globs = globals() c_io_ns.update((x.__name__, globs["C" + x.__name__]) for x in mocks) py_io_ns.update((x.__name__, globs["Py" + x.__name__]) for x in mocks) - # Avoid turning open into a bound method. - py_io_ns["open"] = pyio.OpenWrapper for test in tests: if test.__name__.startswith("C"): for name, obj in c_io_ns.items(): diff --git a/Misc/NEWS.d/next/Library/2021-04-12-11-20-34.bpo-43680.SR0Epv.rst b/Misc/NEWS.d/next/Library/2021-04-12-11-20-34.bpo-43680.SR0Epv.rst new file mode 100644 index 00000000000000..e4ddb96491b571 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-12-11-20-34.bpo-43680.SR0Epv.rst @@ -0,0 +1,6 @@ +Deprecate io.OpenWrapper and _pyio.OpenWrapper: use io.open and _pyio.open +instead. Until Python 3.9, _pyio.open was not a static method and +builtins.open was set to OpenWrapper to not become a bound method when set +to a class variable. _io.open is a built-in function whereas _pyio.open is a +Python function. In Python 3.10, _pyio.open() is now a static method, and +builtins.open() is now io.open(). From 37494b441aced0362d7edd2956ab3ea7801e60c8 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 14 Apr 2021 02:36:07 +0100 Subject: [PATCH 044/108] bpo-38530: Offer suggestions on AttributeError (#16856) When printing AttributeError, PyErr_Display will offer suggestions of similar attribute names in the object that the exception was raised from: >>> collections.namedtoplo Traceback (most recent call last): File "", line 1, in AttributeError: module 'collections' has no attribute 'namedtoplo'. Did you mean: namedtuple? --- Doc/library/exceptions.rst | 7 + Doc/whatsnew/3.10.rst | 24 ++- Include/cpython/pyerrors.h | 6 + Include/internal/pycore_pyerrors.h | 2 + Lib/test/test_exceptions.py | 159 ++++++++++++++++++ Makefile.pre.in | 1 + .../2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst | 3 + Objects/exceptions.c | 71 +++++++- Objects/object.c | 53 ++++-- PCbuild/pythoncore.vcxproj | 1 + Python/pythonrun.c | 12 +- Python/suggestions.c | 146 ++++++++++++++++ 12 files changed, 470 insertions(+), 15 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst create mode 100644 Python/suggestions.c diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 4dea6701a6bfd0..8fdd6ebecfa69e 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -149,6 +149,13 @@ The following exceptions are the exceptions that are usually raised. assignment fails. (When an object does not support attribute references or attribute assignments at all, :exc:`TypeError` is raised.) + The :attr:`name` and :attr:`obj` attributes can be set using keyword-only + arguments to the constructor. When set they represent the name of the attribute + that was attempted to be accessed and the object that was accessed for said + attribute, respectively. + + .. versionchanged:: 3.10 + Added the :attr:`name` and :attr:`obj` attributes. .. exception:: EOFError diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index b1a33eeb5e61d7..b6e954c3cfc40e 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -125,8 +125,11 @@ Check :pep:`617` for more details. in :issue:`12782` and :issue:`40334`.) -Better error messages in the parser ------------------------------------ +Better error messages +--------------------- + +SyntaxErrors +~~~~~~~~~~~~ When parsing code that contains unclosed parentheses or brackets the interpreter now includes the location of the unclosed bracket of parentheses instead of displaying @@ -167,6 +170,23 @@ These improvements are inspired by previous work in the PyPy interpreter. (Contributed by Pablo Galindo in :issue:`42864` and Batuhan Taskaya in :issue:`40176`.) + +AttributeErrors +~~~~~~~~~~~~~~~ + +When printing :exc:`AttributeError`, :c:func:`PyErr_Display` will offer +suggestions of simmilar attribute names in the object that the exception was +raised from: + +.. code-block:: python + + >>> collections.namedtoplo + Traceback (most recent call last): + File "", line 1, in + AttributeError: module 'collections' has no attribute 'namedtoplo'. Did you mean: namedtuple? + +(Contributed by Pablo Galindo in :issue:`38530`.) + PEP 626: Precise line numbers for debugging and other tools ----------------------------------------------------------- diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h index 6711e8be68ffeb..a15082e693cb90 100644 --- a/Include/cpython/pyerrors.h +++ b/Include/cpython/pyerrors.h @@ -62,6 +62,12 @@ typedef struct { PyObject *value; } PyStopIterationObject; +typedef struct { + PyException_HEAD + PyObject *obj; + PyObject *name; +} PyAttributeErrorObject; + /* Compatibility typedefs */ typedef PyOSErrorObject PyEnvironmentErrorObject; #ifdef MS_WINDOWS diff --git a/Include/internal/pycore_pyerrors.h b/Include/internal/pycore_pyerrors.h index 9dd66aec9c3d78..d1af8e91b3b908 100644 --- a/Include/internal/pycore_pyerrors.h +++ b/Include/internal/pycore_pyerrors.h @@ -86,6 +86,8 @@ PyAPI_FUNC(int) _PyErr_CheckSignalsTstate(PyThreadState *tstate); PyAPI_FUNC(void) _Py_DumpExtensionModules(int fd, PyInterpreterState *interp); +extern PyObject* _Py_Offer_Suggestions(PyObject* exception); + #ifdef __cplusplus } #endif diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 9dc3a81ffedbd6..e1a5ec76d78ad3 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1414,6 +1414,165 @@ class TestException(MemoryError): gc_collect() +class AttributeErrorTests(unittest.TestCase): + def test_attributes(self): + # Setting 'attr' should not be a problem. + exc = AttributeError('Ouch!') + self.assertIsNone(exc.name) + self.assertIsNone(exc.obj) + + sentinel = object() + exc = AttributeError('Ouch', name='carry', obj=sentinel) + self.assertEqual(exc.name, 'carry') + self.assertIs(exc.obj, sentinel) + + def test_getattr_has_name_and_obj(self): + class A: + blech = None + + obj = A() + try: + obj.bluch + except AttributeError as exc: + self.assertEqual("bluch", exc.name) + self.assertEqual(obj, exc.obj) + + def test_getattr_has_name_and_obj_for_method(self): + class A: + def blech(self): + return + + obj = A() + try: + obj.bluch() + except AttributeError as exc: + self.assertEqual("bluch", exc.name) + self.assertEqual(obj, exc.obj) + + def test_getattr_suggestions(self): + class Substitution: + noise = more_noise = a = bc = None + blech = None + + class Elimination: + noise = more_noise = a = bc = None + blch = None + + class Addition: + noise = more_noise = a = bc = None + bluchin = None + + class SubstitutionOverElimination: + blach = None + bluc = None + + class SubstitutionOverAddition: + blach = None + bluchi = None + + class EliminationOverAddition: + blucha = None + bluc = None + + for cls, suggestion in [(Substitution, "blech?"), + (Elimination, "blch?"), + (Addition, "bluchin?"), + (EliminationOverAddition, "bluc?"), + (SubstitutionOverElimination, "blach?"), + (SubstitutionOverAddition, "blach?")]: + try: + cls().bluch + except AttributeError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertIn(suggestion, err.getvalue()) + + def test_getattr_suggestions_do_not_trigger_for_long_attributes(self): + class A: + blech = None + + try: + A().somethingverywrong + except AttributeError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("blech", err.getvalue()) + + def test_getattr_suggestions_do_not_trigger_for_big_dicts(self): + class A: + blech = None + # A class with a very big __dict__ will not be consider + # for suggestions. + for index in range(101): + setattr(A, f"index_{index}", None) + + try: + A().bluch + except AttributeError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("blech", err.getvalue()) + + def test_getattr_suggestions_no_args(self): + class A: + blech = None + def __getattr__(self, attr): + raise AttributeError() + + try: + A().bluch + except AttributeError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertIn("blech", err.getvalue()) + + class A: + blech = None + def __getattr__(self, attr): + raise AttributeError + + try: + A().bluch + except AttributeError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertIn("blech", err.getvalue()) + + def test_getattr_suggestions_invalid_args(self): + class NonStringifyClass: + __str__ = None + __repr__ = None + + class A: + blech = None + def __getattr__(self, attr): + raise AttributeError(NonStringifyClass()) + + class B: + blech = None + def __getattr__(self, attr): + raise AttributeError("Error", 23) + + class C: + blech = None + def __getattr__(self, attr): + raise AttributeError(23) + + for cls in [A, B, C]: + try: + cls().bluch + except AttributeError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertIn("blech", err.getvalue()) + + class ImportErrorTests(unittest.TestCase): def test_attributes(self): diff --git a/Makefile.pre.in b/Makefile.pre.in index 365449d644583f..eccc72697704b8 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -387,6 +387,7 @@ PYTHON_OBJS= \ Python/dtoa.o \ Python/formatter_unicode.o \ Python/fileutils.o \ + Python/suggestions.o \ Python/$(DYNLOADFILE) \ $(LIBOBJS) \ $(MACHDEP_OBJS) \ diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst b/Misc/NEWS.d/next/Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst new file mode 100644 index 00000000000000..09c73eae77def5 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst @@ -0,0 +1,3 @@ +When printing :exc:`AttributeError`, :c:func:`PyErr_Display` will offer +suggestions of simmilar attribute names in the object that the exception was +raised from. Patch by Pablo Galindo diff --git a/Objects/exceptions.c b/Objects/exceptions.c index dfa069e01d9607..4bb415331161fa 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -1338,9 +1338,76 @@ SimpleExtendsException(PyExc_NameError, UnboundLocalError, /* * AttributeError extends Exception */ -SimpleExtendsException(PyExc_Exception, AttributeError, - "Attribute not found."); +static int +AttributeError_init(PyAttributeErrorObject *self, PyObject *args, PyObject *kwds) +{ + static char *kwlist[] = {"name", "obj", NULL}; + PyObject *name = NULL; + PyObject *obj = NULL; + + if (BaseException_init((PyBaseExceptionObject *)self, args, NULL) == -1) { + return -1; + } + + PyObject *empty_tuple = PyTuple_New(0); + if (!empty_tuple) { + return -1; + } + if (!PyArg_ParseTupleAndKeywords(empty_tuple, kwds, "|$OO:AttributeError", kwlist, + &name, &obj)) { + Py_DECREF(empty_tuple); + return -1; + } + Py_DECREF(empty_tuple); + + Py_XINCREF(name); + Py_XSETREF(self->name, name); + + Py_XINCREF(obj); + Py_XSETREF(self->obj, obj); + + return 0; +} + +static int +AttributeError_clear(PyAttributeErrorObject *self) +{ + Py_CLEAR(self->obj); + Py_CLEAR(self->name); + return BaseException_clear((PyBaseExceptionObject *)self); +} + +static void +AttributeError_dealloc(PyAttributeErrorObject *self) +{ + _PyObject_GC_UNTRACK(self); + AttributeError_clear(self); + Py_TYPE(self)->tp_free((PyObject *)self); +} + +static int +AttributeError_traverse(PyAttributeErrorObject *self, visitproc visit, void *arg) +{ + Py_VISIT(self->obj); + Py_VISIT(self->name); + return BaseException_traverse((PyBaseExceptionObject *)self, visit, arg); +} + +static PyMemberDef AttributeError_members[] = { + {"name", T_OBJECT, offsetof(PyAttributeErrorObject, name), 0, PyDoc_STR("attribute name")}, + {"obj", T_OBJECT, offsetof(PyAttributeErrorObject, obj), 0, PyDoc_STR("object")}, + {NULL} /* Sentinel */ +}; + +static PyMethodDef AttributeError_methods[] = { + {NULL} /* Sentinel */ +}; + +ComplexExtendsException(PyExc_Exception, AttributeError, + AttributeError, 0, + AttributeError_methods, AttributeError_members, + 0, BaseException_str, "Attribute not found."); /* * SyntaxError extends Exception diff --git a/Objects/object.c b/Objects/object.c index 4b678403c07616..854cc85b1cfa46 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -884,29 +884,60 @@ _PyObject_SetAttrId(PyObject *v, _Py_Identifier *name, PyObject *w) return result; } +static inline int +set_attribute_error_context(PyObject* v, PyObject* name) +{ + assert(PyErr_Occurred()); + _Py_IDENTIFIER(name); + _Py_IDENTIFIER(obj); + // Intercept AttributeError exceptions and augment them to offer + // suggestions later. + if (PyErr_ExceptionMatches(PyExc_AttributeError)){ + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + PyErr_NormalizeException(&type, &value, &traceback); + if (PyErr_GivenExceptionMatches(value, PyExc_AttributeError) && + (_PyObject_SetAttrId(value, &PyId_name, name) || + _PyObject_SetAttrId(value, &PyId_obj, v))) { + return 1; + } + PyErr_Restore(type, value, traceback); + } + return 0; +} + PyObject * PyObject_GetAttr(PyObject *v, PyObject *name) { PyTypeObject *tp = Py_TYPE(v); - if (!PyUnicode_Check(name)) { PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", Py_TYPE(name)->tp_name); return NULL; } - if (tp->tp_getattro != NULL) - return (*tp->tp_getattro)(v, name); - if (tp->tp_getattr != NULL) { + + PyObject* result = NULL; + if (tp->tp_getattro != NULL) { + result = (*tp->tp_getattro)(v, name); + } + else if (tp->tp_getattr != NULL) { const char *name_str = PyUnicode_AsUTF8(name); - if (name_str == NULL) + if (name_str == NULL) { return NULL; - return (*tp->tp_getattr)(v, (char *)name_str); + } + result = (*tp->tp_getattr)(v, (char *)name_str); } - PyErr_Format(PyExc_AttributeError, - "'%.50s' object has no attribute '%U'", - tp->tp_name, name); - return NULL; + else { + PyErr_Format(PyExc_AttributeError, + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); + } + + if (result == NULL) { + set_attribute_error_context(v, name); + } + return result; } int @@ -1165,6 +1196,8 @@ _PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) PyErr_Format(PyExc_AttributeError, "'%.50s' object has no attribute '%U'", tp->tp_name, name); + + set_attribute_error_context(obj, name); return 0; } diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 2c1cc0d4cc80f7..3c4785c077e6a1 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -485,6 +485,7 @@ + diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 99be6295b48a7c..321b04eb724ed4 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -15,7 +15,7 @@ #include "pycore_interp.h" // PyInterpreterState.importlib #include "pycore_object.h" // _PyDebug_PrintTotalRefs() #include "pycore_parser.h" // _PyParser_ASTFromString() -#include "pycore_pyerrors.h" // _PyErr_Fetch +#include "pycore_pyerrors.h" // _PyErr_Fetch, _Py_Offer_Suggestions #include "pycore_pylifecycle.h" // _Py_UnhandledKeyboardInterrupt #include "pycore_pystate.h" // _PyInterpreterState_GET() #include "pycore_sysmodule.h" // _PySys_Audit() @@ -953,6 +953,16 @@ print_exception(PyObject *f, PyObject *value) if (err < 0) { PyErr_Clear(); } + PyObject* suggestions = _Py_Offer_Suggestions(value); + if (suggestions) { + // Add a trailer ". Did you mean: (...)?" + err = PyFile_WriteString(". Did you mean: ", f); + if (err == 0) { + err = PyFile_WriteObject(suggestions, f, Py_PRINT_RAW); + err += PyFile_WriteString("?", f); + } + Py_DECREF(suggestions); + } err += PyFile_WriteString("\n", f); Py_XDECREF(tb); Py_DECREF(value); diff --git a/Python/suggestions.c b/Python/suggestions.c new file mode 100644 index 00000000000000..2c0858d558d00c --- /dev/null +++ b/Python/suggestions.c @@ -0,0 +1,146 @@ +#include "Python.h" + +#include "pycore_pyerrors.h" + +#define MAX_DISTANCE 3 +#define MAX_CANDIDATE_ITEMS 100 +#define MAX_STRING_SIZE 20 + +/* Calculate the Levenshtein distance between string1 and string2 */ +static size_t +levenshtein_distance(const char *a, const char *b) { + if (a == NULL || b == NULL) { + return 0; + } + + const size_t a_size = strlen(a); + const size_t b_size = strlen(b); + + if (a_size > MAX_STRING_SIZE || b_size > MAX_STRING_SIZE) { + return 0; + } + + // Both strings are the same (by identity) + if (a == b) { + return 0; + } + + // The first string is empty + if (a_size == 0) { + return b_size; + } + + // The second string is empty + if (b_size == 0) { + return a_size; + } + + size_t *buffer = PyMem_Calloc(a_size, sizeof(size_t)); + if (buffer == NULL) { + return 0; + } + + // Initialize the buffer row + size_t index = 0; + while (index < a_size) { + buffer[index] = index + 1; + index++; + } + + size_t b_index = 0; + size_t result = 0; + while (b_index < b_size) { + char code = b[b_index]; + size_t distance = result = b_index++; + index = SIZE_MAX; + while (++index < a_size) { + size_t b_distance = code == a[index] ? distance : distance + 1; + distance = buffer[index]; + if (distance > result) { + if (b_distance > result) { + result = result + 1; + } else { + result = b_distance; + } + } else { + if (b_distance > distance) { + result = distance + 1; + } else { + result = b_distance; + } + } + buffer[index] = result; + } + } + PyMem_Free(buffer); + return result; +} + +static inline PyObject * +calculate_suggestions(PyObject *dir, + PyObject *name) { + assert(!PyErr_Occurred()); + assert(PyList_CheckExact(dir)); + + Py_ssize_t dir_size = PyList_GET_SIZE(dir); + if (dir_size >= MAX_CANDIDATE_ITEMS) { + return NULL; + } + + Py_ssize_t suggestion_distance = PyUnicode_GetLength(name); + PyObject *suggestion = NULL; + for (int i = 0; i < dir_size; ++i) { + PyObject *item = PyList_GET_ITEM(dir, i); + const char *name_str = PyUnicode_AsUTF8(name); + if (name_str == NULL) { + PyErr_Clear(); + continue; + } + Py_ssize_t current_distance = levenshtein_distance(PyUnicode_AsUTF8(name), PyUnicode_AsUTF8(item)); + if (current_distance == 0 || current_distance > MAX_DISTANCE) { + continue; + } + if (!suggestion || current_distance < suggestion_distance) { + suggestion = item; + suggestion_distance = current_distance; + } + } + if (!suggestion) { + return NULL; + } + Py_INCREF(suggestion); + return suggestion; +} + +static PyObject * +offer_suggestions_for_attribute_error(PyAttributeErrorObject *exc) { + PyObject *name = exc->name; // borrowed reference + PyObject *obj = exc->obj; // borrowed reference + + // Abort if we don't have an attribute name or we have an invalid one + if (name == NULL || obj == NULL || !PyUnicode_CheckExact(name)) { + return NULL; + } + + PyObject *dir = PyObject_Dir(obj); + if (dir == NULL) { + return NULL; + } + + PyObject *suggestions = calculate_suggestions(dir, name); + Py_DECREF(dir); + return suggestions; +} + +// Offer suggestions for a given exception. Returns a python string object containing the +// suggestions. This function does not raise exceptions and returns NULL if no suggestion was found. +PyObject *_Py_Offer_Suggestions(PyObject *exception) { + PyObject *result = NULL; + assert(!PyErr_Occurred()); // Check that we are not going to clean any existing exception + if (PyErr_GivenExceptionMatches(exception, PyExc_AttributeError)) { + result = offer_suggestions_for_attribute_error((PyAttributeErrorObject *) exception); + } + assert(!PyErr_Occurred()); + return result; +} + From 133705b85cc25d1e6684d32f8943ca288fadfda0 Mon Sep 17 00:00:00 2001 From: Bob Kline Date: Wed, 14 Apr 2021 01:09:32 -0400 Subject: [PATCH 045/108] bpo-43777: Drop description of "pip search" command from tutorial (GH-25287) --- Doc/tutorial/venv.rst | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/Doc/tutorial/venv.rst b/Doc/tutorial/venv.rst index c4ae6b6e9931fe..221c11ca74b4ef 100644 --- a/Doc/tutorial/venv.rst +++ b/Doc/tutorial/venv.rst @@ -95,20 +95,9 @@ Managing Packages with pip You can install, upgrade, and remove packages using a program called :program:`pip`. By default ``pip`` will install packages from the Python Package Index, . You can browse the Python -Package Index by going to it in your web browser, or you can use ``pip``'s -limited search feature: +Package Index by going to it in your web browser. -.. code-block:: bash - - (tutorial-env) $ pip search astronomy - skyfield - Elegant astronomy for Python - gary - Galactic astronomy and gravitational dynamics. - novas - The United States Naval Observatory NOVAS astronomy library - astroobs - Provides astronomy ephemeris to plan telescope observations - PyAstronomy - A collection of astronomy related tools for Python. - ... - -``pip`` has a number of subcommands: "search", "install", "uninstall", +``pip`` has a number of subcommands: "install", "uninstall", "freeze", etc. (Consult the :ref:`installing-index` guide for complete documentation for ``pip``.) From 333d10cbb53dd5f28d76f659a49bf0735f8509d8 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Wed, 14 Apr 2021 14:12:58 +0900 Subject: [PATCH 046/108] bpo-43712 : fileinput: Add encoding parameter (GH-25272) --- Doc/library/fileinput.rst | 35 ++++++++--- Doc/whatsnew/3.10.rst | 11 ++++ Lib/fileinput.py | 58 +++++++++++++------ Lib/test/test_fileinput.py | 50 ++++++++++++---- Misc/ACKS | 1 + .../2021-04-08-12-25-08.bpo-43712.f8WXCX.rst | 2 + 6 files changed, 119 insertions(+), 38 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-08-12-25-08.bpo-43712.f8WXCX.rst diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index cc4039a30e38ae..819640045cadf7 100644 --- a/Doc/library/fileinput.rst +++ b/Doc/library/fileinput.rst @@ -18,7 +18,7 @@ write one file see :func:`open`. The typical use is:: import fileinput - for line in fileinput.input(): + for line in fileinput.input(encoding="utf-8"): process(line) This iterates over the lines of all files listed in ``sys.argv[1:]``, defaulting @@ -49,13 +49,14 @@ a file may not have one. You can control how files are opened by providing an opening hook via the *openhook* parameter to :func:`fileinput.input` or :class:`FileInput()`. The hook must be a function that takes two arguments, *filename* and *mode*, and -returns an accordingly opened file-like object. Two useful hooks are already -provided by this module. +returns an accordingly opened file-like object. If *encoding* and/or *errors* +are specified, they will be passed to the hook as aditional keyword arguments. +This module provides a :func:`hook_encoded` to support compressed files. The following function is the primary interface of this module: -.. function:: input(files=None, inplace=False, backup='', *, mode='r', openhook=None) +.. function:: input(files=None, inplace=False, backup='', *, mode='r', openhook=None, encoding=None, errors=None) Create an instance of the :class:`FileInput` class. The instance will be used as global state for the functions of this module, and is also returned to use @@ -66,7 +67,7 @@ The following function is the primary interface of this module: :keyword:`with` statement. In this example, *input* is closed after the :keyword:`!with` statement is exited, even if an exception occurs:: - with fileinput.input(files=('spam.txt', 'eggs.txt')) as f: + with fileinput.input(files=('spam.txt', 'eggs.txt'), encoding="utf-8") as f: for line in f: process(line) @@ -76,6 +77,9 @@ The following function is the primary interface of this module: .. versionchanged:: 3.8 The keyword parameters *mode* and *openhook* are now keyword-only. + .. versionchanged:: 3.10 + The keyword-only parameter *encoding* and *errors* are added. + The following functions use the global state created by :func:`fileinput.input`; if there is no active state, :exc:`RuntimeError` is raised. @@ -137,7 +141,7 @@ The class which implements the sequence behavior provided by the module is available for subclassing as well: -.. class:: FileInput(files=None, inplace=False, backup='', *, mode='r', openhook=None) +.. class:: FileInput(files=None, inplace=False, backup='', *, mode='r', openhook=None, encoding=None, errors=None) Class :class:`FileInput` is the implementation; its methods :meth:`filename`, :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:`isfirstline`, @@ -155,6 +159,8 @@ available for subclassing as well: *filename* and *mode*, and returns an accordingly opened file-like object. You cannot use *inplace* and *openhook* together. + You can specify *encoding* and *errors* that is passed to :func:`open` or *openhook*. + A :class:`FileInput` instance can be used as a context manager in the :keyword:`with` statement. In this example, *input* is closed after the :keyword:`!with` statement is exited, even if an exception occurs:: @@ -162,7 +168,6 @@ available for subclassing as well: with FileInput(files=('spam.txt', 'eggs.txt')) as input: process(input) - .. versionchanged:: 3.2 Can be used as a context manager. @@ -175,6 +180,8 @@ available for subclassing as well: .. versionchanged:: 3.8 The keyword parameter *mode* and *openhook* are now keyword-only. + .. versionchanged:: 3.10 + The keyword-only parameter *encoding* and *errors* are added. **Optional in-place filtering:** if the keyword argument ``inplace=True`` is @@ -191,14 +198,20 @@ when standard input is read. The two following opening hooks are provided by this module: -.. function:: hook_compressed(filename, mode) +.. function:: hook_compressed(filename, mode, *, encoding=None, errors=None) Transparently opens files compressed with gzip and bzip2 (recognized by the extensions ``'.gz'`` and ``'.bz2'``) using the :mod:`gzip` and :mod:`bz2` modules. If the filename extension is not ``'.gz'`` or ``'.bz2'``, the file is opened normally (ie, using :func:`open` without any decompression). - Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed)`` + The *encoding* and *errors* values are passed to to :class:`io.TextIOWrapper` + for compressed files and open for normal files. + + Usage example: ``fi = fileinput.FileInput(openhook=fileinput.hook_compressed, encoding="utf-8")`` + + .. versionchanged:: 3.10 + The keyword-only parameter *encoding* and *errors* are added. .. function:: hook_encoded(encoding, errors=None) @@ -212,3 +225,7 @@ The two following opening hooks are provided by this module: .. versionchanged:: 3.6 Added the optional *errors* parameter. + + .. deprecated:: 3.10 + This function is deprecated since :func:`input` and :class:`FileInput` + now have *encoding* and *errors* parameters. diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index b6e954c3cfc40e..21f912871d47a7 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -760,6 +760,17 @@ enum module constants have a :func:`repr` of ``module_name.member_name``. (Contributed by Ethan Furman in :issue:`40066`.) +fileinput +--------- + +Added *encoding* and *errors* parameters in :func:`fileinput.input` and +:class:`fileinput.FileInput`. +(Contributed by Inada Naoki in :issue:`43712`.) + +:func:`fileinput.hook_compressed` now returns :class:`TextIOWrapper` object +when *mode* is "r" and file is compressed, like uncompressed files. +(Contributed by Inada Naoki in :issue:`5758`.) + gc -- diff --git a/Lib/fileinput.py b/Lib/fileinput.py index 0c31f93ed8f2e7..6218c4f4e2fdf7 100644 --- a/Lib/fileinput.py +++ b/Lib/fileinput.py @@ -3,7 +3,7 @@ Typical use is: import fileinput - for line in fileinput.input(): + for line in fileinput.input(encoding="utf-8"): process(line) This iterates over the lines of all files listed in sys.argv[1:], @@ -63,15 +63,9 @@ deleted when the output file is closed. In-place filtering is disabled when standard input is read. XXX The current implementation does not work for MS-DOS 8+3 filesystems. - -XXX Possible additions: - -- optional getopt argument processing -- isatty() -- read(), read(size), even readlines() - """ +import io import sys, os from types import GenericAlias @@ -81,7 +75,8 @@ _state = None -def input(files=None, inplace=False, backup="", *, mode="r", openhook=None): +def input(files=None, inplace=False, backup="", *, mode="r", openhook=None, + encoding=None, errors=None): """Return an instance of the FileInput class, which can be iterated. The parameters are passed to the constructor of the FileInput class. @@ -91,7 +86,8 @@ def input(files=None, inplace=False, backup="", *, mode="r", openhook=None): global _state if _state and _state._file: raise RuntimeError("input() already active") - _state = FileInput(files, inplace, backup, mode=mode, openhook=openhook) + _state = FileInput(files, inplace, backup, mode=mode, openhook=openhook, + encoding=encoding, errors=errors) return _state def close(): @@ -186,7 +182,7 @@ class FileInput: """ def __init__(self, files=None, inplace=False, backup="", *, - mode="r", openhook=None): + mode="r", openhook=None, encoding=None, errors=None): if isinstance(files, str): files = (files,) elif isinstance(files, os.PathLike): @@ -209,6 +205,16 @@ def __init__(self, files=None, inplace=False, backup="", *, self._file = None self._isstdin = False self._backupfilename = None + self._encoding = encoding + self._errors = errors + + # We can not use io.text_encoding() here because old openhook doesn't + # take encoding parameter. + if "b" not in mode and encoding is None and sys.flags.warn_default_encoding: + import warnings + warnings.warn("'encoding' argument not specified.", + EncodingWarning, 2) + # restrict mode argument to reading modes if mode not in ('r', 'rU', 'U', 'rb'): raise ValueError("FileInput opening mode must be one of " @@ -362,9 +368,20 @@ def _readline(self): else: # This may raise OSError if self._openhook: - self._file = self._openhook(self._filename, self._mode) + # Custom hooks made previous to Python 3.10 didn't have + # encoding argument + if self._encoding is None: + self._file = self._openhook(self._filename, self._mode) + else: + self._file = self._openhook( + self._filename, self._mode, encoding=self._encoding, errors=self._errors) else: - self._file = open(self._filename, self._mode) + # EncodingWarning is emitted in __init__() already + if "b" not in self._mode: + encoding = self._encoding or "locale" + else: + encoding = None + self._file = open(self._filename, self._mode, encoding=encoding, errors=self._errors) self._readline = self._file.readline # hide FileInput._readline return self._readline() @@ -395,16 +412,23 @@ def isstdin(self): __class_getitem__ = classmethod(GenericAlias) -def hook_compressed(filename, mode): +def hook_compressed(filename, mode, *, encoding=None, errors=None): + if encoding is None: # EncodingWarning is emitted in FileInput() already. + encoding = "locale" ext = os.path.splitext(filename)[1] if ext == '.gz': import gzip - return gzip.open(filename, mode) + stream = gzip.open(filename, mode) elif ext == '.bz2': import bz2 - return bz2.BZ2File(filename, mode) + stream = bz2.BZ2File(filename, mode) else: - return open(filename, mode) + return open(filename, mode, encoding=encoding, errors=errors) + + # gzip and bz2 are binary mode by default. + if "b" not in mode: + stream = io.TextIOWrapper(stream, encoding=encoding, errors=errors) + return stream def hook_encoded(encoding, errors=None): diff --git a/Lib/test/test_fileinput.py b/Lib/test/test_fileinput.py index d5edf74938548e..d01d39627219e9 100644 --- a/Lib/test/test_fileinput.py +++ b/Lib/test/test_fileinput.py @@ -2,6 +2,7 @@ Tests for fileinput module. Nick Mathewson ''' +import io import os import sys import re @@ -238,7 +239,7 @@ def test_opening_mode(self): # try opening in universal newline mode t1 = self.writeTmp(b"A\nB\r\nC\rD", mode="wb") with warnings_helper.check_warnings(('', DeprecationWarning)): - fi = FileInput(files=t1, mode="U") + fi = FileInput(files=t1, mode="U", encoding="utf-8") with warnings_helper.check_warnings(('', DeprecationWarning)): lines = list(fi) self.assertEqual(lines, ["A\n", "B\n", "C\n", "D"]) @@ -278,7 +279,7 @@ def test_file_opening_hook(self): class CustomOpenHook: def __init__(self): self.invoked = False - def __call__(self, *args): + def __call__(self, *args, **kargs): self.invoked = True return open(*args) @@ -334,6 +335,14 @@ def test_inplace_binary_write_mode(self): with open(temp_file, 'rb') as f: self.assertEqual(f.read(), b'New line.') + def test_file_hook_backward_compatibility(self): + def old_hook(filename, mode): + return io.StringIO("I used to receive only filename and mode") + t = self.writeTmp("\n") + with FileInput([t], openhook=old_hook) as fi: + result = fi.readline() + self.assertEqual(result, "I used to receive only filename and mode") + def test_context_manager(self): t1 = self.writeTmp("A\nB\nC") t2 = self.writeTmp("D\nE\nF") @@ -529,12 +538,14 @@ class MockFileInput: """A class that mocks out fileinput.FileInput for use during unit tests""" def __init__(self, files=None, inplace=False, backup="", *, - mode="r", openhook=None): + mode="r", openhook=None, encoding=None, errors=None): self.files = files self.inplace = inplace self.backup = backup self.mode = mode self.openhook = openhook + self.encoding = encoding + self.errors = errors self._file = None self.invocation_counts = collections.defaultdict(lambda: 0) self.return_values = {} @@ -637,10 +648,11 @@ def do_test_call_input(self): backup = object() mode = object() openhook = object() + encoding = object() # call fileinput.input() with different values for each argument result = fileinput.input(files=files, inplace=inplace, backup=backup, - mode=mode, openhook=openhook) + mode=mode, openhook=openhook, encoding=encoding) # ensure fileinput._state was set to the returned object self.assertIs(result, fileinput._state, "fileinput._state") @@ -863,11 +875,15 @@ def test_state_is_not_None(self): self.assertIs(fileinput._state, instance) class InvocationRecorder: + def __init__(self): self.invocation_count = 0 + def __call__(self, *args, **kwargs): self.invocation_count += 1 self.last_invocation = (args, kwargs) + return io.BytesIO(b'some bytes') + class Test_hook_compressed(unittest.TestCase): """Unit tests for fileinput.hook_compressed()""" @@ -886,33 +902,43 @@ def test_gz_ext_fake(self): original_open = gzip.open gzip.open = self.fake_open try: - result = fileinput.hook_compressed("test.gz", 3) + result = fileinput.hook_compressed("test.gz", "3") finally: gzip.open = original_open self.assertEqual(self.fake_open.invocation_count, 1) - self.assertEqual(self.fake_open.last_invocation, (("test.gz", 3), {})) + self.assertEqual(self.fake_open.last_invocation, (("test.gz", "3"), {})) + + @unittest.skipUnless(gzip, "Requires gzip and zlib") + def test_gz_with_encoding_fake(self): + original_open = gzip.open + gzip.open = lambda filename, mode: io.BytesIO(b'Ex-binary string') + try: + result = fileinput.hook_compressed("test.gz", "3", encoding="utf-8") + finally: + gzip.open = original_open + self.assertEqual(list(result), ['Ex-binary string']) @unittest.skipUnless(bz2, "Requires bz2") def test_bz2_ext_fake(self): original_open = bz2.BZ2File bz2.BZ2File = self.fake_open try: - result = fileinput.hook_compressed("test.bz2", 4) + result = fileinput.hook_compressed("test.bz2", "4") finally: bz2.BZ2File = original_open self.assertEqual(self.fake_open.invocation_count, 1) - self.assertEqual(self.fake_open.last_invocation, (("test.bz2", 4), {})) + self.assertEqual(self.fake_open.last_invocation, (("test.bz2", "4"), {})) def test_blah_ext(self): - self.do_test_use_builtin_open("abcd.blah", 5) + self.do_test_use_builtin_open("abcd.blah", "5") def test_gz_ext_builtin(self): - self.do_test_use_builtin_open("abcd.Gz", 6) + self.do_test_use_builtin_open("abcd.Gz", "6") def test_bz2_ext_builtin(self): - self.do_test_use_builtin_open("abcd.Bz2", 7) + self.do_test_use_builtin_open("abcd.Bz2", "7") def do_test_use_builtin_open(self, filename, mode): original_open = self.replace_builtin_open(self.fake_open) @@ -923,7 +949,7 @@ def do_test_use_builtin_open(self, filename, mode): self.assertEqual(self.fake_open.invocation_count, 1) self.assertEqual(self.fake_open.last_invocation, - ((filename, mode), {})) + ((filename, mode), {'encoding': 'locale', 'errors': None})) @staticmethod def replace_builtin_open(new_open_func): diff --git a/Misc/ACKS b/Misc/ACKS index 42f0efdd536ddc..2502ba816ac925 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -33,6 +33,7 @@ Nir Aides Akira Yaniv Aknin Jyrki Alakuijala +Tatiana Al-Chueyr Steve Alexander Fred Allen Jeff Allen diff --git a/Misc/NEWS.d/next/Library/2021-04-08-12-25-08.bpo-43712.f8WXCX.rst b/Misc/NEWS.d/next/Library/2021-04-08-12-25-08.bpo-43712.f8WXCX.rst new file mode 100644 index 00000000000000..d11df0d1027000 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-08-12-25-08.bpo-43712.f8WXCX.rst @@ -0,0 +1,2 @@ +Add ``encoding`` and ``errors`` parameters to :func:`fileinput.input` and +:class:`fileinput.FileInput`. From 6f1e8ccffa5b1272a36a35405d3c4e4bbba0c082 Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Wed, 14 Apr 2021 13:18:49 +0200 Subject: [PATCH 047/108] bpo-43752: Fix sqlite3 regression for zero-sized blobs with converters (GH-25228) --- Lib/sqlite3/test/types.py | 4 ++- .../2021-04-06-21-18-29.bpo-43752.K7qmAF.rst | 3 +++ Modules/_sqlite/cursor.c | 25 +++++++++++-------- 3 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-06-21-18-29.bpo-43752.K7qmAF.rst diff --git a/Lib/sqlite3/test/types.py b/Lib/sqlite3/test/types.py index 2370dd16930422..4bb1de80887b80 100644 --- a/Lib/sqlite3/test/types.py +++ b/Lib/sqlite3/test/types.py @@ -255,7 +255,9 @@ def test_number2(self): def test_convert_zero_sized_blob(self): self.con.execute("insert into test(cbin) values (?)", (b"",)) cur = self.con.execute("select cbin from test") - self.assertEqual(cur.fetchone()[0], b"blobish") + # Zero-sized blobs with converters returns None. This differs from + # blobs without a converter, where b"" is returned. + self.assertIsNone(cur.fetchone()[0]) class ColNamesTests(unittest.TestCase): diff --git a/Misc/NEWS.d/next/Library/2021-04-06-21-18-29.bpo-43752.K7qmAF.rst b/Misc/NEWS.d/next/Library/2021-04-06-21-18-29.bpo-43752.K7qmAF.rst new file mode 100644 index 00000000000000..ef4b9539a8055d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-06-21-18-29.bpo-43752.K7qmAF.rst @@ -0,0 +1,3 @@ +Fix :mod:`sqlite3` regression for zero-sized blobs with converters, where +``b""`` was returned instead of ``None``. The regression was introduced by +GH-24723. Patch by Erlend E. Aasland. diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index dfaa5577ab4081..09c9a8c92d1246 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -240,7 +240,6 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self) { int i, numcols; PyObject* row; - PyObject* item = NULL; int coltype; PyObject* converter; PyObject* converted; @@ -282,18 +281,22 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self) */ if (converter != Py_None) { const void *blob = sqlite3_column_blob(self->statement->st, i); - if (blob == NULL && sqlite3_errcode(db) == SQLITE_NOMEM) { - PyErr_NoMemory(); - goto error; + if (blob == NULL) { + if (sqlite3_errcode(db) == SQLITE_NOMEM) { + PyErr_NoMemory(); + goto error; + } + converted = Py_NewRef(Py_None); } - - nbytes = sqlite3_column_bytes(self->statement->st, i); - item = PyBytes_FromStringAndSize(blob, nbytes); - if (item == NULL) { - goto error; + else { + nbytes = sqlite3_column_bytes(self->statement->st, i); + PyObject *item = PyBytes_FromStringAndSize(blob, nbytes); + if (item == NULL) { + goto error; + } + converted = PyObject_CallOneArg(converter, item); + Py_DECREF(item); } - converted = PyObject_CallOneArg(converter, item); - Py_DECREF(item); } else { Py_BEGIN_ALLOW_THREADS coltype = sqlite3_column_type(self->statement->st, i); From b8509ffa82d393d9d4a0f5520edca057978bbd86 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Wed, 14 Apr 2021 17:15:22 +0530 Subject: [PATCH 048/108] bpo-43825: Fix deprecation warnings in test_cmd_line and test_collections (GH-25380) * Fix deprecation warnings due to invalid escape sequences. * Use self.assertEqual instead of deprecated self.assertEquals. --- Lib/test/test_cmd_line.py | 2 +- Lib/test/test_collections.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py index 375876768b29f5..cbf9ff2a863c3c 100644 --- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -862,7 +862,7 @@ def test_tokenizer_error_with_stdin(self): self.check_string(b"(1+2+3") def test_decoding_error_at_the_end_of_the_line(self): - self.check_string(b"'\u1f'") + self.check_string(br"'\u1f'") def test_main(): support.run_unittest(CmdLineTest, IgnoreEnvironmentTest, SyntaxErrorTests) diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py index 7b245c08b5ddd3..98690d231e606b 100644 --- a/Lib/test/test_collections.py +++ b/Lib/test/test_collections.py @@ -1515,7 +1515,7 @@ def __repr__(self): items = [5,43,2,1] s = MySet(items) r = s.pop() - self.assertEquals(len(s), len(items) - 1) + self.assertEqual(len(s), len(items) - 1) self.assertNotIn(r, s) self.assertIn(r, items) From c1ae7419975f7d664320f66ea3acc8663bbf76cf Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Wed, 14 Apr 2021 13:45:49 +0200 Subject: [PATCH 049/108] bpo-43265: Improve sqlite3.Connection.backup error handling (GH-24586) --- Lib/sqlite3/test/backup.py | 5 +- .../2021-02-19-22-24-33.bpo-43265.MyAzCH.rst | 3 + Modules/_sqlite/connection.c | 79 ++++++++----------- 3 files changed, 38 insertions(+), 49 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-02-19-22-24-33.bpo-43265.MyAzCH.rst diff --git a/Lib/sqlite3/test/backup.py b/Lib/sqlite3/test/backup.py index cbe24df2e9c96c..4e30594bec6d9f 100644 --- a/Lib/sqlite3/test/backup.py +++ b/Lib/sqlite3/test/backup.py @@ -149,10 +149,7 @@ def test_database_source_name(self): with self.assertRaises(sqlite.OperationalError) as cm: with sqlite.connect(':memory:') as bck: self.cx.backup(bck, name='non-existing') - self.assertIn( - str(cm.exception), - ['SQL logic error', 'SQL logic error or missing database'] - ) + self.assertIn("unknown database", str(cm.exception)) self.cx.execute("ATTACH DATABASE ':memory:' AS attached_db") self.cx.execute('CREATE TABLE attached_db.foo (key INTEGER)') diff --git a/Misc/NEWS.d/next/Library/2021-02-19-22-24-33.bpo-43265.MyAzCH.rst b/Misc/NEWS.d/next/Library/2021-02-19-22-24-33.bpo-43265.MyAzCH.rst new file mode 100644 index 00000000000000..3e7f34ea5649da --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-02-19-22-24-33.bpo-43265.MyAzCH.rst @@ -0,0 +1,3 @@ +Improve :meth:`sqlite3.Connection.backup` error handling. The error message +for non-existant target database names is now ``unknown database `` instead of ``SQL logic error``. Patch by Erlend E. Aasland. diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 9bf2a35ab0e558..6d3ccb9b94126c 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -1601,7 +1601,6 @@ pysqlite_connection_backup_impl(pysqlite_Connection *self, /*[clinic end generated code: output=306a3e6a38c36334 input=30ae45fc420bfd3b]*/ { int rc; - int callback_error = 0; int sleep_ms = (int)(sleep * 1000.0); sqlite3 *bck_conn; sqlite3_backup *bck_handle; @@ -1643,60 +1642,50 @@ pysqlite_connection_backup_impl(pysqlite_Connection *self, bck_handle = sqlite3_backup_init(bck_conn, "main", self->db, name); Py_END_ALLOW_THREADS - if (bck_handle) { - do { - Py_BEGIN_ALLOW_THREADS - rc = sqlite3_backup_step(bck_handle, pages); - Py_END_ALLOW_THREADS + if (bck_handle == NULL) { + _pysqlite_seterror(bck_conn, NULL); + return NULL; + } - if (progress != Py_None) { - PyObject *res; - - res = PyObject_CallFunction(progress, "iii", rc, - sqlite3_backup_remaining(bck_handle), - sqlite3_backup_pagecount(bck_handle)); - if (res == NULL) { - /* User's callback raised an error: interrupt the loop and - propagate it. */ - callback_error = 1; - rc = -1; - } else { - Py_DECREF(res); - } - } + do { + Py_BEGIN_ALLOW_THREADS + rc = sqlite3_backup_step(bck_handle, pages); + Py_END_ALLOW_THREADS - /* Sleep for a while if there are still further pages to copy and - the engine could not make any progress */ - if (rc == SQLITE_BUSY || rc == SQLITE_LOCKED) { + if (progress != Py_None) { + int remaining = sqlite3_backup_remaining(bck_handle); + int pagecount = sqlite3_backup_pagecount(bck_handle); + PyObject *res = PyObject_CallFunction(progress, "iii", rc, + remaining, pagecount); + if (res == NULL) { + /* Callback failed: abort backup and bail. */ Py_BEGIN_ALLOW_THREADS - sqlite3_sleep(sleep_ms); + sqlite3_backup_finish(bck_handle); Py_END_ALLOW_THREADS + return NULL; } - } while (rc == SQLITE_OK || rc == SQLITE_BUSY || rc == SQLITE_LOCKED); - - Py_BEGIN_ALLOW_THREADS - rc = sqlite3_backup_finish(bck_handle); - Py_END_ALLOW_THREADS - } else { - rc = _pysqlite_seterror(bck_conn, NULL); - } + Py_DECREF(res); + } - if (!callback_error && rc != SQLITE_OK) { - /* We cannot use _pysqlite_seterror() here because the backup APIs do - not set the error status on the connection object, but rather on - the backup handle. */ - if (rc == SQLITE_NOMEM) { - (void)PyErr_NoMemory(); - } else { - PyErr_SetString(pysqlite_OperationalError, sqlite3_errstr(rc)); + /* Sleep for a while if there are still further pages to copy and + the engine could not make any progress */ + if (rc == SQLITE_BUSY || rc == SQLITE_LOCKED) { + Py_BEGIN_ALLOW_THREADS + sqlite3_sleep(sleep_ms); + Py_END_ALLOW_THREADS } - } + } while (rc == SQLITE_OK || rc == SQLITE_BUSY || rc == SQLITE_LOCKED); - if (!callback_error && rc == SQLITE_OK) { - Py_RETURN_NONE; - } else { + Py_BEGIN_ALLOW_THREADS + rc = sqlite3_backup_finish(bck_handle); + Py_END_ALLOW_THREADS + + if (rc != SQLITE_OK) { + _pysqlite_seterror(bck_conn, NULL); return NULL; } + + Py_RETURN_NONE; } /*[clinic input] From 3386ca0b36327afeef8d7eff277b2aed1030c08d Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Wed, 14 Apr 2021 14:28:55 +0200 Subject: [PATCH 050/108] bpo-20364: Improve sqlite3 placeholder docs (GH-25003) --- Doc/includes/sqlite3/execute_1.py | 21 +++++---- Doc/library/sqlite3.rst | 71 ++++++++++++++----------------- Doc/tools/susp-ignored.csv | 4 +- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/Doc/includes/sqlite3/execute_1.py b/Doc/includes/sqlite3/execute_1.py index 3466b1265a5bf2..42aad4d5839f06 100644 --- a/Doc/includes/sqlite3/execute_1.py +++ b/Doc/includes/sqlite3/execute_1.py @@ -2,17 +2,22 @@ con = sqlite3.connect(":memory:") cur = con.cursor() -cur.execute("create table people (name_last, age)") - -who = "Yeltsin" -age = 72 +cur.execute("create table lang (lang_name, lang_age)") # This is the qmark style: -cur.execute("insert into people values (?, ?)", (who, age)) +cur.execute("insert into lang values (?, ?)", ("C", 49)) -# And this is the named style: -cur.execute("select * from people where name_last=:who and age=:age", {"who": who, "age": age}) +# The qmark style used with executemany(): +lang_list = [ + ("Fortran", 64), + ("Python", 30), + ("Go", 11), +] +cur.executemany("insert into lang values (?, ?)", lang_list) -print(cur.fetchone()) +# And this is the named style: +cur.execute("select * from lang where lang_name=:name and lang_age=:age", + {"name": "C", "age": 49}) +print(cur.fetchall()) con.close() diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index aee58a4bbfc07c..6bdf4ed0d81bcc 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -55,33 +55,6 @@ The data you've saved is persistent and is available in subsequent sessions:: con = sqlite3.connect('example.db') cur = con.cursor() -Usually your SQL operations will need to use values from Python variables. You -shouldn't assemble your query using Python's string operations because doing so -is insecure; it makes your program vulnerable to an SQL injection attack -(see https://xkcd.com/327/ for humorous example of what can go wrong). - -Instead, use the DB-API's parameter substitution. Put ``?`` as a placeholder -wherever you want to use a value, and then provide a tuple of values as the -second argument to the cursor's :meth:`~Cursor.execute` method. (Other database -modules may use a different placeholder, such as ``%s`` or ``:1``.) For -example:: - - # Never do this -- insecure! - symbol = 'RHAT' - cur.execute("SELECT * FROM stocks WHERE symbol = '%s'" % symbol) - - # Do this instead - t = ('RHAT',) - cur.execute('SELECT * FROM stocks WHERE symbol=?', t) - print(cur.fetchone()) - - # Larger example that inserts many records at a time - purchases = [('2006-03-28', 'BUY', 'IBM', 1000, 45.00), - ('2006-04-05', 'BUY', 'MSFT', 1000, 72.00), - ('2006-04-06', 'SELL', 'IBM', 500, 53.00), - ] - cur.executemany('INSERT INTO stocks VALUES (?,?,?,?,?)', purchases) - To retrieve data after executing a SELECT statement, you can either treat the cursor as an :term:`iterator`, call the cursor's :meth:`~Cursor.fetchone` method to retrieve a single matching row, or call :meth:`~Cursor.fetchall` to get a list of the @@ -98,6 +71,33 @@ This example uses the iterator form:: ('2006-04-05', 'BUY', 'MSFT', 1000, 72.0) +.. _sqlite3-placeholders: + +Usually your SQL operations will need to use values from Python variables. You +shouldn't assemble your query using Python's string operations because doing so +is insecure; it makes your program vulnerable to an SQL injection attack +(see the `xkcd webcomic `_ for a humorous example of +what can go wrong):: + + # Never do this -- insecure! + symbol = 'RHAT' + cur.execute("SELECT * FROM stocks WHERE symbol = '%s'" % symbol) + +Instead, use the DB-API's parameter substitution. Put a placeholder wherever +you want to use a value, and then provide a tuple of values as the second +argument to the cursor's :meth:`~Cursor.execute` method. An SQL statement may +use one of two kinds of placeholders: question marks (qmark style) or named +placeholders (named style). For the qmark style, ``parameters`` must be a +:term:`sequence `. For the named style, it can be either a +:term:`sequence ` or :class:`dict` instance. The length of the +:term:`sequence ` must match the number of placeholders, or a +:exc:`ProgrammingError` is raised. If a :class:`dict` is given, it must contain +keys for all named parameters. Any extra items are ignored. Here's an example +of both styles: + +.. literalinclude:: ../includes/sqlite3/execute_1.py + + .. seealso:: https://www.sqlite.org @@ -607,14 +607,8 @@ Cursor Objects .. method:: execute(sql[, parameters]) - Executes an SQL statement. The SQL statement may be parameterized (i. e. - placeholders instead of SQL literals). The :mod:`sqlite3` module supports two - kinds of placeholders: question marks (qmark style) and named placeholders - (named style). - - Here's an example of both styles: - - .. literalinclude:: ../includes/sqlite3/execute_1.py + Executes an SQL statement. Values may be bound to the statement using + :ref:`placeholders `. :meth:`execute` will only execute a single SQL statement. If you try to execute more than one statement with it, it will raise a :exc:`.Warning`. Use @@ -624,9 +618,10 @@ Cursor Objects .. method:: executemany(sql, seq_of_parameters) - Executes an SQL command against all parameter sequences or mappings found in - the sequence *seq_of_parameters*. The :mod:`sqlite3` module also allows - using an :term:`iterator` yielding parameters instead of a sequence. + Executes a :ref:`parameterized ` SQL command + against all parameter sequences or mappings found in the sequence + *seq_of_parameters*. The :mod:`sqlite3` module also allows using an + :term:`iterator` yielding parameters instead of a sequence. .. literalinclude:: ../includes/sqlite3/executemany_1.py diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv index 325c5fa35eed7a..a3ee3326d255d8 100644 --- a/Doc/tools/susp-ignored.csv +++ b/Doc/tools/susp-ignored.csv @@ -209,9 +209,9 @@ library/smtplib,,:port,method must support that as well as a regular host:port library/socket,,::,'5aef:2b::8' library/socket,,:can,"return (can_id, can_dlc, data[:can_dlc])" library/socket,,:len,fds.frombytes(cmsg_data[:len(cmsg_data) - (len(cmsg_data) % fds.itemsize)]) -library/sqlite3,,:age,"cur.execute(""select * from people where name_last=:who and age=:age"", {""who"": who, ""age"": age})" +library/sqlite3,,:name,"cur.execute(""select * from lang where lang_name=:name and lang_age=:age""," +library/sqlite3,,:age,"cur.execute(""select * from lang where lang_name=:name and lang_age=:age""," library/sqlite3,,:memory, -library/sqlite3,,:who,"cur.execute(""select * from people where name_last=:who and age=:age"", {""who"": who, ""age"": age})" library/sqlite3,,:path,"db = sqlite3.connect('file:path/to/database?mode=ro', uri=True)" library/ssl,,:My,"Organizational Unit Name (eg, section) []:My Group" library/ssl,,:My,"Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Organization, Inc." From c4073a24f95b54705416138dc1f20141ad76dd37 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 14 Apr 2021 14:16:47 +0100 Subject: [PATCH 051/108] Fix typo in the What's New for 3.10 (GH-25396) --- Doc/whatsnew/3.10.rst | 2 +- .../Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 21f912871d47a7..f149d7453b8954 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -175,7 +175,7 @@ AttributeErrors ~~~~~~~~~~~~~~~ When printing :exc:`AttributeError`, :c:func:`PyErr_Display` will offer -suggestions of simmilar attribute names in the object that the exception was +suggestions of similar attribute names in the object that the exception was raised from: .. code-block:: python diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst b/Misc/NEWS.d/next/Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst index 09c73eae77def5..0bd2fa65448826 100644 --- a/Misc/NEWS.d/next/Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst +++ b/Misc/NEWS.d/next/Core and Builtins/2019-10-27-20-20-07.bpo-38530.ZyoDNn.rst @@ -1,3 +1,3 @@ When printing :exc:`AttributeError`, :c:func:`PyErr_Display` will offer -suggestions of simmilar attribute names in the object that the exception was +suggestions of similar attribute names in the object that the exception was raised from. Patch by Pablo Galindo From 5bf8bf2267cd109970b2d946d43b2e9f71379ba2 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 14 Apr 2021 15:10:33 +0100 Subject: [PATCH 052/108] bpo-38530: Offer suggestions on NameError (GH-25397) When printing NameError raised by the interpreter, PyErr_Display will offer suggestions of simmilar variable names in the function that the exception was raised from: >>> schwarzschild_black_hole = None >>> schwarschild_black_hole Traceback (most recent call last): File "", line 1, in NameError: name 'schwarschild_black_hole' is not defined. Did you mean: schwarzschild_black_hole? --- Doc/library/exceptions.rst | 7 + Doc/whatsnew/3.10.rst | 17 +++ Include/cpython/pyerrors.h | 5 + Lib/test/test_exceptions.py | 123 ++++++++++++++++++ .../2021-04-14-03-53-06.bpo-38530.rNI_G1.rst | 3 + Objects/exceptions.c | 65 ++++++++- Python/ceval.c | 14 ++ Python/suggestions.c | 63 +++++++-- 8 files changed, 287 insertions(+), 10 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-14-03-53-06.bpo-38530.rNI_G1.rst diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 8fdd6ebecfa69e..f4f5c478f2cb80 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -242,6 +242,13 @@ The following exceptions are the exceptions that are usually raised. unqualified names. The associated value is an error message that includes the name that could not be found. + The :attr:`name` attribute can be set using a keyword-only argument to the + constructor. When set it represent the name of the variable that was attempted + to be accessed. + + .. versionchanged:: 3.10 + Added the :attr:`name` attribute. + .. exception:: NotImplementedError diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index f149d7453b8954..69697e15d421f7 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -187,6 +187,23 @@ raised from: (Contributed by Pablo Galindo in :issue:`38530`.) +NameErrors +~~~~~~~~~~ + +When printing :exc:`NameError` raised by the interpreter, :c:func:`PyErr_Display` +will offer suggestions of simmilar variable names in the function that the exception +was raised from: + +.. code-block:: python + + >>> schwarzschild_black_hole = None + >>> schwarschild_black_hole + Traceback (most recent call last): + File "", line 1, in + NameError: name 'schwarschild_black_hole' is not defined. Did you mean: schwarzschild_black_hole? + +(Contributed by Pablo Galindo in :issue:`38530`.) + PEP 626: Precise line numbers for debugging and other tools ----------------------------------------------------------- diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h index a15082e693cb90..9d88e6631f6643 100644 --- a/Include/cpython/pyerrors.h +++ b/Include/cpython/pyerrors.h @@ -62,6 +62,11 @@ typedef struct { PyObject *value; } PyStopIterationObject; +typedef struct { + PyException_HEAD + PyObject *name; +} PyNameErrorObject; + typedef struct { PyException_HEAD PyObject *obj; diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index e1a5ec76d78ad3..4f3c9ab4563e1f 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1413,6 +1413,129 @@ class TestException(MemoryError): gc_collect() +global_for_suggestions = None + +class NameErrorTests(unittest.TestCase): + def test_name_error_has_name(self): + try: + bluch + except NameError as exc: + self.assertEqual("bluch", exc.name) + + def test_name_error_suggestions(self): + def Substitution(): + noise = more_noise = a = bc = None + blech = None + print(bluch) + + def Elimination(): + noise = more_noise = a = bc = None + blch = None + print(bluch) + + def Addition(): + noise = more_noise = a = bc = None + bluchin = None + print(bluch) + + def SubstitutionOverElimination(): + blach = None + bluc = None + print(bluch) + + def SubstitutionOverAddition(): + blach = None + bluchi = None + print(bluch) + + def EliminationOverAddition(): + blucha = None + bluc = None + print(bluch) + + for func, suggestion in [(Substitution, "blech?"), + (Elimination, "blch?"), + (Addition, "bluchin?"), + (EliminationOverAddition, "blucha?"), + (SubstitutionOverElimination, "blach?"), + (SubstitutionOverAddition, "blach?")]: + err = None + try: + func() + except NameError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + self.assertIn(suggestion, err.getvalue()) + + def test_name_error_suggestions_from_globals(self): + def func(): + print(global_for_suggestio) + try: + func() + except NameError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + self.assertIn("global_for_suggestions?", err.getvalue()) + + def test_name_error_suggestions_do_not_trigger_for_long_names(self): + def f(): + somethingverywronghehehehehehe = None + print(somethingverywronghe) + + try: + f() + except NameError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("somethingverywronghehe", err.getvalue()) + + def test_name_error_suggestions_do_not_trigger_for_big_dicts(self): + def f(): + # Mutating locals() is unreliable, so we need to do it by hand + a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = a10 = a11 = a12 = a13 = \ + a14 = a15 = a16 = a17 = a18 = a19 = a20 = a21 = a22 = a23 = a24 = a25 = \ + a26 = a27 = a28 = a29 = a30 = a31 = a32 = a33 = a34 = a35 = a36 = a37 = \ + a38 = a39 = a40 = a41 = a42 = a43 = a44 = a45 = a46 = a47 = a48 = a49 = \ + a50 = a51 = a52 = a53 = a54 = a55 = a56 = a57 = a58 = a59 = a60 = a61 = \ + a62 = a63 = a64 = a65 = a66 = a67 = a68 = a69 = a70 = a71 = a72 = a73 = \ + a74 = a75 = a76 = a77 = a78 = a79 = a80 = a81 = a82 = a83 = a84 = a85 = \ + a86 = a87 = a88 = a89 = a90 = a91 = a92 = a93 = a94 = a95 = a96 = a97 = \ + a98 = a99 = a100 = a101 = a102 = a103 = None + print(a0) + + try: + f() + except NameError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("a10", err.getvalue()) + + def test_name_error_with_custom_exceptions(self): + def f(): + blech = None + raise NameError() + + try: + f() + except NameError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("blech", err.getvalue()) + + def f(): + blech = None + raise NameError + + try: + f() + except NameError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("blech", err.getvalue()) class AttributeErrorTests(unittest.TestCase): def test_attributes(self): diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-14-03-53-06.bpo-38530.rNI_G1.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-14-03-53-06.bpo-38530.rNI_G1.rst new file mode 100644 index 00000000000000..ca175e7bebd9e5 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-14-03-53-06.bpo-38530.rNI_G1.rst @@ -0,0 +1,3 @@ +When printing :exc:`NameError` raised by the interpreter, +:c:func:`PyErr_Display` will offer suggestions of similar variable names in +the function that the exception was raised from. Patch by Pablo Galindo diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 4bb415331161fa..9916ce88549ed7 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -1326,8 +1326,69 @@ SimpleExtendsException(PyExc_RuntimeError, NotImplementedError, /* * NameError extends Exception */ -SimpleExtendsException(PyExc_Exception, NameError, - "Name not found globally."); + +static int +NameError_init(PyNameErrorObject *self, PyObject *args, PyObject *kwds) +{ + static char *kwlist[] = {"name", NULL}; + PyObject *name = NULL; + + if (BaseException_init((PyBaseExceptionObject *)self, args, NULL) == -1) { + return -1; + } + + PyObject *empty_tuple = PyTuple_New(0); + if (!empty_tuple) { + return -1; + } + if (!PyArg_ParseTupleAndKeywords(empty_tuple, kwds, "|$O:NameError", kwlist, + &name)) { + Py_DECREF(empty_tuple); + return -1; + } + Py_DECREF(empty_tuple); + + Py_XINCREF(name); + Py_XSETREF(self->name, name); + + return 0; +} + +static int +NameError_clear(PyNameErrorObject *self) +{ + Py_CLEAR(self->name); + return BaseException_clear((PyBaseExceptionObject *)self); +} + +static void +NameError_dealloc(PyNameErrorObject *self) +{ + _PyObject_GC_UNTRACK(self); + NameError_clear(self); + Py_TYPE(self)->tp_free((PyObject *)self); +} + +static int +NameError_traverse(PyNameErrorObject *self, visitproc visit, void *arg) +{ + Py_VISIT(self->name); + return BaseException_traverse((PyBaseExceptionObject *)self, visit, arg); +} + +static PyMemberDef NameError_members[] = { + {"name", T_OBJECT, offsetof(PyNameErrorObject, name), 0, PyDoc_STR("name")}, + {NULL} /* Sentinel */ +}; + +static PyMethodDef NameError_methods[] = { + {NULL} /* Sentinel */ +}; + +ComplexExtendsException(PyExc_Exception, NameError, + NameError, 0, + NameError_methods, NameError_members, + 0, BaseException_str, "Name not found globally."); /* * UnboundLocalError extends NameError diff --git a/Python/ceval.c b/Python/ceval.c index 53b596b304c213..326930b706c433 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -6319,6 +6319,20 @@ format_exc_check_arg(PyThreadState *tstate, PyObject *exc, return; _PyErr_Format(tstate, exc, format_str, obj_str); + + if (exc == PyExc_NameError) { + // Include the name in the NameError exceptions to offer suggestions later. + _Py_IDENTIFIER(name); + PyObject *type, *value, *traceback; + PyErr_Fetch(&type, &value, &traceback); + PyErr_NormalizeException(&type, &value, &traceback); + if (PyErr_GivenExceptionMatches(value, PyExc_NameError)) { + // We do not care if this fails because we are going to restore the + // NameError anyway. + (void)_PyObject_SetAttrId(value, &PyId_name, obj); + } + PyErr_Restore(type, value, traceback); + } } static void diff --git a/Python/suggestions.c b/Python/suggestions.c index 2c0858d558d00c..058294fc8b6b72 100644 --- a/Python/suggestions.c +++ b/Python/suggestions.c @@ -1,17 +1,15 @@ #include "Python.h" +#include "frameobject.h" #include "pycore_pyerrors.h" #define MAX_DISTANCE 3 #define MAX_CANDIDATE_ITEMS 100 -#define MAX_STRING_SIZE 20 +#define MAX_STRING_SIZE 25 /* Calculate the Levenshtein distance between string1 and string2 */ static size_t levenshtein_distance(const char *a, const char *b) { - if (a == NULL || b == NULL) { - return 0; - } const size_t a_size = strlen(a); const size_t b_size = strlen(b); @@ -89,14 +87,19 @@ calculate_suggestions(PyObject *dir, Py_ssize_t suggestion_distance = PyUnicode_GetLength(name); PyObject *suggestion = NULL; + const char *name_str = PyUnicode_AsUTF8(name); + if (name_str == NULL) { + PyErr_Clear(); + return NULL; + } for (int i = 0; i < dir_size; ++i) { PyObject *item = PyList_GET_ITEM(dir, i); - const char *name_str = PyUnicode_AsUTF8(name); - if (name_str == NULL) { + const char *item_str = PyUnicode_AsUTF8(item); + if (item_str == NULL) { PyErr_Clear(); - continue; + return NULL; } - Py_ssize_t current_distance = levenshtein_distance(PyUnicode_AsUTF8(name), PyUnicode_AsUTF8(item)); + Py_ssize_t current_distance = levenshtein_distance(name_str, item_str); if (current_distance == 0 || current_distance > MAX_DISTANCE) { continue; } @@ -132,6 +135,48 @@ offer_suggestions_for_attribute_error(PyAttributeErrorObject *exc) { return suggestions; } + +static PyObject * +offer_suggestions_for_name_error(PyNameErrorObject *exc) { + PyObject *name = exc->name; // borrowed reference + PyTracebackObject *traceback = (PyTracebackObject *) exc->traceback; // borrowed reference + // Abort if we don't have an attribute name or we have an invalid one + if (name == NULL || traceback == NULL || !PyUnicode_CheckExact(name)) { + return NULL; + } + + // Move to the traceback of the exception + while (traceback->tb_next != NULL) { + traceback = traceback->tb_next; + } + + PyFrameObject *frame = traceback->tb_frame; + assert(frame != NULL); + PyCodeObject *code = frame->f_code; + assert(code != NULL && code->co_varnames != NULL); + PyObject *dir = PySequence_List(code->co_varnames); + if (dir == NULL) { + PyErr_Clear(); + return NULL; + } + + PyObject *suggestions = calculate_suggestions(dir, name); + Py_DECREF(dir); + if (suggestions != NULL) { + return suggestions; + } + + dir = PySequence_List(frame->f_globals); + if (dir == NULL) { + PyErr_Clear(); + return NULL; + } + suggestions = calculate_suggestions(dir, name); + Py_DECREF(dir); + + return suggestions; +} + // Offer suggestions for a given exception. Returns a python string object containing the // suggestions. This function does not raise exceptions and returns NULL if no suggestion was found. PyObject *_Py_Offer_Suggestions(PyObject *exception) { @@ -139,6 +184,8 @@ PyObject *_Py_Offer_Suggestions(PyObject *exception) { assert(!PyErr_Occurred()); // Check that we are not going to clean any existing exception if (PyErr_GivenExceptionMatches(exception, PyExc_AttributeError)) { result = offer_suggestions_for_attribute_error((PyAttributeErrorObject *) exception); + } else if (PyErr_GivenExceptionMatches(exception, PyExc_NameError)) { + result = offer_suggestions_for_name_error((PyNameErrorObject *) exception); } assert(!PyErr_Occurred()); return result; From 92eebf6dd20c541ca5883d010a575fb6ea4a245c Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 14 Apr 2021 16:38:30 +0200 Subject: [PATCH 053/108] bpo-43795: Sort PC/python3dll.c (GH-25312) Each section is sorted to reduce diffs (review effort) when the file becomes generated. Sort is done with key=str.lower to preserve most of the original order (underscored items first). https://bugs.python.org/issue43795 --- PC/python3dll.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PC/python3dll.c b/PC/python3dll.c index b5735e81e81ae2..195c6531fdf887 100644 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -14,6 +14,8 @@ EXPORT_FUNC(_Py_BuildValue_SizeT) EXPORT_FUNC(_Py_CheckRecursiveCall) EXPORT_FUNC(_Py_Dealloc) +EXPORT_FUNC(_Py_DecRef) +EXPORT_FUNC(_Py_IncRef) EXPORT_FUNC(_Py_VaBuildValue_SizeT) EXPORT_FUNC(_PyArg_Parse_SizeT) EXPORT_FUNC(_PyArg_ParseTuple_SizeT) @@ -36,14 +38,12 @@ EXPORT_FUNC(_PyTrash_deposit_object) EXPORT_FUNC(_PyTrash_destroy_chain) EXPORT_FUNC(_PyTrash_thread_deposit_object) EXPORT_FUNC(_PyTrash_thread_destroy_chain) -EXPORT_FUNC(_Py_IncRef) -EXPORT_FUNC(_Py_DecRef) EXPORT_FUNC(Py_AddPendingCall) EXPORT_FUNC(Py_AtExit) EXPORT_FUNC(Py_BuildValue) EXPORT_FUNC(Py_CompileString) -EXPORT_FUNC(Py_DecRef) EXPORT_FUNC(Py_DecodeLocale) +EXPORT_FUNC(Py_DecRef) EXPORT_FUNC(Py_EncodeLocale) EXPORT_FUNC(Py_EndInterpreter) EXPORT_FUNC(Py_EnterRecursiveCall) @@ -260,8 +260,8 @@ EXPORT_FUNC(PyFloat_FromString) EXPORT_FUNC(PyFloat_GetInfo) EXPORT_FUNC(PyFloat_GetMax) EXPORT_FUNC(PyFloat_GetMin) -EXPORT_FUNC(PyFrame_GetLineNumber) EXPORT_FUNC(PyFrame_GetCode) +EXPORT_FUNC(PyFrame_GetLineNumber) EXPORT_FUNC(PyFrozenSet_New) EXPORT_FUNC(PyGC_Collect) EXPORT_FUNC(PyGILState_Ensure) @@ -424,8 +424,8 @@ EXPORT_FUNC(PyObject_GC_Del) EXPORT_FUNC(PyObject_GC_Track) EXPORT_FUNC(PyObject_GC_UnTrack) EXPORT_FUNC(PyObject_GenericGetAttr) -EXPORT_FUNC(PyObject_GenericSetAttr) EXPORT_FUNC(PyObject_GenericGetDict) +EXPORT_FUNC(PyObject_GenericSetAttr) EXPORT_FUNC(PyObject_GenericSetDict) EXPORT_FUNC(PyObject_GetAttr) EXPORT_FUNC(PyObject_GetAttrString) @@ -556,9 +556,9 @@ EXPORT_FUNC(PyTuple_Pack) EXPORT_FUNC(PyTuple_SetItem) EXPORT_FUNC(PyTuple_Size) EXPORT_FUNC(PyType_ClearCache) +EXPORT_FUNC(PyType_FromModuleAndSpec) EXPORT_FUNC(PyType_FromSpec) EXPORT_FUNC(PyType_FromSpecWithBases) -EXPORT_FUNC(PyType_FromModuleAndSpec) EXPORT_FUNC(PyType_GenericAlloc) EXPORT_FUNC(PyType_GenericNew) EXPORT_FUNC(PyType_GetFlags) @@ -726,13 +726,13 @@ EXPORT_DATA(PyExc_BlockingIOError) EXPORT_DATA(PyExc_BrokenPipeError) EXPORT_DATA(PyExc_BufferError) EXPORT_DATA(PyExc_BytesWarning) -EXPORT_DATA(PyExc_EncodingWarning) EXPORT_DATA(PyExc_ChildProcessError) EXPORT_DATA(PyExc_ConnectionAbortedError) EXPORT_DATA(PyExc_ConnectionError) EXPORT_DATA(PyExc_ConnectionRefusedError) EXPORT_DATA(PyExc_ConnectionResetError) EXPORT_DATA(PyExc_DeprecationWarning) +EXPORT_DATA(PyExc_EncodingWarning) EXPORT_DATA(PyExc_EnvironmentError) EXPORT_DATA(PyExc_EOFError) EXPORT_DATA(PyExc_Exception) From d9ba9dee7f267a603394b8d63a7697b08efdf1cb Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 14 Apr 2021 16:38:58 +0200 Subject: [PATCH 054/108] bpo-41282: setup.py ignores distutils DeprecationWarning (GH-25405) --- setup.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 253053da7fb47a..f8b7a17e772b11 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,7 @@ import re import sys import sysconfig +import warnings from glob import glob, escape import _osx_support @@ -30,14 +31,19 @@ SUBPROCESS_BOOTSTRAP = True -from distutils import log -from distutils.command.build_ext import build_ext -from distutils.command.build_scripts import build_scripts -from distutils.command.install import install -from distutils.command.install_lib import install_lib -from distutils.core import Extension, setup -from distutils.errors import CCompilerError, DistutilsError -from distutils.spawn import find_executable +with warnings.catch_warnings(): + # bpo-41282 (PEP 632) deprecated distutils but setup.py still uses it + warnings.filterwarnings("ignore", "The distutils package is deprecated", + DeprecationWarning) + + from distutils import log + from distutils.command.build_ext import build_ext + from distutils.command.build_scripts import build_scripts + from distutils.command.install import install + from distutils.command.install_lib import install_lib + from distutils.core import Extension, setup + from distutils.errors import CCompilerError, DistutilsError + from distutils.spawn import find_executable # Compile extensions used to test Python? From def919342facf7f53a3a5f0e9f4b1889d323956d Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Wed, 14 Apr 2021 16:50:16 +0200 Subject: [PATCH 055/108] bpo-43505: Explicitly initialize and shutdown sqlite3 (GH-25404) --- Modules/_sqlite/module.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c index 6bfb1b73f82391..8dbfa7b38a1f9c 100644 --- a/Modules/_sqlite/module.c +++ b/Modules/_sqlite/module.c @@ -343,8 +343,7 @@ static struct PyModuleDef _sqlite3module = { #define ADD_TYPE(module, type) \ do { \ if (PyModule_AddType(module, &type) < 0) { \ - Py_DECREF(module); \ - return NULL; \ + goto error; \ } \ } while (0) @@ -370,6 +369,12 @@ PyMODINIT_FUNC PyInit__sqlite3(void) return NULL; } + int rc = sqlite3_initialize(); + if (rc != SQLITE_OK) { + PyErr_SetString(PyExc_ImportError, sqlite3_errstr(rc)); + return NULL; + } + module = PyModule_Create(&_sqlite3module); if (!module || @@ -380,8 +385,7 @@ PyMODINIT_FUNC PyInit__sqlite3(void) (pysqlite_statement_setup_types(module) < 0) || (pysqlite_prepare_protocol_setup_types(module) < 0) ) { - Py_XDECREF(module); - return NULL; + goto error; } ADD_TYPE(module, *pysqlite_ConnectionType); @@ -428,12 +432,11 @@ PyMODINIT_FUNC PyInit__sqlite3(void) goto error; } -error: - if (PyErr_Occurred()) - { - PyErr_SetString(PyExc_ImportError, MODULE_NAME ": init failed"); - Py_DECREF(module); - module = NULL; - } return module; + +error: + sqlite3_shutdown(); + PyErr_SetString(PyExc_ImportError, MODULE_NAME ": init failed"); + Py_XDECREF(module); + return NULL; } From 341e8a939aca6e9f59ffb0e6daee5888933694ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?= Date: Wed, 14 Apr 2021 17:12:34 +0200 Subject: [PATCH 056/108] bpo-41282: (PEP 632) Load install schemes from sysconfig (GH-24549) With this patch, `distutils.command.install.INSTALL_SCHEMES` are loaded from `sysconfig._INSTALL_SCHEMES`. The distutils module is deprecated and will be removed in 3.12 (PEP 632). This change makes the `sysconfig._INSTALL_SCHEMES` the single point of truth for install schemes while keeping `distutils.command.install.INSTALL_SCHEMES` exactly the same. If we, during the transition to the sysconfig, change something, this makes sure that it also propagates to distutils until the module gets removed. Moreover, as discussed [on Discourse], Linux distros need to patch distutils/sysconfig to make sure the packages will land in proper locations. This patch makes it easier because it leaves only one location where install schemes are defined which is much easier to patch/adjust. [on Discourse]: https://discuss.python.org/t/pep-632-deprecate-distutils-module/5134 The implementation is slightly different than the plan but I think it's the easiest way how to do it and it also makes the downstream patch simple, flexible and easy to maintain. It's also necessary to implement this before setuptools starts bundling the distutils module so the default install schemes stay in the standard library. The removed code from sysconfig does not seem to have any negative effect because, honestly, it seems that nothing actually uses the install schemes from sysconfig at all. There were many big changes in these modules where they were trying to include packaging in stdlib and then reverted that. Also, the test of distutils install command does not count with the different locations which is good evidence that the reason to have this piece of code is no longer valid. https://bugs.python.org/issue41282 --- Lib/distutils/command/install.py | 73 +++++++++++-------- Lib/sysconfig.py | 6 -- .../2021-02-16-13-18-38.bpo-41282.GK9a0l.rst | 2 + 3 files changed, 43 insertions(+), 38 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-02-16-13-18-38.bpo-41282.GK9a0l.rst diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py index bdead133bd399a..d33a889afe4a81 100644 --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -3,7 +3,9 @@ Implements the Distutils 'install' command.""" import sys +import sysconfig import os +import re from distutils import log from distutils.core import Command @@ -20,33 +22,45 @@ HAS_USER_SITE = (USER_SITE is not None) -WINDOWS_SCHEME = { - 'purelib': '$base/Lib/site-packages', - 'platlib': '$base/Lib/site-packages', - 'headers': '$base/Include/$dist_name', - 'scripts': '$base/Scripts', - 'data' : '$base', -} - -INSTALL_SCHEMES = { - 'unix_prefix': { - 'purelib': '$base/lib/python$py_version_short/site-packages', - 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', - 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { - 'purelib': '$base/lib/python', - 'platlib': '$base/$platlibdir/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'nt': WINDOWS_SCHEME, - } - -# user site schemes +# The keys to an installation scheme; if any new types of files are to be +# installed, be sure to add an entry to every scheme in +# sysconfig._INSTALL_SCHEMES, and to SCHEME_KEYS here. +SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') + +# The following code provides backward-compatible INSTALL_SCHEMES +# while making the sysconfig module the single point of truth. +# This makes it easier for OS distributions where they need to +# alter locations for packages installations in a single place. +# Note that this module is depracated (PEP 632); all consumers +# of this information should switch to using sysconfig directly. +INSTALL_SCHEMES = {"unix_prefix": {}, "unix_home": {}, "nt": {}} + +# Copy from sysconfig._INSTALL_SCHEMES +for key in SCHEME_KEYS: + sys_key = key + if key == "headers": + sys_key = "include" + INSTALL_SCHEMES["unix_prefix"][key] = sysconfig._INSTALL_SCHEMES["posix_prefix"][sys_key] + INSTALL_SCHEMES["unix_home"][key] = sysconfig._INSTALL_SCHEMES["posix_home"][sys_key] + INSTALL_SCHEMES["nt"][key] = sysconfig._INSTALL_SCHEMES["nt"][sys_key] + +# Transformation to different template format +for main_key in INSTALL_SCHEMES: + for key, value in INSTALL_SCHEMES[main_key].items(): + # Change all ocurences of {variable} to $variable + value = re.sub(r"\{(.+?)\}", r"$\g<1>", value) + value = value.replace("$installed_base", "$base") + value = value.replace("$py_version_nodot_plat", "$py_version_nodot") + if key == "headers": + value += "/$dist_name" + if sys.version_info >= (3, 9) and key == "platlib": + # platlibdir is available since 3.9: bpo-1294959 + value = value.replace("/lib/", "/$platlibdir/") + INSTALL_SCHEMES[main_key][key] = value + +# The following part of INSTALL_SCHEMES has a different definition +# than the one in sysconfig, but because both depend on the site module, +# the outcomes should be the same. if HAS_USER_SITE: INSTALL_SCHEMES['nt_user'] = { 'purelib': '$usersite', @@ -65,11 +79,6 @@ 'data' : '$userbase', } -# The keys to an installation scheme; if any new types of files are to be -# installed, be sure to add an entry to every installation scheme above, -# and to SCHEME_KEYS here. -SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') - class install(Command): diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index b8b1aca17e24d9..d056d2c3381608 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -176,12 +176,6 @@ def is_python_build(check_home=False): _PYTHON_BUILD = is_python_build(True) -if _PYTHON_BUILD: - for scheme in ('posix_prefix', 'posix_home'): - _INSTALL_SCHEMES[scheme]['include'] = '{srcdir}/Include' - _INSTALL_SCHEMES[scheme]['platinclude'] = '{projectbase}/.' - - def _subst_vars(s, local_vars): try: return s.format(**local_vars) diff --git a/Misc/NEWS.d/next/Library/2021-02-16-13-18-38.bpo-41282.GK9a0l.rst b/Misc/NEWS.d/next/Library/2021-02-16-13-18-38.bpo-41282.GK9a0l.rst new file mode 100644 index 00000000000000..eefebcfe1ba7c4 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-02-16-13-18-38.bpo-41282.GK9a0l.rst @@ -0,0 +1,2 @@ +Install schemes in :mod:`distutils.command.install` are now loaded from +:mod:`sysconfig`. From 0c4c43632556a5ea5ef2267efeb17b332b861a19 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Wed, 14 Apr 2021 10:16:11 -0600 Subject: [PATCH 057/108] Fix typo in 3.10's What's New documentation (GH-25409) "occured" -> "occurred" --- Doc/whatsnew/3.10.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 69697e15d421f7..0962f04b3a7d9c 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -420,7 +420,7 @@ For example:: case ('warning', code, 40): print("A warning has been received.") case ('error', code, _): - print(f"An error {code} occured.") + print(f"An error {code} occurred.") In the above case, ``test_variable`` will match for ('error', code, 100) and ('error', code, 800). From e07f4ab26aaf08f90ebd9e6004af14fd6ef39351 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 14 Apr 2021 18:58:28 +0100 Subject: [PATCH 058/108] bpo-38530: Make sure that failing to generate suggestions on failure will not propagate exceptions (GH-25408) --- Lib/test/test_exceptions.py | 14 ++++++++++++++ Python/pythonrun.c | 2 ++ Python/suggestions.c | 10 +++------- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 4f3c9ab4563e1f..ebeb67b4512822 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1695,6 +1695,20 @@ def __getattr__(self, attr): self.assertIn("blech", err.getvalue()) + def test_attribute_error_with_failing_dict(self): + class T: + bluch = 1 + def __dir__(self): + raise AttributeError("oh no!") + + try: + T().blich + except AttributeError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("blech", err.getvalue()) + self.assertNotIn("oh no!", err.getvalue()) class ImportErrorTests(unittest.TestCase): diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 321b04eb724ed4..6f84cab702e980 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -962,6 +962,8 @@ print_exception(PyObject *f, PyObject *value) err += PyFile_WriteString("?", f); } Py_DECREF(suggestions); + } else if (PyErr_Occurred()) { + PyErr_Clear(); } err += PyFile_WriteString("\n", f); Py_XDECREF(tb); diff --git a/Python/suggestions.c b/Python/suggestions.c index 058294fc8b6b72..bdc8e2fd1bb080 100644 --- a/Python/suggestions.c +++ b/Python/suggestions.c @@ -89,14 +89,12 @@ calculate_suggestions(PyObject *dir, PyObject *suggestion = NULL; const char *name_str = PyUnicode_AsUTF8(name); if (name_str == NULL) { - PyErr_Clear(); return NULL; } for (int i = 0; i < dir_size; ++i) { PyObject *item = PyList_GET_ITEM(dir, i); const char *item_str = PyUnicode_AsUTF8(item); if (item_str == NULL) { - PyErr_Clear(); return NULL; } Py_ssize_t current_distance = levenshtein_distance(name_str, item_str); @@ -156,7 +154,6 @@ offer_suggestions_for_name_error(PyNameErrorObject *exc) { assert(code != NULL && code->co_varnames != NULL); PyObject *dir = PySequence_List(code->co_varnames); if (dir == NULL) { - PyErr_Clear(); return NULL; } @@ -168,7 +165,6 @@ offer_suggestions_for_name_error(PyNameErrorObject *exc) { dir = PySequence_List(frame->f_globals); if (dir == NULL) { - PyErr_Clear(); return NULL; } suggestions = calculate_suggestions(dir, name); @@ -178,16 +174,16 @@ offer_suggestions_for_name_error(PyNameErrorObject *exc) { } // Offer suggestions for a given exception. Returns a python string object containing the -// suggestions. This function does not raise exceptions and returns NULL if no suggestion was found. +// suggestions. This function returns NULL if no suggestion was found or if an exception happened, +// users must call PyErr_Occurred() to disambiguate. PyObject *_Py_Offer_Suggestions(PyObject *exception) { PyObject *result = NULL; - assert(!PyErr_Occurred()); // Check that we are not going to clean any existing exception + assert(!PyErr_Occurred()); if (PyErr_GivenExceptionMatches(exception, PyExc_AttributeError)) { result = offer_suggestions_for_attribute_error((PyAttributeErrorObject *) exception); } else if (PyErr_GivenExceptionMatches(exception, PyExc_NameError)) { result = offer_suggestions_for_name_error((PyNameErrorObject *) exception); } - assert(!PyErr_Occurred()); return result; } From 5cb601f956886b32641f818b5da347cc86a43db2 Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Wed, 14 Apr 2021 23:09:11 +0200 Subject: [PATCH 059/108] bpo-43296: Handle sqlite3_value_blob() errors (GH-24674) --- Lib/sqlite3/test/userfunctions.py | 4 ++++ .../2021-03-01-13-01-33.bpo-43296.p_gU6T.rst | 3 +++ Modules/_sqlite/connection.c | 24 +++++++++++++------ 3 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-03-01-13-01-33.bpo-43296.p_gU6T.rst diff --git a/Lib/sqlite3/test/userfunctions.py b/Lib/sqlite3/test/userfunctions.py index 749ea049c834a8..148d9f596a91c8 100644 --- a/Lib/sqlite3/test/userfunctions.py +++ b/Lib/sqlite3/test/userfunctions.py @@ -276,6 +276,10 @@ def test_any_arguments(self): val = cur.fetchone()[0] self.assertEqual(val, 2) + def test_empty_blob(self): + cur = self.con.execute("select isblob(x'')") + self.assertTrue(cur.fetchone()[0]) + # Regarding deterministic functions: # # Between 3.8.3 and 3.15.0, deterministic functions were only used to diff --git a/Misc/NEWS.d/next/Library/2021-03-01-13-01-33.bpo-43296.p_gU6T.rst b/Misc/NEWS.d/next/Library/2021-03-01-13-01-33.bpo-43296.p_gU6T.rst new file mode 100644 index 00000000000000..741dfcd705ebd9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-03-01-13-01-33.bpo-43296.p_gU6T.rst @@ -0,0 +1,3 @@ +Improve :mod:`sqlite3` error handling: ``sqlite3_value_blob()`` errors that +set ``SQLITE_NOMEM`` now raise :exc:`MemoryError`. Patch by Erlend E. +Aasland. diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 6d3ccb9b94126c..93365495f58856 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -546,7 +546,6 @@ _pysqlite_build_py_params(sqlite3_context *context, int argc, sqlite3_value* cur_value; PyObject* cur_py_value; const char* val_str; - Py_ssize_t buflen; args = PyTuple_New(argc); if (!args) { @@ -571,19 +570,26 @@ _pysqlite_build_py_params(sqlite3_context *context, int argc, cur_py_value = Py_NewRef(Py_None); } break; - case SQLITE_BLOB: - buflen = sqlite3_value_bytes(cur_value); - cur_py_value = PyBytes_FromStringAndSize( - sqlite3_value_blob(cur_value), buflen); + case SQLITE_BLOB: { + sqlite3 *db = sqlite3_context_db_handle(context); + const void *blob = sqlite3_value_blob(cur_value); + + if (blob == NULL && sqlite3_errcode(db) == SQLITE_NOMEM) { + PyErr_NoMemory(); + goto error; + } + + Py_ssize_t size = sqlite3_value_bytes(cur_value); + cur_py_value = PyBytes_FromStringAndSize(blob, size); break; + } case SQLITE_NULL: default: cur_py_value = Py_NewRef(Py_None); } if (!cur_py_value) { - Py_DECREF(args); - return NULL; + goto error; } PyTuple_SetItem(args, i, cur_py_value); @@ -591,6 +597,10 @@ _pysqlite_build_py_params(sqlite3_context *context, int argc, } return args; + +error: + Py_DECREF(args); + return NULL; } static void From 3fc65b97d09fd29272fdf60d2e567bfb070da824 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Thu, 15 Apr 2021 00:03:43 +0100 Subject: [PATCH 060/108] bpo-38530: Optimize the calculation of string sizes when offering suggestions (GH-25412) --- Python/suggestions.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Python/suggestions.c b/Python/suggestions.c index bdc8e2fd1bb080..258e3f1833e6b5 100644 --- a/Python/suggestions.c +++ b/Python/suggestions.c @@ -9,10 +9,8 @@ /* Calculate the Levenshtein distance between string1 and string2 */ static size_t -levenshtein_distance(const char *a, const char *b) { - - const size_t a_size = strlen(a); - const size_t b_size = strlen(b); +levenshtein_distance(const char *a, size_t a_size, + const char *b, size_t b_size) { if (a_size > MAX_STRING_SIZE || b_size > MAX_STRING_SIZE) { return 0; @@ -87,17 +85,20 @@ calculate_suggestions(PyObject *dir, Py_ssize_t suggestion_distance = PyUnicode_GetLength(name); PyObject *suggestion = NULL; - const char *name_str = PyUnicode_AsUTF8(name); + Py_ssize_t name_size; + const char *name_str = PyUnicode_AsUTF8AndSize(name, &name_size); if (name_str == NULL) { return NULL; } for (int i = 0; i < dir_size; ++i) { PyObject *item = PyList_GET_ITEM(dir, i); - const char *item_str = PyUnicode_AsUTF8(item); + Py_ssize_t item_size; + const char *item_str = PyUnicode_AsUTF8AndSize(item, &item_size); if (item_str == NULL) { return NULL; } - Py_ssize_t current_distance = levenshtein_distance(name_str, item_str); + Py_ssize_t current_distance = levenshtein_distance( + name_str, name_size, item_str, item_size); if (current_distance == 0 || current_distance > MAX_DISTANCE) { continue; } @@ -138,7 +139,8 @@ static PyObject * offer_suggestions_for_name_error(PyNameErrorObject *exc) { PyObject *name = exc->name; // borrowed reference PyTracebackObject *traceback = (PyTracebackObject *) exc->traceback; // borrowed reference - // Abort if we don't have an attribute name or we have an invalid one + // Abort if we don't have a variable name or we have an invalid one + // or if we don't have a traceback to work with if (name == NULL || traceback == NULL || !PyUnicode_CheckExact(name)) { return NULL; } From 23acadcc1c75eb74b2459304af70d97a35001b34 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 14 Apr 2021 20:56:21 -0400 Subject: [PATCH 061/108] bpo-37741: make importlib.metadata docs discoverable through a module directive. (GH-25415) Automerge-Triggered-By: GH:jaraco --- Doc/library/importlib.metadata.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index fee5e677823f79..3cd200b7119923 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -4,6 +4,11 @@ Using :mod:`!importlib.metadata` ================================= +.. module:: importlib.metadata + :synopsis: The implementation of the importlib metadata. + +**Source code:** :source:`Lib/importlib/metadata.py` + .. note:: This functionality is provisional and may deviate from the usual version semantics of the standard library. From da7435017430671f86075449ff7bde96fd7700a5 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Thu, 15 Apr 2021 14:06:39 +0100 Subject: [PATCH 062/108] bpo-43823: Improve syntax errors for invalid dictionary literals (GH-25378) --- Grammar/python.gram | 11 + Lib/test/test_syntax.py | 32 + .../2021-04-13-03-06-09.bpo-43823.xpuHBi.rst | 2 + Parser/parser.c | 1142 +++++++++++------ 4 files changed, 823 insertions(+), 364 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-13-03-06-09.bpo-43823.xpuHBi.rst diff --git a/Grammar/python.gram b/Grammar/python.gram index 180d952b57a8d8..8e399f1b8ea91a 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -650,6 +650,8 @@ dict[expr_ty]: CHECK(asdl_expr_seq*, _PyPegen_get_keys(p, a)), CHECK(asdl_expr_seq*, _PyPegen_get_values(p, a)), EXTRA) } + | '{' invalid_double_starred_kvpairs '}' + dictcomp[expr_ty]: | '{' a=kvpair b=for_if_clauses '}' { _PyAST_DictComp(a->key, a->value, b, EXTRA) } | invalid_dict_comprehension @@ -882,3 +884,12 @@ invalid_elif_stmt: | 'elif' named_expression NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") } invalid_while_stmt: | 'while' named_expression NEWLINE { RAISE_SYNTAX_ERROR("expected ':'") } + +invalid_double_starred_kvpairs: + | ','.double_starred_kvpair+ ',' invalid_kvpair + | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use a starred expression in a dictionary value") } + | expression a=':' &('}'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "expression expected after dictionary key and ':'") } +invalid_kvpair: + | a=expression !(':') { RAISE_SYNTAX_ERROR("':' expected after dictionary key") } + | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use a starred expression in a dictionary value") } + | expression a=':' {RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "expression expected after dictionary key and ':'") } diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index bd6a4d339e736c..75b778d20e90a9 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -880,6 +880,38 @@ Traceback (most recent call last): SyntaxError: invalid syntax +Incomplete dictionary literals + + >>> {1:2, 3:4, 5} + Traceback (most recent call last): + SyntaxError: ':' expected after dictionary key + + >>> {1:2, 3:4, 5:} + Traceback (most recent call last): + SyntaxError: expression expected after dictionary key and ':' + + >>> {1: *12+1, 23: 1} + Traceback (most recent call last): + SyntaxError: cannot use a starred expression in a dictionary value + + >>> {1: *12+1} + Traceback (most recent call last): + SyntaxError: cannot use a starred expression in a dictionary value + + >>> {1: 23, 1: *12+1} + Traceback (most recent call last): + SyntaxError: cannot use a starred expression in a dictionary value + + >>> {1:} + Traceback (most recent call last): + SyntaxError: expression expected after dictionary key and ':' + + # Ensure that the error is not raise for syntax errors that happen after sets + + >>> {1} $ + Traceback (most recent call last): + SyntaxError: invalid syntax + Make sure that the old "raise X, Y[, Z]" form is gone: >>> raise X, Y Traceback (most recent call last): diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-13-03-06-09.bpo-43823.xpuHBi.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-13-03-06-09.bpo-43823.xpuHBi.rst new file mode 100644 index 00000000000000..96cf8eee16b7e9 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-13-03-06-09.bpo-43823.xpuHBi.rst @@ -0,0 +1,2 @@ +Improve syntax errors for invalid dictionary literals. Patch by Pablo +Galindo. diff --git a/Parser/parser.c b/Parser/parser.c index d158b2952baec9..2ead05225be5fd 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -268,191 +268,196 @@ static KeywordToken *reserved_keywords[] = { #define invalid_if_stmt_type 1200 #define invalid_elif_stmt_type 1201 #define invalid_while_stmt_type 1202 -#define _loop0_1_type 1203 -#define _loop0_2_type 1204 -#define _loop0_4_type 1205 -#define _gather_3_type 1206 -#define _loop0_6_type 1207 -#define _gather_5_type 1208 -#define _loop0_8_type 1209 -#define _gather_7_type 1210 -#define _loop0_10_type 1211 -#define _gather_9_type 1212 -#define _loop1_11_type 1213 -#define _loop0_13_type 1214 -#define _gather_12_type 1215 -#define _tmp_14_type 1216 -#define _tmp_15_type 1217 -#define _tmp_16_type 1218 -#define _tmp_17_type 1219 -#define _tmp_18_type 1220 -#define _tmp_19_type 1221 -#define _tmp_20_type 1222 -#define _tmp_21_type 1223 -#define _loop1_22_type 1224 -#define _tmp_23_type 1225 -#define _tmp_24_type 1226 -#define _loop0_26_type 1227 -#define _gather_25_type 1228 -#define _loop0_28_type 1229 -#define _gather_27_type 1230 -#define _tmp_29_type 1231 -#define _tmp_30_type 1232 -#define _loop0_31_type 1233 -#define _loop1_32_type 1234 -#define _loop0_34_type 1235 -#define _gather_33_type 1236 -#define _tmp_35_type 1237 -#define _loop0_37_type 1238 -#define _gather_36_type 1239 -#define _tmp_38_type 1240 -#define _loop0_40_type 1241 -#define _gather_39_type 1242 -#define _loop0_42_type 1243 -#define _gather_41_type 1244 -#define _loop0_44_type 1245 -#define _gather_43_type 1246 -#define _loop0_46_type 1247 -#define _gather_45_type 1248 -#define _tmp_47_type 1249 -#define _loop1_48_type 1250 -#define _tmp_49_type 1251 -#define _loop1_50_type 1252 -#define _loop0_52_type 1253 -#define _gather_51_type 1254 -#define _tmp_53_type 1255 -#define _tmp_54_type 1256 -#define _tmp_55_type 1257 -#define _loop0_57_type 1258 -#define _gather_56_type 1259 -#define _tmp_58_type 1260 -#define _loop0_60_type 1261 -#define _gather_59_type 1262 -#define _tmp_61_type 1263 -#define _loop0_63_type 1264 -#define _gather_62_type 1265 -#define _loop0_65_type 1266 -#define _gather_64_type 1267 -#define _tmp_66_type 1268 -#define _tmp_67_type 1269 -#define _tmp_68_type 1270 -#define _tmp_69_type 1271 -#define _loop0_70_type 1272 -#define _loop0_71_type 1273 -#define _loop0_72_type 1274 -#define _loop1_73_type 1275 -#define _loop0_74_type 1276 -#define _loop1_75_type 1277 -#define _loop1_76_type 1278 -#define _loop1_77_type 1279 -#define _loop0_78_type 1280 -#define _loop1_79_type 1281 -#define _loop0_80_type 1282 -#define _loop1_81_type 1283 -#define _loop0_82_type 1284 -#define _loop1_83_type 1285 -#define _loop1_84_type 1286 -#define _tmp_85_type 1287 -#define _loop1_86_type 1288 -#define _loop0_88_type 1289 -#define _gather_87_type 1290 -#define _loop1_89_type 1291 -#define _loop0_90_type 1292 -#define _loop0_91_type 1293 -#define _loop0_92_type 1294 -#define _loop1_93_type 1295 -#define _loop0_94_type 1296 -#define _loop1_95_type 1297 -#define _loop1_96_type 1298 -#define _loop1_97_type 1299 -#define _loop0_98_type 1300 -#define _loop1_99_type 1301 -#define _loop0_100_type 1302 -#define _loop1_101_type 1303 -#define _loop0_102_type 1304 -#define _loop1_103_type 1305 -#define _loop1_104_type 1306 -#define _loop1_105_type 1307 -#define _loop1_106_type 1308 -#define _tmp_107_type 1309 -#define _loop0_109_type 1310 -#define _gather_108_type 1311 -#define _tmp_110_type 1312 -#define _tmp_111_type 1313 -#define _tmp_112_type 1314 -#define _tmp_113_type 1315 -#define _loop1_114_type 1316 -#define _tmp_115_type 1317 -#define _tmp_116_type 1318 -#define _loop0_118_type 1319 -#define _gather_117_type 1320 -#define _loop1_119_type 1321 -#define _loop0_120_type 1322 -#define _loop0_121_type 1323 -#define _loop0_123_type 1324 -#define _gather_122_type 1325 -#define _tmp_124_type 1326 -#define _loop0_126_type 1327 -#define _gather_125_type 1328 -#define _loop0_128_type 1329 -#define _gather_127_type 1330 -#define _loop0_130_type 1331 -#define _gather_129_type 1332 -#define _loop0_132_type 1333 -#define _gather_131_type 1334 -#define _loop0_133_type 1335 -#define _loop0_135_type 1336 -#define _gather_134_type 1337 -#define _loop1_136_type 1338 -#define _tmp_137_type 1339 -#define _loop0_139_type 1340 -#define _gather_138_type 1341 -#define _loop0_141_type 1342 -#define _gather_140_type 1343 -#define _tmp_142_type 1344 -#define _tmp_143_type 1345 -#define _tmp_144_type 1346 -#define _tmp_145_type 1347 -#define _loop0_146_type 1348 -#define _loop0_147_type 1349 -#define _loop0_148_type 1350 -#define _tmp_149_type 1351 -#define _tmp_150_type 1352 -#define _tmp_151_type 1353 -#define _loop0_152_type 1354 -#define _loop1_153_type 1355 -#define _loop0_154_type 1356 -#define _loop1_155_type 1357 -#define _tmp_156_type 1358 -#define _tmp_157_type 1359 -#define _tmp_158_type 1360 -#define _loop0_160_type 1361 -#define _gather_159_type 1362 -#define _loop0_162_type 1363 -#define _gather_161_type 1364 -#define _tmp_163_type 1365 -#define _tmp_164_type 1366 -#define _tmp_165_type 1367 -#define _tmp_166_type 1368 -#define _tmp_167_type 1369 -#define _tmp_168_type 1370 -#define _tmp_169_type 1371 -#define _tmp_170_type 1372 -#define _tmp_171_type 1373 -#define _tmp_172_type 1374 -#define _tmp_173_type 1375 -#define _tmp_174_type 1376 -#define _tmp_175_type 1377 -#define _tmp_176_type 1378 -#define _tmp_177_type 1379 -#define _tmp_178_type 1380 -#define _tmp_179_type 1381 -#define _tmp_180_type 1382 -#define _tmp_181_type 1383 -#define _tmp_182_type 1384 -#define _tmp_183_type 1385 -#define _tmp_184_type 1386 -#define _tmp_185_type 1387 +#define invalid_double_starred_kvpairs_type 1203 +#define invalid_kvpair_type 1204 +#define _loop0_1_type 1205 +#define _loop0_2_type 1206 +#define _loop0_4_type 1207 +#define _gather_3_type 1208 +#define _loop0_6_type 1209 +#define _gather_5_type 1210 +#define _loop0_8_type 1211 +#define _gather_7_type 1212 +#define _loop0_10_type 1213 +#define _gather_9_type 1214 +#define _loop1_11_type 1215 +#define _loop0_13_type 1216 +#define _gather_12_type 1217 +#define _tmp_14_type 1218 +#define _tmp_15_type 1219 +#define _tmp_16_type 1220 +#define _tmp_17_type 1221 +#define _tmp_18_type 1222 +#define _tmp_19_type 1223 +#define _tmp_20_type 1224 +#define _tmp_21_type 1225 +#define _loop1_22_type 1226 +#define _tmp_23_type 1227 +#define _tmp_24_type 1228 +#define _loop0_26_type 1229 +#define _gather_25_type 1230 +#define _loop0_28_type 1231 +#define _gather_27_type 1232 +#define _tmp_29_type 1233 +#define _tmp_30_type 1234 +#define _loop0_31_type 1235 +#define _loop1_32_type 1236 +#define _loop0_34_type 1237 +#define _gather_33_type 1238 +#define _tmp_35_type 1239 +#define _loop0_37_type 1240 +#define _gather_36_type 1241 +#define _tmp_38_type 1242 +#define _loop0_40_type 1243 +#define _gather_39_type 1244 +#define _loop0_42_type 1245 +#define _gather_41_type 1246 +#define _loop0_44_type 1247 +#define _gather_43_type 1248 +#define _loop0_46_type 1249 +#define _gather_45_type 1250 +#define _tmp_47_type 1251 +#define _loop1_48_type 1252 +#define _tmp_49_type 1253 +#define _loop1_50_type 1254 +#define _loop0_52_type 1255 +#define _gather_51_type 1256 +#define _tmp_53_type 1257 +#define _tmp_54_type 1258 +#define _tmp_55_type 1259 +#define _loop0_57_type 1260 +#define _gather_56_type 1261 +#define _tmp_58_type 1262 +#define _loop0_60_type 1263 +#define _gather_59_type 1264 +#define _tmp_61_type 1265 +#define _loop0_63_type 1266 +#define _gather_62_type 1267 +#define _loop0_65_type 1268 +#define _gather_64_type 1269 +#define _tmp_66_type 1270 +#define _tmp_67_type 1271 +#define _tmp_68_type 1272 +#define _tmp_69_type 1273 +#define _loop0_70_type 1274 +#define _loop0_71_type 1275 +#define _loop0_72_type 1276 +#define _loop1_73_type 1277 +#define _loop0_74_type 1278 +#define _loop1_75_type 1279 +#define _loop1_76_type 1280 +#define _loop1_77_type 1281 +#define _loop0_78_type 1282 +#define _loop1_79_type 1283 +#define _loop0_80_type 1284 +#define _loop1_81_type 1285 +#define _loop0_82_type 1286 +#define _loop1_83_type 1287 +#define _loop1_84_type 1288 +#define _tmp_85_type 1289 +#define _loop1_86_type 1290 +#define _loop0_88_type 1291 +#define _gather_87_type 1292 +#define _loop1_89_type 1293 +#define _loop0_90_type 1294 +#define _loop0_91_type 1295 +#define _loop0_92_type 1296 +#define _loop1_93_type 1297 +#define _loop0_94_type 1298 +#define _loop1_95_type 1299 +#define _loop1_96_type 1300 +#define _loop1_97_type 1301 +#define _loop0_98_type 1302 +#define _loop1_99_type 1303 +#define _loop0_100_type 1304 +#define _loop1_101_type 1305 +#define _loop0_102_type 1306 +#define _loop1_103_type 1307 +#define _loop1_104_type 1308 +#define _loop1_105_type 1309 +#define _loop1_106_type 1310 +#define _tmp_107_type 1311 +#define _loop0_109_type 1312 +#define _gather_108_type 1313 +#define _tmp_110_type 1314 +#define _tmp_111_type 1315 +#define _tmp_112_type 1316 +#define _tmp_113_type 1317 +#define _loop1_114_type 1318 +#define _tmp_115_type 1319 +#define _tmp_116_type 1320 +#define _loop0_118_type 1321 +#define _gather_117_type 1322 +#define _loop1_119_type 1323 +#define _loop0_120_type 1324 +#define _loop0_121_type 1325 +#define _loop0_123_type 1326 +#define _gather_122_type 1327 +#define _tmp_124_type 1328 +#define _loop0_126_type 1329 +#define _gather_125_type 1330 +#define _loop0_128_type 1331 +#define _gather_127_type 1332 +#define _loop0_130_type 1333 +#define _gather_129_type 1334 +#define _loop0_132_type 1335 +#define _gather_131_type 1336 +#define _loop0_133_type 1337 +#define _loop0_135_type 1338 +#define _gather_134_type 1339 +#define _loop1_136_type 1340 +#define _tmp_137_type 1341 +#define _loop0_139_type 1342 +#define _gather_138_type 1343 +#define _loop0_141_type 1344 +#define _gather_140_type 1345 +#define _tmp_142_type 1346 +#define _tmp_143_type 1347 +#define _tmp_144_type 1348 +#define _tmp_145_type 1349 +#define _loop0_146_type 1350 +#define _loop0_147_type 1351 +#define _loop0_148_type 1352 +#define _tmp_149_type 1353 +#define _tmp_150_type 1354 +#define _tmp_151_type 1355 +#define _loop0_152_type 1356 +#define _loop1_153_type 1357 +#define _loop0_154_type 1358 +#define _loop1_155_type 1359 +#define _tmp_156_type 1360 +#define _tmp_157_type 1361 +#define _tmp_158_type 1362 +#define _loop0_160_type 1363 +#define _gather_159_type 1364 +#define _loop0_162_type 1365 +#define _gather_161_type 1366 +#define _tmp_163_type 1367 +#define _tmp_164_type 1368 +#define _loop0_166_type 1369 +#define _gather_165_type 1370 +#define _tmp_167_type 1371 +#define _tmp_168_type 1372 +#define _tmp_169_type 1373 +#define _tmp_170_type 1374 +#define _tmp_171_type 1375 +#define _tmp_172_type 1376 +#define _tmp_173_type 1377 +#define _tmp_174_type 1378 +#define _tmp_175_type 1379 +#define _tmp_176_type 1380 +#define _tmp_177_type 1381 +#define _tmp_178_type 1382 +#define _tmp_179_type 1383 +#define _tmp_180_type 1384 +#define _tmp_181_type 1385 +#define _tmp_182_type 1386 +#define _tmp_183_type 1387 +#define _tmp_184_type 1388 +#define _tmp_185_type 1389 +#define _tmp_186_type 1390 +#define _tmp_187_type 1391 +#define _tmp_188_type 1392 static mod_ty file_rule(Parser *p); static mod_ty interactive_rule(Parser *p); @@ -657,6 +662,8 @@ static void *invalid_case_block_rule(Parser *p); static void *invalid_if_stmt_rule(Parser *p); static void *invalid_elif_stmt_rule(Parser *p); static void *invalid_while_stmt_rule(Parser *p); +static void *invalid_double_starred_kvpairs_rule(Parser *p); +static void *invalid_kvpair_rule(Parser *p); static asdl_seq *_loop0_1_rule(Parser *p); static asdl_seq *_loop0_2_rule(Parser *p); static asdl_seq *_loop0_4_rule(Parser *p); @@ -821,8 +828,8 @@ static asdl_seq *_loop0_162_rule(Parser *p); static asdl_seq *_gather_161_rule(Parser *p); static void *_tmp_163_rule(Parser *p); static void *_tmp_164_rule(Parser *p); -static void *_tmp_165_rule(Parser *p); -static void *_tmp_166_rule(Parser *p); +static asdl_seq *_loop0_166_rule(Parser *p); +static asdl_seq *_gather_165_rule(Parser *p); static void *_tmp_167_rule(Parser *p); static void *_tmp_168_rule(Parser *p); static void *_tmp_169_rule(Parser *p); @@ -842,6 +849,9 @@ static void *_tmp_182_rule(Parser *p); static void *_tmp_183_rule(Parser *p); static void *_tmp_184_rule(Parser *p); static void *_tmp_185_rule(Parser *p); +static void *_tmp_186_rule(Parser *p); +static void *_tmp_187_rule(Parser *p); +static void *_tmp_188_rule(Parser *p); // file: statements? $ @@ -14254,7 +14264,7 @@ setcomp_rule(Parser *p) return _res; } -// dict: '{' double_starred_kvpairs? '}' +// dict: '{' double_starred_kvpairs? '}' | '{' invalid_double_starred_kvpairs '}' static expr_ty dict_rule(Parser *p) { @@ -14313,6 +14323,31 @@ dict_rule(Parser *p) D(fprintf(stderr, "%*c%s dict[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{' double_starred_kvpairs? '}'")); } + { // '{' invalid_double_starred_kvpairs '}' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> dict[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{' invalid_double_starred_kvpairs '}'")); + Token * _literal; + Token * _literal_1; + void *invalid_double_starred_kvpairs_var; + if ( + (_literal = _PyPegen_expect_token(p, 25)) // token='{' + && + (invalid_double_starred_kvpairs_var = invalid_double_starred_kvpairs_rule(p)) // invalid_double_starred_kvpairs + && + (_literal_1 = _PyPegen_expect_token(p, 26)) // token='}' + ) + { + D(fprintf(stderr, "%*c+ dict[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{' invalid_double_starred_kvpairs '}'")); + _res = _PyPegen_dummy_name(p, _literal, invalid_double_starred_kvpairs_var, _literal_1); + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s dict[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{' invalid_double_starred_kvpairs '}'")); + } _res = NULL; done: D(p->level--); @@ -19133,6 +19168,216 @@ invalid_while_stmt_rule(Parser *p) return _res; } +// invalid_double_starred_kvpairs: +// | ','.double_starred_kvpair+ ',' invalid_kvpair +// | expression ':' '*' bitwise_or +// | expression ':' &('}' | ',') +static void * +invalid_double_starred_kvpairs_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // ','.double_starred_kvpair+ ',' invalid_kvpair + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_double_starred_kvpairs[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.double_starred_kvpair+ ',' invalid_kvpair")); + asdl_seq * _gather_165_var; + Token * _literal; + void *invalid_kvpair_var; + if ( + (_gather_165_var = _gather_165_rule(p)) // ','.double_starred_kvpair+ + && + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + && + (invalid_kvpair_var = invalid_kvpair_rule(p)) // invalid_kvpair + ) + { + D(fprintf(stderr, "%*c+ invalid_double_starred_kvpairs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.double_starred_kvpair+ ',' invalid_kvpair")); + _res = _PyPegen_dummy_name(p, _gather_165_var, _literal, invalid_kvpair_var); + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_double_starred_kvpairs[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','.double_starred_kvpair+ ',' invalid_kvpair")); + } + { // expression ':' '*' bitwise_or + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_double_starred_kvpairs[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ':' '*' bitwise_or")); + Token * _literal; + Token * a; + expr_ty bitwise_or_var; + expr_ty expression_var; + if ( + (expression_var = expression_rule(p)) // expression + && + (_literal = _PyPegen_expect_token(p, 11)) // token=':' + && + (a = _PyPegen_expect_token(p, 16)) // token='*' + && + (bitwise_or_var = bitwise_or_rule(p)) // bitwise_or + ) + { + D(fprintf(stderr, "%*c+ invalid_double_starred_kvpairs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ':' '*' bitwise_or")); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "cannot use a starred expression in a dictionary value" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_double_starred_kvpairs[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ':' '*' bitwise_or")); + } + { // expression ':' &('}' | ',') + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_double_starred_kvpairs[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ':' &('}' | ',')")); + Token * a; + expr_ty expression_var; + if ( + (expression_var = expression_rule(p)) // expression + && + (a = _PyPegen_expect_token(p, 11)) // token=':' + && + _PyPegen_lookahead(1, _tmp_167_rule, p) + ) + { + D(fprintf(stderr, "%*c+ invalid_double_starred_kvpairs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ':' &('}' | ',')")); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "expression expected after dictionary key and ':'" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_double_starred_kvpairs[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ':' &('}' | ',')")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// invalid_kvpair: expression !(':') | expression ':' '*' bitwise_or | expression ':' +static void * +invalid_kvpair_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // expression !(':') + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_kvpair[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression !(':')")); + expr_ty a; + if ( + (a = expression_rule(p)) // expression + && + _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 11) // token=(':') + ) + { + D(fprintf(stderr, "%*c+ invalid_kvpair[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !(':')")); + _res = RAISE_SYNTAX_ERROR ( "':' expected after dictionary key" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_kvpair[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression !(':')")); + } + { // expression ':' '*' bitwise_or + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_kvpair[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ':' '*' bitwise_or")); + Token * _literal; + Token * a; + expr_ty bitwise_or_var; + expr_ty expression_var; + if ( + (expression_var = expression_rule(p)) // expression + && + (_literal = _PyPegen_expect_token(p, 11)) // token=':' + && + (a = _PyPegen_expect_token(p, 16)) // token='*' + && + (bitwise_or_var = bitwise_or_rule(p)) // bitwise_or + ) + { + D(fprintf(stderr, "%*c+ invalid_kvpair[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ':' '*' bitwise_or")); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "cannot use a starred expression in a dictionary value" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_kvpair[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ':' '*' bitwise_or")); + } + { // expression ':' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_kvpair[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ':'")); + Token * a; + expr_ty expression_var; + if ( + (expression_var = expression_rule(p)) // expression + && + (a = _PyPegen_expect_token(p, 11)) // token=':' + ) + { + D(fprintf(stderr, "%*c+ invalid_kvpair[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ':'")); + _res = RAISE_SYNTAX_ERROR_KNOWN_LOCATION ( a , "expression expected after dictionary key and ':'" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_kvpair[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ':'")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + // _loop0_1: NEWLINE static asdl_seq * _loop0_1_rule(Parser *p) @@ -20381,12 +20626,12 @@ _loop1_22_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_22[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_165_var; + void *_tmp_168_var; while ( - (_tmp_165_var = _tmp_165_rule(p)) // star_targets '=' + (_tmp_168_var = _tmp_168_rule(p)) // star_targets '=' ) { - _res = _tmp_165_var; + _res = _tmp_168_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -20889,12 +21134,12 @@ _loop0_31_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_31[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_166_var; + void *_tmp_169_var; while ( - (_tmp_166_var = _tmp_166_rule(p)) // '.' | '...' + (_tmp_169_var = _tmp_169_rule(p)) // '.' | '...' ) { - _res = _tmp_166_var; + _res = _tmp_169_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -20955,12 +21200,12 @@ _loop1_32_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_32[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_167_var; + void *_tmp_170_var; while ( - (_tmp_167_var = _tmp_167_rule(p)) // '.' | '...' + (_tmp_170_var = _tmp_170_rule(p)) // '.' | '...' ) { - _res = _tmp_167_var; + _res = _tmp_170_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -24071,12 +24316,12 @@ _loop1_84_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_84[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('@' named_expression NEWLINE)")); - void *_tmp_168_var; + void *_tmp_171_var; while ( - (_tmp_168_var = _tmp_168_rule(p)) // '@' named_expression NEWLINE + (_tmp_171_var = _tmp_171_rule(p)) // '@' named_expression NEWLINE ) { - _res = _tmp_168_var; + _res = _tmp_171_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -24189,12 +24434,12 @@ _loop1_86_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_86[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_expression)")); - void *_tmp_169_var; + void *_tmp_172_var; while ( - (_tmp_169_var = _tmp_169_rule(p)) // ',' star_expression + (_tmp_172_var = _tmp_172_rule(p)) // ',' star_expression ) { - _res = _tmp_169_var; + _res = _tmp_172_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -24374,12 +24619,12 @@ _loop1_89_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_89[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' expression)")); - void *_tmp_170_var; + void *_tmp_173_var; while ( - (_tmp_170_var = _tmp_170_rule(p)) // ',' expression + (_tmp_173_var = _tmp_173_rule(p)) // ',' expression ) { - _res = _tmp_170_var; + _res = _tmp_173_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -25404,12 +25649,12 @@ _loop1_104_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_104[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('or' conjunction)")); - void *_tmp_171_var; + void *_tmp_174_var; while ( - (_tmp_171_var = _tmp_171_rule(p)) // 'or' conjunction + (_tmp_174_var = _tmp_174_rule(p)) // 'or' conjunction ) { - _res = _tmp_171_var; + _res = _tmp_174_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -25475,12 +25720,12 @@ _loop1_105_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_105[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('and' inversion)")); - void *_tmp_172_var; + void *_tmp_175_var; while ( - (_tmp_172_var = _tmp_172_rule(p)) // 'and' inversion + (_tmp_175_var = _tmp_175_rule(p)) // 'and' inversion ) { - _res = _tmp_172_var; + _res = _tmp_175_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26396,12 +26641,12 @@ _loop0_120_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_173_var; + void *_tmp_176_var; while ( - (_tmp_173_var = _tmp_173_rule(p)) // 'if' disjunction + (_tmp_176_var = _tmp_176_rule(p)) // 'if' disjunction ) { - _res = _tmp_173_var; + _res = _tmp_176_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26462,12 +26707,12 @@ _loop0_121_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_174_var; + void *_tmp_177_var; while ( - (_tmp_174_var = _tmp_174_rule(p)) // 'if' disjunction + (_tmp_177_var = _tmp_177_rule(p)) // 'if' disjunction ) { - _res = _tmp_174_var; + _res = _tmp_177_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26533,7 +26778,7 @@ _loop0_123_rule(Parser *p) while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_175_rule(p)) // starred_expression | direct_named_expression !'=' + (elem = _tmp_178_rule(p)) // starred_expression | direct_named_expression !'=' ) { _res = elem; @@ -26596,7 +26841,7 @@ _gather_122_rule(Parser *p) void *elem; asdl_seq * seq; if ( - (elem = _tmp_175_rule(p)) // starred_expression | direct_named_expression !'=' + (elem = _tmp_178_rule(p)) // starred_expression | direct_named_expression !'=' && (seq = _loop0_123_rule(p)) // _loop0_123 ) @@ -27142,12 +27387,12 @@ _loop0_133_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_176_var; + void *_tmp_179_var; while ( - (_tmp_176_var = _tmp_176_rule(p)) // ',' star_target + (_tmp_179_var = _tmp_179_rule(p)) // ',' star_target ) { - _res = _tmp_176_var; + _res = _tmp_179_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -27322,12 +27567,12 @@ _loop1_136_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_177_var; + void *_tmp_180_var; while ( - (_tmp_177_var = _tmp_177_rule(p)) // ',' star_target + (_tmp_180_var = _tmp_180_rule(p)) // ',' star_target ) { - _res = _tmp_177_var; + _res = _tmp_180_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -28062,12 +28307,12 @@ _loop0_147_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_178_var; + void *_tmp_181_var; while ( - (_tmp_178_var = _tmp_178_rule(p)) // star_targets '=' + (_tmp_181_var = _tmp_181_rule(p)) // star_targets '=' ) { - _res = _tmp_178_var; + _res = _tmp_181_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -28128,12 +28373,12 @@ _loop0_148_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_179_var; + void *_tmp_182_var; while ( - (_tmp_179_var = _tmp_179_rule(p)) // star_targets '=' + (_tmp_182_var = _tmp_182_rule(p)) // star_targets '=' ) { - _res = _tmp_179_var; + _res = _tmp_182_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -28662,15 +28907,15 @@ _tmp_156_rule(Parser *p) } D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); Token * _literal; - void *_tmp_180_var; + void *_tmp_183_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_180_var = _tmp_180_rule(p)) // ')' | '**' + (_tmp_183_var = _tmp_183_rule(p)) // ')' | '**' ) { D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_180_var); + _res = _PyPegen_dummy_name(p, _literal, _tmp_183_var); goto done; } p->mark = _mark; @@ -28720,15 +28965,15 @@ _tmp_157_rule(Parser *p) } D(fprintf(stderr, "%*c> _tmp_157[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); Token * _literal; - void *_tmp_181_var; + void *_tmp_184_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_181_var = _tmp_181_rule(p)) // ':' | '**' + (_tmp_184_var = _tmp_184_rule(p)) // ':' | '**' ) { D(fprintf(stderr, "%*c+ _tmp_157[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_181_var); + _res = _PyPegen_dummy_name(p, _literal, _tmp_184_var); goto done; } p->mark = _mark; @@ -28847,7 +29092,7 @@ _loop0_160_rule(Parser *p) while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_182_rule(p)) // expression ['as' star_target] + (elem = _tmp_185_rule(p)) // expression ['as' star_target] ) { _res = elem; @@ -28910,7 +29155,7 @@ _gather_159_rule(Parser *p) void *elem; asdl_seq * seq; if ( - (elem = _tmp_182_rule(p)) // expression ['as' star_target] + (elem = _tmp_185_rule(p)) // expression ['as' star_target] && (seq = _loop0_160_rule(p)) // _loop0_160 ) @@ -28961,7 +29206,7 @@ _loop0_162_rule(Parser *p) while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_183_rule(p)) // expressions ['as' star_target] + (elem = _tmp_186_rule(p)) // expressions ['as' star_target] ) { _res = elem; @@ -29024,7 +29269,7 @@ _gather_161_rule(Parser *p) void *elem; asdl_seq * seq; if ( - (elem = _tmp_183_rule(p)) // expressions ['as' star_target] + (elem = _tmp_186_rule(p)) // expressions ['as' star_target] && (seq = _loop0_162_rule(p)) // _loop0_162 ) @@ -29121,9 +29366,178 @@ _tmp_164_rule(Parser *p) return _res; } -// _tmp_165: star_targets '=' +// _loop0_166: ',' double_starred_kvpair +static asdl_seq * +_loop0_166_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void *_res = NULL; + int _mark = p->mark; + int _start_mark = p->mark; + void **_children = PyMem_Malloc(sizeof(void *)); + if (!_children) { + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + Py_ssize_t _children_capacity = 1; + Py_ssize_t _n = 0; + { // ',' double_starred_kvpair + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _loop0_166[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' double_starred_kvpair")); + Token * _literal; + KeyValuePair* elem; + while ( + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + && + (elem = double_starred_kvpair_rule(p)) // double_starred_kvpair + ) + { + _res = elem; + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + PyMem_Free(_children); + D(p->level--); + return NULL; + } + if (_n == _children_capacity) { + _children_capacity *= 2; + void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); + if (!_new_children) { + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + _children = _new_children; + } + _children[_n++] = _res; + _mark = p->mark; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _loop0_166[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' double_starred_kvpair")); + } + asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); + if (!_seq) { + PyMem_Free(_children); + p->error_indicator = 1; + PyErr_NoMemory(); + D(p->level--); + return NULL; + } + for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); + PyMem_Free(_children); + _PyPegen_insert_memo(p, _start_mark, _loop0_166_type, _seq); + D(p->level--); + return _seq; +} + +// _gather_165: double_starred_kvpair _loop0_166 +static asdl_seq * +_gather_165_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + asdl_seq * _res = NULL; + int _mark = p->mark; + { // double_starred_kvpair _loop0_166 + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _gather_165[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_166")); + KeyValuePair* elem; + asdl_seq * seq; + if ( + (elem = double_starred_kvpair_rule(p)) // double_starred_kvpair + && + (seq = _loop0_166_rule(p)) // _loop0_166 + ) + { + D(fprintf(stderr, "%*c+ _gather_165[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_166")); + _res = _PyPegen_seq_insert_in_front(p, elem, seq); + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _gather_165[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "double_starred_kvpair _loop0_166")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _tmp_167: '}' | ',' static void * -_tmp_165_rule(Parser *p) +_tmp_167_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // '}' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'}'")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 26)) // token='}' + ) + { + D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'}'")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'}'")); + } + { // ',' + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); + Token * _literal; + if ( + (_literal = _PyPegen_expect_token(p, 12)) // token=',' + ) + { + D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); + _res = _literal; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _tmp_168: star_targets '=' +static void * +_tmp_168_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29137,7 +29551,7 @@ _tmp_165_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_165[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_168[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty z; if ( @@ -29146,7 +29560,7 @@ _tmp_165_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_165[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_168[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29156,7 +29570,7 @@ _tmp_165_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_165[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_168[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -29165,9 +29579,9 @@ _tmp_165_rule(Parser *p) return _res; } -// _tmp_166: '.' | '...' +// _tmp_169: '.' | '...' static void * -_tmp_166_rule(Parser *p) +_tmp_169_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29181,18 +29595,18 @@ _tmp_166_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_166[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_169[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_166[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_169[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_166[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_169[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -29200,18 +29614,18 @@ _tmp_166_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_166[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_169[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_166[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_169[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_166[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_169[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -29220,9 +29634,9 @@ _tmp_166_rule(Parser *p) return _res; } -// _tmp_167: '.' | '...' +// _tmp_170: '.' | '...' static void * -_tmp_167_rule(Parser *p) +_tmp_170_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29236,18 +29650,18 @@ _tmp_167_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -29255,18 +29669,18 @@ _tmp_167_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -29275,9 +29689,9 @@ _tmp_167_rule(Parser *p) return _res; } -// _tmp_168: '@' named_expression NEWLINE +// _tmp_171: '@' named_expression NEWLINE static void * -_tmp_168_rule(Parser *p) +_tmp_171_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29291,7 +29705,7 @@ _tmp_168_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_168[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); Token * _literal; expr_ty f; Token * newline_var; @@ -29303,7 +29717,7 @@ _tmp_168_rule(Parser *p) (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' ) { - D(fprintf(stderr, "%*c+ _tmp_168[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); _res = f; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29313,7 +29727,7 @@ _tmp_168_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_168[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'@' named_expression NEWLINE")); } _res = NULL; @@ -29322,9 +29736,9 @@ _tmp_168_rule(Parser *p) return _res; } -// _tmp_169: ',' star_expression +// _tmp_172: ',' star_expression static void * -_tmp_169_rule(Parser *p) +_tmp_172_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29338,7 +29752,7 @@ _tmp_169_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_169[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c> _tmp_172[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); Token * _literal; expr_ty c; if ( @@ -29347,7 +29761,7 @@ _tmp_169_rule(Parser *p) (c = star_expression_rule(p)) // star_expression ) { - D(fprintf(stderr, "%*c+ _tmp_169[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c+ _tmp_172[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29357,7 +29771,7 @@ _tmp_169_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_169[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_172[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_expression")); } _res = NULL; @@ -29366,9 +29780,9 @@ _tmp_169_rule(Parser *p) return _res; } -// _tmp_170: ',' expression +// _tmp_173: ',' expression static void * -_tmp_170_rule(Parser *p) +_tmp_173_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29382,7 +29796,7 @@ _tmp_170_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c> _tmp_173[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); Token * _literal; expr_ty c; if ( @@ -29391,7 +29805,7 @@ _tmp_170_rule(Parser *p) (c = expression_rule(p)) // expression ) { - D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c+ _tmp_173[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29401,7 +29815,7 @@ _tmp_170_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_173[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' expression")); } _res = NULL; @@ -29410,9 +29824,9 @@ _tmp_170_rule(Parser *p) return _res; } -// _tmp_171: 'or' conjunction +// _tmp_174: 'or' conjunction static void * -_tmp_171_rule(Parser *p) +_tmp_174_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29426,7 +29840,7 @@ _tmp_171_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c> _tmp_174[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); Token * _keyword; expr_ty c; if ( @@ -29435,7 +29849,7 @@ _tmp_171_rule(Parser *p) (c = conjunction_rule(p)) // conjunction ) { - D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c+ _tmp_174[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29445,7 +29859,7 @@ _tmp_171_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_174[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'or' conjunction")); } _res = NULL; @@ -29454,9 +29868,9 @@ _tmp_171_rule(Parser *p) return _res; } -// _tmp_172: 'and' inversion +// _tmp_175: 'and' inversion static void * -_tmp_172_rule(Parser *p) +_tmp_175_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29470,7 +29884,7 @@ _tmp_172_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_172[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); Token * _keyword; expr_ty c; if ( @@ -29479,7 +29893,7 @@ _tmp_172_rule(Parser *p) (c = inversion_rule(p)) // inversion ) { - D(fprintf(stderr, "%*c+ _tmp_172[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29489,7 +29903,7 @@ _tmp_172_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_172[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'and' inversion")); } _res = NULL; @@ -29498,9 +29912,9 @@ _tmp_172_rule(Parser *p) return _res; } -// _tmp_173: 'if' disjunction +// _tmp_176: 'if' disjunction static void * -_tmp_173_rule(Parser *p) +_tmp_176_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29514,7 +29928,7 @@ _tmp_173_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_173[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_176[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -29523,7 +29937,7 @@ _tmp_173_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_173[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_176[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29533,7 +29947,7 @@ _tmp_173_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_173[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_176[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -29542,9 +29956,9 @@ _tmp_173_rule(Parser *p) return _res; } -// _tmp_174: 'if' disjunction +// _tmp_177: 'if' disjunction static void * -_tmp_174_rule(Parser *p) +_tmp_177_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29558,7 +29972,7 @@ _tmp_174_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_174[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -29567,7 +29981,7 @@ _tmp_174_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_174[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_177[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29577,7 +29991,7 @@ _tmp_174_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_174[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_177[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -29586,9 +30000,9 @@ _tmp_174_rule(Parser *p) return _res; } -// _tmp_175: starred_expression | direct_named_expression !'=' +// _tmp_178: starred_expression | direct_named_expression !'=' static void * -_tmp_175_rule(Parser *p) +_tmp_178_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29602,18 +30016,18 @@ _tmp_175_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); expr_ty starred_expression_var; if ( (starred_expression_var = starred_expression_rule(p)) // starred_expression ) { - D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); _res = starred_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression")); } { // direct_named_expression !'=' @@ -29621,7 +30035,7 @@ _tmp_175_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); + D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); expr_ty direct_named_expression_var; if ( (direct_named_expression_var = direct_named_expression_rule(p)) // direct_named_expression @@ -29629,12 +30043,12 @@ _tmp_175_rule(Parser *p) _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); + D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); _res = direct_named_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "direct_named_expression !'='")); } _res = NULL; @@ -29643,9 +30057,9 @@ _tmp_175_rule(Parser *p) return _res; } -// _tmp_176: ',' star_target +// _tmp_179: ',' star_target static void * -_tmp_176_rule(Parser *p) +_tmp_179_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29659,7 +30073,7 @@ _tmp_176_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_176[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -29668,7 +30082,7 @@ _tmp_176_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_176[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29678,7 +30092,7 @@ _tmp_176_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_176[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -29687,9 +30101,9 @@ _tmp_176_rule(Parser *p) return _res; } -// _tmp_177: ',' star_target +// _tmp_180: ',' star_target static void * -_tmp_177_rule(Parser *p) +_tmp_180_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29703,7 +30117,7 @@ _tmp_177_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -29712,7 +30126,7 @@ _tmp_177_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_177[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29722,7 +30136,7 @@ _tmp_177_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_177[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -29731,9 +30145,9 @@ _tmp_177_rule(Parser *p) return _res; } -// _tmp_178: star_targets '=' +// _tmp_181: star_targets '=' static void * -_tmp_178_rule(Parser *p) +_tmp_181_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29747,7 +30161,7 @@ _tmp_178_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -29756,12 +30170,12 @@ _tmp_178_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -29770,9 +30184,9 @@ _tmp_178_rule(Parser *p) return _res; } -// _tmp_179: star_targets '=' +// _tmp_182: star_targets '=' static void * -_tmp_179_rule(Parser *p) +_tmp_182_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29786,7 +30200,7 @@ _tmp_179_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -29795,12 +30209,12 @@ _tmp_179_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -29809,9 +30223,9 @@ _tmp_179_rule(Parser *p) return _res; } -// _tmp_180: ')' | '**' +// _tmp_183: ')' | '**' static void * -_tmp_180_rule(Parser *p) +_tmp_183_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29825,18 +30239,18 @@ _tmp_180_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // '**' @@ -29844,18 +30258,18 @@ _tmp_180_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -29864,9 +30278,9 @@ _tmp_180_rule(Parser *p) return _res; } -// _tmp_181: ':' | '**' +// _tmp_184: ':' | '**' static void * -_tmp_181_rule(Parser *p) +_tmp_184_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29880,18 +30294,18 @@ _tmp_181_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // '**' @@ -29899,18 +30313,18 @@ _tmp_181_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -29919,9 +30333,9 @@ _tmp_181_rule(Parser *p) return _res; } -// _tmp_182: expression ['as' star_target] +// _tmp_185: expression ['as' star_target] static void * -_tmp_182_rule(Parser *p) +_tmp_185_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29935,22 +30349,22 @@ _tmp_182_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); + D(fprintf(stderr, "%*c> _tmp_185[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings expr_ty expression_var; if ( (expression_var = expression_rule(p)) // expression && - (_opt_var = _tmp_184_rule(p), 1) // ['as' star_target] + (_opt_var = _tmp_187_rule(p), 1) // ['as' star_target] ) { - D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); + D(fprintf(stderr, "%*c+ _tmp_185[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); _res = _PyPegen_dummy_name(p, expression_var, _opt_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_185[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ['as' star_target]")); } _res = NULL; @@ -29959,9 +30373,9 @@ _tmp_182_rule(Parser *p) return _res; } -// _tmp_183: expressions ['as' star_target] +// _tmp_186: expressions ['as' star_target] static void * -_tmp_183_rule(Parser *p) +_tmp_186_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29975,22 +30389,22 @@ _tmp_183_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); + D(fprintf(stderr, "%*c> _tmp_186[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings expr_ty expressions_var; if ( (expressions_var = expressions_rule(p)) // expressions && - (_opt_var = _tmp_185_rule(p), 1) // ['as' star_target] + (_opt_var = _tmp_188_rule(p), 1) // ['as' star_target] ) { - D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); + D(fprintf(stderr, "%*c+ _tmp_186[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); _res = _PyPegen_dummy_name(p, expressions_var, _opt_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_186[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expressions ['as' star_target]")); } _res = NULL; @@ -29999,9 +30413,9 @@ _tmp_183_rule(Parser *p) return _res; } -// _tmp_184: 'as' star_target +// _tmp_187: 'as' star_target static void * -_tmp_184_rule(Parser *p) +_tmp_187_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30015,7 +30429,7 @@ _tmp_184_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c> _tmp_187[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); Token * _keyword; expr_ty star_target_var; if ( @@ -30024,12 +30438,12 @@ _tmp_184_rule(Parser *p) (star_target_var = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c+ _tmp_187[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); _res = _PyPegen_dummy_name(p, _keyword, star_target_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_187[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target")); } _res = NULL; @@ -30038,9 +30452,9 @@ _tmp_184_rule(Parser *p) return _res; } -// _tmp_185: 'as' star_target +// _tmp_188: 'as' star_target static void * -_tmp_185_rule(Parser *p) +_tmp_188_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30054,7 +30468,7 @@ _tmp_185_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_185[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c> _tmp_188[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); Token * _keyword; expr_ty star_target_var; if ( @@ -30063,12 +30477,12 @@ _tmp_185_rule(Parser *p) (star_target_var = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_185[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c+ _tmp_188[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); _res = _PyPegen_dummy_name(p, _keyword, star_target_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_185[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_188[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target")); } _res = NULL; From 11e0b295dee235dd6fd66a10d4823b0dcb014dc4 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 15 Apr 2021 14:28:56 +0100 Subject: [PATCH 063/108] bpo-43846: Use less stack for large literals and calls (GH-25403) * Modify compiler to reduce stack consumption for large expressions. * Add more tests for stack usage. * Add NEWS item. * Raise SystemError for truly excessive stack use. --- Lib/test/test_compile.py | 26 +++ .../2021-04-14-13-53-08.bpo-43846.2jO97c.rst | 1 + Python/compile.c | 194 +++++++++++++----- 3 files changed, 171 insertions(+), 50 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-14-13-53-08.bpo-43846.2jO97c.rst diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index c0de3bef5b6c9e..fd1ef612fd6131 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -961,6 +961,32 @@ def test_if_else(self): def test_binop(self): self.check_stack_size("x + " * self.N + "x") + def test_list(self): + self.check_stack_size("[" + "x, " * self.N + "x]") + + def test_tuple(self): + self.check_stack_size("(" + "x, " * self.N + "x)") + + def test_set(self): + self.check_stack_size("{" + "x, " * self.N + "x}") + + def test_dict(self): + self.check_stack_size("{" + "x:x, " * self.N + "x:x}") + + def test_func_args(self): + self.check_stack_size("f(" + "x, " * self.N + ")") + + def test_func_kwargs(self): + kwargs = (f'a{i}=x' for i in range(self.N)) + self.check_stack_size("f(" + ", ".join(kwargs) + ")") + + def test_func_args(self): + self.check_stack_size("o.m(" + "x, " * self.N + ")") + + def test_meth_kwargs(self): + kwargs = (f'a{i}=x' for i in range(self.N)) + self.check_stack_size("o.m(" + ", ".join(kwargs) + ")") + def test_func_and(self): code = "def f(x):\n" code += " x and x\n" * self.N diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-14-13-53-08.bpo-43846.2jO97c.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-14-13-53-08.bpo-43846.2jO97c.rst new file mode 100644 index 00000000000000..220690cd813743 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-14-13-53-08.bpo-43846.2jO97c.rst @@ -0,0 +1 @@ +Data stack usage is much reduced for large literal and call expressions. diff --git a/Python/compile.c b/Python/compile.c index 85bc87dbf68206..11d910b5b7d58a 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -43,6 +43,30 @@ #define COMP_SETCOMP 2 #define COMP_DICTCOMP 3 +/* A soft limit for stack use, to avoid excessive + * memory use for large constants, etc. + * + * The value 30 is plucked out of thin air. + * Code that could use more stack than this is + * rare, so the exact value is unimportant. + */ +#define STACK_USE_GUIDELINE 30 + +/* If we exceed this limit, it should + * be considered a compiler bug. + * Currently it should be impossible + * to exceed STACK_USE_GUIDELINE * 100, + * as 100 is the maximum parse depth. + * For performance reasons we will + * want to reduce this to a + * few hundred in the future. + * + * NOTE: Whatever MAX_ALLOWED_STACK_USE is + * set to, it should never restrict what Python + * we can write, just how we compile it. + */ +#define MAX_ALLOWED_STACK_USE (STACK_USE_GUIDELINE * 100) + #define IS_TOP_LEVEL_AWAIT(c) ( \ (c->c_flags->cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT) \ && (c->u->u_ste->ste_type == ModuleBlock)) @@ -1403,7 +1427,7 @@ compiler_addop_name(struct compiler *c, int opcode, PyObject *dict, */ static int -compiler_addop_i(struct compiler *c, int opcode, Py_ssize_t oparg) +compiler_addop_i_line(struct compiler *c, int opcode, Py_ssize_t oparg, int lineno) { struct instr *i; int off; @@ -1424,10 +1448,22 @@ compiler_addop_i(struct compiler *c, int opcode, Py_ssize_t oparg) i = &c->u->u_curblock->b_instr[off]; i->i_opcode = opcode; i->i_oparg = Py_SAFE_DOWNCAST(oparg, Py_ssize_t, int); - i->i_lineno = c->u->u_lineno; + i->i_lineno = lineno; return 1; } +static int +compiler_addop_i(struct compiler *c, int opcode, Py_ssize_t oparg) +{ + return compiler_addop_i_line(c, opcode, oparg, c->u->u_lineno); +} + +static int +compiler_addop_i_noline(struct compiler *c, int opcode, Py_ssize_t oparg) +{ + return compiler_addop_i_line(c, opcode, oparg, -1); +} + static int add_jump_to_block(basicblock *b, int opcode, int lineno, basicblock *target) { assert(HAS_ARG(opcode)); @@ -1527,6 +1563,11 @@ compiler_addop_j_noline(struct compiler *c, int opcode, basicblock *b) return 0; \ } +#define ADDOP_I_NOLINE(C, OP, O) { \ + if (!compiler_addop_i_noline((C), (OP), (O))) \ + return 0; \ +} + #define ADDOP_JUMP(C, OP, O) { \ if (!compiler_addop_j((C), (OP), (O))) \ return 0; \ @@ -3707,14 +3748,13 @@ starunpack_helper(struct compiler *c, asdl_expr_seq *elts, int pushed, int build, int add, int extend, int tuple) { Py_ssize_t n = asdl_seq_LEN(elts); - Py_ssize_t i, seen_star = 0; if (n > 2 && are_all_items_const(elts, 0, n)) { PyObject *folded = PyTuple_New(n); if (folded == NULL) { return 0; } PyObject *val; - for (i = 0; i < n; i++) { + for (Py_ssize_t i = 0; i < n; i++) { val = ((expr_ty)asdl_seq_GET(elts, i))->v.Constant.value; Py_INCREF(val); PyTuple_SET_ITEM(folded, i, val); @@ -3735,38 +3775,16 @@ starunpack_helper(struct compiler *c, asdl_expr_seq *elts, int pushed, return 1; } - for (i = 0; i < n; i++) { + int big = n+pushed > STACK_USE_GUIDELINE; + int seen_star = 0; + for (Py_ssize_t i = 0; i < n; i++) { expr_ty elt = asdl_seq_GET(elts, i); if (elt->kind == Starred_kind) { seen_star = 1; } } - if (seen_star) { - seen_star = 0; - for (i = 0; i < n; i++) { - expr_ty elt = asdl_seq_GET(elts, i); - if (elt->kind == Starred_kind) { - if (seen_star == 0) { - ADDOP_I(c, build, i+pushed); - seen_star = 1; - } - VISIT(c, expr, elt->v.Starred.value); - ADDOP_I(c, extend, 1); - } - else { - VISIT(c, expr, elt); - if (seen_star) { - ADDOP_I(c, add, 1); - } - } - } - assert(seen_star); - if (tuple) { - ADDOP(c, LIST_TO_TUPLE); - } - } - else { - for (i = 0; i < n; i++) { + if (!seen_star && !big) { + for (Py_ssize_t i = 0; i < n; i++) { expr_ty elt = asdl_seq_GET(elts, i); VISIT(c, expr, elt); } @@ -3775,6 +3793,33 @@ starunpack_helper(struct compiler *c, asdl_expr_seq *elts, int pushed, } else { ADDOP_I(c, build, n+pushed); } + return 1; + } + int sequence_built = 0; + if (big) { + ADDOP_I(c, build, pushed); + sequence_built = 1; + } + for (Py_ssize_t i = 0; i < n; i++) { + expr_ty elt = asdl_seq_GET(elts, i); + if (elt->kind == Starred_kind) { + if (sequence_built == 0) { + ADDOP_I(c, build, i+pushed); + sequence_built = 1; + } + VISIT(c, expr, elt->v.Starred.value); + ADDOP_I(c, extend, 1); + } + else { + VISIT(c, expr, elt); + if (sequence_built) { + ADDOP_I(c, add, 1); + } + } + } + assert(sequence_built); + if (tuple) { + ADDOP(c, LIST_TO_TUPLE); } return 1; } @@ -3874,7 +3919,8 @@ compiler_subdict(struct compiler *c, expr_ty e, Py_ssize_t begin, Py_ssize_t end { Py_ssize_t i, n = end - begin; PyObject *keys, *key; - if (n > 1 && are_all_items_const(e->v.Dict.keys, begin, end)) { + int big = n*2 > STACK_USE_GUIDELINE; + if (n > 1 && !big && are_all_items_const(e->v.Dict.keys, begin, end)) { for (i = begin; i < end; i++) { VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Dict.values, i)); } @@ -3889,12 +3935,19 @@ compiler_subdict(struct compiler *c, expr_ty e, Py_ssize_t begin, Py_ssize_t end } ADDOP_LOAD_CONST_NEW(c, keys); ADDOP_I(c, BUILD_CONST_KEY_MAP, n); + return 1; } - else { - for (i = begin; i < end; i++) { - VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Dict.keys, i)); - VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Dict.values, i)); + if (big) { + ADDOP_I(c, BUILD_MAP, 0); + } + for (i = begin; i < end; i++) { + VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Dict.keys, i)); + VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Dict.values, i)); + if (big) { + ADDOP_I(c, MAP_ADD, 1); } + } + if (!big) { ADDOP_I(c, BUILD_MAP, n); } return 1; @@ -3930,7 +3983,7 @@ compiler_dict(struct compiler *c, expr_ty e) ADDOP_I(c, DICT_UPDATE, 1); } else { - if (elements == 0xFFFF) { + if (elements*2 > STACK_USE_GUIDELINE) { if (!compiler_subdict(c, e, i - elements, i + 1)) { return 0; } @@ -4126,11 +4179,15 @@ maybe_optimize_method_call(struct compiler *c, expr_ty e) /* Check that the call node is an attribute access, and that the call doesn't have keyword parameters. */ if (meth->kind != Attribute_kind || meth->v.Attribute.ctx != Load || - asdl_seq_LEN(e->v.Call.keywords)) + asdl_seq_LEN(e->v.Call.keywords)) { return -1; - - /* Check that there are no *varargs types of arguments. */ + } + /* Check that there aren't too many arguments */ argsl = asdl_seq_LEN(args); + if (argsl >= STACK_USE_GUIDELINE) { + return -1; + } + /* Check that there are no *varargs types of arguments. */ for (i = 0; i < argsl; i++) { expr_ty elt = asdl_seq_GET(args, i); if (elt->kind == Starred_kind) { @@ -4192,9 +4249,29 @@ compiler_call(struct compiler *c, expr_ty e) static int compiler_joined_str(struct compiler *c, expr_ty e) { - VISIT_SEQ(c, expr, e->v.JoinedStr.values); - if (asdl_seq_LEN(e->v.JoinedStr.values) != 1) - ADDOP_I(c, BUILD_STRING, asdl_seq_LEN(e->v.JoinedStr.values)); + + Py_ssize_t value_count = asdl_seq_LEN(e->v.JoinedStr.values); + if (value_count > STACK_USE_GUIDELINE) { + ADDOP_LOAD_CONST_NEW(c, _PyUnicode_FromASCII("", 0)); + PyObject *join = _PyUnicode_FromASCII("join", 4); + if (join == NULL) { + return 0; + } + ADDOP_NAME(c, LOAD_METHOD, join, names); + Py_DECREF(join); + ADDOP_I(c, BUILD_LIST, 0); + for (Py_ssize_t i = 0; i < asdl_seq_LEN(e->v.JoinedStr.values); i++) { + VISIT(c, expr, asdl_seq_GET(e->v.JoinedStr.values, i)); + ADDOP_I(c, LIST_APPEND, 1); + } + ADDOP_I(c, CALL_METHOD, 1); + } + else { + VISIT_SEQ(c, expr, e->v.JoinedStr.values); + if (asdl_seq_LEN(e->v.JoinedStr.values) != 1) { + ADDOP_I(c, BUILD_STRING, asdl_seq_LEN(e->v.JoinedStr.values)); + } + } return 1; } @@ -4251,7 +4328,8 @@ compiler_subkwargs(struct compiler *c, asdl_keyword_seq *keywords, Py_ssize_t be keyword_ty kw; PyObject *keys, *key; assert(n > 0); - if (n > 1) { + int big = n*2 > STACK_USE_GUIDELINE; + if (n > 1 && !big) { for (i = begin; i < end; i++) { kw = asdl_seq_GET(keywords, i); VISIT(c, expr, kw->value); @@ -4267,14 +4345,20 @@ compiler_subkwargs(struct compiler *c, asdl_keyword_seq *keywords, Py_ssize_t be } ADDOP_LOAD_CONST_NEW(c, keys); ADDOP_I(c, BUILD_CONST_KEY_MAP, n); + return 1; } - else { - /* a for loop only executes once */ - for (i = begin; i < end; i++) { - kw = asdl_seq_GET(keywords, i); - ADDOP_LOAD_CONST(c, kw->arg); - VISIT(c, expr, kw->value); + if (big) { + ADDOP_I_NOLINE(c, BUILD_MAP, 0); + } + for (i = begin; i < end; i++) { + kw = asdl_seq_GET(keywords, i); + ADDOP_LOAD_CONST(c, kw->arg); + VISIT(c, expr, kw->value); + if (big) { + ADDOP_I_NOLINE(c, MAP_ADD, 1); } + } + if (!big) { ADDOP_I(c, BUILD_MAP, n); } return 1; @@ -4296,6 +4380,9 @@ compiler_call_helper(struct compiler *c, nelts = asdl_seq_LEN(args); nkwelts = asdl_seq_LEN(keywords); + if (nelts + nkwelts*2 > STACK_USE_GUIDELINE) { + goto ex_call; + } for (i = 0; i < nelts; i++) { expr_ty elt = asdl_seq_GET(args, i); if (elt->kind == Starred_kind) { @@ -6603,6 +6690,13 @@ makecode(struct compiler *c, struct assembler *a, PyObject *consts) Py_DECREF(consts); goto error; } + if (maxdepth > MAX_ALLOWED_STACK_USE) { + PyErr_Format(PyExc_SystemError, + "excessive stack use: stack is %d deep", + maxdepth); + Py_DECREF(consts); + goto error; + } co = PyCode_NewWithPosOnlyArgs(posonlyargcount+posorkeywordargcount, posonlyargcount, kwonlyargcount, nlocals_int, maxdepth, flags, a->a_bytecode, consts, names, From 0dca5eb54bd137ed5c6e20012fe8dddb2eadfdd7 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 15 Apr 2021 06:49:54 -0700 Subject: [PATCH 064/108] [Enum] fix doc string (GH-25376) --- Lib/enum.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Lib/enum.py b/Lib/enum.py index b102a4e4cc7820..9533dd80b23662 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -310,7 +310,7 @@ def __setitem__(self, key, value): pass elif _is_sunder(key): if key not in ( - '_order_', '_create_pseudo_member_', + '_order_', '_generate_next_value_', '_missing_', '_ignore_', '_iter_member_', '_iter_member_by_value_', '_iter_member_by_def_', ): @@ -1131,7 +1131,9 @@ def _iter_member_by_def_(cls, value): @classmethod def _missing_(cls, value): """ - Create a composite member iff value contains only members. + Create a composite member containing all canonical members present in `value`. + + If non-member values are present, result depends on `_boundary_` setting. """ if not isinstance(value, int): raise ValueError( From ec09973f5b21d33550c834ddc89606b0e1c70ffd Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 15 Apr 2021 06:58:33 -0700 Subject: [PATCH 065/108] bpo-43744: [Enum] fix ``_is_private`` (GH-25349) ``_is_private`` now returns ``False`` instead of raising an exception when enum name matches beginning of class name as used in a private variable --- Lib/enum.py | 5 ++-- Lib/test/test_enum.py | 25 +++++++++++++++++++ .../2021-04-11-20-52-32.bpo-43744.uf0E68.rst | 2 ++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-11-20-52-32.bpo-43744.uf0E68.rst diff --git a/Lib/enum.py b/Lib/enum.py index 9533dd80b23662..17deb4b9c05ae7 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -53,10 +53,11 @@ def _is_sunder(name): def _is_private(cls_name, name): # do not use `re` as `re` imports `enum` pattern = '_%s__' % (cls_name, ) + pat_len = len(pattern) if ( - len(name) >= 5 + len(name) > pat_len and name.startswith(pattern) - and name[len(pattern)] != '_' + and name[pat_len:pat_len+1] != ['_'] and (name[-1] != '_' or name[-2] != '_') ): return True diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index 5af7cd2ca57edf..b9d7f96a3e9485 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -3395,6 +3395,31 @@ class Sillier(IntEnum): triple = 3 value = 4 +class TestHelpers(unittest.TestCase): + + sunder_names = '_bad_', '_good_', '_what_ho_' + dunder_names = '__mal__', '__bien__', '__que_que__' + private_names = '_MyEnum__private', '_MyEnum__still_private' + private_and_sunder_names = '_MyEnum__private_', '_MyEnum__also_private_' + random_names = 'okay', '_semi_private', '_weird__', '_MyEnum__' + + def test_sunder(self): + for name in self.sunder_names + self.private_and_sunder_names: + self.assertTrue(enum._is_sunder(name), '%r is a not sunder name?' % name) + for name in self.dunder_names + self.private_names + self.random_names: + self.assertFalse(enum._is_sunder(name), '%r is a sunder name?' % name) + + def test_dunder(self): + for name in self.dunder_names: + self.assertTrue(enum._is_dunder(name), '%r is a not dunder name?' % name) + for name in self.sunder_names + self.private_names + self.private_and_sunder_names + self.random_names: + self.assertFalse(enum._is_dunder(name), '%r is a dunder name?' % name) + + def test_is_private(self): + for name in self.private_names + self.private_and_sunder_names: + self.assertTrue(enum._is_private('MyEnum', name), '%r is a not private name?') + for name in self.sunder_names + self.dunder_names + self.random_names: + self.assertFalse(enum._is_private('MyEnum', name), '%r is a private name?') class TestEnumTypeSubclassing(unittest.TestCase): pass diff --git a/Misc/NEWS.d/next/Library/2021-04-11-20-52-32.bpo-43744.uf0E68.rst b/Misc/NEWS.d/next/Library/2021-04-11-20-52-32.bpo-43744.uf0E68.rst new file mode 100644 index 00000000000000..7fd74be87664e4 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-11-20-52-32.bpo-43744.uf0E68.rst @@ -0,0 +1,2 @@ +fix issue with enum member name matching the start of a private variable +name From e692f55979980826a5281560c534ef399a8f9848 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 15 Apr 2021 07:55:46 -0700 Subject: [PATCH 066/108] Update ACKS (GH-25423) * Add Arseny Boykov * Add Matthias Urlichs --- Misc/ACKS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Misc/ACKS b/Misc/ACKS index 2502ba816ac925..20359762a52171 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -206,6 +206,7 @@ Eric Bouck Thierry Bousch Sebastian Boving Michal Bozon +Arseny Boykov Jeff Bradberry Chris Bradbury Aaron Brancotti @@ -1797,6 +1798,7 @@ Adnan Umer Utkarsh Upadhyay Roger Upole Daniel Urban +Matthias Urlichs Michael Urman Hector Urtubia Elizabeth Uselton From b280248be8e648feb82f3f3ed0050e50b238df7b Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Thu, 15 Apr 2021 21:38:45 +0100 Subject: [PATCH 067/108] bpo-43822: Improve syntax errors for missing commas (GH-25377) --- Doc/library/token-list.inc | 2 + Grammar/Tokens | 1 + Grammar/python.gram | 9 + Include/token.h | 5 +- Lib/test/test_genexps.py | 2 +- Lib/test/test_syntax.py | 24 +- Lib/token.py | 11 +- .../2021-04-13-02-32-18.bpo-43822.lej0OO.rst | 2 + Parser/parser.c | 1412 +++++++++-------- Parser/pegen.c | 18 + Parser/pegen.h | 2 + Parser/token.c | 1 + Tools/peg_generator/pegen/c_generator.py | 12 + 13 files changed, 851 insertions(+), 650 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-13-02-32-18.bpo-43822.lej0OO.rst diff --git a/Doc/library/token-list.inc b/Doc/library/token-list.inc index 877d39a432ed70..1a99f0518d1b47 100644 --- a/Doc/library/token-list.inc +++ b/Doc/library/token-list.inc @@ -211,6 +211,8 @@ .. data:: TYPE_COMMENT +.. data:: SOFT_KEYWORD + .. data:: ERRORTOKEN .. data:: N_TOKENS diff --git a/Grammar/Tokens b/Grammar/Tokens index 9de2da5d15fc3b..1f3e3b09913653 100644 --- a/Grammar/Tokens +++ b/Grammar/Tokens @@ -59,6 +59,7 @@ AWAIT ASYNC TYPE_IGNORE TYPE_COMMENT +SOFT_KEYWORD ERRORTOKEN # These aren't used by the C tokenizer but are needed for tokenize.py diff --git a/Grammar/python.gram b/Grammar/python.gram index 8e399f1b8ea91a..e5baac36636751 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -7,6 +7,7 @@ _PyPegen_parse(Parser *p) // Initialize keywords p->keywords = reserved_keywords; p->n_keyword_lists = n_keyword_lists; + p->soft_keywords = soft_keywords; // Run parser void *result = NULL; @@ -459,6 +460,7 @@ expressions[expr_ty]: | a=expression ',' { _PyAST_Tuple(CHECK(asdl_expr_seq*, _PyPegen_singleton_seq(p, a)), Load, EXTRA) } | expression expression[expr_ty] (memo): + | invalid_expression | a=disjunction 'if' b=disjunction 'else' c=expression { _PyAST_IfExp(b, a, c, EXTRA) } | disjunction | lambdef @@ -778,6 +780,13 @@ invalid_kwarg: | expression a='=' { RAISE_SYNTAX_ERROR_KNOWN_LOCATION( a, "expression cannot contain assignment, perhaps you meant \"==\"?") } + +invalid_expression: + # !(NAME STRING) is not matched so we don't show this error with some invalid string prefixes like: kf"dsfsdf" + # Soft keywords need to also be ignored because they can be parsed as NAME NAME + | !(NAME STRING | SOFT_KEYWORD) a=disjunction expression { + RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, a->lineno, a->end_col_offset - 1, "invalid syntax. Perhaps you forgot a comma?") } + invalid_named_expression: | a=expression ':=' expression { RAISE_SYNTAX_ERROR_KNOWN_LOCATION( diff --git a/Include/token.h b/Include/token.h index 9b8a3aae074674..eb1b9ea47b469a 100644 --- a/Include/token.h +++ b/Include/token.h @@ -69,8 +69,9 @@ extern "C" { #define ASYNC 56 #define TYPE_IGNORE 57 #define TYPE_COMMENT 58 -#define ERRORTOKEN 59 -#define N_TOKENS 63 +#define SOFT_KEYWORD 59 +#define ERRORTOKEN 60 +#define N_TOKENS 64 #define NT_OFFSET 256 /* Special definitions for cooperation with parser */ diff --git a/Lib/test/test_genexps.py b/Lib/test/test_genexps.py index 5c1a209b0e9908..70fe2bba3a6982 100644 --- a/Lib/test/test_genexps.py +++ b/Lib/test/test_genexps.py @@ -103,7 +103,7 @@ >>> dict(a = i for i in range(10)) Traceback (most recent call last): ... - SyntaxError: invalid syntax + SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? Verify that parenthesis are required when used as a keyword argument value diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py index 75b778d20e90a9..4d8198e5db6052 100644 --- a/Lib/test/test_syntax.py +++ b/Lib/test/test_syntax.py @@ -248,22 +248,36 @@ # Missing commas in literals collections should not # produce special error messages regarding missing -# parentheses +# parentheses, but about missing commas instead >>> [1, 2 3] Traceback (most recent call last): -SyntaxError: invalid syntax +SyntaxError: invalid syntax. Perhaps you forgot a comma? >>> {1, 2 3} Traceback (most recent call last): -SyntaxError: invalid syntax +SyntaxError: invalid syntax. Perhaps you forgot a comma? >>> {1:2, 2:5 3:12} Traceback (most recent call last): -SyntaxError: invalid syntax +SyntaxError: invalid syntax. Perhaps you forgot a comma? >>> (1, 2 3) Traceback (most recent call last): +SyntaxError: invalid syntax. Perhaps you forgot a comma? + +# Make sure soft keywords constructs don't raise specialized +# errors regarding missing commas + +>>> match x: +... y = 3 +Traceback (most recent call last): +SyntaxError: invalid syntax + +>>> match x: +... case y: +... 3 $ 3 +Traceback (most recent call last): SyntaxError: invalid syntax From compiler_complex_args(): @@ -864,7 +878,7 @@ SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='? Ensure that early = are not matched by the parser as invalid comparisons - >>> f(2, 4, x=34); {1,2 a} + >>> f(2, 4, x=34); 1 $ 2 Traceback (most recent call last): SyntaxError: invalid syntax diff --git a/Lib/token.py b/Lib/token.py index 493bf0426508fe..9d0c0bf0fb0368 100644 --- a/Lib/token.py +++ b/Lib/token.py @@ -62,12 +62,13 @@ ASYNC = 56 TYPE_IGNORE = 57 TYPE_COMMENT = 58 +SOFT_KEYWORD = 59 # These aren't used by the C tokenizer but are needed for tokenize.py -ERRORTOKEN = 59 -COMMENT = 60 -NL = 61 -ENCODING = 62 -N_TOKENS = 63 +ERRORTOKEN = 60 +COMMENT = 61 +NL = 62 +ENCODING = 63 +N_TOKENS = 64 # Special definitions for cooperation with parser NT_OFFSET = 256 diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-13-02-32-18.bpo-43822.lej0OO.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-13-02-32-18.bpo-43822.lej0OO.rst new file mode 100644 index 00000000000000..f0e1c2f35a1868 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-13-02-32-18.bpo-43822.lej0OO.rst @@ -0,0 +1,2 @@ +Improve syntax errors in the parser for missing commas between expressions. +Patch by Pablo Galindo. diff --git a/Parser/parser.c b/Parser/parser.c index 2ead05225be5fd..2f7a71a5418e64 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -65,6 +65,12 @@ static KeywordToken *reserved_keywords[] = { {NULL, -1}, }, }; +static char *soft_keywords[] = { + "_", + "case", + "match", + NULL, +}; #define file_type 1000 #define interactive_type 1001 #define eval_type 1002 @@ -242,222 +248,224 @@ static KeywordToken *reserved_keywords[] = { #define t_atom_type 1174 #define invalid_arguments_type 1175 #define invalid_kwarg_type 1176 -#define invalid_named_expression_type 1177 -#define invalid_assignment_type 1178 -#define invalid_ann_assign_target_type 1179 -#define invalid_del_stmt_type 1180 -#define invalid_block_type 1181 -#define invalid_primary_type 1182 // Left-recursive -#define invalid_comprehension_type 1183 -#define invalid_dict_comprehension_type 1184 -#define invalid_parameters_type 1185 -#define invalid_parameters_helper_type 1186 -#define invalid_lambda_parameters_type 1187 -#define invalid_lambda_parameters_helper_type 1188 -#define invalid_star_etc_type 1189 -#define invalid_lambda_star_etc_type 1190 -#define invalid_double_type_comments_type 1191 -#define invalid_with_item_type 1192 -#define invalid_for_target_type 1193 -#define invalid_group_type 1194 -#define invalid_import_from_targets_type 1195 -#define invalid_with_stmt_type 1196 -#define invalid_except_block_type 1197 -#define invalid_match_stmt_type 1198 -#define invalid_case_block_type 1199 -#define invalid_if_stmt_type 1200 -#define invalid_elif_stmt_type 1201 -#define invalid_while_stmt_type 1202 -#define invalid_double_starred_kvpairs_type 1203 -#define invalid_kvpair_type 1204 -#define _loop0_1_type 1205 -#define _loop0_2_type 1206 -#define _loop0_4_type 1207 -#define _gather_3_type 1208 -#define _loop0_6_type 1209 -#define _gather_5_type 1210 -#define _loop0_8_type 1211 -#define _gather_7_type 1212 -#define _loop0_10_type 1213 -#define _gather_9_type 1214 -#define _loop1_11_type 1215 -#define _loop0_13_type 1216 -#define _gather_12_type 1217 -#define _tmp_14_type 1218 -#define _tmp_15_type 1219 -#define _tmp_16_type 1220 -#define _tmp_17_type 1221 -#define _tmp_18_type 1222 -#define _tmp_19_type 1223 -#define _tmp_20_type 1224 -#define _tmp_21_type 1225 -#define _loop1_22_type 1226 -#define _tmp_23_type 1227 -#define _tmp_24_type 1228 -#define _loop0_26_type 1229 -#define _gather_25_type 1230 -#define _loop0_28_type 1231 -#define _gather_27_type 1232 -#define _tmp_29_type 1233 -#define _tmp_30_type 1234 -#define _loop0_31_type 1235 -#define _loop1_32_type 1236 -#define _loop0_34_type 1237 -#define _gather_33_type 1238 -#define _tmp_35_type 1239 -#define _loop0_37_type 1240 -#define _gather_36_type 1241 -#define _tmp_38_type 1242 -#define _loop0_40_type 1243 -#define _gather_39_type 1244 -#define _loop0_42_type 1245 -#define _gather_41_type 1246 -#define _loop0_44_type 1247 -#define _gather_43_type 1248 -#define _loop0_46_type 1249 -#define _gather_45_type 1250 -#define _tmp_47_type 1251 -#define _loop1_48_type 1252 -#define _tmp_49_type 1253 -#define _loop1_50_type 1254 -#define _loop0_52_type 1255 -#define _gather_51_type 1256 -#define _tmp_53_type 1257 -#define _tmp_54_type 1258 -#define _tmp_55_type 1259 -#define _loop0_57_type 1260 -#define _gather_56_type 1261 -#define _tmp_58_type 1262 -#define _loop0_60_type 1263 -#define _gather_59_type 1264 -#define _tmp_61_type 1265 -#define _loop0_63_type 1266 -#define _gather_62_type 1267 -#define _loop0_65_type 1268 -#define _gather_64_type 1269 -#define _tmp_66_type 1270 -#define _tmp_67_type 1271 -#define _tmp_68_type 1272 -#define _tmp_69_type 1273 -#define _loop0_70_type 1274 -#define _loop0_71_type 1275 -#define _loop0_72_type 1276 -#define _loop1_73_type 1277 -#define _loop0_74_type 1278 -#define _loop1_75_type 1279 -#define _loop1_76_type 1280 -#define _loop1_77_type 1281 -#define _loop0_78_type 1282 -#define _loop1_79_type 1283 -#define _loop0_80_type 1284 -#define _loop1_81_type 1285 -#define _loop0_82_type 1286 -#define _loop1_83_type 1287 -#define _loop1_84_type 1288 -#define _tmp_85_type 1289 -#define _loop1_86_type 1290 -#define _loop0_88_type 1291 -#define _gather_87_type 1292 -#define _loop1_89_type 1293 -#define _loop0_90_type 1294 -#define _loop0_91_type 1295 -#define _loop0_92_type 1296 -#define _loop1_93_type 1297 -#define _loop0_94_type 1298 -#define _loop1_95_type 1299 -#define _loop1_96_type 1300 -#define _loop1_97_type 1301 -#define _loop0_98_type 1302 -#define _loop1_99_type 1303 -#define _loop0_100_type 1304 -#define _loop1_101_type 1305 -#define _loop0_102_type 1306 -#define _loop1_103_type 1307 -#define _loop1_104_type 1308 -#define _loop1_105_type 1309 -#define _loop1_106_type 1310 -#define _tmp_107_type 1311 -#define _loop0_109_type 1312 -#define _gather_108_type 1313 -#define _tmp_110_type 1314 -#define _tmp_111_type 1315 -#define _tmp_112_type 1316 -#define _tmp_113_type 1317 -#define _loop1_114_type 1318 -#define _tmp_115_type 1319 -#define _tmp_116_type 1320 -#define _loop0_118_type 1321 -#define _gather_117_type 1322 -#define _loop1_119_type 1323 -#define _loop0_120_type 1324 -#define _loop0_121_type 1325 -#define _loop0_123_type 1326 -#define _gather_122_type 1327 -#define _tmp_124_type 1328 -#define _loop0_126_type 1329 -#define _gather_125_type 1330 -#define _loop0_128_type 1331 -#define _gather_127_type 1332 -#define _loop0_130_type 1333 -#define _gather_129_type 1334 -#define _loop0_132_type 1335 -#define _gather_131_type 1336 -#define _loop0_133_type 1337 -#define _loop0_135_type 1338 -#define _gather_134_type 1339 -#define _loop1_136_type 1340 -#define _tmp_137_type 1341 -#define _loop0_139_type 1342 -#define _gather_138_type 1343 -#define _loop0_141_type 1344 -#define _gather_140_type 1345 -#define _tmp_142_type 1346 -#define _tmp_143_type 1347 -#define _tmp_144_type 1348 -#define _tmp_145_type 1349 -#define _loop0_146_type 1350 -#define _loop0_147_type 1351 -#define _loop0_148_type 1352 -#define _tmp_149_type 1353 -#define _tmp_150_type 1354 -#define _tmp_151_type 1355 -#define _loop0_152_type 1356 -#define _loop1_153_type 1357 -#define _loop0_154_type 1358 -#define _loop1_155_type 1359 -#define _tmp_156_type 1360 -#define _tmp_157_type 1361 -#define _tmp_158_type 1362 -#define _loop0_160_type 1363 -#define _gather_159_type 1364 -#define _loop0_162_type 1365 -#define _gather_161_type 1366 -#define _tmp_163_type 1367 -#define _tmp_164_type 1368 -#define _loop0_166_type 1369 -#define _gather_165_type 1370 -#define _tmp_167_type 1371 -#define _tmp_168_type 1372 -#define _tmp_169_type 1373 -#define _tmp_170_type 1374 -#define _tmp_171_type 1375 -#define _tmp_172_type 1376 -#define _tmp_173_type 1377 -#define _tmp_174_type 1378 -#define _tmp_175_type 1379 -#define _tmp_176_type 1380 -#define _tmp_177_type 1381 -#define _tmp_178_type 1382 -#define _tmp_179_type 1383 -#define _tmp_180_type 1384 -#define _tmp_181_type 1385 -#define _tmp_182_type 1386 -#define _tmp_183_type 1387 -#define _tmp_184_type 1388 -#define _tmp_185_type 1389 -#define _tmp_186_type 1390 -#define _tmp_187_type 1391 -#define _tmp_188_type 1392 +#define invalid_expression_type 1177 +#define invalid_named_expression_type 1178 +#define invalid_assignment_type 1179 +#define invalid_ann_assign_target_type 1180 +#define invalid_del_stmt_type 1181 +#define invalid_block_type 1182 +#define invalid_primary_type 1183 // Left-recursive +#define invalid_comprehension_type 1184 +#define invalid_dict_comprehension_type 1185 +#define invalid_parameters_type 1186 +#define invalid_parameters_helper_type 1187 +#define invalid_lambda_parameters_type 1188 +#define invalid_lambda_parameters_helper_type 1189 +#define invalid_star_etc_type 1190 +#define invalid_lambda_star_etc_type 1191 +#define invalid_double_type_comments_type 1192 +#define invalid_with_item_type 1193 +#define invalid_for_target_type 1194 +#define invalid_group_type 1195 +#define invalid_import_from_targets_type 1196 +#define invalid_with_stmt_type 1197 +#define invalid_except_block_type 1198 +#define invalid_match_stmt_type 1199 +#define invalid_case_block_type 1200 +#define invalid_if_stmt_type 1201 +#define invalid_elif_stmt_type 1202 +#define invalid_while_stmt_type 1203 +#define invalid_double_starred_kvpairs_type 1204 +#define invalid_kvpair_type 1205 +#define _loop0_1_type 1206 +#define _loop0_2_type 1207 +#define _loop0_4_type 1208 +#define _gather_3_type 1209 +#define _loop0_6_type 1210 +#define _gather_5_type 1211 +#define _loop0_8_type 1212 +#define _gather_7_type 1213 +#define _loop0_10_type 1214 +#define _gather_9_type 1215 +#define _loop1_11_type 1216 +#define _loop0_13_type 1217 +#define _gather_12_type 1218 +#define _tmp_14_type 1219 +#define _tmp_15_type 1220 +#define _tmp_16_type 1221 +#define _tmp_17_type 1222 +#define _tmp_18_type 1223 +#define _tmp_19_type 1224 +#define _tmp_20_type 1225 +#define _tmp_21_type 1226 +#define _loop1_22_type 1227 +#define _tmp_23_type 1228 +#define _tmp_24_type 1229 +#define _loop0_26_type 1230 +#define _gather_25_type 1231 +#define _loop0_28_type 1232 +#define _gather_27_type 1233 +#define _tmp_29_type 1234 +#define _tmp_30_type 1235 +#define _loop0_31_type 1236 +#define _loop1_32_type 1237 +#define _loop0_34_type 1238 +#define _gather_33_type 1239 +#define _tmp_35_type 1240 +#define _loop0_37_type 1241 +#define _gather_36_type 1242 +#define _tmp_38_type 1243 +#define _loop0_40_type 1244 +#define _gather_39_type 1245 +#define _loop0_42_type 1246 +#define _gather_41_type 1247 +#define _loop0_44_type 1248 +#define _gather_43_type 1249 +#define _loop0_46_type 1250 +#define _gather_45_type 1251 +#define _tmp_47_type 1252 +#define _loop1_48_type 1253 +#define _tmp_49_type 1254 +#define _loop1_50_type 1255 +#define _loop0_52_type 1256 +#define _gather_51_type 1257 +#define _tmp_53_type 1258 +#define _tmp_54_type 1259 +#define _tmp_55_type 1260 +#define _loop0_57_type 1261 +#define _gather_56_type 1262 +#define _tmp_58_type 1263 +#define _loop0_60_type 1264 +#define _gather_59_type 1265 +#define _tmp_61_type 1266 +#define _loop0_63_type 1267 +#define _gather_62_type 1268 +#define _loop0_65_type 1269 +#define _gather_64_type 1270 +#define _tmp_66_type 1271 +#define _tmp_67_type 1272 +#define _tmp_68_type 1273 +#define _tmp_69_type 1274 +#define _loop0_70_type 1275 +#define _loop0_71_type 1276 +#define _loop0_72_type 1277 +#define _loop1_73_type 1278 +#define _loop0_74_type 1279 +#define _loop1_75_type 1280 +#define _loop1_76_type 1281 +#define _loop1_77_type 1282 +#define _loop0_78_type 1283 +#define _loop1_79_type 1284 +#define _loop0_80_type 1285 +#define _loop1_81_type 1286 +#define _loop0_82_type 1287 +#define _loop1_83_type 1288 +#define _loop1_84_type 1289 +#define _tmp_85_type 1290 +#define _loop1_86_type 1291 +#define _loop0_88_type 1292 +#define _gather_87_type 1293 +#define _loop1_89_type 1294 +#define _loop0_90_type 1295 +#define _loop0_91_type 1296 +#define _loop0_92_type 1297 +#define _loop1_93_type 1298 +#define _loop0_94_type 1299 +#define _loop1_95_type 1300 +#define _loop1_96_type 1301 +#define _loop1_97_type 1302 +#define _loop0_98_type 1303 +#define _loop1_99_type 1304 +#define _loop0_100_type 1305 +#define _loop1_101_type 1306 +#define _loop0_102_type 1307 +#define _loop1_103_type 1308 +#define _loop1_104_type 1309 +#define _loop1_105_type 1310 +#define _loop1_106_type 1311 +#define _tmp_107_type 1312 +#define _loop0_109_type 1313 +#define _gather_108_type 1314 +#define _tmp_110_type 1315 +#define _tmp_111_type 1316 +#define _tmp_112_type 1317 +#define _tmp_113_type 1318 +#define _loop1_114_type 1319 +#define _tmp_115_type 1320 +#define _tmp_116_type 1321 +#define _loop0_118_type 1322 +#define _gather_117_type 1323 +#define _loop1_119_type 1324 +#define _loop0_120_type 1325 +#define _loop0_121_type 1326 +#define _loop0_123_type 1327 +#define _gather_122_type 1328 +#define _tmp_124_type 1329 +#define _loop0_126_type 1330 +#define _gather_125_type 1331 +#define _loop0_128_type 1332 +#define _gather_127_type 1333 +#define _loop0_130_type 1334 +#define _gather_129_type 1335 +#define _loop0_132_type 1336 +#define _gather_131_type 1337 +#define _loop0_133_type 1338 +#define _loop0_135_type 1339 +#define _gather_134_type 1340 +#define _loop1_136_type 1341 +#define _tmp_137_type 1342 +#define _loop0_139_type 1343 +#define _gather_138_type 1344 +#define _loop0_141_type 1345 +#define _gather_140_type 1346 +#define _tmp_142_type 1347 +#define _tmp_143_type 1348 +#define _tmp_144_type 1349 +#define _tmp_145_type 1350 +#define _tmp_146_type 1351 +#define _loop0_147_type 1352 +#define _loop0_148_type 1353 +#define _loop0_149_type 1354 +#define _tmp_150_type 1355 +#define _tmp_151_type 1356 +#define _tmp_152_type 1357 +#define _loop0_153_type 1358 +#define _loop1_154_type 1359 +#define _loop0_155_type 1360 +#define _loop1_156_type 1361 +#define _tmp_157_type 1362 +#define _tmp_158_type 1363 +#define _tmp_159_type 1364 +#define _loop0_161_type 1365 +#define _gather_160_type 1366 +#define _loop0_163_type 1367 +#define _gather_162_type 1368 +#define _tmp_164_type 1369 +#define _tmp_165_type 1370 +#define _loop0_167_type 1371 +#define _gather_166_type 1372 +#define _tmp_168_type 1373 +#define _tmp_169_type 1374 +#define _tmp_170_type 1375 +#define _tmp_171_type 1376 +#define _tmp_172_type 1377 +#define _tmp_173_type 1378 +#define _tmp_174_type 1379 +#define _tmp_175_type 1380 +#define _tmp_176_type 1381 +#define _tmp_177_type 1382 +#define _tmp_178_type 1383 +#define _tmp_179_type 1384 +#define _tmp_180_type 1385 +#define _tmp_181_type 1386 +#define _tmp_182_type 1387 +#define _tmp_183_type 1388 +#define _tmp_184_type 1389 +#define _tmp_185_type 1390 +#define _tmp_186_type 1391 +#define _tmp_187_type 1392 +#define _tmp_188_type 1393 +#define _tmp_189_type 1394 static mod_ty file_rule(Parser *p); static mod_ty interactive_rule(Parser *p); @@ -636,6 +644,7 @@ static void *t_lookahead_rule(Parser *p); static expr_ty t_atom_rule(Parser *p); static void *invalid_arguments_rule(Parser *p); static void *invalid_kwarg_rule(Parser *p); +static void *invalid_expression_rule(Parser *p); static void *invalid_named_expression_rule(Parser *p); static void *invalid_assignment_rule(Parser *p); static expr_ty invalid_ann_assign_target_rule(Parser *p); @@ -809,28 +818,28 @@ static void *_tmp_142_rule(Parser *p); static void *_tmp_143_rule(Parser *p); static void *_tmp_144_rule(Parser *p); static void *_tmp_145_rule(Parser *p); -static asdl_seq *_loop0_146_rule(Parser *p); +static void *_tmp_146_rule(Parser *p); static asdl_seq *_loop0_147_rule(Parser *p); static asdl_seq *_loop0_148_rule(Parser *p); -static void *_tmp_149_rule(Parser *p); +static asdl_seq *_loop0_149_rule(Parser *p); static void *_tmp_150_rule(Parser *p); static void *_tmp_151_rule(Parser *p); -static asdl_seq *_loop0_152_rule(Parser *p); -static asdl_seq *_loop1_153_rule(Parser *p); -static asdl_seq *_loop0_154_rule(Parser *p); -static asdl_seq *_loop1_155_rule(Parser *p); -static void *_tmp_156_rule(Parser *p); +static void *_tmp_152_rule(Parser *p); +static asdl_seq *_loop0_153_rule(Parser *p); +static asdl_seq *_loop1_154_rule(Parser *p); +static asdl_seq *_loop0_155_rule(Parser *p); +static asdl_seq *_loop1_156_rule(Parser *p); static void *_tmp_157_rule(Parser *p); static void *_tmp_158_rule(Parser *p); -static asdl_seq *_loop0_160_rule(Parser *p); -static asdl_seq *_gather_159_rule(Parser *p); -static asdl_seq *_loop0_162_rule(Parser *p); -static asdl_seq *_gather_161_rule(Parser *p); -static void *_tmp_163_rule(Parser *p); +static void *_tmp_159_rule(Parser *p); +static asdl_seq *_loop0_161_rule(Parser *p); +static asdl_seq *_gather_160_rule(Parser *p); +static asdl_seq *_loop0_163_rule(Parser *p); +static asdl_seq *_gather_162_rule(Parser *p); static void *_tmp_164_rule(Parser *p); -static asdl_seq *_loop0_166_rule(Parser *p); -static asdl_seq *_gather_165_rule(Parser *p); -static void *_tmp_167_rule(Parser *p); +static void *_tmp_165_rule(Parser *p); +static asdl_seq *_loop0_167_rule(Parser *p); +static asdl_seq *_gather_166_rule(Parser *p); static void *_tmp_168_rule(Parser *p); static void *_tmp_169_rule(Parser *p); static void *_tmp_170_rule(Parser *p); @@ -852,6 +861,7 @@ static void *_tmp_185_rule(Parser *p); static void *_tmp_186_rule(Parser *p); static void *_tmp_187_rule(Parser *p); static void *_tmp_188_rule(Parser *p); +static void *_tmp_189_rule(Parser *p); // file: statements? $ @@ -9678,7 +9688,11 @@ expressions_rule(Parser *p) return _res; } -// expression: disjunction 'if' disjunction 'else' expression | disjunction | lambdef +// expression: +// | invalid_expression +// | disjunction 'if' disjunction 'else' expression +// | disjunction +// | lambdef static expr_ty expression_rule(Parser *p) { @@ -9702,6 +9716,25 @@ expression_rule(Parser *p) UNUSED(_start_lineno); // Only used by EXTRA macro int _start_col_offset = p->tokens[_mark]->col_offset; UNUSED(_start_col_offset); // Only used by EXTRA macro + if (p->call_invalid_rules) { // invalid_expression + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "invalid_expression")); + void *invalid_expression_var; + if ( + (invalid_expression_var = invalid_expression_rule(p)) // invalid_expression + ) + { + D(fprintf(stderr, "%*c+ expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "invalid_expression")); + _res = invalid_expression_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s expression[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "invalid_expression")); + } { // disjunction 'if' disjunction 'else' expression if (p->error_indicator) { D(p->level--); @@ -17443,6 +17476,52 @@ invalid_kwarg_rule(Parser *p) return _res; } +// invalid_expression: !(NAME STRING | SOFT_KEYWORD) disjunction expression +static void * +invalid_expression_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // !(NAME STRING | SOFT_KEYWORD) disjunction expression + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> invalid_expression[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "!(NAME STRING | SOFT_KEYWORD) disjunction expression")); + expr_ty a; + expr_ty expression_var; + if ( + _PyPegen_lookahead(0, _tmp_143_rule, p) + && + (a = disjunction_rule(p)) // disjunction + && + (expression_var = expression_rule(p)) // expression + ) + { + D(fprintf(stderr, "%*c+ invalid_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!(NAME STRING | SOFT_KEYWORD) disjunction expression")); + _res = RAISE_ERROR_KNOWN_LOCATION ( p , PyExc_SyntaxError , a -> lineno , a -> end_col_offset - 1 , "invalid syntax. Perhaps you forgot a comma?" ); + if (_res == NULL && PyErr_Occurred()) { + p->error_indicator = 1; + D(p->level--); + return NULL; + } + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s invalid_expression[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "!(NAME STRING | SOFT_KEYWORD) disjunction expression")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + // invalid_named_expression: // | expression ':=' expression // | NAME '=' bitwise_or !('=' | ':=' | ',') @@ -17503,7 +17582,7 @@ invalid_named_expression_rule(Parser *p) && (bitwise_or_var = bitwise_or_rule(p)) // bitwise_or && - _PyPegen_lookahead(0, _tmp_143_rule, p) + _PyPegen_lookahead(0, _tmp_144_rule, p) ) { D(fprintf(stderr, "%*c+ invalid_named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "NAME '=' bitwise_or !('=' | ':=' | ',')")); @@ -17529,7 +17608,7 @@ invalid_named_expression_rule(Parser *p) Token * b; expr_ty bitwise_or_var; if ( - _PyPegen_lookahead(0, _tmp_144_rule, p) + _PyPegen_lookahead(0, _tmp_145_rule, p) && (a = bitwise_or_rule(p)) // bitwise_or && @@ -17537,7 +17616,7 @@ invalid_named_expression_rule(Parser *p) && (bitwise_or_var = bitwise_or_rule(p)) // bitwise_or && - _PyPegen_lookahead(0, _tmp_145_rule, p) + _PyPegen_lookahead(0, _tmp_146_rule, p) ) { D(fprintf(stderr, "%*c+ invalid_named_expression[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!(list | tuple | genexp | 'True' | 'None' | 'False') bitwise_or '=' bitwise_or !('=' | ':=' | ',')")); @@ -17614,7 +17693,7 @@ invalid_assignment_rule(Parser *p) D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expression ',' star_named_expressions* ':' expression")); Token * _literal; Token * _literal_1; - asdl_seq * _loop0_146_var; + asdl_seq * _loop0_147_var; expr_ty a; expr_ty expression_var; if ( @@ -17622,7 +17701,7 @@ invalid_assignment_rule(Parser *p) && (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_loop0_146_var = _loop0_146_rule(p)) // star_named_expressions* + (_loop0_147_var = _loop0_147_rule(p)) // star_named_expressions* && (_literal_1 = _PyPegen_expect_token(p, 11)) // token=':' && @@ -17679,10 +17758,10 @@ invalid_assignment_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* star_expressions '='")); Token * _literal; - asdl_seq * _loop0_147_var; + asdl_seq * _loop0_148_var; expr_ty a; if ( - (_loop0_147_var = _loop0_147_rule(p)) // ((star_targets '='))* + (_loop0_148_var = _loop0_148_rule(p)) // ((star_targets '='))* && (a = star_expressions_rule(p)) // star_expressions && @@ -17709,10 +17788,10 @@ invalid_assignment_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* yield_expr '='")); Token * _literal; - asdl_seq * _loop0_148_var; + asdl_seq * _loop0_149_var; expr_ty a; if ( - (_loop0_148_var = _loop0_148_rule(p)) // ((star_targets '='))* + (_loop0_149_var = _loop0_149_rule(p)) // ((star_targets '='))* && (a = yield_expr_rule(p)) // yield_expr && @@ -17738,7 +17817,7 @@ invalid_assignment_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)")); - void *_tmp_149_var; + void *_tmp_150_var; expr_ty a; AugOperator* augassign_var; if ( @@ -17746,7 +17825,7 @@ invalid_assignment_rule(Parser *p) && (augassign_var = augassign_rule(p)) // augassign && - (_tmp_149_var = _tmp_149_rule(p)) // yield_expr | star_expressions + (_tmp_150_var = _tmp_150_rule(p)) // yield_expr | star_expressions ) { D(fprintf(stderr, "%*c+ invalid_assignment[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)")); @@ -18004,11 +18083,11 @@ invalid_comprehension_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_comprehension[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('[' | '(' | '{') starred_expression for_if_clauses")); - void *_tmp_150_var; + void *_tmp_151_var; expr_ty a; asdl_comprehension_seq* for_if_clauses_var; if ( - (_tmp_150_var = _tmp_150_rule(p)) // '[' | '(' | '{' + (_tmp_151_var = _tmp_151_rule(p)) // '[' | '(' | '{' && (a = starred_expression_rule(p)) // starred_expression && @@ -18037,11 +18116,11 @@ invalid_comprehension_rule(Parser *p) Token * _literal; void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings - void *_tmp_151_var; + void *_tmp_152_var; expr_ty a; asdl_comprehension_seq* for_if_clauses_var; if ( - (_tmp_151_var = _tmp_151_rule(p)) // '[' | '{' + (_tmp_152_var = _tmp_152_rule(p)) // '[' | '{' && (a = star_named_expression_rule(p)) // star_named_expression && @@ -18141,11 +18220,11 @@ invalid_parameters_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default* invalid_parameters_helper param_no_default")); - asdl_seq * _loop0_152_var; + asdl_seq * _loop0_153_var; void *invalid_parameters_helper_var; arg_ty param_no_default_var; if ( - (_loop0_152_var = _loop0_152_rule(p)) // param_no_default* + (_loop0_153_var = _loop0_153_rule(p)) // param_no_default* && (invalid_parameters_helper_var = invalid_parameters_helper_rule(p)) // invalid_parameters_helper && @@ -18212,13 +18291,13 @@ invalid_parameters_helper_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - asdl_seq * _loop1_153_var; + asdl_seq * _loop1_154_var; if ( - (_loop1_153_var = _loop1_153_rule(p)) // param_with_default+ + (_loop1_154_var = _loop1_154_rule(p)) // param_with_default+ ) { D(fprintf(stderr, "%*c+ invalid_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+")); - _res = _loop1_153_var; + _res = _loop1_154_var; goto done; } p->mark = _mark; @@ -18249,11 +18328,11 @@ invalid_lambda_parameters_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_lambda_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default* invalid_lambda_parameters_helper lambda_param_no_default")); - asdl_seq * _loop0_154_var; + asdl_seq * _loop0_155_var; void *invalid_lambda_parameters_helper_var; arg_ty lambda_param_no_default_var; if ( - (_loop0_154_var = _loop0_154_rule(p)) // lambda_param_no_default* + (_loop0_155_var = _loop0_155_rule(p)) // lambda_param_no_default* && (invalid_lambda_parameters_helper_var = invalid_lambda_parameters_helper_rule(p)) // invalid_lambda_parameters_helper && @@ -18322,13 +18401,13 @@ invalid_lambda_parameters_helper_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_lambda_parameters_helper[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - asdl_seq * _loop1_155_var; + asdl_seq * _loop1_156_var; if ( - (_loop1_155_var = _loop1_155_rule(p)) // lambda_param_with_default+ + (_loop1_156_var = _loop1_156_rule(p)) // lambda_param_with_default+ ) { D(fprintf(stderr, "%*c+ invalid_lambda_parameters_helper[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+")); - _res = _loop1_155_var; + _res = _loop1_156_var; goto done; } p->mark = _mark; @@ -18359,11 +18438,11 @@ invalid_star_etc_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); Token * _literal; - void *_tmp_156_var; + void *_tmp_157_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_156_var = _tmp_156_rule(p)) // ')' | ',' (')' | '**') + (_tmp_157_var = _tmp_157_rule(p)) // ')' | ',' (')' | '**') ) { D(fprintf(stderr, "%*c+ invalid_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))")); @@ -18433,11 +18512,11 @@ invalid_lambda_star_etc_rule(Parser *p) } D(fprintf(stderr, "%*c> invalid_lambda_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); Token * _literal; - void *_tmp_157_var; + void *_tmp_158_var; if ( (_literal = _PyPegen_expect_token(p, 16)) // token='*' && - (_tmp_157_var = _tmp_157_rule(p)) // ':' | ',' (':' | '**') + (_tmp_158_var = _tmp_158_rule(p)) // ':' | ',' (':' | '**') ) { D(fprintf(stderr, "%*c+ invalid_lambda_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))")); @@ -18539,7 +18618,7 @@ invalid_with_item_rule(Parser *p) && (a = expression_rule(p)) // expression && - _PyPegen_lookahead(1, _tmp_158_rule, p) + _PyPegen_lookahead(1, _tmp_159_rule, p) ) { D(fprintf(stderr, "%*c+ invalid_with_item[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression 'as' expression &(',' | ')' | ':')")); @@ -18752,7 +18831,7 @@ invalid_with_stmt_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ &&':'")); - asdl_seq * _gather_159_var; + asdl_seq * _gather_160_var; Token * _keyword; Token * _literal; void *_opt_var; @@ -18762,13 +18841,13 @@ invalid_with_stmt_rule(Parser *p) && (_keyword = _PyPegen_expect_token(p, 519)) // token='with' && - (_gather_159_var = _gather_159_rule(p)) // ','.(expression ['as' star_target])+ + (_gather_160_var = _gather_160_rule(p)) // ','.(expression ['as' star_target])+ && (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' ) { D(fprintf(stderr, "%*c+ invalid_with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ &&':'")); - _res = _PyPegen_dummy_name(p, _opt_var, _keyword, _gather_159_var, _literal); + _res = _PyPegen_dummy_name(p, _opt_var, _keyword, _gather_160_var, _literal); goto done; } p->mark = _mark; @@ -18781,7 +18860,7 @@ invalid_with_stmt_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' &&':'")); - asdl_seq * _gather_161_var; + asdl_seq * _gather_162_var; Token * _keyword; Token * _literal; Token * _literal_1; @@ -18797,7 +18876,7 @@ invalid_with_stmt_rule(Parser *p) && (_literal = _PyPegen_expect_token(p, 7)) // token='(' && - (_gather_161_var = _gather_161_rule(p)) // ','.(expressions ['as' star_target])+ + (_gather_162_var = _gather_162_rule(p)) // ','.(expressions ['as' star_target])+ && (_opt_var_1 = _PyPegen_expect_token(p, 12), 1) // ','? && @@ -18807,7 +18886,7 @@ invalid_with_stmt_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ invalid_with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' &&':'")); - _res = _PyPegen_dummy_name(p, _opt_var, _keyword, _literal, _gather_161_var, _opt_var_1, _literal_1, _literal_2); + _res = _PyPegen_dummy_name(p, _opt_var, _keyword, _literal, _gather_162_var, _opt_var_1, _literal_1, _literal_2); goto done; } p->mark = _mark; @@ -18856,7 +18935,7 @@ invalid_except_block_rule(Parser *p) && (expressions_var = expressions_rule(p)) // expressions && - (_opt_var = _tmp_163_rule(p), 1) // ['as' NAME] + (_opt_var = _tmp_164_rule(p), 1) // ['as' NAME] && (_literal_1 = _PyPegen_expect_token(p, 11)) // token=':' ) @@ -18890,7 +18969,7 @@ invalid_except_block_rule(Parser *p) && (expression_var = expression_rule(p)) // expression && - (_opt_var = _tmp_164_rule(p), 1) // ['as' NAME] + (_opt_var = _tmp_165_rule(p), 1) // ['as' NAME] && (_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':' ) @@ -19188,11 +19267,11 @@ invalid_double_starred_kvpairs_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> invalid_double_starred_kvpairs[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.double_starred_kvpair+ ',' invalid_kvpair")); - asdl_seq * _gather_165_var; + asdl_seq * _gather_166_var; Token * _literal; void *invalid_kvpair_var; if ( - (_gather_165_var = _gather_165_rule(p)) // ','.double_starred_kvpair+ + (_gather_166_var = _gather_166_rule(p)) // ','.double_starred_kvpair+ && (_literal = _PyPegen_expect_token(p, 12)) // token=',' && @@ -19200,7 +19279,7 @@ invalid_double_starred_kvpairs_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ invalid_double_starred_kvpairs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.double_starred_kvpair+ ',' invalid_kvpair")); - _res = _PyPegen_dummy_name(p, _gather_165_var, _literal, invalid_kvpair_var); + _res = _PyPegen_dummy_name(p, _gather_166_var, _literal, invalid_kvpair_var); goto done; } p->mark = _mark; @@ -19253,7 +19332,7 @@ invalid_double_starred_kvpairs_rule(Parser *p) && (a = _PyPegen_expect_token(p, 11)) // token=':' && - _PyPegen_lookahead(1, _tmp_167_rule, p) + _PyPegen_lookahead(1, _tmp_168_rule, p) ) { D(fprintf(stderr, "%*c+ invalid_double_starred_kvpairs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ':' &('}' | ',')")); @@ -20626,12 +20705,12 @@ _loop1_22_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_22[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_168_var; + void *_tmp_169_var; while ( - (_tmp_168_var = _tmp_168_rule(p)) // star_targets '=' + (_tmp_169_var = _tmp_169_rule(p)) // star_targets '=' ) { - _res = _tmp_168_var; + _res = _tmp_169_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -21134,12 +21213,12 @@ _loop0_31_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_31[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_169_var; + void *_tmp_170_var; while ( - (_tmp_169_var = _tmp_169_rule(p)) // '.' | '...' + (_tmp_170_var = _tmp_170_rule(p)) // '.' | '...' ) { - _res = _tmp_169_var; + _res = _tmp_170_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -21200,12 +21279,12 @@ _loop1_32_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_32[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')")); - void *_tmp_170_var; + void *_tmp_171_var; while ( - (_tmp_170_var = _tmp_170_rule(p)) // '.' | '...' + (_tmp_171_var = _tmp_171_rule(p)) // '.' | '...' ) { - _res = _tmp_170_var; + _res = _tmp_171_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -24316,12 +24395,12 @@ _loop1_84_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_84[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('@' named_expression NEWLINE)")); - void *_tmp_171_var; + void *_tmp_172_var; while ( - (_tmp_171_var = _tmp_171_rule(p)) // '@' named_expression NEWLINE + (_tmp_172_var = _tmp_172_rule(p)) // '@' named_expression NEWLINE ) { - _res = _tmp_171_var; + _res = _tmp_172_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -24434,12 +24513,12 @@ _loop1_86_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_86[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_expression)")); - void *_tmp_172_var; + void *_tmp_173_var; while ( - (_tmp_172_var = _tmp_172_rule(p)) // ',' star_expression + (_tmp_173_var = _tmp_173_rule(p)) // ',' star_expression ) { - _res = _tmp_172_var; + _res = _tmp_173_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -24619,12 +24698,12 @@ _loop1_89_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_89[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' expression)")); - void *_tmp_173_var; + void *_tmp_174_var; while ( - (_tmp_173_var = _tmp_173_rule(p)) // ',' expression + (_tmp_174_var = _tmp_174_rule(p)) // ',' expression ) { - _res = _tmp_173_var; + _res = _tmp_174_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -25649,12 +25728,12 @@ _loop1_104_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_104[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('or' conjunction)")); - void *_tmp_174_var; + void *_tmp_175_var; while ( - (_tmp_174_var = _tmp_174_rule(p)) // 'or' conjunction + (_tmp_175_var = _tmp_175_rule(p)) // 'or' conjunction ) { - _res = _tmp_174_var; + _res = _tmp_175_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -25720,12 +25799,12 @@ _loop1_105_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_105[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('and' inversion)")); - void *_tmp_175_var; + void *_tmp_176_var; while ( - (_tmp_175_var = _tmp_175_rule(p)) // 'and' inversion + (_tmp_176_var = _tmp_176_rule(p)) // 'and' inversion ) { - _res = _tmp_175_var; + _res = _tmp_176_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26641,12 +26720,12 @@ _loop0_120_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_176_var; + void *_tmp_177_var; while ( - (_tmp_176_var = _tmp_176_rule(p)) // 'if' disjunction + (_tmp_177_var = _tmp_177_rule(p)) // 'if' disjunction ) { - _res = _tmp_176_var; + _res = _tmp_177_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26707,12 +26786,12 @@ _loop0_121_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)")); - void *_tmp_177_var; + void *_tmp_178_var; while ( - (_tmp_177_var = _tmp_177_rule(p)) // 'if' disjunction + (_tmp_178_var = _tmp_178_rule(p)) // 'if' disjunction ) { - _res = _tmp_177_var; + _res = _tmp_178_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -26778,7 +26857,7 @@ _loop0_123_rule(Parser *p) while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_178_rule(p)) // starred_expression | direct_named_expression !'=' + (elem = _tmp_179_rule(p)) // starred_expression | direct_named_expression !'=' ) { _res = elem; @@ -26841,7 +26920,7 @@ _gather_122_rule(Parser *p) void *elem; asdl_seq * seq; if ( - (elem = _tmp_178_rule(p)) // starred_expression | direct_named_expression !'=' + (elem = _tmp_179_rule(p)) // starred_expression | direct_named_expression !'=' && (seq = _loop0_123_rule(p)) // _loop0_123 ) @@ -27387,12 +27466,12 @@ _loop0_133_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop0_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_179_var; + void *_tmp_180_var; while ( - (_tmp_179_var = _tmp_179_rule(p)) // ',' star_target + (_tmp_180_var = _tmp_180_rule(p)) // ',' star_target ) { - _res = _tmp_179_var; + _res = _tmp_180_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -27567,12 +27646,12 @@ _loop1_136_rule(Parser *p) return NULL; } D(fprintf(stderr, "%*c> _loop1_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)")); - void *_tmp_180_var; + void *_tmp_181_var; while ( - (_tmp_180_var = _tmp_180_rule(p)) // ',' star_target + (_tmp_181_var = _tmp_181_rule(p)) // ',' star_target ) { - _res = _tmp_180_var; + _res = _tmp_181_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -27935,9 +28014,67 @@ _tmp_142_rule(Parser *p) return _res; } -// _tmp_143: '=' | ':=' | ',' +// _tmp_143: NAME STRING | SOFT_KEYWORD static void * _tmp_143_rule(Parser *p) +{ + D(p->level++); + if (p->error_indicator) { + D(p->level--); + return NULL; + } + void * _res = NULL; + int _mark = p->mark; + { // NAME STRING + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "NAME STRING")); + expr_ty name_var; + expr_ty string_var; + if ( + (name_var = _PyPegen_name_token(p)) // NAME + && + (string_var = _PyPegen_string_token(p)) // STRING + ) + { + D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "NAME STRING")); + _res = _PyPegen_dummy_name(p, name_var, string_var); + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "NAME STRING")); + } + { // SOFT_KEYWORD + if (p->error_indicator) { + D(p->level--); + return NULL; + } + D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "SOFT_KEYWORD")); + expr_ty soft_keyword_var; + if ( + (soft_keyword_var = _PyPegen_soft_keyword_token(p)) // SOFT_KEYWORD + ) + { + D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "SOFT_KEYWORD")); + _res = soft_keyword_var; + goto done; + } + p->mark = _mark; + D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "SOFT_KEYWORD")); + } + _res = NULL; + done: + D(p->level--); + return _res; +} + +// _tmp_144: '=' | ':=' | ',' +static void * +_tmp_144_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -27951,18 +28088,18 @@ _tmp_143_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'='")); + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'='")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'='")); + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'='")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'='")); } { // ':=' @@ -27970,18 +28107,18 @@ _tmp_143_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':='")); + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':='")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 53)) // token=':=' ) { - D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':='")); + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':='")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':='")); } { // ',' @@ -27989,18 +28126,18 @@ _tmp_143_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' ) { - D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','")); } _res = NULL; @@ -28009,9 +28146,9 @@ _tmp_143_rule(Parser *p) return _res; } -// _tmp_144: list | tuple | genexp | 'True' | 'None' | 'False' +// _tmp_145: list | tuple | genexp | 'True' | 'None' | 'False' static void * -_tmp_144_rule(Parser *p) +_tmp_145_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28025,18 +28162,18 @@ _tmp_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "list")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "list")); expr_ty list_var; if ( (list_var = list_rule(p)) // list ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "list")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "list")); _res = list_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "list")); } { // tuple @@ -28044,18 +28181,18 @@ _tmp_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "tuple")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "tuple")); expr_ty tuple_var; if ( (tuple_var = tuple_rule(p)) // tuple ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "tuple")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "tuple")); _res = tuple_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "tuple")); } { // genexp @@ -28063,18 +28200,18 @@ _tmp_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "genexp")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "genexp")); expr_ty genexp_var; if ( (genexp_var = genexp_rule(p)) // genexp ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "genexp")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "genexp")); _res = genexp_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "genexp")); } { // 'True' @@ -28082,18 +28219,18 @@ _tmp_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'True'")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'True'")); Token * _keyword; if ( (_keyword = _PyPegen_expect_token(p, 524)) // token='True' ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'True'")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'True'")); _res = _keyword; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'True'")); } { // 'None' @@ -28101,18 +28238,18 @@ _tmp_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'None'")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'None'")); Token * _keyword; if ( (_keyword = _PyPegen_expect_token(p, 523)) // token='None' ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'None'")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'None'")); _res = _keyword; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'None'")); } { // 'False' @@ -28120,18 +28257,18 @@ _tmp_144_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'False'")); + D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'False'")); Token * _keyword; if ( (_keyword = _PyPegen_expect_token(p, 525)) // token='False' ) { - D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'False'")); + D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'False'")); _res = _keyword; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'False'")); } _res = NULL; @@ -28140,9 +28277,9 @@ _tmp_144_rule(Parser *p) return _res; } -// _tmp_145: '=' | ':=' | ',' +// _tmp_146: '=' | ':=' | ',' static void * -_tmp_145_rule(Parser *p) +_tmp_146_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28156,18 +28293,18 @@ _tmp_145_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'='")); + D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'='")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'='")); + D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'='")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'='")); } { // ':=' @@ -28175,18 +28312,18 @@ _tmp_145_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':='")); + D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':='")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 53)) // token=':=' ) { - D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':='")); + D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':='")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':='")); } { // ',' @@ -28194,18 +28331,18 @@ _tmp_145_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' ) { - D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','")); } _res = NULL; @@ -28214,9 +28351,9 @@ _tmp_145_rule(Parser *p) return _res; } -// _loop0_146: star_named_expressions +// _loop0_147: star_named_expressions static asdl_seq * -_loop0_146_rule(Parser *p) +_loop0_147_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28240,7 +28377,7 @@ _loop0_146_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions")); + D(fprintf(stderr, "%*c> _loop0_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions")); asdl_expr_seq* star_named_expressions_var; while ( (star_named_expressions_var = star_named_expressions_rule(p)) // star_named_expressions @@ -28262,7 +28399,7 @@ _loop0_146_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_146[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_147[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_named_expressions")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -28275,14 +28412,14 @@ _loop0_146_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_146_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_147_type, _seq); D(p->level--); return _seq; } -// _loop0_147: (star_targets '=') +// _loop0_148: (star_targets '=') static asdl_seq * -_loop0_147_rule(Parser *p) +_loop0_148_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28306,13 +28443,13 @@ _loop0_147_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_181_var; + D(fprintf(stderr, "%*c> _loop0_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); + void *_tmp_182_var; while ( - (_tmp_181_var = _tmp_181_rule(p)) // star_targets '=' + (_tmp_182_var = _tmp_182_rule(p)) // star_targets '=' ) { - _res = _tmp_181_var; + _res = _tmp_182_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -28328,7 +28465,7 @@ _loop0_147_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_147[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_148[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -28341,14 +28478,14 @@ _loop0_147_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_147_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_148_type, _seq); D(p->level--); return _seq; } -// _loop0_148: (star_targets '=') +// _loop0_149: (star_targets '=') static asdl_seq * -_loop0_148_rule(Parser *p) +_loop0_149_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28372,13 +28509,13 @@ _loop0_148_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); - void *_tmp_182_var; + D(fprintf(stderr, "%*c> _loop0_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')")); + void *_tmp_183_var; while ( - (_tmp_182_var = _tmp_182_rule(p)) // star_targets '=' + (_tmp_183_var = _tmp_183_rule(p)) // star_targets '=' ) { - _res = _tmp_182_var; + _res = _tmp_183_var; if (_n == _children_capacity) { _children_capacity *= 2; void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *)); @@ -28394,7 +28531,7 @@ _loop0_148_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_148[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_149[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -28407,14 +28544,14 @@ _loop0_148_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_148_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_149_type, _seq); D(p->level--); return _seq; } -// _tmp_149: yield_expr | star_expressions +// _tmp_150: yield_expr | star_expressions static void * -_tmp_149_rule(Parser *p) +_tmp_150_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28428,18 +28565,18 @@ _tmp_149_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr")); + D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr")); expr_ty yield_expr_var; if ( (yield_expr_var = yield_expr_rule(p)) // yield_expr ) { - D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr")); + D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr")); _res = yield_expr_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "yield_expr")); } { // star_expressions @@ -28447,18 +28584,18 @@ _tmp_149_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions")); expr_ty star_expressions_var; if ( (star_expressions_var = star_expressions_rule(p)) // star_expressions ) { - D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); + D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions")); _res = star_expressions_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_expressions")); } _res = NULL; @@ -28467,9 +28604,9 @@ _tmp_149_rule(Parser *p) return _res; } -// _tmp_150: '[' | '(' | '{' +// _tmp_151: '[' | '(' | '{' static void * -_tmp_150_rule(Parser *p) +_tmp_151_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28483,18 +28620,18 @@ _tmp_150_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 9)) // token='[' ) { - D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'['")); } { // '(' @@ -28502,18 +28639,18 @@ _tmp_150_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('")); + D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 7)) // token='(' ) { - D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('")); + D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'('")); } { // '{' @@ -28521,18 +28658,18 @@ _tmp_150_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 25)) // token='{' ) { - D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{'")); } _res = NULL; @@ -28541,9 +28678,9 @@ _tmp_150_rule(Parser *p) return _res; } -// _tmp_151: '[' | '{' +// _tmp_152: '[' | '{' static void * -_tmp_151_rule(Parser *p) +_tmp_152_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28557,18 +28694,18 @@ _tmp_151_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c> _tmp_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 9)) // token='[' ) { - D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); + D(fprintf(stderr, "%*c+ _tmp_152[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_152[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'['")); } { // '{' @@ -28576,18 +28713,18 @@ _tmp_151_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c> _tmp_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 25)) // token='{' ) { - D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); + D(fprintf(stderr, "%*c+ _tmp_152[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_152[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{'")); } _res = NULL; @@ -28596,9 +28733,9 @@ _tmp_151_rule(Parser *p) return _res; } -// _loop0_152: param_no_default +// _loop0_153: param_no_default static asdl_seq * -_loop0_152_rule(Parser *p) +_loop0_153_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28622,7 +28759,7 @@ _loop0_152_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); + D(fprintf(stderr, "%*c> _loop0_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default")); arg_ty param_no_default_var; while ( (param_no_default_var = param_no_default_rule(p)) // param_no_default @@ -28644,7 +28781,7 @@ _loop0_152_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_152[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_153[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_no_default")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -28657,14 +28794,14 @@ _loop0_152_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_152_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_153_type, _seq); D(p->level--); return _seq; } -// _loop1_153: param_with_default +// _loop1_154: param_with_default static asdl_seq * -_loop1_153_rule(Parser *p) +_loop1_154_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28688,7 +28825,7 @@ _loop1_153_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); + D(fprintf(stderr, "%*c> _loop1_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default")); NameDefaultPair* param_with_default_var; while ( (param_with_default_var = param_with_default_rule(p)) // param_with_default @@ -28710,7 +28847,7 @@ _loop1_153_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_153[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_154[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -28728,14 +28865,14 @@ _loop1_153_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop1_153_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_154_type, _seq); D(p->level--); return _seq; } -// _loop0_154: lambda_param_no_default +// _loop0_155: lambda_param_no_default static asdl_seq * -_loop0_154_rule(Parser *p) +_loop0_155_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28759,7 +28896,7 @@ _loop0_154_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); + D(fprintf(stderr, "%*c> _loop0_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default")); arg_ty lambda_param_no_default_var; while ( (lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default @@ -28781,7 +28918,7 @@ _loop0_154_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_154[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_155[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_no_default")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -28794,14 +28931,14 @@ _loop0_154_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_154_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_155_type, _seq); D(p->level--); return _seq; } -// _loop1_155: lambda_param_with_default +// _loop1_156: lambda_param_with_default static asdl_seq * -_loop1_155_rule(Parser *p) +_loop1_156_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28825,7 +28962,7 @@ _loop1_155_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop1_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); + D(fprintf(stderr, "%*c> _loop1_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default")); NameDefaultPair* lambda_param_with_default_var; while ( (lambda_param_with_default_var = lambda_param_with_default_rule(p)) // lambda_param_with_default @@ -28847,7 +28984,7 @@ _loop1_155_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop1_155[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop1_156[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default")); } if (_n == 0 || p->error_indicator) { @@ -28865,14 +29002,14 @@ _loop1_155_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop1_155_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop1_156_type, _seq); D(p->level--); return _seq; } -// _tmp_156: ')' | ',' (')' | '**') +// _tmp_157: ')' | ',' (')' | '**') static void * -_tmp_156_rule(Parser *p) +_tmp_157_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28886,18 +29023,18 @@ _tmp_156_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_157[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_157[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_157[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // ',' (')' | '**') @@ -28905,21 +29042,21 @@ _tmp_156_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + D(fprintf(stderr, "%*c> _tmp_157[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); Token * _literal; - void *_tmp_183_var; + void *_tmp_184_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_183_var = _tmp_183_rule(p)) // ')' | '**' + (_tmp_184_var = _tmp_184_rule(p)) // ')' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_183_var); + D(fprintf(stderr, "%*c+ _tmp_157[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_184_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_157[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (')' | '**')")); } _res = NULL; @@ -28928,9 +29065,9 @@ _tmp_156_rule(Parser *p) return _res; } -// _tmp_157: ':' | ',' (':' | '**') +// _tmp_158: ':' | ',' (':' | '**') static void * -_tmp_157_rule(Parser *p) +_tmp_158_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -28944,18 +29081,18 @@ _tmp_157_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_157[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_157[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_157[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_158[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // ',' (':' | '**') @@ -28963,21 +29100,21 @@ _tmp_157_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_157[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); + D(fprintf(stderr, "%*c> _tmp_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); Token * _literal; - void *_tmp_184_var; + void *_tmp_185_var; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (_tmp_184_var = _tmp_184_rule(p)) // ':' | '**' + (_tmp_185_var = _tmp_185_rule(p)) // ':' | '**' ) { - D(fprintf(stderr, "%*c+ _tmp_157[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); - _res = _PyPegen_dummy_name(p, _literal, _tmp_184_var); + D(fprintf(stderr, "%*c+ _tmp_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')")); + _res = _PyPegen_dummy_name(p, _literal, _tmp_185_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_157[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_158[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (':' | '**')")); } _res = NULL; @@ -28986,9 +29123,9 @@ _tmp_157_rule(Parser *p) return _res; } -// _tmp_158: ',' | ')' | ':' +// _tmp_159: ',' | ')' | ':' static void * -_tmp_158_rule(Parser *p) +_tmp_159_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29002,18 +29139,18 @@ _tmp_158_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c> _tmp_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' ) { - D(fprintf(stderr, "%*c+ _tmp_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c+ _tmp_159[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_158[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_159[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','")); } { // ')' @@ -29021,18 +29158,18 @@ _tmp_158_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_159[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_158[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_159[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // ':' @@ -29040,18 +29177,18 @@ _tmp_158_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_158[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_158[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_159[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_158[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_159[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } _res = NULL; @@ -29060,9 +29197,9 @@ _tmp_158_rule(Parser *p) return _res; } -// _loop0_160: ',' (expression ['as' star_target]) +// _loop0_161: ',' (expression ['as' star_target]) static asdl_seq * -_loop0_160_rule(Parser *p) +_loop0_161_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29086,13 +29223,13 @@ _loop0_160_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_160[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (expression ['as' star_target])")); + D(fprintf(stderr, "%*c> _loop0_161[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (expression ['as' star_target])")); Token * _literal; void *elem; while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_185_rule(p)) // expression ['as' star_target] + (elem = _tmp_186_rule(p)) // expression ['as' star_target] ) { _res = elem; @@ -29117,7 +29254,7 @@ _loop0_160_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_160[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_161[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (expression ['as' star_target])")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -29130,14 +29267,14 @@ _loop0_160_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_160_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_161_type, _seq); D(p->level--); return _seq; } -// _gather_159: (expression ['as' star_target]) _loop0_160 +// _gather_160: (expression ['as' star_target]) _loop0_161 static asdl_seq * -_gather_159_rule(Parser *p) +_gather_160_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29146,27 +29283,27 @@ _gather_159_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // (expression ['as' star_target]) _loop0_160 + { // (expression ['as' star_target]) _loop0_161 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(expression ['as' star_target]) _loop0_160")); + D(fprintf(stderr, "%*c> _gather_160[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(expression ['as' star_target]) _loop0_161")); void *elem; asdl_seq * seq; if ( - (elem = _tmp_185_rule(p)) // expression ['as' star_target] + (elem = _tmp_186_rule(p)) // expression ['as' star_target] && - (seq = _loop0_160_rule(p)) // _loop0_160 + (seq = _loop0_161_rule(p)) // _loop0_161 ) { - D(fprintf(stderr, "%*c+ _gather_159[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(expression ['as' star_target]) _loop0_160")); + D(fprintf(stderr, "%*c+ _gather_160[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(expression ['as' star_target]) _loop0_161")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_159[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(expression ['as' star_target]) _loop0_160")); + D(fprintf(stderr, "%*c%s _gather_160[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(expression ['as' star_target]) _loop0_161")); } _res = NULL; done: @@ -29174,9 +29311,9 @@ _gather_159_rule(Parser *p) return _res; } -// _loop0_162: ',' (expressions ['as' star_target]) +// _loop0_163: ',' (expressions ['as' star_target]) static asdl_seq * -_loop0_162_rule(Parser *p) +_loop0_163_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29200,13 +29337,13 @@ _loop0_162_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_162[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (expressions ['as' star_target])")); + D(fprintf(stderr, "%*c> _loop0_163[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (expressions ['as' star_target])")); Token * _literal; void *elem; while ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' && - (elem = _tmp_186_rule(p)) // expressions ['as' star_target] + (elem = _tmp_187_rule(p)) // expressions ['as' star_target] ) { _res = elem; @@ -29231,7 +29368,7 @@ _loop0_162_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_162[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_163[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (expressions ['as' star_target])")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -29244,14 +29381,14 @@ _loop0_162_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_162_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_163_type, _seq); D(p->level--); return _seq; } -// _gather_161: (expressions ['as' star_target]) _loop0_162 +// _gather_162: (expressions ['as' star_target]) _loop0_163 static asdl_seq * -_gather_161_rule(Parser *p) +_gather_162_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29260,27 +29397,27 @@ _gather_161_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // (expressions ['as' star_target]) _loop0_162 + { // (expressions ['as' star_target]) _loop0_163 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_161[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(expressions ['as' star_target]) _loop0_162")); + D(fprintf(stderr, "%*c> _gather_162[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(expressions ['as' star_target]) _loop0_163")); void *elem; asdl_seq * seq; if ( - (elem = _tmp_186_rule(p)) // expressions ['as' star_target] + (elem = _tmp_187_rule(p)) // expressions ['as' star_target] && - (seq = _loop0_162_rule(p)) // _loop0_162 + (seq = _loop0_163_rule(p)) // _loop0_163 ) { - D(fprintf(stderr, "%*c+ _gather_161[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(expressions ['as' star_target]) _loop0_162")); + D(fprintf(stderr, "%*c+ _gather_162[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(expressions ['as' star_target]) _loop0_163")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_161[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(expressions ['as' star_target]) _loop0_162")); + D(fprintf(stderr, "%*c%s _gather_162[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(expressions ['as' star_target]) _loop0_163")); } _res = NULL; done: @@ -29288,9 +29425,9 @@ _gather_161_rule(Parser *p) return _res; } -// _tmp_163: 'as' NAME +// _tmp_164: 'as' NAME static void * -_tmp_163_rule(Parser *p) +_tmp_164_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29304,7 +29441,7 @@ _tmp_163_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_163[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME")); + D(fprintf(stderr, "%*c> _tmp_164[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME")); Token * _keyword; expr_ty name_var; if ( @@ -29313,12 +29450,12 @@ _tmp_163_rule(Parser *p) (name_var = _PyPegen_name_token(p)) // NAME ) { - D(fprintf(stderr, "%*c+ _tmp_163[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME")); + D(fprintf(stderr, "%*c+ _tmp_164[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME")); _res = _PyPegen_dummy_name(p, _keyword, name_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_163[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_164[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' NAME")); } _res = NULL; @@ -29327,9 +29464,9 @@ _tmp_163_rule(Parser *p) return _res; } -// _tmp_164: 'as' NAME +// _tmp_165: 'as' NAME static void * -_tmp_164_rule(Parser *p) +_tmp_165_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29343,7 +29480,7 @@ _tmp_164_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_164[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME")); + D(fprintf(stderr, "%*c> _tmp_165[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME")); Token * _keyword; expr_ty name_var; if ( @@ -29352,12 +29489,12 @@ _tmp_164_rule(Parser *p) (name_var = _PyPegen_name_token(p)) // NAME ) { - D(fprintf(stderr, "%*c+ _tmp_164[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME")); + D(fprintf(stderr, "%*c+ _tmp_165[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME")); _res = _PyPegen_dummy_name(p, _keyword, name_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_164[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_165[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' NAME")); } _res = NULL; @@ -29366,9 +29503,9 @@ _tmp_164_rule(Parser *p) return _res; } -// _loop0_166: ',' double_starred_kvpair +// _loop0_167: ',' double_starred_kvpair static asdl_seq * -_loop0_166_rule(Parser *p) +_loop0_167_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29392,7 +29529,7 @@ _loop0_166_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _loop0_166[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' double_starred_kvpair")); + D(fprintf(stderr, "%*c> _loop0_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' double_starred_kvpair")); Token * _literal; KeyValuePair* elem; while ( @@ -29423,7 +29560,7 @@ _loop0_166_rule(Parser *p) _mark = p->mark; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _loop0_166[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _loop0_167[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' double_starred_kvpair")); } asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena); @@ -29436,14 +29573,14 @@ _loop0_166_rule(Parser *p) } for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); PyMem_Free(_children); - _PyPegen_insert_memo(p, _start_mark, _loop0_166_type, _seq); + _PyPegen_insert_memo(p, _start_mark, _loop0_167_type, _seq); D(p->level--); return _seq; } -// _gather_165: double_starred_kvpair _loop0_166 +// _gather_166: double_starred_kvpair _loop0_167 static asdl_seq * -_gather_165_rule(Parser *p) +_gather_166_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29452,27 +29589,27 @@ _gather_165_rule(Parser *p) } asdl_seq * _res = NULL; int _mark = p->mark; - { // double_starred_kvpair _loop0_166 + { // double_starred_kvpair _loop0_167 if (p->error_indicator) { D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _gather_165[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_166")); + D(fprintf(stderr, "%*c> _gather_166[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_167")); KeyValuePair* elem; asdl_seq * seq; if ( (elem = double_starred_kvpair_rule(p)) // double_starred_kvpair && - (seq = _loop0_166_rule(p)) // _loop0_166 + (seq = _loop0_167_rule(p)) // _loop0_167 ) { - D(fprintf(stderr, "%*c+ _gather_165[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_166")); + D(fprintf(stderr, "%*c+ _gather_166[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_167")); _res = _PyPegen_seq_insert_in_front(p, elem, seq); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _gather_165[%d-%d]: %s failed!\n", p->level, ' ', - p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "double_starred_kvpair _loop0_166")); + D(fprintf(stderr, "%*c%s _gather_166[%d-%d]: %s failed!\n", p->level, ' ', + p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "double_starred_kvpair _loop0_167")); } _res = NULL; done: @@ -29480,9 +29617,9 @@ _gather_165_rule(Parser *p) return _res; } -// _tmp_167: '}' | ',' +// _tmp_168: '}' | ',' static void * -_tmp_167_rule(Parser *p) +_tmp_168_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29496,18 +29633,18 @@ _tmp_167_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'}'")); + D(fprintf(stderr, "%*c> _tmp_168[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'}'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 26)) // token='}' ) { - D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'}'")); + D(fprintf(stderr, "%*c+ _tmp_168[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'}'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_168[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'}'")); } { // ',' @@ -29515,18 +29652,18 @@ _tmp_167_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_167[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c> _tmp_168[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 12)) // token=',' ) { - D(fprintf(stderr, "%*c+ _tmp_167[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); + D(fprintf(stderr, "%*c+ _tmp_168[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_167[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_168[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','")); } _res = NULL; @@ -29535,9 +29672,9 @@ _tmp_167_rule(Parser *p) return _res; } -// _tmp_168: star_targets '=' +// _tmp_169: star_targets '=' static void * -_tmp_168_rule(Parser *p) +_tmp_169_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29551,7 +29688,7 @@ _tmp_168_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_168[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_169[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty z; if ( @@ -29560,7 +29697,7 @@ _tmp_168_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_168[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_169[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29570,7 +29707,7 @@ _tmp_168_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_168[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_169[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -29579,9 +29716,9 @@ _tmp_168_rule(Parser *p) return _res; } -// _tmp_169: '.' | '...' +// _tmp_170: '.' | '...' static void * -_tmp_169_rule(Parser *p) +_tmp_170_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29595,18 +29732,18 @@ _tmp_169_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_169[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_169[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_169[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -29614,18 +29751,18 @@ _tmp_169_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_169[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_169[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_169[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -29634,9 +29771,9 @@ _tmp_169_rule(Parser *p) return _res; } -// _tmp_170: '.' | '...' +// _tmp_171: '.' | '...' static void * -_tmp_170_rule(Parser *p) +_tmp_171_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29650,18 +29787,18 @@ _tmp_170_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 23)) // token='.' ) { - D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); + D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'")); } { // '...' @@ -29669,18 +29806,18 @@ _tmp_170_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_170[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 52)) // token='...' ) { - D(fprintf(stderr, "%*c+ _tmp_170[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); + D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_170[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'")); } _res = NULL; @@ -29689,9 +29826,9 @@ _tmp_170_rule(Parser *p) return _res; } -// _tmp_171: '@' named_expression NEWLINE +// _tmp_172: '@' named_expression NEWLINE static void * -_tmp_171_rule(Parser *p) +_tmp_172_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29705,7 +29842,7 @@ _tmp_171_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c> _tmp_172[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); Token * _literal; expr_ty f; Token * newline_var; @@ -29717,7 +29854,7 @@ _tmp_171_rule(Parser *p) (newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE' ) { - D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); + D(fprintf(stderr, "%*c+ _tmp_172[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE")); _res = f; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29727,7 +29864,7 @@ _tmp_171_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_172[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'@' named_expression NEWLINE")); } _res = NULL; @@ -29736,9 +29873,9 @@ _tmp_171_rule(Parser *p) return _res; } -// _tmp_172: ',' star_expression +// _tmp_173: ',' star_expression static void * -_tmp_172_rule(Parser *p) +_tmp_173_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29752,7 +29889,7 @@ _tmp_172_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_172[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c> _tmp_173[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression")); Token * _literal; expr_ty c; if ( @@ -29761,7 +29898,7 @@ _tmp_172_rule(Parser *p) (c = star_expression_rule(p)) // star_expression ) { - D(fprintf(stderr, "%*c+ _tmp_172[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); + D(fprintf(stderr, "%*c+ _tmp_173[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29771,7 +29908,7 @@ _tmp_172_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_172[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_173[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_expression")); } _res = NULL; @@ -29780,9 +29917,9 @@ _tmp_172_rule(Parser *p) return _res; } -// _tmp_173: ',' expression +// _tmp_174: ',' expression static void * -_tmp_173_rule(Parser *p) +_tmp_174_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29796,7 +29933,7 @@ _tmp_173_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_173[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c> _tmp_174[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression")); Token * _literal; expr_ty c; if ( @@ -29805,7 +29942,7 @@ _tmp_173_rule(Parser *p) (c = expression_rule(p)) // expression ) { - D(fprintf(stderr, "%*c+ _tmp_173[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); + D(fprintf(stderr, "%*c+ _tmp_174[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29815,7 +29952,7 @@ _tmp_173_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_173[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_174[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' expression")); } _res = NULL; @@ -29824,9 +29961,9 @@ _tmp_173_rule(Parser *p) return _res; } -// _tmp_174: 'or' conjunction +// _tmp_175: 'or' conjunction static void * -_tmp_174_rule(Parser *p) +_tmp_175_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29840,7 +29977,7 @@ _tmp_174_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_174[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); Token * _keyword; expr_ty c; if ( @@ -29849,7 +29986,7 @@ _tmp_174_rule(Parser *p) (c = conjunction_rule(p)) // conjunction ) { - D(fprintf(stderr, "%*c+ _tmp_174[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); + D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29859,7 +29996,7 @@ _tmp_174_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_174[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'or' conjunction")); } _res = NULL; @@ -29868,9 +30005,9 @@ _tmp_174_rule(Parser *p) return _res; } -// _tmp_175: 'and' inversion +// _tmp_176: 'and' inversion static void * -_tmp_175_rule(Parser *p) +_tmp_176_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29884,7 +30021,7 @@ _tmp_175_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c> _tmp_176[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion")); Token * _keyword; expr_ty c; if ( @@ -29893,7 +30030,7 @@ _tmp_175_rule(Parser *p) (c = inversion_rule(p)) // inversion ) { - D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); + D(fprintf(stderr, "%*c+ _tmp_176[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29903,7 +30040,7 @@ _tmp_175_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_176[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'and' inversion")); } _res = NULL; @@ -29912,9 +30049,9 @@ _tmp_175_rule(Parser *p) return _res; } -// _tmp_176: 'if' disjunction +// _tmp_177: 'if' disjunction static void * -_tmp_176_rule(Parser *p) +_tmp_177_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29928,7 +30065,7 @@ _tmp_176_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_176[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -29937,7 +30074,7 @@ _tmp_176_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_176[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_177[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29947,7 +30084,7 @@ _tmp_176_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_176[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_177[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -29956,9 +30093,9 @@ _tmp_176_rule(Parser *p) return _res; } -// _tmp_177: 'if' disjunction +// _tmp_178: 'if' disjunction static void * -_tmp_177_rule(Parser *p) +_tmp_178_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -29972,7 +30109,7 @@ _tmp_177_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); Token * _keyword; expr_ty z; if ( @@ -29981,7 +30118,7 @@ _tmp_177_rule(Parser *p) (z = disjunction_rule(p)) // disjunction ) { - D(fprintf(stderr, "%*c+ _tmp_177[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); + D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction")); _res = z; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -29991,7 +30128,7 @@ _tmp_177_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_177[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction")); } _res = NULL; @@ -30000,9 +30137,9 @@ _tmp_177_rule(Parser *p) return _res; } -// _tmp_178: starred_expression | direct_named_expression !'=' +// _tmp_179: starred_expression | direct_named_expression !'=' static void * -_tmp_178_rule(Parser *p) +_tmp_179_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30016,18 +30153,18 @@ _tmp_178_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression")); expr_ty starred_expression_var; if ( (starred_expression_var = starred_expression_rule(p)) // starred_expression ) { - D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); + D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression")); _res = starred_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression")); } { // direct_named_expression !'=' @@ -30035,7 +30172,7 @@ _tmp_178_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); + D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); expr_ty direct_named_expression_var; if ( (direct_named_expression_var = direct_named_expression_rule(p)) // direct_named_expression @@ -30043,12 +30180,12 @@ _tmp_178_rule(Parser *p) _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); + D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "direct_named_expression !'='")); _res = direct_named_expression_var; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "direct_named_expression !'='")); } _res = NULL; @@ -30057,9 +30194,9 @@ _tmp_178_rule(Parser *p) return _res; } -// _tmp_179: ',' star_target +// _tmp_180: ',' star_target static void * -_tmp_179_rule(Parser *p) +_tmp_180_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30073,7 +30210,7 @@ _tmp_179_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -30082,7 +30219,7 @@ _tmp_179_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -30092,7 +30229,7 @@ _tmp_179_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -30101,9 +30238,9 @@ _tmp_179_rule(Parser *p) return _res; } -// _tmp_180: ',' star_target +// _tmp_181: ',' star_target static void * -_tmp_180_rule(Parser *p) +_tmp_181_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30117,7 +30254,7 @@ _tmp_180_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target")); Token * _literal; expr_ty c; if ( @@ -30126,7 +30263,7 @@ _tmp_180_rule(Parser *p) (c = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); + D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target")); _res = c; if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; @@ -30136,7 +30273,7 @@ _tmp_180_rule(Parser *p) goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target")); } _res = NULL; @@ -30145,9 +30282,9 @@ _tmp_180_rule(Parser *p) return _res; } -// _tmp_181: star_targets '=' +// _tmp_182: star_targets '=' static void * -_tmp_181_rule(Parser *p) +_tmp_182_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30161,7 +30298,7 @@ _tmp_181_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -30170,12 +30307,12 @@ _tmp_181_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -30184,9 +30321,9 @@ _tmp_181_rule(Parser *p) return _res; } -// _tmp_182: star_targets '=' +// _tmp_183: star_targets '=' static void * -_tmp_182_rule(Parser *p) +_tmp_183_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30200,7 +30337,7 @@ _tmp_182_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='")); Token * _literal; expr_ty star_targets_var; if ( @@ -30209,12 +30346,12 @@ _tmp_182_rule(Parser *p) (_literal = _PyPegen_expect_token(p, 22)) // token='=' ) { - D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); + D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='")); _res = _PyPegen_dummy_name(p, star_targets_var, _literal); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='")); } _res = NULL; @@ -30223,9 +30360,9 @@ _tmp_182_rule(Parser *p) return _res; } -// _tmp_183: ')' | '**' +// _tmp_184: ')' | '**' static void * -_tmp_183_rule(Parser *p) +_tmp_184_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30239,18 +30376,18 @@ _tmp_183_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 8)) // token=')' ) { - D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); + D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'")); } { // '**' @@ -30258,18 +30395,18 @@ _tmp_183_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -30278,9 +30415,9 @@ _tmp_183_rule(Parser *p) return _res; } -// _tmp_184: ':' | '**' +// _tmp_185: ':' | '**' static void * -_tmp_184_rule(Parser *p) +_tmp_185_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30294,18 +30431,18 @@ _tmp_184_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c> _tmp_185[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 11)) // token=':' ) { - D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); + D(fprintf(stderr, "%*c+ _tmp_185[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_185[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'")); } { // '**' @@ -30313,18 +30450,18 @@ _tmp_184_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c> _tmp_185[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'")); Token * _literal; if ( (_literal = _PyPegen_expect_token(p, 35)) // token='**' ) { - D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); + D(fprintf(stderr, "%*c+ _tmp_185[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'")); _res = _literal; goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_185[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'")); } _res = NULL; @@ -30333,9 +30470,9 @@ _tmp_184_rule(Parser *p) return _res; } -// _tmp_185: expression ['as' star_target] +// _tmp_186: expression ['as' star_target] static void * -_tmp_185_rule(Parser *p) +_tmp_186_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30349,22 +30486,22 @@ _tmp_185_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_185[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); + D(fprintf(stderr, "%*c> _tmp_186[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings expr_ty expression_var; if ( (expression_var = expression_rule(p)) // expression && - (_opt_var = _tmp_187_rule(p), 1) // ['as' star_target] + (_opt_var = _tmp_188_rule(p), 1) // ['as' star_target] ) { - D(fprintf(stderr, "%*c+ _tmp_185[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); + D(fprintf(stderr, "%*c+ _tmp_186[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]")); _res = _PyPegen_dummy_name(p, expression_var, _opt_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_185[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_186[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ['as' star_target]")); } _res = NULL; @@ -30373,9 +30510,9 @@ _tmp_185_rule(Parser *p) return _res; } -// _tmp_186: expressions ['as' star_target] +// _tmp_187: expressions ['as' star_target] static void * -_tmp_186_rule(Parser *p) +_tmp_187_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30389,22 +30526,22 @@ _tmp_186_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_186[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); + D(fprintf(stderr, "%*c> _tmp_187[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); void *_opt_var; UNUSED(_opt_var); // Silence compiler warnings expr_ty expressions_var; if ( (expressions_var = expressions_rule(p)) // expressions && - (_opt_var = _tmp_188_rule(p), 1) // ['as' star_target] + (_opt_var = _tmp_189_rule(p), 1) // ['as' star_target] ) { - D(fprintf(stderr, "%*c+ _tmp_186[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); + D(fprintf(stderr, "%*c+ _tmp_187[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]")); _res = _PyPegen_dummy_name(p, expressions_var, _opt_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_186[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_187[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expressions ['as' star_target]")); } _res = NULL; @@ -30413,9 +30550,9 @@ _tmp_186_rule(Parser *p) return _res; } -// _tmp_187: 'as' star_target +// _tmp_188: 'as' star_target static void * -_tmp_187_rule(Parser *p) +_tmp_188_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30429,7 +30566,7 @@ _tmp_187_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_187[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c> _tmp_188[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); Token * _keyword; expr_ty star_target_var; if ( @@ -30438,12 +30575,12 @@ _tmp_187_rule(Parser *p) (star_target_var = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_187[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c+ _tmp_188[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); _res = _PyPegen_dummy_name(p, _keyword, star_target_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_187[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_188[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target")); } _res = NULL; @@ -30452,9 +30589,9 @@ _tmp_187_rule(Parser *p) return _res; } -// _tmp_188: 'as' star_target +// _tmp_189: 'as' star_target static void * -_tmp_188_rule(Parser *p) +_tmp_189_rule(Parser *p) { D(p->level++); if (p->error_indicator) { @@ -30468,7 +30605,7 @@ _tmp_188_rule(Parser *p) D(p->level--); return NULL; } - D(fprintf(stderr, "%*c> _tmp_188[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c> _tmp_189[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target")); Token * _keyword; expr_ty star_target_var; if ( @@ -30477,12 +30614,12 @@ _tmp_188_rule(Parser *p) (star_target_var = star_target_rule(p)) // star_target ) { - D(fprintf(stderr, "%*c+ _tmp_188[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); + D(fprintf(stderr, "%*c+ _tmp_189[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target")); _res = _PyPegen_dummy_name(p, _keyword, star_target_var); goto done; } p->mark = _mark; - D(fprintf(stderr, "%*c%s _tmp_188[%d-%d]: %s failed!\n", p->level, ' ', + D(fprintf(stderr, "%*c%s _tmp_189[%d-%d]: %s failed!\n", p->level, ' ', p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target")); } _res = NULL; @@ -30497,6 +30634,7 @@ _PyPegen_parse(Parser *p) // Initialize keywords p->keywords = reserved_keywords; p->n_keyword_lists = n_keyword_lists; + p->soft_keywords = soft_keywords; // Run parser void *result = NULL; diff --git a/Parser/pegen.c b/Parser/pegen.c index 7258cafca58cac..eb70ea7d24fec1 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -943,6 +943,23 @@ _PyPegen_string_token(Parser *p) return _PyPegen_expect_token(p, STRING); } + +expr_ty _PyPegen_soft_keyword_token(Parser *p) { + Token *t = _PyPegen_expect_token(p, NAME); + if (t == NULL) { + return NULL; + } + char *the_token; + Py_ssize_t size; + PyBytes_AsStringAndSize(t->bytes, &the_token, &size); + for (char **keyword = p->soft_keywords; *keyword != NULL; keyword++) { + if (strncmp(*keyword, the_token, size) == 0) { + return _PyPegen_name_token(p); + } + } + return NULL; +} + static PyObject * parsenumber_raw(const char *s) { @@ -1151,6 +1168,7 @@ _PyPegen_Parser_New(struct tok_state *tok, int start_rule, int flags, p->tok = tok; p->keywords = NULL; p->n_keyword_lists = -1; + p->soft_keywords = NULL; p->tokens = PyMem_Malloc(sizeof(Token *)); if (!p->tokens) { PyMem_Free(p); diff --git a/Parser/pegen.h b/Parser/pegen.h index f3e0876afba607..9b218d4c59c4f9 100644 --- a/Parser/pegen.h +++ b/Parser/pegen.h @@ -59,6 +59,7 @@ typedef struct { int fill, size; PyArena *arena; KeywordToken **keywords; + char **soft_keywords; int n_keyword_lists; int start_rule; int *errcode; @@ -125,6 +126,7 @@ int _PyPegen_lookahead(int, void *(func)(Parser *), Parser *); Token *_PyPegen_expect_token(Parser *p, int type); Token *_PyPegen_expect_forced_token(Parser *p, int type, const char* expected); expr_ty _PyPegen_expect_soft_keyword(Parser *p, const char *keyword); +expr_ty _PyPegen_soft_keyword_token(Parser *p); Token *_PyPegen_get_last_nonnwhitespace_token(Parser *); int _PyPegen_fill_token(Parser *p); expr_ty _PyPegen_name_token(Parser *p); diff --git a/Parser/token.c b/Parser/token.c index a489668900901d..74bca0eff657b7 100644 --- a/Parser/token.c +++ b/Parser/token.c @@ -65,6 +65,7 @@ const char * const _PyParser_TokenNames[] = { "ASYNC", "TYPE_IGNORE", "TYPE_COMMENT", + "SOFT_KEYWORD", "", "", "", diff --git a/Tools/peg_generator/pegen/c_generator.py b/Tools/peg_generator/pegen/c_generator.py index 24418ea70e448b..d762240c9ba67f 100644 --- a/Tools/peg_generator/pegen/c_generator.py +++ b/Tools/peg_generator/pegen/c_generator.py @@ -46,6 +46,7 @@ // Initialize keywords p->keywords = reserved_keywords; p->n_keyword_lists = n_keyword_lists; + p->soft_keywords = soft_keywords; return start_rule(p); } @@ -66,6 +67,7 @@ class NodeTypes(Enum): "NAME": NodeTypes.NAME_TOKEN, "NUMBER": NodeTypes.NUMBER_TOKEN, "STRING": NodeTypes.STRING_TOKEN, + "SOFT_KEYWORD": NodeTypes.SOFT_KEYWORD, } @@ -411,6 +413,7 @@ def generate(self, filename: str) -> None: if subheader: self.print(subheader) self._setup_keywords() + self._setup_soft_keywords() for i, (rulename, rule) in enumerate(self.todo.items(), 1000): comment = " // Left-recursive" if rule.left_recursive else "" self.print(f"#define {rulename}_type {i}{comment}") @@ -474,6 +477,15 @@ def _setup_keywords(self) -> None: self.print("},") self.print("};") + def _setup_soft_keywords(self) -> None: + soft_keywords = sorted(self.callmakervisitor.soft_keywords) + self.print("static char *soft_keywords[] = {") + with self.indent(): + for keyword in soft_keywords: + self.print(f'"{keyword}",') + self.print("NULL,") + self.print("};") + def _set_up_token_start_metadata_extraction(self) -> None: self.print("if (p->mark == p->fill && _PyPegen_fill_token(p) < 0) {") with self.indent(): From b5b98bd8f8c72a9068cf149dbc162c8c95d30057 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Fri, 16 Apr 2021 00:45:42 +0100 Subject: [PATCH 068/108] bpo-43823: Fix location of one of the errors for invalid dictionary literals (GH-25427) --- Grammar/python.gram | 3 ++- Parser/parser.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Grammar/python.gram b/Grammar/python.gram index e5baac36636751..d91e887e04dc00 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -899,6 +899,7 @@ invalid_double_starred_kvpairs: | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use a starred expression in a dictionary value") } | expression a=':' &('}'|',') { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "expression expected after dictionary key and ':'") } invalid_kvpair: - | a=expression !(':') { RAISE_SYNTAX_ERROR("':' expected after dictionary key") } + | a=expression !(':') { + RAISE_ERROR_KNOWN_LOCATION(p, PyExc_SyntaxError, a->lineno, a->end_col_offset - 1, "':' expected after dictionary key") } | expression ':' a='*' bitwise_or { RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "cannot use a starred expression in a dictionary value") } | expression a=':' {RAISE_SYNTAX_ERROR_KNOWN_LOCATION(a, "expression expected after dictionary key and ':'") } diff --git a/Parser/parser.c b/Parser/parser.c index 2f7a71a5418e64..e47093e1dca7dd 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -19379,7 +19379,7 @@ invalid_kvpair_rule(Parser *p) ) { D(fprintf(stderr, "%*c+ invalid_kvpair[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !(':')")); - _res = RAISE_SYNTAX_ERROR ( "':' expected after dictionary key" ); + _res = RAISE_ERROR_KNOWN_LOCATION ( p , PyExc_SyntaxError , a -> lineno , a -> end_col_offset - 1 , "':' expected after dictionary key" ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; D(p->level--); From ff3d9c0f1a960c3d677d7eb0200d59f3aa2a8b1b Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Fri, 16 Apr 2021 01:28:48 +0100 Subject: [PATCH 069/108] Improve the section with SyntaxError message improvements to the What's New of 3.10 (GH-25428) --- Doc/whatsnew/3.10.rst | 93 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 0962f04b3a7d9c..6623adfbf4f3d3 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -145,7 +145,7 @@ For instance, consider the following code (notice the unclosed '{'): previous versions of the interpreter reported confusing places as the location of the syntax error: -.. code-block:: text +.. code-block:: python File "example.py", line 3 some_other_code = foo() @@ -154,7 +154,7 @@ the syntax error: but in Python3.10 a more informative error is emitted: -.. code-block:: text +.. code-block:: python File "example.py", line 1 expected = {9: 1, 18: 2, 19: 2, 27: 3, 28: 3, 29: 3, 36: 4, 37: 4, @@ -170,6 +170,95 @@ These improvements are inspired by previous work in the PyPy interpreter. (Contributed by Pablo Galindo in :issue:`42864` and Batuhan Taskaya in :issue:`40176`.) +A considerable ammount of new specialized messages for :exc:`SyntaxError` exceptions +have been incorporated. Some of the most notable ones: + +* Missing ``:`` before blocks: + +.. code-block:: python + + >>> if rocket.position > event_horizon + File "", line 1 + if rocket.position > event_horizon + ^ + SyntaxError: expected ':' + + +* Unparenthesised tuples in comprehensions targets: + +.. code-block:: python + + >>> {x,y for x,y in range(100)} + File "", line 1 + {x,y for x,y in range(100)} + ^ + SyntaxError: did you forget parentheses around the comprehension target? + +* Missing commas in collection literals: + +.. code-block:: python + + >>> items = { + ... x: 1, + ... y: 2 + ... z: 3, + File "", line 3 + y: 2 + ^ + SyntaxError: invalid syntax. Perhaps you forgot a comma? + +* Exception groups without parentheses: + +.. code-block:: python + + >>> try: + ... build_dyson_sphere() + ... except NotEnoughScienceError, NotEnoughResourcesError: + File "", line 3 + except NotEnoughScienceError, NotEnoughResourcesError: + ^ + SyntaxError: exception group must be parenthesized + +* Missing ``:`` and values in dictionary literals: + +.. code-block:: python + + >>> values = { + ... x: 1, + ... y: 2, + ... z: + ... } + File "", line 4 + z: + ^ + SyntaxError: expression expected after dictionary key and ':' + + >>> values = {x:1, y:2, z w:3} + File "", line 1 + values = {x:1, y:2, z w:3} + ^ + SyntaxError: ':' expected after dictionary key + +* Usage of ``=`` instead of ``==`` in comparisons: + +.. code-block:: python + + >>> if rocket.position = event_horizon: + File "", line 1 + if rocket.position = event_horizon: + ^ + SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='? + +* Usage of ``*`` in f-strings: + +.. code-block:: python + + >>> f"Black holes {*all_black_holes} and revelations" + File "", line 1 + (*all_black_holes) + ^ + SyntaxError: f-string: cannot use starred expression here + AttributeErrors ~~~~~~~~~~~~~~~ From 8a232c7b17a2e41ae14d8bb7937ddfea69301dce Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Fri, 16 Apr 2021 14:01:04 +0900 Subject: [PATCH 070/108] bpo-41323: compiler: Reuse tuple in constant tuple folding (GH-25419) --- .../2021-04-15-10-19-59.bpo-41323.nsvpSg.rst | 2 + Python/compile.c | 39 +- Python/importlib.h | 1326 +++--- Python/importlib_external.h | 4166 ++++++++--------- Python/importlib_zipimport.h | 988 ++-- 5 files changed, 3268 insertions(+), 3253 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-15-10-19-59.bpo-41323.nsvpSg.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-15-10-19-59.bpo-41323.nsvpSg.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-15-10-19-59.bpo-41323.nsvpSg.rst new file mode 100644 index 00000000000000..b14299e77ebd5f --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-15-10-19-59.bpo-41323.nsvpSg.rst @@ -0,0 +1,2 @@ +Constant tuple folding in bytecode optimizer now reuses tuple in constant +table. diff --git a/Python/compile.c b/Python/compile.c index 11d910b5b7d58a..496b4b0371f1df 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -6751,7 +6751,7 @@ static int normalize_basic_block(basicblock *bb); static int -optimize_cfg(struct assembler *a, PyObject *consts); +optimize_cfg(struct compiler *c, struct assembler *a, PyObject *consts); static int ensure_exits_have_lineno(struct compiler *c); @@ -6850,7 +6850,7 @@ assemble(struct compiler *c, int addNone) if (consts == NULL) { goto error; } - if (optimize_cfg(&a, consts)) { + if (optimize_cfg(c, &a, consts)) { goto error; } @@ -6898,7 +6898,8 @@ assemble(struct compiler *c, int addNone) Called with codestr pointing to the first LOAD_CONST. */ static int -fold_tuple_on_constants(struct instr *inst, +fold_tuple_on_constants(struct compiler *c, + struct instr *inst, int n, PyObject *consts) { /* Pre-conditions */ @@ -6923,15 +6924,27 @@ fold_tuple_on_constants(struct instr *inst, Py_INCREF(constant); PyTuple_SET_ITEM(newconst, i, constant); } - Py_ssize_t index = PyList_GET_SIZE(consts); - if ((size_t)index >= (size_t)INT_MAX - 1) { + if (merge_const_one(c, &newconst) == 0) { Py_DECREF(newconst); - PyErr_SetString(PyExc_OverflowError, "too many constants"); return -1; } - if (PyList_Append(consts, newconst)) { - Py_DECREF(newconst); - return -1; + + Py_ssize_t index; + for (index = 0; index < PyList_GET_SIZE(consts); index++) { + if (PyList_GET_ITEM(consts, index) == newconst) { + break; + } + } + if (index == PyList_GET_SIZE(consts)) { + if ((size_t)index >= (size_t)INT_MAX - 1) { + Py_DECREF(newconst); + PyErr_SetString(PyExc_OverflowError, "too many constants"); + return -1; + } + if (PyList_Append(consts, newconst)) { + Py_DECREF(newconst); + return -1; + } } Py_DECREF(newconst); for (int i = 0; i < n; i++) { @@ -6968,7 +6981,7 @@ eliminate_jump_to_jump(basicblock *bb, int opcode) { /* Optimization */ static int -optimize_basic_block(basicblock *bb, PyObject *consts) +optimize_basic_block(struct compiler *c, basicblock *bb, PyObject *consts) { assert(PyList_CheckExact(consts)); struct instr nop; @@ -7056,7 +7069,7 @@ optimize_basic_block(basicblock *bb, PyObject *consts) break; } if (i >= oparg) { - if (fold_tuple_on_constants(inst-oparg, oparg, consts)) { + if (fold_tuple_on_constants(c, inst-oparg, oparg, consts)) { goto error; } } @@ -7390,10 +7403,10 @@ propogate_line_numbers(struct assembler *a) { */ static int -optimize_cfg(struct assembler *a, PyObject *consts) +optimize_cfg(struct compiler *c, struct assembler *a, PyObject *consts) { for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { - if (optimize_basic_block(b, consts)) { + if (optimize_basic_block(c, b, consts)) { return -1; } clean_basic_block(b, -1); diff --git a/Python/importlib.h b/Python/importlib.h index b561038673b681..ea00ff36d73916 100644 --- a/Python/importlib.h +++ b/Python/importlib.h @@ -1212,676 +1212,676 @@ const unsigned char _Py_M__importlib_bootstrap[] = { 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, 114,128,0,0,0,27,3,0,0,114,188,0,0,0,122,26, 66,117,105,108,116,105,110,73,109,112,111,114,116,101,114,46, - 105,115,95,112,97,99,107,97,103,101,41,2,78,78,41,1, - 78,41,18,114,9,0,0,0,114,8,0,0,0,114,1,0, - 0,0,114,10,0,0,0,114,151,0,0,0,218,12,115,116, - 97,116,105,99,109,101,116,104,111,100,114,114,0,0,0,218, - 11,99,108,97,115,115,109,101,116,104,111,100,114,183,0,0, - 0,114,184,0,0,0,114,162,0,0,0,114,163,0,0,0, - 114,95,0,0,0,114,187,0,0,0,114,189,0,0,0,114, - 128,0,0,0,114,111,0,0,0,114,170,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, - 0,0,114,175,0,0,0,212,2,0,0,115,48,0,0,0, - 8,0,4,2,4,7,2,2,10,1,2,10,12,1,2,8, - 12,1,2,14,10,1,2,7,10,1,2,4,2,1,12,1, - 2,4,2,1,12,1,2,4,2,1,12,1,12,4,255,128, - 114,175,0,0,0,99,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,4,0,0,0,64,0,0,0,115,144, - 0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,100, - 2,90,4,101,5,100,3,100,4,132,0,131,1,90,6,101, - 7,100,22,100,6,100,7,132,1,131,1,90,8,101,7,100, - 23,100,8,100,9,132,1,131,1,90,9,101,5,100,10,100, - 11,132,0,131,1,90,10,101,5,100,12,100,13,132,0,131, - 1,90,11,101,7,100,14,100,15,132,0,131,1,90,12,101, - 7,101,13,100,16,100,17,132,0,131,1,131,1,90,14,101, - 7,101,13,100,18,100,19,132,0,131,1,131,1,90,15,101, - 7,101,13,100,20,100,21,132,0,131,1,131,1,90,16,100, - 5,83,0,41,24,218,14,70,114,111,122,101,110,73,109,112, - 111,114,116,101,114,122,142,77,101,116,97,32,112,97,116,104, - 32,105,109,112,111,114,116,32,102,111,114,32,102,114,111,122, - 101,110,32,109,111,100,117,108,101,115,46,10,10,32,32,32, - 32,65,108,108,32,109,101,116,104,111,100,115,32,97,114,101, - 32,101,105,116,104,101,114,32,99,108,97,115,115,32,111,114, - 32,115,116,97,116,105,99,32,109,101,116,104,111,100,115,32, - 116,111,32,97,118,111,105,100,32,116,104,101,32,110,101,101, - 100,32,116,111,10,32,32,32,32,105,110,115,116,97,110,116, - 105,97,116,101,32,116,104,101,32,99,108,97,115,115,46,10, - 10,32,32,32,32,90,6,102,114,111,122,101,110,99,1,0, - 0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0, - 0,0,67,0,0,0,115,28,0,0,0,116,0,160,1,100, - 1,116,2,161,2,1,0,100,2,160,3,124,0,106,4,116, - 5,106,6,161,2,83,0,41,4,114,176,0,0,0,122,80, - 70,114,111,122,101,110,73,109,112,111,114,116,101,114,46,109, - 111,100,117,108,101,95,114,101,112,114,40,41,32,105,115,32, + 105,115,95,112,97,99,107,97,103,101,169,2,78,78,114,0, + 0,0,0,41,18,114,9,0,0,0,114,8,0,0,0,114, + 1,0,0,0,114,10,0,0,0,114,151,0,0,0,218,12, + 115,116,97,116,105,99,109,101,116,104,111,100,114,114,0,0, + 0,218,11,99,108,97,115,115,109,101,116,104,111,100,114,183, + 0,0,0,114,184,0,0,0,114,162,0,0,0,114,163,0, + 0,0,114,95,0,0,0,114,187,0,0,0,114,189,0,0, + 0,114,128,0,0,0,114,111,0,0,0,114,170,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,114,175,0,0,0,212,2,0,0,115,48,0, + 0,0,8,0,4,2,4,7,2,2,10,1,2,10,12,1, + 2,8,12,1,2,14,10,1,2,7,10,1,2,4,2,1, + 12,1,2,4,2,1,12,1,2,4,2,1,12,1,12,4, + 255,128,114,175,0,0,0,99,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,4,0,0,0,64,0,0,0, + 115,144,0,0,0,101,0,90,1,100,0,90,2,100,1,90, + 3,100,2,90,4,101,5,100,3,100,4,132,0,131,1,90, + 6,101,7,100,22,100,6,100,7,132,1,131,1,90,8,101, + 7,100,23,100,8,100,9,132,1,131,1,90,9,101,5,100, + 10,100,11,132,0,131,1,90,10,101,5,100,12,100,13,132, + 0,131,1,90,11,101,7,100,14,100,15,132,0,131,1,90, + 12,101,7,101,13,100,16,100,17,132,0,131,1,131,1,90, + 14,101,7,101,13,100,18,100,19,132,0,131,1,131,1,90, + 15,101,7,101,13,100,20,100,21,132,0,131,1,131,1,90, + 16,100,5,83,0,41,24,218,14,70,114,111,122,101,110,73, + 109,112,111,114,116,101,114,122,142,77,101,116,97,32,112,97, + 116,104,32,105,109,112,111,114,116,32,102,111,114,32,102,114, + 111,122,101,110,32,109,111,100,117,108,101,115,46,10,10,32, + 32,32,32,65,108,108,32,109,101,116,104,111,100,115,32,97, + 114,101,32,101,105,116,104,101,114,32,99,108,97,115,115,32, + 111,114,32,115,116,97,116,105,99,32,109,101,116,104,111,100, + 115,32,116,111,32,97,118,111,105,100,32,116,104,101,32,110, + 101,101,100,32,116,111,10,32,32,32,32,105,110,115,116,97, + 110,116,105,97,116,101,32,116,104,101,32,99,108,97,115,115, + 46,10,10,32,32,32,32,90,6,102,114,111,122,101,110,99, + 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, + 4,0,0,0,67,0,0,0,115,28,0,0,0,116,0,160, + 1,100,1,116,2,161,2,1,0,100,2,160,3,124,0,106, + 4,116,5,106,6,161,2,83,0,41,4,114,176,0,0,0, + 122,80,70,114,111,122,101,110,73,109,112,111,114,116,101,114, + 46,109,111,100,117,108,101,95,114,101,112,114,40,41,32,105, + 115,32,100,101,112,114,101,99,97,116,101,100,32,97,110,100, + 32,115,108,97,116,101,100,32,102,111,114,32,114,101,109,111, + 118,97,108,32,105,110,32,80,121,116,104,111,110,32,51,46, + 49,50,114,166,0,0,0,78,41,7,114,101,0,0,0,114, + 102,0,0,0,114,103,0,0,0,114,50,0,0,0,114,9, + 0,0,0,114,193,0,0,0,114,151,0,0,0,41,1,218, + 1,109,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,114,0,0,0,47,3,0,0,115,10,0,0,0,6, + 7,2,1,4,255,16,2,255,128,122,26,70,114,111,122,101, + 110,73,109,112,111,114,116,101,114,46,109,111,100,117,108,101, + 95,114,101,112,114,78,99,4,0,0,0,0,0,0,0,0, + 0,0,0,4,0,0,0,5,0,0,0,67,0,0,0,115, + 30,0,0,0,116,0,160,1,124,1,161,1,114,13,116,2, + 124,1,124,0,124,0,106,3,100,1,141,3,83,0,100,0, + 83,0,114,178,0,0,0,41,4,114,64,0,0,0,114,98, + 0,0,0,114,104,0,0,0,114,151,0,0,0,114,179,0, + 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, + 0,114,183,0,0,0,58,3,0,0,115,8,0,0,0,10, + 2,16,1,4,2,255,128,122,24,70,114,111,122,101,110,73, + 109,112,111,114,116,101,114,46,102,105,110,100,95,115,112,101, + 99,99,3,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,4,0,0,0,67,0,0,0,115,30,0,0,0,116, + 0,160,1,100,1,116,2,161,2,1,0,116,3,160,4,124, + 1,161,1,114,13,124,0,83,0,100,2,83,0,41,3,122, + 93,70,105,110,100,32,97,32,102,114,111,122,101,110,32,109, + 111,100,117,108,101,46,10,10,32,32,32,32,32,32,32,32, + 84,104,105,115,32,109,101,116,104,111,100,32,105,115,32,100, + 101,112,114,101,99,97,116,101,100,46,32,32,85,115,101,32, + 102,105,110,100,95,115,112,101,99,40,41,32,105,110,115,116, + 101,97,100,46,10,10,32,32,32,32,32,32,32,32,122,105, + 70,114,111,122,101,110,73,109,112,111,114,116,101,114,46,102, + 105,110,100,95,109,111,100,117,108,101,40,41,32,105,115,32, 100,101,112,114,101,99,97,116,101,100,32,97,110,100,32,115, 108,97,116,101,100,32,102,111,114,32,114,101,109,111,118,97, 108,32,105,110,32,80,121,116,104,111,110,32,51,46,49,50, - 114,166,0,0,0,78,41,7,114,101,0,0,0,114,102,0, - 0,0,114,103,0,0,0,114,50,0,0,0,114,9,0,0, - 0,114,192,0,0,0,114,151,0,0,0,41,1,218,1,109, + 59,32,117,115,101,32,102,105,110,100,95,115,112,101,99,40, + 41,32,105,110,115,116,101,97,100,78,41,5,114,101,0,0, + 0,114,102,0,0,0,114,103,0,0,0,114,64,0,0,0, + 114,98,0,0,0,41,3,114,180,0,0,0,114,89,0,0, + 0,114,181,0,0,0,114,5,0,0,0,114,5,0,0,0, + 114,6,0,0,0,114,184,0,0,0,65,3,0,0,115,10, + 0,0,0,6,7,2,2,4,254,18,3,255,128,122,26,70, + 114,111,122,101,110,73,109,112,111,114,116,101,114,46,102,105, + 110,100,95,109,111,100,117,108,101,99,1,0,0,0,0,0, + 0,0,0,0,0,0,1,0,0,0,1,0,0,0,67,0, + 0,0,114,185,0,0,0,41,2,122,42,85,115,101,32,100, + 101,102,97,117,108,116,32,115,101,109,97,110,116,105,99,115, + 32,102,111,114,32,109,111,100,117,108,101,32,99,114,101,97, + 116,105,111,110,46,78,114,5,0,0,0,114,174,0,0,0, 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, - 114,0,0,0,47,3,0,0,115,10,0,0,0,6,7,2, - 1,4,255,16,2,255,128,122,26,70,114,111,122,101,110,73, - 109,112,111,114,116,101,114,46,109,111,100,117,108,101,95,114, - 101,112,114,78,99,4,0,0,0,0,0,0,0,0,0,0, - 0,4,0,0,0,5,0,0,0,67,0,0,0,115,30,0, - 0,0,116,0,160,1,124,1,161,1,114,13,116,2,124,1, - 124,0,124,0,106,3,100,1,141,3,83,0,100,0,83,0, - 114,178,0,0,0,41,4,114,64,0,0,0,114,98,0,0, - 0,114,104,0,0,0,114,151,0,0,0,114,179,0,0,0, + 162,0,0,0,77,3,0,0,115,4,0,0,0,4,0,255, + 128,122,28,70,114,111,122,101,110,73,109,112,111,114,116,101, + 114,46,99,114,101,97,116,101,95,109,111,100,117,108,101,99, + 1,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, + 4,0,0,0,67,0,0,0,115,64,0,0,0,124,0,106, + 0,106,1,125,1,116,2,160,3,124,1,161,1,115,18,116, + 4,100,1,160,5,124,1,161,1,124,1,100,2,141,2,130, + 1,116,6,116,2,106,7,124,1,131,2,125,2,116,8,124, + 2,124,0,106,9,131,2,1,0,100,0,83,0,114,97,0, + 0,0,41,10,114,113,0,0,0,114,20,0,0,0,114,64, + 0,0,0,114,98,0,0,0,114,87,0,0,0,114,50,0, + 0,0,114,74,0,0,0,218,17,103,101,116,95,102,114,111, + 122,101,110,95,111,98,106,101,99,116,218,4,101,120,101,99, + 114,14,0,0,0,41,3,114,110,0,0,0,114,20,0,0, + 0,218,4,99,111,100,101,114,5,0,0,0,114,5,0,0, + 0,114,6,0,0,0,114,163,0,0,0,81,3,0,0,115, + 16,0,0,0,8,2,10,1,10,1,2,1,6,255,12,2, + 16,1,255,128,122,26,70,114,111,122,101,110,73,109,112,111, + 114,116,101,114,46,101,120,101,99,95,109,111,100,117,108,101, + 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, + 0,3,0,0,0,67,0,0,0,115,10,0,0,0,116,0, + 124,0,124,1,131,2,83,0,41,2,122,95,76,111,97,100, + 32,97,32,102,114,111,122,101,110,32,109,111,100,117,108,101, + 46,10,10,32,32,32,32,32,32,32,32,84,104,105,115,32, + 109,101,116,104,111,100,32,105,115,32,100,101,112,114,101,99, + 97,116,101,100,46,32,32,85,115,101,32,101,120,101,99,95, + 109,111,100,117,108,101,40,41,32,105,110,115,116,101,97,100, + 46,10,10,32,32,32,32,32,32,32,32,78,41,1,114,111, + 0,0,0,114,186,0,0,0,114,5,0,0,0,114,5,0, + 0,0,114,6,0,0,0,114,170,0,0,0,90,3,0,0, + 115,4,0,0,0,10,8,255,128,122,26,70,114,111,122,101, + 110,73,109,112,111,114,116,101,114,46,108,111,97,100,95,109, + 111,100,117,108,101,99,2,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,3,0,0,0,67,0,0,0,243,10, + 0,0,0,116,0,160,1,124,1,161,1,83,0,41,2,122, + 45,82,101,116,117,114,110,32,116,104,101,32,99,111,100,101, + 32,111,98,106,101,99,116,32,102,111,114,32,116,104,101,32, + 102,114,111,122,101,110,32,109,111,100,117,108,101,46,78,41, + 2,114,64,0,0,0,114,195,0,0,0,114,186,0,0,0, 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, - 183,0,0,0,58,3,0,0,115,8,0,0,0,10,2,16, - 1,4,2,255,128,122,24,70,114,111,122,101,110,73,109,112, - 111,114,116,101,114,46,102,105,110,100,95,115,112,101,99,99, - 3,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, - 4,0,0,0,67,0,0,0,115,30,0,0,0,116,0,160, - 1,100,1,116,2,161,2,1,0,116,3,160,4,124,1,161, - 1,114,13,124,0,83,0,100,2,83,0,41,3,122,93,70, - 105,110,100,32,97,32,102,114,111,122,101,110,32,109,111,100, - 117,108,101,46,10,10,32,32,32,32,32,32,32,32,84,104, - 105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,112, - 114,101,99,97,116,101,100,46,32,32,85,115,101,32,102,105, - 110,100,95,115,112,101,99,40,41,32,105,110,115,116,101,97, - 100,46,10,10,32,32,32,32,32,32,32,32,122,105,70,114, - 111,122,101,110,73,109,112,111,114,116,101,114,46,102,105,110, - 100,95,109,111,100,117,108,101,40,41,32,105,115,32,100,101, - 112,114,101,99,97,116,101,100,32,97,110,100,32,115,108,97, - 116,101,100,32,102,111,114,32,114,101,109,111,118,97,108,32, - 105,110,32,80,121,116,104,111,110,32,51,46,49,50,59,32, - 117,115,101,32,102,105,110,100,95,115,112,101,99,40,41,32, - 105,110,115,116,101,97,100,78,41,5,114,101,0,0,0,114, - 102,0,0,0,114,103,0,0,0,114,64,0,0,0,114,98, - 0,0,0,41,3,114,180,0,0,0,114,89,0,0,0,114, - 181,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, - 0,0,0,114,184,0,0,0,65,3,0,0,115,10,0,0, - 0,6,7,2,2,4,254,18,3,255,128,122,26,70,114,111, - 122,101,110,73,109,112,111,114,116,101,114,46,102,105,110,100, - 95,109,111,100,117,108,101,99,1,0,0,0,0,0,0,0, - 0,0,0,0,1,0,0,0,1,0,0,0,67,0,0,0, - 114,185,0,0,0,41,2,122,42,85,115,101,32,100,101,102, - 97,117,108,116,32,115,101,109,97,110,116,105,99,115,32,102, - 111,114,32,109,111,100,117,108,101,32,99,114,101,97,116,105, - 111,110,46,78,114,5,0,0,0,114,174,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,114,162,0, - 0,0,77,3,0,0,115,4,0,0,0,4,0,255,128,122, - 28,70,114,111,122,101,110,73,109,112,111,114,116,101,114,46, - 99,114,101,97,116,101,95,109,111,100,117,108,101,99,1,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,4,0, - 0,0,67,0,0,0,115,64,0,0,0,124,0,106,0,106, - 1,125,1,116,2,160,3,124,1,161,1,115,18,116,4,100, - 1,160,5,124,1,161,1,124,1,100,2,141,2,130,1,116, - 6,116,2,106,7,124,1,131,2,125,2,116,8,124,2,124, - 0,106,9,131,2,1,0,100,0,83,0,114,97,0,0,0, - 41,10,114,113,0,0,0,114,20,0,0,0,114,64,0,0, - 0,114,98,0,0,0,114,87,0,0,0,114,50,0,0,0, - 114,74,0,0,0,218,17,103,101,116,95,102,114,111,122,101, - 110,95,111,98,106,101,99,116,218,4,101,120,101,99,114,14, - 0,0,0,41,3,114,110,0,0,0,114,20,0,0,0,218, - 4,99,111,100,101,114,5,0,0,0,114,5,0,0,0,114, - 6,0,0,0,114,163,0,0,0,81,3,0,0,115,16,0, - 0,0,8,2,10,1,10,1,2,1,6,255,12,2,16,1, - 255,128,122,26,70,114,111,122,101,110,73,109,112,111,114,116, - 101,114,46,101,120,101,99,95,109,111,100,117,108,101,99,2, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3, - 0,0,0,67,0,0,0,115,10,0,0,0,116,0,124,0, - 124,1,131,2,83,0,41,2,122,95,76,111,97,100,32,97, - 32,102,114,111,122,101,110,32,109,111,100,117,108,101,46,10, - 10,32,32,32,32,32,32,32,32,84,104,105,115,32,109,101, - 116,104,111,100,32,105,115,32,100,101,112,114,101,99,97,116, - 101,100,46,32,32,85,115,101,32,101,120,101,99,95,109,111, - 100,117,108,101,40,41,32,105,110,115,116,101,97,100,46,10, - 10,32,32,32,32,32,32,32,32,78,41,1,114,111,0,0, - 0,114,186,0,0,0,114,5,0,0,0,114,5,0,0,0, - 114,6,0,0,0,114,170,0,0,0,90,3,0,0,115,4, - 0,0,0,10,8,255,128,122,26,70,114,111,122,101,110,73, - 109,112,111,114,116,101,114,46,108,111,97,100,95,109,111,100, - 117,108,101,99,2,0,0,0,0,0,0,0,0,0,0,0, - 2,0,0,0,3,0,0,0,67,0,0,0,243,10,0,0, - 0,116,0,160,1,124,1,161,1,83,0,41,2,122,45,82, - 101,116,117,114,110,32,116,104,101,32,99,111,100,101,32,111, - 98,106,101,99,116,32,102,111,114,32,116,104,101,32,102,114, - 111,122,101,110,32,109,111,100,117,108,101,46,78,41,2,114, - 64,0,0,0,114,194,0,0,0,114,186,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,114,187,0, - 0,0,100,3,0,0,243,4,0,0,0,10,4,255,128,122, - 23,70,114,111,122,101,110,73,109,112,111,114,116,101,114,46, - 103,101,116,95,99,111,100,101,99,2,0,0,0,0,0,0, - 0,0,0,0,0,2,0,0,0,1,0,0,0,67,0,0, - 0,114,185,0,0,0,41,2,122,54,82,101,116,117,114,110, - 32,78,111,110,101,32,97,115,32,102,114,111,122,101,110,32, - 109,111,100,117,108,101,115,32,100,111,32,110,111,116,32,104, - 97,118,101,32,115,111,117,114,99,101,32,99,111,100,101,46, - 78,114,5,0,0,0,114,186,0,0,0,114,5,0,0,0, - 114,5,0,0,0,114,6,0,0,0,114,189,0,0,0,106, - 3,0,0,114,188,0,0,0,122,25,70,114,111,122,101,110, - 73,109,112,111,114,116,101,114,46,103,101,116,95,115,111,117, - 114,99,101,99,2,0,0,0,0,0,0,0,0,0,0,0, - 2,0,0,0,3,0,0,0,67,0,0,0,114,197,0,0, - 0,41,2,122,46,82,101,116,117,114,110,32,84,114,117,101, - 32,105,102,32,116,104,101,32,102,114,111,122,101,110,32,109, - 111,100,117,108,101,32,105,115,32,97,32,112,97,99,107,97, - 103,101,46,78,41,2,114,64,0,0,0,90,17,105,115,95, - 102,114,111,122,101,110,95,112,97,99,107,97,103,101,114,186, + 187,0,0,0,100,3,0,0,243,4,0,0,0,10,4,255, + 128,122,23,70,114,111,122,101,110,73,109,112,111,114,116,101, + 114,46,103,101,116,95,99,111,100,101,99,2,0,0,0,0, + 0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,67, + 0,0,0,114,185,0,0,0,41,2,122,54,82,101,116,117, + 114,110,32,78,111,110,101,32,97,115,32,102,114,111,122,101, + 110,32,109,111,100,117,108,101,115,32,100,111,32,110,111,116, + 32,104,97,118,101,32,115,111,117,114,99,101,32,99,111,100, + 101,46,78,114,5,0,0,0,114,186,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,114,189,0,0, + 0,106,3,0,0,114,188,0,0,0,122,25,70,114,111,122, + 101,110,73,109,112,111,114,116,101,114,46,103,101,116,95,115, + 111,117,114,99,101,99,2,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,3,0,0,0,67,0,0,0,114,198, + 0,0,0,41,2,122,46,82,101,116,117,114,110,32,84,114, + 117,101,32,105,102,32,116,104,101,32,102,114,111,122,101,110, + 32,109,111,100,117,108,101,32,105,115,32,97,32,112,97,99, + 107,97,103,101,46,78,41,2,114,64,0,0,0,90,17,105, + 115,95,102,114,111,122,101,110,95,112,97,99,107,97,103,101, + 114,186,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,114,128,0,0,0,112,3,0,0,114,199,0, + 0,0,122,25,70,114,111,122,101,110,73,109,112,111,114,116, + 101,114,46,105,115,95,112,97,99,107,97,103,101,114,190,0, + 0,0,114,0,0,0,0,41,17,114,9,0,0,0,114,8, + 0,0,0,114,1,0,0,0,114,10,0,0,0,114,151,0, + 0,0,114,191,0,0,0,114,114,0,0,0,114,192,0,0, + 0,114,183,0,0,0,114,184,0,0,0,114,162,0,0,0, + 114,163,0,0,0,114,170,0,0,0,114,100,0,0,0,114, + 187,0,0,0,114,189,0,0,0,114,128,0,0,0,114,5, 0,0,0,114,5,0,0,0,114,5,0,0,0,114,6,0, - 0,0,114,128,0,0,0,112,3,0,0,114,198,0,0,0, - 122,25,70,114,111,122,101,110,73,109,112,111,114,116,101,114, - 46,105,115,95,112,97,99,107,97,103,101,41,2,78,78,41, - 1,78,41,17,114,9,0,0,0,114,8,0,0,0,114,1, - 0,0,0,114,10,0,0,0,114,151,0,0,0,114,190,0, - 0,0,114,114,0,0,0,114,191,0,0,0,114,183,0,0, - 0,114,184,0,0,0,114,162,0,0,0,114,163,0,0,0, - 114,170,0,0,0,114,100,0,0,0,114,187,0,0,0,114, - 189,0,0,0,114,128,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,5,0,0,0,114,6,0,0,0,114,192,0, - 0,0,36,3,0,0,115,50,0,0,0,8,0,4,2,4, - 7,2,2,10,1,2,10,12,1,2,6,12,1,2,11,10, - 1,2,3,10,1,2,8,10,1,2,9,2,1,12,1,2, - 4,2,1,12,1,2,4,2,1,16,1,255,128,114,192,0, - 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,64,0,0,0,115,32,0,0,0, - 101,0,90,1,100,0,90,2,100,1,90,3,100,2,100,3, - 132,0,90,4,100,4,100,5,132,0,90,5,100,6,83,0, - 41,7,218,18,95,73,109,112,111,114,116,76,111,99,107,67, - 111,110,116,101,120,116,122,36,67,111,110,116,101,120,116,32, - 109,97,110,97,103,101,114,32,102,111,114,32,116,104,101,32, - 105,109,112,111,114,116,32,108,111,99,107,46,99,1,0,0, - 0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0, - 0,67,0,0,0,243,12,0,0,0,116,0,160,1,161,0, - 1,0,100,1,83,0,41,2,122,24,65,99,113,117,105,114, + 0,0,114,193,0,0,0,36,3,0,0,115,50,0,0,0, + 8,0,4,2,4,7,2,2,10,1,2,10,12,1,2,6, + 12,1,2,11,10,1,2,3,10,1,2,8,10,1,2,9, + 2,1,12,1,2,4,2,1,12,1,2,4,2,1,16,1, + 255,128,114,193,0,0,0,99,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,2,0,0,0,64,0,0,0, + 115,32,0,0,0,101,0,90,1,100,0,90,2,100,1,90, + 3,100,2,100,3,132,0,90,4,100,4,100,5,132,0,90, + 5,100,6,83,0,41,7,218,18,95,73,109,112,111,114,116, + 76,111,99,107,67,111,110,116,101,120,116,122,36,67,111,110, + 116,101,120,116,32,109,97,110,97,103,101,114,32,102,111,114, + 32,116,104,101,32,105,109,112,111,114,116,32,108,111,99,107, + 46,99,1,0,0,0,0,0,0,0,0,0,0,0,1,0, + 0,0,2,0,0,0,67,0,0,0,243,12,0,0,0,116, + 0,160,1,161,0,1,0,100,1,83,0,41,2,122,24,65, + 99,113,117,105,114,101,32,116,104,101,32,105,109,112,111,114, + 116,32,108,111,99,107,46,78,41,2,114,64,0,0,0,114, + 65,0,0,0,114,52,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,6,0,0,0,114,61,0,0,0,125,3,0, + 0,243,4,0,0,0,12,2,255,128,122,28,95,73,109,112, + 111,114,116,76,111,99,107,67,111,110,116,101,120,116,46,95, + 95,101,110,116,101,114,95,95,99,4,0,0,0,0,0,0, + 0,0,0,0,0,4,0,0,0,2,0,0,0,67,0,0, + 0,114,201,0,0,0,41,2,122,60,82,101,108,101,97,115, 101,32,116,104,101,32,105,109,112,111,114,116,32,108,111,99, - 107,46,78,41,2,114,64,0,0,0,114,65,0,0,0,114, - 52,0,0,0,114,5,0,0,0,114,5,0,0,0,114,6, - 0,0,0,114,61,0,0,0,125,3,0,0,243,4,0,0, - 0,12,2,255,128,122,28,95,73,109,112,111,114,116,76,111, - 99,107,67,111,110,116,101,120,116,46,95,95,101,110,116,101, - 114,95,95,99,4,0,0,0,0,0,0,0,0,0,0,0, - 4,0,0,0,2,0,0,0,67,0,0,0,114,200,0,0, - 0,41,2,122,60,82,101,108,101,97,115,101,32,116,104,101, - 32,105,109,112,111,114,116,32,108,111,99,107,32,114,101,103, - 97,114,100,108,101,115,115,32,111,102,32,97,110,121,32,114, - 97,105,115,101,100,32,101,120,99,101,112,116,105,111,110,115, - 46,78,41,2,114,64,0,0,0,114,67,0,0,0,41,4, - 114,33,0,0,0,218,8,101,120,99,95,116,121,112,101,218, - 9,101,120,99,95,118,97,108,117,101,218,13,101,120,99,95, - 116,114,97,99,101,98,97,99,107,114,5,0,0,0,114,5, - 0,0,0,114,6,0,0,0,114,63,0,0,0,129,3,0, - 0,114,201,0,0,0,122,27,95,73,109,112,111,114,116,76, - 111,99,107,67,111,110,116,101,120,116,46,95,95,101,120,105, - 116,95,95,78,41,6,114,9,0,0,0,114,8,0,0,0, - 114,1,0,0,0,114,10,0,0,0,114,61,0,0,0,114, - 63,0,0,0,114,5,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,6,0,0,0,114,199,0,0,0,121,3,0, - 0,115,10,0,0,0,8,0,4,2,8,2,12,4,255,128, - 114,199,0,0,0,99,3,0,0,0,0,0,0,0,0,0, - 0,0,5,0,0,0,5,0,0,0,67,0,0,0,115,64, - 0,0,0,124,1,160,0,100,1,124,2,100,2,24,0,161, - 2,125,3,116,1,124,3,131,1,124,2,107,0,114,18,116, - 2,100,3,131,1,130,1,124,3,100,4,25,0,125,4,124, - 0,114,30,100,5,160,3,124,4,124,0,161,2,83,0,124, - 4,83,0,41,7,122,50,82,101,115,111,108,118,101,32,97, - 32,114,101,108,97,116,105,118,101,32,109,111,100,117,108,101, - 32,110,97,109,101,32,116,111,32,97,110,32,97,98,115,111, - 108,117,116,101,32,111,110,101,46,114,141,0,0,0,114,42, - 0,0,0,122,50,97,116,116,101,109,112,116,101,100,32,114, - 101,108,97,116,105,118,101,32,105,109,112,111,114,116,32,98, - 101,121,111,110,100,32,116,111,112,45,108,101,118,101,108,32, - 112,97,99,107,97,103,101,114,25,0,0,0,250,5,123,125, - 46,123,125,78,41,4,218,6,114,115,112,108,105,116,218,3, - 108,101,110,114,87,0,0,0,114,50,0,0,0,41,5,114, - 20,0,0,0,218,7,112,97,99,107,97,103,101,218,5,108, - 101,118,101,108,90,4,98,105,116,115,90,4,98,97,115,101, - 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,218, - 13,95,114,101,115,111,108,118,101,95,110,97,109,101,134,3, - 0,0,115,12,0,0,0,16,2,12,1,8,1,8,1,20, - 1,255,128,114,210,0,0,0,99,3,0,0,0,0,0,0, - 0,0,0,0,0,5,0,0,0,4,0,0,0,67,0,0, - 0,115,60,0,0,0,116,0,124,0,131,1,155,0,100,1, - 157,2,125,3,116,1,160,2,124,3,116,3,161,2,1,0, - 124,0,160,4,124,1,124,2,161,2,125,4,124,4,100,0, - 117,0,114,25,100,0,83,0,116,5,124,1,124,4,131,2, - 83,0,41,2,78,122,53,46,102,105,110,100,95,115,112,101, - 99,40,41,32,110,111,116,32,102,111,117,110,100,59,32,102, - 97,108,108,105,110,103,32,98,97,99,107,32,116,111,32,102, - 105,110,100,95,109,111,100,117,108,101,40,41,41,6,114,7, + 107,32,114,101,103,97,114,100,108,101,115,115,32,111,102,32, + 97,110,121,32,114,97,105,115,101,100,32,101,120,99,101,112, + 116,105,111,110,115,46,78,41,2,114,64,0,0,0,114,67, + 0,0,0,41,4,114,33,0,0,0,218,8,101,120,99,95, + 116,121,112,101,218,9,101,120,99,95,118,97,108,117,101,218, + 13,101,120,99,95,116,114,97,99,101,98,97,99,107,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,63,0, + 0,0,129,3,0,0,114,202,0,0,0,122,27,95,73,109, + 112,111,114,116,76,111,99,107,67,111,110,116,101,120,116,46, + 95,95,101,120,105,116,95,95,78,41,6,114,9,0,0,0, + 114,8,0,0,0,114,1,0,0,0,114,10,0,0,0,114, + 61,0,0,0,114,63,0,0,0,114,5,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,114,200,0, + 0,0,121,3,0,0,115,10,0,0,0,8,0,4,2,8, + 2,12,4,255,128,114,200,0,0,0,99,3,0,0,0,0, + 0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,67, + 0,0,0,115,64,0,0,0,124,1,160,0,100,1,124,2, + 100,2,24,0,161,2,125,3,116,1,124,3,131,1,124,2, + 107,0,114,18,116,2,100,3,131,1,130,1,124,3,100,4, + 25,0,125,4,124,0,114,30,100,5,160,3,124,4,124,0, + 161,2,83,0,124,4,83,0,41,7,122,50,82,101,115,111, + 108,118,101,32,97,32,114,101,108,97,116,105,118,101,32,109, + 111,100,117,108,101,32,110,97,109,101,32,116,111,32,97,110, + 32,97,98,115,111,108,117,116,101,32,111,110,101,46,114,141, + 0,0,0,114,42,0,0,0,122,50,97,116,116,101,109,112, + 116,101,100,32,114,101,108,97,116,105,118,101,32,105,109,112, + 111,114,116,32,98,101,121,111,110,100,32,116,111,112,45,108, + 101,118,101,108,32,112,97,99,107,97,103,101,114,25,0,0, + 0,250,5,123,125,46,123,125,78,41,4,218,6,114,115,112, + 108,105,116,218,3,108,101,110,114,87,0,0,0,114,50,0, + 0,0,41,5,114,20,0,0,0,218,7,112,97,99,107,97, + 103,101,218,5,108,101,118,101,108,90,4,98,105,116,115,90, + 4,98,97,115,101,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,218,13,95,114,101,115,111,108,118,101,95,110, + 97,109,101,134,3,0,0,115,12,0,0,0,16,2,12,1, + 8,1,8,1,20,1,255,128,114,211,0,0,0,99,3,0, + 0,0,0,0,0,0,0,0,0,0,5,0,0,0,4,0, + 0,0,67,0,0,0,115,60,0,0,0,116,0,124,0,131, + 1,155,0,100,1,157,2,125,3,116,1,160,2,124,3,116, + 3,161,2,1,0,124,0,160,4,124,1,124,2,161,2,125, + 4,124,4,100,0,117,0,114,25,100,0,83,0,116,5,124, + 1,124,4,131,2,83,0,41,2,78,122,53,46,102,105,110, + 100,95,115,112,101,99,40,41,32,110,111,116,32,102,111,117, + 110,100,59,32,102,97,108,108,105,110,103,32,98,97,99,107, + 32,116,111,32,102,105,110,100,95,109,111,100,117,108,101,40, + 41,41,6,114,7,0,0,0,114,101,0,0,0,114,102,0, + 0,0,114,169,0,0,0,114,184,0,0,0,114,104,0,0, + 0,41,5,218,6,102,105,110,100,101,114,114,20,0,0,0, + 114,181,0,0,0,114,108,0,0,0,114,122,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,17, + 95,102,105,110,100,95,115,112,101,99,95,108,101,103,97,99, + 121,143,3,0,0,115,14,0,0,0,14,1,12,2,12,1, + 8,1,4,1,10,1,255,128,114,213,0,0,0,99,3,0, + 0,0,0,0,0,0,0,0,0,0,10,0,0,0,10,0, + 0,0,67,0,0,0,115,24,1,0,0,116,0,106,1,125, + 3,124,3,100,1,117,0,114,11,116,2,100,2,131,1,130, + 1,124,3,115,19,116,3,160,4,100,3,116,5,161,2,1, + 0,124,0,116,0,106,6,118,0,125,4,124,3,68,0,93, + 109,125,5,116,7,131,0,143,46,1,0,122,5,124,5,106, + 8,125,6,87,0,110,26,4,0,116,9,121,139,1,0,1, + 0,1,0,116,10,124,5,124,0,124,1,131,3,125,7,124, + 7,100,1,117,0,114,62,89,0,87,0,100,1,4,0,4, + 0,131,3,1,0,113,26,89,0,110,6,124,6,124,0,124, + 1,124,2,131,3,125,7,87,0,100,1,4,0,4,0,131, + 3,1,0,110,8,49,0,115,80,119,1,1,0,1,0,1, + 0,89,0,1,0,124,7,100,1,117,1,114,135,124,4,115, + 131,124,0,116,0,106,6,118,0,114,131,116,0,106,6,124, + 0,25,0,125,8,122,5,124,8,106,11,125,9,87,0,110, + 12,4,0,116,9,121,138,1,0,1,0,1,0,124,7,6, + 0,89,0,2,0,1,0,83,0,124,9,100,1,117,0,114, + 127,124,7,2,0,1,0,83,0,124,9,2,0,1,0,83, + 0,124,7,2,0,1,0,83,0,113,26,100,1,83,0,119, + 0,119,0,41,4,122,21,70,105,110,100,32,97,32,109,111, + 100,117,108,101,39,115,32,115,112,101,99,46,78,122,53,115, + 121,115,46,109,101,116,97,95,112,97,116,104,32,105,115,32, + 78,111,110,101,44,32,80,121,116,104,111,110,32,105,115,32, + 108,105,107,101,108,121,32,115,104,117,116,116,105,110,103,32, + 100,111,119,110,122,22,115,121,115,46,109,101,116,97,95,112, + 97,116,104,32,105,115,32,101,109,112,116,121,41,12,114,18, + 0,0,0,218,9,109,101,116,97,95,112,97,116,104,114,87, 0,0,0,114,101,0,0,0,114,102,0,0,0,114,169,0, - 0,0,114,184,0,0,0,114,104,0,0,0,41,5,218,6, - 102,105,110,100,101,114,114,20,0,0,0,114,181,0,0,0, - 114,108,0,0,0,114,122,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,218,17,95,102,105,110,100, - 95,115,112,101,99,95,108,101,103,97,99,121,143,3,0,0, - 115,14,0,0,0,14,1,12,2,12,1,8,1,4,1,10, - 1,255,128,114,212,0,0,0,99,3,0,0,0,0,0,0, - 0,0,0,0,0,10,0,0,0,10,0,0,0,67,0,0, - 0,115,24,1,0,0,116,0,106,1,125,3,124,3,100,1, - 117,0,114,11,116,2,100,2,131,1,130,1,124,3,115,19, - 116,3,160,4,100,3,116,5,161,2,1,0,124,0,116,0, - 106,6,118,0,125,4,124,3,68,0,93,109,125,5,116,7, - 131,0,143,46,1,0,122,5,124,5,106,8,125,6,87,0, - 110,26,4,0,116,9,121,139,1,0,1,0,1,0,116,10, - 124,5,124,0,124,1,131,3,125,7,124,7,100,1,117,0, - 114,62,89,0,87,0,100,1,4,0,4,0,131,3,1,0, - 113,26,89,0,110,6,124,6,124,0,124,1,124,2,131,3, - 125,7,87,0,100,1,4,0,4,0,131,3,1,0,110,8, - 49,0,115,80,119,1,1,0,1,0,1,0,89,0,1,0, - 124,7,100,1,117,1,114,135,124,4,115,131,124,0,116,0, - 106,6,118,0,114,131,116,0,106,6,124,0,25,0,125,8, - 122,5,124,8,106,11,125,9,87,0,110,12,4,0,116,9, - 121,138,1,0,1,0,1,0,124,7,6,0,89,0,2,0, - 1,0,83,0,124,9,100,1,117,0,114,127,124,7,2,0, - 1,0,83,0,124,9,2,0,1,0,83,0,124,7,2,0, - 1,0,83,0,113,26,100,1,83,0,119,0,119,0,41,4, - 122,21,70,105,110,100,32,97,32,109,111,100,117,108,101,39, - 115,32,115,112,101,99,46,78,122,53,115,121,115,46,109,101, - 116,97,95,112,97,116,104,32,105,115,32,78,111,110,101,44, - 32,80,121,116,104,111,110,32,105,115,32,108,105,107,101,108, - 121,32,115,104,117,116,116,105,110,103,32,100,111,119,110,122, - 22,115,121,115,46,109,101,116,97,95,112,97,116,104,32,105, - 115,32,101,109,112,116,121,41,12,114,18,0,0,0,218,9, - 109,101,116,97,95,112,97,116,104,114,87,0,0,0,114,101, - 0,0,0,114,102,0,0,0,114,169,0,0,0,114,105,0, - 0,0,114,199,0,0,0,114,183,0,0,0,114,2,0,0, - 0,114,212,0,0,0,114,113,0,0,0,41,10,114,20,0, - 0,0,114,181,0,0,0,114,182,0,0,0,114,213,0,0, - 0,90,9,105,115,95,114,101,108,111,97,100,114,211,0,0, - 0,114,183,0,0,0,114,109,0,0,0,114,110,0,0,0, - 114,113,0,0,0,114,5,0,0,0,114,5,0,0,0,114, - 6,0,0,0,218,10,95,102,105,110,100,95,115,112,101,99, - 153,3,0,0,115,66,0,0,0,6,2,8,1,8,2,4, - 3,12,1,10,5,8,1,8,1,2,1,10,1,12,1,12, - 1,8,1,16,1,4,255,12,3,30,128,8,1,14,2,10, - 1,2,1,10,1,12,1,12,4,8,2,8,1,8,2,8, - 2,2,239,4,19,2,243,2,244,255,128,114,214,0,0,0, - 99,3,0,0,0,0,0,0,0,0,0,0,0,3,0,0, - 0,5,0,0,0,67,0,0,0,115,110,0,0,0,116,0, - 124,0,116,1,131,2,115,14,116,2,100,1,160,3,116,4, - 124,0,131,1,161,1,131,1,130,1,124,2,100,2,107,0, - 114,22,116,5,100,3,131,1,130,1,124,2,100,2,107,4, - 114,41,116,0,124,1,116,1,131,2,115,35,116,2,100,4, - 131,1,130,1,124,1,115,41,116,6,100,5,131,1,130,1, - 124,0,115,53,124,2,100,2,107,2,114,51,116,5,100,6, - 131,1,130,1,100,7,83,0,100,7,83,0,41,8,122,28, - 86,101,114,105,102,121,32,97,114,103,117,109,101,110,116,115, - 32,97,114,101,32,34,115,97,110,101,34,46,122,31,109,111, - 100,117,108,101,32,110,97,109,101,32,109,117,115,116,32,98, - 101,32,115,116,114,44,32,110,111,116,32,123,125,114,25,0, - 0,0,122,18,108,101,118,101,108,32,109,117,115,116,32,98, - 101,32,62,61,32,48,122,31,95,95,112,97,99,107,97,103, - 101,95,95,32,110,111,116,32,115,101,116,32,116,111,32,97, - 32,115,116,114,105,110,103,122,54,97,116,116,101,109,112,116, - 101,100,32,114,101,108,97,116,105,118,101,32,105,109,112,111, - 114,116,32,119,105,116,104,32,110,111,32,107,110,111,119,110, - 32,112,97,114,101,110,116,32,112,97,99,107,97,103,101,122, - 17,69,109,112,116,121,32,109,111,100,117,108,101,32,110,97, - 109,101,78,41,7,218,10,105,115,105,110,115,116,97,110,99, - 101,218,3,115,116,114,218,9,84,121,112,101,69,114,114,111, - 114,114,50,0,0,0,114,3,0,0,0,218,10,86,97,108, - 117,101,69,114,114,111,114,114,87,0,0,0,169,3,114,20, - 0,0,0,114,208,0,0,0,114,209,0,0,0,114,5,0, - 0,0,114,5,0,0,0,114,6,0,0,0,218,13,95,115, - 97,110,105,116,121,95,99,104,101,99,107,200,3,0,0,115, - 26,0,0,0,10,2,18,1,8,1,8,1,8,1,10,1, - 8,1,4,1,8,1,12,2,8,1,8,255,255,128,114,220, - 0,0,0,122,16,78,111,32,109,111,100,117,108,101,32,110, - 97,109,101,100,32,122,4,123,33,114,125,99,2,0,0,0, - 0,0,0,0,0,0,0,0,9,0,0,0,8,0,0,0, - 67,0,0,0,115,16,1,0,0,100,0,125,2,124,0,160, - 0,100,1,161,1,100,2,25,0,125,3,124,3,114,63,124, - 3,116,1,106,2,118,1,114,21,116,3,124,1,124,3,131, - 2,1,0,124,0,116,1,106,2,118,0,114,31,116,1,106, - 2,124,0,25,0,83,0,116,1,106,2,124,3,25,0,125, - 4,122,5,124,4,106,4,125,2,87,0,110,21,4,0,116, - 5,121,135,1,0,1,0,1,0,116,6,100,3,23,0,160, - 7,124,0,124,3,161,2,125,5,116,8,124,5,124,0,100, - 4,141,2,100,0,130,2,116,9,124,0,124,2,131,2,125, - 6,124,6,100,0,117,0,114,81,116,8,116,6,160,7,124, - 0,161,1,124,0,100,4,141,2,130,1,116,10,124,6,131, - 1,125,7,124,3,114,132,116,1,106,2,124,3,25,0,125, - 4,124,0,160,0,100,1,161,1,100,5,25,0,125,8,122, - 9,116,11,124,4,124,8,124,7,131,3,1,0,87,0,124, - 7,83,0,4,0,116,5,121,134,1,0,1,0,1,0,100, - 6,124,3,155,2,100,7,124,8,155,2,157,4,125,5,116, - 12,160,13,124,5,116,14,161,2,1,0,89,0,124,7,83, - 0,124,7,83,0,119,0,119,0,41,8,78,114,141,0,0, - 0,114,25,0,0,0,122,23,59,32,123,33,114,125,32,105, - 115,32,110,111,116,32,97,32,112,97,99,107,97,103,101,114, - 19,0,0,0,233,2,0,0,0,122,27,67,97,110,110,111, - 116,32,115,101,116,32,97,110,32,97,116,116,114,105,98,117, - 116,101,32,111,110,32,122,18,32,102,111,114,32,99,104,105, - 108,100,32,109,111,100,117,108,101,32,41,15,114,142,0,0, - 0,114,18,0,0,0,114,105,0,0,0,114,74,0,0,0, - 114,154,0,0,0,114,2,0,0,0,218,8,95,69,82,82, - 95,77,83,71,114,50,0,0,0,218,19,77,111,100,117,108, - 101,78,111,116,70,111,117,110,100,69,114,114,111,114,114,214, - 0,0,0,114,173,0,0,0,114,12,0,0,0,114,101,0, - 0,0,114,102,0,0,0,114,169,0,0,0,41,9,114,20, - 0,0,0,218,7,105,109,112,111,114,116,95,114,181,0,0, - 0,114,143,0,0,0,90,13,112,97,114,101,110,116,95,109, - 111,100,117,108,101,114,108,0,0,0,114,109,0,0,0,114, - 110,0,0,0,90,5,99,104,105,108,100,114,5,0,0,0, - 114,5,0,0,0,114,6,0,0,0,218,23,95,102,105,110, - 100,95,97,110,100,95,108,111,97,100,95,117,110,108,111,99, - 107,101,100,219,3,0,0,115,60,0,0,0,4,1,14,1, - 4,1,10,1,10,1,10,2,10,1,10,1,2,1,10,1, - 12,1,16,1,14,1,10,1,8,1,18,1,8,2,4,1, - 10,2,14,1,2,1,14,1,4,4,12,253,16,1,14,1, - 8,1,2,253,2,242,255,128,114,225,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,4,0,0,0,8,0, - 0,0,67,0,0,0,115,128,0,0,0,116,0,124,0,131, - 1,143,31,1,0,116,1,106,2,160,3,124,0,116,4,161, - 2,125,2,124,2,116,4,117,0,114,28,116,5,124,0,124, - 1,131,2,87,0,2,0,100,1,4,0,4,0,131,3,1, - 0,83,0,87,0,100,1,4,0,4,0,131,3,1,0,110, - 8,49,0,115,38,119,1,1,0,1,0,1,0,89,0,1, - 0,124,2,100,1,117,0,114,58,100,2,160,6,124,0,161, - 1,125,3,116,7,124,3,124,0,100,3,141,2,130,1,116, - 8,124,0,131,1,1,0,124,2,83,0,41,4,122,25,70, - 105,110,100,32,97,110,100,32,108,111,97,100,32,116,104,101, - 32,109,111,100,117,108,101,46,78,122,40,105,109,112,111,114, - 116,32,111,102,32,123,125,32,104,97,108,116,101,100,59,32, - 78,111,110,101,32,105,110,32,115,121,115,46,109,111,100,117, - 108,101,115,114,19,0,0,0,41,9,114,57,0,0,0,114, - 18,0,0,0,114,105,0,0,0,114,38,0,0,0,218,14, - 95,78,69,69,68,83,95,76,79,65,68,73,78,71,114,225, - 0,0,0,114,50,0,0,0,114,223,0,0,0,114,72,0, - 0,0,41,4,114,20,0,0,0,114,224,0,0,0,114,110, - 0,0,0,114,82,0,0,0,114,5,0,0,0,114,5,0, - 0,0,114,6,0,0,0,218,14,95,102,105,110,100,95,97, - 110,100,95,108,111,97,100,254,3,0,0,115,28,0,0,0, - 10,2,14,1,8,1,24,1,14,255,16,128,8,3,2,1, - 6,1,2,255,12,2,8,2,4,1,255,128,114,227,0,0, - 0,114,25,0,0,0,99,3,0,0,0,0,0,0,0,0, - 0,0,0,3,0,0,0,4,0,0,0,67,0,0,0,115, - 42,0,0,0,116,0,124,0,124,1,124,2,131,3,1,0, - 124,2,100,1,107,4,114,16,116,1,124,0,124,1,124,2, - 131,3,125,0,116,2,124,0,116,3,131,2,83,0,41,3, - 97,50,1,0,0,73,109,112,111,114,116,32,97,110,100,32, - 114,101,116,117,114,110,32,116,104,101,32,109,111,100,117,108, - 101,32,98,97,115,101,100,32,111,110,32,105,116,115,32,110, - 97,109,101,44,32,116,104,101,32,112,97,99,107,97,103,101, - 32,116,104,101,32,99,97,108,108,32,105,115,10,32,32,32, - 32,98,101,105,110,103,32,109,97,100,101,32,102,114,111,109, - 44,32,97,110,100,32,116,104,101,32,108,101,118,101,108,32, - 97,100,106,117,115,116,109,101,110,116,46,10,10,32,32,32, - 32,84,104,105,115,32,102,117,110,99,116,105,111,110,32,114, - 101,112,114,101,115,101,110,116,115,32,116,104,101,32,103,114, - 101,97,116,101,115,116,32,99,111,109,109,111,110,32,100,101, - 110,111,109,105,110,97,116,111,114,32,111,102,32,102,117,110, - 99,116,105,111,110,97,108,105,116,121,10,32,32,32,32,98, - 101,116,119,101,101,110,32,105,109,112,111,114,116,95,109,111, - 100,117,108,101,32,97,110,100,32,95,95,105,109,112,111,114, - 116,95,95,46,32,84,104,105,115,32,105,110,99,108,117,100, - 101,115,32,115,101,116,116,105,110,103,32,95,95,112,97,99, - 107,97,103,101,95,95,32,105,102,10,32,32,32,32,116,104, - 101,32,108,111,97,100,101,114,32,100,105,100,32,110,111,116, - 46,10,10,32,32,32,32,114,25,0,0,0,78,41,4,114, - 220,0,0,0,114,210,0,0,0,114,227,0,0,0,218,11, - 95,103,99,100,95,105,109,112,111,114,116,114,219,0,0,0, - 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,114, - 228,0,0,0,14,4,0,0,115,10,0,0,0,12,9,8, - 1,12,1,10,1,255,128,114,228,0,0,0,169,1,218,9, - 114,101,99,117,114,115,105,118,101,99,3,0,0,0,0,0, - 0,0,1,0,0,0,8,0,0,0,11,0,0,0,67,0, - 0,0,115,218,0,0,0,124,1,68,0,93,103,125,4,116, - 0,124,4,116,1,131,2,115,32,124,3,114,17,124,0,106, - 2,100,1,23,0,125,5,110,2,100,2,125,5,116,3,100, - 3,124,5,155,0,100,4,116,4,124,4,131,1,106,2,155, - 0,157,4,131,1,130,1,124,4,100,5,107,2,114,53,124, - 3,115,52,116,5,124,0,100,6,131,2,114,52,116,6,124, - 0,124,0,106,7,124,2,100,7,100,8,141,4,1,0,113, - 2,116,5,124,0,124,4,131,2,115,105,100,9,160,8,124, - 0,106,2,124,4,161,2,125,6,122,7,116,9,124,2,124, - 6,131,2,1,0,87,0,113,2,4,0,116,10,121,108,1, - 0,125,7,1,0,122,21,124,7,106,11,124,6,107,2,114, - 100,116,12,106,13,160,14,124,6,116,15,161,2,100,10,117, - 1,114,100,87,0,89,0,100,10,125,7,126,7,113,2,130, - 0,100,10,125,7,126,7,119,1,113,2,124,0,83,0,119, - 0,41,11,122,238,70,105,103,117,114,101,32,111,117,116,32, - 119,104,97,116,32,95,95,105,109,112,111,114,116,95,95,32, - 115,104,111,117,108,100,32,114,101,116,117,114,110,46,10,10, - 32,32,32,32,84,104,101,32,105,109,112,111,114,116,95,32, - 112,97,114,97,109,101,116,101,114,32,105,115,32,97,32,99, - 97,108,108,97,98,108,101,32,119,104,105,99,104,32,116,97, - 107,101,115,32,116,104,101,32,110,97,109,101,32,111,102,32, - 109,111,100,117,108,101,32,116,111,10,32,32,32,32,105,109, - 112,111,114,116,46,32,73,116,32,105,115,32,114,101,113,117, - 105,114,101,100,32,116,111,32,100,101,99,111,117,112,108,101, - 32,116,104,101,32,102,117,110,99,116,105,111,110,32,102,114, - 111,109,32,97,115,115,117,109,105,110,103,32,105,109,112,111, - 114,116,108,105,98,39,115,10,32,32,32,32,105,109,112,111, - 114,116,32,105,109,112,108,101,109,101,110,116,97,116,105,111, - 110,32,105,115,32,100,101,115,105,114,101,100,46,10,10,32, - 32,32,32,122,8,46,95,95,97,108,108,95,95,122,13,96, - 96,102,114,111,109,32,108,105,115,116,39,39,122,8,73,116, - 101,109,32,105,110,32,122,18,32,109,117,115,116,32,98,101, - 32,115,116,114,44,32,110,111,116,32,250,1,42,218,7,95, - 95,97,108,108,95,95,84,114,229,0,0,0,114,205,0,0, - 0,78,41,16,114,215,0,0,0,114,216,0,0,0,114,9, - 0,0,0,114,217,0,0,0,114,3,0,0,0,114,11,0, - 0,0,218,16,95,104,97,110,100,108,101,95,102,114,111,109, - 108,105,115,116,114,232,0,0,0,114,50,0,0,0,114,74, - 0,0,0,114,223,0,0,0,114,20,0,0,0,114,18,0, - 0,0,114,105,0,0,0,114,38,0,0,0,114,226,0,0, - 0,41,8,114,110,0,0,0,218,8,102,114,111,109,108,105, - 115,116,114,224,0,0,0,114,230,0,0,0,218,1,120,90, - 5,119,104,101,114,101,90,9,102,114,111,109,95,110,97,109, - 101,90,3,101,120,99,114,5,0,0,0,114,5,0,0,0, - 114,6,0,0,0,114,233,0,0,0,29,4,0,0,115,58, - 0,0,0,8,10,10,1,4,1,12,1,4,2,10,1,8, - 1,8,255,8,2,14,1,10,1,2,1,6,255,2,128,10, - 2,14,1,2,1,14,1,14,1,10,4,16,1,2,255,12, - 2,2,1,8,128,2,245,4,12,2,248,255,128,114,233,0, - 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,3, - 0,0,0,6,0,0,0,67,0,0,0,115,146,0,0,0, - 124,0,160,0,100,1,161,1,125,1,124,0,160,0,100,2, - 161,1,125,2,124,1,100,3,117,1,114,41,124,2,100,3, - 117,1,114,39,124,1,124,2,106,1,107,3,114,39,116,2, - 106,3,100,4,124,1,155,2,100,5,124,2,106,1,155,2, - 100,6,157,5,116,4,100,7,100,8,141,3,1,0,124,1, - 83,0,124,2,100,3,117,1,114,48,124,2,106,1,83,0, - 116,2,106,3,100,9,116,4,100,7,100,8,141,3,1,0, - 124,0,100,10,25,0,125,1,100,11,124,0,118,1,114,71, - 124,1,160,5,100,12,161,1,100,13,25,0,125,1,124,1, - 83,0,41,14,122,167,67,97,108,99,117,108,97,116,101,32, - 119,104,97,116,32,95,95,112,97,99,107,97,103,101,95,95, - 32,115,104,111,117,108,100,32,98,101,46,10,10,32,32,32, - 32,95,95,112,97,99,107,97,103,101,95,95,32,105,115,32, - 110,111,116,32,103,117,97,114,97,110,116,101,101,100,32,116, - 111,32,98,101,32,100,101,102,105,110,101,100,32,111,114,32, - 99,111,117,108,100,32,98,101,32,115,101,116,32,116,111,32, - 78,111,110,101,10,32,32,32,32,116,111,32,114,101,112,114, - 101,115,101,110,116,32,116,104,97,116,32,105,116,115,32,112, - 114,111,112,101,114,32,118,97,108,117,101,32,105,115,32,117, - 110,107,110,111,119,110,46,10,10,32,32,32,32,114,158,0, - 0,0,114,113,0,0,0,78,122,32,95,95,112,97,99,107, - 97,103,101,95,95,32,33,61,32,95,95,115,112,101,99,95, - 95,46,112,97,114,101,110,116,32,40,122,4,32,33,61,32, - 250,1,41,233,3,0,0,0,41,1,90,10,115,116,97,99, - 107,108,101,118,101,108,122,89,99,97,110,39,116,32,114,101, - 115,111,108,118,101,32,112,97,99,107,97,103,101,32,102,114, - 111,109,32,95,95,115,112,101,99,95,95,32,111,114,32,95, - 95,112,97,99,107,97,103,101,95,95,44,32,102,97,108,108, - 105,110,103,32,98,97,99,107,32,111,110,32,95,95,110,97, - 109,101,95,95,32,97,110,100,32,95,95,112,97,116,104,95, - 95,114,9,0,0,0,114,154,0,0,0,114,141,0,0,0, - 114,25,0,0,0,41,6,114,38,0,0,0,114,143,0,0, - 0,114,101,0,0,0,114,102,0,0,0,114,169,0,0,0, - 114,142,0,0,0,41,3,218,7,103,108,111,98,97,108,115, - 114,208,0,0,0,114,109,0,0,0,114,5,0,0,0,114, - 5,0,0,0,114,6,0,0,0,218,17,95,99,97,108,99, - 95,95,95,112,97,99,107,97,103,101,95,95,66,4,0,0, - 115,44,0,0,0,10,7,10,1,8,1,18,1,6,1,2, - 1,4,255,4,1,6,255,4,2,6,254,4,3,8,1,6, - 1,6,2,4,2,6,254,8,3,8,1,14,1,4,1,255, - 128,114,239,0,0,0,114,5,0,0,0,99,5,0,0,0, - 0,0,0,0,0,0,0,0,9,0,0,0,5,0,0,0, - 67,0,0,0,115,174,0,0,0,124,4,100,1,107,2,114, - 9,116,0,124,0,131,1,125,5,110,18,124,1,100,2,117, - 1,114,15,124,1,110,1,105,0,125,6,116,1,124,6,131, - 1,125,7,116,0,124,0,124,7,124,4,131,3,125,5,124, - 3,115,74,124,4,100,1,107,2,114,42,116,0,124,0,160, - 2,100,3,161,1,100,1,25,0,131,1,83,0,124,0,115, - 46,124,5,83,0,116,3,124,0,131,1,116,3,124,0,160, - 2,100,3,161,1,100,1,25,0,131,1,24,0,125,8,116, - 4,106,5,124,5,106,6,100,2,116,3,124,5,106,6,131, - 1,124,8,24,0,133,2,25,0,25,0,83,0,116,7,124, - 5,100,4,131,2,114,85,116,8,124,5,124,3,116,0,131, - 3,83,0,124,5,83,0,41,5,97,215,1,0,0,73,109, - 112,111,114,116,32,97,32,109,111,100,117,108,101,46,10,10, - 32,32,32,32,84,104,101,32,39,103,108,111,98,97,108,115, - 39,32,97,114,103,117,109,101,110,116,32,105,115,32,117,115, - 101,100,32,116,111,32,105,110,102,101,114,32,119,104,101,114, - 101,32,116,104,101,32,105,109,112,111,114,116,32,105,115,32, - 111,99,99,117,114,114,105,110,103,32,102,114,111,109,10,32, - 32,32,32,116,111,32,104,97,110,100,108,101,32,114,101,108, - 97,116,105,118,101,32,105,109,112,111,114,116,115,46,32,84, - 104,101,32,39,108,111,99,97,108,115,39,32,97,114,103,117, - 109,101,110,116,32,105,115,32,105,103,110,111,114,101,100,46, - 32,84,104,101,10,32,32,32,32,39,102,114,111,109,108,105, - 115,116,39,32,97,114,103,117,109,101,110,116,32,115,112,101, - 99,105,102,105,101,115,32,119,104,97,116,32,115,104,111,117, - 108,100,32,101,120,105,115,116,32,97,115,32,97,116,116,114, - 105,98,117,116,101,115,32,111,110,32,116,104,101,32,109,111, - 100,117,108,101,10,32,32,32,32,98,101,105,110,103,32,105, - 109,112,111,114,116,101,100,32,40,101,46,103,46,32,96,96, - 102,114,111,109,32,109,111,100,117,108,101,32,105,109,112,111, - 114,116,32,60,102,114,111,109,108,105,115,116,62,96,96,41, - 46,32,32,84,104,101,32,39,108,101,118,101,108,39,10,32, - 32,32,32,97,114,103,117,109,101,110,116,32,114,101,112,114, - 101,115,101,110,116,115,32,116,104,101,32,112,97,99,107,97, - 103,101,32,108,111,99,97,116,105,111,110,32,116,111,32,105, - 109,112,111,114,116,32,102,114,111,109,32,105,110,32,97,32, - 114,101,108,97,116,105,118,101,10,32,32,32,32,105,109,112, - 111,114,116,32,40,101,46,103,46,32,96,96,102,114,111,109, - 32,46,46,112,107,103,32,105,109,112,111,114,116,32,109,111, - 100,96,96,32,119,111,117,108,100,32,104,97,118,101,32,97, - 32,39,108,101,118,101,108,39,32,111,102,32,50,41,46,10, - 10,32,32,32,32,114,25,0,0,0,78,114,141,0,0,0, - 114,154,0,0,0,41,9,114,228,0,0,0,114,239,0,0, - 0,218,9,112,97,114,116,105,116,105,111,110,114,207,0,0, - 0,114,18,0,0,0,114,105,0,0,0,114,9,0,0,0, - 114,11,0,0,0,114,233,0,0,0,41,9,114,20,0,0, - 0,114,238,0,0,0,218,6,108,111,99,97,108,115,114,234, - 0,0,0,114,209,0,0,0,114,110,0,0,0,90,8,103, - 108,111,98,97,108,115,95,114,208,0,0,0,90,7,99,117, - 116,95,111,102,102,114,5,0,0,0,114,5,0,0,0,114, - 6,0,0,0,218,10,95,95,105,109,112,111,114,116,95,95, - 93,4,0,0,115,32,0,0,0,8,11,10,1,16,2,8, - 1,12,1,4,1,8,3,18,1,4,1,4,1,26,4,30, - 3,10,1,12,1,4,2,255,128,114,242,0,0,0,99,1, - 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3, - 0,0,0,67,0,0,0,115,38,0,0,0,116,0,160,1, - 124,0,161,1,125,1,124,1,100,0,117,0,114,15,116,2, - 100,1,124,0,23,0,131,1,130,1,116,3,124,1,131,1, - 83,0,41,2,78,122,25,110,111,32,98,117,105,108,116,45, - 105,110,32,109,111,100,117,108,101,32,110,97,109,101,100,32, - 41,4,114,175,0,0,0,114,183,0,0,0,114,87,0,0, - 0,114,173,0,0,0,41,2,114,20,0,0,0,114,109,0, + 0,0,114,105,0,0,0,114,200,0,0,0,114,183,0,0, + 0,114,2,0,0,0,114,213,0,0,0,114,113,0,0,0, + 41,10,114,20,0,0,0,114,181,0,0,0,114,182,0,0, + 0,114,214,0,0,0,90,9,105,115,95,114,101,108,111,97, + 100,114,212,0,0,0,114,183,0,0,0,114,109,0,0,0, + 114,110,0,0,0,114,113,0,0,0,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,218,10,95,102,105,110,100, + 95,115,112,101,99,153,3,0,0,115,66,0,0,0,6,2, + 8,1,8,2,4,3,12,1,10,5,8,1,8,1,2,1, + 10,1,12,1,12,1,8,1,16,1,4,255,12,3,30,128, + 8,1,14,2,10,1,2,1,10,1,12,1,12,4,8,2, + 8,1,8,2,8,2,2,239,4,19,2,243,2,244,255,128, + 114,215,0,0,0,99,3,0,0,0,0,0,0,0,0,0, + 0,0,3,0,0,0,5,0,0,0,67,0,0,0,115,110, + 0,0,0,116,0,124,0,116,1,131,2,115,14,116,2,100, + 1,160,3,116,4,124,0,131,1,161,1,131,1,130,1,124, + 2,100,2,107,0,114,22,116,5,100,3,131,1,130,1,124, + 2,100,2,107,4,114,41,116,0,124,1,116,1,131,2,115, + 35,116,2,100,4,131,1,130,1,124,1,115,41,116,6,100, + 5,131,1,130,1,124,0,115,53,124,2,100,2,107,2,114, + 51,116,5,100,6,131,1,130,1,100,7,83,0,100,7,83, + 0,41,8,122,28,86,101,114,105,102,121,32,97,114,103,117, + 109,101,110,116,115,32,97,114,101,32,34,115,97,110,101,34, + 46,122,31,109,111,100,117,108,101,32,110,97,109,101,32,109, + 117,115,116,32,98,101,32,115,116,114,44,32,110,111,116,32, + 123,125,114,25,0,0,0,122,18,108,101,118,101,108,32,109, + 117,115,116,32,98,101,32,62,61,32,48,122,31,95,95,112, + 97,99,107,97,103,101,95,95,32,110,111,116,32,115,101,116, + 32,116,111,32,97,32,115,116,114,105,110,103,122,54,97,116, + 116,101,109,112,116,101,100,32,114,101,108,97,116,105,118,101, + 32,105,109,112,111,114,116,32,119,105,116,104,32,110,111,32, + 107,110,111,119,110,32,112,97,114,101,110,116,32,112,97,99, + 107,97,103,101,122,17,69,109,112,116,121,32,109,111,100,117, + 108,101,32,110,97,109,101,78,41,7,218,10,105,115,105,110, + 115,116,97,110,99,101,218,3,115,116,114,218,9,84,121,112, + 101,69,114,114,111,114,114,50,0,0,0,114,3,0,0,0, + 218,10,86,97,108,117,101,69,114,114,111,114,114,87,0,0, + 0,169,3,114,20,0,0,0,114,209,0,0,0,114,210,0, 0,0,114,5,0,0,0,114,5,0,0,0,114,6,0,0, - 0,218,18,95,98,117,105,108,116,105,110,95,102,114,111,109, - 95,110,97,109,101,130,4,0,0,115,10,0,0,0,10,1, - 8,1,12,1,8,1,255,128,114,243,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,10,0,0,0,5,0, - 0,0,67,0,0,0,115,166,0,0,0,124,1,97,0,124, - 0,97,1,116,2,116,1,131,1,125,2,116,1,106,3,160, - 4,161,0,68,0,93,36,92,2,125,3,125,4,116,5,124, - 4,124,2,131,2,114,49,124,3,116,1,106,6,118,0,114, - 30,116,7,125,5,110,9,116,0,160,8,124,3,161,1,114, - 38,116,9,125,5,110,1,113,13,116,10,124,4,124,5,131, - 2,125,6,116,11,124,6,124,4,131,2,1,0,113,13,116, - 1,106,3,116,12,25,0,125,7,100,1,68,0,93,23,125, - 8,124,8,116,1,106,3,118,1,114,69,116,13,124,8,131, - 1,125,9,110,5,116,1,106,3,124,8,25,0,125,9,116, - 14,124,7,124,8,124,9,131,3,1,0,113,57,100,2,83, - 0,41,3,122,250,83,101,116,117,112,32,105,109,112,111,114, - 116,108,105,98,32,98,121,32,105,109,112,111,114,116,105,110, - 103,32,110,101,101,100,101,100,32,98,117,105,108,116,45,105, - 110,32,109,111,100,117,108,101,115,32,97,110,100,32,105,110, - 106,101,99,116,105,110,103,32,116,104,101,109,10,32,32,32, - 32,105,110,116,111,32,116,104,101,32,103,108,111,98,97,108, - 32,110,97,109,101,115,112,97,99,101,46,10,10,32,32,32, - 32,65,115,32,115,121,115,32,105,115,32,110,101,101,100,101, - 100,32,102,111,114,32,115,121,115,46,109,111,100,117,108,101, - 115,32,97,99,99,101,115,115,32,97,110,100,32,95,105,109, - 112,32,105,115,32,110,101,101,100,101,100,32,116,111,32,108, - 111,97,100,32,98,117,105,108,116,45,105,110,10,32,32,32, - 32,109,111,100,117,108,101,115,44,32,116,104,111,115,101,32, - 116,119,111,32,109,111,100,117,108,101,115,32,109,117,115,116, - 32,98,101,32,101,120,112,108,105,99,105,116,108,121,32,112, - 97,115,115,101,100,32,105,110,46,10,10,32,32,32,32,41, - 3,114,26,0,0,0,114,101,0,0,0,114,71,0,0,0, - 78,41,15,114,64,0,0,0,114,18,0,0,0,114,3,0, - 0,0,114,105,0,0,0,218,5,105,116,101,109,115,114,215, - 0,0,0,114,86,0,0,0,114,175,0,0,0,114,98,0, - 0,0,114,192,0,0,0,114,155,0,0,0,114,161,0,0, - 0,114,9,0,0,0,114,243,0,0,0,114,12,0,0,0, - 41,10,218,10,115,121,115,95,109,111,100,117,108,101,218,11, - 95,105,109,112,95,109,111,100,117,108,101,90,11,109,111,100, - 117,108,101,95,116,121,112,101,114,20,0,0,0,114,110,0, - 0,0,114,122,0,0,0,114,109,0,0,0,90,11,115,101, - 108,102,95,109,111,100,117,108,101,90,12,98,117,105,108,116, - 105,110,95,110,97,109,101,90,14,98,117,105,108,116,105,110, - 95,109,111,100,117,108,101,114,5,0,0,0,114,5,0,0, - 0,114,6,0,0,0,218,6,95,115,101,116,117,112,137,4, - 0,0,115,42,0,0,0,4,9,4,1,8,3,18,1,10, - 1,10,1,6,1,10,1,6,1,2,2,10,1,10,1,2, - 128,10,3,8,1,10,1,10,1,10,2,14,1,4,251,255, - 128,114,247,0,0,0,99,2,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,3,0,0,0,67,0,0,0,115, - 38,0,0,0,116,0,124,0,124,1,131,2,1,0,116,1, - 106,2,160,3,116,4,161,1,1,0,116,1,106,2,160,3, - 116,5,161,1,1,0,100,1,83,0,41,2,122,48,73,110, - 115,116,97,108,108,32,105,109,112,111,114,116,101,114,115,32, - 102,111,114,32,98,117,105,108,116,105,110,32,97,110,100,32, - 102,114,111,122,101,110,32,109,111,100,117,108,101,115,78,41, - 6,114,247,0,0,0,114,18,0,0,0,114,213,0,0,0, - 114,132,0,0,0,114,175,0,0,0,114,192,0,0,0,41, - 2,114,245,0,0,0,114,246,0,0,0,114,5,0,0,0, - 114,5,0,0,0,114,6,0,0,0,218,8,95,105,110,115, - 116,97,108,108,172,4,0,0,115,8,0,0,0,10,2,12, - 2,16,1,255,128,114,248,0,0,0,99,0,0,0,0,0, - 0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,67, - 0,0,0,115,32,0,0,0,100,1,100,2,108,0,125,0, - 124,0,97,1,124,0,160,2,116,3,106,4,116,5,25,0, - 161,1,1,0,100,2,83,0,41,3,122,57,73,110,115,116, - 97,108,108,32,105,109,112,111,114,116,101,114,115,32,116,104, - 97,116,32,114,101,113,117,105,114,101,32,101,120,116,101,114, - 110,97,108,32,102,105,108,101,115,121,115,116,101,109,32,97, - 99,99,101,115,115,114,25,0,0,0,78,41,6,218,26,95, - 102,114,111,122,101,110,95,105,109,112,111,114,116,108,105,98, - 95,101,120,116,101,114,110,97,108,114,139,0,0,0,114,248, - 0,0,0,114,18,0,0,0,114,105,0,0,0,114,9,0, - 0,0,41,1,114,249,0,0,0,114,5,0,0,0,114,5, - 0,0,0,114,6,0,0,0,218,27,95,105,110,115,116,97, - 108,108,95,101,120,116,101,114,110,97,108,95,105,109,112,111, - 114,116,101,114,115,180,4,0,0,115,8,0,0,0,8,3, - 4,1,20,1,255,128,114,250,0,0,0,41,2,78,78,41, - 1,78,41,2,78,114,25,0,0,0,41,4,78,78,114,5, - 0,0,0,114,25,0,0,0,41,54,114,10,0,0,0,114, - 7,0,0,0,114,26,0,0,0,114,101,0,0,0,114,71, - 0,0,0,114,139,0,0,0,114,17,0,0,0,114,21,0, - 0,0,114,66,0,0,0,114,37,0,0,0,114,47,0,0, - 0,114,22,0,0,0,114,23,0,0,0,114,55,0,0,0, - 114,57,0,0,0,114,60,0,0,0,114,72,0,0,0,114, - 74,0,0,0,114,83,0,0,0,114,95,0,0,0,114,100, - 0,0,0,114,111,0,0,0,114,124,0,0,0,114,125,0, - 0,0,114,104,0,0,0,114,155,0,0,0,114,161,0,0, - 0,114,165,0,0,0,114,119,0,0,0,114,106,0,0,0, - 114,172,0,0,0,114,173,0,0,0,114,107,0,0,0,114, - 175,0,0,0,114,192,0,0,0,114,199,0,0,0,114,210, - 0,0,0,114,212,0,0,0,114,214,0,0,0,114,220,0, - 0,0,90,15,95,69,82,82,95,77,83,71,95,80,82,69, - 70,73,88,114,222,0,0,0,114,225,0,0,0,218,6,111, - 98,106,101,99,116,114,226,0,0,0,114,227,0,0,0,114, - 228,0,0,0,114,233,0,0,0,114,239,0,0,0,114,242, - 0,0,0,114,243,0,0,0,114,247,0,0,0,114,248,0, - 0,0,114,250,0,0,0,114,5,0,0,0,114,5,0,0, - 0,114,5,0,0,0,114,6,0,0,0,218,8,60,109,111, - 100,117,108,101,62,1,0,0,0,115,106,0,0,0,4,0, - 8,22,4,9,4,1,4,1,4,3,8,3,8,8,4,8, - 4,2,16,3,14,4,14,77,14,21,8,16,8,37,8,17, - 14,11,8,8,8,11,8,12,8,19,14,26,16,101,10,26, - 14,45,8,72,8,17,8,17,8,30,8,36,8,45,14,15, - 14,80,14,85,8,13,8,9,10,10,8,47,4,16,8,1, - 8,2,6,32,8,3,10,16,14,15,8,37,10,27,8,37, - 8,7,8,35,12,8,255,128, + 0,218,13,95,115,97,110,105,116,121,95,99,104,101,99,107, + 200,3,0,0,115,26,0,0,0,10,2,18,1,8,1,8, + 1,8,1,10,1,8,1,4,1,8,1,12,2,8,1,8, + 255,255,128,114,221,0,0,0,122,16,78,111,32,109,111,100, + 117,108,101,32,110,97,109,101,100,32,122,4,123,33,114,125, + 99,2,0,0,0,0,0,0,0,0,0,0,0,9,0,0, + 0,8,0,0,0,67,0,0,0,115,16,1,0,0,100,0, + 125,2,124,0,160,0,100,1,161,1,100,2,25,0,125,3, + 124,3,114,63,124,3,116,1,106,2,118,1,114,21,116,3, + 124,1,124,3,131,2,1,0,124,0,116,1,106,2,118,0, + 114,31,116,1,106,2,124,0,25,0,83,0,116,1,106,2, + 124,3,25,0,125,4,122,5,124,4,106,4,125,2,87,0, + 110,21,4,0,116,5,121,135,1,0,1,0,1,0,116,6, + 100,3,23,0,160,7,124,0,124,3,161,2,125,5,116,8, + 124,5,124,0,100,4,141,2,100,0,130,2,116,9,124,0, + 124,2,131,2,125,6,124,6,100,0,117,0,114,81,116,8, + 116,6,160,7,124,0,161,1,124,0,100,4,141,2,130,1, + 116,10,124,6,131,1,125,7,124,3,114,132,116,1,106,2, + 124,3,25,0,125,4,124,0,160,0,100,1,161,1,100,5, + 25,0,125,8,122,9,116,11,124,4,124,8,124,7,131,3, + 1,0,87,0,124,7,83,0,4,0,116,5,121,134,1,0, + 1,0,1,0,100,6,124,3,155,2,100,7,124,8,155,2, + 157,4,125,5,116,12,160,13,124,5,116,14,161,2,1,0, + 89,0,124,7,83,0,124,7,83,0,119,0,119,0,41,8, + 78,114,141,0,0,0,114,25,0,0,0,122,23,59,32,123, + 33,114,125,32,105,115,32,110,111,116,32,97,32,112,97,99, + 107,97,103,101,114,19,0,0,0,233,2,0,0,0,122,27, + 67,97,110,110,111,116,32,115,101,116,32,97,110,32,97,116, + 116,114,105,98,117,116,101,32,111,110,32,122,18,32,102,111, + 114,32,99,104,105,108,100,32,109,111,100,117,108,101,32,41, + 15,114,142,0,0,0,114,18,0,0,0,114,105,0,0,0, + 114,74,0,0,0,114,154,0,0,0,114,2,0,0,0,218, + 8,95,69,82,82,95,77,83,71,114,50,0,0,0,218,19, + 77,111,100,117,108,101,78,111,116,70,111,117,110,100,69,114, + 114,111,114,114,215,0,0,0,114,173,0,0,0,114,12,0, + 0,0,114,101,0,0,0,114,102,0,0,0,114,169,0,0, + 0,41,9,114,20,0,0,0,218,7,105,109,112,111,114,116, + 95,114,181,0,0,0,114,143,0,0,0,90,13,112,97,114, + 101,110,116,95,109,111,100,117,108,101,114,108,0,0,0,114, + 109,0,0,0,114,110,0,0,0,90,5,99,104,105,108,100, + 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,218, + 23,95,102,105,110,100,95,97,110,100,95,108,111,97,100,95, + 117,110,108,111,99,107,101,100,219,3,0,0,115,60,0,0, + 0,4,1,14,1,4,1,10,1,10,1,10,2,10,1,10, + 1,2,1,10,1,12,1,16,1,14,1,10,1,8,1,18, + 1,8,2,4,1,10,2,14,1,2,1,14,1,4,4,12, + 253,16,1,14,1,8,1,2,253,2,242,255,128,114,226,0, + 0,0,99,2,0,0,0,0,0,0,0,0,0,0,0,4, + 0,0,0,8,0,0,0,67,0,0,0,115,128,0,0,0, + 116,0,124,0,131,1,143,31,1,0,116,1,106,2,160,3, + 124,0,116,4,161,2,125,2,124,2,116,4,117,0,114,28, + 116,5,124,0,124,1,131,2,87,0,2,0,100,1,4,0, + 4,0,131,3,1,0,83,0,87,0,100,1,4,0,4,0, + 131,3,1,0,110,8,49,0,115,38,119,1,1,0,1,0, + 1,0,89,0,1,0,124,2,100,1,117,0,114,58,100,2, + 160,6,124,0,161,1,125,3,116,7,124,3,124,0,100,3, + 141,2,130,1,116,8,124,0,131,1,1,0,124,2,83,0, + 41,4,122,25,70,105,110,100,32,97,110,100,32,108,111,97, + 100,32,116,104,101,32,109,111,100,117,108,101,46,78,122,40, + 105,109,112,111,114,116,32,111,102,32,123,125,32,104,97,108, + 116,101,100,59,32,78,111,110,101,32,105,110,32,115,121,115, + 46,109,111,100,117,108,101,115,114,19,0,0,0,41,9,114, + 57,0,0,0,114,18,0,0,0,114,105,0,0,0,114,38, + 0,0,0,218,14,95,78,69,69,68,83,95,76,79,65,68, + 73,78,71,114,226,0,0,0,114,50,0,0,0,114,224,0, + 0,0,114,72,0,0,0,41,4,114,20,0,0,0,114,225, + 0,0,0,114,110,0,0,0,114,82,0,0,0,114,5,0, + 0,0,114,5,0,0,0,114,6,0,0,0,218,14,95,102, + 105,110,100,95,97,110,100,95,108,111,97,100,254,3,0,0, + 115,28,0,0,0,10,2,14,1,8,1,24,1,14,255,16, + 128,8,3,2,1,6,1,2,255,12,2,8,2,4,1,255, + 128,114,228,0,0,0,114,25,0,0,0,99,3,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0, + 67,0,0,0,115,42,0,0,0,116,0,124,0,124,1,124, + 2,131,3,1,0,124,2,100,1,107,4,114,16,116,1,124, + 0,124,1,124,2,131,3,125,0,116,2,124,0,116,3,131, + 2,83,0,41,3,97,50,1,0,0,73,109,112,111,114,116, + 32,97,110,100,32,114,101,116,117,114,110,32,116,104,101,32, + 109,111,100,117,108,101,32,98,97,115,101,100,32,111,110,32, + 105,116,115,32,110,97,109,101,44,32,116,104,101,32,112,97, + 99,107,97,103,101,32,116,104,101,32,99,97,108,108,32,105, + 115,10,32,32,32,32,98,101,105,110,103,32,109,97,100,101, + 32,102,114,111,109,44,32,97,110,100,32,116,104,101,32,108, + 101,118,101,108,32,97,100,106,117,115,116,109,101,110,116,46, + 10,10,32,32,32,32,84,104,105,115,32,102,117,110,99,116, + 105,111,110,32,114,101,112,114,101,115,101,110,116,115,32,116, + 104,101,32,103,114,101,97,116,101,115,116,32,99,111,109,109, + 111,110,32,100,101,110,111,109,105,110,97,116,111,114,32,111, + 102,32,102,117,110,99,116,105,111,110,97,108,105,116,121,10, + 32,32,32,32,98,101,116,119,101,101,110,32,105,109,112,111, + 114,116,95,109,111,100,117,108,101,32,97,110,100,32,95,95, + 105,109,112,111,114,116,95,95,46,32,84,104,105,115,32,105, + 110,99,108,117,100,101,115,32,115,101,116,116,105,110,103,32, + 95,95,112,97,99,107,97,103,101,95,95,32,105,102,10,32, + 32,32,32,116,104,101,32,108,111,97,100,101,114,32,100,105, + 100,32,110,111,116,46,10,10,32,32,32,32,114,25,0,0, + 0,78,41,4,114,221,0,0,0,114,211,0,0,0,114,228, + 0,0,0,218,11,95,103,99,100,95,105,109,112,111,114,116, + 114,220,0,0,0,114,5,0,0,0,114,5,0,0,0,114, + 6,0,0,0,114,229,0,0,0,14,4,0,0,115,10,0, + 0,0,12,9,8,1,12,1,10,1,255,128,114,229,0,0, + 0,169,1,218,9,114,101,99,117,114,115,105,118,101,99,3, + 0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,11, + 0,0,0,67,0,0,0,115,218,0,0,0,124,1,68,0, + 93,103,125,4,116,0,124,4,116,1,131,2,115,32,124,3, + 114,17,124,0,106,2,100,1,23,0,125,5,110,2,100,2, + 125,5,116,3,100,3,124,5,155,0,100,4,116,4,124,4, + 131,1,106,2,155,0,157,4,131,1,130,1,124,4,100,5, + 107,2,114,53,124,3,115,52,116,5,124,0,100,6,131,2, + 114,52,116,6,124,0,124,0,106,7,124,2,100,7,100,8, + 141,4,1,0,113,2,116,5,124,0,124,4,131,2,115,105, + 100,9,160,8,124,0,106,2,124,4,161,2,125,6,122,7, + 116,9,124,2,124,6,131,2,1,0,87,0,113,2,4,0, + 116,10,121,108,1,0,125,7,1,0,122,21,124,7,106,11, + 124,6,107,2,114,100,116,12,106,13,160,14,124,6,116,15, + 161,2,100,10,117,1,114,100,87,0,89,0,100,10,125,7, + 126,7,113,2,130,0,100,10,125,7,126,7,119,1,113,2, + 124,0,83,0,119,0,41,11,122,238,70,105,103,117,114,101, + 32,111,117,116,32,119,104,97,116,32,95,95,105,109,112,111, + 114,116,95,95,32,115,104,111,117,108,100,32,114,101,116,117, + 114,110,46,10,10,32,32,32,32,84,104,101,32,105,109,112, + 111,114,116,95,32,112,97,114,97,109,101,116,101,114,32,105, + 115,32,97,32,99,97,108,108,97,98,108,101,32,119,104,105, + 99,104,32,116,97,107,101,115,32,116,104,101,32,110,97,109, + 101,32,111,102,32,109,111,100,117,108,101,32,116,111,10,32, + 32,32,32,105,109,112,111,114,116,46,32,73,116,32,105,115, + 32,114,101,113,117,105,114,101,100,32,116,111,32,100,101,99, + 111,117,112,108,101,32,116,104,101,32,102,117,110,99,116,105, + 111,110,32,102,114,111,109,32,97,115,115,117,109,105,110,103, + 32,105,109,112,111,114,116,108,105,98,39,115,10,32,32,32, + 32,105,109,112,111,114,116,32,105,109,112,108,101,109,101,110, + 116,97,116,105,111,110,32,105,115,32,100,101,115,105,114,101, + 100,46,10,10,32,32,32,32,122,8,46,95,95,97,108,108, + 95,95,122,13,96,96,102,114,111,109,32,108,105,115,116,39, + 39,122,8,73,116,101,109,32,105,110,32,122,18,32,109,117, + 115,116,32,98,101,32,115,116,114,44,32,110,111,116,32,250, + 1,42,218,7,95,95,97,108,108,95,95,84,114,230,0,0, + 0,114,206,0,0,0,78,41,16,114,216,0,0,0,114,217, + 0,0,0,114,9,0,0,0,114,218,0,0,0,114,3,0, + 0,0,114,11,0,0,0,218,16,95,104,97,110,100,108,101, + 95,102,114,111,109,108,105,115,116,114,233,0,0,0,114,50, + 0,0,0,114,74,0,0,0,114,224,0,0,0,114,20,0, + 0,0,114,18,0,0,0,114,105,0,0,0,114,38,0,0, + 0,114,227,0,0,0,41,8,114,110,0,0,0,218,8,102, + 114,111,109,108,105,115,116,114,225,0,0,0,114,231,0,0, + 0,218,1,120,90,5,119,104,101,114,101,90,9,102,114,111, + 109,95,110,97,109,101,90,3,101,120,99,114,5,0,0,0, + 114,5,0,0,0,114,6,0,0,0,114,234,0,0,0,29, + 4,0,0,115,58,0,0,0,8,10,10,1,4,1,12,1, + 4,2,10,1,8,1,8,255,8,2,14,1,10,1,2,1, + 6,255,2,128,10,2,14,1,2,1,14,1,14,1,10,4, + 16,1,2,255,12,2,2,1,8,128,2,245,4,12,2,248, + 255,128,114,234,0,0,0,99,1,0,0,0,0,0,0,0, + 0,0,0,0,3,0,0,0,6,0,0,0,67,0,0,0, + 115,146,0,0,0,124,0,160,0,100,1,161,1,125,1,124, + 0,160,0,100,2,161,1,125,2,124,1,100,3,117,1,114, + 41,124,2,100,3,117,1,114,39,124,1,124,2,106,1,107, + 3,114,39,116,2,106,3,100,4,124,1,155,2,100,5,124, + 2,106,1,155,2,100,6,157,5,116,4,100,7,100,8,141, + 3,1,0,124,1,83,0,124,2,100,3,117,1,114,48,124, + 2,106,1,83,0,116,2,106,3,100,9,116,4,100,7,100, + 8,141,3,1,0,124,0,100,10,25,0,125,1,100,11,124, + 0,118,1,114,71,124,1,160,5,100,12,161,1,100,13,25, + 0,125,1,124,1,83,0,41,14,122,167,67,97,108,99,117, + 108,97,116,101,32,119,104,97,116,32,95,95,112,97,99,107, + 97,103,101,95,95,32,115,104,111,117,108,100,32,98,101,46, + 10,10,32,32,32,32,95,95,112,97,99,107,97,103,101,95, + 95,32,105,115,32,110,111,116,32,103,117,97,114,97,110,116, + 101,101,100,32,116,111,32,98,101,32,100,101,102,105,110,101, + 100,32,111,114,32,99,111,117,108,100,32,98,101,32,115,101, + 116,32,116,111,32,78,111,110,101,10,32,32,32,32,116,111, + 32,114,101,112,114,101,115,101,110,116,32,116,104,97,116,32, + 105,116,115,32,112,114,111,112,101,114,32,118,97,108,117,101, + 32,105,115,32,117,110,107,110,111,119,110,46,10,10,32,32, + 32,32,114,158,0,0,0,114,113,0,0,0,78,122,32,95, + 95,112,97,99,107,97,103,101,95,95,32,33,61,32,95,95, + 115,112,101,99,95,95,46,112,97,114,101,110,116,32,40,122, + 4,32,33,61,32,250,1,41,233,3,0,0,0,41,1,90, + 10,115,116,97,99,107,108,101,118,101,108,122,89,99,97,110, + 39,116,32,114,101,115,111,108,118,101,32,112,97,99,107,97, + 103,101,32,102,114,111,109,32,95,95,115,112,101,99,95,95, + 32,111,114,32,95,95,112,97,99,107,97,103,101,95,95,44, + 32,102,97,108,108,105,110,103,32,98,97,99,107,32,111,110, + 32,95,95,110,97,109,101,95,95,32,97,110,100,32,95,95, + 112,97,116,104,95,95,114,9,0,0,0,114,154,0,0,0, + 114,141,0,0,0,114,25,0,0,0,41,6,114,38,0,0, + 0,114,143,0,0,0,114,101,0,0,0,114,102,0,0,0, + 114,169,0,0,0,114,142,0,0,0,41,3,218,7,103,108, + 111,98,97,108,115,114,209,0,0,0,114,109,0,0,0,114, + 5,0,0,0,114,5,0,0,0,114,6,0,0,0,218,17, + 95,99,97,108,99,95,95,95,112,97,99,107,97,103,101,95, + 95,66,4,0,0,115,44,0,0,0,10,7,10,1,8,1, + 18,1,6,1,2,1,4,255,4,1,6,255,4,2,6,254, + 4,3,8,1,6,1,6,2,4,2,6,254,8,3,8,1, + 14,1,4,1,255,128,114,240,0,0,0,114,5,0,0,0, + 99,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0, + 0,5,0,0,0,67,0,0,0,115,174,0,0,0,124,4, + 100,1,107,2,114,9,116,0,124,0,131,1,125,5,110,18, + 124,1,100,2,117,1,114,15,124,1,110,1,105,0,125,6, + 116,1,124,6,131,1,125,7,116,0,124,0,124,7,124,4, + 131,3,125,5,124,3,115,74,124,4,100,1,107,2,114,42, + 116,0,124,0,160,2,100,3,161,1,100,1,25,0,131,1, + 83,0,124,0,115,46,124,5,83,0,116,3,124,0,131,1, + 116,3,124,0,160,2,100,3,161,1,100,1,25,0,131,1, + 24,0,125,8,116,4,106,5,124,5,106,6,100,2,116,3, + 124,5,106,6,131,1,124,8,24,0,133,2,25,0,25,0, + 83,0,116,7,124,5,100,4,131,2,114,85,116,8,124,5, + 124,3,116,0,131,3,83,0,124,5,83,0,41,5,97,215, + 1,0,0,73,109,112,111,114,116,32,97,32,109,111,100,117, + 108,101,46,10,10,32,32,32,32,84,104,101,32,39,103,108, + 111,98,97,108,115,39,32,97,114,103,117,109,101,110,116,32, + 105,115,32,117,115,101,100,32,116,111,32,105,110,102,101,114, + 32,119,104,101,114,101,32,116,104,101,32,105,109,112,111,114, + 116,32,105,115,32,111,99,99,117,114,114,105,110,103,32,102, + 114,111,109,10,32,32,32,32,116,111,32,104,97,110,100,108, + 101,32,114,101,108,97,116,105,118,101,32,105,109,112,111,114, + 116,115,46,32,84,104,101,32,39,108,111,99,97,108,115,39, + 32,97,114,103,117,109,101,110,116,32,105,115,32,105,103,110, + 111,114,101,100,46,32,84,104,101,10,32,32,32,32,39,102, + 114,111,109,108,105,115,116,39,32,97,114,103,117,109,101,110, + 116,32,115,112,101,99,105,102,105,101,115,32,119,104,97,116, + 32,115,104,111,117,108,100,32,101,120,105,115,116,32,97,115, + 32,97,116,116,114,105,98,117,116,101,115,32,111,110,32,116, + 104,101,32,109,111,100,117,108,101,10,32,32,32,32,98,101, + 105,110,103,32,105,109,112,111,114,116,101,100,32,40,101,46, + 103,46,32,96,96,102,114,111,109,32,109,111,100,117,108,101, + 32,105,109,112,111,114,116,32,60,102,114,111,109,108,105,115, + 116,62,96,96,41,46,32,32,84,104,101,32,39,108,101,118, + 101,108,39,10,32,32,32,32,97,114,103,117,109,101,110,116, + 32,114,101,112,114,101,115,101,110,116,115,32,116,104,101,32, + 112,97,99,107,97,103,101,32,108,111,99,97,116,105,111,110, + 32,116,111,32,105,109,112,111,114,116,32,102,114,111,109,32, + 105,110,32,97,32,114,101,108,97,116,105,118,101,10,32,32, + 32,32,105,109,112,111,114,116,32,40,101,46,103,46,32,96, + 96,102,114,111,109,32,46,46,112,107,103,32,105,109,112,111, + 114,116,32,109,111,100,96,96,32,119,111,117,108,100,32,104, + 97,118,101,32,97,32,39,108,101,118,101,108,39,32,111,102, + 32,50,41,46,10,10,32,32,32,32,114,25,0,0,0,78, + 114,141,0,0,0,114,154,0,0,0,41,9,114,229,0,0, + 0,114,240,0,0,0,218,9,112,97,114,116,105,116,105,111, + 110,114,208,0,0,0,114,18,0,0,0,114,105,0,0,0, + 114,9,0,0,0,114,11,0,0,0,114,234,0,0,0,41, + 9,114,20,0,0,0,114,239,0,0,0,218,6,108,111,99, + 97,108,115,114,235,0,0,0,114,210,0,0,0,114,110,0, + 0,0,90,8,103,108,111,98,97,108,115,95,114,209,0,0, + 0,90,7,99,117,116,95,111,102,102,114,5,0,0,0,114, + 5,0,0,0,114,6,0,0,0,218,10,95,95,105,109,112, + 111,114,116,95,95,93,4,0,0,115,32,0,0,0,8,11, + 10,1,16,2,8,1,12,1,4,1,8,3,18,1,4,1, + 4,1,26,4,30,3,10,1,12,1,4,2,255,128,114,243, + 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, + 2,0,0,0,3,0,0,0,67,0,0,0,115,38,0,0, + 0,116,0,160,1,124,0,161,1,125,1,124,1,100,0,117, + 0,114,15,116,2,100,1,124,0,23,0,131,1,130,1,116, + 3,124,1,131,1,83,0,41,2,78,122,25,110,111,32,98, + 117,105,108,116,45,105,110,32,109,111,100,117,108,101,32,110, + 97,109,101,100,32,41,4,114,175,0,0,0,114,183,0,0, + 0,114,87,0,0,0,114,173,0,0,0,41,2,114,20,0, + 0,0,114,109,0,0,0,114,5,0,0,0,114,5,0,0, + 0,114,6,0,0,0,218,18,95,98,117,105,108,116,105,110, + 95,102,114,111,109,95,110,97,109,101,130,4,0,0,115,10, + 0,0,0,10,1,8,1,12,1,8,1,255,128,114,244,0, + 0,0,99,2,0,0,0,0,0,0,0,0,0,0,0,10, + 0,0,0,5,0,0,0,67,0,0,0,115,166,0,0,0, + 124,1,97,0,124,0,97,1,116,2,116,1,131,1,125,2, + 116,1,106,3,160,4,161,0,68,0,93,36,92,2,125,3, + 125,4,116,5,124,4,124,2,131,2,114,49,124,3,116,1, + 106,6,118,0,114,30,116,7,125,5,110,9,116,0,160,8, + 124,3,161,1,114,38,116,9,125,5,110,1,113,13,116,10, + 124,4,124,5,131,2,125,6,116,11,124,6,124,4,131,2, + 1,0,113,13,116,1,106,3,116,12,25,0,125,7,100,1, + 68,0,93,23,125,8,124,8,116,1,106,3,118,1,114,69, + 116,13,124,8,131,1,125,9,110,5,116,1,106,3,124,8, + 25,0,125,9,116,14,124,7,124,8,124,9,131,3,1,0, + 113,57,100,2,83,0,41,3,122,250,83,101,116,117,112,32, + 105,109,112,111,114,116,108,105,98,32,98,121,32,105,109,112, + 111,114,116,105,110,103,32,110,101,101,100,101,100,32,98,117, + 105,108,116,45,105,110,32,109,111,100,117,108,101,115,32,97, + 110,100,32,105,110,106,101,99,116,105,110,103,32,116,104,101, + 109,10,32,32,32,32,105,110,116,111,32,116,104,101,32,103, + 108,111,98,97,108,32,110,97,109,101,115,112,97,99,101,46, + 10,10,32,32,32,32,65,115,32,115,121,115,32,105,115,32, + 110,101,101,100,101,100,32,102,111,114,32,115,121,115,46,109, + 111,100,117,108,101,115,32,97,99,99,101,115,115,32,97,110, + 100,32,95,105,109,112,32,105,115,32,110,101,101,100,101,100, + 32,116,111,32,108,111,97,100,32,98,117,105,108,116,45,105, + 110,10,32,32,32,32,109,111,100,117,108,101,115,44,32,116, + 104,111,115,101,32,116,119,111,32,109,111,100,117,108,101,115, + 32,109,117,115,116,32,98,101,32,101,120,112,108,105,99,105, + 116,108,121,32,112,97,115,115,101,100,32,105,110,46,10,10, + 32,32,32,32,41,3,114,26,0,0,0,114,101,0,0,0, + 114,71,0,0,0,78,41,15,114,64,0,0,0,114,18,0, + 0,0,114,3,0,0,0,114,105,0,0,0,218,5,105,116, + 101,109,115,114,216,0,0,0,114,86,0,0,0,114,175,0, + 0,0,114,98,0,0,0,114,193,0,0,0,114,155,0,0, + 0,114,161,0,0,0,114,9,0,0,0,114,244,0,0,0, + 114,12,0,0,0,41,10,218,10,115,121,115,95,109,111,100, + 117,108,101,218,11,95,105,109,112,95,109,111,100,117,108,101, + 90,11,109,111,100,117,108,101,95,116,121,112,101,114,20,0, + 0,0,114,110,0,0,0,114,122,0,0,0,114,109,0,0, + 0,90,11,115,101,108,102,95,109,111,100,117,108,101,90,12, + 98,117,105,108,116,105,110,95,110,97,109,101,90,14,98,117, + 105,108,116,105,110,95,109,111,100,117,108,101,114,5,0,0, + 0,114,5,0,0,0,114,6,0,0,0,218,6,95,115,101, + 116,117,112,137,4,0,0,115,42,0,0,0,4,9,4,1, + 8,3,18,1,10,1,10,1,6,1,10,1,6,1,2,2, + 10,1,10,1,2,128,10,3,8,1,10,1,10,1,10,2, + 14,1,4,251,255,128,114,248,0,0,0,99,2,0,0,0, + 0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0, + 67,0,0,0,115,38,0,0,0,116,0,124,0,124,1,131, + 2,1,0,116,1,106,2,160,3,116,4,161,1,1,0,116, + 1,106,2,160,3,116,5,161,1,1,0,100,1,83,0,41, + 2,122,48,73,110,115,116,97,108,108,32,105,109,112,111,114, + 116,101,114,115,32,102,111,114,32,98,117,105,108,116,105,110, + 32,97,110,100,32,102,114,111,122,101,110,32,109,111,100,117, + 108,101,115,78,41,6,114,248,0,0,0,114,18,0,0,0, + 114,214,0,0,0,114,132,0,0,0,114,175,0,0,0,114, + 193,0,0,0,41,2,114,246,0,0,0,114,247,0,0,0, + 114,5,0,0,0,114,5,0,0,0,114,6,0,0,0,218, + 8,95,105,110,115,116,97,108,108,172,4,0,0,115,8,0, + 0,0,10,2,12,2,16,1,255,128,114,249,0,0,0,99, + 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, + 4,0,0,0,67,0,0,0,115,32,0,0,0,100,1,100, + 2,108,0,125,0,124,0,97,1,124,0,160,2,116,3,106, + 4,116,5,25,0,161,1,1,0,100,2,83,0,41,3,122, + 57,73,110,115,116,97,108,108,32,105,109,112,111,114,116,101, + 114,115,32,116,104,97,116,32,114,101,113,117,105,114,101,32, + 101,120,116,101,114,110,97,108,32,102,105,108,101,115,121,115, + 116,101,109,32,97,99,99,101,115,115,114,25,0,0,0,78, + 41,6,218,26,95,102,114,111,122,101,110,95,105,109,112,111, + 114,116,108,105,98,95,101,120,116,101,114,110,97,108,114,139, + 0,0,0,114,249,0,0,0,114,18,0,0,0,114,105,0, + 0,0,114,9,0,0,0,41,1,114,250,0,0,0,114,5, + 0,0,0,114,5,0,0,0,114,6,0,0,0,218,27,95, + 105,110,115,116,97,108,108,95,101,120,116,101,114,110,97,108, + 95,105,109,112,111,114,116,101,114,115,180,4,0,0,115,8, + 0,0,0,8,3,4,1,20,1,255,128,114,251,0,0,0, + 114,190,0,0,0,114,0,0,0,0,114,24,0,0,0,41, + 4,78,78,114,5,0,0,0,114,25,0,0,0,41,54,114, + 10,0,0,0,114,7,0,0,0,114,26,0,0,0,114,101, + 0,0,0,114,71,0,0,0,114,139,0,0,0,114,17,0, + 0,0,114,21,0,0,0,114,66,0,0,0,114,37,0,0, + 0,114,47,0,0,0,114,22,0,0,0,114,23,0,0,0, + 114,55,0,0,0,114,57,0,0,0,114,60,0,0,0,114, + 72,0,0,0,114,74,0,0,0,114,83,0,0,0,114,95, + 0,0,0,114,100,0,0,0,114,111,0,0,0,114,124,0, + 0,0,114,125,0,0,0,114,104,0,0,0,114,155,0,0, + 0,114,161,0,0,0,114,165,0,0,0,114,119,0,0,0, + 114,106,0,0,0,114,172,0,0,0,114,173,0,0,0,114, + 107,0,0,0,114,175,0,0,0,114,193,0,0,0,114,200, + 0,0,0,114,211,0,0,0,114,213,0,0,0,114,215,0, + 0,0,114,221,0,0,0,90,15,95,69,82,82,95,77,83, + 71,95,80,82,69,70,73,88,114,223,0,0,0,114,226,0, + 0,0,218,6,111,98,106,101,99,116,114,227,0,0,0,114, + 228,0,0,0,114,229,0,0,0,114,234,0,0,0,114,240, + 0,0,0,114,243,0,0,0,114,244,0,0,0,114,248,0, + 0,0,114,249,0,0,0,114,251,0,0,0,114,5,0,0, + 0,114,5,0,0,0,114,5,0,0,0,114,6,0,0,0, + 218,8,60,109,111,100,117,108,101,62,1,0,0,0,115,106, + 0,0,0,4,0,8,22,4,9,4,1,4,1,4,3,8, + 3,8,8,4,8,4,2,16,3,14,4,14,77,14,21,8, + 16,8,37,8,17,14,11,8,8,8,11,8,12,8,19,14, + 26,16,101,10,26,14,45,8,72,8,17,8,17,8,30,8, + 36,8,45,14,15,14,80,14,85,8,13,8,9,10,10,8, + 47,4,16,8,1,8,2,6,32,8,3,10,16,14,15,8, + 37,10,27,8,37,8,7,8,35,12,8,255,128, }; diff --git a/Python/importlib_external.h b/Python/importlib_external.h index f484b2d209fa3a..e242c36aa39cee 100644 --- a/Python/importlib_external.h +++ b/Python/importlib_external.h @@ -35,7 +35,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 132,0,90,61,100,68,100,69,132,0,90,62,100,114,100,70, 100,71,132,1,90,63,100,115,100,72,100,73,132,1,90,64, 100,116,100,75,100,76,132,1,90,65,100,77,100,78,132,0, - 90,66,101,67,131,0,90,68,100,117,100,1,101,68,100,79, + 90,66,101,67,131,0,90,68,100,113,100,1,101,68,100,79, 156,2,100,80,100,81,132,3,90,69,71,0,100,82,100,83, 132,0,100,83,131,2,90,70,71,0,100,84,100,85,132,0, 100,85,131,2,90,71,71,0,100,86,100,87,132,0,100,87, @@ -47,9 +47,9 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 132,0,100,97,131,2,90,77,71,0,100,98,100,99,132,0, 100,99,131,2,90,78,71,0,100,100,100,101,132,0,100,101, 131,2,90,79,71,0,100,102,100,103,132,0,100,103,131,2, - 90,80,100,118,100,104,100,105,132,1,90,81,100,106,100,107, + 90,80,100,113,100,104,100,105,132,1,90,81,100,106,100,107, 132,0,90,82,100,108,100,109,132,0,90,83,100,110,100,111, - 132,0,90,84,100,1,83,0,41,119,97,94,1,0,0,67, + 132,0,90,84,100,1,83,0,41,117,97,94,1,0,0,67, 111,114,101,32,105,109,112,108,101,109,101,110,116,97,116,105, 111,110,32,111,102,32,112,97,116,104,45,98,97,115,101,100, 32,105,109,112,111,114,116,46,10,10,84,104,105,115,32,109, @@ -676,2105 +676,2105 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 0,0,114,8,0,0,0,218,5,95,119,114,97,112,40,2, 0,0,115,12,0,0,0,8,1,10,1,18,1,2,128,18, 1,255,128,122,26,95,99,104,101,99,107,95,110,97,109,101, - 46,60,108,111,99,97,108,115,62,46,95,119,114,97,112,41, - 1,78,41,2,218,10,95,98,111,111,116,115,116,114,97,112, - 114,158,0,0,0,41,3,114,147,0,0,0,114,148,0,0, - 0,114,158,0,0,0,114,7,0,0,0,114,146,0,0,0, - 114,8,0,0,0,218,11,95,99,104,101,99,107,95,110,97, - 109,101,19,2,0,0,115,14,0,0,0,14,8,8,10,8, - 1,8,2,10,6,4,1,255,128,114,160,0,0,0,99,2, - 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,6, - 0,0,0,67,0,0,0,115,72,0,0,0,116,0,160,1, - 100,1,116,2,161,2,1,0,124,0,160,3,124,1,161,1, - 92,2,125,2,125,3,124,2,100,2,117,0,114,34,116,4, - 124,3,131,1,114,34,100,3,125,4,116,0,160,1,124,4, - 160,5,124,3,100,4,25,0,161,1,116,6,161,2,1,0, - 124,2,83,0,41,5,122,155,84,114,121,32,116,111,32,102, - 105,110,100,32,97,32,108,111,97,100,101,114,32,102,111,114, - 32,116,104,101,32,115,112,101,99,105,102,105,101,100,32,109, - 111,100,117,108,101,32,98,121,32,100,101,108,101,103,97,116, - 105,110,103,32,116,111,10,32,32,32,32,115,101,108,102,46, - 102,105,110,100,95,108,111,97,100,101,114,40,41,46,10,10, - 32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,32, - 105,115,32,100,101,112,114,101,99,97,116,101,100,32,105,110, - 32,102,97,118,111,114,32,111,102,32,102,105,110,100,101,114, - 46,102,105,110,100,95,115,112,101,99,40,41,46,10,10,32, - 32,32,32,122,90,102,105,110,100,95,109,111,100,117,108,101, - 40,41,32,105,115,32,100,101,112,114,101,99,97,116,101,100, - 32,97,110,100,32,115,108,97,116,101,100,32,102,111,114,32, - 114,101,109,111,118,97,108,32,105,110,32,80,121,116,104,111, - 110,32,51,46,49,50,59,32,117,115,101,32,102,105,110,100, - 95,115,112,101,99,40,41,32,105,110,115,116,101,97,100,78, - 122,44,78,111,116,32,105,109,112,111,114,116,105,110,103,32, - 100,105,114,101,99,116,111,114,121,32,123,125,58,32,109,105, - 115,115,105,110,103,32,95,95,105,110,105,116,95,95,114,0, - 0,0,0,41,7,114,99,0,0,0,114,100,0,0,0,114, - 101,0,0,0,218,11,102,105,110,100,95,108,111,97,100,101, - 114,114,4,0,0,0,114,89,0,0,0,218,13,73,109,112, - 111,114,116,87,97,114,110,105,110,103,41,5,114,143,0,0, - 0,218,8,102,117,108,108,110,97,109,101,218,6,108,111,97, - 100,101,114,218,8,112,111,114,116,105,111,110,115,218,3,109, - 115,103,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,218,17,95,102,105,110,100,95,109,111,100,117,108,101,95, - 115,104,105,109,50,2,0,0,115,18,0,0,0,6,7,2, - 2,4,254,14,6,16,1,4,1,22,1,4,1,255,128,114, - 167,0,0,0,99,3,0,0,0,0,0,0,0,0,0,0, - 0,6,0,0,0,4,0,0,0,67,0,0,0,115,166,0, - 0,0,124,0,100,1,100,2,133,2,25,0,125,3,124,3, - 116,0,107,3,114,32,100,3,124,1,155,2,100,4,124,3, - 155,2,157,4,125,4,116,1,160,2,100,5,124,4,161,2, - 1,0,116,3,124,4,102,1,105,0,124,2,164,1,142,1, - 130,1,116,4,124,0,131,1,100,6,107,0,114,53,100,7, - 124,1,155,2,157,2,125,4,116,1,160,2,100,5,124,4, - 161,2,1,0,116,5,124,4,131,1,130,1,116,6,124,0, - 100,2,100,8,133,2,25,0,131,1,125,5,124,5,100,9, - 64,0,114,81,100,10,124,5,155,2,100,11,124,1,155,2, - 157,4,125,4,116,3,124,4,102,1,105,0,124,2,164,1, - 142,1,130,1,124,5,83,0,41,12,97,84,2,0,0,80, - 101,114,102,111,114,109,32,98,97,115,105,99,32,118,97,108, - 105,100,105,116,121,32,99,104,101,99,107,105,110,103,32,111, - 102,32,97,32,112,121,99,32,104,101,97,100,101,114,32,97, - 110,100,32,114,101,116,117,114,110,32,116,104,101,32,102,108, - 97,103,115,32,102,105,101,108,100,44,10,32,32,32,32,119, - 104,105,99,104,32,100,101,116,101,114,109,105,110,101,115,32, - 104,111,119,32,116,104,101,32,112,121,99,32,115,104,111,117, - 108,100,32,98,101,32,102,117,114,116,104,101,114,32,118,97, - 108,105,100,97,116,101,100,32,97,103,97,105,110,115,116,32, - 116,104,101,32,115,111,117,114,99,101,46,10,10,32,32,32, - 32,42,100,97,116,97,42,32,105,115,32,116,104,101,32,99, - 111,110,116,101,110,116,115,32,111,102,32,116,104,101,32,112, - 121,99,32,102,105,108,101,46,32,40,79,110,108,121,32,116, - 104,101,32,102,105,114,115,116,32,49,54,32,98,121,116,101, - 115,32,97,114,101,10,32,32,32,32,114,101,113,117,105,114, - 101,100,44,32,116,104,111,117,103,104,46,41,10,10,32,32, - 32,32,42,110,97,109,101,42,32,105,115,32,116,104,101,32, - 110,97,109,101,32,111,102,32,116,104,101,32,109,111,100,117, - 108,101,32,98,101,105,110,103,32,105,109,112,111,114,116,101, - 100,46,32,73,116,32,105,115,32,117,115,101,100,32,102,111, - 114,32,108,111,103,103,105,110,103,46,10,10,32,32,32,32, - 42,101,120,99,95,100,101,116,97,105,108,115,42,32,105,115, - 32,97,32,100,105,99,116,105,111,110,97,114,121,32,112,97, - 115,115,101,100,32,116,111,32,73,109,112,111,114,116,69,114, - 114,111,114,32,105,102,32,105,116,32,114,97,105,115,101,100, - 32,102,111,114,10,32,32,32,32,105,109,112,114,111,118,101, - 100,32,100,101,98,117,103,103,105,110,103,46,10,10,32,32, - 32,32,73,109,112,111,114,116,69,114,114,111,114,32,105,115, - 32,114,97,105,115,101,100,32,119,104,101,110,32,116,104,101, - 32,109,97,103,105,99,32,110,117,109,98,101,114,32,105,115, - 32,105,110,99,111,114,114,101,99,116,32,111,114,32,119,104, - 101,110,32,116,104,101,32,102,108,97,103,115,10,32,32,32, - 32,102,105,101,108,100,32,105,115,32,105,110,118,97,108,105, - 100,46,32,69,79,70,69,114,114,111,114,32,105,115,32,114, - 97,105,115,101,100,32,119,104,101,110,32,116,104,101,32,100, - 97,116,97,32,105,115,32,102,111,117,110,100,32,116,111,32, - 98,101,32,116,114,117,110,99,97,116,101,100,46,10,10,32, - 32,32,32,78,114,31,0,0,0,122,20,98,97,100,32,109, - 97,103,105,99,32,110,117,109,98,101,114,32,105,110,32,122, - 2,58,32,250,2,123,125,233,16,0,0,0,122,40,114,101, - 97,99,104,101,100,32,69,79,70,32,119,104,105,108,101,32, - 114,101,97,100,105,110,103,32,112,121,99,32,104,101,97,100, - 101,114,32,111,102,32,233,8,0,0,0,233,252,255,255,255, - 122,14,105,110,118,97,108,105,100,32,102,108,97,103,115,32, - 122,4,32,105,110,32,41,7,218,12,77,65,71,73,67,95, - 78,85,77,66,69,82,114,159,0,0,0,218,16,95,118,101, - 114,98,111,115,101,95,109,101,115,115,97,103,101,114,142,0, - 0,0,114,4,0,0,0,218,8,69,79,70,69,114,114,111, - 114,114,42,0,0,0,41,6,114,41,0,0,0,114,141,0, - 0,0,218,11,101,120,99,95,100,101,116,97,105,108,115,90, - 5,109,97,103,105,99,114,117,0,0,0,114,16,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 13,95,99,108,97,115,115,105,102,121,95,112,121,99,70,2, - 0,0,115,30,0,0,0,12,16,8,1,16,1,12,1,16, - 1,12,1,10,1,12,1,8,1,16,1,8,2,16,1,16, - 1,4,1,255,128,114,176,0,0,0,99,5,0,0,0,0, - 0,0,0,0,0,0,0,6,0,0,0,4,0,0,0,67, - 0,0,0,115,124,0,0,0,116,0,124,0,100,1,100,2, - 133,2,25,0,131,1,124,1,100,3,64,0,107,3,114,31, - 100,4,124,3,155,2,157,2,125,5,116,1,160,2,100,5, - 124,5,161,2,1,0,116,3,124,5,102,1,105,0,124,4, - 164,1,142,1,130,1,124,2,100,6,117,1,114,60,116,0, - 124,0,100,2,100,7,133,2,25,0,131,1,124,2,100,3, - 64,0,107,3,114,58,116,3,100,4,124,3,155,2,157,2, - 102,1,105,0,124,4,164,1,142,1,130,1,100,6,83,0, - 100,6,83,0,41,8,97,7,2,0,0,86,97,108,105,100, - 97,116,101,32,97,32,112,121,99,32,97,103,97,105,110,115, - 116,32,116,104,101,32,115,111,117,114,99,101,32,108,97,115, - 116,45,109,111,100,105,102,105,101,100,32,116,105,109,101,46, - 10,10,32,32,32,32,42,100,97,116,97,42,32,105,115,32, - 116,104,101,32,99,111,110,116,101,110,116,115,32,111,102,32, - 116,104,101,32,112,121,99,32,102,105,108,101,46,32,40,79, - 110,108,121,32,116,104,101,32,102,105,114,115,116,32,49,54, - 32,98,121,116,101,115,32,97,114,101,10,32,32,32,32,114, - 101,113,117,105,114,101,100,46,41,10,10,32,32,32,32,42, - 115,111,117,114,99,101,95,109,116,105,109,101,42,32,105,115, - 32,116,104,101,32,108,97,115,116,32,109,111,100,105,102,105, - 101,100,32,116,105,109,101,115,116,97,109,112,32,111,102,32, - 116,104,101,32,115,111,117,114,99,101,32,102,105,108,101,46, - 10,10,32,32,32,32,42,115,111,117,114,99,101,95,115,105, - 122,101,42,32,105,115,32,78,111,110,101,32,111,114,32,116, - 104,101,32,115,105,122,101,32,111,102,32,116,104,101,32,115, - 111,117,114,99,101,32,102,105,108,101,32,105,110,32,98,121, - 116,101,115,46,10,10,32,32,32,32,42,110,97,109,101,42, - 32,105,115,32,116,104,101,32,110,97,109,101,32,111,102,32, - 116,104,101,32,109,111,100,117,108,101,32,98,101,105,110,103, - 32,105,109,112,111,114,116,101,100,46,32,73,116,32,105,115, - 32,117,115,101,100,32,102,111,114,32,108,111,103,103,105,110, - 103,46,10,10,32,32,32,32,42,101,120,99,95,100,101,116, - 97,105,108,115,42,32,105,115,32,97,32,100,105,99,116,105, - 111,110,97,114,121,32,112,97,115,115,101,100,32,116,111,32, - 73,109,112,111,114,116,69,114,114,111,114,32,105,102,32,105, - 116,32,114,97,105,115,101,100,32,102,111,114,10,32,32,32, - 32,105,109,112,114,111,118,101,100,32,100,101,98,117,103,103, - 105,110,103,46,10,10,32,32,32,32,65,110,32,73,109,112, - 111,114,116,69,114,114,111,114,32,105,115,32,114,97,105,115, - 101,100,32,105,102,32,116,104,101,32,98,121,116,101,99,111, - 100,101,32,105,115,32,115,116,97,108,101,46,10,10,32,32, - 32,32,114,170,0,0,0,233,12,0,0,0,114,30,0,0, - 0,122,22,98,121,116,101,99,111,100,101,32,105,115,32,115, - 116,97,108,101,32,102,111,114,32,114,168,0,0,0,78,114, - 169,0,0,0,41,4,114,42,0,0,0,114,159,0,0,0, - 114,173,0,0,0,114,142,0,0,0,41,6,114,41,0,0, - 0,218,12,115,111,117,114,99,101,95,109,116,105,109,101,218, - 11,115,111,117,114,99,101,95,115,105,122,101,114,141,0,0, - 0,114,175,0,0,0,114,117,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,218,23,95,118,97,108, - 105,100,97,116,101,95,116,105,109,101,115,116,97,109,112,95, - 112,121,99,103,2,0,0,115,20,0,0,0,24,19,10,1, - 12,1,16,1,8,1,22,1,2,255,22,2,8,254,255,128, - 114,180,0,0,0,99,4,0,0,0,0,0,0,0,0,0, - 0,0,4,0,0,0,4,0,0,0,67,0,0,0,115,42, - 0,0,0,124,0,100,1,100,2,133,2,25,0,124,1,107, - 3,114,19,116,0,100,3,124,2,155,2,157,2,102,1,105, - 0,124,3,164,1,142,1,130,1,100,4,83,0,41,5,97, - 243,1,0,0,86,97,108,105,100,97,116,101,32,97,32,104, - 97,115,104,45,98,97,115,101,100,32,112,121,99,32,98,121, - 32,99,104,101,99,107,105,110,103,32,116,104,101,32,114,101, - 97,108,32,115,111,117,114,99,101,32,104,97,115,104,32,97, - 103,97,105,110,115,116,32,116,104,101,32,111,110,101,32,105, - 110,10,32,32,32,32,116,104,101,32,112,121,99,32,104,101, - 97,100,101,114,46,10,10,32,32,32,32,42,100,97,116,97, - 42,32,105,115,32,116,104,101,32,99,111,110,116,101,110,116, - 115,32,111,102,32,116,104,101,32,112,121,99,32,102,105,108, - 101,46,32,40,79,110,108,121,32,116,104,101,32,102,105,114, - 115,116,32,49,54,32,98,121,116,101,115,32,97,114,101,10, - 32,32,32,32,114,101,113,117,105,114,101,100,46,41,10,10, - 32,32,32,32,42,115,111,117,114,99,101,95,104,97,115,104, - 42,32,105,115,32,116,104,101,32,105,109,112,111,114,116,108, - 105,98,46,117,116,105,108,46,115,111,117,114,99,101,95,104, - 97,115,104,40,41,32,111,102,32,116,104,101,32,115,111,117, - 114,99,101,32,102,105,108,101,46,10,10,32,32,32,32,42, - 110,97,109,101,42,32,105,115,32,116,104,101,32,110,97,109, - 101,32,111,102,32,116,104,101,32,109,111,100,117,108,101,32, - 98,101,105,110,103,32,105,109,112,111,114,116,101,100,46,32, - 73,116,32,105,115,32,117,115,101,100,32,102,111,114,32,108, - 111,103,103,105,110,103,46,10,10,32,32,32,32,42,101,120, - 99,95,100,101,116,97,105,108,115,42,32,105,115,32,97,32, - 100,105,99,116,105,111,110,97,114,121,32,112,97,115,115,101, - 100,32,116,111,32,73,109,112,111,114,116,69,114,114,111,114, - 32,105,102,32,105,116,32,114,97,105,115,101,100,32,102,111, - 114,10,32,32,32,32,105,109,112,114,111,118,101,100,32,100, - 101,98,117,103,103,105,110,103,46,10,10,32,32,32,32,65, - 110,32,73,109,112,111,114,116,69,114,114,111,114,32,105,115, - 32,114,97,105,115,101,100,32,105,102,32,116,104,101,32,98, - 121,116,101,99,111,100,101,32,105,115,32,115,116,97,108,101, - 46,10,10,32,32,32,32,114,170,0,0,0,114,169,0,0, - 0,122,46,104,97,115,104,32,105,110,32,98,121,116,101,99, - 111,100,101,32,100,111,101,115,110,39,116,32,109,97,116,99, - 104,32,104,97,115,104,32,111,102,32,115,111,117,114,99,101, - 32,78,41,1,114,142,0,0,0,41,4,114,41,0,0,0, - 218,11,115,111,117,114,99,101,95,104,97,115,104,114,141,0, - 0,0,114,175,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,18,95,118,97,108,105,100,97,116, - 101,95,104,97,115,104,95,112,121,99,131,2,0,0,115,16, - 0,0,0,16,17,2,1,8,1,4,255,2,2,6,254,4, - 255,255,128,114,182,0,0,0,99,4,0,0,0,0,0,0, - 0,0,0,0,0,5,0,0,0,5,0,0,0,67,0,0, - 0,115,76,0,0,0,116,0,160,1,124,0,161,1,125,4, - 116,2,124,4,116,3,131,2,114,28,116,4,160,5,100,1, - 124,2,161,2,1,0,124,3,100,2,117,1,114,26,116,6, - 160,7,124,4,124,3,161,2,1,0,124,4,83,0,116,8, - 100,3,160,9,124,2,161,1,124,1,124,2,100,4,141,3, - 130,1,41,5,122,35,67,111,109,112,105,108,101,32,98,121, - 116,101,99,111,100,101,32,97,115,32,102,111,117,110,100,32, - 105,110,32,97,32,112,121,99,46,122,21,99,111,100,101,32, - 111,98,106,101,99,116,32,102,114,111,109,32,123,33,114,125, - 78,122,23,78,111,110,45,99,111,100,101,32,111,98,106,101, - 99,116,32,105,110,32,123,33,114,125,169,2,114,141,0,0, - 0,114,65,0,0,0,41,10,218,7,109,97,114,115,104,97, - 108,90,5,108,111,97,100,115,218,10,105,115,105,110,115,116, - 97,110,99,101,218,10,95,99,111,100,101,95,116,121,112,101, - 114,159,0,0,0,114,173,0,0,0,218,4,95,105,109,112, - 90,16,95,102,105,120,95,99,111,95,102,105,108,101,110,97, - 109,101,114,142,0,0,0,114,89,0,0,0,41,5,114,41, - 0,0,0,114,141,0,0,0,114,132,0,0,0,114,134,0, - 0,0,218,4,99,111,100,101,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,17,95,99,111,109,112,105,108, - 101,95,98,121,116,101,99,111,100,101,155,2,0,0,115,20, - 0,0,0,10,2,10,1,12,1,8,1,12,1,4,1,10, - 2,4,1,6,255,255,128,114,189,0,0,0,99,3,0,0, - 0,0,0,0,0,0,0,0,0,4,0,0,0,5,0,0, - 0,67,0,0,0,115,70,0,0,0,116,0,116,1,131,1, - 125,3,124,3,160,2,116,3,100,1,131,1,161,1,1,0, - 124,3,160,2,116,3,124,1,131,1,161,1,1,0,124,3, - 160,2,116,3,124,2,131,1,161,1,1,0,124,3,160,2, - 116,4,160,5,124,0,161,1,161,1,1,0,124,3,83,0, - 41,3,122,43,80,114,111,100,117,99,101,32,116,104,101,32, - 100,97,116,97,32,102,111,114,32,97,32,116,105,109,101,115, - 116,97,109,112,45,98,97,115,101,100,32,112,121,99,46,114, - 0,0,0,0,78,41,6,218,9,98,121,116,101,97,114,114, - 97,121,114,172,0,0,0,218,6,101,120,116,101,110,100,114, - 36,0,0,0,114,184,0,0,0,218,5,100,117,109,112,115, - 41,4,114,188,0,0,0,218,5,109,116,105,109,101,114,179, - 0,0,0,114,41,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,22,95,99,111,100,101,95,116, - 111,95,116,105,109,101,115,116,97,109,112,95,112,121,99,168, - 2,0,0,115,14,0,0,0,8,2,14,1,14,1,14,1, - 16,1,4,1,255,128,114,194,0,0,0,84,99,3,0,0, - 0,0,0,0,0,0,0,0,0,5,0,0,0,5,0,0, - 0,67,0,0,0,115,80,0,0,0,116,0,116,1,131,1, - 125,3,100,1,124,2,100,1,62,0,66,0,125,4,124,3, - 160,2,116,3,124,4,131,1,161,1,1,0,116,4,124,1, - 131,1,100,2,107,2,115,25,74,0,130,1,124,3,160,2, - 124,1,161,1,1,0,124,3,160,2,116,5,160,6,124,0, - 161,1,161,1,1,0,124,3,83,0,41,4,122,38,80,114, - 111,100,117,99,101,32,116,104,101,32,100,97,116,97,32,102, - 111,114,32,97,32,104,97,115,104,45,98,97,115,101,100,32, - 112,121,99,46,114,3,0,0,0,114,170,0,0,0,78,41, - 7,114,190,0,0,0,114,172,0,0,0,114,191,0,0,0, - 114,36,0,0,0,114,4,0,0,0,114,184,0,0,0,114, - 192,0,0,0,41,5,114,188,0,0,0,114,181,0,0,0, - 90,7,99,104,101,99,107,101,100,114,41,0,0,0,114,16, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,17,95,99,111,100,101,95,116,111,95,104,97,115, - 104,95,112,121,99,178,2,0,0,115,16,0,0,0,8,2, - 12,1,14,1,16,1,10,1,16,1,4,1,255,128,114,195, - 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, - 5,0,0,0,6,0,0,0,67,0,0,0,115,62,0,0, - 0,100,1,100,2,108,0,125,1,116,1,160,2,124,0,161, - 1,106,3,125,2,124,1,160,4,124,2,161,1,125,3,116, - 1,160,5,100,2,100,3,161,2,125,4,124,4,160,6,124, - 0,160,6,124,3,100,1,25,0,161,1,161,1,83,0,41, - 4,122,121,68,101,99,111,100,101,32,98,121,116,101,115,32, - 114,101,112,114,101,115,101,110,116,105,110,103,32,115,111,117, - 114,99,101,32,99,111,100,101,32,97,110,100,32,114,101,116, - 117,114,110,32,116,104,101,32,115,116,114,105,110,103,46,10, - 10,32,32,32,32,85,110,105,118,101,114,115,97,108,32,110, - 101,119,108,105,110,101,32,115,117,112,112,111,114,116,32,105, - 115,32,117,115,101,100,32,105,110,32,116,104,101,32,100,101, - 99,111,100,105,110,103,46,10,32,32,32,32,114,0,0,0, - 0,78,84,41,7,218,8,116,111,107,101,110,105,122,101,114, - 91,0,0,0,90,7,66,121,116,101,115,73,79,90,8,114, - 101,97,100,108,105,110,101,90,15,100,101,116,101,99,116,95, - 101,110,99,111,100,105,110,103,90,25,73,110,99,114,101,109, - 101,110,116,97,108,78,101,119,108,105,110,101,68,101,99,111, - 100,101,114,218,6,100,101,99,111,100,101,41,5,218,12,115, - 111,117,114,99,101,95,98,121,116,101,115,114,196,0,0,0, - 90,21,115,111,117,114,99,101,95,98,121,116,101,115,95,114, - 101,97,100,108,105,110,101,218,8,101,110,99,111,100,105,110, - 103,90,15,110,101,119,108,105,110,101,95,100,101,99,111,100, - 101,114,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,218,13,100,101,99,111,100,101,95,115,111,117,114,99,101, - 189,2,0,0,115,12,0,0,0,8,5,12,1,10,1,12, - 1,20,1,255,128,114,200,0,0,0,169,2,114,164,0,0, - 0,218,26,115,117,98,109,111,100,117,108,101,95,115,101,97, - 114,99,104,95,108,111,99,97,116,105,111,110,115,99,2,0, - 0,0,0,0,0,0,2,0,0,0,9,0,0,0,8,0, - 0,0,67,0,0,0,115,52,1,0,0,124,1,100,1,117, - 0,114,28,100,2,125,1,116,0,124,2,100,3,131,2,114, - 27,122,7,124,2,160,1,124,0,161,1,125,1,87,0,110, - 35,4,0,116,2,121,153,1,0,1,0,1,0,89,0,110, - 27,110,26,116,3,160,4,124,1,161,1,125,1,116,5,124, - 1,131,1,115,54,122,9,116,6,116,3,160,7,161,0,124, - 1,131,2,125,1,87,0,110,7,4,0,116,8,121,152,1, - 0,1,0,1,0,89,0,116,9,106,10,124,0,124,2,124, - 1,100,4,141,3,125,4,100,5,124,4,95,11,124,2,100, - 1,117,0,114,96,116,12,131,0,68,0,93,21,92,2,125, - 5,125,6,124,1,160,13,116,14,124,6,131,1,161,1,114, - 93,124,5,124,0,124,1,131,2,125,2,124,2,124,4,95, - 15,1,0,113,96,113,72,100,1,83,0,124,3,116,16,117, - 0,114,127,116,0,124,2,100,6,131,2,114,126,122,7,124, - 2,160,17,124,0,161,1,125,7,87,0,110,8,4,0,116, - 2,121,151,1,0,1,0,1,0,89,0,110,9,124,7,114, - 126,103,0,124,4,95,18,110,3,124,3,124,4,95,18,124, - 4,106,18,103,0,107,2,114,149,124,1,114,149,116,19,124, - 1,131,1,100,7,25,0,125,8,124,4,106,18,160,20,124, - 8,161,1,1,0,124,4,83,0,119,0,119,0,119,0,41, - 8,97,61,1,0,0,82,101,116,117,114,110,32,97,32,109, - 111,100,117,108,101,32,115,112,101,99,32,98,97,115,101,100, - 32,111,110,32,97,32,102,105,108,101,32,108,111,99,97,116, - 105,111,110,46,10,10,32,32,32,32,84,111,32,105,110,100, - 105,99,97,116,101,32,116,104,97,116,32,116,104,101,32,109, - 111,100,117,108,101,32,105,115,32,97,32,112,97,99,107,97, - 103,101,44,32,115,101,116,10,32,32,32,32,115,117,98,109, - 111,100,117,108,101,95,115,101,97,114,99,104,95,108,111,99, - 97,116,105,111,110,115,32,116,111,32,97,32,108,105,115,116, - 32,111,102,32,100,105,114,101,99,116,111,114,121,32,112,97, - 116,104,115,46,32,32,65,110,10,32,32,32,32,101,109,112, - 116,121,32,108,105,115,116,32,105,115,32,115,117,102,102,105, - 99,105,101,110,116,44,32,116,104,111,117,103,104,32,105,116, - 115,32,110,111,116,32,111,116,104,101,114,119,105,115,101,32, - 117,115,101,102,117,108,32,116,111,32,116,104,101,10,32,32, - 32,32,105,109,112,111,114,116,32,115,121,115,116,101,109,46, - 10,10,32,32,32,32,84,104,101,32,108,111,97,100,101,114, - 32,109,117,115,116,32,116,97,107,101,32,97,32,115,112,101, - 99,32,97,115,32,105,116,115,32,111,110,108,121,32,95,95, - 105,110,105,116,95,95,40,41,32,97,114,103,46,10,10,32, - 32,32,32,78,122,9,60,117,110,107,110,111,119,110,62,218, - 12,103,101,116,95,102,105,108,101,110,97,109,101,169,1,218, - 6,111,114,105,103,105,110,84,218,10,105,115,95,112,97,99, - 107,97,103,101,114,0,0,0,0,41,21,114,153,0,0,0, - 114,203,0,0,0,114,142,0,0,0,114,18,0,0,0,114, - 103,0,0,0,114,86,0,0,0,114,67,0,0,0,114,82, - 0,0,0,114,76,0,0,0,114,159,0,0,0,218,10,77, - 111,100,117,108,101,83,112,101,99,90,13,95,115,101,116,95, - 102,105,108,101,97,116,116,114,218,27,95,103,101,116,95,115, - 117,112,112,111,114,116,101,100,95,102,105,108,101,95,108,111, - 97,100,101,114,115,114,58,0,0,0,114,136,0,0,0,114, - 164,0,0,0,218,9,95,80,79,80,85,76,65,84,69,114, - 206,0,0,0,114,202,0,0,0,114,74,0,0,0,114,61, - 0,0,0,41,9,114,141,0,0,0,90,8,108,111,99,97, - 116,105,111,110,114,164,0,0,0,114,202,0,0,0,218,4, - 115,112,101,99,218,12,108,111,97,100,101,114,95,99,108,97, - 115,115,218,8,115,117,102,102,105,120,101,115,114,206,0,0, - 0,90,7,100,105,114,110,97,109,101,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,23,115,112,101,99,95, - 102,114,111,109,95,102,105,108,101,95,108,111,99,97,116,105, - 111,110,206,2,0,0,115,86,0,0,0,8,12,4,4,10, - 1,2,2,14,1,12,1,4,1,2,251,10,7,8,1,2, - 1,18,1,12,1,2,1,16,8,6,1,8,3,14,1,14, - 1,10,1,6,1,4,1,2,253,4,5,8,3,10,2,2, - 1,14,1,12,1,4,1,4,2,6,1,2,128,6,2,10, - 1,4,1,12,1,12,1,4,2,2,244,2,228,2,249,255, - 128,114,213,0,0,0,99,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,4,0,0,0,64,0,0,0,115, - 88,0,0,0,101,0,90,1,100,0,90,2,100,1,90,3, - 100,2,90,4,100,3,90,5,101,6,111,15,100,4,101,7, - 118,0,90,8,101,9,100,5,100,6,132,0,131,1,90,10, - 101,11,100,7,100,8,132,0,131,1,90,12,101,11,100,14, - 100,10,100,11,132,1,131,1,90,13,101,11,100,15,100,12, - 100,13,132,1,131,1,90,14,100,9,83,0,41,16,218,21, - 87,105,110,100,111,119,115,82,101,103,105,115,116,114,121,70, - 105,110,100,101,114,122,62,77,101,116,97,32,112,97,116,104, - 32,102,105,110,100,101,114,32,102,111,114,32,109,111,100,117, - 108,101,115,32,100,101,99,108,97,114,101,100,32,105,110,32, - 116,104,101,32,87,105,110,100,111,119,115,32,114,101,103,105, - 115,116,114,121,46,122,59,83,111,102,116,119,97,114,101,92, - 80,121,116,104,111,110,92,80,121,116,104,111,110,67,111,114, - 101,92,123,115,121,115,95,118,101,114,115,105,111,110,125,92, - 77,111,100,117,108,101,115,92,123,102,117,108,108,110,97,109, - 101,125,122,65,83,111,102,116,119,97,114,101,92,80,121,116, - 104,111,110,92,80,121,116,104,111,110,67,111,114,101,92,123, - 115,121,115,95,118,101,114,115,105,111,110,125,92,77,111,100, - 117,108,101,115,92,123,102,117,108,108,110,97,109,101,125,92, - 68,101,98,117,103,122,6,95,100,46,112,121,100,99,1,0, - 0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0, - 0,0,67,0,0,0,115,50,0,0,0,122,8,116,0,160, - 1,116,0,106,2,124,0,161,2,87,0,83,0,4,0,116, - 3,121,24,1,0,1,0,1,0,116,0,160,1,116,0,106, - 4,124,0,161,2,6,0,89,0,83,0,119,0,114,69,0, - 0,0,41,5,218,6,119,105,110,114,101,103,90,7,79,112, - 101,110,75,101,121,90,17,72,75,69,89,95,67,85,82,82, - 69,78,84,95,85,83,69,82,114,76,0,0,0,90,18,72, - 75,69,89,95,76,79,67,65,76,95,77,65,67,72,73,78, - 69,114,19,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,218,14,95,111,112,101,110,95,114,101,103, - 105,115,116,114,121,35,3,0,0,115,12,0,0,0,2,2, - 16,1,12,1,18,1,2,255,255,128,122,36,87,105,110,100, - 111,119,115,82,101,103,105,115,116,114,121,70,105,110,100,101, - 114,46,95,111,112,101,110,95,114,101,103,105,115,116,114,121, - 99,2,0,0,0,0,0,0,0,0,0,0,0,6,0,0, - 0,8,0,0,0,67,0,0,0,115,130,0,0,0,124,0, - 106,0,114,7,124,0,106,1,125,2,110,3,124,0,106,2, - 125,2,124,2,106,3,124,1,100,1,116,4,106,5,100,0, - 100,2,133,2,25,0,22,0,100,3,141,2,125,3,122,30, - 124,0,160,6,124,3,161,1,143,14,125,4,116,7,160,8, - 124,4,100,4,161,2,125,5,87,0,100,0,4,0,4,0, - 131,3,1,0,110,8,49,0,115,47,119,1,1,0,1,0, - 1,0,89,0,1,0,87,0,124,5,83,0,4,0,116,9, - 121,64,1,0,1,0,1,0,89,0,100,0,83,0,119,0, - 41,5,78,122,5,37,100,46,37,100,114,44,0,0,0,41, - 2,114,163,0,0,0,90,11,115,121,115,95,118,101,114,115, - 105,111,110,114,10,0,0,0,41,10,218,11,68,69,66,85, - 71,95,66,85,73,76,68,218,18,82,69,71,73,83,84,82, - 89,95,75,69,89,95,68,69,66,85,71,218,12,82,69,71, - 73,83,84,82,89,95,75,69,89,114,89,0,0,0,114,15, - 0,0,0,218,12,118,101,114,115,105,111,110,95,105,110,102, - 111,114,216,0,0,0,114,215,0,0,0,90,10,81,117,101, - 114,121,86,97,108,117,101,114,76,0,0,0,41,6,218,3, - 99,108,115,114,163,0,0,0,90,12,114,101,103,105,115,116, - 114,121,95,107,101,121,114,20,0,0,0,90,4,104,107,101, - 121,218,8,102,105,108,101,112,97,116,104,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,218,16,95,115,101,97, - 114,99,104,95,114,101,103,105,115,116,114,121,42,3,0,0, - 115,30,0,0,0,6,2,8,1,6,2,6,1,16,1,6, - 255,2,2,12,1,26,1,18,128,4,3,12,254,6,1,2, - 255,255,128,122,38,87,105,110,100,111,119,115,82,101,103,105, - 115,116,114,121,70,105,110,100,101,114,46,95,115,101,97,114, - 99,104,95,114,101,103,105,115,116,114,121,78,99,4,0,0, - 0,0,0,0,0,0,0,0,0,8,0,0,0,8,0,0, - 0,67,0,0,0,115,120,0,0,0,124,0,160,0,124,1, - 161,1,125,4,124,4,100,0,117,0,114,11,100,0,83,0, - 122,6,116,1,124,4,131,1,1,0,87,0,110,9,4,0, - 116,2,121,59,1,0,1,0,1,0,89,0,100,0,83,0, - 116,3,131,0,68,0,93,26,92,2,125,5,125,6,124,4, - 160,4,116,5,124,6,131,1,161,1,114,56,116,6,106,7, - 124,1,124,5,124,1,124,4,131,2,124,4,100,1,141,3, - 125,7,124,7,2,0,1,0,83,0,113,30,100,0,83,0, - 119,0,41,2,78,114,204,0,0,0,41,8,114,223,0,0, - 0,114,75,0,0,0,114,76,0,0,0,114,208,0,0,0, - 114,58,0,0,0,114,136,0,0,0,114,159,0,0,0,218, - 16,115,112,101,99,95,102,114,111,109,95,108,111,97,100,101, - 114,41,8,114,221,0,0,0,114,163,0,0,0,114,65,0, - 0,0,218,6,116,97,114,103,101,116,114,222,0,0,0,114, - 164,0,0,0,114,212,0,0,0,114,210,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,9,102, - 105,110,100,95,115,112,101,99,57,3,0,0,115,36,0,0, - 0,10,2,8,1,4,1,2,1,12,1,12,1,6,1,14, - 1,14,1,6,1,8,1,2,1,6,254,8,3,2,252,4, - 255,2,254,255,128,122,31,87,105,110,100,111,119,115,82,101, - 103,105,115,116,114,121,70,105,110,100,101,114,46,102,105,110, - 100,95,115,112,101,99,99,3,0,0,0,0,0,0,0,0, - 0,0,0,4,0,0,0,4,0,0,0,67,0,0,0,115, - 42,0,0,0,116,0,160,1,100,1,116,2,161,2,1,0, - 124,0,160,3,124,1,124,2,161,2,125,3,124,3,100,2, - 117,1,114,19,124,3,106,4,83,0,100,2,83,0,41,3, - 122,106,70,105,110,100,32,109,111,100,117,108,101,32,110,97, - 109,101,100,32,105,110,32,116,104,101,32,114,101,103,105,115, - 116,114,121,46,10,10,32,32,32,32,32,32,32,32,84,104, - 105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,112, - 114,101,99,97,116,101,100,46,32,32,85,115,101,32,102,105, + 46,60,108,111,99,97,108,115,62,46,95,119,114,97,112,114, + 69,0,0,0,41,2,218,10,95,98,111,111,116,115,116,114, + 97,112,114,158,0,0,0,41,3,114,147,0,0,0,114,148, + 0,0,0,114,158,0,0,0,114,7,0,0,0,114,146,0, + 0,0,114,8,0,0,0,218,11,95,99,104,101,99,107,95, + 110,97,109,101,19,2,0,0,115,14,0,0,0,14,8,8, + 10,8,1,8,2,10,6,4,1,255,128,114,160,0,0,0, + 99,2,0,0,0,0,0,0,0,0,0,0,0,5,0,0, + 0,6,0,0,0,67,0,0,0,115,72,0,0,0,116,0, + 160,1,100,1,116,2,161,2,1,0,124,0,160,3,124,1, + 161,1,92,2,125,2,125,3,124,2,100,2,117,0,114,34, + 116,4,124,3,131,1,114,34,100,3,125,4,116,0,160,1, + 124,4,160,5,124,3,100,4,25,0,161,1,116,6,161,2, + 1,0,124,2,83,0,41,5,122,155,84,114,121,32,116,111, + 32,102,105,110,100,32,97,32,108,111,97,100,101,114,32,102, + 111,114,32,116,104,101,32,115,112,101,99,105,102,105,101,100, + 32,109,111,100,117,108,101,32,98,121,32,100,101,108,101,103, + 97,116,105,110,103,32,116,111,10,32,32,32,32,115,101,108, + 102,46,102,105,110,100,95,108,111,97,100,101,114,40,41,46, + 10,10,32,32,32,32,84,104,105,115,32,109,101,116,104,111, + 100,32,105,115,32,100,101,112,114,101,99,97,116,101,100,32, + 105,110,32,102,97,118,111,114,32,111,102,32,102,105,110,100, + 101,114,46,102,105,110,100,95,115,112,101,99,40,41,46,10, + 10,32,32,32,32,122,90,102,105,110,100,95,109,111,100,117, + 108,101,40,41,32,105,115,32,100,101,112,114,101,99,97,116, + 101,100,32,97,110,100,32,115,108,97,116,101,100,32,102,111, + 114,32,114,101,109,111,118,97,108,32,105,110,32,80,121,116, + 104,111,110,32,51,46,49,50,59,32,117,115,101,32,102,105, 110,100,95,115,112,101,99,40,41,32,105,110,115,116,101,97, - 100,46,10,10,32,32,32,32,32,32,32,32,122,112,87,105, + 100,78,122,44,78,111,116,32,105,109,112,111,114,116,105,110, + 103,32,100,105,114,101,99,116,111,114,121,32,123,125,58,32, + 109,105,115,115,105,110,103,32,95,95,105,110,105,116,95,95, + 114,0,0,0,0,41,7,114,99,0,0,0,114,100,0,0, + 0,114,101,0,0,0,218,11,102,105,110,100,95,108,111,97, + 100,101,114,114,4,0,0,0,114,89,0,0,0,218,13,73, + 109,112,111,114,116,87,97,114,110,105,110,103,41,5,114,143, + 0,0,0,218,8,102,117,108,108,110,97,109,101,218,6,108, + 111,97,100,101,114,218,8,112,111,114,116,105,111,110,115,218, + 3,109,115,103,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,17,95,102,105,110,100,95,109,111,100,117,108, + 101,95,115,104,105,109,50,2,0,0,115,18,0,0,0,6, + 7,2,2,4,254,14,6,16,1,4,1,22,1,4,1,255, + 128,114,167,0,0,0,99,3,0,0,0,0,0,0,0,0, + 0,0,0,6,0,0,0,4,0,0,0,67,0,0,0,115, + 166,0,0,0,124,0,100,1,100,2,133,2,25,0,125,3, + 124,3,116,0,107,3,114,32,100,3,124,1,155,2,100,4, + 124,3,155,2,157,4,125,4,116,1,160,2,100,5,124,4, + 161,2,1,0,116,3,124,4,102,1,105,0,124,2,164,1, + 142,1,130,1,116,4,124,0,131,1,100,6,107,0,114,53, + 100,7,124,1,155,2,157,2,125,4,116,1,160,2,100,5, + 124,4,161,2,1,0,116,5,124,4,131,1,130,1,116,6, + 124,0,100,2,100,8,133,2,25,0,131,1,125,5,124,5, + 100,9,64,0,114,81,100,10,124,5,155,2,100,11,124,1, + 155,2,157,4,125,4,116,3,124,4,102,1,105,0,124,2, + 164,1,142,1,130,1,124,5,83,0,41,12,97,84,2,0, + 0,80,101,114,102,111,114,109,32,98,97,115,105,99,32,118, + 97,108,105,100,105,116,121,32,99,104,101,99,107,105,110,103, + 32,111,102,32,97,32,112,121,99,32,104,101,97,100,101,114, + 32,97,110,100,32,114,101,116,117,114,110,32,116,104,101,32, + 102,108,97,103,115,32,102,105,101,108,100,44,10,32,32,32, + 32,119,104,105,99,104,32,100,101,116,101,114,109,105,110,101, + 115,32,104,111,119,32,116,104,101,32,112,121,99,32,115,104, + 111,117,108,100,32,98,101,32,102,117,114,116,104,101,114,32, + 118,97,108,105,100,97,116,101,100,32,97,103,97,105,110,115, + 116,32,116,104,101,32,115,111,117,114,99,101,46,10,10,32, + 32,32,32,42,100,97,116,97,42,32,105,115,32,116,104,101, + 32,99,111,110,116,101,110,116,115,32,111,102,32,116,104,101, + 32,112,121,99,32,102,105,108,101,46,32,40,79,110,108,121, + 32,116,104,101,32,102,105,114,115,116,32,49,54,32,98,121, + 116,101,115,32,97,114,101,10,32,32,32,32,114,101,113,117, + 105,114,101,100,44,32,116,104,111,117,103,104,46,41,10,10, + 32,32,32,32,42,110,97,109,101,42,32,105,115,32,116,104, + 101,32,110,97,109,101,32,111,102,32,116,104,101,32,109,111, + 100,117,108,101,32,98,101,105,110,103,32,105,109,112,111,114, + 116,101,100,46,32,73,116,32,105,115,32,117,115,101,100,32, + 102,111,114,32,108,111,103,103,105,110,103,46,10,10,32,32, + 32,32,42,101,120,99,95,100,101,116,97,105,108,115,42,32, + 105,115,32,97,32,100,105,99,116,105,111,110,97,114,121,32, + 112,97,115,115,101,100,32,116,111,32,73,109,112,111,114,116, + 69,114,114,111,114,32,105,102,32,105,116,32,114,97,105,115, + 101,100,32,102,111,114,10,32,32,32,32,105,109,112,114,111, + 118,101,100,32,100,101,98,117,103,103,105,110,103,46,10,10, + 32,32,32,32,73,109,112,111,114,116,69,114,114,111,114,32, + 105,115,32,114,97,105,115,101,100,32,119,104,101,110,32,116, + 104,101,32,109,97,103,105,99,32,110,117,109,98,101,114,32, + 105,115,32,105,110,99,111,114,114,101,99,116,32,111,114,32, + 119,104,101,110,32,116,104,101,32,102,108,97,103,115,10,32, + 32,32,32,102,105,101,108,100,32,105,115,32,105,110,118,97, + 108,105,100,46,32,69,79,70,69,114,114,111,114,32,105,115, + 32,114,97,105,115,101,100,32,119,104,101,110,32,116,104,101, + 32,100,97,116,97,32,105,115,32,102,111,117,110,100,32,116, + 111,32,98,101,32,116,114,117,110,99,97,116,101,100,46,10, + 10,32,32,32,32,78,114,31,0,0,0,122,20,98,97,100, + 32,109,97,103,105,99,32,110,117,109,98,101,114,32,105,110, + 32,122,2,58,32,250,2,123,125,233,16,0,0,0,122,40, + 114,101,97,99,104,101,100,32,69,79,70,32,119,104,105,108, + 101,32,114,101,97,100,105,110,103,32,112,121,99,32,104,101, + 97,100,101,114,32,111,102,32,233,8,0,0,0,233,252,255, + 255,255,122,14,105,110,118,97,108,105,100,32,102,108,97,103, + 115,32,122,4,32,105,110,32,41,7,218,12,77,65,71,73, + 67,95,78,85,77,66,69,82,114,159,0,0,0,218,16,95, + 118,101,114,98,111,115,101,95,109,101,115,115,97,103,101,114, + 142,0,0,0,114,4,0,0,0,218,8,69,79,70,69,114, + 114,111,114,114,42,0,0,0,41,6,114,41,0,0,0,114, + 141,0,0,0,218,11,101,120,99,95,100,101,116,97,105,108, + 115,90,5,109,97,103,105,99,114,117,0,0,0,114,16,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,13,95,99,108,97,115,115,105,102,121,95,112,121,99, + 70,2,0,0,115,30,0,0,0,12,16,8,1,16,1,12, + 1,16,1,12,1,10,1,12,1,8,1,16,1,8,2,16, + 1,16,1,4,1,255,128,114,176,0,0,0,99,5,0,0, + 0,0,0,0,0,0,0,0,0,6,0,0,0,4,0,0, + 0,67,0,0,0,115,124,0,0,0,116,0,124,0,100,1, + 100,2,133,2,25,0,131,1,124,1,100,3,64,0,107,3, + 114,31,100,4,124,3,155,2,157,2,125,5,116,1,160,2, + 100,5,124,5,161,2,1,0,116,3,124,5,102,1,105,0, + 124,4,164,1,142,1,130,1,124,2,100,6,117,1,114,60, + 116,0,124,0,100,2,100,7,133,2,25,0,131,1,124,2, + 100,3,64,0,107,3,114,58,116,3,100,4,124,3,155,2, + 157,2,102,1,105,0,124,4,164,1,142,1,130,1,100,6, + 83,0,100,6,83,0,41,8,97,7,2,0,0,86,97,108, + 105,100,97,116,101,32,97,32,112,121,99,32,97,103,97,105, + 110,115,116,32,116,104,101,32,115,111,117,114,99,101,32,108, + 97,115,116,45,109,111,100,105,102,105,101,100,32,116,105,109, + 101,46,10,10,32,32,32,32,42,100,97,116,97,42,32,105, + 115,32,116,104,101,32,99,111,110,116,101,110,116,115,32,111, + 102,32,116,104,101,32,112,121,99,32,102,105,108,101,46,32, + 40,79,110,108,121,32,116,104,101,32,102,105,114,115,116,32, + 49,54,32,98,121,116,101,115,32,97,114,101,10,32,32,32, + 32,114,101,113,117,105,114,101,100,46,41,10,10,32,32,32, + 32,42,115,111,117,114,99,101,95,109,116,105,109,101,42,32, + 105,115,32,116,104,101,32,108,97,115,116,32,109,111,100,105, + 102,105,101,100,32,116,105,109,101,115,116,97,109,112,32,111, + 102,32,116,104,101,32,115,111,117,114,99,101,32,102,105,108, + 101,46,10,10,32,32,32,32,42,115,111,117,114,99,101,95, + 115,105,122,101,42,32,105,115,32,78,111,110,101,32,111,114, + 32,116,104,101,32,115,105,122,101,32,111,102,32,116,104,101, + 32,115,111,117,114,99,101,32,102,105,108,101,32,105,110,32, + 98,121,116,101,115,46,10,10,32,32,32,32,42,110,97,109, + 101,42,32,105,115,32,116,104,101,32,110,97,109,101,32,111, + 102,32,116,104,101,32,109,111,100,117,108,101,32,98,101,105, + 110,103,32,105,109,112,111,114,116,101,100,46,32,73,116,32, + 105,115,32,117,115,101,100,32,102,111,114,32,108,111,103,103, + 105,110,103,46,10,10,32,32,32,32,42,101,120,99,95,100, + 101,116,97,105,108,115,42,32,105,115,32,97,32,100,105,99, + 116,105,111,110,97,114,121,32,112,97,115,115,101,100,32,116, + 111,32,73,109,112,111,114,116,69,114,114,111,114,32,105,102, + 32,105,116,32,114,97,105,115,101,100,32,102,111,114,10,32, + 32,32,32,105,109,112,114,111,118,101,100,32,100,101,98,117, + 103,103,105,110,103,46,10,10,32,32,32,32,65,110,32,73, + 109,112,111,114,116,69,114,114,111,114,32,105,115,32,114,97, + 105,115,101,100,32,105,102,32,116,104,101,32,98,121,116,101, + 99,111,100,101,32,105,115,32,115,116,97,108,101,46,10,10, + 32,32,32,32,114,170,0,0,0,233,12,0,0,0,114,30, + 0,0,0,122,22,98,121,116,101,99,111,100,101,32,105,115, + 32,115,116,97,108,101,32,102,111,114,32,114,168,0,0,0, + 78,114,169,0,0,0,41,4,114,42,0,0,0,114,159,0, + 0,0,114,173,0,0,0,114,142,0,0,0,41,6,114,41, + 0,0,0,218,12,115,111,117,114,99,101,95,109,116,105,109, + 101,218,11,115,111,117,114,99,101,95,115,105,122,101,114,141, + 0,0,0,114,175,0,0,0,114,117,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,23,95,118, + 97,108,105,100,97,116,101,95,116,105,109,101,115,116,97,109, + 112,95,112,121,99,103,2,0,0,115,20,0,0,0,24,19, + 10,1,12,1,16,1,8,1,22,1,2,255,22,2,8,254, + 255,128,114,180,0,0,0,99,4,0,0,0,0,0,0,0, + 0,0,0,0,4,0,0,0,4,0,0,0,67,0,0,0, + 115,42,0,0,0,124,0,100,1,100,2,133,2,25,0,124, + 1,107,3,114,19,116,0,100,3,124,2,155,2,157,2,102, + 1,105,0,124,3,164,1,142,1,130,1,100,4,83,0,41, + 5,97,243,1,0,0,86,97,108,105,100,97,116,101,32,97, + 32,104,97,115,104,45,98,97,115,101,100,32,112,121,99,32, + 98,121,32,99,104,101,99,107,105,110,103,32,116,104,101,32, + 114,101,97,108,32,115,111,117,114,99,101,32,104,97,115,104, + 32,97,103,97,105,110,115,116,32,116,104,101,32,111,110,101, + 32,105,110,10,32,32,32,32,116,104,101,32,112,121,99,32, + 104,101,97,100,101,114,46,10,10,32,32,32,32,42,100,97, + 116,97,42,32,105,115,32,116,104,101,32,99,111,110,116,101, + 110,116,115,32,111,102,32,116,104,101,32,112,121,99,32,102, + 105,108,101,46,32,40,79,110,108,121,32,116,104,101,32,102, + 105,114,115,116,32,49,54,32,98,121,116,101,115,32,97,114, + 101,10,32,32,32,32,114,101,113,117,105,114,101,100,46,41, + 10,10,32,32,32,32,42,115,111,117,114,99,101,95,104,97, + 115,104,42,32,105,115,32,116,104,101,32,105,109,112,111,114, + 116,108,105,98,46,117,116,105,108,46,115,111,117,114,99,101, + 95,104,97,115,104,40,41,32,111,102,32,116,104,101,32,115, + 111,117,114,99,101,32,102,105,108,101,46,10,10,32,32,32, + 32,42,110,97,109,101,42,32,105,115,32,116,104,101,32,110, + 97,109,101,32,111,102,32,116,104,101,32,109,111,100,117,108, + 101,32,98,101,105,110,103,32,105,109,112,111,114,116,101,100, + 46,32,73,116,32,105,115,32,117,115,101,100,32,102,111,114, + 32,108,111,103,103,105,110,103,46,10,10,32,32,32,32,42, + 101,120,99,95,100,101,116,97,105,108,115,42,32,105,115,32, + 97,32,100,105,99,116,105,111,110,97,114,121,32,112,97,115, + 115,101,100,32,116,111,32,73,109,112,111,114,116,69,114,114, + 111,114,32,105,102,32,105,116,32,114,97,105,115,101,100,32, + 102,111,114,10,32,32,32,32,105,109,112,114,111,118,101,100, + 32,100,101,98,117,103,103,105,110,103,46,10,10,32,32,32, + 32,65,110,32,73,109,112,111,114,116,69,114,114,111,114,32, + 105,115,32,114,97,105,115,101,100,32,105,102,32,116,104,101, + 32,98,121,116,101,99,111,100,101,32,105,115,32,115,116,97, + 108,101,46,10,10,32,32,32,32,114,170,0,0,0,114,169, + 0,0,0,122,46,104,97,115,104,32,105,110,32,98,121,116, + 101,99,111,100,101,32,100,111,101,115,110,39,116,32,109,97, + 116,99,104,32,104,97,115,104,32,111,102,32,115,111,117,114, + 99,101,32,78,41,1,114,142,0,0,0,41,4,114,41,0, + 0,0,218,11,115,111,117,114,99,101,95,104,97,115,104,114, + 141,0,0,0,114,175,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,218,18,95,118,97,108,105,100, + 97,116,101,95,104,97,115,104,95,112,121,99,131,2,0,0, + 115,16,0,0,0,16,17,2,1,8,1,4,255,2,2,6, + 254,4,255,255,128,114,182,0,0,0,99,4,0,0,0,0, + 0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,67, + 0,0,0,115,76,0,0,0,116,0,160,1,124,0,161,1, + 125,4,116,2,124,4,116,3,131,2,114,28,116,4,160,5, + 100,1,124,2,161,2,1,0,124,3,100,2,117,1,114,26, + 116,6,160,7,124,4,124,3,161,2,1,0,124,4,83,0, + 116,8,100,3,160,9,124,2,161,1,124,1,124,2,100,4, + 141,3,130,1,41,5,122,35,67,111,109,112,105,108,101,32, + 98,121,116,101,99,111,100,101,32,97,115,32,102,111,117,110, + 100,32,105,110,32,97,32,112,121,99,46,122,21,99,111,100, + 101,32,111,98,106,101,99,116,32,102,114,111,109,32,123,33, + 114,125,78,122,23,78,111,110,45,99,111,100,101,32,111,98, + 106,101,99,116,32,105,110,32,123,33,114,125,169,2,114,141, + 0,0,0,114,65,0,0,0,41,10,218,7,109,97,114,115, + 104,97,108,90,5,108,111,97,100,115,218,10,105,115,105,110, + 115,116,97,110,99,101,218,10,95,99,111,100,101,95,116,121, + 112,101,114,159,0,0,0,114,173,0,0,0,218,4,95,105, + 109,112,90,16,95,102,105,120,95,99,111,95,102,105,108,101, + 110,97,109,101,114,142,0,0,0,114,89,0,0,0,41,5, + 114,41,0,0,0,114,141,0,0,0,114,132,0,0,0,114, + 134,0,0,0,218,4,99,111,100,101,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,17,95,99,111,109,112, + 105,108,101,95,98,121,116,101,99,111,100,101,155,2,0,0, + 115,20,0,0,0,10,2,10,1,12,1,8,1,12,1,4, + 1,10,2,4,1,6,255,255,128,114,189,0,0,0,99,3, + 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,5, + 0,0,0,67,0,0,0,115,70,0,0,0,116,0,116,1, + 131,1,125,3,124,3,160,2,116,3,100,1,131,1,161,1, + 1,0,124,3,160,2,116,3,124,1,131,1,161,1,1,0, + 124,3,160,2,116,3,124,2,131,1,161,1,1,0,124,3, + 160,2,116,4,160,5,124,0,161,1,161,1,1,0,124,3, + 83,0,41,3,122,43,80,114,111,100,117,99,101,32,116,104, + 101,32,100,97,116,97,32,102,111,114,32,97,32,116,105,109, + 101,115,116,97,109,112,45,98,97,115,101,100,32,112,121,99, + 46,114,0,0,0,0,78,41,6,218,9,98,121,116,101,97, + 114,114,97,121,114,172,0,0,0,218,6,101,120,116,101,110, + 100,114,36,0,0,0,114,184,0,0,0,218,5,100,117,109, + 112,115,41,4,114,188,0,0,0,218,5,109,116,105,109,101, + 114,179,0,0,0,114,41,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,22,95,99,111,100,101, + 95,116,111,95,116,105,109,101,115,116,97,109,112,95,112,121, + 99,168,2,0,0,115,14,0,0,0,8,2,14,1,14,1, + 14,1,16,1,4,1,255,128,114,194,0,0,0,84,99,3, + 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,5, + 0,0,0,67,0,0,0,115,80,0,0,0,116,0,116,1, + 131,1,125,3,100,1,124,2,100,1,62,0,66,0,125,4, + 124,3,160,2,116,3,124,4,131,1,161,1,1,0,116,4, + 124,1,131,1,100,2,107,2,115,25,74,0,130,1,124,3, + 160,2,124,1,161,1,1,0,124,3,160,2,116,5,160,6, + 124,0,161,1,161,1,1,0,124,3,83,0,41,4,122,38, + 80,114,111,100,117,99,101,32,116,104,101,32,100,97,116,97, + 32,102,111,114,32,97,32,104,97,115,104,45,98,97,115,101, + 100,32,112,121,99,46,114,3,0,0,0,114,170,0,0,0, + 78,41,7,114,190,0,0,0,114,172,0,0,0,114,191,0, + 0,0,114,36,0,0,0,114,4,0,0,0,114,184,0,0, + 0,114,192,0,0,0,41,5,114,188,0,0,0,114,181,0, + 0,0,90,7,99,104,101,99,107,101,100,114,41,0,0,0, + 114,16,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,218,17,95,99,111,100,101,95,116,111,95,104, + 97,115,104,95,112,121,99,178,2,0,0,115,16,0,0,0, + 8,2,12,1,14,1,16,1,10,1,16,1,4,1,255,128, + 114,195,0,0,0,99,1,0,0,0,0,0,0,0,0,0, + 0,0,5,0,0,0,6,0,0,0,67,0,0,0,115,62, + 0,0,0,100,1,100,2,108,0,125,1,116,1,160,2,124, + 0,161,1,106,3,125,2,124,1,160,4,124,2,161,1,125, + 3,116,1,160,5,100,2,100,3,161,2,125,4,124,4,160, + 6,124,0,160,6,124,3,100,1,25,0,161,1,161,1,83, + 0,41,4,122,121,68,101,99,111,100,101,32,98,121,116,101, + 115,32,114,101,112,114,101,115,101,110,116,105,110,103,32,115, + 111,117,114,99,101,32,99,111,100,101,32,97,110,100,32,114, + 101,116,117,114,110,32,116,104,101,32,115,116,114,105,110,103, + 46,10,10,32,32,32,32,85,110,105,118,101,114,115,97,108, + 32,110,101,119,108,105,110,101,32,115,117,112,112,111,114,116, + 32,105,115,32,117,115,101,100,32,105,110,32,116,104,101,32, + 100,101,99,111,100,105,110,103,46,10,32,32,32,32,114,0, + 0,0,0,78,84,41,7,218,8,116,111,107,101,110,105,122, + 101,114,91,0,0,0,90,7,66,121,116,101,115,73,79,90, + 8,114,101,97,100,108,105,110,101,90,15,100,101,116,101,99, + 116,95,101,110,99,111,100,105,110,103,90,25,73,110,99,114, + 101,109,101,110,116,97,108,78,101,119,108,105,110,101,68,101, + 99,111,100,101,114,218,6,100,101,99,111,100,101,41,5,218, + 12,115,111,117,114,99,101,95,98,121,116,101,115,114,196,0, + 0,0,90,21,115,111,117,114,99,101,95,98,121,116,101,115, + 95,114,101,97,100,108,105,110,101,218,8,101,110,99,111,100, + 105,110,103,90,15,110,101,119,108,105,110,101,95,100,101,99, + 111,100,101,114,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,13,100,101,99,111,100,101,95,115,111,117,114, + 99,101,189,2,0,0,115,12,0,0,0,8,5,12,1,10, + 1,12,1,20,1,255,128,114,200,0,0,0,169,2,114,164, + 0,0,0,218,26,115,117,98,109,111,100,117,108,101,95,115, + 101,97,114,99,104,95,108,111,99,97,116,105,111,110,115,99, + 2,0,0,0,0,0,0,0,2,0,0,0,9,0,0,0, + 8,0,0,0,67,0,0,0,115,52,1,0,0,124,1,100, + 1,117,0,114,28,100,2,125,1,116,0,124,2,100,3,131, + 2,114,27,122,7,124,2,160,1,124,0,161,1,125,1,87, + 0,110,35,4,0,116,2,121,153,1,0,1,0,1,0,89, + 0,110,27,110,26,116,3,160,4,124,1,161,1,125,1,116, + 5,124,1,131,1,115,54,122,9,116,6,116,3,160,7,161, + 0,124,1,131,2,125,1,87,0,110,7,4,0,116,8,121, + 152,1,0,1,0,1,0,89,0,116,9,106,10,124,0,124, + 2,124,1,100,4,141,3,125,4,100,5,124,4,95,11,124, + 2,100,1,117,0,114,96,116,12,131,0,68,0,93,21,92, + 2,125,5,125,6,124,1,160,13,116,14,124,6,131,1,161, + 1,114,93,124,5,124,0,124,1,131,2,125,2,124,2,124, + 4,95,15,1,0,113,96,113,72,100,1,83,0,124,3,116, + 16,117,0,114,127,116,0,124,2,100,6,131,2,114,126,122, + 7,124,2,160,17,124,0,161,1,125,7,87,0,110,8,4, + 0,116,2,121,151,1,0,1,0,1,0,89,0,110,9,124, + 7,114,126,103,0,124,4,95,18,110,3,124,3,124,4,95, + 18,124,4,106,18,103,0,107,2,114,149,124,1,114,149,116, + 19,124,1,131,1,100,7,25,0,125,8,124,4,106,18,160, + 20,124,8,161,1,1,0,124,4,83,0,119,0,119,0,119, + 0,41,8,97,61,1,0,0,82,101,116,117,114,110,32,97, + 32,109,111,100,117,108,101,32,115,112,101,99,32,98,97,115, + 101,100,32,111,110,32,97,32,102,105,108,101,32,108,111,99, + 97,116,105,111,110,46,10,10,32,32,32,32,84,111,32,105, + 110,100,105,99,97,116,101,32,116,104,97,116,32,116,104,101, + 32,109,111,100,117,108,101,32,105,115,32,97,32,112,97,99, + 107,97,103,101,44,32,115,101,116,10,32,32,32,32,115,117, + 98,109,111,100,117,108,101,95,115,101,97,114,99,104,95,108, + 111,99,97,116,105,111,110,115,32,116,111,32,97,32,108,105, + 115,116,32,111,102,32,100,105,114,101,99,116,111,114,121,32, + 112,97,116,104,115,46,32,32,65,110,10,32,32,32,32,101, + 109,112,116,121,32,108,105,115,116,32,105,115,32,115,117,102, + 102,105,99,105,101,110,116,44,32,116,104,111,117,103,104,32, + 105,116,115,32,110,111,116,32,111,116,104,101,114,119,105,115, + 101,32,117,115,101,102,117,108,32,116,111,32,116,104,101,10, + 32,32,32,32,105,109,112,111,114,116,32,115,121,115,116,101, + 109,46,10,10,32,32,32,32,84,104,101,32,108,111,97,100, + 101,114,32,109,117,115,116,32,116,97,107,101,32,97,32,115, + 112,101,99,32,97,115,32,105,116,115,32,111,110,108,121,32, + 95,95,105,110,105,116,95,95,40,41,32,97,114,103,46,10, + 10,32,32,32,32,78,122,9,60,117,110,107,110,111,119,110, + 62,218,12,103,101,116,95,102,105,108,101,110,97,109,101,169, + 1,218,6,111,114,105,103,105,110,84,218,10,105,115,95,112, + 97,99,107,97,103,101,114,0,0,0,0,41,21,114,153,0, + 0,0,114,203,0,0,0,114,142,0,0,0,114,18,0,0, + 0,114,103,0,0,0,114,86,0,0,0,114,67,0,0,0, + 114,82,0,0,0,114,76,0,0,0,114,159,0,0,0,218, + 10,77,111,100,117,108,101,83,112,101,99,90,13,95,115,101, + 116,95,102,105,108,101,97,116,116,114,218,27,95,103,101,116, + 95,115,117,112,112,111,114,116,101,100,95,102,105,108,101,95, + 108,111,97,100,101,114,115,114,58,0,0,0,114,136,0,0, + 0,114,164,0,0,0,218,9,95,80,79,80,85,76,65,84, + 69,114,206,0,0,0,114,202,0,0,0,114,74,0,0,0, + 114,61,0,0,0,41,9,114,141,0,0,0,90,8,108,111, + 99,97,116,105,111,110,114,164,0,0,0,114,202,0,0,0, + 218,4,115,112,101,99,218,12,108,111,97,100,101,114,95,99, + 108,97,115,115,218,8,115,117,102,102,105,120,101,115,114,206, + 0,0,0,90,7,100,105,114,110,97,109,101,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,23,115,112,101, + 99,95,102,114,111,109,95,102,105,108,101,95,108,111,99,97, + 116,105,111,110,206,2,0,0,115,86,0,0,0,8,12,4, + 4,10,1,2,2,14,1,12,1,4,1,2,251,10,7,8, + 1,2,1,18,1,12,1,2,1,16,8,6,1,8,3,14, + 1,14,1,10,1,6,1,4,1,2,253,4,5,8,3,10, + 2,2,1,14,1,12,1,4,1,4,2,6,1,2,128,6, + 2,10,1,4,1,12,1,12,1,4,2,2,244,2,228,2, + 249,255,128,114,213,0,0,0,99,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,4,0,0,0,64,0,0, + 0,115,88,0,0,0,101,0,90,1,100,0,90,2,100,1, + 90,3,100,2,90,4,100,3,90,5,101,6,111,15,100,4, + 101,7,118,0,90,8,101,9,100,5,100,6,132,0,131,1, + 90,10,101,11,100,7,100,8,132,0,131,1,90,12,101,11, + 100,14,100,10,100,11,132,1,131,1,90,13,101,11,100,15, + 100,12,100,13,132,1,131,1,90,14,100,9,83,0,41,16, + 218,21,87,105,110,100,111,119,115,82,101,103,105,115,116,114, + 121,70,105,110,100,101,114,122,62,77,101,116,97,32,112,97, + 116,104,32,102,105,110,100,101,114,32,102,111,114,32,109,111, + 100,117,108,101,115,32,100,101,99,108,97,114,101,100,32,105, + 110,32,116,104,101,32,87,105,110,100,111,119,115,32,114,101, + 103,105,115,116,114,121,46,122,59,83,111,102,116,119,97,114, + 101,92,80,121,116,104,111,110,92,80,121,116,104,111,110,67, + 111,114,101,92,123,115,121,115,95,118,101,114,115,105,111,110, + 125,92,77,111,100,117,108,101,115,92,123,102,117,108,108,110, + 97,109,101,125,122,65,83,111,102,116,119,97,114,101,92,80, + 121,116,104,111,110,92,80,121,116,104,111,110,67,111,114,101, + 92,123,115,121,115,95,118,101,114,115,105,111,110,125,92,77, + 111,100,117,108,101,115,92,123,102,117,108,108,110,97,109,101, + 125,92,68,101,98,117,103,122,6,95,100,46,112,121,100,99, + 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, + 8,0,0,0,67,0,0,0,115,50,0,0,0,122,8,116, + 0,160,1,116,0,106,2,124,0,161,2,87,0,83,0,4, + 0,116,3,121,24,1,0,1,0,1,0,116,0,160,1,116, + 0,106,4,124,0,161,2,6,0,89,0,83,0,119,0,114, + 69,0,0,0,41,5,218,6,119,105,110,114,101,103,90,7, + 79,112,101,110,75,101,121,90,17,72,75,69,89,95,67,85, + 82,82,69,78,84,95,85,83,69,82,114,76,0,0,0,90, + 18,72,75,69,89,95,76,79,67,65,76,95,77,65,67,72, + 73,78,69,114,19,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,218,14,95,111,112,101,110,95,114, + 101,103,105,115,116,114,121,35,3,0,0,115,12,0,0,0, + 2,2,16,1,12,1,18,1,2,255,255,128,122,36,87,105, 110,100,111,119,115,82,101,103,105,115,116,114,121,70,105,110, - 100,101,114,46,102,105,110,100,95,109,111,100,117,108,101,40, - 41,32,105,115,32,100,101,112,114,101,99,97,116,101,100,32, - 97,110,100,32,115,108,97,116,101,100,32,102,111,114,32,114, - 101,109,111,118,97,108,32,105,110,32,80,121,116,104,111,110, - 32,51,46,49,50,59,32,117,115,101,32,102,105,110,100,95, - 115,112,101,99,40,41,32,105,110,115,116,101,97,100,78,169, - 5,114,99,0,0,0,114,100,0,0,0,114,101,0,0,0, - 114,226,0,0,0,114,164,0,0,0,169,4,114,221,0,0, - 0,114,163,0,0,0,114,65,0,0,0,114,210,0,0,0, + 100,101,114,46,95,111,112,101,110,95,114,101,103,105,115,116, + 114,121,99,2,0,0,0,0,0,0,0,0,0,0,0,6, + 0,0,0,8,0,0,0,67,0,0,0,115,130,0,0,0, + 124,0,106,0,114,7,124,0,106,1,125,2,110,3,124,0, + 106,2,125,2,124,2,106,3,124,1,100,1,116,4,106,5, + 100,0,100,2,133,2,25,0,22,0,100,3,141,2,125,3, + 122,30,124,0,160,6,124,3,161,1,143,14,125,4,116,7, + 160,8,124,4,100,4,161,2,125,5,87,0,100,0,4,0, + 4,0,131,3,1,0,110,8,49,0,115,47,119,1,1,0, + 1,0,1,0,89,0,1,0,87,0,124,5,83,0,4,0, + 116,9,121,64,1,0,1,0,1,0,89,0,100,0,83,0, + 119,0,41,5,78,122,5,37,100,46,37,100,114,44,0,0, + 0,41,2,114,163,0,0,0,90,11,115,121,115,95,118,101, + 114,115,105,111,110,114,10,0,0,0,41,10,218,11,68,69, + 66,85,71,95,66,85,73,76,68,218,18,82,69,71,73,83, + 84,82,89,95,75,69,89,95,68,69,66,85,71,218,12,82, + 69,71,73,83,84,82,89,95,75,69,89,114,89,0,0,0, + 114,15,0,0,0,218,12,118,101,114,115,105,111,110,95,105, + 110,102,111,114,216,0,0,0,114,215,0,0,0,90,10,81, + 117,101,114,121,86,97,108,117,101,114,76,0,0,0,41,6, + 218,3,99,108,115,114,163,0,0,0,90,12,114,101,103,105, + 115,116,114,121,95,107,101,121,114,20,0,0,0,90,4,104, + 107,101,121,218,8,102,105,108,101,112,97,116,104,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,16,95,115, + 101,97,114,99,104,95,114,101,103,105,115,116,114,121,42,3, + 0,0,115,30,0,0,0,6,2,8,1,6,2,6,1,16, + 1,6,255,2,2,12,1,26,1,18,128,4,3,12,254,6, + 1,2,255,255,128,122,38,87,105,110,100,111,119,115,82,101, + 103,105,115,116,114,121,70,105,110,100,101,114,46,95,115,101, + 97,114,99,104,95,114,101,103,105,115,116,114,121,78,99,4, + 0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,8, + 0,0,0,67,0,0,0,115,120,0,0,0,124,0,160,0, + 124,1,161,1,125,4,124,4,100,0,117,0,114,11,100,0, + 83,0,122,6,116,1,124,4,131,1,1,0,87,0,110,9, + 4,0,116,2,121,59,1,0,1,0,1,0,89,0,100,0, + 83,0,116,3,131,0,68,0,93,26,92,2,125,5,125,6, + 124,4,160,4,116,5,124,6,131,1,161,1,114,56,116,6, + 106,7,124,1,124,5,124,1,124,4,131,2,124,4,100,1, + 141,3,125,7,124,7,2,0,1,0,83,0,113,30,100,0, + 83,0,119,0,41,2,78,114,204,0,0,0,41,8,114,223, + 0,0,0,114,75,0,0,0,114,76,0,0,0,114,208,0, + 0,0,114,58,0,0,0,114,136,0,0,0,114,159,0,0, + 0,218,16,115,112,101,99,95,102,114,111,109,95,108,111,97, + 100,101,114,41,8,114,221,0,0,0,114,163,0,0,0,114, + 65,0,0,0,218,6,116,97,114,103,101,116,114,222,0,0, + 0,114,164,0,0,0,114,212,0,0,0,114,210,0,0,0, 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 11,102,105,110,100,95,109,111,100,117,108,101,73,3,0,0, - 115,16,0,0,0,6,7,2,2,4,254,12,3,8,1,6, - 1,4,2,255,128,122,33,87,105,110,100,111,119,115,82,101, - 103,105,115,116,114,121,70,105,110,100,101,114,46,102,105,110, - 100,95,109,111,100,117,108,101,41,2,78,78,41,1,78,41, - 15,114,150,0,0,0,114,149,0,0,0,114,151,0,0,0, - 114,152,0,0,0,114,219,0,0,0,114,218,0,0,0,218, - 11,95,77,83,95,87,73,78,68,79,87,83,218,18,69,88, - 84,69,78,83,73,79,78,95,83,85,70,70,73,88,69,83, - 114,217,0,0,0,218,12,115,116,97,116,105,99,109,101,116, - 104,111,100,114,216,0,0,0,218,11,99,108,97,115,115,109, - 101,116,104,111,100,114,223,0,0,0,114,226,0,0,0,114, - 229,0,0,0,114,7,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,214,0,0,0,23,3,0, - 0,115,32,0,0,0,8,0,4,2,2,3,2,255,2,4, - 2,255,12,3,2,2,10,1,2,6,10,1,2,14,12,1, - 2,15,16,1,255,128,114,214,0,0,0,99,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 64,0,0,0,115,48,0,0,0,101,0,90,1,100,0,90, - 2,100,1,90,3,100,2,100,3,132,0,90,4,100,4,100, - 5,132,0,90,5,100,6,100,7,132,0,90,6,100,8,100, - 9,132,0,90,7,100,10,83,0,41,11,218,13,95,76,111, - 97,100,101,114,66,97,115,105,99,115,122,83,66,97,115,101, - 32,99,108,97,115,115,32,111,102,32,99,111,109,109,111,110, - 32,99,111,100,101,32,110,101,101,100,101,100,32,98,121,32, - 98,111,116,104,32,83,111,117,114,99,101,76,111,97,100,101, - 114,32,97,110,100,10,32,32,32,32,83,111,117,114,99,101, - 108,101,115,115,70,105,108,101,76,111,97,100,101,114,46,99, - 2,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0, - 4,0,0,0,67,0,0,0,115,64,0,0,0,116,0,124, - 0,160,1,124,1,161,1,131,1,100,1,25,0,125,2,124, - 2,160,2,100,2,100,1,161,2,100,3,25,0,125,3,124, - 1,160,3,100,2,161,1,100,4,25,0,125,4,124,3,100, - 5,107,2,111,31,124,4,100,5,107,3,83,0,41,7,122, - 141,67,111,110,99,114,101,116,101,32,105,109,112,108,101,109, - 101,110,116,97,116,105,111,110,32,111,102,32,73,110,115,112, - 101,99,116,76,111,97,100,101,114,46,105,115,95,112,97,99, - 107,97,103,101,32,98,121,32,99,104,101,99,107,105,110,103, - 32,105,102,10,32,32,32,32,32,32,32,32,116,104,101,32, - 112,97,116,104,32,114,101,116,117,114,110,101,100,32,98,121, - 32,103,101,116,95,102,105,108,101,110,97,109,101,32,104,97, - 115,32,97,32,102,105,108,101,110,97,109,101,32,111,102,32, - 39,95,95,105,110,105,116,95,95,46,112,121,39,46,114,3, - 0,0,0,114,97,0,0,0,114,0,0,0,0,114,44,0, - 0,0,218,8,95,95,105,110,105,116,95,95,78,41,4,114, - 74,0,0,0,114,203,0,0,0,114,125,0,0,0,114,104, - 0,0,0,41,5,114,143,0,0,0,114,163,0,0,0,114, - 120,0,0,0,90,13,102,105,108,101,110,97,109,101,95,98, - 97,115,101,90,9,116,97,105,108,95,110,97,109,101,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,206,0, - 0,0,95,3,0,0,115,10,0,0,0,18,3,16,1,14, - 1,16,1,255,128,122,24,95,76,111,97,100,101,114,66,97, - 115,105,99,115,46,105,115,95,112,97,99,107,97,103,101,99, - 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 1,0,0,0,67,0,0,0,114,23,0,0,0,169,2,122, - 42,85,115,101,32,100,101,102,97,117,108,116,32,115,101,109, - 97,110,116,105,99,115,32,102,111,114,32,109,111,100,117,108, - 101,32,99,114,101,97,116,105,111,110,46,78,114,7,0,0, - 0,169,2,114,143,0,0,0,114,210,0,0,0,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,218,13,99,114, - 101,97,116,101,95,109,111,100,117,108,101,103,3,0,0,243, - 4,0,0,0,4,0,255,128,122,27,95,76,111,97,100,101, - 114,66,97,115,105,99,115,46,99,114,101,97,116,101,95,109, + 9,102,105,110,100,95,115,112,101,99,57,3,0,0,115,36, + 0,0,0,10,2,8,1,4,1,2,1,12,1,12,1,6, + 1,14,1,14,1,6,1,8,1,2,1,6,254,8,3,2, + 252,4,255,2,254,255,128,122,31,87,105,110,100,111,119,115, + 82,101,103,105,115,116,114,121,70,105,110,100,101,114,46,102, + 105,110,100,95,115,112,101,99,99,3,0,0,0,0,0,0, + 0,0,0,0,0,4,0,0,0,4,0,0,0,67,0,0, + 0,115,42,0,0,0,116,0,160,1,100,1,116,2,161,2, + 1,0,124,0,160,3,124,1,124,2,161,2,125,3,124,3, + 100,2,117,1,114,19,124,3,106,4,83,0,100,2,83,0, + 41,3,122,106,70,105,110,100,32,109,111,100,117,108,101,32, + 110,97,109,101,100,32,105,110,32,116,104,101,32,114,101,103, + 105,115,116,114,121,46,10,10,32,32,32,32,32,32,32,32, + 84,104,105,115,32,109,101,116,104,111,100,32,105,115,32,100, + 101,112,114,101,99,97,116,101,100,46,32,32,85,115,101,32, + 102,105,110,100,95,115,112,101,99,40,41,32,105,110,115,116, + 101,97,100,46,10,10,32,32,32,32,32,32,32,32,122,112, + 87,105,110,100,111,119,115,82,101,103,105,115,116,114,121,70, + 105,110,100,101,114,46,102,105,110,100,95,109,111,100,117,108, + 101,40,41,32,105,115,32,100,101,112,114,101,99,97,116,101, + 100,32,97,110,100,32,115,108,97,116,101,100,32,102,111,114, + 32,114,101,109,111,118,97,108,32,105,110,32,80,121,116,104, + 111,110,32,51,46,49,50,59,32,117,115,101,32,102,105,110, + 100,95,115,112,101,99,40,41,32,105,110,115,116,101,97,100, + 78,169,5,114,99,0,0,0,114,100,0,0,0,114,101,0, + 0,0,114,226,0,0,0,114,164,0,0,0,169,4,114,221, + 0,0,0,114,163,0,0,0,114,65,0,0,0,114,210,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,11,102,105,110,100,95,109,111,100,117,108,101,73,3, + 0,0,115,16,0,0,0,6,7,2,2,4,254,12,3,8, + 1,6,1,4,2,255,128,122,33,87,105,110,100,111,119,115, + 82,101,103,105,115,116,114,121,70,105,110,100,101,114,46,102, + 105,110,100,95,109,111,100,117,108,101,169,2,78,78,114,69, + 0,0,0,41,15,114,150,0,0,0,114,149,0,0,0,114, + 151,0,0,0,114,152,0,0,0,114,219,0,0,0,114,218, + 0,0,0,218,11,95,77,83,95,87,73,78,68,79,87,83, + 218,18,69,88,84,69,78,83,73,79,78,95,83,85,70,70, + 73,88,69,83,114,217,0,0,0,218,12,115,116,97,116,105, + 99,109,101,116,104,111,100,114,216,0,0,0,218,11,99,108, + 97,115,115,109,101,116,104,111,100,114,223,0,0,0,114,226, + 0,0,0,114,229,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,114,214,0,0, + 0,23,3,0,0,115,32,0,0,0,8,0,4,2,2,3, + 2,255,2,4,2,255,12,3,2,2,10,1,2,6,10,1, + 2,14,12,1,2,15,16,1,255,128,114,214,0,0,0,99, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 2,0,0,0,64,0,0,0,115,48,0,0,0,101,0,90, + 1,100,0,90,2,100,1,90,3,100,2,100,3,132,0,90, + 4,100,4,100,5,132,0,90,5,100,6,100,7,132,0,90, + 6,100,8,100,9,132,0,90,7,100,10,83,0,41,11,218, + 13,95,76,111,97,100,101,114,66,97,115,105,99,115,122,83, + 66,97,115,101,32,99,108,97,115,115,32,111,102,32,99,111, + 109,109,111,110,32,99,111,100,101,32,110,101,101,100,101,100, + 32,98,121,32,98,111,116,104,32,83,111,117,114,99,101,76, + 111,97,100,101,114,32,97,110,100,10,32,32,32,32,83,111, + 117,114,99,101,108,101,115,115,70,105,108,101,76,111,97,100, + 101,114,46,99,2,0,0,0,0,0,0,0,0,0,0,0, + 5,0,0,0,4,0,0,0,67,0,0,0,115,64,0,0, + 0,116,0,124,0,160,1,124,1,161,1,131,1,100,1,25, + 0,125,2,124,2,160,2,100,2,100,1,161,2,100,3,25, + 0,125,3,124,1,160,3,100,2,161,1,100,4,25,0,125, + 4,124,3,100,5,107,2,111,31,124,4,100,5,107,3,83, + 0,41,7,122,141,67,111,110,99,114,101,116,101,32,105,109, + 112,108,101,109,101,110,116,97,116,105,111,110,32,111,102,32, + 73,110,115,112,101,99,116,76,111,97,100,101,114,46,105,115, + 95,112,97,99,107,97,103,101,32,98,121,32,99,104,101,99, + 107,105,110,103,32,105,102,10,32,32,32,32,32,32,32,32, + 116,104,101,32,112,97,116,104,32,114,101,116,117,114,110,101, + 100,32,98,121,32,103,101,116,95,102,105,108,101,110,97,109, + 101,32,104,97,115,32,97,32,102,105,108,101,110,97,109,101, + 32,111,102,32,39,95,95,105,110,105,116,95,95,46,112,121, + 39,46,114,3,0,0,0,114,97,0,0,0,114,0,0,0, + 0,114,44,0,0,0,218,8,95,95,105,110,105,116,95,95, + 78,41,4,114,74,0,0,0,114,203,0,0,0,114,125,0, + 0,0,114,104,0,0,0,41,5,114,143,0,0,0,114,163, + 0,0,0,114,120,0,0,0,90,13,102,105,108,101,110,97, + 109,101,95,98,97,115,101,90,9,116,97,105,108,95,110,97, + 109,101,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,206,0,0,0,95,3,0,0,115,10,0,0,0,18, + 3,16,1,14,1,16,1,255,128,122,24,95,76,111,97,100, + 101,114,66,97,115,105,99,115,46,105,115,95,112,97,99,107, + 97,103,101,99,2,0,0,0,0,0,0,0,0,0,0,0, + 2,0,0,0,1,0,0,0,67,0,0,0,114,23,0,0, + 0,169,2,122,42,85,115,101,32,100,101,102,97,117,108,116, + 32,115,101,109,97,110,116,105,99,115,32,102,111,114,32,109, + 111,100,117,108,101,32,99,114,101,97,116,105,111,110,46,78, + 114,7,0,0,0,169,2,114,143,0,0,0,114,210,0,0, + 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 218,13,99,114,101,97,116,101,95,109,111,100,117,108,101,103, + 3,0,0,243,4,0,0,0,4,0,255,128,122,27,95,76, + 111,97,100,101,114,66,97,115,105,99,115,46,99,114,101,97, + 116,101,95,109,111,100,117,108,101,99,2,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,5,0,0,0,67,0, + 0,0,115,56,0,0,0,124,0,160,0,124,1,106,1,161, + 1,125,2,124,2,100,1,117,0,114,18,116,2,100,2,160, + 3,124,1,106,1,161,1,131,1,130,1,116,4,160,5,116, + 6,124,2,124,1,106,7,161,3,1,0,100,1,83,0,41, + 3,122,19,69,120,101,99,117,116,101,32,116,104,101,32,109, + 111,100,117,108,101,46,78,122,52,99,97,110,110,111,116,32, + 108,111,97,100,32,109,111,100,117,108,101,32,123,33,114,125, + 32,119,104,101,110,32,103,101,116,95,99,111,100,101,40,41, + 32,114,101,116,117,114,110,115,32,78,111,110,101,41,8,218, + 8,103,101,116,95,99,111,100,101,114,150,0,0,0,114,142, + 0,0,0,114,89,0,0,0,114,159,0,0,0,218,25,95, + 99,97,108,108,95,119,105,116,104,95,102,114,97,109,101,115, + 95,114,101,109,111,118,101,100,218,4,101,120,101,99,114,156, + 0,0,0,41,3,114,143,0,0,0,218,6,109,111,100,117, + 108,101,114,188,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,11,101,120,101,99,95,109,111,100, + 117,108,101,106,3,0,0,115,14,0,0,0,12,2,8,1, + 4,1,8,1,4,255,20,2,255,128,122,25,95,76,111,97, + 100,101,114,66,97,115,105,99,115,46,101,120,101,99,95,109, 111,100,117,108,101,99,2,0,0,0,0,0,0,0,0,0, - 0,0,3,0,0,0,5,0,0,0,67,0,0,0,115,56, - 0,0,0,124,0,160,0,124,1,106,1,161,1,125,2,124, - 2,100,1,117,0,114,18,116,2,100,2,160,3,124,1,106, - 1,161,1,131,1,130,1,116,4,160,5,116,6,124,2,124, - 1,106,7,161,3,1,0,100,1,83,0,41,3,122,19,69, - 120,101,99,117,116,101,32,116,104,101,32,109,111,100,117,108, - 101,46,78,122,52,99,97,110,110,111,116,32,108,111,97,100, - 32,109,111,100,117,108,101,32,123,33,114,125,32,119,104,101, - 110,32,103,101,116,95,99,111,100,101,40,41,32,114,101,116, - 117,114,110,115,32,78,111,110,101,41,8,218,8,103,101,116, - 95,99,111,100,101,114,150,0,0,0,114,142,0,0,0,114, - 89,0,0,0,114,159,0,0,0,218,25,95,99,97,108,108, - 95,119,105,116,104,95,102,114,97,109,101,115,95,114,101,109, - 111,118,101,100,218,4,101,120,101,99,114,156,0,0,0,41, - 3,114,143,0,0,0,218,6,109,111,100,117,108,101,114,188, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,11,101,120,101,99,95,109,111,100,117,108,101,106, - 3,0,0,115,14,0,0,0,12,2,8,1,4,1,8,1, - 4,255,20,2,255,128,122,25,95,76,111,97,100,101,114,66, - 97,115,105,99,115,46,101,120,101,99,95,109,111,100,117,108, - 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,4,0,0,0,67,0,0,0,115,12,0,0,0,116, - 0,160,1,124,0,124,1,161,2,83,0,41,2,122,26,84, - 104,105,115,32,109,101,116,104,111,100,32,105,115,32,100,101, - 112,114,101,99,97,116,101,100,46,78,41,2,114,159,0,0, - 0,218,17,95,108,111,97,100,95,109,111,100,117,108,101,95, - 115,104,105,109,169,2,114,143,0,0,0,114,163,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 11,108,111,97,100,95,109,111,100,117,108,101,114,3,0,0, - 115,4,0,0,0,12,3,255,128,122,25,95,76,111,97,100, - 101,114,66,97,115,105,99,115,46,108,111,97,100,95,109,111, - 100,117,108,101,78,41,8,114,150,0,0,0,114,149,0,0, - 0,114,151,0,0,0,114,152,0,0,0,114,206,0,0,0, - 114,238,0,0,0,114,244,0,0,0,114,247,0,0,0,114, - 7,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,234,0,0,0,90,3,0,0,115,14,0,0, - 0,8,0,4,2,8,3,8,8,8,3,12,8,255,128,114, - 234,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,3,0,0,0,64,0,0,0,115,74,0, - 0,0,101,0,90,1,100,0,90,2,100,1,100,2,132,0, - 90,3,100,3,100,4,132,0,90,4,100,5,100,6,132,0, - 90,5,100,7,100,8,132,0,90,6,100,9,100,10,132,0, - 90,7,100,11,100,12,156,1,100,13,100,14,132,2,90,8, - 100,15,100,16,132,0,90,9,100,17,83,0,41,18,218,12, - 83,111,117,114,99,101,76,111,97,100,101,114,99,2,0,0, - 0,0,0,0,0,0,0,0,0,2,0,0,0,1,0,0, - 0,67,0,0,0,115,4,0,0,0,116,0,130,1,41,2, - 122,165,79,112,116,105,111,110,97,108,32,109,101,116,104,111, - 100,32,116,104,97,116,32,114,101,116,117,114,110,115,32,116, - 104,101,32,109,111,100,105,102,105,99,97,116,105,111,110,32, - 116,105,109,101,32,40,97,110,32,105,110,116,41,32,102,111, - 114,32,116,104,101,10,32,32,32,32,32,32,32,32,115,112, - 101,99,105,102,105,101,100,32,112,97,116,104,32,40,97,32, - 115,116,114,41,46,10,10,32,32,32,32,32,32,32,32,82, - 97,105,115,101,115,32,79,83,69,114,114,111,114,32,119,104, - 101,110,32,116,104,101,32,112,97,116,104,32,99,97,110,110, - 111,116,32,98,101,32,104,97,110,100,108,101,100,46,10,32, - 32,32,32,32,32,32,32,78,41,1,114,76,0,0,0,169, - 2,114,143,0,0,0,114,65,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,218,10,112,97,116,104, - 95,109,116,105,109,101,122,3,0,0,115,4,0,0,0,4, - 6,255,128,122,23,83,111,117,114,99,101,76,111,97,100,101, - 114,46,112,97,116,104,95,109,116,105,109,101,99,2,0,0, - 0,0,0,0,0,0,0,0,0,2,0,0,0,4,0,0, - 0,67,0,0,0,115,14,0,0,0,100,1,124,0,160,0, - 124,1,161,1,105,1,83,0,41,3,97,158,1,0,0,79, - 112,116,105,111,110,97,108,32,109,101,116,104,111,100,32,114, - 101,116,117,114,110,105,110,103,32,97,32,109,101,116,97,100, - 97,116,97,32,100,105,99,116,32,102,111,114,32,116,104,101, - 32,115,112,101,99,105,102,105,101,100,10,32,32,32,32,32, - 32,32,32,112,97,116,104,32,40,97,32,115,116,114,41,46, - 10,10,32,32,32,32,32,32,32,32,80,111,115,115,105,98, - 108,101,32,107,101,121,115,58,10,32,32,32,32,32,32,32, - 32,45,32,39,109,116,105,109,101,39,32,40,109,97,110,100, - 97,116,111,114,121,41,32,105,115,32,116,104,101,32,110,117, - 109,101,114,105,99,32,116,105,109,101,115,116,97,109,112,32, - 111,102,32,108,97,115,116,32,115,111,117,114,99,101,10,32, - 32,32,32,32,32,32,32,32,32,99,111,100,101,32,109,111, - 100,105,102,105,99,97,116,105,111,110,59,10,32,32,32,32, - 32,32,32,32,45,32,39,115,105,122,101,39,32,40,111,112, - 116,105,111,110,97,108,41,32,105,115,32,116,104,101,32,115, - 105,122,101,32,105,110,32,98,121,116,101,115,32,111,102,32, - 116,104,101,32,115,111,117,114,99,101,32,99,111,100,101,46, - 10,10,32,32,32,32,32,32,32,32,73,109,112,108,101,109, - 101,110,116,105,110,103,32,116,104,105,115,32,109,101,116,104, - 111,100,32,97,108,108,111,119,115,32,116,104,101,32,108,111, - 97,100,101,114,32,116,111,32,114,101,97,100,32,98,121,116, - 101,99,111,100,101,32,102,105,108,101,115,46,10,32,32,32, - 32,32,32,32,32,82,97,105,115,101,115,32,79,83,69,114, - 114,111,114,32,119,104,101,110,32,116,104,101,32,112,97,116, - 104,32,99,97,110,110,111,116,32,98,101,32,104,97,110,100, - 108,101,100,46,10,32,32,32,32,32,32,32,32,114,193,0, - 0,0,78,41,1,114,250,0,0,0,114,249,0,0,0,114, + 0,0,2,0,0,0,4,0,0,0,67,0,0,0,115,12, + 0,0,0,116,0,160,1,124,0,124,1,161,2,83,0,41, + 2,122,26,84,104,105,115,32,109,101,116,104,111,100,32,105, + 115,32,100,101,112,114,101,99,97,116,101,100,46,78,41,2, + 114,159,0,0,0,218,17,95,108,111,97,100,95,109,111,100, + 117,108,101,95,115,104,105,109,169,2,114,143,0,0,0,114, + 163,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,11,108,111,97,100,95,109,111,100,117,108,101, + 114,3,0,0,115,4,0,0,0,12,3,255,128,122,25,95, + 76,111,97,100,101,114,66,97,115,105,99,115,46,108,111,97, + 100,95,109,111,100,117,108,101,78,41,8,114,150,0,0,0, + 114,149,0,0,0,114,151,0,0,0,114,152,0,0,0,114, + 206,0,0,0,114,239,0,0,0,114,245,0,0,0,114,248, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,235,0,0,0,90,3,0,0, + 115,14,0,0,0,8,0,4,2,8,3,8,8,8,3,12, + 8,255,128,114,235,0,0,0,99,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,64,0,0, + 0,115,74,0,0,0,101,0,90,1,100,0,90,2,100,1, + 100,2,132,0,90,3,100,3,100,4,132,0,90,4,100,5, + 100,6,132,0,90,5,100,7,100,8,132,0,90,6,100,9, + 100,10,132,0,90,7,100,11,100,12,156,1,100,13,100,14, + 132,2,90,8,100,15,100,16,132,0,90,9,100,17,83,0, + 41,18,218,12,83,111,117,114,99,101,76,111,97,100,101,114, + 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, + 0,1,0,0,0,67,0,0,0,115,4,0,0,0,116,0, + 130,1,41,2,122,165,79,112,116,105,111,110,97,108,32,109, + 101,116,104,111,100,32,116,104,97,116,32,114,101,116,117,114, + 110,115,32,116,104,101,32,109,111,100,105,102,105,99,97,116, + 105,111,110,32,116,105,109,101,32,40,97,110,32,105,110,116, + 41,32,102,111,114,32,116,104,101,10,32,32,32,32,32,32, + 32,32,115,112,101,99,105,102,105,101,100,32,112,97,116,104, + 32,40,97,32,115,116,114,41,46,10,10,32,32,32,32,32, + 32,32,32,82,97,105,115,101,115,32,79,83,69,114,114,111, + 114,32,119,104,101,110,32,116,104,101,32,112,97,116,104,32, + 99,97,110,110,111,116,32,98,101,32,104,97,110,100,108,101, + 100,46,10,32,32,32,32,32,32,32,32,78,41,1,114,76, + 0,0,0,169,2,114,143,0,0,0,114,65,0,0,0,114, 7,0,0,0,114,7,0,0,0,114,8,0,0,0,218,10, - 112,97,116,104,95,115,116,97,116,115,130,3,0,0,115,4, - 0,0,0,14,12,255,128,122,23,83,111,117,114,99,101,76, - 111,97,100,101,114,46,112,97,116,104,95,115,116,97,116,115, - 99,4,0,0,0,0,0,0,0,0,0,0,0,4,0,0, - 0,4,0,0,0,67,0,0,0,115,12,0,0,0,124,0, - 160,0,124,2,124,3,161,2,83,0,41,2,122,228,79,112, - 116,105,111,110,97,108,32,109,101,116,104,111,100,32,119,104, - 105,99,104,32,119,114,105,116,101,115,32,100,97,116,97,32, - 40,98,121,116,101,115,41,32,116,111,32,97,32,102,105,108, - 101,32,112,97,116,104,32,40,97,32,115,116,114,41,46,10, - 10,32,32,32,32,32,32,32,32,73,109,112,108,101,109,101, - 110,116,105,110,103,32,116,104,105,115,32,109,101,116,104,111, - 100,32,97,108,108,111,119,115,32,102,111,114,32,116,104,101, - 32,119,114,105,116,105,110,103,32,111,102,32,98,121,116,101, - 99,111,100,101,32,102,105,108,101,115,46,10,10,32,32,32, - 32,32,32,32,32,84,104,101,32,115,111,117,114,99,101,32, - 112,97,116,104,32,105,115,32,110,101,101,100,101,100,32,105, - 110,32,111,114,100,101,114,32,116,111,32,99,111,114,114,101, - 99,116,108,121,32,116,114,97,110,115,102,101,114,32,112,101, - 114,109,105,115,115,105,111,110,115,10,32,32,32,32,32,32, - 32,32,78,41,1,218,8,115,101,116,95,100,97,116,97,41, - 4,114,143,0,0,0,114,134,0,0,0,90,10,99,97,99, - 104,101,95,112,97,116,104,114,41,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,15,95,99,97, - 99,104,101,95,98,121,116,101,99,111,100,101,144,3,0,0, - 115,4,0,0,0,12,8,255,128,122,28,83,111,117,114,99, - 101,76,111,97,100,101,114,46,95,99,97,99,104,101,95,98, - 121,116,101,99,111,100,101,99,3,0,0,0,0,0,0,0, - 0,0,0,0,3,0,0,0,1,0,0,0,67,0,0,0, - 114,23,0,0,0,41,2,122,150,79,112,116,105,111,110,97, - 108,32,109,101,116,104,111,100,32,119,104,105,99,104,32,119, - 114,105,116,101,115,32,100,97,116,97,32,40,98,121,116,101, - 115,41,32,116,111,32,97,32,102,105,108,101,32,112,97,116, - 104,32,40,97,32,115,116,114,41,46,10,10,32,32,32,32, - 32,32,32,32,73,109,112,108,101,109,101,110,116,105,110,103, - 32,116,104,105,115,32,109,101,116,104,111,100,32,97,108,108, - 111,119,115,32,102,111,114,32,116,104,101,32,119,114,105,116, - 105,110,103,32,111,102,32,98,121,116,101,99,111,100,101,32, - 102,105,108,101,115,46,10,32,32,32,32,32,32,32,32,78, - 114,7,0,0,0,41,3,114,143,0,0,0,114,65,0,0, - 0,114,41,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,252,0,0,0,154,3,0,0,114,239, - 0,0,0,122,21,83,111,117,114,99,101,76,111,97,100,101, - 114,46,115,101,116,95,100,97,116,97,99,2,0,0,0,0, - 0,0,0,0,0,0,0,5,0,0,0,10,0,0,0,67, - 0,0,0,115,70,0,0,0,124,0,160,0,124,1,161,1, - 125,2,122,10,124,0,160,1,124,2,161,1,125,3,87,0, - 116,4,124,3,131,1,83,0,4,0,116,2,121,34,1,0, - 125,4,1,0,122,7,116,3,100,1,124,1,100,2,141,2, - 124,4,130,2,100,3,125,4,126,4,119,1,119,0,41,4, - 122,52,67,111,110,99,114,101,116,101,32,105,109,112,108,101, - 109,101,110,116,97,116,105,111,110,32,111,102,32,73,110,115, - 112,101,99,116,76,111,97,100,101,114,46,103,101,116,95,115, - 111,117,114,99,101,46,122,39,115,111,117,114,99,101,32,110, - 111,116,32,97,118,97,105,108,97,98,108,101,32,116,104,114, - 111,117,103,104,32,103,101,116,95,100,97,116,97,40,41,114, - 140,0,0,0,78,41,5,114,203,0,0,0,218,8,103,101, - 116,95,100,97,116,97,114,76,0,0,0,114,142,0,0,0, - 114,200,0,0,0,41,5,114,143,0,0,0,114,163,0,0, - 0,114,65,0,0,0,114,198,0,0,0,218,3,101,120,99, + 112,97,116,104,95,109,116,105,109,101,122,3,0,0,115,4, + 0,0,0,4,6,255,128,122,23,83,111,117,114,99,101,76, + 111,97,100,101,114,46,112,97,116,104,95,109,116,105,109,101, + 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, + 0,4,0,0,0,67,0,0,0,115,14,0,0,0,100,1, + 124,0,160,0,124,1,161,1,105,1,83,0,41,3,97,158, + 1,0,0,79,112,116,105,111,110,97,108,32,109,101,116,104, + 111,100,32,114,101,116,117,114,110,105,110,103,32,97,32,109, + 101,116,97,100,97,116,97,32,100,105,99,116,32,102,111,114, + 32,116,104,101,32,115,112,101,99,105,102,105,101,100,10,32, + 32,32,32,32,32,32,32,112,97,116,104,32,40,97,32,115, + 116,114,41,46,10,10,32,32,32,32,32,32,32,32,80,111, + 115,115,105,98,108,101,32,107,101,121,115,58,10,32,32,32, + 32,32,32,32,32,45,32,39,109,116,105,109,101,39,32,40, + 109,97,110,100,97,116,111,114,121,41,32,105,115,32,116,104, + 101,32,110,117,109,101,114,105,99,32,116,105,109,101,115,116, + 97,109,112,32,111,102,32,108,97,115,116,32,115,111,117,114, + 99,101,10,32,32,32,32,32,32,32,32,32,32,99,111,100, + 101,32,109,111,100,105,102,105,99,97,116,105,111,110,59,10, + 32,32,32,32,32,32,32,32,45,32,39,115,105,122,101,39, + 32,40,111,112,116,105,111,110,97,108,41,32,105,115,32,116, + 104,101,32,115,105,122,101,32,105,110,32,98,121,116,101,115, + 32,111,102,32,116,104,101,32,115,111,117,114,99,101,32,99, + 111,100,101,46,10,10,32,32,32,32,32,32,32,32,73,109, + 112,108,101,109,101,110,116,105,110,103,32,116,104,105,115,32, + 109,101,116,104,111,100,32,97,108,108,111,119,115,32,116,104, + 101,32,108,111,97,100,101,114,32,116,111,32,114,101,97,100, + 32,98,121,116,101,99,111,100,101,32,102,105,108,101,115,46, + 10,32,32,32,32,32,32,32,32,82,97,105,115,101,115,32, + 79,83,69,114,114,111,114,32,119,104,101,110,32,116,104,101, + 32,112,97,116,104,32,99,97,110,110,111,116,32,98,101,32, + 104,97,110,100,108,101,100,46,10,32,32,32,32,32,32,32, + 32,114,193,0,0,0,78,41,1,114,251,0,0,0,114,250, + 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,218,10,112,97,116,104,95,115,116,97,116,115,130,3, + 0,0,115,4,0,0,0,14,12,255,128,122,23,83,111,117, + 114,99,101,76,111,97,100,101,114,46,112,97,116,104,95,115, + 116,97,116,115,99,4,0,0,0,0,0,0,0,0,0,0, + 0,4,0,0,0,4,0,0,0,67,0,0,0,115,12,0, + 0,0,124,0,160,0,124,2,124,3,161,2,83,0,41,2, + 122,228,79,112,116,105,111,110,97,108,32,109,101,116,104,111, + 100,32,119,104,105,99,104,32,119,114,105,116,101,115,32,100, + 97,116,97,32,40,98,121,116,101,115,41,32,116,111,32,97, + 32,102,105,108,101,32,112,97,116,104,32,40,97,32,115,116, + 114,41,46,10,10,32,32,32,32,32,32,32,32,73,109,112, + 108,101,109,101,110,116,105,110,103,32,116,104,105,115,32,109, + 101,116,104,111,100,32,97,108,108,111,119,115,32,102,111,114, + 32,116,104,101,32,119,114,105,116,105,110,103,32,111,102,32, + 98,121,116,101,99,111,100,101,32,102,105,108,101,115,46,10, + 10,32,32,32,32,32,32,32,32,84,104,101,32,115,111,117, + 114,99,101,32,112,97,116,104,32,105,115,32,110,101,101,100, + 101,100,32,105,110,32,111,114,100,101,114,32,116,111,32,99, + 111,114,114,101,99,116,108,121,32,116,114,97,110,115,102,101, + 114,32,112,101,114,109,105,115,115,105,111,110,115,10,32,32, + 32,32,32,32,32,32,78,41,1,218,8,115,101,116,95,100, + 97,116,97,41,4,114,143,0,0,0,114,134,0,0,0,90, + 10,99,97,99,104,101,95,112,97,116,104,114,41,0,0,0, 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 10,103,101,116,95,115,111,117,114,99,101,161,3,0,0,115, - 26,0,0,0,10,2,2,1,12,1,8,4,14,253,4,1, - 2,1,4,255,2,1,2,255,8,128,2,255,255,128,122,23, - 83,111,117,114,99,101,76,111,97,100,101,114,46,103,101,116, - 95,115,111,117,114,99,101,114,130,0,0,0,41,1,218,9, - 95,111,112,116,105,109,105,122,101,99,3,0,0,0,0,0, - 0,0,1,0,0,0,4,0,0,0,8,0,0,0,67,0, - 0,0,115,22,0,0,0,116,0,106,1,116,2,124,1,124, - 2,100,1,100,2,124,3,100,3,141,6,83,0,41,5,122, - 130,82,101,116,117,114,110,32,116,104,101,32,99,111,100,101, - 32,111,98,106,101,99,116,32,99,111,109,112,105,108,101,100, - 32,102,114,111,109,32,115,111,117,114,99,101,46,10,10,32, - 32,32,32,32,32,32,32,84,104,101,32,39,100,97,116,97, - 39,32,97,114,103,117,109,101,110,116,32,99,97,110,32,98, - 101,32,97,110,121,32,111,98,106,101,99,116,32,116,121,112, - 101,32,116,104,97,116,32,99,111,109,112,105,108,101,40,41, - 32,115,117,112,112,111,114,116,115,46,10,32,32,32,32,32, - 32,32,32,114,242,0,0,0,84,41,2,218,12,100,111,110, - 116,95,105,110,104,101,114,105,116,114,108,0,0,0,78,41, - 3,114,159,0,0,0,114,241,0,0,0,218,7,99,111,109, - 112,105,108,101,41,4,114,143,0,0,0,114,41,0,0,0, - 114,65,0,0,0,114,1,1,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,14,115,111,117,114,99, - 101,95,116,111,95,99,111,100,101,171,3,0,0,115,8,0, - 0,0,12,5,4,1,6,255,255,128,122,27,83,111,117,114, - 99,101,76,111,97,100,101,114,46,115,111,117,114,99,101,95, - 116,111,95,99,111,100,101,99,2,0,0,0,0,0,0,0, - 0,0,0,0,15,0,0,0,9,0,0,0,67,0,0,0, - 115,12,2,0,0,124,0,160,0,124,1,161,1,125,2,100, - 1,125,3,100,1,125,4,100,1,125,5,100,2,125,6,100, - 3,125,7,122,6,116,1,124,2,131,1,125,8,87,0,110, - 11,4,0,116,2,144,1,121,5,1,0,1,0,1,0,100, - 1,125,8,89,0,110,143,122,7,124,0,160,3,124,2,161, - 1,125,9,87,0,110,9,4,0,116,4,144,1,121,4,1, - 0,1,0,1,0,89,0,110,126,116,5,124,9,100,4,25, - 0,131,1,125,3,122,7,124,0,160,6,124,8,161,1,125, - 10,87,0,110,9,4,0,116,4,144,1,121,3,1,0,1, - 0,1,0,89,0,110,103,124,1,124,8,100,5,156,2,125, - 11,122,71,116,7,124,10,124,1,124,11,131,3,125,12,116, - 8,124,10,131,1,100,6,100,1,133,2,25,0,125,13,124, - 12,100,7,64,0,100,8,107,3,125,6,124,6,114,138,124, - 12,100,9,64,0,100,8,107,3,125,7,116,9,106,10,100, - 10,107,3,114,137,124,7,115,119,116,9,106,10,100,11,107, - 2,114,137,124,0,160,6,124,2,161,1,125,4,116,9,160, - 11,116,12,124,4,161,2,125,5,116,13,124,10,124,5,124, - 1,124,11,131,4,1,0,110,10,116,14,124,10,124,3,124, - 9,100,12,25,0,124,1,124,11,131,5,1,0,87,0,110, - 11,4,0,116,15,116,16,102,2,144,1,121,2,1,0,1, - 0,1,0,89,0,110,15,116,17,160,18,100,13,124,8,124, - 2,161,3,1,0,116,19,124,13,124,1,124,8,124,2,100, - 14,141,4,83,0,124,4,100,1,117,0,114,185,124,0,160, - 6,124,2,161,1,125,4,124,0,160,20,124,4,124,2,161, - 2,125,14,116,17,160,18,100,15,124,2,161,2,1,0,116, - 21,106,22,115,255,124,8,100,1,117,1,114,255,124,3,100, - 1,117,1,114,255,124,6,114,226,124,5,100,1,117,0,114, - 219,116,9,160,11,124,4,161,1,125,5,116,23,124,14,124, - 5,124,7,131,3,125,10,110,8,116,24,124,14,124,3,116, - 25,124,4,131,1,131,3,125,10,122,10,124,0,160,26,124, - 2,124,8,124,10,161,3,1,0,87,0,124,14,83,0,4, - 0,116,2,144,1,121,1,1,0,1,0,1,0,89,0,124, - 14,83,0,124,14,83,0,119,0,119,0,119,0,119,0,119, - 0,41,16,122,190,67,111,110,99,114,101,116,101,32,105,109, - 112,108,101,109,101,110,116,97,116,105,111,110,32,111,102,32, - 73,110,115,112,101,99,116,76,111,97,100,101,114,46,103,101, - 116,95,99,111,100,101,46,10,10,32,32,32,32,32,32,32, - 32,82,101,97,100,105,110,103,32,111,102,32,98,121,116,101, - 99,111,100,101,32,114,101,113,117,105,114,101,115,32,112,97, - 116,104,95,115,116,97,116,115,32,116,111,32,98,101,32,105, - 109,112,108,101,109,101,110,116,101,100,46,32,84,111,32,119, - 114,105,116,101,10,32,32,32,32,32,32,32,32,98,121,116, - 101,99,111,100,101,44,32,115,101,116,95,100,97,116,97,32, - 109,117,115,116,32,97,108,115,111,32,98,101,32,105,109,112, - 108,101,109,101,110,116,101,100,46,10,10,32,32,32,32,32, - 32,32,32,78,70,84,114,193,0,0,0,114,183,0,0,0, - 114,169,0,0,0,114,3,0,0,0,114,0,0,0,0,114, - 44,0,0,0,90,5,110,101,118,101,114,90,6,97,108,119, - 97,121,115,218,4,115,105,122,101,122,13,123,125,32,109,97, - 116,99,104,101,115,32,123,125,41,3,114,141,0,0,0,114, - 132,0,0,0,114,134,0,0,0,122,19,99,111,100,101,32, - 111,98,106,101,99,116,32,102,114,111,109,32,123,125,41,27, - 114,203,0,0,0,114,121,0,0,0,114,107,0,0,0,114, - 251,0,0,0,114,76,0,0,0,114,33,0,0,0,114,254, - 0,0,0,114,176,0,0,0,218,10,109,101,109,111,114,121, - 118,105,101,119,114,187,0,0,0,90,21,99,104,101,99,107, - 95,104,97,115,104,95,98,97,115,101,100,95,112,121,99,115, - 114,181,0,0,0,218,17,95,82,65,87,95,77,65,71,73, - 67,95,78,85,77,66,69,82,114,182,0,0,0,114,180,0, - 0,0,114,142,0,0,0,114,174,0,0,0,114,159,0,0, - 0,114,173,0,0,0,114,189,0,0,0,114,4,1,0,0, - 114,15,0,0,0,218,19,100,111,110,116,95,119,114,105,116, - 101,95,98,121,116,101,99,111,100,101,114,195,0,0,0,114, - 194,0,0,0,114,4,0,0,0,114,253,0,0,0,41,15, - 114,143,0,0,0,114,163,0,0,0,114,134,0,0,0,114, - 178,0,0,0,114,198,0,0,0,114,181,0,0,0,90,10, - 104,97,115,104,95,98,97,115,101,100,90,12,99,104,101,99, - 107,95,115,111,117,114,99,101,114,132,0,0,0,218,2,115, - 116,114,41,0,0,0,114,175,0,0,0,114,16,0,0,0, - 90,10,98,121,116,101,115,95,100,97,116,97,90,11,99,111, - 100,101,95,111,98,106,101,99,116,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,240,0,0,0,179,3,0, - 0,115,170,0,0,0,10,7,4,1,4,1,4,1,4,1, - 4,1,2,1,12,1,14,1,8,1,2,2,14,1,14,1, - 4,1,12,2,2,1,14,1,14,1,4,1,2,3,2,1, - 6,254,2,4,12,1,16,1,12,1,4,1,12,1,10,1, - 2,1,2,255,8,2,2,254,10,3,4,1,2,1,2,1, - 4,254,8,4,2,1,4,255,2,128,2,3,2,1,2,1, - 6,1,2,1,2,1,4,251,4,128,18,7,4,1,8,2, - 2,1,4,255,6,2,2,1,2,1,6,254,8,3,10,1, - 12,1,12,1,14,1,6,1,2,255,4,2,8,1,10,1, - 14,1,6,2,6,1,4,255,2,2,16,1,4,3,14,254, - 2,1,8,1,2,254,2,233,2,225,2,250,2,251,255,128, - 122,21,83,111,117,114,99,101,76,111,97,100,101,114,46,103, - 101,116,95,99,111,100,101,78,41,10,114,150,0,0,0,114, - 149,0,0,0,114,151,0,0,0,114,250,0,0,0,114,251, - 0,0,0,114,253,0,0,0,114,252,0,0,0,114,0,1, - 0,0,114,4,1,0,0,114,240,0,0,0,114,7,0,0, + 15,95,99,97,99,104,101,95,98,121,116,101,99,111,100,101, + 144,3,0,0,115,4,0,0,0,12,8,255,128,122,28,83, + 111,117,114,99,101,76,111,97,100,101,114,46,95,99,97,99, + 104,101,95,98,121,116,101,99,111,100,101,99,3,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0, + 67,0,0,0,114,23,0,0,0,41,2,122,150,79,112,116, + 105,111,110,97,108,32,109,101,116,104,111,100,32,119,104,105, + 99,104,32,119,114,105,116,101,115,32,100,97,116,97,32,40, + 98,121,116,101,115,41,32,116,111,32,97,32,102,105,108,101, + 32,112,97,116,104,32,40,97,32,115,116,114,41,46,10,10, + 32,32,32,32,32,32,32,32,73,109,112,108,101,109,101,110, + 116,105,110,103,32,116,104,105,115,32,109,101,116,104,111,100, + 32,97,108,108,111,119,115,32,102,111,114,32,116,104,101,32, + 119,114,105,116,105,110,103,32,111,102,32,98,121,116,101,99, + 111,100,101,32,102,105,108,101,115,46,10,32,32,32,32,32, + 32,32,32,78,114,7,0,0,0,41,3,114,143,0,0,0, + 114,65,0,0,0,114,41,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,253,0,0,0,154,3, + 0,0,114,240,0,0,0,122,21,83,111,117,114,99,101,76, + 111,97,100,101,114,46,115,101,116,95,100,97,116,97,99,2, + 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,10, + 0,0,0,67,0,0,0,115,70,0,0,0,124,0,160,0, + 124,1,161,1,125,2,122,10,124,0,160,1,124,2,161,1, + 125,3,87,0,116,4,124,3,131,1,83,0,4,0,116,2, + 121,34,1,0,125,4,1,0,122,7,116,3,100,1,124,1, + 100,2,141,2,124,4,130,2,100,3,125,4,126,4,119,1, + 119,0,41,4,122,52,67,111,110,99,114,101,116,101,32,105, + 109,112,108,101,109,101,110,116,97,116,105,111,110,32,111,102, + 32,73,110,115,112,101,99,116,76,111,97,100,101,114,46,103, + 101,116,95,115,111,117,114,99,101,46,122,39,115,111,117,114, + 99,101,32,110,111,116,32,97,118,97,105,108,97,98,108,101, + 32,116,104,114,111,117,103,104,32,103,101,116,95,100,97,116, + 97,40,41,114,140,0,0,0,78,41,5,114,203,0,0,0, + 218,8,103,101,116,95,100,97,116,97,114,76,0,0,0,114, + 142,0,0,0,114,200,0,0,0,41,5,114,143,0,0,0, + 114,163,0,0,0,114,65,0,0,0,114,198,0,0,0,218, + 3,101,120,99,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,10,103,101,116,95,115,111,117,114,99,101,161, + 3,0,0,115,26,0,0,0,10,2,2,1,12,1,8,4, + 14,253,4,1,2,1,4,255,2,1,2,255,8,128,2,255, + 255,128,122,23,83,111,117,114,99,101,76,111,97,100,101,114, + 46,103,101,116,95,115,111,117,114,99,101,114,130,0,0,0, + 41,1,218,9,95,111,112,116,105,109,105,122,101,99,3,0, + 0,0,0,0,0,0,1,0,0,0,4,0,0,0,8,0, + 0,0,67,0,0,0,115,22,0,0,0,116,0,106,1,116, + 2,124,1,124,2,100,1,100,2,124,3,100,3,141,6,83, + 0,41,5,122,130,82,101,116,117,114,110,32,116,104,101,32, + 99,111,100,101,32,111,98,106,101,99,116,32,99,111,109,112, + 105,108,101,100,32,102,114,111,109,32,115,111,117,114,99,101, + 46,10,10,32,32,32,32,32,32,32,32,84,104,101,32,39, + 100,97,116,97,39,32,97,114,103,117,109,101,110,116,32,99, + 97,110,32,98,101,32,97,110,121,32,111,98,106,101,99,116, + 32,116,121,112,101,32,116,104,97,116,32,99,111,109,112,105, + 108,101,40,41,32,115,117,112,112,111,114,116,115,46,10,32, + 32,32,32,32,32,32,32,114,243,0,0,0,84,41,2,218, + 12,100,111,110,116,95,105,110,104,101,114,105,116,114,108,0, + 0,0,78,41,3,114,159,0,0,0,114,242,0,0,0,218, + 7,99,111,109,112,105,108,101,41,4,114,143,0,0,0,114, + 41,0,0,0,114,65,0,0,0,114,2,1,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,218,14,115, + 111,117,114,99,101,95,116,111,95,99,111,100,101,171,3,0, + 0,115,8,0,0,0,12,5,4,1,6,255,255,128,122,27, + 83,111,117,114,99,101,76,111,97,100,101,114,46,115,111,117, + 114,99,101,95,116,111,95,99,111,100,101,99,2,0,0,0, + 0,0,0,0,0,0,0,0,15,0,0,0,9,0,0,0, + 67,0,0,0,115,12,2,0,0,124,0,160,0,124,1,161, + 1,125,2,100,1,125,3,100,1,125,4,100,1,125,5,100, + 2,125,6,100,3,125,7,122,6,116,1,124,2,131,1,125, + 8,87,0,110,11,4,0,116,2,144,1,121,5,1,0,1, + 0,1,0,100,1,125,8,89,0,110,143,122,7,124,0,160, + 3,124,2,161,1,125,9,87,0,110,9,4,0,116,4,144, + 1,121,4,1,0,1,0,1,0,89,0,110,126,116,5,124, + 9,100,4,25,0,131,1,125,3,122,7,124,0,160,6,124, + 8,161,1,125,10,87,0,110,9,4,0,116,4,144,1,121, + 3,1,0,1,0,1,0,89,0,110,103,124,1,124,8,100, + 5,156,2,125,11,122,71,116,7,124,10,124,1,124,11,131, + 3,125,12,116,8,124,10,131,1,100,6,100,1,133,2,25, + 0,125,13,124,12,100,7,64,0,100,8,107,3,125,6,124, + 6,114,138,124,12,100,9,64,0,100,8,107,3,125,7,116, + 9,106,10,100,10,107,3,114,137,124,7,115,119,116,9,106, + 10,100,11,107,2,114,137,124,0,160,6,124,2,161,1,125, + 4,116,9,160,11,116,12,124,4,161,2,125,5,116,13,124, + 10,124,5,124,1,124,11,131,4,1,0,110,10,116,14,124, + 10,124,3,124,9,100,12,25,0,124,1,124,11,131,5,1, + 0,87,0,110,11,4,0,116,15,116,16,102,2,144,1,121, + 2,1,0,1,0,1,0,89,0,110,15,116,17,160,18,100, + 13,124,8,124,2,161,3,1,0,116,19,124,13,124,1,124, + 8,124,2,100,14,141,4,83,0,124,4,100,1,117,0,114, + 185,124,0,160,6,124,2,161,1,125,4,124,0,160,20,124, + 4,124,2,161,2,125,14,116,17,160,18,100,15,124,2,161, + 2,1,0,116,21,106,22,115,255,124,8,100,1,117,1,114, + 255,124,3,100,1,117,1,114,255,124,6,114,226,124,5,100, + 1,117,0,114,219,116,9,160,11,124,4,161,1,125,5,116, + 23,124,14,124,5,124,7,131,3,125,10,110,8,116,24,124, + 14,124,3,116,25,124,4,131,1,131,3,125,10,122,10,124, + 0,160,26,124,2,124,8,124,10,161,3,1,0,87,0,124, + 14,83,0,4,0,116,2,144,1,121,1,1,0,1,0,1, + 0,89,0,124,14,83,0,124,14,83,0,119,0,119,0,119, + 0,119,0,119,0,41,16,122,190,67,111,110,99,114,101,116, + 101,32,105,109,112,108,101,109,101,110,116,97,116,105,111,110, + 32,111,102,32,73,110,115,112,101,99,116,76,111,97,100,101, + 114,46,103,101,116,95,99,111,100,101,46,10,10,32,32,32, + 32,32,32,32,32,82,101,97,100,105,110,103,32,111,102,32, + 98,121,116,101,99,111,100,101,32,114,101,113,117,105,114,101, + 115,32,112,97,116,104,95,115,116,97,116,115,32,116,111,32, + 98,101,32,105,109,112,108,101,109,101,110,116,101,100,46,32, + 84,111,32,119,114,105,116,101,10,32,32,32,32,32,32,32, + 32,98,121,116,101,99,111,100,101,44,32,115,101,116,95,100, + 97,116,97,32,109,117,115,116,32,97,108,115,111,32,98,101, + 32,105,109,112,108,101,109,101,110,116,101,100,46,10,10,32, + 32,32,32,32,32,32,32,78,70,84,114,193,0,0,0,114, + 183,0,0,0,114,169,0,0,0,114,3,0,0,0,114,0, + 0,0,0,114,44,0,0,0,90,5,110,101,118,101,114,90, + 6,97,108,119,97,121,115,218,4,115,105,122,101,122,13,123, + 125,32,109,97,116,99,104,101,115,32,123,125,41,3,114,141, + 0,0,0,114,132,0,0,0,114,134,0,0,0,122,19,99, + 111,100,101,32,111,98,106,101,99,116,32,102,114,111,109,32, + 123,125,41,27,114,203,0,0,0,114,121,0,0,0,114,107, + 0,0,0,114,252,0,0,0,114,76,0,0,0,114,33,0, + 0,0,114,255,0,0,0,114,176,0,0,0,218,10,109,101, + 109,111,114,121,118,105,101,119,114,187,0,0,0,90,21,99, + 104,101,99,107,95,104,97,115,104,95,98,97,115,101,100,95, + 112,121,99,115,114,181,0,0,0,218,17,95,82,65,87,95, + 77,65,71,73,67,95,78,85,77,66,69,82,114,182,0,0, + 0,114,180,0,0,0,114,142,0,0,0,114,174,0,0,0, + 114,159,0,0,0,114,173,0,0,0,114,189,0,0,0,114, + 5,1,0,0,114,15,0,0,0,218,19,100,111,110,116,95, + 119,114,105,116,101,95,98,121,116,101,99,111,100,101,114,195, + 0,0,0,114,194,0,0,0,114,4,0,0,0,114,254,0, + 0,0,41,15,114,143,0,0,0,114,163,0,0,0,114,134, + 0,0,0,114,178,0,0,0,114,198,0,0,0,114,181,0, + 0,0,90,10,104,97,115,104,95,98,97,115,101,100,90,12, + 99,104,101,99,107,95,115,111,117,114,99,101,114,132,0,0, + 0,218,2,115,116,114,41,0,0,0,114,175,0,0,0,114, + 16,0,0,0,90,10,98,121,116,101,115,95,100,97,116,97, + 90,11,99,111,100,101,95,111,98,106,101,99,116,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,114,241,0,0, + 0,179,3,0,0,115,170,0,0,0,10,7,4,1,4,1, + 4,1,4,1,4,1,2,1,12,1,14,1,8,1,2,2, + 14,1,14,1,4,1,12,2,2,1,14,1,14,1,4,1, + 2,3,2,1,6,254,2,4,12,1,16,1,12,1,4,1, + 12,1,10,1,2,1,2,255,8,2,2,254,10,3,4,1, + 2,1,2,1,4,254,8,4,2,1,4,255,2,128,2,3, + 2,1,2,1,6,1,2,1,2,1,4,251,4,128,18,7, + 4,1,8,2,2,1,4,255,6,2,2,1,2,1,6,254, + 8,3,10,1,12,1,12,1,14,1,6,1,2,255,4,2, + 8,1,10,1,14,1,6,2,6,1,4,255,2,2,16,1, + 4,3,14,254,2,1,8,1,2,254,2,233,2,225,2,250, + 2,251,255,128,122,21,83,111,117,114,99,101,76,111,97,100, + 101,114,46,103,101,116,95,99,111,100,101,78,41,10,114,150, + 0,0,0,114,149,0,0,0,114,151,0,0,0,114,251,0, + 0,0,114,252,0,0,0,114,254,0,0,0,114,253,0,0, + 0,114,1,1,0,0,114,5,1,0,0,114,241,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,114,249,0,0,0,120,3,0,0,115,18,0, + 0,0,8,0,8,2,8,8,8,14,8,10,8,7,14,10, + 12,8,255,128,114,249,0,0,0,99,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0, + 0,0,115,92,0,0,0,101,0,90,1,100,0,90,2,100, + 1,90,3,100,2,100,3,132,0,90,4,100,4,100,5,132, + 0,90,5,100,6,100,7,132,0,90,6,101,7,135,0,102, + 1,100,8,100,9,132,8,131,1,90,8,101,7,100,10,100, + 11,132,0,131,1,90,9,100,12,100,13,132,0,90,10,101, + 7,100,14,100,15,132,0,131,1,90,11,135,0,4,0,90, + 12,83,0,41,16,218,10,70,105,108,101,76,111,97,100,101, + 114,122,103,66,97,115,101,32,102,105,108,101,32,108,111,97, + 100,101,114,32,99,108,97,115,115,32,119,104,105,99,104,32, + 105,109,112,108,101,109,101,110,116,115,32,116,104,101,32,108, + 111,97,100,101,114,32,112,114,111,116,111,99,111,108,32,109, + 101,116,104,111,100,115,32,116,104,97,116,10,32,32,32,32, + 114,101,113,117,105,114,101,32,102,105,108,101,32,115,121,115, + 116,101,109,32,117,115,97,103,101,46,99,3,0,0,0,0, + 0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,67, + 0,0,0,115,16,0,0,0,124,1,124,0,95,0,124,2, + 124,0,95,1,100,1,83,0,41,2,122,75,67,97,99,104, + 101,32,116,104,101,32,109,111,100,117,108,101,32,110,97,109, + 101,32,97,110,100,32,116,104,101,32,112,97,116,104,32,116, + 111,32,116,104,101,32,102,105,108,101,32,102,111,117,110,100, + 32,98,121,32,116,104,101,10,32,32,32,32,32,32,32,32, + 102,105,110,100,101,114,46,78,114,183,0,0,0,41,3,114, + 143,0,0,0,114,163,0,0,0,114,65,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,236,0, + 0,0,13,4,0,0,115,6,0,0,0,6,3,10,1,255, + 128,122,19,70,105,108,101,76,111,97,100,101,114,46,95,95, + 105,110,105,116,95,95,99,2,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,243, + 24,0,0,0,124,0,106,0,124,1,106,0,107,2,111,11, + 124,0,106,1,124,1,106,1,107,2,83,0,114,69,0,0, + 0,169,2,218,9,95,95,99,108,97,115,115,95,95,114,156, + 0,0,0,169,2,114,143,0,0,0,90,5,111,116,104,101, + 114,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 218,6,95,95,101,113,95,95,19,4,0,0,243,8,0,0, + 0,12,1,10,1,2,255,255,128,122,17,70,105,108,101,76, + 111,97,100,101,114,46,95,95,101,113,95,95,99,1,0,0, + 0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0, + 0,67,0,0,0,243,20,0,0,0,116,0,124,0,106,1, + 131,1,116,0,124,0,106,2,131,1,65,0,83,0,114,69, + 0,0,0,169,3,218,4,104,97,115,104,114,141,0,0,0, + 114,65,0,0,0,169,1,114,143,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,8,95,95,104, + 97,115,104,95,95,23,4,0,0,243,4,0,0,0,20,1, + 255,128,122,19,70,105,108,101,76,111,97,100,101,114,46,95, + 95,104,97,115,104,95,95,99,2,0,0,0,0,0,0,0, + 0,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0, + 115,16,0,0,0,116,0,116,1,124,0,131,2,160,2,124, + 1,161,1,83,0,41,2,122,100,76,111,97,100,32,97,32, + 109,111,100,117,108,101,32,102,114,111,109,32,97,32,102,105, + 108,101,46,10,10,32,32,32,32,32,32,32,32,84,104,105, + 115,32,109,101,116,104,111,100,32,105,115,32,100,101,112,114, + 101,99,97,116,101,100,46,32,32,85,115,101,32,101,120,101, + 99,95,109,111,100,117,108,101,40,41,32,105,110,115,116,101, + 97,100,46,10,10,32,32,32,32,32,32,32,32,78,41,3, + 218,5,115,117,112,101,114,114,11,1,0,0,114,248,0,0, + 0,114,247,0,0,0,169,1,114,14,1,0,0,114,7,0, + 0,0,114,8,0,0,0,114,248,0,0,0,26,4,0,0, + 115,4,0,0,0,16,10,255,128,122,22,70,105,108,101,76, + 111,97,100,101,114,46,108,111,97,100,95,109,111,100,117,108, + 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, + 0,0,1,0,0,0,67,0,0,0,243,6,0,0,0,124, + 0,106,0,83,0,169,2,122,58,82,101,116,117,114,110,32, + 116,104,101,32,112,97,116,104,32,116,111,32,116,104,101,32, + 115,111,117,114,99,101,32,102,105,108,101,32,97,115,32,102, + 111,117,110,100,32,98,121,32,116,104,101,32,102,105,110,100, + 101,114,46,78,114,71,0,0,0,114,247,0,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,203,0, + 0,0,38,4,0,0,243,4,0,0,0,6,3,255,128,122, + 23,70,105,108,101,76,111,97,100,101,114,46,103,101,116,95, + 102,105,108,101,110,97,109,101,99,2,0,0,0,0,0,0, + 0,0,0,0,0,3,0,0,0,8,0,0,0,67,0,0, + 0,115,128,0,0,0,116,0,124,0,116,1,116,2,102,2, + 131,2,114,36,116,3,160,4,116,5,124,1,131,1,161,1, + 143,12,125,2,124,2,160,6,161,0,87,0,2,0,100,1, + 4,0,4,0,131,3,1,0,83,0,49,0,115,29,119,1, + 1,0,1,0,1,0,89,0,1,0,100,1,83,0,116,3, + 160,7,124,1,100,2,161,2,143,12,125,2,124,2,160,6, + 161,0,87,0,2,0,100,1,4,0,4,0,131,3,1,0, + 83,0,49,0,115,57,119,1,1,0,1,0,1,0,89,0, + 1,0,100,1,83,0,41,3,122,39,82,101,116,117,114,110, + 32,116,104,101,32,100,97,116,97,32,102,114,111,109,32,112, + 97,116,104,32,97,115,32,114,97,119,32,98,121,116,101,115, + 46,78,218,1,114,41,8,114,185,0,0,0,114,249,0,0, + 0,218,19,69,120,116,101,110,115,105,111,110,70,105,108,101, + 76,111,97,100,101,114,114,91,0,0,0,90,9,111,112,101, + 110,95,99,111,100,101,114,109,0,0,0,90,4,114,101,97, + 100,114,92,0,0,0,41,3,114,143,0,0,0,114,65,0, + 0,0,114,94,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,255,0,0,0,43,4,0,0,115, + 16,0,0,0,14,2,16,1,22,1,20,128,14,2,22,1, + 20,128,255,128,122,19,70,105,108,101,76,111,97,100,101,114, + 46,103,101,116,95,100,97,116,97,99,2,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,2,0,0,0,67,0, + 0,0,115,20,0,0,0,100,1,100,2,108,0,109,1,125, + 2,1,0,124,2,124,0,131,1,83,0,41,3,78,114,0, + 0,0,0,41,1,218,10,70,105,108,101,82,101,97,100,101, + 114,41,2,218,17,105,109,112,111,114,116,108,105,98,46,114, + 101,97,100,101,114,115,114,31,1,0,0,41,3,114,143,0, + 0,0,114,244,0,0,0,114,31,1,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,218,19,103,101,116, + 95,114,101,115,111,117,114,99,101,95,114,101,97,100,101,114, + 52,4,0,0,115,6,0,0,0,12,2,8,1,255,128,122, + 30,70,105,108,101,76,111,97,100,101,114,46,103,101,116,95, + 114,101,115,111,117,114,99,101,95,114,101,97,100,101,114,41, + 13,114,150,0,0,0,114,149,0,0,0,114,151,0,0,0, + 114,152,0,0,0,114,236,0,0,0,114,16,1,0,0,114, + 22,1,0,0,114,160,0,0,0,114,248,0,0,0,114,203, + 0,0,0,114,255,0,0,0,114,33,1,0,0,90,13,95, + 95,99,108,97,115,115,99,101,108,108,95,95,114,7,0,0, + 0,114,7,0,0,0,114,25,1,0,0,114,8,0,0,0, + 114,11,1,0,0,8,4,0,0,115,26,0,0,0,8,0, + 4,2,8,3,8,6,8,4,2,3,14,1,2,11,10,1, + 8,4,2,9,18,1,255,128,114,11,1,0,0,99,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,64,0,0,0,115,46,0,0,0,101,0,90,1,100, + 0,90,2,100,1,90,3,100,2,100,3,132,0,90,4,100, + 4,100,5,132,0,90,5,100,6,100,7,156,1,100,8,100, + 9,132,2,90,6,100,10,83,0,41,11,218,16,83,111,117, + 114,99,101,70,105,108,101,76,111,97,100,101,114,122,62,67, + 111,110,99,114,101,116,101,32,105,109,112,108,101,109,101,110, + 116,97,116,105,111,110,32,111,102,32,83,111,117,114,99,101, + 76,111,97,100,101,114,32,117,115,105,110,103,32,116,104,101, + 32,102,105,108,101,32,115,121,115,116,101,109,46,99,2,0, + 0,0,0,0,0,0,0,0,0,0,3,0,0,0,3,0, + 0,0,67,0,0,0,115,22,0,0,0,116,0,124,1,131, + 1,125,2,124,2,106,1,124,2,106,2,100,1,156,2,83, + 0,41,3,122,33,82,101,116,117,114,110,32,116,104,101,32, + 109,101,116,97,100,97,116,97,32,102,111,114,32,116,104,101, + 32,112,97,116,104,46,41,2,114,193,0,0,0,114,6,1, + 0,0,78,41,3,114,75,0,0,0,218,8,115,116,95,109, + 116,105,109,101,90,7,115,116,95,115,105,122,101,41,3,114, + 143,0,0,0,114,65,0,0,0,114,10,1,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,252,0, + 0,0,62,4,0,0,115,6,0,0,0,8,2,14,1,255, + 128,122,27,83,111,117,114,99,101,70,105,108,101,76,111,97, + 100,101,114,46,112,97,116,104,95,115,116,97,116,115,99,4, + 0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,5, + 0,0,0,67,0,0,0,115,24,0,0,0,116,0,124,1, + 131,1,125,4,124,0,106,1,124,2,124,3,124,4,100,1, + 141,3,83,0,41,2,78,169,1,218,5,95,109,111,100,101, + 41,2,114,139,0,0,0,114,253,0,0,0,41,5,114,143, + 0,0,0,114,134,0,0,0,114,132,0,0,0,114,41,0, + 0,0,114,78,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,254,0,0,0,67,4,0,0,115, + 6,0,0,0,8,2,16,1,255,128,122,32,83,111,117,114, + 99,101,70,105,108,101,76,111,97,100,101,114,46,95,99,97, + 99,104,101,95,98,121,116,101,99,111,100,101,114,87,0,0, + 0,114,36,1,0,0,99,3,0,0,0,0,0,0,0,1, + 0,0,0,9,0,0,0,11,0,0,0,67,0,0,0,115, + 254,0,0,0,116,0,124,1,131,1,92,2,125,4,125,5, + 103,0,125,6,124,4,114,31,116,1,124,4,131,1,115,31, + 116,0,124,4,131,1,92,2,125,4,125,7,124,6,160,2, + 124,7,161,1,1,0,124,4,114,31,116,1,124,4,131,1, + 114,14,116,3,124,6,131,1,68,0,93,48,125,7,116,4, + 124,4,124,7,131,2,125,4,122,7,116,5,160,6,124,4, + 161,1,1,0,87,0,113,35,4,0,116,7,121,58,1,0, + 1,0,1,0,89,0,113,35,4,0,116,8,121,126,1,0, + 125,8,1,0,122,15,116,9,160,10,100,1,124,4,124,8, + 161,3,1,0,87,0,89,0,100,2,125,8,126,8,1,0, + 100,2,83,0,100,2,125,8,126,8,119,1,122,15,116,11, + 124,1,124,2,124,3,131,3,1,0,116,9,160,10,100,3, + 124,1,161,2,1,0,87,0,100,2,83,0,4,0,116,8, + 121,125,1,0,125,8,1,0,122,14,116,9,160,10,100,1, + 124,1,124,8,161,3,1,0,87,0,89,0,100,2,125,8, + 126,8,100,2,83,0,100,2,125,8,126,8,119,1,119,0, + 119,0,41,4,122,27,87,114,105,116,101,32,98,121,116,101, + 115,32,100,97,116,97,32,116,111,32,97,32,102,105,108,101, + 46,122,27,99,111,117,108,100,32,110,111,116,32,99,114,101, + 97,116,101,32,123,33,114,125,58,32,123,33,114,125,78,122, + 12,99,114,101,97,116,101,100,32,123,33,114,125,41,12,114, + 74,0,0,0,114,83,0,0,0,114,61,0,0,0,218,8, + 114,101,118,101,114,115,101,100,114,67,0,0,0,114,18,0, + 0,0,90,5,109,107,100,105,114,218,15,70,105,108,101,69, + 120,105,115,116,115,69,114,114,111,114,114,76,0,0,0,114, + 159,0,0,0,114,173,0,0,0,114,95,0,0,0,41,9, + 114,143,0,0,0,114,65,0,0,0,114,41,0,0,0,114, + 37,1,0,0,218,6,112,97,114,101,110,116,114,120,0,0, + 0,114,63,0,0,0,114,68,0,0,0,114,0,1,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, + 253,0,0,0,72,4,0,0,115,58,0,0,0,12,2,4, + 1,12,2,12,1,10,1,12,254,12,4,10,1,2,1,14, + 1,12,1,4,2,14,1,6,3,4,1,4,255,16,2,8, + 128,2,1,12,1,18,1,14,1,8,2,2,1,18,255,8, + 128,2,254,2,247,255,128,122,25,83,111,117,114,99,101,70, + 105,108,101,76,111,97,100,101,114,46,115,101,116,95,100,97, + 116,97,78,41,7,114,150,0,0,0,114,149,0,0,0,114, + 151,0,0,0,114,152,0,0,0,114,252,0,0,0,114,254, + 0,0,0,114,253,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,114,34,1,0, + 0,58,4,0,0,115,12,0,0,0,8,0,4,2,8,2, + 8,5,18,5,255,128,114,34,1,0,0,99,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, + 64,0,0,0,115,32,0,0,0,101,0,90,1,100,0,90, + 2,100,1,90,3,100,2,100,3,132,0,90,4,100,4,100, + 5,132,0,90,5,100,6,83,0,41,7,218,20,83,111,117, + 114,99,101,108,101,115,115,70,105,108,101,76,111,97,100,101, + 114,122,45,76,111,97,100,101,114,32,119,104,105,99,104,32, + 104,97,110,100,108,101,115,32,115,111,117,114,99,101,108,101, + 115,115,32,102,105,108,101,32,105,109,112,111,114,116,115,46, + 99,2,0,0,0,0,0,0,0,0,0,0,0,5,0,0, + 0,5,0,0,0,67,0,0,0,115,68,0,0,0,124,0, + 160,0,124,1,161,1,125,2,124,0,160,1,124,2,161,1, + 125,3,124,1,124,2,100,1,156,2,125,4,116,2,124,3, + 124,1,124,4,131,3,1,0,116,3,116,4,124,3,131,1, + 100,2,100,0,133,2,25,0,124,1,124,2,100,3,141,3, + 83,0,41,4,78,114,183,0,0,0,114,169,0,0,0,41, + 2,114,141,0,0,0,114,132,0,0,0,41,5,114,203,0, + 0,0,114,255,0,0,0,114,176,0,0,0,114,189,0,0, + 0,114,7,1,0,0,41,5,114,143,0,0,0,114,163,0, + 0,0,114,65,0,0,0,114,41,0,0,0,114,175,0,0, 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,248,0,0,0,120,3,0,0,115,18,0,0,0,8,0, - 8,2,8,8,8,14,8,10,8,7,14,10,12,8,255,128, - 114,248,0,0,0,99,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,4,0,0,0,0,0,0,0,115,92, - 0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,100, - 2,100,3,132,0,90,4,100,4,100,5,132,0,90,5,100, - 6,100,7,132,0,90,6,101,7,135,0,102,1,100,8,100, - 9,132,8,131,1,90,8,101,7,100,10,100,11,132,0,131, - 1,90,9,100,12,100,13,132,0,90,10,101,7,100,14,100, - 15,132,0,131,1,90,11,135,0,4,0,90,12,83,0,41, - 16,218,10,70,105,108,101,76,111,97,100,101,114,122,103,66, - 97,115,101,32,102,105,108,101,32,108,111,97,100,101,114,32, - 99,108,97,115,115,32,119,104,105,99,104,32,105,109,112,108, - 101,109,101,110,116,115,32,116,104,101,32,108,111,97,100,101, - 114,32,112,114,111,116,111,99,111,108,32,109,101,116,104,111, - 100,115,32,116,104,97,116,10,32,32,32,32,114,101,113,117, - 105,114,101,32,102,105,108,101,32,115,121,115,116,101,109,32, - 117,115,97,103,101,46,99,3,0,0,0,0,0,0,0,0, - 0,0,0,3,0,0,0,2,0,0,0,67,0,0,0,115, - 16,0,0,0,124,1,124,0,95,0,124,2,124,0,95,1, - 100,1,83,0,41,2,122,75,67,97,99,104,101,32,116,104, - 101,32,109,111,100,117,108,101,32,110,97,109,101,32,97,110, - 100,32,116,104,101,32,112,97,116,104,32,116,111,32,116,104, - 101,32,102,105,108,101,32,102,111,117,110,100,32,98,121,32, - 116,104,101,10,32,32,32,32,32,32,32,32,102,105,110,100, - 101,114,46,78,114,183,0,0,0,41,3,114,143,0,0,0, - 114,163,0,0,0,114,65,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,235,0,0,0,13,4, - 0,0,115,6,0,0,0,6,3,10,1,255,128,122,19,70, - 105,108,101,76,111,97,100,101,114,46,95,95,105,110,105,116, - 95,95,99,2,0,0,0,0,0,0,0,0,0,0,0,2, - 0,0,0,2,0,0,0,67,0,0,0,243,24,0,0,0, - 124,0,106,0,124,1,106,0,107,2,111,11,124,0,106,1, - 124,1,106,1,107,2,83,0,114,69,0,0,0,169,2,218, - 9,95,95,99,108,97,115,115,95,95,114,156,0,0,0,169, - 2,114,143,0,0,0,90,5,111,116,104,101,114,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,218,6,95,95, - 101,113,95,95,19,4,0,0,243,8,0,0,0,12,1,10, - 1,2,255,255,128,122,17,70,105,108,101,76,111,97,100,101, - 114,46,95,95,101,113,95,95,99,1,0,0,0,0,0,0, - 0,0,0,0,0,1,0,0,0,3,0,0,0,67,0,0, - 0,243,20,0,0,0,116,0,124,0,106,1,131,1,116,0, - 124,0,106,2,131,1,65,0,83,0,114,69,0,0,0,169, - 3,218,4,104,97,115,104,114,141,0,0,0,114,65,0,0, - 0,169,1,114,143,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,8,95,95,104,97,115,104,95, - 95,23,4,0,0,243,4,0,0,0,20,1,255,128,122,19, - 70,105,108,101,76,111,97,100,101,114,46,95,95,104,97,115, - 104,95,95,99,2,0,0,0,0,0,0,0,0,0,0,0, - 2,0,0,0,3,0,0,0,3,0,0,0,115,16,0,0, - 0,116,0,116,1,124,0,131,2,160,2,124,1,161,1,83, - 0,41,2,122,100,76,111,97,100,32,97,32,109,111,100,117, - 108,101,32,102,114,111,109,32,97,32,102,105,108,101,46,10, - 10,32,32,32,32,32,32,32,32,84,104,105,115,32,109,101, - 116,104,111,100,32,105,115,32,100,101,112,114,101,99,97,116, - 101,100,46,32,32,85,115,101,32,101,120,101,99,95,109,111, - 100,117,108,101,40,41,32,105,110,115,116,101,97,100,46,10, - 10,32,32,32,32,32,32,32,32,78,41,3,218,5,115,117, - 112,101,114,114,10,1,0,0,114,247,0,0,0,114,246,0, - 0,0,169,1,114,13,1,0,0,114,7,0,0,0,114,8, - 0,0,0,114,247,0,0,0,26,4,0,0,115,4,0,0, - 0,16,10,255,128,122,22,70,105,108,101,76,111,97,100,101, - 114,46,108,111,97,100,95,109,111,100,117,108,101,99,2,0, - 0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0, - 0,0,67,0,0,0,243,6,0,0,0,124,0,106,0,83, - 0,169,2,122,58,82,101,116,117,114,110,32,116,104,101,32, - 112,97,116,104,32,116,111,32,116,104,101,32,115,111,117,114, - 99,101,32,102,105,108,101,32,97,115,32,102,111,117,110,100, - 32,98,121,32,116,104,101,32,102,105,110,100,101,114,46,78, - 114,71,0,0,0,114,246,0,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,203,0,0,0,38,4, - 0,0,243,4,0,0,0,6,3,255,128,122,23,70,105,108, - 101,76,111,97,100,101,114,46,103,101,116,95,102,105,108,101, - 110,97,109,101,99,2,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,8,0,0,0,67,0,0,0,115,128,0, - 0,0,116,0,124,0,116,1,116,2,102,2,131,2,114,36, - 116,3,160,4,116,5,124,1,131,1,161,1,143,12,125,2, - 124,2,160,6,161,0,87,0,2,0,100,1,4,0,4,0, - 131,3,1,0,83,0,49,0,115,29,119,1,1,0,1,0, - 1,0,89,0,1,0,100,1,83,0,116,3,160,7,124,1, - 100,2,161,2,143,12,125,2,124,2,160,6,161,0,87,0, - 2,0,100,1,4,0,4,0,131,3,1,0,83,0,49,0, - 115,57,119,1,1,0,1,0,1,0,89,0,1,0,100,1, - 83,0,41,3,122,39,82,101,116,117,114,110,32,116,104,101, - 32,100,97,116,97,32,102,114,111,109,32,112,97,116,104,32, - 97,115,32,114,97,119,32,98,121,116,101,115,46,78,218,1, - 114,41,8,114,185,0,0,0,114,248,0,0,0,218,19,69, - 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100, - 101,114,114,91,0,0,0,90,9,111,112,101,110,95,99,111, - 100,101,114,109,0,0,0,90,4,114,101,97,100,114,92,0, - 0,0,41,3,114,143,0,0,0,114,65,0,0,0,114,94, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,254,0,0,0,43,4,0,0,115,16,0,0,0, - 14,2,16,1,22,1,20,128,14,2,22,1,20,128,255,128, - 122,19,70,105,108,101,76,111,97,100,101,114,46,103,101,116, - 95,100,97,116,97,99,2,0,0,0,0,0,0,0,0,0, - 0,0,3,0,0,0,2,0,0,0,67,0,0,0,115,20, - 0,0,0,100,1,100,2,108,0,109,1,125,2,1,0,124, - 2,124,0,131,1,83,0,41,3,78,114,0,0,0,0,41, - 1,218,10,70,105,108,101,82,101,97,100,101,114,41,2,218, - 17,105,109,112,111,114,116,108,105,98,46,114,101,97,100,101, - 114,115,114,30,1,0,0,41,3,114,143,0,0,0,114,243, - 0,0,0,114,30,1,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,218,19,103,101,116,95,114,101,115, - 111,117,114,99,101,95,114,101,97,100,101,114,52,4,0,0, - 115,6,0,0,0,12,2,8,1,255,128,122,30,70,105,108, - 101,76,111,97,100,101,114,46,103,101,116,95,114,101,115,111, - 117,114,99,101,95,114,101,97,100,101,114,41,13,114,150,0, - 0,0,114,149,0,0,0,114,151,0,0,0,114,152,0,0, - 0,114,235,0,0,0,114,15,1,0,0,114,21,1,0,0, - 114,160,0,0,0,114,247,0,0,0,114,203,0,0,0,114, - 254,0,0,0,114,32,1,0,0,90,13,95,95,99,108,97, - 115,115,99,101,108,108,95,95,114,7,0,0,0,114,7,0, - 0,0,114,24,1,0,0,114,8,0,0,0,114,10,1,0, - 0,8,4,0,0,115,26,0,0,0,8,0,4,2,8,3, - 8,6,8,4,2,3,14,1,2,11,10,1,8,4,2,9, - 18,1,255,128,114,10,1,0,0,99,0,0,0,0,0,0, + 114,241,0,0,0,107,4,0,0,115,24,0,0,0,10,1, + 10,1,2,4,2,1,6,254,12,4,2,1,14,1,2,1, + 2,1,6,253,255,128,122,29,83,111,117,114,99,101,108,101, + 115,115,70,105,108,101,76,111,97,100,101,114,46,103,101,116, + 95,99,111,100,101,99,2,0,0,0,0,0,0,0,0,0, + 0,0,2,0,0,0,1,0,0,0,67,0,0,0,114,23, + 0,0,0,41,2,122,39,82,101,116,117,114,110,32,78,111, + 110,101,32,97,115,32,116,104,101,114,101,32,105,115,32,110, + 111,32,115,111,117,114,99,101,32,99,111,100,101,46,78,114, + 7,0,0,0,114,247,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,1,1,0,0,123,4,0, + 0,114,24,0,0,0,122,31,83,111,117,114,99,101,108,101, + 115,115,70,105,108,101,76,111,97,100,101,114,46,103,101,116, + 95,115,111,117,114,99,101,78,41,6,114,150,0,0,0,114, + 149,0,0,0,114,151,0,0,0,114,152,0,0,0,114,241, + 0,0,0,114,1,1,0,0,114,7,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,114,41,1,0, + 0,103,4,0,0,115,10,0,0,0,8,0,4,2,8,2, + 12,16,255,128,114,41,1,0,0,99,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,3,0,0,0,64,0, - 0,0,115,46,0,0,0,101,0,90,1,100,0,90,2,100, + 0,0,115,92,0,0,0,101,0,90,1,100,0,90,2,100, 1,90,3,100,2,100,3,132,0,90,4,100,4,100,5,132, - 0,90,5,100,6,100,7,156,1,100,8,100,9,132,2,90, - 6,100,10,83,0,41,11,218,16,83,111,117,114,99,101,70, - 105,108,101,76,111,97,100,101,114,122,62,67,111,110,99,114, - 101,116,101,32,105,109,112,108,101,109,101,110,116,97,116,105, - 111,110,32,111,102,32,83,111,117,114,99,101,76,111,97,100, - 101,114,32,117,115,105,110,103,32,116,104,101,32,102,105,108, - 101,32,115,121,115,116,101,109,46,99,2,0,0,0,0,0, - 0,0,0,0,0,0,3,0,0,0,3,0,0,0,67,0, - 0,0,115,22,0,0,0,116,0,124,1,131,1,125,2,124, - 2,106,1,124,2,106,2,100,1,156,2,83,0,41,3,122, - 33,82,101,116,117,114,110,32,116,104,101,32,109,101,116,97, - 100,97,116,97,32,102,111,114,32,116,104,101,32,112,97,116, - 104,46,41,2,114,193,0,0,0,114,5,1,0,0,78,41, - 3,114,75,0,0,0,218,8,115,116,95,109,116,105,109,101, - 90,7,115,116,95,115,105,122,101,41,3,114,143,0,0,0, - 114,65,0,0,0,114,9,1,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,251,0,0,0,62,4, - 0,0,115,6,0,0,0,8,2,14,1,255,128,122,27,83, - 111,117,114,99,101,70,105,108,101,76,111,97,100,101,114,46, - 112,97,116,104,95,115,116,97,116,115,99,4,0,0,0,0, - 0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,67, - 0,0,0,115,24,0,0,0,116,0,124,1,131,1,125,4, - 124,0,106,1,124,2,124,3,124,4,100,1,141,3,83,0, - 41,2,78,169,1,218,5,95,109,111,100,101,41,2,114,139, - 0,0,0,114,252,0,0,0,41,5,114,143,0,0,0,114, - 134,0,0,0,114,132,0,0,0,114,41,0,0,0,114,78, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,253,0,0,0,67,4,0,0,115,6,0,0,0, - 8,2,16,1,255,128,122,32,83,111,117,114,99,101,70,105, - 108,101,76,111,97,100,101,114,46,95,99,97,99,104,101,95, - 98,121,116,101,99,111,100,101,114,87,0,0,0,114,35,1, - 0,0,99,3,0,0,0,0,0,0,0,1,0,0,0,9, - 0,0,0,11,0,0,0,67,0,0,0,115,254,0,0,0, - 116,0,124,1,131,1,92,2,125,4,125,5,103,0,125,6, - 124,4,114,31,116,1,124,4,131,1,115,31,116,0,124,4, - 131,1,92,2,125,4,125,7,124,6,160,2,124,7,161,1, - 1,0,124,4,114,31,116,1,124,4,131,1,114,14,116,3, - 124,6,131,1,68,0,93,48,125,7,116,4,124,4,124,7, - 131,2,125,4,122,7,116,5,160,6,124,4,161,1,1,0, - 87,0,113,35,4,0,116,7,121,58,1,0,1,0,1,0, - 89,0,113,35,4,0,116,8,121,126,1,0,125,8,1,0, - 122,15,116,9,160,10,100,1,124,4,124,8,161,3,1,0, - 87,0,89,0,100,2,125,8,126,8,1,0,100,2,83,0, - 100,2,125,8,126,8,119,1,122,15,116,11,124,1,124,2, - 124,3,131,3,1,0,116,9,160,10,100,3,124,1,161,2, - 1,0,87,0,100,2,83,0,4,0,116,8,121,125,1,0, - 125,8,1,0,122,14,116,9,160,10,100,1,124,1,124,8, - 161,3,1,0,87,0,89,0,100,2,125,8,126,8,100,2, - 83,0,100,2,125,8,126,8,119,1,119,0,119,0,41,4, - 122,27,87,114,105,116,101,32,98,121,116,101,115,32,100,97, - 116,97,32,116,111,32,97,32,102,105,108,101,46,122,27,99, - 111,117,108,100,32,110,111,116,32,99,114,101,97,116,101,32, - 123,33,114,125,58,32,123,33,114,125,78,122,12,99,114,101, - 97,116,101,100,32,123,33,114,125,41,12,114,74,0,0,0, - 114,83,0,0,0,114,61,0,0,0,218,8,114,101,118,101, - 114,115,101,100,114,67,0,0,0,114,18,0,0,0,90,5, - 109,107,100,105,114,218,15,70,105,108,101,69,120,105,115,116, - 115,69,114,114,111,114,114,76,0,0,0,114,159,0,0,0, - 114,173,0,0,0,114,95,0,0,0,41,9,114,143,0,0, - 0,114,65,0,0,0,114,41,0,0,0,114,36,1,0,0, - 218,6,112,97,114,101,110,116,114,120,0,0,0,114,63,0, - 0,0,114,68,0,0,0,114,255,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,252,0,0,0, - 72,4,0,0,115,58,0,0,0,12,2,4,1,12,2,12, - 1,10,1,12,254,12,4,10,1,2,1,14,1,12,1,4, - 2,14,1,6,3,4,1,4,255,16,2,8,128,2,1,12, - 1,18,1,14,1,8,2,2,1,18,255,8,128,2,254,2, - 247,255,128,122,25,83,111,117,114,99,101,70,105,108,101,76, - 111,97,100,101,114,46,115,101,116,95,100,97,116,97,78,41, - 7,114,150,0,0,0,114,149,0,0,0,114,151,0,0,0, - 114,152,0,0,0,114,251,0,0,0,114,253,0,0,0,114, - 252,0,0,0,114,7,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,33,1,0,0,58,4,0, - 0,115,12,0,0,0,8,0,4,2,8,2,8,5,18,5, - 255,128,114,33,1,0,0,99,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,2,0,0,0,64,0,0,0, - 115,32,0,0,0,101,0,90,1,100,0,90,2,100,1,90, - 3,100,2,100,3,132,0,90,4,100,4,100,5,132,0,90, - 5,100,6,83,0,41,7,218,20,83,111,117,114,99,101,108, - 101,115,115,70,105,108,101,76,111,97,100,101,114,122,45,76, - 111,97,100,101,114,32,119,104,105,99,104,32,104,97,110,100, - 108,101,115,32,115,111,117,114,99,101,108,101,115,115,32,102, - 105,108,101,32,105,109,112,111,114,116,115,46,99,2,0,0, - 0,0,0,0,0,0,0,0,0,5,0,0,0,5,0,0, - 0,67,0,0,0,115,68,0,0,0,124,0,160,0,124,1, - 161,1,125,2,124,0,160,1,124,2,161,1,125,3,124,1, - 124,2,100,1,156,2,125,4,116,2,124,3,124,1,124,4, - 131,3,1,0,116,3,116,4,124,3,131,1,100,2,100,0, - 133,2,25,0,124,1,124,2,100,3,141,3,83,0,41,4, - 78,114,183,0,0,0,114,169,0,0,0,41,2,114,141,0, - 0,0,114,132,0,0,0,41,5,114,203,0,0,0,114,254, - 0,0,0,114,176,0,0,0,114,189,0,0,0,114,6,1, - 0,0,41,5,114,143,0,0,0,114,163,0,0,0,114,65, - 0,0,0,114,41,0,0,0,114,175,0,0,0,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,114,240,0,0, - 0,107,4,0,0,115,24,0,0,0,10,1,10,1,2,4, - 2,1,6,254,12,4,2,1,14,1,2,1,2,1,6,253, - 255,128,122,29,83,111,117,114,99,101,108,101,115,115,70,105, - 108,101,76,111,97,100,101,114,46,103,101,116,95,99,111,100, - 101,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,1,0,0,0,67,0,0,0,114,23,0,0,0,41, - 2,122,39,82,101,116,117,114,110,32,78,111,110,101,32,97, - 115,32,116,104,101,114,101,32,105,115,32,110,111,32,115,111, - 117,114,99,101,32,99,111,100,101,46,78,114,7,0,0,0, - 114,246,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,0,1,0,0,123,4,0,0,114,24,0, - 0,0,122,31,83,111,117,114,99,101,108,101,115,115,70,105, + 0,90,5,100,6,100,7,132,0,90,6,100,8,100,9,132, + 0,90,7,100,10,100,11,132,0,90,8,100,12,100,13,132, + 0,90,9,100,14,100,15,132,0,90,10,100,16,100,17,132, + 0,90,11,101,12,100,18,100,19,132,0,131,1,90,13,100, + 20,83,0,41,21,114,30,1,0,0,122,93,76,111,97,100, + 101,114,32,102,111,114,32,101,120,116,101,110,115,105,111,110, + 32,109,111,100,117,108,101,115,46,10,10,32,32,32,32,84, + 104,101,32,99,111,110,115,116,114,117,99,116,111,114,32,105, + 115,32,100,101,115,105,103,110,101,100,32,116,111,32,119,111, + 114,107,32,119,105,116,104,32,70,105,108,101,70,105,110,100, + 101,114,46,10,10,32,32,32,32,99,3,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,2,0,0,0,67,0, + 0,0,115,16,0,0,0,124,1,124,0,95,0,124,2,124, + 0,95,1,100,0,83,0,114,69,0,0,0,114,183,0,0, + 0,41,3,114,143,0,0,0,114,141,0,0,0,114,65,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,114,236,0,0,0,136,4,0,0,115,6,0,0,0,6, + 1,10,1,255,128,122,28,69,120,116,101,110,115,105,111,110, + 70,105,108,101,76,111,97,100,101,114,46,95,95,105,110,105, + 116,95,95,99,2,0,0,0,0,0,0,0,0,0,0,0, + 2,0,0,0,2,0,0,0,67,0,0,0,114,12,1,0, + 0,114,69,0,0,0,114,13,1,0,0,114,15,1,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, + 16,1,0,0,140,4,0,0,114,17,1,0,0,122,26,69, + 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100, + 101,114,46,95,95,101,113,95,95,99,1,0,0,0,0,0, + 0,0,0,0,0,0,1,0,0,0,3,0,0,0,67,0, + 0,0,114,18,1,0,0,114,69,0,0,0,114,19,1,0, + 0,114,21,1,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,22,1,0,0,144,4,0,0,114,23, + 1,0,0,122,28,69,120,116,101,110,115,105,111,110,70,105, + 108,101,76,111,97,100,101,114,46,95,95,104,97,115,104,95, + 95,99,2,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,5,0,0,0,67,0,0,0,115,36,0,0,0,116, + 0,160,1,116,2,106,3,124,1,161,2,125,2,116,0,160, + 4,100,1,124,1,106,5,124,0,106,6,161,3,1,0,124, + 2,83,0,41,3,122,38,67,114,101,97,116,101,32,97,110, + 32,117,110,105,116,105,97,108,105,122,101,100,32,101,120,116, + 101,110,115,105,111,110,32,109,111,100,117,108,101,122,38,101, + 120,116,101,110,115,105,111,110,32,109,111,100,117,108,101,32, + 123,33,114,125,32,108,111,97,100,101,100,32,102,114,111,109, + 32,123,33,114,125,78,41,7,114,159,0,0,0,114,242,0, + 0,0,114,187,0,0,0,90,14,99,114,101,97,116,101,95, + 100,121,110,97,109,105,99,114,173,0,0,0,114,141,0,0, + 0,114,65,0,0,0,41,3,114,143,0,0,0,114,210,0, + 0,0,114,244,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,239,0,0,0,147,4,0,0,115, + 16,0,0,0,4,2,6,1,4,255,6,2,8,1,4,255, + 4,2,255,128,122,33,69,120,116,101,110,115,105,111,110,70, + 105,108,101,76,111,97,100,101,114,46,99,114,101,97,116,101, + 95,109,111,100,117,108,101,99,2,0,0,0,0,0,0,0, + 0,0,0,0,2,0,0,0,5,0,0,0,67,0,0,0, + 115,36,0,0,0,116,0,160,1,116,2,106,3,124,1,161, + 2,1,0,116,0,160,4,100,1,124,0,106,5,124,0,106, + 6,161,3,1,0,100,2,83,0,41,3,122,30,73,110,105, + 116,105,97,108,105,122,101,32,97,110,32,101,120,116,101,110, + 115,105,111,110,32,109,111,100,117,108,101,122,40,101,120,116, + 101,110,115,105,111,110,32,109,111,100,117,108,101,32,123,33, + 114,125,32,101,120,101,99,117,116,101,100,32,102,114,111,109, + 32,123,33,114,125,78,41,7,114,159,0,0,0,114,242,0, + 0,0,114,187,0,0,0,90,12,101,120,101,99,95,100,121, + 110,97,109,105,99,114,173,0,0,0,114,141,0,0,0,114, + 65,0,0,0,169,2,114,143,0,0,0,114,244,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, + 245,0,0,0,155,4,0,0,115,10,0,0,0,14,2,6, + 1,8,1,8,255,255,128,122,31,69,120,116,101,110,115,105, + 111,110,70,105,108,101,76,111,97,100,101,114,46,101,120,101, + 99,95,109,111,100,117,108,101,99,2,0,0,0,0,0,0, + 0,0,0,0,0,2,0,0,0,4,0,0,0,3,0,0, + 0,115,36,0,0,0,116,0,124,0,106,1,131,1,100,1, + 25,0,137,0,116,2,135,0,102,1,100,2,100,3,132,8, + 116,3,68,0,131,1,131,1,83,0,41,5,122,49,82,101, + 116,117,114,110,32,84,114,117,101,32,105,102,32,116,104,101, + 32,101,120,116,101,110,115,105,111,110,32,109,111,100,117,108, + 101,32,105,115,32,97,32,112,97,99,107,97,103,101,46,114, + 3,0,0,0,99,1,0,0,0,0,0,0,0,0,0,0, + 0,2,0,0,0,4,0,0,0,51,0,0,0,115,28,0, + 0,0,129,0,124,0,93,9,125,1,136,0,100,0,124,1, + 23,0,107,2,86,0,1,0,113,2,100,1,83,0,41,2, + 114,236,0,0,0,78,114,7,0,0,0,169,2,114,5,0, + 0,0,218,6,115,117,102,102,105,120,169,1,90,9,102,105, + 108,101,95,110,97,109,101,114,7,0,0,0,114,8,0,0, + 0,114,9,0,0,0,164,4,0,0,115,8,0,0,0,6, + 128,2,1,20,255,255,128,122,49,69,120,116,101,110,115,105, + 111,110,70,105,108,101,76,111,97,100,101,114,46,105,115,95, + 112,97,99,107,97,103,101,46,60,108,111,99,97,108,115,62, + 46,60,103,101,110,101,120,112,114,62,78,41,4,114,74,0, + 0,0,114,65,0,0,0,218,3,97,110,121,114,232,0,0, + 0,114,247,0,0,0,114,7,0,0,0,114,45,1,0,0, + 114,8,0,0,0,114,206,0,0,0,161,4,0,0,115,10, + 0,0,0,14,2,12,1,2,1,8,255,255,128,122,30,69, + 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100, + 101,114,46,105,115,95,112,97,99,107,97,103,101,99,2,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,1,0, + 0,0,67,0,0,0,114,23,0,0,0,41,2,122,63,82, + 101,116,117,114,110,32,78,111,110,101,32,97,115,32,97,110, + 32,101,120,116,101,110,115,105,111,110,32,109,111,100,117,108, + 101,32,99,97,110,110,111,116,32,99,114,101,97,116,101,32, + 97,32,99,111,100,101,32,111,98,106,101,99,116,46,78,114, + 7,0,0,0,114,247,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,241,0,0,0,167,4,0, + 0,114,24,0,0,0,122,28,69,120,116,101,110,115,105,111, + 110,70,105,108,101,76,111,97,100,101,114,46,103,101,116,95, + 99,111,100,101,99,2,0,0,0,0,0,0,0,0,0,0, + 0,2,0,0,0,1,0,0,0,67,0,0,0,114,23,0, + 0,0,41,2,122,53,82,101,116,117,114,110,32,78,111,110, + 101,32,97,115,32,101,120,116,101,110,115,105,111,110,32,109, + 111,100,117,108,101,115,32,104,97,118,101,32,110,111,32,115, + 111,117,114,99,101,32,99,111,100,101,46,78,114,7,0,0, + 0,114,247,0,0,0,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,1,1,0,0,171,4,0,0,114,24, + 0,0,0,122,30,69,120,116,101,110,115,105,111,110,70,105, 108,101,76,111,97,100,101,114,46,103,101,116,95,115,111,117, - 114,99,101,78,41,6,114,150,0,0,0,114,149,0,0,0, - 114,151,0,0,0,114,152,0,0,0,114,240,0,0,0,114, - 0,1,0,0,114,7,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,40,1,0,0,103,4,0, - 0,115,10,0,0,0,8,0,4,2,8,2,12,16,255,128, - 114,40,1,0,0,99,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,3,0,0,0,64,0,0,0,115,92, - 0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,100, - 2,100,3,132,0,90,4,100,4,100,5,132,0,90,5,100, - 6,100,7,132,0,90,6,100,8,100,9,132,0,90,7,100, - 10,100,11,132,0,90,8,100,12,100,13,132,0,90,9,100, - 14,100,15,132,0,90,10,100,16,100,17,132,0,90,11,101, - 12,100,18,100,19,132,0,131,1,90,13,100,20,83,0,41, - 21,114,29,1,0,0,122,93,76,111,97,100,101,114,32,102, - 111,114,32,101,120,116,101,110,115,105,111,110,32,109,111,100, - 117,108,101,115,46,10,10,32,32,32,32,84,104,101,32,99, - 111,110,115,116,114,117,99,116,111,114,32,105,115,32,100,101, - 115,105,103,110,101,100,32,116,111,32,119,111,114,107,32,119, - 105,116,104,32,70,105,108,101,70,105,110,100,101,114,46,10, - 10,32,32,32,32,99,3,0,0,0,0,0,0,0,0,0, - 0,0,3,0,0,0,2,0,0,0,67,0,0,0,115,16, - 0,0,0,124,1,124,0,95,0,124,2,124,0,95,1,100, - 0,83,0,114,69,0,0,0,114,183,0,0,0,41,3,114, - 143,0,0,0,114,141,0,0,0,114,65,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,235,0, - 0,0,136,4,0,0,115,6,0,0,0,6,1,10,1,255, - 128,122,28,69,120,116,101,110,115,105,111,110,70,105,108,101, - 76,111,97,100,101,114,46,95,95,105,110,105,116,95,95,99, - 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 2,0,0,0,67,0,0,0,114,11,1,0,0,114,69,0, - 0,0,114,12,1,0,0,114,14,1,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,15,1,0,0, - 140,4,0,0,114,16,1,0,0,122,26,69,120,116,101,110, - 115,105,111,110,70,105,108,101,76,111,97,100,101,114,46,95, - 95,101,113,95,95,99,1,0,0,0,0,0,0,0,0,0, - 0,0,1,0,0,0,3,0,0,0,67,0,0,0,114,17, - 1,0,0,114,69,0,0,0,114,18,1,0,0,114,20,1, + 114,99,101,99,2,0,0,0,0,0,0,0,0,0,0,0, + 2,0,0,0,1,0,0,0,67,0,0,0,114,26,1,0, + 0,114,27,1,0,0,114,71,0,0,0,114,247,0,0,0, + 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, + 203,0,0,0,175,4,0,0,114,28,1,0,0,122,32,69, + 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100, + 101,114,46,103,101,116,95,102,105,108,101,110,97,109,101,78, + 41,14,114,150,0,0,0,114,149,0,0,0,114,151,0,0, + 0,114,152,0,0,0,114,236,0,0,0,114,16,1,0,0, + 114,22,1,0,0,114,239,0,0,0,114,245,0,0,0,114, + 206,0,0,0,114,241,0,0,0,114,1,1,0,0,114,160, + 0,0,0,114,203,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,114,30,1,0, + 0,128,4,0,0,115,26,0,0,0,8,0,4,2,8,6, + 8,4,8,4,8,3,8,8,8,6,8,6,8,4,2,4, + 14,1,255,128,114,30,1,0,0,99,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,64,0, + 0,0,115,104,0,0,0,101,0,90,1,100,0,90,2,100, + 1,90,3,100,2,100,3,132,0,90,4,100,4,100,5,132, + 0,90,5,100,6,100,7,132,0,90,6,100,8,100,9,132, + 0,90,7,100,10,100,11,132,0,90,8,100,12,100,13,132, + 0,90,9,100,14,100,15,132,0,90,10,100,16,100,17,132, + 0,90,11,100,18,100,19,132,0,90,12,100,20,100,21,132, + 0,90,13,100,22,100,23,132,0,90,14,100,24,83,0,41, + 25,218,14,95,78,97,109,101,115,112,97,99,101,80,97,116, + 104,97,38,1,0,0,82,101,112,114,101,115,101,110,116,115, + 32,97,32,110,97,109,101,115,112,97,99,101,32,112,97,99, + 107,97,103,101,39,115,32,112,97,116,104,46,32,32,73,116, + 32,117,115,101,115,32,116,104,101,32,109,111,100,117,108,101, + 32,110,97,109,101,10,32,32,32,32,116,111,32,102,105,110, + 100,32,105,116,115,32,112,97,114,101,110,116,32,109,111,100, + 117,108,101,44,32,97,110,100,32,102,114,111,109,32,116,104, + 101,114,101,32,105,116,32,108,111,111,107,115,32,117,112,32, + 116,104,101,32,112,97,114,101,110,116,39,115,10,32,32,32, + 32,95,95,112,97,116,104,95,95,46,32,32,87,104,101,110, + 32,116,104,105,115,32,99,104,97,110,103,101,115,44,32,116, + 104,101,32,109,111,100,117,108,101,39,115,32,111,119,110,32, + 112,97,116,104,32,105,115,32,114,101,99,111,109,112,117,116, + 101,100,44,10,32,32,32,32,117,115,105,110,103,32,112,97, + 116,104,95,102,105,110,100,101,114,46,32,32,70,111,114,32, + 116,111,112,45,108,101,118,101,108,32,109,111,100,117,108,101, + 115,44,32,116,104,101,32,112,97,114,101,110,116,32,109,111, + 100,117,108,101,39,115,32,112,97,116,104,10,32,32,32,32, + 105,115,32,115,121,115,46,112,97,116,104,46,99,4,0,0, + 0,0,0,0,0,0,0,0,0,4,0,0,0,3,0,0, + 0,67,0,0,0,115,36,0,0,0,124,1,124,0,95,0, + 124,2,124,0,95,1,116,2,124,0,160,3,161,0,131,1, + 124,0,95,4,124,3,124,0,95,5,100,0,83,0,114,69, + 0,0,0,41,6,218,5,95,110,97,109,101,218,5,95,112, + 97,116,104,114,136,0,0,0,218,16,95,103,101,116,95,112, + 97,114,101,110,116,95,112,97,116,104,218,17,95,108,97,115, + 116,95,112,97,114,101,110,116,95,112,97,116,104,218,12,95, + 112,97,116,104,95,102,105,110,100,101,114,169,4,114,143,0, + 0,0,114,141,0,0,0,114,65,0,0,0,90,11,112,97, + 116,104,95,102,105,110,100,101,114,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,236,0,0,0,188,4,0, + 0,115,10,0,0,0,6,1,6,1,14,1,10,1,255,128, + 122,23,95,78,97,109,101,115,112,97,99,101,80,97,116,104, + 46,95,95,105,110,105,116,95,95,99,1,0,0,0,0,0, + 0,0,0,0,0,0,4,0,0,0,3,0,0,0,67,0, + 0,0,115,38,0,0,0,124,0,106,0,160,1,100,1,161, + 1,92,3,125,1,125,2,125,3,124,2,100,2,107,2,114, + 15,100,3,83,0,124,1,100,4,102,2,83,0,41,6,122, + 62,82,101,116,117,114,110,115,32,97,32,116,117,112,108,101, + 32,111,102,32,40,112,97,114,101,110,116,45,109,111,100,117, + 108,101,45,110,97,109,101,44,32,112,97,114,101,110,116,45, + 112,97,116,104,45,97,116,116,114,45,110,97,109,101,41,114, + 97,0,0,0,114,10,0,0,0,41,2,114,15,0,0,0, + 114,65,0,0,0,90,8,95,95,112,97,116,104,95,95,78, + 41,2,114,48,1,0,0,114,104,0,0,0,41,4,114,143, + 0,0,0,114,40,1,0,0,218,3,100,111,116,90,2,109, + 101,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 218,23,95,102,105,110,100,95,112,97,114,101,110,116,95,112, + 97,116,104,95,110,97,109,101,115,194,4,0,0,115,10,0, + 0,0,18,2,8,1,4,2,8,3,255,128,122,38,95,78, + 97,109,101,115,112,97,99,101,80,97,116,104,46,95,102,105, + 110,100,95,112,97,114,101,110,116,95,112,97,116,104,95,110, + 97,109,101,115,99,1,0,0,0,0,0,0,0,0,0,0, + 0,3,0,0,0,3,0,0,0,67,0,0,0,115,28,0, + 0,0,124,0,160,0,161,0,92,2,125,1,125,2,116,1, + 116,2,106,3,124,1,25,0,124,2,131,2,83,0,114,69, + 0,0,0,41,4,114,55,1,0,0,114,155,0,0,0,114, + 15,0,0,0,218,7,109,111,100,117,108,101,115,41,3,114, + 143,0,0,0,90,18,112,97,114,101,110,116,95,109,111,100, + 117,108,101,95,110,97,109,101,90,14,112,97,116,104,95,97, + 116,116,114,95,110,97,109,101,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,50,1,0,0,204,4,0,0, + 115,6,0,0,0,12,1,16,1,255,128,122,31,95,78,97, + 109,101,115,112,97,99,101,80,97,116,104,46,95,103,101,116, + 95,112,97,114,101,110,116,95,112,97,116,104,99,1,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0, + 0,67,0,0,0,115,80,0,0,0,116,0,124,0,160,1, + 161,0,131,1,125,1,124,1,124,0,106,2,107,3,114,37, + 124,0,160,3,124,0,106,4,124,1,161,2,125,2,124,2, + 100,0,117,1,114,34,124,2,106,5,100,0,117,0,114,34, + 124,2,106,6,114,34,124,2,106,6,124,0,95,7,124,1, + 124,0,95,2,124,0,106,7,83,0,114,69,0,0,0,41, + 8,114,136,0,0,0,114,50,1,0,0,114,51,1,0,0, + 114,52,1,0,0,114,48,1,0,0,114,164,0,0,0,114, + 202,0,0,0,114,49,1,0,0,41,3,114,143,0,0,0, + 90,11,112,97,114,101,110,116,95,112,97,116,104,114,210,0, 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,114,21,1,0,0,144,4,0,0,114,22,1,0,0,122, - 28,69,120,116,101,110,115,105,111,110,70,105,108,101,76,111, - 97,100,101,114,46,95,95,104,97,115,104,95,95,99,2,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,5,0, - 0,0,67,0,0,0,115,36,0,0,0,116,0,160,1,116, - 2,106,3,124,1,161,2,125,2,116,0,160,4,100,1,124, - 1,106,5,124,0,106,6,161,3,1,0,124,2,83,0,41, - 3,122,38,67,114,101,97,116,101,32,97,110,32,117,110,105, - 116,105,97,108,105,122,101,100,32,101,120,116,101,110,115,105, - 111,110,32,109,111,100,117,108,101,122,38,101,120,116,101,110, - 115,105,111,110,32,109,111,100,117,108,101,32,123,33,114,125, - 32,108,111,97,100,101,100,32,102,114,111,109,32,123,33,114, - 125,78,41,7,114,159,0,0,0,114,241,0,0,0,114,187, - 0,0,0,90,14,99,114,101,97,116,101,95,100,121,110,97, - 109,105,99,114,173,0,0,0,114,141,0,0,0,114,65,0, - 0,0,41,3,114,143,0,0,0,114,210,0,0,0,114,243, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,238,0,0,0,147,4,0,0,115,16,0,0,0, - 4,2,6,1,4,255,6,2,8,1,4,255,4,2,255,128, - 122,33,69,120,116,101,110,115,105,111,110,70,105,108,101,76, - 111,97,100,101,114,46,99,114,101,97,116,101,95,109,111,100, - 117,108,101,99,2,0,0,0,0,0,0,0,0,0,0,0, - 2,0,0,0,5,0,0,0,67,0,0,0,115,36,0,0, - 0,116,0,160,1,116,2,106,3,124,1,161,2,1,0,116, - 0,160,4,100,1,124,0,106,5,124,0,106,6,161,3,1, - 0,100,2,83,0,41,3,122,30,73,110,105,116,105,97,108, - 105,122,101,32,97,110,32,101,120,116,101,110,115,105,111,110, - 32,109,111,100,117,108,101,122,40,101,120,116,101,110,115,105, - 111,110,32,109,111,100,117,108,101,32,123,33,114,125,32,101, - 120,101,99,117,116,101,100,32,102,114,111,109,32,123,33,114, - 125,78,41,7,114,159,0,0,0,114,241,0,0,0,114,187, - 0,0,0,90,12,101,120,101,99,95,100,121,110,97,109,105, - 99,114,173,0,0,0,114,141,0,0,0,114,65,0,0,0, - 169,2,114,143,0,0,0,114,243,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,244,0,0,0, - 155,4,0,0,115,10,0,0,0,14,2,6,1,8,1,8, - 255,255,128,122,31,69,120,116,101,110,115,105,111,110,70,105, - 108,101,76,111,97,100,101,114,46,101,120,101,99,95,109,111, - 100,117,108,101,99,2,0,0,0,0,0,0,0,0,0,0, - 0,2,0,0,0,4,0,0,0,3,0,0,0,115,36,0, - 0,0,116,0,124,0,106,1,131,1,100,1,25,0,137,0, - 116,2,135,0,102,1,100,2,100,3,132,8,116,3,68,0, - 131,1,131,1,83,0,41,5,122,49,82,101,116,117,114,110, - 32,84,114,117,101,32,105,102,32,116,104,101,32,101,120,116, - 101,110,115,105,111,110,32,109,111,100,117,108,101,32,105,115, - 32,97,32,112,97,99,107,97,103,101,46,114,3,0,0,0, - 99,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,4,0,0,0,51,0,0,0,115,28,0,0,0,129,0, - 124,0,93,9,125,1,136,0,100,0,124,1,23,0,107,2, - 86,0,1,0,113,2,100,1,83,0,41,2,114,235,0,0, - 0,78,114,7,0,0,0,169,2,114,5,0,0,0,218,6, - 115,117,102,102,105,120,169,1,90,9,102,105,108,101,95,110, - 97,109,101,114,7,0,0,0,114,8,0,0,0,114,9,0, - 0,0,164,4,0,0,115,8,0,0,0,6,128,2,1,20, - 255,255,128,122,49,69,120,116,101,110,115,105,111,110,70,105, - 108,101,76,111,97,100,101,114,46,105,115,95,112,97,99,107, - 97,103,101,46,60,108,111,99,97,108,115,62,46,60,103,101, - 110,101,120,112,114,62,78,41,4,114,74,0,0,0,114,65, - 0,0,0,218,3,97,110,121,114,231,0,0,0,114,246,0, - 0,0,114,7,0,0,0,114,44,1,0,0,114,8,0,0, - 0,114,206,0,0,0,161,4,0,0,115,10,0,0,0,14, - 2,12,1,2,1,8,255,255,128,122,30,69,120,116,101,110, - 115,105,111,110,70,105,108,101,76,111,97,100,101,114,46,105, + 0,218,12,95,114,101,99,97,108,99,117,108,97,116,101,208, + 4,0,0,115,18,0,0,0,12,2,10,1,14,1,18,3, + 6,1,8,1,6,1,6,1,255,128,122,27,95,78,97,109, + 101,115,112,97,99,101,80,97,116,104,46,95,114,101,99,97, + 108,99,117,108,97,116,101,99,1,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,3,0,0,0,67,0,0,0, + 243,12,0,0,0,116,0,124,0,160,1,161,0,131,1,83, + 0,114,69,0,0,0,41,2,218,4,105,116,101,114,114,57, + 1,0,0,114,21,1,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,218,8,95,95,105,116,101,114,95, + 95,221,4,0,0,243,4,0,0,0,12,1,255,128,122,23, + 95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95, + 95,105,116,101,114,95,95,99,2,0,0,0,0,0,0,0, + 0,0,0,0,2,0,0,0,2,0,0,0,67,0,0,0, + 115,12,0,0,0,124,0,160,0,161,0,124,1,25,0,83, + 0,114,69,0,0,0,169,1,114,57,1,0,0,41,2,114, + 143,0,0,0,218,5,105,110,100,101,120,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,218,11,95,95,103,101, + 116,105,116,101,109,95,95,224,4,0,0,114,61,1,0,0, + 122,26,95,78,97,109,101,115,112,97,99,101,80,97,116,104, + 46,95,95,103,101,116,105,116,101,109,95,95,99,3,0,0, + 0,0,0,0,0,0,0,0,0,3,0,0,0,3,0,0, + 0,67,0,0,0,115,14,0,0,0,124,2,124,0,106,0, + 124,1,60,0,100,0,83,0,114,69,0,0,0,41,1,114, + 49,1,0,0,41,3,114,143,0,0,0,114,63,1,0,0, + 114,65,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,218,11,95,95,115,101,116,105,116,101,109,95, + 95,227,4,0,0,115,4,0,0,0,14,1,255,128,122,26, + 95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95, + 95,115,101,116,105,116,101,109,95,95,99,1,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,67, + 0,0,0,114,58,1,0,0,114,69,0,0,0,41,2,114, + 4,0,0,0,114,57,1,0,0,114,21,1,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,218,7,95, + 95,108,101,110,95,95,230,4,0,0,114,61,1,0,0,122, + 22,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46, + 95,95,108,101,110,95,95,99,1,0,0,0,0,0,0,0, + 0,0,0,0,1,0,0,0,3,0,0,0,67,0,0,0, + 243,12,0,0,0,100,1,160,0,124,0,106,1,161,1,83, + 0,41,2,78,122,20,95,78,97,109,101,115,112,97,99,101, + 80,97,116,104,40,123,33,114,125,41,41,2,114,89,0,0, + 0,114,49,1,0,0,114,21,1,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,218,8,95,95,114,101, + 112,114,95,95,233,4,0,0,114,61,1,0,0,122,23,95, + 78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,95, + 114,101,112,114,95,95,99,2,0,0,0,0,0,0,0,0, + 0,0,0,2,0,0,0,3,0,0,0,67,0,0,0,115, + 12,0,0,0,124,1,124,0,160,0,161,0,118,0,83,0, + 114,69,0,0,0,114,62,1,0,0,169,2,114,143,0,0, + 0,218,4,105,116,101,109,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,12,95,95,99,111,110,116,97,105, + 110,115,95,95,236,4,0,0,114,61,1,0,0,122,27,95, + 78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,95, + 99,111,110,116,97,105,110,115,95,95,99,2,0,0,0,0, + 0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,67, + 0,0,0,115,16,0,0,0,124,0,106,0,160,1,124,1, + 161,1,1,0,100,0,83,0,114,69,0,0,0,41,2,114, + 49,1,0,0,114,61,0,0,0,114,69,1,0,0,114,7, + 0,0,0,114,7,0,0,0,114,8,0,0,0,114,61,0, + 0,0,239,4,0,0,243,4,0,0,0,16,1,255,128,122, + 21,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46, + 97,112,112,101,110,100,78,41,15,114,150,0,0,0,114,149, + 0,0,0,114,151,0,0,0,114,152,0,0,0,114,236,0, + 0,0,114,55,1,0,0,114,50,1,0,0,114,57,1,0, + 0,114,60,1,0,0,114,64,1,0,0,114,65,1,0,0, + 114,66,1,0,0,114,68,1,0,0,114,71,1,0,0,114, + 61,0,0,0,114,7,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,47,1,0,0,181,4,0, + 0,115,28,0,0,0,8,0,4,1,8,6,8,6,8,10, + 8,4,8,13,8,3,8,3,8,3,8,3,8,3,12,3, + 255,128,114,47,1,0,0,99,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,64,0,0,0, + 115,88,0,0,0,101,0,90,1,100,0,90,2,100,1,100, + 2,132,0,90,3,101,4,100,3,100,4,132,0,131,1,90, + 5,100,5,100,6,132,0,90,6,100,7,100,8,132,0,90, + 7,100,9,100,10,132,0,90,8,100,11,100,12,132,0,90, + 9,100,13,100,14,132,0,90,10,100,15,100,16,132,0,90, + 11,100,17,100,18,132,0,90,12,100,19,83,0,41,20,218, + 16,95,78,97,109,101,115,112,97,99,101,76,111,97,100,101, + 114,99,4,0,0,0,0,0,0,0,0,0,0,0,4,0, + 0,0,4,0,0,0,67,0,0,0,115,18,0,0,0,116, + 0,124,1,124,2,124,3,131,3,124,0,95,1,100,0,83, + 0,114,69,0,0,0,41,2,114,47,1,0,0,114,49,1, + 0,0,114,53,1,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,236,0,0,0,245,4,0,0,115, + 4,0,0,0,18,1,255,128,122,25,95,78,97,109,101,115, + 112,97,99,101,76,111,97,100,101,114,46,95,95,105,110,105, + 116,95,95,99,1,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,4,0,0,0,67,0,0,0,115,24,0,0, + 0,116,0,160,1,100,1,116,2,161,2,1,0,100,2,160, + 3,124,0,106,4,161,1,83,0,41,4,122,115,82,101,116, + 117,114,110,32,114,101,112,114,32,102,111,114,32,116,104,101, + 32,109,111,100,117,108,101,46,10,10,32,32,32,32,32,32, + 32,32,84,104,101,32,109,101,116,104,111,100,32,105,115,32, + 100,101,112,114,101,99,97,116,101,100,46,32,32,84,104,101, + 32,105,109,112,111,114,116,32,109,97,99,104,105,110,101,114, + 121,32,100,111,101,115,32,116,104,101,32,106,111,98,32,105, + 116,115,101,108,102,46,10,10,32,32,32,32,32,32,32,32, + 122,82,95,78,97,109,101,115,112,97,99,101,76,111,97,100, + 101,114,46,109,111,100,117,108,101,95,114,101,112,114,40,41, + 32,105,115,32,100,101,112,114,101,99,97,116,101,100,32,97, + 110,100,32,115,108,97,116,101,100,32,102,111,114,32,114,101, + 109,111,118,97,108,32,105,110,32,80,121,116,104,111,110,32, + 51,46,49,50,122,25,60,109,111,100,117,108,101,32,123,33, + 114,125,32,40,110,97,109,101,115,112,97,99,101,41,62,78, + 41,5,114,99,0,0,0,114,100,0,0,0,114,101,0,0, + 0,114,89,0,0,0,114,150,0,0,0,41,1,114,244,0, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,11,109,111,100,117,108,101,95,114,101,112,114,248,4, + 0,0,115,10,0,0,0,6,7,2,1,4,255,12,2,255, + 128,122,28,95,78,97,109,101,115,112,97,99,101,76,111,97, + 100,101,114,46,109,111,100,117,108,101,95,114,101,112,114,99, + 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, + 1,0,0,0,67,0,0,0,114,23,0,0,0,41,2,78, + 84,114,7,0,0,0,114,247,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,206,0,0,0,3, + 5,0,0,243,4,0,0,0,4,1,255,128,122,27,95,78, + 97,109,101,115,112,97,99,101,76,111,97,100,101,114,46,105, 115,95,112,97,99,107,97,103,101,99,2,0,0,0,0,0, 0,0,0,0,0,0,2,0,0,0,1,0,0,0,67,0, - 0,0,114,23,0,0,0,41,2,122,63,82,101,116,117,114, - 110,32,78,111,110,101,32,97,115,32,97,110,32,101,120,116, - 101,110,115,105,111,110,32,109,111,100,117,108,101,32,99,97, - 110,110,111,116,32,99,114,101,97,116,101,32,97,32,99,111, - 100,101,32,111,98,106,101,99,116,46,78,114,7,0,0,0, - 114,246,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,240,0,0,0,167,4,0,0,114,24,0, - 0,0,122,28,69,120,116,101,110,115,105,111,110,70,105,108, - 101,76,111,97,100,101,114,46,103,101,116,95,99,111,100,101, - 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,1,0,0,0,67,0,0,0,114,23,0,0,0,41,2, - 122,53,82,101,116,117,114,110,32,78,111,110,101,32,97,115, - 32,101,120,116,101,110,115,105,111,110,32,109,111,100,117,108, - 101,115,32,104,97,118,101,32,110,111,32,115,111,117,114,99, - 101,32,99,111,100,101,46,78,114,7,0,0,0,114,246,0, + 0,0,114,23,0,0,0,41,2,78,114,10,0,0,0,114, + 7,0,0,0,114,247,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,1,1,0,0,6,5,0, + 0,114,75,1,0,0,122,27,95,78,97,109,101,115,112,97, + 99,101,76,111,97,100,101,114,46,103,101,116,95,115,111,117, + 114,99,101,99,2,0,0,0,0,0,0,0,0,0,0,0, + 2,0,0,0,6,0,0,0,67,0,0,0,115,16,0,0, + 0,116,0,100,1,100,2,100,3,100,4,100,5,141,4,83, + 0,41,6,78,114,10,0,0,0,122,8,60,115,116,114,105, + 110,103,62,114,243,0,0,0,84,41,1,114,3,1,0,0, + 41,1,114,4,1,0,0,114,247,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,241,0,0,0, + 9,5,0,0,114,72,1,0,0,122,25,95,78,97,109,101, + 115,112,97,99,101,76,111,97,100,101,114,46,103,101,116,95, + 99,111,100,101,99,2,0,0,0,0,0,0,0,0,0,0, + 0,2,0,0,0,1,0,0,0,67,0,0,0,114,23,0, + 0,0,114,237,0,0,0,114,7,0,0,0,114,238,0,0, + 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, + 114,239,0,0,0,12,5,0,0,114,240,0,0,0,122,30, + 95,78,97,109,101,115,112,97,99,101,76,111,97,100,101,114, + 46,99,114,101,97,116,101,95,109,111,100,117,108,101,99,2, + 0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,1, + 0,0,0,67,0,0,0,115,4,0,0,0,100,0,83,0, + 114,69,0,0,0,114,7,0,0,0,114,42,1,0,0,114, + 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,245, + 0,0,0,15,5,0,0,114,75,1,0,0,122,28,95,78, + 97,109,101,115,112,97,99,101,76,111,97,100,101,114,46,101, + 120,101,99,95,109,111,100,117,108,101,99,2,0,0,0,0, + 0,0,0,0,0,0,0,2,0,0,0,4,0,0,0,67, + 0,0,0,115,26,0,0,0,116,0,160,1,100,1,124,0, + 106,2,161,2,1,0,116,0,160,3,124,0,124,1,161,2, + 83,0,41,3,122,98,76,111,97,100,32,97,32,110,97,109, + 101,115,112,97,99,101,32,109,111,100,117,108,101,46,10,10, + 32,32,32,32,32,32,32,32,84,104,105,115,32,109,101,116, + 104,111,100,32,105,115,32,100,101,112,114,101,99,97,116,101, + 100,46,32,32,85,115,101,32,101,120,101,99,95,109,111,100, + 117,108,101,40,41,32,105,110,115,116,101,97,100,46,10,10, + 32,32,32,32,32,32,32,32,122,38,110,97,109,101,115,112, + 97,99,101,32,109,111,100,117,108,101,32,108,111,97,100,101, + 100,32,119,105,116,104,32,112,97,116,104,32,123,33,114,125, + 78,41,4,114,159,0,0,0,114,173,0,0,0,114,49,1, + 0,0,114,246,0,0,0,114,247,0,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,248,0,0,0, + 18,5,0,0,115,10,0,0,0,6,7,4,1,4,255,12, + 3,255,128,122,28,95,78,97,109,101,115,112,97,99,101,76, + 111,97,100,101,114,46,108,111,97,100,95,109,111,100,117,108, + 101,99,2,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,2,0,0,0,67,0,0,0,115,22,0,0,0,100, + 1,100,2,108,0,109,1,125,2,1,0,124,2,124,0,106, + 2,131,1,83,0,41,3,78,114,0,0,0,0,41,1,218, + 15,78,97,109,101,115,112,97,99,101,82,101,97,100,101,114, + 41,3,114,32,1,0,0,114,76,1,0,0,114,49,1,0, + 0,41,3,114,143,0,0,0,114,244,0,0,0,114,76,1, 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, - 0,114,0,1,0,0,171,4,0,0,114,24,0,0,0,122, - 30,69,120,116,101,110,115,105,111,110,70,105,108,101,76,111, - 97,100,101,114,46,103,101,116,95,115,111,117,114,99,101,99, - 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 1,0,0,0,67,0,0,0,114,25,1,0,0,114,26,1, - 0,0,114,71,0,0,0,114,246,0,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,203,0,0,0, - 175,4,0,0,114,27,1,0,0,122,32,69,120,116,101,110, - 115,105,111,110,70,105,108,101,76,111,97,100,101,114,46,103, - 101,116,95,102,105,108,101,110,97,109,101,78,41,14,114,150, - 0,0,0,114,149,0,0,0,114,151,0,0,0,114,152,0, - 0,0,114,235,0,0,0,114,15,1,0,0,114,21,1,0, - 0,114,238,0,0,0,114,244,0,0,0,114,206,0,0,0, - 114,240,0,0,0,114,0,1,0,0,114,160,0,0,0,114, - 203,0,0,0,114,7,0,0,0,114,7,0,0,0,114,7, - 0,0,0,114,8,0,0,0,114,29,1,0,0,128,4,0, - 0,115,26,0,0,0,8,0,4,2,8,6,8,4,8,4, - 8,3,8,8,8,6,8,6,8,4,2,4,14,1,255,128, - 114,29,1,0,0,99,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,104, - 0,0,0,101,0,90,1,100,0,90,2,100,1,90,3,100, - 2,100,3,132,0,90,4,100,4,100,5,132,0,90,5,100, - 6,100,7,132,0,90,6,100,8,100,9,132,0,90,7,100, - 10,100,11,132,0,90,8,100,12,100,13,132,0,90,9,100, - 14,100,15,132,0,90,10,100,16,100,17,132,0,90,11,100, - 18,100,19,132,0,90,12,100,20,100,21,132,0,90,13,100, - 22,100,23,132,0,90,14,100,24,83,0,41,25,218,14,95, - 78,97,109,101,115,112,97,99,101,80,97,116,104,97,38,1, - 0,0,82,101,112,114,101,115,101,110,116,115,32,97,32,110, - 97,109,101,115,112,97,99,101,32,112,97,99,107,97,103,101, - 39,115,32,112,97,116,104,46,32,32,73,116,32,117,115,101, - 115,32,116,104,101,32,109,111,100,117,108,101,32,110,97,109, - 101,10,32,32,32,32,116,111,32,102,105,110,100,32,105,116, - 115,32,112,97,114,101,110,116,32,109,111,100,117,108,101,44, - 32,97,110,100,32,102,114,111,109,32,116,104,101,114,101,32, - 105,116,32,108,111,111,107,115,32,117,112,32,116,104,101,32, - 112,97,114,101,110,116,39,115,10,32,32,32,32,95,95,112, - 97,116,104,95,95,46,32,32,87,104,101,110,32,116,104,105, - 115,32,99,104,97,110,103,101,115,44,32,116,104,101,32,109, - 111,100,117,108,101,39,115,32,111,119,110,32,112,97,116,104, - 32,105,115,32,114,101,99,111,109,112,117,116,101,100,44,10, - 32,32,32,32,117,115,105,110,103,32,112,97,116,104,95,102, - 105,110,100,101,114,46,32,32,70,111,114,32,116,111,112,45, - 108,101,118,101,108,32,109,111,100,117,108,101,115,44,32,116, - 104,101,32,112,97,114,101,110,116,32,109,111,100,117,108,101, - 39,115,32,112,97,116,104,10,32,32,32,32,105,115,32,115, - 121,115,46,112,97,116,104,46,99,4,0,0,0,0,0,0, - 0,0,0,0,0,4,0,0,0,3,0,0,0,67,0,0, - 0,115,36,0,0,0,124,1,124,0,95,0,124,2,124,0, - 95,1,116,2,124,0,160,3,161,0,131,1,124,0,95,4, - 124,3,124,0,95,5,100,0,83,0,114,69,0,0,0,41, - 6,218,5,95,110,97,109,101,218,5,95,112,97,116,104,114, - 136,0,0,0,218,16,95,103,101,116,95,112,97,114,101,110, - 116,95,112,97,116,104,218,17,95,108,97,115,116,95,112,97, - 114,101,110,116,95,112,97,116,104,218,12,95,112,97,116,104, - 95,102,105,110,100,101,114,169,4,114,143,0,0,0,114,141, - 0,0,0,114,65,0,0,0,90,11,112,97,116,104,95,102, + 0,114,33,1,0,0,30,5,0,0,115,6,0,0,0,12, + 1,10,1,255,128,122,36,95,78,97,109,101,115,112,97,99, + 101,76,111,97,100,101,114,46,103,101,116,95,114,101,115,111, + 117,114,99,101,95,114,101,97,100,101,114,78,41,13,114,150, + 0,0,0,114,149,0,0,0,114,151,0,0,0,114,236,0, + 0,0,114,233,0,0,0,114,74,1,0,0,114,206,0,0, + 0,114,1,1,0,0,114,241,0,0,0,114,239,0,0,0, + 114,245,0,0,0,114,248,0,0,0,114,33,1,0,0,114, + 7,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,73,1,0,0,244,4,0,0,115,24,0,0, + 0,8,0,8,1,2,3,10,1,8,10,8,3,8,3,8, + 3,8,3,8,3,12,12,255,128,114,73,1,0,0,99,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4, + 0,0,0,64,0,0,0,115,118,0,0,0,101,0,90,1, + 100,0,90,2,100,1,90,3,101,4,100,2,100,3,132,0, + 131,1,90,5,101,4,100,4,100,5,132,0,131,1,90,6, + 101,7,100,6,100,7,132,0,131,1,90,8,101,7,100,8, + 100,9,132,0,131,1,90,9,101,7,100,19,100,11,100,12, + 132,1,131,1,90,10,101,7,100,20,100,13,100,14,132,1, + 131,1,90,11,101,7,100,19,100,15,100,16,132,1,131,1, + 90,12,101,4,100,17,100,18,132,0,131,1,90,13,100,10, + 83,0,41,21,218,10,80,97,116,104,70,105,110,100,101,114, + 122,62,77,101,116,97,32,112,97,116,104,32,102,105,110,100, + 101,114,32,102,111,114,32,115,121,115,46,112,97,116,104,32, + 97,110,100,32,112,97,99,107,97,103,101,32,95,95,112,97, + 116,104,95,95,32,97,116,116,114,105,98,117,116,101,115,46, + 99,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0, + 0,4,0,0,0,67,0,0,0,115,64,0,0,0,116,0, + 116,1,106,2,160,3,161,0,131,1,68,0,93,22,92,2, + 125,0,125,1,124,1,100,1,117,0,114,20,116,1,106,2, + 124,0,61,0,113,7,116,4,124,1,100,2,131,2,114,29, + 124,1,160,5,161,0,1,0,113,7,100,1,83,0,41,3, + 122,125,67,97,108,108,32,116,104,101,32,105,110,118,97,108, + 105,100,97,116,101,95,99,97,99,104,101,115,40,41,32,109, + 101,116,104,111,100,32,111,110,32,97,108,108,32,112,97,116, + 104,32,101,110,116,114,121,32,102,105,110,100,101,114,115,10, + 32,32,32,32,32,32,32,32,115,116,111,114,101,100,32,105, + 110,32,115,121,115,46,112,97,116,104,95,105,109,112,111,114, + 116,101,114,95,99,97,99,104,101,115,32,40,119,104,101,114, + 101,32,105,109,112,108,101,109,101,110,116,101,100,41,46,78, + 218,17,105,110,118,97,108,105,100,97,116,101,95,99,97,99, + 104,101,115,41,6,218,4,108,105,115,116,114,15,0,0,0, + 218,19,112,97,116,104,95,105,109,112,111,114,116,101,114,95, + 99,97,99,104,101,218,5,105,116,101,109,115,114,153,0,0, + 0,114,78,1,0,0,41,2,114,141,0,0,0,218,6,102, 105,110,100,101,114,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,235,0,0,0,188,4,0,0,115,10,0, - 0,0,6,1,6,1,14,1,10,1,255,128,122,23,95,78, - 97,109,101,115,112,97,99,101,80,97,116,104,46,95,95,105, - 110,105,116,95,95,99,1,0,0,0,0,0,0,0,0,0, - 0,0,4,0,0,0,3,0,0,0,67,0,0,0,115,38, - 0,0,0,124,0,106,0,160,1,100,1,161,1,92,3,125, - 1,125,2,125,3,124,2,100,2,107,2,114,15,100,3,83, - 0,124,1,100,4,102,2,83,0,41,6,122,62,82,101,116, - 117,114,110,115,32,97,32,116,117,112,108,101,32,111,102,32, - 40,112,97,114,101,110,116,45,109,111,100,117,108,101,45,110, - 97,109,101,44,32,112,97,114,101,110,116,45,112,97,116,104, - 45,97,116,116,114,45,110,97,109,101,41,114,97,0,0,0, - 114,10,0,0,0,41,2,114,15,0,0,0,114,65,0,0, - 0,90,8,95,95,112,97,116,104,95,95,78,41,2,114,47, - 1,0,0,114,104,0,0,0,41,4,114,143,0,0,0,114, - 39,1,0,0,218,3,100,111,116,90,2,109,101,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,218,23,95,102, - 105,110,100,95,112,97,114,101,110,116,95,112,97,116,104,95, - 110,97,109,101,115,194,4,0,0,115,10,0,0,0,18,2, - 8,1,4,2,8,3,255,128,122,38,95,78,97,109,101,115, - 112,97,99,101,80,97,116,104,46,95,102,105,110,100,95,112, - 97,114,101,110,116,95,112,97,116,104,95,110,97,109,101,115, - 99,1,0,0,0,0,0,0,0,0,0,0,0,3,0,0, - 0,3,0,0,0,67,0,0,0,115,28,0,0,0,124,0, - 160,0,161,0,92,2,125,1,125,2,116,1,116,2,106,3, - 124,1,25,0,124,2,131,2,83,0,114,69,0,0,0,41, - 4,114,54,1,0,0,114,155,0,0,0,114,15,0,0,0, - 218,7,109,111,100,117,108,101,115,41,3,114,143,0,0,0, - 90,18,112,97,114,101,110,116,95,109,111,100,117,108,101,95, - 110,97,109,101,90,14,112,97,116,104,95,97,116,116,114,95, - 110,97,109,101,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,49,1,0,0,204,4,0,0,115,6,0,0, - 0,12,1,16,1,255,128,122,31,95,78,97,109,101,115,112, - 97,99,101,80,97,116,104,46,95,103,101,116,95,112,97,114, - 101,110,116,95,112,97,116,104,99,1,0,0,0,0,0,0, - 0,0,0,0,0,3,0,0,0,4,0,0,0,67,0,0, - 0,115,80,0,0,0,116,0,124,0,160,1,161,0,131,1, - 125,1,124,1,124,0,106,2,107,3,114,37,124,0,160,3, - 124,0,106,4,124,1,161,2,125,2,124,2,100,0,117,1, - 114,34,124,2,106,5,100,0,117,0,114,34,124,2,106,6, - 114,34,124,2,106,6,124,0,95,7,124,1,124,0,95,2, - 124,0,106,7,83,0,114,69,0,0,0,41,8,114,136,0, - 0,0,114,49,1,0,0,114,50,1,0,0,114,51,1,0, - 0,114,47,1,0,0,114,164,0,0,0,114,202,0,0,0, - 114,48,1,0,0,41,3,114,143,0,0,0,90,11,112,97, - 114,101,110,116,95,112,97,116,104,114,210,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,12,95, - 114,101,99,97,108,99,117,108,97,116,101,208,4,0,0,115, - 18,0,0,0,12,2,10,1,14,1,18,3,6,1,8,1, - 6,1,6,1,255,128,122,27,95,78,97,109,101,115,112,97, - 99,101,80,97,116,104,46,95,114,101,99,97,108,99,117,108, - 97,116,101,99,1,0,0,0,0,0,0,0,0,0,0,0, - 1,0,0,0,3,0,0,0,67,0,0,0,243,12,0,0, - 0,116,0,124,0,160,1,161,0,131,1,83,0,114,69,0, - 0,0,41,2,218,4,105,116,101,114,114,56,1,0,0,114, - 20,1,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,218,8,95,95,105,116,101,114,95,95,221,4,0, - 0,243,4,0,0,0,12,1,255,128,122,23,95,78,97,109, - 101,115,112,97,99,101,80,97,116,104,46,95,95,105,116,101, - 114,95,95,99,2,0,0,0,0,0,0,0,0,0,0,0, - 2,0,0,0,2,0,0,0,67,0,0,0,115,12,0,0, - 0,124,0,160,0,161,0,124,1,25,0,83,0,114,69,0, - 0,0,169,1,114,56,1,0,0,41,2,114,143,0,0,0, - 218,5,105,110,100,101,120,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,11,95,95,103,101,116,105,116,101, - 109,95,95,224,4,0,0,114,60,1,0,0,122,26,95,78, - 97,109,101,115,112,97,99,101,80,97,116,104,46,95,95,103, - 101,116,105,116,101,109,95,95,99,3,0,0,0,0,0,0, - 0,0,0,0,0,3,0,0,0,3,0,0,0,67,0,0, - 0,115,14,0,0,0,124,2,124,0,106,0,124,1,60,0, - 100,0,83,0,114,69,0,0,0,41,1,114,48,1,0,0, - 41,3,114,143,0,0,0,114,62,1,0,0,114,65,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 218,11,95,95,115,101,116,105,116,101,109,95,95,227,4,0, - 0,115,4,0,0,0,14,1,255,128,122,26,95,78,97,109, - 101,115,112,97,99,101,80,97,116,104,46,95,95,115,101,116, - 105,116,101,109,95,95,99,1,0,0,0,0,0,0,0,0, - 0,0,0,1,0,0,0,3,0,0,0,67,0,0,0,114, - 57,1,0,0,114,69,0,0,0,41,2,114,4,0,0,0, - 114,56,1,0,0,114,20,1,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,218,7,95,95,108,101,110, - 95,95,230,4,0,0,114,60,1,0,0,122,22,95,78,97, - 109,101,115,112,97,99,101,80,97,116,104,46,95,95,108,101, - 110,95,95,99,1,0,0,0,0,0,0,0,0,0,0,0, - 1,0,0,0,3,0,0,0,67,0,0,0,243,12,0,0, - 0,100,1,160,0,124,0,106,1,161,1,83,0,41,2,78, - 122,20,95,78,97,109,101,115,112,97,99,101,80,97,116,104, - 40,123,33,114,125,41,41,2,114,89,0,0,0,114,48,1, - 0,0,114,20,1,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,8,95,95,114,101,112,114,95,95, - 233,4,0,0,114,60,1,0,0,122,23,95,78,97,109,101, - 115,112,97,99,101,80,97,116,104,46,95,95,114,101,112,114, - 95,95,99,2,0,0,0,0,0,0,0,0,0,0,0,2, - 0,0,0,3,0,0,0,67,0,0,0,115,12,0,0,0, - 124,1,124,0,160,0,161,0,118,0,83,0,114,69,0,0, - 0,114,61,1,0,0,169,2,114,143,0,0,0,218,4,105, - 116,101,109,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,12,95,95,99,111,110,116,97,105,110,115,95,95, - 236,4,0,0,114,60,1,0,0,122,27,95,78,97,109,101, - 115,112,97,99,101,80,97,116,104,46,95,95,99,111,110,116, - 97,105,110,115,95,95,99,2,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,3,0,0,0,67,0,0,0,115, - 16,0,0,0,124,0,106,0,160,1,124,1,161,1,1,0, - 100,0,83,0,114,69,0,0,0,41,2,114,48,1,0,0, - 114,61,0,0,0,114,68,1,0,0,114,7,0,0,0,114, - 7,0,0,0,114,8,0,0,0,114,61,0,0,0,239,4, - 0,0,243,4,0,0,0,16,1,255,128,122,21,95,78,97, - 109,101,115,112,97,99,101,80,97,116,104,46,97,112,112,101, - 110,100,78,41,15,114,150,0,0,0,114,149,0,0,0,114, - 151,0,0,0,114,152,0,0,0,114,235,0,0,0,114,54, - 1,0,0,114,49,1,0,0,114,56,1,0,0,114,59,1, - 0,0,114,63,1,0,0,114,64,1,0,0,114,65,1,0, - 0,114,67,1,0,0,114,70,1,0,0,114,61,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,46,1,0,0,181,4,0,0,115,28,0, - 0,0,8,0,4,1,8,6,8,6,8,10,8,4,8,13, - 8,3,8,3,8,3,8,3,8,3,12,3,255,128,114,46, - 1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,3,0,0,0,64,0,0,0,115,88,0,0, - 0,101,0,90,1,100,0,90,2,100,1,100,2,132,0,90, - 3,101,4,100,3,100,4,132,0,131,1,90,5,100,5,100, - 6,132,0,90,6,100,7,100,8,132,0,90,7,100,9,100, - 10,132,0,90,8,100,11,100,12,132,0,90,9,100,13,100, - 14,132,0,90,10,100,15,100,16,132,0,90,11,100,17,100, - 18,132,0,90,12,100,19,83,0,41,20,218,16,95,78,97, - 109,101,115,112,97,99,101,76,111,97,100,101,114,99,4,0, - 0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0, - 0,0,67,0,0,0,115,18,0,0,0,116,0,124,1,124, - 2,124,3,131,3,124,0,95,1,100,0,83,0,114,69,0, - 0,0,41,2,114,46,1,0,0,114,48,1,0,0,114,52, - 1,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,235,0,0,0,245,4,0,0,115,4,0,0,0, - 18,1,255,128,122,25,95,78,97,109,101,115,112,97,99,101, - 76,111,97,100,101,114,46,95,95,105,110,105,116,95,95,99, - 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, - 4,0,0,0,67,0,0,0,115,24,0,0,0,116,0,160, - 1,100,1,116,2,161,2,1,0,100,2,160,3,124,0,106, - 4,161,1,83,0,41,4,122,115,82,101,116,117,114,110,32, - 114,101,112,114,32,102,111,114,32,116,104,101,32,109,111,100, - 117,108,101,46,10,10,32,32,32,32,32,32,32,32,84,104, - 101,32,109,101,116,104,111,100,32,105,115,32,100,101,112,114, - 101,99,97,116,101,100,46,32,32,84,104,101,32,105,109,112, - 111,114,116,32,109,97,99,104,105,110,101,114,121,32,100,111, - 101,115,32,116,104,101,32,106,111,98,32,105,116,115,101,108, - 102,46,10,10,32,32,32,32,32,32,32,32,122,82,95,78, - 97,109,101,115,112,97,99,101,76,111,97,100,101,114,46,109, - 111,100,117,108,101,95,114,101,112,114,40,41,32,105,115,32, - 100,101,112,114,101,99,97,116,101,100,32,97,110,100,32,115, - 108,97,116,101,100,32,102,111,114,32,114,101,109,111,118,97, - 108,32,105,110,32,80,121,116,104,111,110,32,51,46,49,50, - 122,25,60,109,111,100,117,108,101,32,123,33,114,125,32,40, - 110,97,109,101,115,112,97,99,101,41,62,78,41,5,114,99, - 0,0,0,114,100,0,0,0,114,101,0,0,0,114,89,0, - 0,0,114,150,0,0,0,41,1,114,243,0,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,11,109, - 111,100,117,108,101,95,114,101,112,114,248,4,0,0,115,10, - 0,0,0,6,7,2,1,4,255,12,2,255,128,122,28,95, - 78,97,109,101,115,112,97,99,101,76,111,97,100,101,114,46, - 109,111,100,117,108,101,95,114,101,112,114,99,2,0,0,0, - 0,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0, - 67,0,0,0,114,23,0,0,0,41,2,78,84,114,7,0, - 0,0,114,246,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,206,0,0,0,3,5,0,0,243, - 4,0,0,0,4,1,255,128,122,27,95,78,97,109,101,115, - 112,97,99,101,76,111,97,100,101,114,46,105,115,95,112,97, - 99,107,97,103,101,99,2,0,0,0,0,0,0,0,0,0, - 0,0,2,0,0,0,1,0,0,0,67,0,0,0,114,23, - 0,0,0,41,2,78,114,10,0,0,0,114,7,0,0,0, - 114,246,0,0,0,114,7,0,0,0,114,7,0,0,0,114, - 8,0,0,0,114,0,1,0,0,6,5,0,0,114,74,1, - 0,0,122,27,95,78,97,109,101,115,112,97,99,101,76,111, - 97,100,101,114,46,103,101,116,95,115,111,117,114,99,101,99, - 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 6,0,0,0,67,0,0,0,115,16,0,0,0,116,0,100, - 1,100,2,100,3,100,4,100,5,141,4,83,0,41,6,78, - 114,10,0,0,0,122,8,60,115,116,114,105,110,103,62,114, - 242,0,0,0,84,41,1,114,2,1,0,0,41,1,114,3, - 1,0,0,114,246,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,240,0,0,0,9,5,0,0, - 114,71,1,0,0,122,25,95,78,97,109,101,115,112,97,99, - 101,76,111,97,100,101,114,46,103,101,116,95,99,111,100,101, - 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,1,0,0,0,67,0,0,0,114,23,0,0,0,114,236, - 0,0,0,114,7,0,0,0,114,237,0,0,0,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,114,238,0,0, - 0,12,5,0,0,114,239,0,0,0,122,30,95,78,97,109, - 101,115,112,97,99,101,76,111,97,100,101,114,46,99,114,101, - 97,116,101,95,109,111,100,117,108,101,99,2,0,0,0,0, - 0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,67, - 0,0,0,115,4,0,0,0,100,0,83,0,114,69,0,0, - 0,114,7,0,0,0,114,41,1,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,114,244,0,0,0,15, - 5,0,0,114,74,1,0,0,122,28,95,78,97,109,101,115, - 112,97,99,101,76,111,97,100,101,114,46,101,120,101,99,95, - 109,111,100,117,108,101,99,2,0,0,0,0,0,0,0,0, - 0,0,0,2,0,0,0,4,0,0,0,67,0,0,0,115, - 26,0,0,0,116,0,160,1,100,1,124,0,106,2,161,2, - 1,0,116,0,160,3,124,0,124,1,161,2,83,0,41,3, - 122,98,76,111,97,100,32,97,32,110,97,109,101,115,112,97, - 99,101,32,109,111,100,117,108,101,46,10,10,32,32,32,32, - 32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,32, - 105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,32, - 85,115,101,32,101,120,101,99,95,109,111,100,117,108,101,40, - 41,32,105,110,115,116,101,97,100,46,10,10,32,32,32,32, - 32,32,32,32,122,38,110,97,109,101,115,112,97,99,101,32, - 109,111,100,117,108,101,32,108,111,97,100,101,100,32,119,105, - 116,104,32,112,97,116,104,32,123,33,114,125,78,41,4,114, - 159,0,0,0,114,173,0,0,0,114,48,1,0,0,114,245, - 0,0,0,114,246,0,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,247,0,0,0,18,5,0,0, - 115,10,0,0,0,6,7,4,1,4,255,12,3,255,128,122, - 28,95,78,97,109,101,115,112,97,99,101,76,111,97,100,101, - 114,46,108,111,97,100,95,109,111,100,117,108,101,99,2,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0, - 0,0,67,0,0,0,115,22,0,0,0,100,1,100,2,108, - 0,109,1,125,2,1,0,124,2,124,0,106,2,131,1,83, - 0,41,3,78,114,0,0,0,0,41,1,218,15,78,97,109, - 101,115,112,97,99,101,82,101,97,100,101,114,41,3,114,31, - 1,0,0,114,75,1,0,0,114,48,1,0,0,41,3,114, - 143,0,0,0,114,243,0,0,0,114,75,1,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,114,32,1, - 0,0,30,5,0,0,115,6,0,0,0,12,1,10,1,255, - 128,122,36,95,78,97,109,101,115,112,97,99,101,76,111,97, - 100,101,114,46,103,101,116,95,114,101,115,111,117,114,99,101, - 95,114,101,97,100,101,114,78,41,13,114,150,0,0,0,114, - 149,0,0,0,114,151,0,0,0,114,235,0,0,0,114,232, - 0,0,0,114,73,1,0,0,114,206,0,0,0,114,0,1, - 0,0,114,240,0,0,0,114,238,0,0,0,114,244,0,0, - 0,114,247,0,0,0,114,32,1,0,0,114,7,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 72,1,0,0,244,4,0,0,115,24,0,0,0,8,0,8, - 1,2,3,10,1,8,10,8,3,8,3,8,3,8,3,8, - 3,12,12,255,128,114,72,1,0,0,99,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,64, - 0,0,0,115,118,0,0,0,101,0,90,1,100,0,90,2, - 100,1,90,3,101,4,100,2,100,3,132,0,131,1,90,5, - 101,4,100,4,100,5,132,0,131,1,90,6,101,7,100,6, - 100,7,132,0,131,1,90,8,101,7,100,8,100,9,132,0, - 131,1,90,9,101,7,100,19,100,11,100,12,132,1,131,1, - 90,10,101,7,100,20,100,13,100,14,132,1,131,1,90,11, - 101,7,100,21,100,15,100,16,132,1,131,1,90,12,101,4, - 100,17,100,18,132,0,131,1,90,13,100,10,83,0,41,22, - 218,10,80,97,116,104,70,105,110,100,101,114,122,62,77,101, - 116,97,32,112,97,116,104,32,102,105,110,100,101,114,32,102, - 111,114,32,115,121,115,46,112,97,116,104,32,97,110,100,32, - 112,97,99,107,97,103,101,32,95,95,112,97,116,104,95,95, - 32,97,116,116,114,105,98,117,116,101,115,46,99,0,0,0, - 0,0,0,0,0,0,0,0,0,2,0,0,0,4,0,0, - 0,67,0,0,0,115,64,0,0,0,116,0,116,1,106,2, - 160,3,161,0,131,1,68,0,93,22,92,2,125,0,125,1, - 124,1,100,1,117,0,114,20,116,1,106,2,124,0,61,0, - 113,7,116,4,124,1,100,2,131,2,114,29,124,1,160,5, - 161,0,1,0,113,7,100,1,83,0,41,3,122,125,67,97, - 108,108,32,116,104,101,32,105,110,118,97,108,105,100,97,116, - 101,95,99,97,99,104,101,115,40,41,32,109,101,116,104,111, - 100,32,111,110,32,97,108,108,32,112,97,116,104,32,101,110, - 116,114,121,32,102,105,110,100,101,114,115,10,32,32,32,32, - 32,32,32,32,115,116,111,114,101,100,32,105,110,32,115,121, - 115,46,112,97,116,104,95,105,109,112,111,114,116,101,114,95, - 99,97,99,104,101,115,32,40,119,104,101,114,101,32,105,109, - 112,108,101,109,101,110,116,101,100,41,46,78,218,17,105,110, - 118,97,108,105,100,97,116,101,95,99,97,99,104,101,115,41, - 6,218,4,108,105,115,116,114,15,0,0,0,218,19,112,97, - 116,104,95,105,109,112,111,114,116,101,114,95,99,97,99,104, - 101,218,5,105,116,101,109,115,114,153,0,0,0,114,77,1, - 0,0,41,2,114,141,0,0,0,218,6,102,105,110,100,101, - 114,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,77,1,0,0,41,5,0,0,115,16,0,0,0,22,4, - 8,1,10,1,10,1,8,1,2,128,4,252,255,128,122,28, - 80,97,116,104,70,105,110,100,101,114,46,105,110,118,97,108, - 105,100,97,116,101,95,99,97,99,104,101,115,99,1,0,0, - 0,0,0,0,0,0,0,0,0,2,0,0,0,9,0,0, - 0,67,0,0,0,115,76,0,0,0,116,0,106,1,100,1, - 117,1,114,14,116,0,106,1,115,14,116,2,160,3,100,2, - 116,4,161,2,1,0,116,0,106,1,68,0,93,17,125,1, - 122,7,124,1,124,0,131,1,87,0,2,0,1,0,83,0, - 4,0,116,5,121,37,1,0,1,0,1,0,89,0,113,17, - 100,1,83,0,119,0,41,3,122,46,83,101,97,114,99,104, - 32,115,121,115,46,112,97,116,104,95,104,111,111,107,115,32, - 102,111,114,32,97,32,102,105,110,100,101,114,32,102,111,114, - 32,39,112,97,116,104,39,46,78,122,23,115,121,115,46,112, - 97,116,104,95,104,111,111,107,115,32,105,115,32,101,109,112, - 116,121,41,6,114,15,0,0,0,218,10,112,97,116,104,95, - 104,111,111,107,115,114,99,0,0,0,114,100,0,0,0,114, - 162,0,0,0,114,142,0,0,0,41,2,114,65,0,0,0, - 90,4,104,111,111,107,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,218,11,95,112,97,116,104,95,104,111,111, - 107,115,51,5,0,0,115,20,0,0,0,16,3,12,1,10, - 1,2,1,14,1,12,1,4,1,4,2,2,253,255,128,122, - 22,80,97,116,104,70,105,110,100,101,114,46,95,112,97,116, - 104,95,104,111,111,107,115,99,2,0,0,0,0,0,0,0, - 0,0,0,0,3,0,0,0,8,0,0,0,67,0,0,0, - 115,100,0,0,0,124,1,100,1,107,2,114,20,122,6,116, - 0,160,1,161,0,125,1,87,0,110,9,4,0,116,2,121, - 49,1,0,1,0,1,0,89,0,100,2,83,0,122,8,116, - 3,106,4,124,1,25,0,125,2,87,0,124,2,83,0,4, - 0,116,5,121,48,1,0,1,0,1,0,124,0,160,6,124, - 1,161,1,125,2,124,2,116,3,106,4,124,1,60,0,89, - 0,124,2,83,0,119,0,119,0,41,3,122,210,71,101,116, - 32,116,104,101,32,102,105,110,100,101,114,32,102,111,114,32, - 116,104,101,32,112,97,116,104,32,101,110,116,114,121,32,102, - 114,111,109,32,115,121,115,46,112,97,116,104,95,105,109,112, - 111,114,116,101,114,95,99,97,99,104,101,46,10,10,32,32, - 32,32,32,32,32,32,73,102,32,116,104,101,32,112,97,116, - 104,32,101,110,116,114,121,32,105,115,32,110,111,116,32,105, - 110,32,116,104,101,32,99,97,99,104,101,44,32,102,105,110, - 100,32,116,104,101,32,97,112,112,114,111,112,114,105,97,116, - 101,32,102,105,110,100,101,114,10,32,32,32,32,32,32,32, - 32,97,110,100,32,99,97,99,104,101,32,105,116,46,32,73, - 102,32,110,111,32,102,105,110,100,101,114,32,105,115,32,97, - 118,97,105,108,97,98,108,101,44,32,115,116,111,114,101,32, - 78,111,110,101,46,10,10,32,32,32,32,32,32,32,32,114, - 10,0,0,0,78,41,7,114,18,0,0,0,114,82,0,0, - 0,218,17,70,105,108,101,78,111,116,70,111,117,110,100,69, - 114,114,111,114,114,15,0,0,0,114,79,1,0,0,218,8, - 75,101,121,69,114,114,111,114,114,83,1,0,0,41,3,114, - 221,0,0,0,114,65,0,0,0,114,81,1,0,0,114,7, - 0,0,0,114,7,0,0,0,114,8,0,0,0,218,20,95, - 112,97,116,104,95,105,109,112,111,114,116,101,114,95,99,97, - 99,104,101,64,5,0,0,115,30,0,0,0,8,8,2,1, - 12,1,12,1,6,3,2,1,12,1,4,4,12,253,10,1, - 12,1,4,1,2,253,2,250,255,128,122,31,80,97,116,104, - 70,105,110,100,101,114,46,95,112,97,116,104,95,105,109,112, - 111,114,116,101,114,95,99,97,99,104,101,99,3,0,0,0, - 0,0,0,0,0,0,0,0,7,0,0,0,4,0,0,0, - 67,0,0,0,115,138,0,0,0,116,0,124,2,100,1,131, - 2,114,27,116,1,160,2,124,2,161,1,155,0,100,2,157, + 8,0,0,0,114,78,1,0,0,41,5,0,0,115,16,0, + 0,0,22,4,8,1,10,1,10,1,8,1,2,128,4,252, + 255,128,122,28,80,97,116,104,70,105,110,100,101,114,46,105, + 110,118,97,108,105,100,97,116,101,95,99,97,99,104,101,115, + 99,1,0,0,0,0,0,0,0,0,0,0,0,2,0,0, + 0,9,0,0,0,67,0,0,0,115,76,0,0,0,116,0, + 106,1,100,1,117,1,114,14,116,0,106,1,115,14,116,2, + 160,3,100,2,116,4,161,2,1,0,116,0,106,1,68,0, + 93,17,125,1,122,7,124,1,124,0,131,1,87,0,2,0, + 1,0,83,0,4,0,116,5,121,37,1,0,1,0,1,0, + 89,0,113,17,100,1,83,0,119,0,41,3,122,46,83,101, + 97,114,99,104,32,115,121,115,46,112,97,116,104,95,104,111, + 111,107,115,32,102,111,114,32,97,32,102,105,110,100,101,114, + 32,102,111,114,32,39,112,97,116,104,39,46,78,122,23,115, + 121,115,46,112,97,116,104,95,104,111,111,107,115,32,105,115, + 32,101,109,112,116,121,41,6,114,15,0,0,0,218,10,112, + 97,116,104,95,104,111,111,107,115,114,99,0,0,0,114,100, + 0,0,0,114,162,0,0,0,114,142,0,0,0,41,2,114, + 65,0,0,0,90,4,104,111,111,107,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,218,11,95,112,97,116,104, + 95,104,111,111,107,115,51,5,0,0,115,20,0,0,0,16, + 3,12,1,10,1,2,1,14,1,12,1,4,1,4,2,2, + 253,255,128,122,22,80,97,116,104,70,105,110,100,101,114,46, + 95,112,97,116,104,95,104,111,111,107,115,99,2,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,8,0,0,0, + 67,0,0,0,115,100,0,0,0,124,1,100,1,107,2,114, + 20,122,6,116,0,160,1,161,0,125,1,87,0,110,9,4, + 0,116,2,121,49,1,0,1,0,1,0,89,0,100,2,83, + 0,122,8,116,3,106,4,124,1,25,0,125,2,87,0,124, + 2,83,0,4,0,116,5,121,48,1,0,1,0,1,0,124, + 0,160,6,124,1,161,1,125,2,124,2,116,3,106,4,124, + 1,60,0,89,0,124,2,83,0,119,0,119,0,41,3,122, + 210,71,101,116,32,116,104,101,32,102,105,110,100,101,114,32, + 102,111,114,32,116,104,101,32,112,97,116,104,32,101,110,116, + 114,121,32,102,114,111,109,32,115,121,115,46,112,97,116,104, + 95,105,109,112,111,114,116,101,114,95,99,97,99,104,101,46, + 10,10,32,32,32,32,32,32,32,32,73,102,32,116,104,101, + 32,112,97,116,104,32,101,110,116,114,121,32,105,115,32,110, + 111,116,32,105,110,32,116,104,101,32,99,97,99,104,101,44, + 32,102,105,110,100,32,116,104,101,32,97,112,112,114,111,112, + 114,105,97,116,101,32,102,105,110,100,101,114,10,32,32,32, + 32,32,32,32,32,97,110,100,32,99,97,99,104,101,32,105, + 116,46,32,73,102,32,110,111,32,102,105,110,100,101,114,32, + 105,115,32,97,118,97,105,108,97,98,108,101,44,32,115,116, + 111,114,101,32,78,111,110,101,46,10,10,32,32,32,32,32, + 32,32,32,114,10,0,0,0,78,41,7,114,18,0,0,0, + 114,82,0,0,0,218,17,70,105,108,101,78,111,116,70,111, + 117,110,100,69,114,114,111,114,114,15,0,0,0,114,80,1, + 0,0,218,8,75,101,121,69,114,114,111,114,114,84,1,0, + 0,41,3,114,221,0,0,0,114,65,0,0,0,114,82,1, + 0,0,114,7,0,0,0,114,7,0,0,0,114,8,0,0, + 0,218,20,95,112,97,116,104,95,105,109,112,111,114,116,101, + 114,95,99,97,99,104,101,64,5,0,0,115,30,0,0,0, + 8,8,2,1,12,1,12,1,6,3,2,1,12,1,4,4, + 12,253,10,1,12,1,4,1,2,253,2,250,255,128,122,31, + 80,97,116,104,70,105,110,100,101,114,46,95,112,97,116,104, + 95,105,109,112,111,114,116,101,114,95,99,97,99,104,101,99, + 3,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0, + 4,0,0,0,67,0,0,0,115,138,0,0,0,116,0,124, + 2,100,1,131,2,114,27,116,1,160,2,124,2,161,1,155, + 0,100,2,157,2,125,3,116,3,160,4,124,3,116,5,161, + 2,1,0,124,2,160,6,124,1,161,1,92,2,125,4,125, + 5,110,21,116,1,160,2,124,2,161,1,155,0,100,3,157, 2,125,3,116,3,160,4,124,3,116,5,161,2,1,0,124, - 2,160,6,124,1,161,1,92,2,125,4,125,5,110,21,116, - 1,160,2,124,2,161,1,155,0,100,3,157,2,125,3,116, - 3,160,4,124,3,116,5,161,2,1,0,124,2,160,7,124, - 1,161,1,125,4,103,0,125,5,124,4,100,0,117,1,114, - 58,116,1,160,8,124,1,124,4,161,2,83,0,116,1,160, - 9,124,1,100,0,161,2,125,6,124,5,124,6,95,10,124, - 6,83,0,41,4,78,114,161,0,0,0,122,53,46,102,105, - 110,100,95,115,112,101,99,40,41,32,110,111,116,32,102,111, - 117,110,100,59,32,102,97,108,108,105,110,103,32,98,97,99, - 107,32,116,111,32,102,105,110,100,95,108,111,97,100,101,114, - 40,41,122,53,46,102,105,110,100,95,115,112,101,99,40,41, - 32,110,111,116,32,102,111,117,110,100,59,32,102,97,108,108, - 105,110,103,32,98,97,99,107,32,116,111,32,102,105,110,100, - 95,109,111,100,117,108,101,40,41,41,11,114,153,0,0,0, - 114,159,0,0,0,90,12,95,111,98,106,101,99,116,95,110, - 97,109,101,114,99,0,0,0,114,100,0,0,0,114,162,0, - 0,0,114,161,0,0,0,114,229,0,0,0,114,224,0,0, - 0,114,207,0,0,0,114,202,0,0,0,41,7,114,221,0, - 0,0,114,163,0,0,0,114,81,1,0,0,114,166,0,0, - 0,114,164,0,0,0,114,165,0,0,0,114,210,0,0,0, - 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,218, - 16,95,108,101,103,97,99,121,95,103,101,116,95,115,112,101, - 99,86,5,0,0,115,28,0,0,0,10,4,16,1,12,2, - 16,1,16,2,12,2,10,1,4,1,8,1,12,1,12,1, - 6,1,4,1,255,128,122,27,80,97,116,104,70,105,110,100, - 101,114,46,95,108,101,103,97,99,121,95,103,101,116,95,115, - 112,101,99,78,99,4,0,0,0,0,0,0,0,0,0,0, - 0,9,0,0,0,5,0,0,0,67,0,0,0,115,166,0, - 0,0,103,0,125,4,124,2,68,0,93,67,125,5,116,0, - 124,5,116,1,116,2,102,2,131,2,115,14,113,4,124,0, - 160,3,124,5,161,1,125,6,124,6,100,1,117,1,114,71, - 116,4,124,6,100,2,131,2,114,35,124,6,160,5,124,1, - 124,3,161,2,125,7,110,6,124,0,160,6,124,1,124,6, - 161,2,125,7,124,7,100,1,117,0,114,46,113,4,124,7, - 106,7,100,1,117,1,114,55,124,7,2,0,1,0,83,0, - 124,7,106,8,125,8,124,8,100,1,117,0,114,66,116,9, - 100,3,131,1,130,1,124,4,160,10,124,8,161,1,1,0, - 113,4,116,11,160,12,124,1,100,1,161,2,125,7,124,4, - 124,7,95,8,124,7,83,0,41,4,122,63,70,105,110,100, - 32,116,104,101,32,108,111,97,100,101,114,32,111,114,32,110, - 97,109,101,115,112,97,99,101,95,112,97,116,104,32,102,111, - 114,32,116,104,105,115,32,109,111,100,117,108,101,47,112,97, - 99,107,97,103,101,32,110,97,109,101,46,78,114,226,0,0, - 0,122,19,115,112,101,99,32,109,105,115,115,105,110,103,32, - 108,111,97,100,101,114,41,13,114,185,0,0,0,114,109,0, - 0,0,218,5,98,121,116,101,115,114,86,1,0,0,114,153, - 0,0,0,114,226,0,0,0,114,87,1,0,0,114,164,0, - 0,0,114,202,0,0,0,114,142,0,0,0,114,191,0,0, - 0,114,159,0,0,0,114,207,0,0,0,41,9,114,221,0, - 0,0,114,163,0,0,0,114,65,0,0,0,114,225,0,0, - 0,218,14,110,97,109,101,115,112,97,99,101,95,112,97,116, - 104,90,5,101,110,116,114,121,114,81,1,0,0,114,210,0, - 0,0,114,165,0,0,0,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,218,9,95,103,101,116,95,115,112,101, - 99,107,5,0,0,115,44,0,0,0,4,5,8,1,14,1, - 2,1,10,1,8,1,10,1,14,1,12,2,8,1,2,1, - 10,1,8,1,6,1,8,1,8,1,10,5,2,128,12,2, - 6,1,4,1,255,128,122,20,80,97,116,104,70,105,110,100, - 101,114,46,95,103,101,116,95,115,112,101,99,99,4,0,0, - 0,0,0,0,0,0,0,0,0,6,0,0,0,5,0,0, - 0,67,0,0,0,115,94,0,0,0,124,2,100,1,117,0, - 114,7,116,0,106,1,125,2,124,0,160,2,124,1,124,2, - 124,3,161,3,125,4,124,4,100,1,117,0,114,20,100,1, - 83,0,124,4,106,3,100,1,117,0,114,45,124,4,106,4, - 125,5,124,5,114,43,100,1,124,4,95,5,116,6,124,1, - 124,5,124,0,106,2,131,3,124,4,95,4,124,4,83,0, - 100,1,83,0,124,4,83,0,41,2,122,141,84,114,121,32, - 116,111,32,102,105,110,100,32,97,32,115,112,101,99,32,102, - 111,114,32,39,102,117,108,108,110,97,109,101,39,32,111,110, + 2,160,7,124,1,161,1,125,4,103,0,125,5,124,4,100, + 0,117,1,114,58,116,1,160,8,124,1,124,4,161,2,83, + 0,116,1,160,9,124,1,100,0,161,2,125,6,124,5,124, + 6,95,10,124,6,83,0,41,4,78,114,161,0,0,0,122, + 53,46,102,105,110,100,95,115,112,101,99,40,41,32,110,111, + 116,32,102,111,117,110,100,59,32,102,97,108,108,105,110,103, + 32,98,97,99,107,32,116,111,32,102,105,110,100,95,108,111, + 97,100,101,114,40,41,122,53,46,102,105,110,100,95,115,112, + 101,99,40,41,32,110,111,116,32,102,111,117,110,100,59,32, + 102,97,108,108,105,110,103,32,98,97,99,107,32,116,111,32, + 102,105,110,100,95,109,111,100,117,108,101,40,41,41,11,114, + 153,0,0,0,114,159,0,0,0,90,12,95,111,98,106,101, + 99,116,95,110,97,109,101,114,99,0,0,0,114,100,0,0, + 0,114,162,0,0,0,114,161,0,0,0,114,229,0,0,0, + 114,224,0,0,0,114,207,0,0,0,114,202,0,0,0,41, + 7,114,221,0,0,0,114,163,0,0,0,114,82,1,0,0, + 114,166,0,0,0,114,164,0,0,0,114,165,0,0,0,114, + 210,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, + 0,0,0,218,16,95,108,101,103,97,99,121,95,103,101,116, + 95,115,112,101,99,86,5,0,0,115,28,0,0,0,10,4, + 16,1,12,2,16,1,16,2,12,2,10,1,4,1,8,1, + 12,1,12,1,6,1,4,1,255,128,122,27,80,97,116,104, + 70,105,110,100,101,114,46,95,108,101,103,97,99,121,95,103, + 101,116,95,115,112,101,99,78,99,4,0,0,0,0,0,0, + 0,0,0,0,0,9,0,0,0,5,0,0,0,67,0,0, + 0,115,166,0,0,0,103,0,125,4,124,2,68,0,93,67, + 125,5,116,0,124,5,116,1,116,2,102,2,131,2,115,14, + 113,4,124,0,160,3,124,5,161,1,125,6,124,6,100,1, + 117,1,114,71,116,4,124,6,100,2,131,2,114,35,124,6, + 160,5,124,1,124,3,161,2,125,7,110,6,124,0,160,6, + 124,1,124,6,161,2,125,7,124,7,100,1,117,0,114,46, + 113,4,124,7,106,7,100,1,117,1,114,55,124,7,2,0, + 1,0,83,0,124,7,106,8,125,8,124,8,100,1,117,0, + 114,66,116,9,100,3,131,1,130,1,124,4,160,10,124,8, + 161,1,1,0,113,4,116,11,160,12,124,1,100,1,161,2, + 125,7,124,4,124,7,95,8,124,7,83,0,41,4,122,63, + 70,105,110,100,32,116,104,101,32,108,111,97,100,101,114,32, + 111,114,32,110,97,109,101,115,112,97,99,101,95,112,97,116, + 104,32,102,111,114,32,116,104,105,115,32,109,111,100,117,108, + 101,47,112,97,99,107,97,103,101,32,110,97,109,101,46,78, + 114,226,0,0,0,122,19,115,112,101,99,32,109,105,115,115, + 105,110,103,32,108,111,97,100,101,114,41,13,114,185,0,0, + 0,114,109,0,0,0,218,5,98,121,116,101,115,114,87,1, + 0,0,114,153,0,0,0,114,226,0,0,0,114,88,1,0, + 0,114,164,0,0,0,114,202,0,0,0,114,142,0,0,0, + 114,191,0,0,0,114,159,0,0,0,114,207,0,0,0,41, + 9,114,221,0,0,0,114,163,0,0,0,114,65,0,0,0, + 114,225,0,0,0,218,14,110,97,109,101,115,112,97,99,101, + 95,112,97,116,104,90,5,101,110,116,114,121,114,82,1,0, + 0,114,210,0,0,0,114,165,0,0,0,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,218,9,95,103,101,116, + 95,115,112,101,99,107,5,0,0,115,44,0,0,0,4,5, + 8,1,14,1,2,1,10,1,8,1,10,1,14,1,12,2, + 8,1,2,1,10,1,8,1,6,1,8,1,8,1,10,5, + 2,128,12,2,6,1,4,1,255,128,122,20,80,97,116,104, + 70,105,110,100,101,114,46,95,103,101,116,95,115,112,101,99, + 99,4,0,0,0,0,0,0,0,0,0,0,0,6,0,0, + 0,5,0,0,0,67,0,0,0,115,94,0,0,0,124,2, + 100,1,117,0,114,7,116,0,106,1,125,2,124,0,160,2, + 124,1,124,2,124,3,161,3,125,4,124,4,100,1,117,0, + 114,20,100,1,83,0,124,4,106,3,100,1,117,0,114,45, + 124,4,106,4,125,5,124,5,114,43,100,1,124,4,95,5, + 116,6,124,1,124,5,124,0,106,2,131,3,124,4,95,4, + 124,4,83,0,100,1,83,0,124,4,83,0,41,2,122,141, + 84,114,121,32,116,111,32,102,105,110,100,32,97,32,115,112, + 101,99,32,102,111,114,32,39,102,117,108,108,110,97,109,101, + 39,32,111,110,32,115,121,115,46,112,97,116,104,32,111,114, + 32,39,112,97,116,104,39,46,10,10,32,32,32,32,32,32, + 32,32,84,104,101,32,115,101,97,114,99,104,32,105,115,32, + 98,97,115,101,100,32,111,110,32,115,121,115,46,112,97,116, + 104,95,104,111,111,107,115,32,97,110,100,32,115,121,115,46, + 112,97,116,104,95,105,109,112,111,114,116,101,114,95,99,97, + 99,104,101,46,10,32,32,32,32,32,32,32,32,78,41,7, + 114,15,0,0,0,114,65,0,0,0,114,91,1,0,0,114, + 164,0,0,0,114,202,0,0,0,114,205,0,0,0,114,47, + 1,0,0,41,6,114,221,0,0,0,114,163,0,0,0,114, + 65,0,0,0,114,225,0,0,0,114,210,0,0,0,114,90, + 1,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,114,226,0,0,0,139,5,0,0,115,28,0,0,0, + 8,6,6,1,14,1,8,1,4,1,10,1,6,1,4,1, + 6,3,16,1,4,1,4,2,4,2,255,128,122,20,80,97, + 116,104,70,105,110,100,101,114,46,102,105,110,100,95,115,112, + 101,99,99,3,0,0,0,0,0,0,0,0,0,0,0,4, + 0,0,0,4,0,0,0,67,0,0,0,115,42,0,0,0, + 116,0,160,1,100,1,116,2,161,2,1,0,124,0,160,3, + 124,1,124,2,161,2,125,3,124,3,100,2,117,0,114,18, + 100,2,83,0,124,3,106,4,83,0,41,3,122,170,102,105, + 110,100,32,116,104,101,32,109,111,100,117,108,101,32,111,110, 32,115,121,115,46,112,97,116,104,32,111,114,32,39,112,97, - 116,104,39,46,10,10,32,32,32,32,32,32,32,32,84,104, - 101,32,115,101,97,114,99,104,32,105,115,32,98,97,115,101, - 100,32,111,110,32,115,121,115,46,112,97,116,104,95,104,111, - 111,107,115,32,97,110,100,32,115,121,115,46,112,97,116,104, + 116,104,39,32,98,97,115,101,100,32,111,110,32,115,121,115, + 46,112,97,116,104,95,104,111,111,107,115,32,97,110,100,10, + 32,32,32,32,32,32,32,32,115,121,115,46,112,97,116,104, 95,105,109,112,111,114,116,101,114,95,99,97,99,104,101,46, - 10,32,32,32,32,32,32,32,32,78,41,7,114,15,0,0, - 0,114,65,0,0,0,114,90,1,0,0,114,164,0,0,0, - 114,202,0,0,0,114,205,0,0,0,114,46,1,0,0,41, - 6,114,221,0,0,0,114,163,0,0,0,114,65,0,0,0, - 114,225,0,0,0,114,210,0,0,0,114,89,1,0,0,114, - 7,0,0,0,114,7,0,0,0,114,8,0,0,0,114,226, - 0,0,0,139,5,0,0,115,28,0,0,0,8,6,6,1, - 14,1,8,1,4,1,10,1,6,1,4,1,6,3,16,1, - 4,1,4,2,4,2,255,128,122,20,80,97,116,104,70,105, - 110,100,101,114,46,102,105,110,100,95,115,112,101,99,99,3, - 0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4, - 0,0,0,67,0,0,0,115,42,0,0,0,116,0,160,1, - 100,1,116,2,161,2,1,0,124,0,160,3,124,1,124,2, - 161,2,125,3,124,3,100,2,117,0,114,18,100,2,83,0, - 124,3,106,4,83,0,41,3,122,170,102,105,110,100,32,116, - 104,101,32,109,111,100,117,108,101,32,111,110,32,115,121,115, - 46,112,97,116,104,32,111,114,32,39,112,97,116,104,39,32, - 98,97,115,101,100,32,111,110,32,115,121,115,46,112,97,116, - 104,95,104,111,111,107,115,32,97,110,100,10,32,32,32,32, - 32,32,32,32,115,121,115,46,112,97,116,104,95,105,109,112, - 111,114,116,101,114,95,99,97,99,104,101,46,10,10,32,32, - 32,32,32,32,32,32,84,104,105,115,32,109,101,116,104,111, - 100,32,105,115,32,100,101,112,114,101,99,97,116,101,100,46, - 32,32,85,115,101,32,102,105,110,100,95,115,112,101,99,40, - 41,32,105,110,115,116,101,97,100,46,10,10,32,32,32,32, - 32,32,32,32,122,101,80,97,116,104,70,105,110,100,101,114, - 46,102,105,110,100,95,109,111,100,117,108,101,40,41,32,105, - 115,32,100,101,112,114,101,99,97,116,101,100,32,97,110,100, - 32,115,108,97,116,101,100,32,102,111,114,32,114,101,109,111, - 118,97,108,32,105,110,32,80,121,116,104,111,110,32,51,46, - 49,50,59,32,117,115,101,32,102,105,110,100,95,115,112,101, - 99,40,41,32,105,110,115,116,101,97,100,78,114,227,0,0, - 0,114,228,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,229,0,0,0,163,5,0,0,115,16, - 0,0,0,6,8,2,2,4,254,12,3,8,1,4,1,6, - 1,255,128,122,22,80,97,116,104,70,105,110,100,101,114,46, - 102,105,110,100,95,109,111,100,117,108,101,99,0,0,0,0, - 0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0, - 79,0,0,0,115,28,0,0,0,100,1,100,2,108,0,109, - 1,125,2,1,0,124,2,106,2,124,0,105,0,124,1,164, - 1,142,1,83,0,41,4,97,32,1,0,0,10,32,32,32, - 32,32,32,32,32,70,105,110,100,32,100,105,115,116,114,105, - 98,117,116,105,111,110,115,46,10,10,32,32,32,32,32,32, - 32,32,82,101,116,117,114,110,32,97,110,32,105,116,101,114, - 97,98,108,101,32,111,102,32,97,108,108,32,68,105,115,116, - 114,105,98,117,116,105,111,110,32,105,110,115,116,97,110,99, - 101,115,32,99,97,112,97,98,108,101,32,111,102,10,32,32, - 32,32,32,32,32,32,108,111,97,100,105,110,103,32,116,104, - 101,32,109,101,116,97,100,97,116,97,32,102,111,114,32,112, - 97,99,107,97,103,101,115,32,109,97,116,99,104,105,110,103, - 32,96,96,99,111,110,116,101,120,116,46,110,97,109,101,96, - 96,10,32,32,32,32,32,32,32,32,40,111,114,32,97,108, - 108,32,110,97,109,101,115,32,105,102,32,96,96,78,111,110, - 101,96,96,32,105,110,100,105,99,97,116,101,100,41,32,97, - 108,111,110,103,32,116,104,101,32,112,97,116,104,115,32,105, - 110,32,116,104,101,32,108,105,115,116,10,32,32,32,32,32, - 32,32,32,111,102,32,100,105,114,101,99,116,111,114,105,101, - 115,32,96,96,99,111,110,116,101,120,116,46,112,97,116,104, - 96,96,46,10,32,32,32,32,32,32,32,32,114,0,0,0, - 0,41,1,218,18,77,101,116,97,100,97,116,97,80,97,116, - 104,70,105,110,100,101,114,78,41,3,90,18,105,109,112,111, - 114,116,108,105,98,46,109,101,116,97,100,97,116,97,114,91, - 1,0,0,218,18,102,105,110,100,95,100,105,115,116,114,105, - 98,117,116,105,111,110,115,41,3,114,144,0,0,0,114,145, - 0,0,0,114,91,1,0,0,114,7,0,0,0,114,7,0, - 0,0,114,8,0,0,0,114,92,1,0,0,179,5,0,0, - 115,6,0,0,0,12,10,16,1,255,128,122,29,80,97,116, - 104,70,105,110,100,101,114,46,102,105,110,100,95,100,105,115, - 116,114,105,98,117,116,105,111,110,115,41,1,78,41,2,78, - 78,41,1,78,41,14,114,150,0,0,0,114,149,0,0,0, - 114,151,0,0,0,114,152,0,0,0,114,232,0,0,0,114, - 77,1,0,0,114,83,1,0,0,114,233,0,0,0,114,86, - 1,0,0,114,87,1,0,0,114,90,1,0,0,114,226,0, - 0,0,114,229,0,0,0,114,92,1,0,0,114,7,0,0, + 10,10,32,32,32,32,32,32,32,32,84,104,105,115,32,109, + 101,116,104,111,100,32,105,115,32,100,101,112,114,101,99,97, + 116,101,100,46,32,32,85,115,101,32,102,105,110,100,95,115, + 112,101,99,40,41,32,105,110,115,116,101,97,100,46,10,10, + 32,32,32,32,32,32,32,32,122,101,80,97,116,104,70,105, + 110,100,101,114,46,102,105,110,100,95,109,111,100,117,108,101, + 40,41,32,105,115,32,100,101,112,114,101,99,97,116,101,100, + 32,97,110,100,32,115,108,97,116,101,100,32,102,111,114,32, + 114,101,109,111,118,97,108,32,105,110,32,80,121,116,104,111, + 110,32,51,46,49,50,59,32,117,115,101,32,102,105,110,100, + 95,115,112,101,99,40,41,32,105,110,115,116,101,97,100,78, + 114,227,0,0,0,114,228,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,229,0,0,0,163,5, + 0,0,115,16,0,0,0,6,8,2,2,4,254,12,3,8, + 1,4,1,6,1,255,128,122,22,80,97,116,104,70,105,110, + 100,101,114,46,102,105,110,100,95,109,111,100,117,108,101,99, + 0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0, + 4,0,0,0,79,0,0,0,115,28,0,0,0,100,1,100, + 2,108,0,109,1,125,2,1,0,124,2,106,2,124,0,105, + 0,124,1,164,1,142,1,83,0,41,4,97,32,1,0,0, + 10,32,32,32,32,32,32,32,32,70,105,110,100,32,100,105, + 115,116,114,105,98,117,116,105,111,110,115,46,10,10,32,32, + 32,32,32,32,32,32,82,101,116,117,114,110,32,97,110,32, + 105,116,101,114,97,98,108,101,32,111,102,32,97,108,108,32, + 68,105,115,116,114,105,98,117,116,105,111,110,32,105,110,115, + 116,97,110,99,101,115,32,99,97,112,97,98,108,101,32,111, + 102,10,32,32,32,32,32,32,32,32,108,111,97,100,105,110, + 103,32,116,104,101,32,109,101,116,97,100,97,116,97,32,102, + 111,114,32,112,97,99,107,97,103,101,115,32,109,97,116,99, + 104,105,110,103,32,96,96,99,111,110,116,101,120,116,46,110, + 97,109,101,96,96,10,32,32,32,32,32,32,32,32,40,111, + 114,32,97,108,108,32,110,97,109,101,115,32,105,102,32,96, + 96,78,111,110,101,96,96,32,105,110,100,105,99,97,116,101, + 100,41,32,97,108,111,110,103,32,116,104,101,32,112,97,116, + 104,115,32,105,110,32,116,104,101,32,108,105,115,116,10,32, + 32,32,32,32,32,32,32,111,102,32,100,105,114,101,99,116, + 111,114,105,101,115,32,96,96,99,111,110,116,101,120,116,46, + 112,97,116,104,96,96,46,10,32,32,32,32,32,32,32,32, + 114,0,0,0,0,41,1,218,18,77,101,116,97,100,97,116, + 97,80,97,116,104,70,105,110,100,101,114,78,41,3,90,18, + 105,109,112,111,114,116,108,105,98,46,109,101,116,97,100,97, + 116,97,114,92,1,0,0,218,18,102,105,110,100,95,100,105, + 115,116,114,105,98,117,116,105,111,110,115,41,3,114,144,0, + 0,0,114,145,0,0,0,114,92,1,0,0,114,7,0,0, + 0,114,7,0,0,0,114,8,0,0,0,114,93,1,0,0, + 179,5,0,0,115,6,0,0,0,12,10,16,1,255,128,122, + 29,80,97,116,104,70,105,110,100,101,114,46,102,105,110,100, + 95,100,105,115,116,114,105,98,117,116,105,111,110,115,114,69, + 0,0,0,114,230,0,0,0,41,14,114,150,0,0,0,114, + 149,0,0,0,114,151,0,0,0,114,152,0,0,0,114,233, + 0,0,0,114,78,1,0,0,114,84,1,0,0,114,234,0, + 0,0,114,87,1,0,0,114,88,1,0,0,114,91,1,0, + 0,114,226,0,0,0,114,229,0,0,0,114,93,1,0,0, + 114,7,0,0,0,114,7,0,0,0,114,7,0,0,0,114, + 8,0,0,0,114,77,1,0,0,37,5,0,0,115,38,0, + 0,0,8,0,4,2,2,2,10,1,2,9,10,1,2,12, + 10,1,2,21,10,1,2,20,12,1,2,31,12,1,2,23, + 12,1,2,15,14,1,255,128,114,77,1,0,0,99,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0, + 0,0,64,0,0,0,115,90,0,0,0,101,0,90,1,100, + 0,90,2,100,1,90,3,100,2,100,3,132,0,90,4,100, + 4,100,5,132,0,90,5,101,6,90,7,100,6,100,7,132, + 0,90,8,100,8,100,9,132,0,90,9,100,19,100,11,100, + 12,132,1,90,10,100,13,100,14,132,0,90,11,101,12,100, + 15,100,16,132,0,131,1,90,13,100,17,100,18,132,0,90, + 14,100,10,83,0,41,20,218,10,70,105,108,101,70,105,110, + 100,101,114,122,172,70,105,108,101,45,98,97,115,101,100,32, + 102,105,110,100,101,114,46,10,10,32,32,32,32,73,110,116, + 101,114,97,99,116,105,111,110,115,32,119,105,116,104,32,116, + 104,101,32,102,105,108,101,32,115,121,115,116,101,109,32,97, + 114,101,32,99,97,99,104,101,100,32,102,111,114,32,112,101, + 114,102,111,114,109,97,110,99,101,44,32,98,101,105,110,103, + 10,32,32,32,32,114,101,102,114,101,115,104,101,100,32,119, + 104,101,110,32,116,104,101,32,100,105,114,101,99,116,111,114, + 121,32,116,104,101,32,102,105,110,100,101,114,32,105,115,32, + 104,97,110,100,108,105,110,103,32,104,97,115,32,98,101,101, + 110,32,109,111,100,105,102,105,101,100,46,10,10,32,32,32, + 32,99,2,0,0,0,0,0,0,0,0,0,0,0,5,0, + 0,0,6,0,0,0,7,0,0,0,115,112,0,0,0,103, + 0,125,3,124,2,68,0,93,16,92,2,137,0,125,4,124, + 3,160,0,135,0,102,1,100,1,100,2,132,8,124,4,68, + 0,131,1,161,1,1,0,113,4,124,3,124,0,95,1,124, + 1,112,27,100,3,124,0,95,2,116,3,124,0,106,2,131, + 1,115,43,116,4,116,5,160,6,161,0,124,0,106,2,131, + 2,124,0,95,2,100,4,124,0,95,7,116,8,131,0,124, + 0,95,9,116,8,131,0,124,0,95,10,100,5,83,0,41, + 6,122,154,73,110,105,116,105,97,108,105,122,101,32,119,105, + 116,104,32,116,104,101,32,112,97,116,104,32,116,111,32,115, + 101,97,114,99,104,32,111,110,32,97,110,100,32,97,32,118, + 97,114,105,97,98,108,101,32,110,117,109,98,101,114,32,111, + 102,10,32,32,32,32,32,32,32,32,50,45,116,117,112,108, + 101,115,32,99,111,110,116,97,105,110,105,110,103,32,116,104, + 101,32,108,111,97,100,101,114,32,97,110,100,32,116,104,101, + 32,102,105,108,101,32,115,117,102,102,105,120,101,115,32,116, + 104,101,32,108,111,97,100,101,114,10,32,32,32,32,32,32, + 32,32,114,101,99,111,103,110,105,122,101,115,46,99,1,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0, + 0,0,51,0,0,0,115,24,0,0,0,129,0,124,0,93, + 7,125,1,124,1,136,0,102,2,86,0,1,0,113,2,100, + 0,83,0,114,69,0,0,0,114,7,0,0,0,114,43,1, + 0,0,169,1,114,164,0,0,0,114,7,0,0,0,114,8, + 0,0,0,114,9,0,0,0,208,5,0,0,115,6,0,0, + 0,6,128,18,0,255,128,122,38,70,105,108,101,70,105,110, + 100,101,114,46,95,95,105,110,105,116,95,95,46,60,108,111, + 99,97,108,115,62,46,60,103,101,110,101,120,112,114,62,114, + 97,0,0,0,114,130,0,0,0,78,41,11,114,191,0,0, + 0,218,8,95,108,111,97,100,101,114,115,114,65,0,0,0, + 114,86,0,0,0,114,67,0,0,0,114,18,0,0,0,114, + 82,0,0,0,218,11,95,112,97,116,104,95,109,116,105,109, + 101,218,3,115,101,116,218,11,95,112,97,116,104,95,99,97, + 99,104,101,218,19,95,114,101,108,97,120,101,100,95,112,97, + 116,104,95,99,97,99,104,101,41,5,114,143,0,0,0,114, + 65,0,0,0,218,14,108,111,97,100,101,114,95,100,101,116, + 97,105,108,115,90,7,108,111,97,100,101,114,115,114,212,0, + 0,0,114,7,0,0,0,114,95,1,0,0,114,8,0,0, + 0,114,236,0,0,0,202,5,0,0,115,22,0,0,0,4, + 4,12,1,26,1,6,1,10,2,10,1,18,1,6,1,8, + 1,12,1,255,128,122,19,70,105,108,101,70,105,110,100,101, + 114,46,95,95,105,110,105,116,95,95,99,1,0,0,0,0, + 0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,67, + 0,0,0,115,10,0,0,0,100,1,124,0,95,0,100,2, + 83,0,41,3,122,31,73,110,118,97,108,105,100,97,116,101, + 32,116,104,101,32,100,105,114,101,99,116,111,114,121,32,109, + 116,105,109,101,46,114,130,0,0,0,78,41,1,114,97,1, + 0,0,114,21,1,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,114,78,1,0,0,218,5,0,0,114, + 81,0,0,0,122,28,70,105,108,101,70,105,110,100,101,114, + 46,105,110,118,97,108,105,100,97,116,101,95,99,97,99,104, + 101,115,99,2,0,0,0,0,0,0,0,0,0,0,0,3, + 0,0,0,4,0,0,0,67,0,0,0,115,54,0,0,0, + 116,0,160,1,100,1,116,2,161,2,1,0,124,0,160,3, + 124,1,161,1,125,2,124,2,100,2,117,0,114,19,100,2, + 103,0,102,2,83,0,124,2,106,4,124,2,106,5,112,25, + 103,0,102,2,83,0,41,3,122,197,84,114,121,32,116,111, + 32,102,105,110,100,32,97,32,108,111,97,100,101,114,32,102, + 111,114,32,116,104,101,32,115,112,101,99,105,102,105,101,100, + 32,109,111,100,117,108,101,44,32,111,114,32,116,104,101,32, + 110,97,109,101,115,112,97,99,101,10,32,32,32,32,32,32, + 32,32,112,97,99,107,97,103,101,32,112,111,114,116,105,111, + 110,115,46,32,82,101,116,117,114,110,115,32,40,108,111,97, + 100,101,114,44,32,108,105,115,116,45,111,102,45,112,111,114, + 116,105,111,110,115,41,46,10,10,32,32,32,32,32,32,32, + 32,84,104,105,115,32,109,101,116,104,111,100,32,105,115,32, + 100,101,112,114,101,99,97,116,101,100,46,32,32,85,115,101, + 32,102,105,110,100,95,115,112,101,99,40,41,32,105,110,115, + 116,101,97,100,46,10,10,32,32,32,32,32,32,32,32,122, + 101,70,105,108,101,70,105,110,100,101,114,46,102,105,110,100, + 95,108,111,97,100,101,114,40,41,32,105,115,32,100,101,112, + 114,101,99,97,116,101,100,32,97,110,100,32,115,108,97,116, + 101,100,32,102,111,114,32,114,101,109,111,118,97,108,32,105, + 110,32,80,121,116,104,111,110,32,51,46,49,50,59,32,117, + 115,101,32,102,105,110,100,95,115,112,101,99,40,41,32,105, + 110,115,116,101,97,100,78,41,6,114,99,0,0,0,114,100, + 0,0,0,114,101,0,0,0,114,226,0,0,0,114,164,0, + 0,0,114,202,0,0,0,41,3,114,143,0,0,0,114,163, + 0,0,0,114,210,0,0,0,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,161,0,0,0,224,5,0,0, + 115,16,0,0,0,6,7,2,2,4,254,10,3,8,1,8, + 1,16,1,255,128,122,22,70,105,108,101,70,105,110,100,101, + 114,46,102,105,110,100,95,108,111,97,100,101,114,99,6,0, + 0,0,0,0,0,0,0,0,0,0,7,0,0,0,6,0, + 0,0,67,0,0,0,115,26,0,0,0,124,1,124,2,124, + 3,131,2,125,6,116,0,124,2,124,3,124,6,124,4,100, + 1,141,4,83,0,41,2,78,114,201,0,0,0,41,1,114, + 213,0,0,0,41,7,114,143,0,0,0,114,211,0,0,0, + 114,163,0,0,0,114,65,0,0,0,90,4,115,109,115,108, + 114,225,0,0,0,114,164,0,0,0,114,7,0,0,0,114, + 7,0,0,0,114,8,0,0,0,114,91,1,0,0,239,5, + 0,0,115,10,0,0,0,10,1,8,1,2,1,6,255,255, + 128,122,20,70,105,108,101,70,105,110,100,101,114,46,95,103, + 101,116,95,115,112,101,99,78,99,3,0,0,0,0,0,0, + 0,0,0,0,0,14,0,0,0,9,0,0,0,67,0,0, + 0,115,120,1,0,0,100,1,125,3,124,1,160,0,100,2, + 161,1,100,3,25,0,125,4,122,12,116,1,124,0,106,2, + 112,17,116,3,160,4,161,0,131,1,106,5,125,5,87,0, + 110,9,4,0,116,6,121,187,1,0,1,0,1,0,100,4, + 125,5,89,0,124,5,124,0,106,7,107,3,114,43,124,0, + 160,8,161,0,1,0,124,5,124,0,95,7,116,9,131,0, + 114,54,124,0,106,10,125,6,124,4,160,11,161,0,125,7, + 110,5,124,0,106,12,125,6,124,4,125,7,124,7,124,6, + 118,0,114,106,116,13,124,0,106,2,124,4,131,2,125,8, + 124,0,106,14,68,0,93,29,92,2,125,9,125,10,100,5, + 124,9,23,0,125,11,116,13,124,8,124,11,131,2,125,12, + 116,15,124,12,131,1,114,101,124,0,160,16,124,10,124,1, + 124,12,124,8,103,1,124,2,161,5,2,0,1,0,83,0, + 113,72,116,17,124,8,131,1,125,3,124,0,106,14,68,0, + 93,54,92,2,125,9,125,10,122,10,116,13,124,0,106,2, + 124,4,124,9,23,0,131,2,125,12,87,0,110,10,4,0, + 116,18,121,186,1,0,1,0,1,0,89,0,1,0,100,6, + 83,0,116,19,106,20,100,7,124,12,100,3,100,8,141,3, + 1,0,124,7,124,9,23,0,124,6,118,0,114,163,116,15, + 124,12,131,1,114,163,124,0,160,16,124,10,124,1,124,12, + 100,6,124,2,161,5,2,0,1,0,83,0,113,109,124,3, + 114,184,116,19,160,20,100,9,124,8,161,2,1,0,116,19, + 160,21,124,1,100,6,161,2,125,13,124,8,103,1,124,13, + 95,22,124,13,83,0,100,6,83,0,119,0,119,0,41,10, + 122,111,84,114,121,32,116,111,32,102,105,110,100,32,97,32, + 115,112,101,99,32,102,111,114,32,116,104,101,32,115,112,101, + 99,105,102,105,101,100,32,109,111,100,117,108,101,46,10,10, + 32,32,32,32,32,32,32,32,82,101,116,117,114,110,115,32, + 116,104,101,32,109,97,116,99,104,105,110,103,32,115,112,101, + 99,44,32,111,114,32,78,111,110,101,32,105,102,32,110,111, + 116,32,102,111,117,110,100,46,10,32,32,32,32,32,32,32, + 32,70,114,97,0,0,0,114,44,0,0,0,114,130,0,0, + 0,114,236,0,0,0,78,122,9,116,114,121,105,110,103,32, + 123,125,41,1,90,9,118,101,114,98,111,115,105,116,121,122, + 25,112,111,115,115,105,98,108,101,32,110,97,109,101,115,112, + 97,99,101,32,102,111,114,32,123,125,41,23,114,104,0,0, + 0,114,75,0,0,0,114,65,0,0,0,114,18,0,0,0, + 114,82,0,0,0,114,35,1,0,0,114,76,0,0,0,114, + 97,1,0,0,218,11,95,102,105,108,108,95,99,97,99,104, + 101,114,21,0,0,0,114,100,1,0,0,114,131,0,0,0, + 114,99,1,0,0,114,67,0,0,0,114,96,1,0,0,114, + 80,0,0,0,114,91,1,0,0,114,83,0,0,0,114,111, + 0,0,0,114,159,0,0,0,114,173,0,0,0,114,207,0, + 0,0,114,202,0,0,0,41,14,114,143,0,0,0,114,163, + 0,0,0,114,225,0,0,0,90,12,105,115,95,110,97,109, + 101,115,112,97,99,101,90,11,116,97,105,108,95,109,111,100, + 117,108,101,114,193,0,0,0,90,5,99,97,99,104,101,90, + 12,99,97,99,104,101,95,109,111,100,117,108,101,90,9,98, + 97,115,101,95,112,97,116,104,114,44,1,0,0,114,211,0, + 0,0,90,13,105,110,105,116,95,102,105,108,101,110,97,109, + 101,90,9,102,117,108,108,95,112,97,116,104,114,210,0,0, 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 114,76,1,0,0,37,5,0,0,115,38,0,0,0,8,0, - 4,2,2,2,10,1,2,9,10,1,2,12,10,1,2,21, - 10,1,2,20,12,1,2,31,12,1,2,23,12,1,2,15, - 14,1,255,128,114,76,1,0,0,99,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,64,0, - 0,0,115,90,0,0,0,101,0,90,1,100,0,90,2,100, - 1,90,3,100,2,100,3,132,0,90,4,100,4,100,5,132, - 0,90,5,101,6,90,7,100,6,100,7,132,0,90,8,100, - 8,100,9,132,0,90,9,100,19,100,11,100,12,132,1,90, - 10,100,13,100,14,132,0,90,11,101,12,100,15,100,16,132, - 0,131,1,90,13,100,17,100,18,132,0,90,14,100,10,83, - 0,41,20,218,10,70,105,108,101,70,105,110,100,101,114,122, - 172,70,105,108,101,45,98,97,115,101,100,32,102,105,110,100, - 101,114,46,10,10,32,32,32,32,73,110,116,101,114,97,99, - 116,105,111,110,115,32,119,105,116,104,32,116,104,101,32,102, - 105,108,101,32,115,121,115,116,101,109,32,97,114,101,32,99, - 97,99,104,101,100,32,102,111,114,32,112,101,114,102,111,114, - 109,97,110,99,101,44,32,98,101,105,110,103,10,32,32,32, - 32,114,101,102,114,101,115,104,101,100,32,119,104,101,110,32, - 116,104,101,32,100,105,114,101,99,116,111,114,121,32,116,104, - 101,32,102,105,110,100,101,114,32,105,115,32,104,97,110,100, - 108,105,110,103,32,104,97,115,32,98,101,101,110,32,109,111, - 100,105,102,105,101,100,46,10,10,32,32,32,32,99,2,0, - 0,0,0,0,0,0,0,0,0,0,5,0,0,0,6,0, - 0,0,7,0,0,0,115,112,0,0,0,103,0,125,3,124, - 2,68,0,93,16,92,2,137,0,125,4,124,3,160,0,135, - 0,102,1,100,1,100,2,132,8,124,4,68,0,131,1,161, - 1,1,0,113,4,124,3,124,0,95,1,124,1,112,27,100, - 3,124,0,95,2,116,3,124,0,106,2,131,1,115,43,116, - 4,116,5,160,6,161,0,124,0,106,2,131,2,124,0,95, - 2,100,4,124,0,95,7,116,8,131,0,124,0,95,9,116, - 8,131,0,124,0,95,10,100,5,83,0,41,6,122,154,73, - 110,105,116,105,97,108,105,122,101,32,119,105,116,104,32,116, - 104,101,32,112,97,116,104,32,116,111,32,115,101,97,114,99, - 104,32,111,110,32,97,110,100,32,97,32,118,97,114,105,97, - 98,108,101,32,110,117,109,98,101,114,32,111,102,10,32,32, - 32,32,32,32,32,32,50,45,116,117,112,108,101,115,32,99, - 111,110,116,97,105,110,105,110,103,32,116,104,101,32,108,111, - 97,100,101,114,32,97,110,100,32,116,104,101,32,102,105,108, - 101,32,115,117,102,102,105,120,101,115,32,116,104,101,32,108, - 111,97,100,101,114,10,32,32,32,32,32,32,32,32,114,101, - 99,111,103,110,105,122,101,115,46,99,1,0,0,0,0,0, - 0,0,0,0,0,0,2,0,0,0,3,0,0,0,51,0, - 0,0,115,24,0,0,0,129,0,124,0,93,7,125,1,124, - 1,136,0,102,2,86,0,1,0,113,2,100,0,83,0,114, - 69,0,0,0,114,7,0,0,0,114,42,1,0,0,169,1, - 114,164,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 9,0,0,0,208,5,0,0,115,6,0,0,0,6,128,18, - 0,255,128,122,38,70,105,108,101,70,105,110,100,101,114,46, - 95,95,105,110,105,116,95,95,46,60,108,111,99,97,108,115, - 62,46,60,103,101,110,101,120,112,114,62,114,97,0,0,0, - 114,130,0,0,0,78,41,11,114,191,0,0,0,218,8,95, - 108,111,97,100,101,114,115,114,65,0,0,0,114,86,0,0, - 0,114,67,0,0,0,114,18,0,0,0,114,82,0,0,0, - 218,11,95,112,97,116,104,95,109,116,105,109,101,218,3,115, - 101,116,218,11,95,112,97,116,104,95,99,97,99,104,101,218, - 19,95,114,101,108,97,120,101,100,95,112,97,116,104,95,99, - 97,99,104,101,41,5,114,143,0,0,0,114,65,0,0,0, - 218,14,108,111,97,100,101,114,95,100,101,116,97,105,108,115, - 90,7,108,111,97,100,101,114,115,114,212,0,0,0,114,7, - 0,0,0,114,94,1,0,0,114,8,0,0,0,114,235,0, - 0,0,202,5,0,0,115,22,0,0,0,4,4,12,1,26, - 1,6,1,10,2,10,1,18,1,6,1,8,1,12,1,255, - 128,122,19,70,105,108,101,70,105,110,100,101,114,46,95,95, - 105,110,105,116,95,95,99,1,0,0,0,0,0,0,0,0, - 0,0,0,1,0,0,0,2,0,0,0,67,0,0,0,115, - 10,0,0,0,100,1,124,0,95,0,100,2,83,0,41,3, - 122,31,73,110,118,97,108,105,100,97,116,101,32,116,104,101, - 32,100,105,114,101,99,116,111,114,121,32,109,116,105,109,101, - 46,114,130,0,0,0,78,41,1,114,96,1,0,0,114,20, - 1,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,77,1,0,0,218,5,0,0,114,81,0,0,0, - 122,28,70,105,108,101,70,105,110,100,101,114,46,105,110,118, - 97,108,105,100,97,116,101,95,99,97,99,104,101,115,99,2, - 0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,4, - 0,0,0,67,0,0,0,115,54,0,0,0,116,0,160,1, - 100,1,116,2,161,2,1,0,124,0,160,3,124,1,161,1, - 125,2,124,2,100,2,117,0,114,19,100,2,103,0,102,2, - 83,0,124,2,106,4,124,2,106,5,112,25,103,0,102,2, - 83,0,41,3,122,197,84,114,121,32,116,111,32,102,105,110, - 100,32,97,32,108,111,97,100,101,114,32,102,111,114,32,116, - 104,101,32,115,112,101,99,105,102,105,101,100,32,109,111,100, - 117,108,101,44,32,111,114,32,116,104,101,32,110,97,109,101, - 115,112,97,99,101,10,32,32,32,32,32,32,32,32,112,97, - 99,107,97,103,101,32,112,111,114,116,105,111,110,115,46,32, - 82,101,116,117,114,110,115,32,40,108,111,97,100,101,114,44, - 32,108,105,115,116,45,111,102,45,112,111,114,116,105,111,110, - 115,41,46,10,10,32,32,32,32,32,32,32,32,84,104,105, - 115,32,109,101,116,104,111,100,32,105,115,32,100,101,112,114, - 101,99,97,116,101,100,46,32,32,85,115,101,32,102,105,110, - 100,95,115,112,101,99,40,41,32,105,110,115,116,101,97,100, - 46,10,10,32,32,32,32,32,32,32,32,122,101,70,105,108, - 101,70,105,110,100,101,114,46,102,105,110,100,95,108,111,97, - 100,101,114,40,41,32,105,115,32,100,101,112,114,101,99,97, - 116,101,100,32,97,110,100,32,115,108,97,116,101,100,32,102, - 111,114,32,114,101,109,111,118,97,108,32,105,110,32,80,121, - 116,104,111,110,32,51,46,49,50,59,32,117,115,101,32,102, - 105,110,100,95,115,112,101,99,40,41,32,105,110,115,116,101, - 97,100,78,41,6,114,99,0,0,0,114,100,0,0,0,114, - 101,0,0,0,114,226,0,0,0,114,164,0,0,0,114,202, - 0,0,0,41,3,114,143,0,0,0,114,163,0,0,0,114, - 210,0,0,0,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,161,0,0,0,224,5,0,0,115,16,0,0, - 0,6,7,2,2,4,254,10,3,8,1,8,1,16,1,255, - 128,122,22,70,105,108,101,70,105,110,100,101,114,46,102,105, - 110,100,95,108,111,97,100,101,114,99,6,0,0,0,0,0, - 0,0,0,0,0,0,7,0,0,0,6,0,0,0,67,0, - 0,0,115,26,0,0,0,124,1,124,2,124,3,131,2,125, - 6,116,0,124,2,124,3,124,6,124,4,100,1,141,4,83, - 0,41,2,78,114,201,0,0,0,41,1,114,213,0,0,0, - 41,7,114,143,0,0,0,114,211,0,0,0,114,163,0,0, - 0,114,65,0,0,0,90,4,115,109,115,108,114,225,0,0, - 0,114,164,0,0,0,114,7,0,0,0,114,7,0,0,0, - 114,8,0,0,0,114,90,1,0,0,239,5,0,0,115,10, - 0,0,0,10,1,8,1,2,1,6,255,255,128,122,20,70, - 105,108,101,70,105,110,100,101,114,46,95,103,101,116,95,115, - 112,101,99,78,99,3,0,0,0,0,0,0,0,0,0,0, - 0,14,0,0,0,9,0,0,0,67,0,0,0,115,120,1, - 0,0,100,1,125,3,124,1,160,0,100,2,161,1,100,3, - 25,0,125,4,122,12,116,1,124,0,106,2,112,17,116,3, - 160,4,161,0,131,1,106,5,125,5,87,0,110,9,4,0, - 116,6,121,187,1,0,1,0,1,0,100,4,125,5,89,0, - 124,5,124,0,106,7,107,3,114,43,124,0,160,8,161,0, - 1,0,124,5,124,0,95,7,116,9,131,0,114,54,124,0, - 106,10,125,6,124,4,160,11,161,0,125,7,110,5,124,0, - 106,12,125,6,124,4,125,7,124,7,124,6,118,0,114,106, - 116,13,124,0,106,2,124,4,131,2,125,8,124,0,106,14, - 68,0,93,29,92,2,125,9,125,10,100,5,124,9,23,0, - 125,11,116,13,124,8,124,11,131,2,125,12,116,15,124,12, - 131,1,114,101,124,0,160,16,124,10,124,1,124,12,124,8, - 103,1,124,2,161,5,2,0,1,0,83,0,113,72,116,17, - 124,8,131,1,125,3,124,0,106,14,68,0,93,54,92,2, - 125,9,125,10,122,10,116,13,124,0,106,2,124,4,124,9, - 23,0,131,2,125,12,87,0,110,10,4,0,116,18,121,186, - 1,0,1,0,1,0,89,0,1,0,100,6,83,0,116,19, - 106,20,100,7,124,12,100,3,100,8,141,3,1,0,124,7, - 124,9,23,0,124,6,118,0,114,163,116,15,124,12,131,1, - 114,163,124,0,160,16,124,10,124,1,124,12,100,6,124,2, - 161,5,2,0,1,0,83,0,113,109,124,3,114,184,116,19, - 160,20,100,9,124,8,161,2,1,0,116,19,160,21,124,1, - 100,6,161,2,125,13,124,8,103,1,124,13,95,22,124,13, - 83,0,100,6,83,0,119,0,119,0,41,10,122,111,84,114, - 121,32,116,111,32,102,105,110,100,32,97,32,115,112,101,99, - 32,102,111,114,32,116,104,101,32,115,112,101,99,105,102,105, - 101,100,32,109,111,100,117,108,101,46,10,10,32,32,32,32, - 32,32,32,32,82,101,116,117,114,110,115,32,116,104,101,32, - 109,97,116,99,104,105,110,103,32,115,112,101,99,44,32,111, - 114,32,78,111,110,101,32,105,102,32,110,111,116,32,102,111, - 117,110,100,46,10,32,32,32,32,32,32,32,32,70,114,97, - 0,0,0,114,44,0,0,0,114,130,0,0,0,114,235,0, - 0,0,78,122,9,116,114,121,105,110,103,32,123,125,41,1, - 90,9,118,101,114,98,111,115,105,116,121,122,25,112,111,115, - 115,105,98,108,101,32,110,97,109,101,115,112,97,99,101,32, - 102,111,114,32,123,125,41,23,114,104,0,0,0,114,75,0, - 0,0,114,65,0,0,0,114,18,0,0,0,114,82,0,0, - 0,114,34,1,0,0,114,76,0,0,0,114,96,1,0,0, - 218,11,95,102,105,108,108,95,99,97,99,104,101,114,21,0, - 0,0,114,99,1,0,0,114,131,0,0,0,114,98,1,0, - 0,114,67,0,0,0,114,95,1,0,0,114,80,0,0,0, - 114,90,1,0,0,114,83,0,0,0,114,111,0,0,0,114, - 159,0,0,0,114,173,0,0,0,114,207,0,0,0,114,202, - 0,0,0,41,14,114,143,0,0,0,114,163,0,0,0,114, - 225,0,0,0,90,12,105,115,95,110,97,109,101,115,112,97, - 99,101,90,11,116,97,105,108,95,109,111,100,117,108,101,114, - 193,0,0,0,90,5,99,97,99,104,101,90,12,99,97,99, - 104,101,95,109,111,100,117,108,101,90,9,98,97,115,101,95, - 112,97,116,104,114,43,1,0,0,114,211,0,0,0,90,13, - 105,110,105,116,95,102,105,108,101,110,97,109,101,90,9,102, - 117,108,108,95,112,97,116,104,114,210,0,0,0,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,114,226,0,0, - 0,244,5,0,0,115,88,0,0,0,4,5,14,1,2,1, - 24,1,12,1,6,1,10,1,8,1,6,1,6,2,6,1, - 10,1,6,2,4,1,8,2,12,1,14,1,8,1,10,1, - 8,1,24,1,2,255,8,5,14,2,2,1,20,1,12,1, - 8,1,16,1,12,1,8,1,10,1,4,1,8,255,2,128, - 4,2,12,1,12,1,8,1,4,1,4,1,2,244,2,228, - 255,128,122,20,70,105,108,101,70,105,110,100,101,114,46,102, - 105,110,100,95,115,112,101,99,99,1,0,0,0,0,0,0, - 0,0,0,0,0,9,0,0,0,10,0,0,0,67,0,0, - 0,115,190,0,0,0,124,0,106,0,125,1,122,11,116,1, - 160,2,124,1,112,11,116,1,160,3,161,0,161,1,125,2, - 87,0,110,12,4,0,116,4,116,5,116,6,102,3,121,94, - 1,0,1,0,1,0,103,0,125,2,89,0,116,7,106,8, - 160,9,100,1,161,1,115,39,116,10,124,2,131,1,124,0, - 95,11,110,37,116,10,131,0,125,3,124,2,68,0,93,28, - 125,4,124,4,160,12,100,2,161,1,92,3,125,5,125,6, - 125,7,124,6,114,65,100,3,160,13,124,5,124,7,160,14, - 161,0,161,2,125,8,110,2,124,5,125,8,124,3,160,15, - 124,8,161,1,1,0,113,44,124,3,124,0,95,11,116,7, - 106,8,160,9,116,16,161,1,114,92,100,4,100,5,132,0, - 124,2,68,0,131,1,124,0,95,17,100,6,83,0,100,6, - 83,0,119,0,41,7,122,68,70,105,108,108,32,116,104,101, - 32,99,97,99,104,101,32,111,102,32,112,111,116,101,110,116, - 105,97,108,32,109,111,100,117,108,101,115,32,97,110,100,32, - 112,97,99,107,97,103,101,115,32,102,111,114,32,116,104,105, - 115,32,100,105,114,101,99,116,111,114,121,46,114,14,0,0, - 0,114,97,0,0,0,114,88,0,0,0,99,1,0,0,0, - 0,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0, - 83,0,0,0,115,20,0,0,0,104,0,124,0,93,6,125, - 1,124,1,160,0,161,0,146,2,113,2,83,0,114,7,0, - 0,0,41,1,114,131,0,0,0,41,2,114,5,0,0,0, - 90,2,102,110,114,7,0,0,0,114,7,0,0,0,114,8, - 0,0,0,114,13,0,0,0,68,6,0,0,115,4,0,0, - 0,20,0,255,128,122,41,70,105,108,101,70,105,110,100,101, - 114,46,95,102,105,108,108,95,99,97,99,104,101,46,60,108, - 111,99,97,108,115,62,46,60,115,101,116,99,111,109,112,62, - 78,41,18,114,65,0,0,0,114,18,0,0,0,90,7,108, - 105,115,116,100,105,114,114,82,0,0,0,114,84,1,0,0, - 218,15,80,101,114,109,105,115,115,105,111,110,69,114,114,111, - 114,218,18,78,111,116,65,68,105,114,101,99,116,111,114,121, - 69,114,114,111,114,114,15,0,0,0,114,25,0,0,0,114, - 26,0,0,0,114,97,1,0,0,114,98,1,0,0,114,126, - 0,0,0,114,89,0,0,0,114,131,0,0,0,218,3,97, - 100,100,114,27,0,0,0,114,99,1,0,0,41,9,114,143, - 0,0,0,114,65,0,0,0,90,8,99,111,110,116,101,110, - 116,115,90,21,108,111,119,101,114,95,115,117,102,102,105,120, - 95,99,111,110,116,101,110,116,115,114,69,1,0,0,114,141, - 0,0,0,114,53,1,0,0,114,43,1,0,0,90,8,110, - 101,119,95,110,97,109,101,114,7,0,0,0,114,7,0,0, - 0,114,8,0,0,0,114,101,1,0,0,39,6,0,0,115, - 40,0,0,0,6,2,2,1,22,1,18,1,6,3,12,3, - 12,1,6,7,8,1,16,1,4,1,18,1,4,2,12,1, - 6,1,12,1,20,1,4,255,2,233,255,128,122,22,70,105, - 108,101,70,105,110,100,101,114,46,95,102,105,108,108,95,99, - 97,99,104,101,99,1,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,3,0,0,0,7,0,0,0,115,18,0, - 0,0,135,0,135,1,102,2,100,1,100,2,132,8,125,2, - 124,2,83,0,41,4,97,20,1,0,0,65,32,99,108,97, - 115,115,32,109,101,116,104,111,100,32,119,104,105,99,104,32, - 114,101,116,117,114,110,115,32,97,32,99,108,111,115,117,114, - 101,32,116,111,32,117,115,101,32,111,110,32,115,121,115,46, - 112,97,116,104,95,104,111,111,107,10,32,32,32,32,32,32, - 32,32,119,104,105,99,104,32,119,105,108,108,32,114,101,116, - 117,114,110,32,97,110,32,105,110,115,116,97,110,99,101,32, - 117,115,105,110,103,32,116,104,101,32,115,112,101,99,105,102, - 105,101,100,32,108,111,97,100,101,114,115,32,97,110,100,32, - 116,104,101,32,112,97,116,104,10,32,32,32,32,32,32,32, + 114,226,0,0,0,244,5,0,0,115,88,0,0,0,4,5, + 14,1,2,1,24,1,12,1,6,1,10,1,8,1,6,1, + 6,2,6,1,10,1,6,2,4,1,8,2,12,1,14,1, + 8,1,10,1,8,1,24,1,2,255,8,5,14,2,2,1, + 20,1,12,1,8,1,16,1,12,1,8,1,10,1,4,1, + 8,255,2,128,4,2,12,1,12,1,8,1,4,1,4,1, + 2,244,2,228,255,128,122,20,70,105,108,101,70,105,110,100, + 101,114,46,102,105,110,100,95,115,112,101,99,99,1,0,0, + 0,0,0,0,0,0,0,0,0,9,0,0,0,10,0,0, + 0,67,0,0,0,115,190,0,0,0,124,0,106,0,125,1, + 122,11,116,1,160,2,124,1,112,11,116,1,160,3,161,0, + 161,1,125,2,87,0,110,12,4,0,116,4,116,5,116,6, + 102,3,121,94,1,0,1,0,1,0,103,0,125,2,89,0, + 116,7,106,8,160,9,100,1,161,1,115,39,116,10,124,2, + 131,1,124,0,95,11,110,37,116,10,131,0,125,3,124,2, + 68,0,93,28,125,4,124,4,160,12,100,2,161,1,92,3, + 125,5,125,6,125,7,124,6,114,65,100,3,160,13,124,5, + 124,7,160,14,161,0,161,2,125,8,110,2,124,5,125,8, + 124,3,160,15,124,8,161,1,1,0,113,44,124,3,124,0, + 95,11,116,7,106,8,160,9,116,16,161,1,114,92,100,4, + 100,5,132,0,124,2,68,0,131,1,124,0,95,17,100,6, + 83,0,100,6,83,0,119,0,41,7,122,68,70,105,108,108, + 32,116,104,101,32,99,97,99,104,101,32,111,102,32,112,111, + 116,101,110,116,105,97,108,32,109,111,100,117,108,101,115,32, + 97,110,100,32,112,97,99,107,97,103,101,115,32,102,111,114, + 32,116,104,105,115,32,100,105,114,101,99,116,111,114,121,46, + 114,14,0,0,0,114,97,0,0,0,114,88,0,0,0,99, + 1,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, + 4,0,0,0,83,0,0,0,115,20,0,0,0,104,0,124, + 0,93,6,125,1,124,1,160,0,161,0,146,2,113,2,83, + 0,114,7,0,0,0,41,1,114,131,0,0,0,41,2,114, + 5,0,0,0,90,2,102,110,114,7,0,0,0,114,7,0, + 0,0,114,8,0,0,0,114,13,0,0,0,68,6,0,0, + 115,4,0,0,0,20,0,255,128,122,41,70,105,108,101,70, + 105,110,100,101,114,46,95,102,105,108,108,95,99,97,99,104, + 101,46,60,108,111,99,97,108,115,62,46,60,115,101,116,99, + 111,109,112,62,78,41,18,114,65,0,0,0,114,18,0,0, + 0,90,7,108,105,115,116,100,105,114,114,82,0,0,0,114, + 85,1,0,0,218,15,80,101,114,109,105,115,115,105,111,110, + 69,114,114,111,114,218,18,78,111,116,65,68,105,114,101,99, + 116,111,114,121,69,114,114,111,114,114,15,0,0,0,114,25, + 0,0,0,114,26,0,0,0,114,98,1,0,0,114,99,1, + 0,0,114,126,0,0,0,114,89,0,0,0,114,131,0,0, + 0,218,3,97,100,100,114,27,0,0,0,114,100,1,0,0, + 41,9,114,143,0,0,0,114,65,0,0,0,90,8,99,111, + 110,116,101,110,116,115,90,21,108,111,119,101,114,95,115,117, + 102,102,105,120,95,99,111,110,116,101,110,116,115,114,70,1, + 0,0,114,141,0,0,0,114,54,1,0,0,114,44,1,0, + 0,90,8,110,101,119,95,110,97,109,101,114,7,0,0,0, + 114,7,0,0,0,114,8,0,0,0,114,102,1,0,0,39, + 6,0,0,115,40,0,0,0,6,2,2,1,22,1,18,1, + 6,3,12,3,12,1,6,7,8,1,16,1,4,1,18,1, + 4,2,12,1,6,1,12,1,20,1,4,255,2,233,255,128, + 122,22,70,105,108,101,70,105,110,100,101,114,46,95,102,105, + 108,108,95,99,97,99,104,101,99,1,0,0,0,0,0,0, + 0,0,0,0,0,3,0,0,0,3,0,0,0,7,0,0, + 0,115,18,0,0,0,135,0,135,1,102,2,100,1,100,2, + 132,8,125,2,124,2,83,0,41,4,97,20,1,0,0,65, + 32,99,108,97,115,115,32,109,101,116,104,111,100,32,119,104, + 105,99,104,32,114,101,116,117,114,110,115,32,97,32,99,108, + 111,115,117,114,101,32,116,111,32,117,115,101,32,111,110,32, + 115,121,115,46,112,97,116,104,95,104,111,111,107,10,32,32, + 32,32,32,32,32,32,119,104,105,99,104,32,119,105,108,108, + 32,114,101,116,117,114,110,32,97,110,32,105,110,115,116,97, + 110,99,101,32,117,115,105,110,103,32,116,104,101,32,115,112, + 101,99,105,102,105,101,100,32,108,111,97,100,101,114,115,32, + 97,110,100,32,116,104,101,32,112,97,116,104,10,32,32,32, + 32,32,32,32,32,99,97,108,108,101,100,32,111,110,32,116, + 104,101,32,99,108,111,115,117,114,101,46,10,10,32,32,32, + 32,32,32,32,32,73,102,32,116,104,101,32,112,97,116,104, 32,99,97,108,108,101,100,32,111,110,32,116,104,101,32,99, - 108,111,115,117,114,101,46,10,10,32,32,32,32,32,32,32, - 32,73,102,32,116,104,101,32,112,97,116,104,32,99,97,108, - 108,101,100,32,111,110,32,116,104,101,32,99,108,111,115,117, - 114,101,32,105,115,32,110,111,116,32,97,32,100,105,114,101, - 99,116,111,114,121,44,32,73,109,112,111,114,116,69,114,114, - 111,114,32,105,115,10,32,32,32,32,32,32,32,32,114,97, - 105,115,101,100,46,10,10,32,32,32,32,32,32,32,32,99, - 1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0, - 4,0,0,0,19,0,0,0,115,36,0,0,0,116,0,124, - 0,131,1,115,10,116,1,100,1,124,0,100,2,141,2,130, - 1,136,0,124,0,103,1,136,1,162,1,82,0,142,0,83, - 0,41,4,122,45,80,97,116,104,32,104,111,111,107,32,102, - 111,114,32,105,109,112,111,114,116,108,105,98,46,109,97,99, - 104,105,110,101,114,121,46,70,105,108,101,70,105,110,100,101, - 114,46,122,30,111,110,108,121,32,100,105,114,101,99,116,111, - 114,105,101,115,32,97,114,101,32,115,117,112,112,111,114,116, - 101,100,114,71,0,0,0,78,41,2,114,83,0,0,0,114, - 142,0,0,0,114,71,0,0,0,169,2,114,221,0,0,0, - 114,100,1,0,0,114,7,0,0,0,114,8,0,0,0,218, - 24,112,97,116,104,95,104,111,111,107,95,102,111,114,95,70, - 105,108,101,70,105,110,100,101,114,80,6,0,0,115,8,0, - 0,0,8,2,12,1,16,1,255,128,122,54,70,105,108,101, - 70,105,110,100,101,114,46,112,97,116,104,95,104,111,111,107, - 46,60,108,111,99,97,108,115,62,46,112,97,116,104,95,104, - 111,111,107,95,102,111,114,95,70,105,108,101,70,105,110,100, - 101,114,78,114,7,0,0,0,41,3,114,221,0,0,0,114, - 100,1,0,0,114,106,1,0,0,114,7,0,0,0,114,105, - 1,0,0,114,8,0,0,0,218,9,112,97,116,104,95,104, - 111,111,107,70,6,0,0,115,6,0,0,0,14,10,4,6, - 255,128,122,20,70,105,108,101,70,105,110,100,101,114,46,112, - 97,116,104,95,104,111,111,107,99,1,0,0,0,0,0,0, - 0,0,0,0,0,1,0,0,0,3,0,0,0,67,0,0, - 0,114,66,1,0,0,41,2,78,122,16,70,105,108,101,70, - 105,110,100,101,114,40,123,33,114,125,41,41,2,114,89,0, - 0,0,114,65,0,0,0,114,20,1,0,0,114,7,0,0, - 0,114,7,0,0,0,114,8,0,0,0,114,67,1,0,0, - 88,6,0,0,114,60,1,0,0,122,19,70,105,108,101,70, - 105,110,100,101,114,46,95,95,114,101,112,114,95,95,41,1, - 78,41,15,114,150,0,0,0,114,149,0,0,0,114,151,0, - 0,0,114,152,0,0,0,114,235,0,0,0,114,77,1,0, - 0,114,167,0,0,0,114,229,0,0,0,114,161,0,0,0, - 114,90,1,0,0,114,226,0,0,0,114,101,1,0,0,114, - 233,0,0,0,114,107,1,0,0,114,67,1,0,0,114,7, - 0,0,0,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,114,93,1,0,0,193,5,0,0,115,26,0,0,0, - 8,0,4,2,8,7,8,16,4,4,8,2,8,15,10,5, - 8,51,2,31,10,1,12,17,255,128,114,93,1,0,0,99, - 4,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0, - 8,0,0,0,67,0,0,0,115,144,0,0,0,124,0,160, - 0,100,1,161,1,125,4,124,0,160,0,100,2,161,1,125, - 5,124,4,115,33,124,5,114,18,124,5,106,1,125,4,110, - 15,124,2,124,3,107,2,114,28,116,2,124,1,124,2,131, - 2,125,4,110,5,116,3,124,1,124,2,131,2,125,4,124, - 5,115,42,116,4,124,1,124,2,124,4,100,3,141,3,125, - 5,122,19,124,5,124,0,100,2,60,0,124,4,124,0,100, - 1,60,0,124,2,124,0,100,4,60,0,124,3,124,0,100, - 5,60,0,87,0,100,0,83,0,4,0,116,5,121,71,1, - 0,1,0,1,0,89,0,100,0,83,0,119,0,41,6,78, - 218,10,95,95,108,111,97,100,101,114,95,95,218,8,95,95, - 115,112,101,99,95,95,114,94,1,0,0,90,8,95,95,102, - 105,108,101,95,95,90,10,95,95,99,97,99,104,101,100,95, - 95,41,6,218,3,103,101,116,114,164,0,0,0,114,40,1, - 0,0,114,33,1,0,0,114,213,0,0,0,218,9,69,120, - 99,101,112,116,105,111,110,41,6,90,2,110,115,114,141,0, - 0,0,90,8,112,97,116,104,110,97,109,101,90,9,99,112, - 97,116,104,110,97,109,101,114,164,0,0,0,114,210,0,0, - 0,114,7,0,0,0,114,7,0,0,0,114,8,0,0,0, - 218,14,95,102,105,120,95,117,112,95,109,111,100,117,108,101, - 94,6,0,0,115,38,0,0,0,10,2,10,1,4,1,4, - 1,8,1,8,1,12,1,10,2,4,1,14,1,2,1,8, - 1,8,1,8,1,14,1,12,1,6,2,2,254,255,128,114, - 112,1,0,0,99,0,0,0,0,0,0,0,0,0,0,0, - 0,3,0,0,0,3,0,0,0,67,0,0,0,115,38,0, - 0,0,116,0,116,1,160,2,161,0,102,2,125,0,116,3, - 116,4,102,2,125,1,116,5,116,6,102,2,125,2,124,0, - 124,1,124,2,103,3,83,0,41,2,122,95,82,101,116,117, - 114,110,115,32,97,32,108,105,115,116,32,111,102,32,102,105, - 108,101,45,98,97,115,101,100,32,109,111,100,117,108,101,32, - 108,111,97,100,101,114,115,46,10,10,32,32,32,32,69,97, - 99,104,32,105,116,101,109,32,105,115,32,97,32,116,117,112, - 108,101,32,40,108,111,97,100,101,114,44,32,115,117,102,102, - 105,120,101,115,41,46,10,32,32,32,32,78,41,7,114,29, - 1,0,0,114,187,0,0,0,218,18,101,120,116,101,110,115, - 105,111,110,95,115,117,102,102,105,120,101,115,114,33,1,0, - 0,114,127,0,0,0,114,40,1,0,0,114,113,0,0,0, - 41,3,90,10,101,120,116,101,110,115,105,111,110,115,90,6, - 115,111,117,114,99,101,90,8,98,121,116,101,99,111,100,101, + 108,111,115,117,114,101,32,105,115,32,110,111,116,32,97,32, + 100,105,114,101,99,116,111,114,121,44,32,73,109,112,111,114, + 116,69,114,114,111,114,32,105,115,10,32,32,32,32,32,32, + 32,32,114,97,105,115,101,100,46,10,10,32,32,32,32,32, + 32,32,32,99,1,0,0,0,0,0,0,0,0,0,0,0, + 1,0,0,0,4,0,0,0,19,0,0,0,115,36,0,0, + 0,116,0,124,0,131,1,115,10,116,1,100,1,124,0,100, + 2,141,2,130,1,136,0,124,0,103,1,136,1,162,1,82, + 0,142,0,83,0,41,4,122,45,80,97,116,104,32,104,111, + 111,107,32,102,111,114,32,105,109,112,111,114,116,108,105,98, + 46,109,97,99,104,105,110,101,114,121,46,70,105,108,101,70, + 105,110,100,101,114,46,122,30,111,110,108,121,32,100,105,114, + 101,99,116,111,114,105,101,115,32,97,114,101,32,115,117,112, + 112,111,114,116,101,100,114,71,0,0,0,78,41,2,114,83, + 0,0,0,114,142,0,0,0,114,71,0,0,0,169,2,114, + 221,0,0,0,114,101,1,0,0,114,7,0,0,0,114,8, + 0,0,0,218,24,112,97,116,104,95,104,111,111,107,95,102, + 111,114,95,70,105,108,101,70,105,110,100,101,114,80,6,0, + 0,115,8,0,0,0,8,2,12,1,16,1,255,128,122,54, + 70,105,108,101,70,105,110,100,101,114,46,112,97,116,104,95, + 104,111,111,107,46,60,108,111,99,97,108,115,62,46,112,97, + 116,104,95,104,111,111,107,95,102,111,114,95,70,105,108,101, + 70,105,110,100,101,114,78,114,7,0,0,0,41,3,114,221, + 0,0,0,114,101,1,0,0,114,107,1,0,0,114,7,0, + 0,0,114,106,1,0,0,114,8,0,0,0,218,9,112,97, + 116,104,95,104,111,111,107,70,6,0,0,115,6,0,0,0, + 14,10,4,6,255,128,122,20,70,105,108,101,70,105,110,100, + 101,114,46,112,97,116,104,95,104,111,111,107,99,1,0,0, + 0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0, + 0,67,0,0,0,114,67,1,0,0,41,2,78,122,16,70, + 105,108,101,70,105,110,100,101,114,40,123,33,114,125,41,41, + 2,114,89,0,0,0,114,65,0,0,0,114,21,1,0,0, 114,7,0,0,0,114,7,0,0,0,114,8,0,0,0,114, - 208,0,0,0,117,6,0,0,115,10,0,0,0,12,5,8, - 1,8,1,10,1,255,128,114,208,0,0,0,99,1,0,0, - 0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0, - 0,67,0,0,0,115,8,0,0,0,124,0,97,0,100,0, - 83,0,114,69,0,0,0,41,1,114,159,0,0,0,41,1, - 218,17,95,98,111,111,116,115,116,114,97,112,95,109,111,100, - 117,108,101,114,7,0,0,0,114,7,0,0,0,114,8,0, - 0,0,218,21,95,115,101,116,95,98,111,111,116,115,116,114, - 97,112,95,109,111,100,117,108,101,128,6,0,0,115,4,0, - 0,0,8,2,255,128,114,115,1,0,0,99,1,0,0,0, - 0,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0, - 67,0,0,0,115,50,0,0,0,116,0,124,0,131,1,1, - 0,116,1,131,0,125,1,116,2,106,3,160,4,116,5,106, - 6,124,1,142,0,103,1,161,1,1,0,116,2,106,7,160, - 8,116,9,161,1,1,0,100,1,83,0,41,2,122,41,73, - 110,115,116,97,108,108,32,116,104,101,32,112,97,116,104,45, - 98,97,115,101,100,32,105,109,112,111,114,116,32,99,111,109, - 112,111,110,101,110,116,115,46,78,41,10,114,115,1,0,0, - 114,208,0,0,0,114,15,0,0,0,114,82,1,0,0,114, - 191,0,0,0,114,93,1,0,0,114,107,1,0,0,218,9, - 109,101,116,97,95,112,97,116,104,114,61,0,0,0,114,76, - 1,0,0,41,2,114,114,1,0,0,90,17,115,117,112,112, - 111,114,116,101,100,95,108,111,97,100,101,114,115,114,7,0, - 0,0,114,7,0,0,0,114,8,0,0,0,218,8,95,105, - 110,115,116,97,108,108,133,6,0,0,115,10,0,0,0,8, - 2,6,1,20,1,16,1,255,128,114,117,1,0,0,41,1, - 114,87,0,0,0,41,1,78,41,3,78,78,78,41,2,114, - 0,0,0,0,114,0,0,0,0,41,1,84,41,1,78,41, - 1,78,41,85,114,152,0,0,0,114,159,0,0,0,114,187, - 0,0,0,114,91,0,0,0,114,15,0,0,0,114,99,0, - 0,0,114,184,0,0,0,114,25,0,0,0,114,230,0,0, - 0,90,2,110,116,114,18,0,0,0,114,215,0,0,0,90, - 5,112,111,115,105,120,114,50,0,0,0,218,3,97,108,108, - 114,59,0,0,0,114,136,0,0,0,114,57,0,0,0,114, - 62,0,0,0,90,20,95,112,97,116,104,115,101,112,115,95, - 119,105,116,104,95,99,111,108,111,110,114,28,0,0,0,90, - 37,95,67,65,83,69,95,73,78,83,69,78,83,73,84,73, - 86,69,95,80,76,65,84,70,79,82,77,83,95,66,89,84, - 69,83,95,75,69,89,114,27,0,0,0,114,29,0,0,0, - 114,21,0,0,0,114,36,0,0,0,114,42,0,0,0,114, - 45,0,0,0,114,67,0,0,0,114,74,0,0,0,114,75, - 0,0,0,114,79,0,0,0,114,80,0,0,0,114,83,0, - 0,0,114,86,0,0,0,114,95,0,0,0,218,4,116,121, - 112,101,218,8,95,95,99,111,100,101,95,95,114,186,0,0, - 0,114,34,0,0,0,114,172,0,0,0,114,33,0,0,0, - 114,39,0,0,0,114,7,1,0,0,114,116,0,0,0,114, - 112,0,0,0,114,127,0,0,0,114,61,0,0,0,114,113, - 1,0,0,114,231,0,0,0,114,113,0,0,0,90,23,68, - 69,66,85,71,95,66,89,84,69,67,79,68,69,95,83,85, - 70,70,73,88,69,83,90,27,79,80,84,73,77,73,90,69, - 68,95,66,89,84,69,67,79,68,69,95,83,85,70,70,73, - 88,69,83,114,121,0,0,0,114,128,0,0,0,114,135,0, - 0,0,114,137,0,0,0,114,139,0,0,0,114,160,0,0, - 0,114,167,0,0,0,114,176,0,0,0,114,180,0,0,0, - 114,182,0,0,0,114,189,0,0,0,114,194,0,0,0,114, - 195,0,0,0,114,200,0,0,0,218,6,111,98,106,101,99, - 116,114,209,0,0,0,114,213,0,0,0,114,214,0,0,0, - 114,234,0,0,0,114,248,0,0,0,114,10,1,0,0,114, - 33,1,0,0,114,40,1,0,0,114,29,1,0,0,114,46, - 1,0,0,114,72,1,0,0,114,76,1,0,0,114,93,1, - 0,0,114,112,1,0,0,114,208,0,0,0,114,115,1,0, - 0,114,117,1,0,0,114,7,0,0,0,114,7,0,0,0, - 114,7,0,0,0,114,8,0,0,0,218,8,60,109,111,100, - 117,108,101,62,1,0,0,0,115,182,0,0,0,4,0,4, - 22,8,3,8,1,8,1,8,1,8,1,10,3,4,1,8, - 1,10,1,8,2,4,3,10,1,6,2,22,2,8,1,8, - 1,10,1,14,1,4,4,4,1,2,1,2,1,4,255,8, - 4,6,16,8,3,8,5,8,5,4,6,10,1,8,30,8, - 6,8,8,8,10,8,9,8,5,4,7,10,1,8,8,10, - 5,10,22,0,127,16,27,12,1,4,2,4,1,6,2,4, - 1,10,1,8,2,6,2,8,2,16,2,8,71,8,40,8, - 19,8,12,8,12,8,31,8,20,8,33,8,28,10,24,10, - 13,10,10,8,11,6,14,4,3,2,1,12,255,14,73,14, - 67,16,30,0,127,14,17,18,50,18,45,18,25,14,53,14, - 63,14,49,0,127,14,29,0,127,10,30,8,23,8,11,12, - 5,255,128, + 68,1,0,0,88,6,0,0,114,61,1,0,0,122,19,70, + 105,108,101,70,105,110,100,101,114,46,95,95,114,101,112,114, + 95,95,114,69,0,0,0,41,15,114,150,0,0,0,114,149, + 0,0,0,114,151,0,0,0,114,152,0,0,0,114,236,0, + 0,0,114,78,1,0,0,114,167,0,0,0,114,229,0,0, + 0,114,161,0,0,0,114,91,1,0,0,114,226,0,0,0, + 114,102,1,0,0,114,234,0,0,0,114,108,1,0,0,114, + 68,1,0,0,114,7,0,0,0,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,114,94,1,0,0,193,5,0, + 0,115,26,0,0,0,8,0,4,2,8,7,8,16,4,4, + 8,2,8,15,10,5,8,51,2,31,10,1,12,17,255,128, + 114,94,1,0,0,99,4,0,0,0,0,0,0,0,0,0, + 0,0,6,0,0,0,8,0,0,0,67,0,0,0,115,144, + 0,0,0,124,0,160,0,100,1,161,1,125,4,124,0,160, + 0,100,2,161,1,125,5,124,4,115,33,124,5,114,18,124, + 5,106,1,125,4,110,15,124,2,124,3,107,2,114,28,116, + 2,124,1,124,2,131,2,125,4,110,5,116,3,124,1,124, + 2,131,2,125,4,124,5,115,42,116,4,124,1,124,2,124, + 4,100,3,141,3,125,5,122,19,124,5,124,0,100,2,60, + 0,124,4,124,0,100,1,60,0,124,2,124,0,100,4,60, + 0,124,3,124,0,100,5,60,0,87,0,100,0,83,0,4, + 0,116,5,121,71,1,0,1,0,1,0,89,0,100,0,83, + 0,119,0,41,6,78,218,10,95,95,108,111,97,100,101,114, + 95,95,218,8,95,95,115,112,101,99,95,95,114,95,1,0, + 0,90,8,95,95,102,105,108,101,95,95,90,10,95,95,99, + 97,99,104,101,100,95,95,41,6,218,3,103,101,116,114,164, + 0,0,0,114,41,1,0,0,114,34,1,0,0,114,213,0, + 0,0,218,9,69,120,99,101,112,116,105,111,110,41,6,90, + 2,110,115,114,141,0,0,0,90,8,112,97,116,104,110,97, + 109,101,90,9,99,112,97,116,104,110,97,109,101,114,164,0, + 0,0,114,210,0,0,0,114,7,0,0,0,114,7,0,0, + 0,114,8,0,0,0,218,14,95,102,105,120,95,117,112,95, + 109,111,100,117,108,101,94,6,0,0,115,38,0,0,0,10, + 2,10,1,4,1,4,1,8,1,8,1,12,1,10,2,4, + 1,14,1,2,1,8,1,8,1,8,1,14,1,12,1,6, + 2,2,254,255,128,114,113,1,0,0,99,0,0,0,0,0, + 0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,67, + 0,0,0,115,38,0,0,0,116,0,116,1,160,2,161,0, + 102,2,125,0,116,3,116,4,102,2,125,1,116,5,116,6, + 102,2,125,2,124,0,124,1,124,2,103,3,83,0,41,2, + 122,95,82,101,116,117,114,110,115,32,97,32,108,105,115,116, + 32,111,102,32,102,105,108,101,45,98,97,115,101,100,32,109, + 111,100,117,108,101,32,108,111,97,100,101,114,115,46,10,10, + 32,32,32,32,69,97,99,104,32,105,116,101,109,32,105,115, + 32,97,32,116,117,112,108,101,32,40,108,111,97,100,101,114, + 44,32,115,117,102,102,105,120,101,115,41,46,10,32,32,32, + 32,78,41,7,114,30,1,0,0,114,187,0,0,0,218,18, + 101,120,116,101,110,115,105,111,110,95,115,117,102,102,105,120, + 101,115,114,34,1,0,0,114,127,0,0,0,114,41,1,0, + 0,114,113,0,0,0,41,3,90,10,101,120,116,101,110,115, + 105,111,110,115,90,6,115,111,117,114,99,101,90,8,98,121, + 116,101,99,111,100,101,114,7,0,0,0,114,7,0,0,0, + 114,8,0,0,0,114,208,0,0,0,117,6,0,0,115,10, + 0,0,0,12,5,8,1,8,1,10,1,255,128,114,208,0, + 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,1, + 0,0,0,1,0,0,0,67,0,0,0,115,8,0,0,0, + 124,0,97,0,100,0,83,0,114,69,0,0,0,41,1,114, + 159,0,0,0,41,1,218,17,95,98,111,111,116,115,116,114, + 97,112,95,109,111,100,117,108,101,114,7,0,0,0,114,7, + 0,0,0,114,8,0,0,0,218,21,95,115,101,116,95,98, + 111,111,116,115,116,114,97,112,95,109,111,100,117,108,101,128, + 6,0,0,115,4,0,0,0,8,2,255,128,114,116,1,0, + 0,99,1,0,0,0,0,0,0,0,0,0,0,0,2,0, + 0,0,4,0,0,0,67,0,0,0,115,50,0,0,0,116, + 0,124,0,131,1,1,0,116,1,131,0,125,1,116,2,106, + 3,160,4,116,5,106,6,124,1,142,0,103,1,161,1,1, + 0,116,2,106,7,160,8,116,9,161,1,1,0,100,1,83, + 0,41,2,122,41,73,110,115,116,97,108,108,32,116,104,101, + 32,112,97,116,104,45,98,97,115,101,100,32,105,109,112,111, + 114,116,32,99,111,109,112,111,110,101,110,116,115,46,78,41, + 10,114,116,1,0,0,114,208,0,0,0,114,15,0,0,0, + 114,83,1,0,0,114,191,0,0,0,114,94,1,0,0,114, + 108,1,0,0,218,9,109,101,116,97,95,112,97,116,104,114, + 61,0,0,0,114,77,1,0,0,41,2,114,115,1,0,0, + 90,17,115,117,112,112,111,114,116,101,100,95,108,111,97,100, + 101,114,115,114,7,0,0,0,114,7,0,0,0,114,8,0, + 0,0,218,8,95,105,110,115,116,97,108,108,133,6,0,0, + 115,10,0,0,0,8,2,6,1,20,1,16,1,255,128,114, + 118,1,0,0,41,1,114,87,0,0,0,114,69,0,0,0, + 41,3,78,78,78,41,2,114,0,0,0,0,114,0,0,0, + 0,41,1,84,41,85,114,152,0,0,0,114,159,0,0,0, + 114,187,0,0,0,114,91,0,0,0,114,15,0,0,0,114, + 99,0,0,0,114,184,0,0,0,114,25,0,0,0,114,231, + 0,0,0,90,2,110,116,114,18,0,0,0,114,215,0,0, + 0,90,5,112,111,115,105,120,114,50,0,0,0,218,3,97, + 108,108,114,59,0,0,0,114,136,0,0,0,114,57,0,0, + 0,114,62,0,0,0,90,20,95,112,97,116,104,115,101,112, + 115,95,119,105,116,104,95,99,111,108,111,110,114,28,0,0, + 0,90,37,95,67,65,83,69,95,73,78,83,69,78,83,73, + 84,73,86,69,95,80,76,65,84,70,79,82,77,83,95,66, + 89,84,69,83,95,75,69,89,114,27,0,0,0,114,29,0, + 0,0,114,21,0,0,0,114,36,0,0,0,114,42,0,0, + 0,114,45,0,0,0,114,67,0,0,0,114,74,0,0,0, + 114,75,0,0,0,114,79,0,0,0,114,80,0,0,0,114, + 83,0,0,0,114,86,0,0,0,114,95,0,0,0,218,4, + 116,121,112,101,218,8,95,95,99,111,100,101,95,95,114,186, + 0,0,0,114,34,0,0,0,114,172,0,0,0,114,33,0, + 0,0,114,39,0,0,0,114,8,1,0,0,114,116,0,0, + 0,114,112,0,0,0,114,127,0,0,0,114,61,0,0,0, + 114,114,1,0,0,114,232,0,0,0,114,113,0,0,0,90, + 23,68,69,66,85,71,95,66,89,84,69,67,79,68,69,95, + 83,85,70,70,73,88,69,83,90,27,79,80,84,73,77,73, + 90,69,68,95,66,89,84,69,67,79,68,69,95,83,85,70, + 70,73,88,69,83,114,121,0,0,0,114,128,0,0,0,114, + 135,0,0,0,114,137,0,0,0,114,139,0,0,0,114,160, + 0,0,0,114,167,0,0,0,114,176,0,0,0,114,180,0, + 0,0,114,182,0,0,0,114,189,0,0,0,114,194,0,0, + 0,114,195,0,0,0,114,200,0,0,0,218,6,111,98,106, + 101,99,116,114,209,0,0,0,114,213,0,0,0,114,214,0, + 0,0,114,235,0,0,0,114,249,0,0,0,114,11,1,0, + 0,114,34,1,0,0,114,41,1,0,0,114,30,1,0,0, + 114,47,1,0,0,114,73,1,0,0,114,77,1,0,0,114, + 94,1,0,0,114,113,1,0,0,114,208,0,0,0,114,116, + 1,0,0,114,118,1,0,0,114,7,0,0,0,114,7,0, + 0,0,114,7,0,0,0,114,8,0,0,0,218,8,60,109, + 111,100,117,108,101,62,1,0,0,0,115,182,0,0,0,4, + 0,4,22,8,3,8,1,8,1,8,1,8,1,10,3,4, + 1,8,1,10,1,8,2,4,3,10,1,6,2,22,2,8, + 1,8,1,10,1,14,1,4,4,4,1,2,1,2,1,4, + 255,8,4,6,16,8,3,8,5,8,5,4,6,10,1,8, + 30,8,6,8,8,8,10,8,9,8,5,4,7,10,1,8, + 8,10,5,10,22,0,127,16,27,12,1,4,2,4,1,6, + 2,4,1,10,1,8,2,6,2,8,2,16,2,8,71,8, + 40,8,19,8,12,8,12,8,31,8,20,8,33,8,28,10, + 24,10,13,10,10,8,11,6,14,4,3,2,1,12,255,14, + 73,14,67,16,30,0,127,14,17,18,50,18,45,18,25,14, + 53,14,63,14,49,0,127,14,29,0,127,10,30,8,23,8, + 11,12,5,255,128, }; diff --git a/Python/importlib_zipimport.h b/Python/importlib_zipimport.h index cbfba669a51bc0..09a202d8358d68 100644 --- a/Python/importlib_zipimport.h +++ b/Python/importlib_zipimport.h @@ -78,13 +78,13 @@ const unsigned char _Py_M__zipimport[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3, 0,0,0,64,0,0,0,115,126,0,0,0,101,0,90,1, 100,0,90,2,100,1,90,3,100,2,100,3,132,0,90,4, - 100,29,100,5,100,6,132,1,90,5,100,30,100,7,100,8, - 132,1,90,6,100,31,100,9,100,10,132,1,90,7,100,11, + 100,29,100,5,100,6,132,1,90,5,100,29,100,7,100,8, + 132,1,90,6,100,29,100,9,100,10,132,1,90,7,100,11, 100,12,132,0,90,8,100,13,100,14,132,0,90,9,100,15, 100,16,132,0,90,10,100,17,100,18,132,0,90,11,100,19, 100,20,132,0,90,12,100,21,100,22,132,0,90,13,100,23, 100,24,132,0,90,14,100,25,100,26,132,0,90,15,100,27, - 100,28,132,0,90,16,100,4,83,0,41,32,114,4,0,0, + 100,28,132,0,90,16,100,4,83,0,41,30,114,4,0,0, 0,97,255,1,0,0,122,105,112,105,109,112,111,114,116,101, 114,40,97,114,99,104,105,118,101,112,97,116,104,41,32,45, 62,32,122,105,112,105,109,112,111,114,116,101,114,32,111,98, @@ -572,496 +572,496 @@ const unsigned char _Py_M__zipimport[] = { 10,0,0,0,218,8,95,95,114,101,112,114,95,95,84,1, 0,0,115,4,0,0,0,24,1,255,128,122,20,122,105,112, 105,109,112,111,114,116,101,114,46,95,95,114,101,112,114,95, - 95,41,1,78,41,1,78,41,1,78,41,17,114,6,0,0, - 0,114,7,0,0,0,114,8,0,0,0,218,7,95,95,100, - 111,99,95,95,114,34,0,0,0,114,44,0,0,0,114,45, - 0,0,0,114,49,0,0,0,114,55,0,0,0,114,62,0, - 0,0,114,63,0,0,0,114,70,0,0,0,114,46,0,0, - 0,114,83,0,0,0,114,85,0,0,0,114,88,0,0,0, - 114,89,0,0,0,114,9,0,0,0,114,9,0,0,0,114, - 9,0,0,0,114,10,0,0,0,114,4,0,0,0,46,0, - 0,0,115,32,0,0,0,8,0,4,1,8,17,10,46,10, - 37,10,16,8,27,8,10,8,21,8,12,8,26,8,13,8, - 43,8,15,12,10,255,128,122,12,95,95,105,110,105,116,95, - 95,46,112,121,99,84,114,66,0,0,0,70,41,3,122,4, - 46,112,121,99,84,70,41,3,114,67,0,0,0,70,70,99, - 2,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, - 4,0,0,0,67,0,0,0,115,20,0,0,0,124,0,106, - 0,124,1,160,1,100,1,161,1,100,2,25,0,23,0,83, - 0,41,3,78,218,1,46,233,2,0,0,0,41,2,114,31, - 0,0,0,218,10,114,112,97,114,116,105,116,105,111,110,41, - 2,114,32,0,0,0,114,41,0,0,0,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,114,39,0,0,0,102, - 1,0,0,115,4,0,0,0,20,1,255,128,114,39,0,0, - 0,99,2,0,0,0,0,0,0,0,0,0,0,0,3,0, - 0,0,2,0,0,0,67,0,0,0,115,18,0,0,0,124, - 1,116,0,23,0,125,2,124,2,124,0,106,1,118,0,83, - 0,169,1,78,41,2,114,20,0,0,0,114,28,0,0,0, - 41,3,114,32,0,0,0,114,13,0,0,0,90,7,100,105, - 114,112,97,116,104,114,9,0,0,0,114,9,0,0,0,114, - 10,0,0,0,114,40,0,0,0,106,1,0,0,115,6,0, - 0,0,8,4,10,2,255,128,114,40,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,7,0,0,0,4,0, - 0,0,67,0,0,0,115,56,0,0,0,116,0,124,0,124, - 1,131,2,125,2,116,1,68,0,93,18,92,3,125,3,125, - 4,125,5,124,2,124,3,23,0,125,6,124,6,124,0,106, - 2,118,0,114,25,124,5,2,0,1,0,83,0,113,7,100, - 0,83,0,114,94,0,0,0,41,3,114,39,0,0,0,218, - 16,95,122,105,112,95,115,101,97,114,99,104,111,114,100,101, - 114,114,28,0,0,0,41,7,114,32,0,0,0,114,41,0, - 0,0,114,13,0,0,0,218,6,115,117,102,102,105,120,218, - 10,105,115,98,121,116,101,99,111,100,101,114,54,0,0,0, - 114,69,0,0,0,114,9,0,0,0,114,9,0,0,0,114, - 10,0,0,0,114,38,0,0,0,115,1,0,0,115,16,0, - 0,0,10,1,14,1,8,1,10,1,8,1,2,255,4,2, - 255,128,114,38,0,0,0,99,1,0,0,0,0,0,0,0, - 0,0,0,0,26,0,0,0,9,0,0,0,67,0,0,0, - 115,226,4,0,0,122,7,116,0,160,1,124,0,161,1,125, - 1,87,0,110,16,4,0,116,2,144,2,121,112,1,0,1, - 0,1,0,116,3,100,1,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,124,1,144,2,143,60,1,0,122,18,124, - 1,160,4,116,5,11,0,100,3,161,2,1,0,124,1,160, - 6,161,0,125,2,124,1,160,7,116,5,161,1,125,3,87, - 0,110,16,4,0,116,2,144,2,121,111,1,0,1,0,1, - 0,116,3,100,4,124,0,155,2,157,2,124,0,100,2,141, - 2,130,1,116,8,124,3,131,1,116,5,107,3,114,78,116, - 3,100,4,124,0,155,2,157,2,124,0,100,2,141,2,130, - 1,124,3,100,0,100,5,133,2,25,0,116,9,107,3,114, - 201,122,12,124,1,160,4,100,6,100,3,161,2,1,0,124, - 1,160,6,161,0,125,4,87,0,110,16,4,0,116,2,144, - 2,121,110,1,0,1,0,1,0,116,3,100,4,124,0,155, - 2,157,2,124,0,100,2,141,2,130,1,116,10,124,4,116, - 11,24,0,116,5,24,0,100,6,131,2,125,5,122,11,124, - 1,160,4,124,5,161,1,1,0,124,1,160,7,161,0,125, - 6,87,0,110,16,4,0,116,2,144,2,121,109,1,0,1, - 0,1,0,116,3,100,4,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,124,6,160,12,116,9,161,1,125,7,124, - 7,100,6,107,0,114,170,116,3,100,7,124,0,155,2,157, - 2,124,0,100,2,141,2,130,1,124,6,124,7,124,7,116, - 5,23,0,133,2,25,0,125,3,116,8,124,3,131,1,116, - 5,107,3,114,193,116,3,100,8,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,124,4,116,8,124,6,131,1,24, - 0,124,7,23,0,125,2,116,13,124,3,100,9,100,10,133, - 2,25,0,131,1,125,8,116,13,124,3,100,10,100,11,133, - 2,25,0,131,1,125,9,124,2,124,8,107,0,114,230,116, - 3,100,12,124,0,155,2,157,2,124,0,100,2,141,2,130, - 1,124,2,124,9,107,0,114,243,116,3,100,13,124,0,155, - 2,157,2,124,0,100,2,141,2,130,1,124,2,124,8,56, - 0,125,2,124,2,124,9,24,0,125,10,124,10,100,6,107, - 0,144,1,114,9,116,3,100,14,124,0,155,2,157,2,124, - 0,100,2,141,2,130,1,105,0,125,11,100,6,125,12,122, - 7,124,1,160,4,124,2,161,1,1,0,87,0,110,16,4, - 0,116,2,144,2,121,108,1,0,1,0,1,0,116,3,100, - 4,124,0,155,2,157,2,124,0,100,2,141,2,130,1,9, - 0,124,1,160,7,100,16,161,1,125,3,116,8,124,3,131, - 1,100,5,107,0,144,1,114,54,116,14,100,17,131,1,130, - 1,124,3,100,0,100,5,133,2,25,0,100,18,107,3,144, - 1,114,65,144,2,113,80,116,8,124,3,131,1,100,16,107, - 3,144,1,114,76,116,14,100,17,131,1,130,1,116,15,124, - 3,100,19,100,20,133,2,25,0,131,1,125,13,116,15,124, - 3,100,20,100,9,133,2,25,0,131,1,125,14,116,15,124, - 3,100,9,100,21,133,2,25,0,131,1,125,15,116,15,124, - 3,100,21,100,10,133,2,25,0,131,1,125,16,116,13,124, - 3,100,10,100,11,133,2,25,0,131,1,125,17,116,13,124, - 3,100,11,100,22,133,2,25,0,131,1,125,18,116,13,124, - 3,100,22,100,23,133,2,25,0,131,1,125,4,116,15,124, - 3,100,23,100,24,133,2,25,0,131,1,125,19,116,15,124, - 3,100,24,100,25,133,2,25,0,131,1,125,20,116,15,124, - 3,100,25,100,26,133,2,25,0,131,1,125,21,116,13,124, - 3,100,27,100,16,133,2,25,0,131,1,125,22,124,19,124, - 20,23,0,124,21,23,0,125,8,124,22,124,9,107,4,144, - 1,114,184,116,3,100,28,124,0,155,2,157,2,124,0,100, - 2,141,2,130,1,124,22,124,10,55,0,125,22,122,7,124, - 1,160,7,124,19,161,1,125,23,87,0,110,16,4,0,116, - 2,144,2,121,107,1,0,1,0,1,0,116,3,100,4,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,116,8,124, - 23,131,1,124,19,107,3,144,1,114,228,116,3,100,4,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,122,25,116, - 8,124,1,160,7,124,8,124,19,24,0,161,1,131,1,124, - 8,124,19,24,0,107,3,144,1,114,252,116,3,100,4,124, - 0,155,2,157,2,124,0,100,2,141,2,130,1,87,0,110, - 16,4,0,116,2,144,2,121,106,1,0,1,0,1,0,116, - 3,100,4,124,0,155,2,157,2,124,0,100,2,141,2,130, - 1,124,13,100,29,64,0,144,2,114,24,124,23,160,16,161, - 0,125,23,110,24,122,7,124,23,160,16,100,30,161,1,125, - 23,87,0,110,16,4,0,116,17,144,2,121,105,1,0,1, - 0,1,0,124,23,160,16,100,31,161,1,160,18,116,19,161, - 1,125,23,89,0,124,23,160,20,100,32,116,21,161,2,125, - 23,116,22,160,23,124,0,124,23,161,2,125,24,124,24,124, - 14,124,18,124,4,124,22,124,15,124,16,124,17,102,8,125, - 25,124,25,124,11,124,23,60,0,124,12,100,33,55,0,125, - 12,144,1,113,38,87,0,100,0,4,0,4,0,131,3,1, - 0,110,9,49,0,144,2,115,91,119,1,1,0,1,0,1, - 0,89,0,1,0,116,24,160,25,100,34,124,12,124,0,161, - 3,1,0,124,11,83,0,119,0,119,0,119,0,119,0,119, - 0,119,0,119,0,119,0,41,35,78,122,21,99,97,110,39, - 116,32,111,112,101,110,32,90,105,112,32,102,105,108,101,58, - 32,114,12,0,0,0,114,92,0,0,0,250,21,99,97,110, - 39,116,32,114,101,97,100,32,90,105,112,32,102,105,108,101, - 58,32,233,4,0,0,0,114,0,0,0,0,122,16,110,111, - 116,32,97,32,90,105,112,32,102,105,108,101,58,32,122,18, - 99,111,114,114,117,112,116,32,90,105,112,32,102,105,108,101, - 58,32,233,12,0,0,0,233,16,0,0,0,233,20,0,0, - 0,122,28,98,97,100,32,99,101,110,116,114,97,108,32,100, - 105,114,101,99,116,111,114,121,32,115,105,122,101,58,32,122, - 30,98,97,100,32,99,101,110,116,114,97,108,32,100,105,114, - 101,99,116,111,114,121,32,111,102,102,115,101,116,58,32,122, - 38,98,97,100,32,99,101,110,116,114,97,108,32,100,105,114, - 101,99,116,111,114,121,32,115,105,122,101,32,111,114,32,111, - 102,102,115,101,116,58,32,84,233,46,0,0,0,250,27,69, - 79,70,32,114,101,97,100,32,119,104,101,114,101,32,110,111, - 116,32,101,120,112,101,99,116,101,100,115,4,0,0,0,80, - 75,1,2,233,8,0,0,0,233,10,0,0,0,233,14,0, - 0,0,233,24,0,0,0,233,28,0,0,0,233,30,0,0, - 0,233,32,0,0,0,233,34,0,0,0,233,42,0,0,0, - 122,25,98,97,100,32,108,111,99,97,108,32,104,101,97,100, - 101,114,32,111,102,102,115,101,116,58,32,105,0,8,0,0, - 218,5,97,115,99,105,105,90,6,108,97,116,105,110,49,250, - 1,47,114,5,0,0,0,122,33,122,105,112,105,109,112,111, - 114,116,58,32,102,111,117,110,100,32,123,125,32,110,97,109, - 101,115,32,105,110,32,123,33,114,125,41,26,218,3,95,105, - 111,218,9,111,112,101,110,95,99,111,100,101,114,22,0,0, - 0,114,3,0,0,0,218,4,115,101,101,107,218,20,69,78, - 68,95,67,69,78,84,82,65,76,95,68,73,82,95,83,73, - 90,69,90,4,116,101,108,108,218,4,114,101,97,100,114,58, - 0,0,0,218,18,83,84,82,73,78,71,95,69,78,68,95, - 65,82,67,72,73,86,69,218,3,109,97,120,218,15,77,65, - 88,95,67,79,77,77,69,78,84,95,76,69,78,218,5,114, - 102,105,110,100,114,2,0,0,0,218,8,69,79,70,69,114, - 114,111,114,114,1,0,0,0,114,68,0,0,0,218,18,85, - 110,105,99,111,100,101,68,101,99,111,100,101,69,114,114,111, - 114,218,9,116,114,97,110,115,108,97,116,101,218,11,99,112, - 52,51,55,95,116,97,98,108,101,114,19,0,0,0,114,20, - 0,0,0,114,21,0,0,0,114,30,0,0,0,114,48,0, - 0,0,114,81,0,0,0,41,26,114,29,0,0,0,218,2, - 102,112,90,15,104,101,97,100,101,114,95,112,111,115,105,116, - 105,111,110,218,6,98,117,102,102,101,114,218,9,102,105,108, - 101,95,115,105,122,101,90,17,109,97,120,95,99,111,109,109, - 101,110,116,95,115,116,97,114,116,218,4,100,97,116,97,90, - 3,112,111,115,218,11,104,101,97,100,101,114,95,115,105,122, - 101,90,13,104,101,97,100,101,114,95,111,102,102,115,101,116, - 90,10,97,114,99,95,111,102,102,115,101,116,114,33,0,0, - 0,218,5,99,111,117,110,116,218,5,102,108,97,103,115,218, - 8,99,111,109,112,114,101,115,115,218,4,116,105,109,101,218, - 4,100,97,116,101,218,3,99,114,99,218,9,100,97,116,97, - 95,115,105,122,101,218,9,110,97,109,101,95,115,105,122,101, - 218,10,101,120,116,114,97,95,115,105,122,101,90,12,99,111, - 109,109,101,110,116,95,115,105,122,101,218,11,102,105,108,101, - 95,111,102,102,115,101,116,114,47,0,0,0,114,13,0,0, - 0,218,1,116,114,9,0,0,0,114,9,0,0,0,114,10, - 0,0,0,114,27,0,0,0,146,1,0,0,115,240,0,0, - 0,2,1,14,1,14,1,18,1,8,2,2,1,14,1,8, - 1,14,1,14,1,18,1,12,1,18,1,16,1,2,3,12, - 1,12,1,14,1,10,1,2,1,6,255,8,2,2,1,2, - 255,2,1,4,255,2,2,10,1,12,1,14,1,10,1,2, - 1,6,255,10,2,8,1,10,1,2,1,6,255,16,2,12, - 1,10,1,2,1,6,255,16,2,16,2,16,1,8,1,18, - 1,8,1,18,1,8,1,8,1,10,1,18,1,4,2,4, - 2,2,1,14,1,14,1,18,1,2,1,10,1,14,1,8, - 1,18,2,4,1,14,1,8,1,16,1,16,1,16,1,16, - 1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,12, - 1,10,1,18,1,8,1,2,2,14,1,14,1,18,1,14, - 1,18,1,2,4,28,1,18,1,4,255,14,2,18,1,10, - 2,10,2,2,3,14,1,14,1,18,1,12,2,12,1,20, - 1,8,1,8,1,4,202,14,6,18,128,14,49,4,1,2, - 247,2,246,2,246,2,227,2,227,2,248,2,246,2,248,255, - 128,114,27,0,0,0,117,190,1,0,0,0,1,2,3,4, - 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, - 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36, - 37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52, - 53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68, - 69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84, - 85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100, - 101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116, - 117,118,119,120,121,122,123,124,125,126,127,195,135,195,188,195, - 169,195,162,195,164,195,160,195,165,195,167,195,170,195,171,195, - 168,195,175,195,174,195,172,195,132,195,133,195,137,195,166,195, - 134,195,180,195,182,195,178,195,187,195,185,195,191,195,150,195, - 156,194,162,194,163,194,165,226,130,167,198,146,195,161,195,173, - 195,179,195,186,195,177,195,145,194,170,194,186,194,191,226,140, - 144,194,172,194,189,194,188,194,161,194,171,194,187,226,150,145, - 226,150,146,226,150,147,226,148,130,226,148,164,226,149,161,226, - 149,162,226,149,150,226,149,149,226,149,163,226,149,145,226,149, - 151,226,149,157,226,149,156,226,149,155,226,148,144,226,148,148, - 226,148,180,226,148,172,226,148,156,226,148,128,226,148,188,226, - 149,158,226,149,159,226,149,154,226,149,148,226,149,169,226,149, - 166,226,149,160,226,149,144,226,149,172,226,149,167,226,149,168, - 226,149,164,226,149,165,226,149,153,226,149,152,226,149,146,226, - 149,147,226,149,171,226,149,170,226,148,152,226,148,140,226,150, - 136,226,150,132,226,150,140,226,150,144,226,150,128,206,177,195, - 159,206,147,207,128,206,163,207,131,194,181,207,132,206,166,206, - 152,206,169,206,180,226,136,158,207,134,206,181,226,136,169,226, - 137,161,194,177,226,137,165,226,137,164,226,140,160,226,140,161, - 195,183,226,137,136,194,176,226,136,153,194,183,226,136,154,226, - 129,191,194,178,226,150,160,194,160,99,0,0,0,0,0,0, - 0,0,0,0,0,0,1,0,0,0,8,0,0,0,67,0, - 0,0,115,106,0,0,0,116,0,114,11,116,1,160,2,100, - 1,161,1,1,0,116,3,100,2,131,1,130,1,100,3,97, - 0,122,28,122,8,100,4,100,5,108,4,109,5,125,0,1, - 0,87,0,110,15,4,0,116,6,121,52,1,0,1,0,1, - 0,116,1,160,2,100,1,161,1,1,0,116,3,100,2,131, - 1,130,1,87,0,100,6,97,0,110,3,100,6,97,0,119, - 0,116,1,160,2,100,7,161,1,1,0,124,0,83,0,119, - 0,41,8,78,122,27,122,105,112,105,109,112,111,114,116,58, - 32,122,108,105,98,32,85,78,65,86,65,73,76,65,66,76, - 69,250,41,99,97,110,39,116,32,100,101,99,111,109,112,114, - 101,115,115,32,100,97,116,97,59,32,122,108,105,98,32,110, - 111,116,32,97,118,97,105,108,97,98,108,101,84,114,0,0, - 0,0,169,1,218,10,100,101,99,111,109,112,114,101,115,115, - 70,122,25,122,105,112,105,109,112,111,114,116,58,32,122,108, - 105,98,32,97,118,97,105,108,97,98,108,101,41,7,218,15, - 95,105,109,112,111,114,116,105,110,103,95,122,108,105,98,114, - 48,0,0,0,114,81,0,0,0,114,3,0,0,0,90,4, - 122,108,105,98,114,147,0,0,0,218,9,69,120,99,101,112, - 116,105,111,110,114,146,0,0,0,114,9,0,0,0,114,9, - 0,0,0,114,10,0,0,0,218,20,95,103,101,116,95,100, - 101,99,111,109,112,114,101,115,115,95,102,117,110,99,48,2, - 0,0,115,30,0,0,0,4,2,10,3,8,1,4,2,4, - 1,16,1,12,1,10,1,8,1,2,253,12,5,10,2,4, - 1,2,249,255,128,114,150,0,0,0,99,2,0,0,0,0, - 0,0,0,0,0,0,0,17,0,0,0,9,0,0,0,67, - 0,0,0,115,120,1,0,0,124,1,92,8,125,2,125,3, - 125,4,125,5,125,6,125,7,125,8,125,9,124,4,100,1, - 107,0,114,18,116,0,100,2,131,1,130,1,116,1,160,2, - 124,0,161,1,143,127,125,10,122,7,124,10,160,3,124,6, - 161,1,1,0,87,0,110,15,4,0,116,4,121,187,1,0, - 1,0,1,0,116,0,100,3,124,0,155,2,157,2,124,0, - 100,4,141,2,130,1,124,10,160,5,100,5,161,1,125,11, - 116,6,124,11,131,1,100,5,107,3,114,62,116,7,100,6, - 131,1,130,1,124,11,100,0,100,7,133,2,25,0,100,8, - 107,3,114,79,116,0,100,9,124,0,155,2,157,2,124,0, - 100,4,141,2,130,1,116,8,124,11,100,10,100,11,133,2, - 25,0,131,1,125,12,116,8,124,11,100,11,100,5,133,2, - 25,0,131,1,125,13,100,5,124,12,23,0,124,13,23,0, - 125,14,124,6,124,14,55,0,125,6,122,7,124,10,160,3, - 124,6,161,1,1,0,87,0,110,15,4,0,116,4,121,186, - 1,0,1,0,1,0,116,0,100,3,124,0,155,2,157,2, - 124,0,100,4,141,2,130,1,124,10,160,5,124,4,161,1, - 125,15,116,6,124,15,131,1,124,4,107,3,114,143,116,4, - 100,12,131,1,130,1,87,0,100,0,4,0,4,0,131,3, - 1,0,110,8,49,0,115,153,119,1,1,0,1,0,1,0, - 89,0,1,0,124,3,100,1,107,2,114,164,124,15,83,0, - 122,5,116,9,131,0,125,16,87,0,110,10,4,0,116,10, - 121,185,1,0,1,0,1,0,116,0,100,13,131,1,130,1, - 124,16,124,15,100,14,131,2,83,0,119,0,119,0,119,0, - 41,15,78,114,0,0,0,0,122,18,110,101,103,97,116,105, - 118,101,32,100,97,116,97,32,115,105,122,101,114,98,0,0, - 0,114,12,0,0,0,114,110,0,0,0,114,104,0,0,0, - 114,99,0,0,0,115,4,0,0,0,80,75,3,4,122,23, - 98,97,100,32,108,111,99,97,108,32,102,105,108,101,32,104, - 101,97,100,101,114,58,32,233,26,0,0,0,114,109,0,0, - 0,122,26,122,105,112,105,109,112,111,114,116,58,32,99,97, - 110,39,116,32,114,101,97,100,32,100,97,116,97,114,145,0, - 0,0,105,241,255,255,255,41,11,114,3,0,0,0,114,116, - 0,0,0,114,117,0,0,0,114,118,0,0,0,114,22,0, - 0,0,114,120,0,0,0,114,58,0,0,0,114,125,0,0, - 0,114,1,0,0,0,114,150,0,0,0,114,149,0,0,0, - 41,17,114,29,0,0,0,114,61,0,0,0,90,8,100,97, - 116,97,112,97,116,104,114,136,0,0,0,114,140,0,0,0, - 114,131,0,0,0,114,143,0,0,0,114,137,0,0,0,114, - 138,0,0,0,114,139,0,0,0,114,129,0,0,0,114,130, - 0,0,0,114,141,0,0,0,114,142,0,0,0,114,133,0, - 0,0,90,8,114,97,119,95,100,97,116,97,114,147,0,0, + 95,169,1,78,41,17,114,6,0,0,0,114,7,0,0,0, + 114,8,0,0,0,218,7,95,95,100,111,99,95,95,114,34, + 0,0,0,114,44,0,0,0,114,45,0,0,0,114,49,0, + 0,0,114,55,0,0,0,114,62,0,0,0,114,63,0,0, + 0,114,70,0,0,0,114,46,0,0,0,114,83,0,0,0, + 114,85,0,0,0,114,88,0,0,0,114,89,0,0,0,114, + 9,0,0,0,114,9,0,0,0,114,9,0,0,0,114,10, + 0,0,0,114,4,0,0,0,46,0,0,0,115,32,0,0, + 0,8,0,4,1,8,17,10,46,10,37,10,16,8,27,8, + 10,8,21,8,12,8,26,8,13,8,43,8,15,12,10,255, + 128,122,12,95,95,105,110,105,116,95,95,46,112,121,99,84, + 114,66,0,0,0,70,41,3,122,4,46,112,121,99,84,70, + 41,3,114,67,0,0,0,70,70,99,2,0,0,0,0,0, + 0,0,0,0,0,0,2,0,0,0,4,0,0,0,67,0, + 0,0,115,20,0,0,0,124,0,106,0,124,1,160,1,100, + 1,161,1,100,2,25,0,23,0,83,0,41,3,78,218,1, + 46,233,2,0,0,0,41,2,114,31,0,0,0,218,10,114, + 112,97,114,116,105,116,105,111,110,41,2,114,32,0,0,0, + 114,41,0,0,0,114,9,0,0,0,114,9,0,0,0,114, + 10,0,0,0,114,39,0,0,0,102,1,0,0,115,4,0, + 0,0,20,1,255,128,114,39,0,0,0,99,2,0,0,0, + 0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0, + 67,0,0,0,115,18,0,0,0,124,1,116,0,23,0,125, + 2,124,2,124,0,106,1,118,0,83,0,114,90,0,0,0, + 41,2,114,20,0,0,0,114,28,0,0,0,41,3,114,32, + 0,0,0,114,13,0,0,0,90,7,100,105,114,112,97,116, + 104,114,9,0,0,0,114,9,0,0,0,114,10,0,0,0, + 114,40,0,0,0,106,1,0,0,115,6,0,0,0,8,4, + 10,2,255,128,114,40,0,0,0,99,2,0,0,0,0,0, + 0,0,0,0,0,0,7,0,0,0,4,0,0,0,67,0, + 0,0,115,56,0,0,0,116,0,124,0,124,1,131,2,125, + 2,116,1,68,0,93,18,92,3,125,3,125,4,125,5,124, + 2,124,3,23,0,125,6,124,6,124,0,106,2,118,0,114, + 25,124,5,2,0,1,0,83,0,113,7,100,0,83,0,114, + 90,0,0,0,41,3,114,39,0,0,0,218,16,95,122,105, + 112,95,115,101,97,114,99,104,111,114,100,101,114,114,28,0, + 0,0,41,7,114,32,0,0,0,114,41,0,0,0,114,13, + 0,0,0,218,6,115,117,102,102,105,120,218,10,105,115,98, + 121,116,101,99,111,100,101,114,54,0,0,0,114,69,0,0, 0,114,9,0,0,0,114,9,0,0,0,114,10,0,0,0, - 114,59,0,0,0,69,2,0,0,115,74,0,0,0,20,1, - 8,1,8,1,12,2,2,2,14,1,12,1,18,1,10,1, - 12,1,8,1,16,2,18,2,16,2,16,1,12,1,8,1, - 2,1,14,1,12,1,18,1,10,1,12,1,8,1,14,255, - 16,128,8,3,4,2,2,3,10,1,12,1,8,1,10,1, - 2,254,2,243,2,240,255,128,114,59,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0, - 0,0,67,0,0,0,115,16,0,0,0,116,0,124,0,124, - 1,24,0,131,1,100,1,107,1,83,0,41,2,78,114,5, - 0,0,0,41,1,218,3,97,98,115,41,2,90,2,116,49, - 90,2,116,50,114,9,0,0,0,114,9,0,0,0,114,10, - 0,0,0,218,9,95,101,113,95,109,116,105,109,101,115,2, - 0,0,115,4,0,0,0,16,2,255,128,114,153,0,0,0, - 99,5,0,0,0,0,0,0,0,0,0,0,0,14,0,0, - 0,6,0,0,0,67,0,0,0,115,254,0,0,0,124,3, - 124,2,100,1,156,2,125,5,116,0,160,1,124,4,124,3, - 124,5,161,3,125,6,124,6,100,2,64,0,100,3,107,3, - 125,7,124,7,114,63,124,6,100,4,64,0,100,3,107,3, - 125,8,116,2,106,3,100,5,107,3,114,62,124,8,115,38, - 116,2,106,3,100,6,107,2,114,62,116,4,124,0,124,2, - 131,2,125,9,124,9,100,0,117,1,114,62,116,2,160,5, - 116,0,106,6,124,9,161,2,125,10,116,0,160,7,124,4, - 124,10,124,3,124,5,161,4,1,0,110,40,116,8,124,0, - 124,2,131,2,92,2,125,11,125,12,124,11,114,103,116,9, - 116,10,124,4,100,7,100,8,133,2,25,0,131,1,124,11, - 131,2,114,93,116,10,124,4,100,8,100,9,133,2,25,0, - 131,1,124,12,107,3,114,103,116,11,160,12,100,10,124,3, - 155,2,157,2,161,1,1,0,100,0,83,0,116,13,160,14, - 124,4,100,9,100,0,133,2,25,0,161,1,125,13,116,15, - 124,13,116,16,131,2,115,125,116,17,100,11,124,1,155,2, - 100,12,157,3,131,1,130,1,124,13,83,0,41,13,78,41, - 2,114,47,0,0,0,114,13,0,0,0,114,5,0,0,0, - 114,0,0,0,0,114,92,0,0,0,90,5,110,101,118,101, - 114,90,6,97,108,119,97,121,115,114,105,0,0,0,114,100, - 0,0,0,114,101,0,0,0,122,22,98,121,116,101,99,111, - 100,101,32,105,115,32,115,116,97,108,101,32,102,111,114,32, - 122,16,99,111,109,112,105,108,101,100,32,109,111,100,117,108, - 101,32,122,21,32,105,115,32,110,111,116,32,97,32,99,111, - 100,101,32,111,98,106,101,99,116,41,18,114,21,0,0,0, - 90,13,95,99,108,97,115,115,105,102,121,95,112,121,99,218, - 4,95,105,109,112,90,21,99,104,101,99,107,95,104,97,115, - 104,95,98,97,115,101,100,95,112,121,99,115,218,15,95,103, - 101,116,95,112,121,99,95,115,111,117,114,99,101,218,11,115, - 111,117,114,99,101,95,104,97,115,104,90,17,95,82,65,87, - 95,77,65,71,73,67,95,78,85,77,66,69,82,90,18,95, - 118,97,108,105,100,97,116,101,95,104,97,115,104,95,112,121, - 99,218,29,95,103,101,116,95,109,116,105,109,101,95,97,110, - 100,95,115,105,122,101,95,111,102,95,115,111,117,114,99,101, - 114,153,0,0,0,114,2,0,0,0,114,48,0,0,0,114, - 81,0,0,0,218,7,109,97,114,115,104,97,108,90,5,108, - 111,97,100,115,114,15,0,0,0,218,10,95,99,111,100,101, - 95,116,121,112,101,218,9,84,121,112,101,69,114,114,111,114, - 41,14,114,32,0,0,0,114,60,0,0,0,114,69,0,0, - 0,114,41,0,0,0,114,132,0,0,0,90,11,101,120,99, - 95,100,101,116,97,105,108,115,114,135,0,0,0,90,10,104, - 97,115,104,95,98,97,115,101,100,90,12,99,104,101,99,107, - 95,115,111,117,114,99,101,90,12,115,111,117,114,99,101,95, - 98,121,116,101,115,114,156,0,0,0,90,12,115,111,117,114, - 99,101,95,109,116,105,109,101,90,11,115,111,117,114,99,101, - 95,115,105,122,101,114,53,0,0,0,114,9,0,0,0,114, - 9,0,0,0,114,10,0,0,0,218,15,95,117,110,109,97, - 114,115,104,97,108,95,99,111,100,101,123,2,0,0,115,74, - 0,0,0,2,2,2,1,6,254,14,5,12,2,4,1,12, - 1,10,1,2,1,2,255,8,1,2,255,10,2,8,1,4, - 1,4,1,2,1,4,254,4,5,8,1,4,255,2,128,8, - 4,6,255,4,3,22,3,18,1,2,255,4,2,8,1,4, - 255,4,2,18,2,10,1,16,1,4,1,255,128,114,161,0, - 0,0,99,1,0,0,0,0,0,0,0,0,0,0,0,1, - 0,0,0,4,0,0,0,67,0,0,0,115,28,0,0,0, - 124,0,160,0,100,1,100,2,161,2,125,0,124,0,160,0, - 100,3,100,2,161,2,125,0,124,0,83,0,41,4,78,115, - 2,0,0,0,13,10,243,1,0,0,0,10,243,1,0,0, - 0,13,41,1,114,19,0,0,0,41,1,218,6,115,111,117, - 114,99,101,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,218,23,95,110,111,114,109,97,108,105,122,101,95,108, - 105,110,101,95,101,110,100,105,110,103,115,168,2,0,0,115, - 8,0,0,0,12,1,12,1,4,1,255,128,114,165,0,0, - 0,99,2,0,0,0,0,0,0,0,0,0,0,0,2,0, - 0,0,6,0,0,0,67,0,0,0,115,24,0,0,0,116, - 0,124,1,131,1,125,1,116,1,124,1,124,0,100,1,100, - 2,100,3,141,4,83,0,41,4,78,114,79,0,0,0,84, - 41,1,90,12,100,111,110,116,95,105,110,104,101,114,105,116, - 41,2,114,165,0,0,0,218,7,99,111,109,112,105,108,101, - 41,2,114,60,0,0,0,114,164,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,218,15,95,99,111, - 109,112,105,108,101,95,115,111,117,114,99,101,175,2,0,0, - 115,6,0,0,0,8,1,16,1,255,128,114,167,0,0,0, - 99,2,0,0,0,0,0,0,0,0,0,0,0,2,0,0, - 0,11,0,0,0,67,0,0,0,115,68,0,0,0,116,0, - 160,1,124,0,100,1,63,0,100,2,23,0,124,0,100,3, - 63,0,100,4,64,0,124,0,100,5,64,0,124,1,100,6, - 63,0,124,1,100,3,63,0,100,7,64,0,124,1,100,5, - 64,0,100,8,20,0,100,9,100,9,100,9,102,9,161,1, - 83,0,41,10,78,233,9,0,0,0,105,188,7,0,0,233, - 5,0,0,0,233,15,0,0,0,233,31,0,0,0,233,11, - 0,0,0,233,63,0,0,0,114,92,0,0,0,114,14,0, - 0,0,41,2,114,137,0,0,0,90,6,109,107,116,105,109, - 101,41,2,218,1,100,114,144,0,0,0,114,9,0,0,0, - 114,9,0,0,0,114,10,0,0,0,218,14,95,112,97,114, - 115,101,95,100,111,115,116,105,109,101,181,2,0,0,115,20, - 0,0,0,4,1,10,1,10,1,6,1,6,1,10,1,10, - 1,6,1,6,249,255,128,114,175,0,0,0,99,2,0,0, - 0,0,0,0,0,0,0,0,0,6,0,0,0,10,0,0, - 0,67,0,0,0,115,110,0,0,0,122,41,124,1,100,1, - 100,0,133,2,25,0,100,2,118,0,115,11,74,0,130,1, - 124,1,100,0,100,1,133,2,25,0,125,1,124,0,106,0, - 124,1,25,0,125,2,124,2,100,3,25,0,125,3,124,2, - 100,4,25,0,125,4,124,2,100,5,25,0,125,5,116,1, - 124,4,124,3,131,2,124,5,102,2,87,0,83,0,4,0, - 116,2,116,3,116,4,102,3,121,54,1,0,1,0,1,0, - 89,0,100,6,83,0,119,0,41,7,78,114,14,0,0,0, - 169,2,218,1,99,218,1,111,114,169,0,0,0,233,6,0, - 0,0,233,3,0,0,0,41,2,114,0,0,0,0,114,0, - 0,0,0,41,5,114,28,0,0,0,114,175,0,0,0,114, - 26,0,0,0,218,10,73,110,100,101,120,69,114,114,111,114, - 114,160,0,0,0,41,6,114,32,0,0,0,114,13,0,0, - 0,114,61,0,0,0,114,137,0,0,0,114,138,0,0,0, - 90,17,117,110,99,111,109,112,114,101,115,115,101,100,95,115, - 105,122,101,114,9,0,0,0,114,9,0,0,0,114,10,0, - 0,0,114,157,0,0,0,194,2,0,0,115,24,0,0,0, - 2,1,20,2,12,1,10,1,8,3,8,1,8,1,16,1, - 18,1,6,1,2,255,255,128,114,157,0,0,0,99,2,0, - 0,0,0,0,0,0,0,0,0,0,3,0,0,0,8,0, - 0,0,67,0,0,0,115,80,0,0,0,124,1,100,1,100, - 0,133,2,25,0,100,2,118,0,115,10,74,0,130,1,124, - 1,100,0,100,1,133,2,25,0,125,1,122,7,124,0,106, - 0,124,1,25,0,125,2,87,0,110,9,4,0,116,1,121, - 39,1,0,1,0,1,0,89,0,100,0,83,0,116,2,124, - 0,106,3,124,2,131,2,83,0,119,0,41,3,78,114,14, - 0,0,0,114,176,0,0,0,41,4,114,28,0,0,0,114, - 26,0,0,0,114,59,0,0,0,114,29,0,0,0,41,3, - 114,32,0,0,0,114,13,0,0,0,114,61,0,0,0,114, - 9,0,0,0,114,9,0,0,0,114,10,0,0,0,114,155, - 0,0,0,213,2,0,0,115,18,0,0,0,20,2,12,1, - 2,2,14,1,12,1,6,1,12,2,2,253,255,128,114,155, - 0,0,0,99,2,0,0,0,0,0,0,0,0,0,0,0, - 14,0,0,0,11,0,0,0,67,0,0,0,115,14,1,0, - 0,116,0,124,0,124,1,131,2,125,2,100,0,125,3,116, - 1,68,0,93,100,92,3,125,4,125,5,125,6,124,2,124, - 4,23,0,125,7,116,2,106,3,100,1,124,0,106,4,116, - 5,124,7,100,2,100,3,141,5,1,0,122,7,124,0,106, - 6,124,7,25,0,125,8,87,0,110,8,4,0,116,7,121, - 134,1,0,1,0,1,0,89,0,113,9,124,8,100,4,25, - 0,125,9,116,8,124,0,106,4,124,8,131,2,125,10,100, - 0,125,11,124,5,114,89,122,10,116,9,124,0,124,9,124, - 7,124,1,124,10,131,5,125,11,87,0,110,24,4,0,116, - 10,121,133,1,0,125,12,1,0,122,8,124,12,125,3,87, - 0,89,0,100,0,125,12,126,12,110,9,100,0,125,12,126, - 12,119,1,116,11,124,9,124,10,131,2,125,11,124,11,100, - 0,117,0,114,99,113,9,124,8,100,4,25,0,125,9,124, - 11,124,6,124,9,102,3,2,0,1,0,83,0,124,3,114, - 124,100,5,124,3,155,0,157,2,125,13,116,12,124,13,124, - 1,100,6,141,2,124,3,130,2,116,12,100,7,124,1,155, - 2,157,2,124,1,100,6,141,2,130,1,119,0,119,0,41, - 8,78,122,13,116,114,121,105,110,103,32,123,125,123,125,123, - 125,114,92,0,0,0,41,1,90,9,118,101,114,98,111,115, - 105,116,121,114,0,0,0,0,122,20,109,111,100,117,108,101, - 32,108,111,97,100,32,102,97,105,108,101,100,58,32,114,65, - 0,0,0,114,64,0,0,0,41,13,114,39,0,0,0,114, - 95,0,0,0,114,48,0,0,0,114,81,0,0,0,114,29, - 0,0,0,114,20,0,0,0,114,28,0,0,0,114,26,0, - 0,0,114,59,0,0,0,114,161,0,0,0,114,80,0,0, - 0,114,167,0,0,0,114,3,0,0,0,41,14,114,32,0, - 0,0,114,41,0,0,0,114,13,0,0,0,90,12,105,109, - 112,111,114,116,95,101,114,114,111,114,114,96,0,0,0,114, - 97,0,0,0,114,54,0,0,0,114,69,0,0,0,114,61, - 0,0,0,114,43,0,0,0,114,132,0,0,0,114,53,0, - 0,0,90,3,101,120,99,114,82,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,114,51,0,0,0, - 228,2,0,0,115,60,0,0,0,10,1,4,1,14,1,8, - 1,22,1,2,1,14,1,12,1,4,1,8,2,12,1,4, - 1,4,1,2,1,20,1,14,1,16,1,8,128,10,2,8, - 1,2,3,8,1,14,1,4,2,10,1,14,1,18,2,2, - 241,2,247,255,128,114,51,0,0,0,41,46,114,90,0,0, - 0,90,26,95,102,114,111,122,101,110,95,105,109,112,111,114, - 116,108,105,98,95,101,120,116,101,114,110,97,108,114,21,0, - 0,0,114,1,0,0,0,114,2,0,0,0,90,17,95,102, - 114,111,122,101,110,95,105,109,112,111,114,116,108,105,98,114, - 48,0,0,0,114,154,0,0,0,114,116,0,0,0,114,158, - 0,0,0,114,72,0,0,0,114,137,0,0,0,114,35,0, - 0,0,90,7,95,95,97,108,108,95,95,114,20,0,0,0, - 90,15,112,97,116,104,95,115,101,112,97,114,97,116,111,114, - 115,114,18,0,0,0,114,80,0,0,0,114,3,0,0,0, - 114,25,0,0,0,218,4,116,121,112,101,114,75,0,0,0, - 114,119,0,0,0,114,121,0,0,0,114,123,0,0,0,90, - 13,95,76,111,97,100,101,114,66,97,115,105,99,115,114,4, - 0,0,0,114,95,0,0,0,114,39,0,0,0,114,40,0, - 0,0,114,38,0,0,0,114,27,0,0,0,114,128,0,0, - 0,114,148,0,0,0,114,150,0,0,0,114,59,0,0,0, - 114,153,0,0,0,114,161,0,0,0,218,8,95,95,99,111, - 100,101,95,95,114,159,0,0,0,114,165,0,0,0,114,167, - 0,0,0,114,175,0,0,0,114,157,0,0,0,114,155,0, - 0,0,114,51,0,0,0,114,9,0,0,0,114,9,0,0, - 0,114,9,0,0,0,114,10,0,0,0,218,8,60,109,111, - 100,117,108,101,62,1,0,0,0,115,92,0,0,0,4,0, - 8,16,16,1,8,1,8,1,8,1,8,1,8,1,8,1, - 8,1,8,2,6,3,14,1,16,3,4,4,8,2,4,2, - 4,1,4,1,18,2,0,127,0,127,12,50,12,1,2,1, - 2,1,4,252,8,9,8,4,8,9,8,31,2,126,2,254, - 4,29,8,5,8,21,8,46,8,8,10,40,8,5,8,7, - 8,6,8,13,8,19,12,15,255,128, + 114,38,0,0,0,115,1,0,0,115,16,0,0,0,10,1, + 14,1,8,1,10,1,8,1,2,255,4,2,255,128,114,38, + 0,0,0,99,1,0,0,0,0,0,0,0,0,0,0,0, + 26,0,0,0,9,0,0,0,67,0,0,0,115,226,4,0, + 0,122,7,116,0,160,1,124,0,161,1,125,1,87,0,110, + 16,4,0,116,2,144,2,121,112,1,0,1,0,1,0,116, + 3,100,1,124,0,155,2,157,2,124,0,100,2,141,2,130, + 1,124,1,144,2,143,60,1,0,122,18,124,1,160,4,116, + 5,11,0,100,3,161,2,1,0,124,1,160,6,161,0,125, + 2,124,1,160,7,116,5,161,1,125,3,87,0,110,16,4, + 0,116,2,144,2,121,111,1,0,1,0,1,0,116,3,100, + 4,124,0,155,2,157,2,124,0,100,2,141,2,130,1,116, + 8,124,3,131,1,116,5,107,3,114,78,116,3,100,4,124, + 0,155,2,157,2,124,0,100,2,141,2,130,1,124,3,100, + 0,100,5,133,2,25,0,116,9,107,3,114,201,122,12,124, + 1,160,4,100,6,100,3,161,2,1,0,124,1,160,6,161, + 0,125,4,87,0,110,16,4,0,116,2,144,2,121,110,1, + 0,1,0,1,0,116,3,100,4,124,0,155,2,157,2,124, + 0,100,2,141,2,130,1,116,10,124,4,116,11,24,0,116, + 5,24,0,100,6,131,2,125,5,122,11,124,1,160,4,124, + 5,161,1,1,0,124,1,160,7,161,0,125,6,87,0,110, + 16,4,0,116,2,144,2,121,109,1,0,1,0,1,0,116, + 3,100,4,124,0,155,2,157,2,124,0,100,2,141,2,130, + 1,124,6,160,12,116,9,161,1,125,7,124,7,100,6,107, + 0,114,170,116,3,100,7,124,0,155,2,157,2,124,0,100, + 2,141,2,130,1,124,6,124,7,124,7,116,5,23,0,133, + 2,25,0,125,3,116,8,124,3,131,1,116,5,107,3,114, + 193,116,3,100,8,124,0,155,2,157,2,124,0,100,2,141, + 2,130,1,124,4,116,8,124,6,131,1,24,0,124,7,23, + 0,125,2,116,13,124,3,100,9,100,10,133,2,25,0,131, + 1,125,8,116,13,124,3,100,10,100,11,133,2,25,0,131, + 1,125,9,124,2,124,8,107,0,114,230,116,3,100,12,124, + 0,155,2,157,2,124,0,100,2,141,2,130,1,124,2,124, + 9,107,0,114,243,116,3,100,13,124,0,155,2,157,2,124, + 0,100,2,141,2,130,1,124,2,124,8,56,0,125,2,124, + 2,124,9,24,0,125,10,124,10,100,6,107,0,144,1,114, + 9,116,3,100,14,124,0,155,2,157,2,124,0,100,2,141, + 2,130,1,105,0,125,11,100,6,125,12,122,7,124,1,160, + 4,124,2,161,1,1,0,87,0,110,16,4,0,116,2,144, + 2,121,108,1,0,1,0,1,0,116,3,100,4,124,0,155, + 2,157,2,124,0,100,2,141,2,130,1,9,0,124,1,160, + 7,100,16,161,1,125,3,116,8,124,3,131,1,100,5,107, + 0,144,1,114,54,116,14,100,17,131,1,130,1,124,3,100, + 0,100,5,133,2,25,0,100,18,107,3,144,1,114,65,144, + 2,113,80,116,8,124,3,131,1,100,16,107,3,144,1,114, + 76,116,14,100,17,131,1,130,1,116,15,124,3,100,19,100, + 20,133,2,25,0,131,1,125,13,116,15,124,3,100,20,100, + 9,133,2,25,0,131,1,125,14,116,15,124,3,100,9,100, + 21,133,2,25,0,131,1,125,15,116,15,124,3,100,21,100, + 10,133,2,25,0,131,1,125,16,116,13,124,3,100,10,100, + 11,133,2,25,0,131,1,125,17,116,13,124,3,100,11,100, + 22,133,2,25,0,131,1,125,18,116,13,124,3,100,22,100, + 23,133,2,25,0,131,1,125,4,116,15,124,3,100,23,100, + 24,133,2,25,0,131,1,125,19,116,15,124,3,100,24,100, + 25,133,2,25,0,131,1,125,20,116,15,124,3,100,25,100, + 26,133,2,25,0,131,1,125,21,116,13,124,3,100,27,100, + 16,133,2,25,0,131,1,125,22,124,19,124,20,23,0,124, + 21,23,0,125,8,124,22,124,9,107,4,144,1,114,184,116, + 3,100,28,124,0,155,2,157,2,124,0,100,2,141,2,130, + 1,124,22,124,10,55,0,125,22,122,7,124,1,160,7,124, + 19,161,1,125,23,87,0,110,16,4,0,116,2,144,2,121, + 107,1,0,1,0,1,0,116,3,100,4,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,116,8,124,23,131,1,124, + 19,107,3,144,1,114,228,116,3,100,4,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,122,25,116,8,124,1,160, + 7,124,8,124,19,24,0,161,1,131,1,124,8,124,19,24, + 0,107,3,144,1,114,252,116,3,100,4,124,0,155,2,157, + 2,124,0,100,2,141,2,130,1,87,0,110,16,4,0,116, + 2,144,2,121,106,1,0,1,0,1,0,116,3,100,4,124, + 0,155,2,157,2,124,0,100,2,141,2,130,1,124,13,100, + 29,64,0,144,2,114,24,124,23,160,16,161,0,125,23,110, + 24,122,7,124,23,160,16,100,30,161,1,125,23,87,0,110, + 16,4,0,116,17,144,2,121,105,1,0,1,0,1,0,124, + 23,160,16,100,31,161,1,160,18,116,19,161,1,125,23,89, + 0,124,23,160,20,100,32,116,21,161,2,125,23,116,22,160, + 23,124,0,124,23,161,2,125,24,124,24,124,14,124,18,124, + 4,124,22,124,15,124,16,124,17,102,8,125,25,124,25,124, + 11,124,23,60,0,124,12,100,33,55,0,125,12,144,1,113, + 38,87,0,100,0,4,0,4,0,131,3,1,0,110,9,49, + 0,144,2,115,91,119,1,1,0,1,0,1,0,89,0,1, + 0,116,24,160,25,100,34,124,12,124,0,161,3,1,0,124, + 11,83,0,119,0,119,0,119,0,119,0,119,0,119,0,119, + 0,119,0,41,35,78,122,21,99,97,110,39,116,32,111,112, + 101,110,32,90,105,112,32,102,105,108,101,58,32,114,12,0, + 0,0,114,93,0,0,0,250,21,99,97,110,39,116,32,114, + 101,97,100,32,90,105,112,32,102,105,108,101,58,32,233,4, + 0,0,0,114,0,0,0,0,122,16,110,111,116,32,97,32, + 90,105,112,32,102,105,108,101,58,32,122,18,99,111,114,114, + 117,112,116,32,90,105,112,32,102,105,108,101,58,32,233,12, + 0,0,0,233,16,0,0,0,233,20,0,0,0,122,28,98, + 97,100,32,99,101,110,116,114,97,108,32,100,105,114,101,99, + 116,111,114,121,32,115,105,122,101,58,32,122,30,98,97,100, + 32,99,101,110,116,114,97,108,32,100,105,114,101,99,116,111, + 114,121,32,111,102,102,115,101,116,58,32,122,38,98,97,100, + 32,99,101,110,116,114,97,108,32,100,105,114,101,99,116,111, + 114,121,32,115,105,122,101,32,111,114,32,111,102,102,115,101, + 116,58,32,84,233,46,0,0,0,250,27,69,79,70,32,114, + 101,97,100,32,119,104,101,114,101,32,110,111,116,32,101,120, + 112,101,99,116,101,100,115,4,0,0,0,80,75,1,2,233, + 8,0,0,0,233,10,0,0,0,233,14,0,0,0,233,24, + 0,0,0,233,28,0,0,0,233,30,0,0,0,233,32,0, + 0,0,233,34,0,0,0,233,42,0,0,0,122,25,98,97, + 100,32,108,111,99,97,108,32,104,101,97,100,101,114,32,111, + 102,102,115,101,116,58,32,105,0,8,0,0,218,5,97,115, + 99,105,105,90,6,108,97,116,105,110,49,250,1,47,114,5, + 0,0,0,122,33,122,105,112,105,109,112,111,114,116,58,32, + 102,111,117,110,100,32,123,125,32,110,97,109,101,115,32,105, + 110,32,123,33,114,125,41,26,218,3,95,105,111,218,9,111, + 112,101,110,95,99,111,100,101,114,22,0,0,0,114,3,0, + 0,0,218,4,115,101,101,107,218,20,69,78,68,95,67,69, + 78,84,82,65,76,95,68,73,82,95,83,73,90,69,90,4, + 116,101,108,108,218,4,114,101,97,100,114,58,0,0,0,218, + 18,83,84,82,73,78,71,95,69,78,68,95,65,82,67,72, + 73,86,69,218,3,109,97,120,218,15,77,65,88,95,67,79, + 77,77,69,78,84,95,76,69,78,218,5,114,102,105,110,100, + 114,2,0,0,0,218,8,69,79,70,69,114,114,111,114,114, + 1,0,0,0,114,68,0,0,0,218,18,85,110,105,99,111, + 100,101,68,101,99,111,100,101,69,114,114,111,114,218,9,116, + 114,97,110,115,108,97,116,101,218,11,99,112,52,51,55,95, + 116,97,98,108,101,114,19,0,0,0,114,20,0,0,0,114, + 21,0,0,0,114,30,0,0,0,114,48,0,0,0,114,81, + 0,0,0,41,26,114,29,0,0,0,218,2,102,112,90,15, + 104,101,97,100,101,114,95,112,111,115,105,116,105,111,110,218, + 6,98,117,102,102,101,114,218,9,102,105,108,101,95,115,105, + 122,101,90,17,109,97,120,95,99,111,109,109,101,110,116,95, + 115,116,97,114,116,218,4,100,97,116,97,90,3,112,111,115, + 218,11,104,101,97,100,101,114,95,115,105,122,101,90,13,104, + 101,97,100,101,114,95,111,102,102,115,101,116,90,10,97,114, + 99,95,111,102,102,115,101,116,114,33,0,0,0,218,5,99, + 111,117,110,116,218,5,102,108,97,103,115,218,8,99,111,109, + 112,114,101,115,115,218,4,116,105,109,101,218,4,100,97,116, + 101,218,3,99,114,99,218,9,100,97,116,97,95,115,105,122, + 101,218,9,110,97,109,101,95,115,105,122,101,218,10,101,120, + 116,114,97,95,115,105,122,101,90,12,99,111,109,109,101,110, + 116,95,115,105,122,101,218,11,102,105,108,101,95,111,102,102, + 115,101,116,114,47,0,0,0,114,13,0,0,0,218,1,116, + 114,9,0,0,0,114,9,0,0,0,114,10,0,0,0,114, + 27,0,0,0,146,1,0,0,115,240,0,0,0,2,1,14, + 1,14,1,18,1,8,2,2,1,14,1,8,1,14,1,14, + 1,18,1,12,1,18,1,16,1,2,3,12,1,12,1,14, + 1,10,1,2,1,6,255,8,2,2,1,2,255,2,1,4, + 255,2,2,10,1,12,1,14,1,10,1,2,1,6,255,10, + 2,8,1,10,1,2,1,6,255,16,2,12,1,10,1,2, + 1,6,255,16,2,16,2,16,1,8,1,18,1,8,1,18, + 1,8,1,8,1,10,1,18,1,4,2,4,2,2,1,14, + 1,14,1,18,1,2,1,10,1,14,1,8,1,18,2,4, + 1,14,1,8,1,16,1,16,1,16,1,16,1,16,1,16, + 1,16,1,16,1,16,1,16,1,16,1,12,1,10,1,18, + 1,8,1,2,2,14,1,14,1,18,1,14,1,18,1,2, + 4,28,1,18,1,4,255,14,2,18,1,10,2,10,2,2, + 3,14,1,14,1,18,1,12,2,12,1,20,1,8,1,8, + 1,4,202,14,6,18,128,14,49,4,1,2,247,2,246,2, + 246,2,227,2,227,2,248,2,246,2,248,255,128,114,27,0, + 0,0,117,190,1,0,0,0,1,2,3,4,5,6,7,8, + 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24, + 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, + 41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56, + 57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72, + 73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88, + 89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104, + 105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120, + 121,122,123,124,125,126,127,195,135,195,188,195,169,195,162,195, + 164,195,160,195,165,195,167,195,170,195,171,195,168,195,175,195, + 174,195,172,195,132,195,133,195,137,195,166,195,134,195,180,195, + 182,195,178,195,187,195,185,195,191,195,150,195,156,194,162,194, + 163,194,165,226,130,167,198,146,195,161,195,173,195,179,195,186, + 195,177,195,145,194,170,194,186,194,191,226,140,144,194,172,194, + 189,194,188,194,161,194,171,194,187,226,150,145,226,150,146,226, + 150,147,226,148,130,226,148,164,226,149,161,226,149,162,226,149, + 150,226,149,149,226,149,163,226,149,145,226,149,151,226,149,157, + 226,149,156,226,149,155,226,148,144,226,148,148,226,148,180,226, + 148,172,226,148,156,226,148,128,226,148,188,226,149,158,226,149, + 159,226,149,154,226,149,148,226,149,169,226,149,166,226,149,160, + 226,149,144,226,149,172,226,149,167,226,149,168,226,149,164,226, + 149,165,226,149,153,226,149,152,226,149,146,226,149,147,226,149, + 171,226,149,170,226,148,152,226,148,140,226,150,136,226,150,132, + 226,150,140,226,150,144,226,150,128,206,177,195,159,206,147,207, + 128,206,163,207,131,194,181,207,132,206,166,206,152,206,169,206, + 180,226,136,158,207,134,206,181,226,136,169,226,137,161,194,177, + 226,137,165,226,137,164,226,140,160,226,140,161,195,183,226,137, + 136,194,176,226,136,153,194,183,226,136,154,226,129,191,194,178, + 226,150,160,194,160,99,0,0,0,0,0,0,0,0,0,0, + 0,0,1,0,0,0,8,0,0,0,67,0,0,0,115,106, + 0,0,0,116,0,114,11,116,1,160,2,100,1,161,1,1, + 0,116,3,100,2,131,1,130,1,100,3,97,0,122,28,122, + 8,100,4,100,5,108,4,109,5,125,0,1,0,87,0,110, + 15,4,0,116,6,121,52,1,0,1,0,1,0,116,1,160, + 2,100,1,161,1,1,0,116,3,100,2,131,1,130,1,87, + 0,100,6,97,0,110,3,100,6,97,0,119,0,116,1,160, + 2,100,7,161,1,1,0,124,0,83,0,119,0,41,8,78, + 122,27,122,105,112,105,109,112,111,114,116,58,32,122,108,105, + 98,32,85,78,65,86,65,73,76,65,66,76,69,250,41,99, + 97,110,39,116,32,100,101,99,111,109,112,114,101,115,115,32, + 100,97,116,97,59,32,122,108,105,98,32,110,111,116,32,97, + 118,97,105,108,97,98,108,101,84,114,0,0,0,0,169,1, + 218,10,100,101,99,111,109,112,114,101,115,115,70,122,25,122, + 105,112,105,109,112,111,114,116,58,32,122,108,105,98,32,97, + 118,97,105,108,97,98,108,101,41,7,218,15,95,105,109,112, + 111,114,116,105,110,103,95,122,108,105,98,114,48,0,0,0, + 114,81,0,0,0,114,3,0,0,0,90,4,122,108,105,98, + 114,147,0,0,0,218,9,69,120,99,101,112,116,105,111,110, + 114,146,0,0,0,114,9,0,0,0,114,9,0,0,0,114, + 10,0,0,0,218,20,95,103,101,116,95,100,101,99,111,109, + 112,114,101,115,115,95,102,117,110,99,48,2,0,0,115,30, + 0,0,0,4,2,10,3,8,1,4,2,4,1,16,1,12, + 1,10,1,8,1,2,253,12,5,10,2,4,1,2,249,255, + 128,114,150,0,0,0,99,2,0,0,0,0,0,0,0,0, + 0,0,0,17,0,0,0,9,0,0,0,67,0,0,0,115, + 120,1,0,0,124,1,92,8,125,2,125,3,125,4,125,5, + 125,6,125,7,125,8,125,9,124,4,100,1,107,0,114,18, + 116,0,100,2,131,1,130,1,116,1,160,2,124,0,161,1, + 143,127,125,10,122,7,124,10,160,3,124,6,161,1,1,0, + 87,0,110,15,4,0,116,4,121,187,1,0,1,0,1,0, + 116,0,100,3,124,0,155,2,157,2,124,0,100,4,141,2, + 130,1,124,10,160,5,100,5,161,1,125,11,116,6,124,11, + 131,1,100,5,107,3,114,62,116,7,100,6,131,1,130,1, + 124,11,100,0,100,7,133,2,25,0,100,8,107,3,114,79, + 116,0,100,9,124,0,155,2,157,2,124,0,100,4,141,2, + 130,1,116,8,124,11,100,10,100,11,133,2,25,0,131,1, + 125,12,116,8,124,11,100,11,100,5,133,2,25,0,131,1, + 125,13,100,5,124,12,23,0,124,13,23,0,125,14,124,6, + 124,14,55,0,125,6,122,7,124,10,160,3,124,6,161,1, + 1,0,87,0,110,15,4,0,116,4,121,186,1,0,1,0, + 1,0,116,0,100,3,124,0,155,2,157,2,124,0,100,4, + 141,2,130,1,124,10,160,5,124,4,161,1,125,15,116,6, + 124,15,131,1,124,4,107,3,114,143,116,4,100,12,131,1, + 130,1,87,0,100,0,4,0,4,0,131,3,1,0,110,8, + 49,0,115,153,119,1,1,0,1,0,1,0,89,0,1,0, + 124,3,100,1,107,2,114,164,124,15,83,0,122,5,116,9, + 131,0,125,16,87,0,110,10,4,0,116,10,121,185,1,0, + 1,0,1,0,116,0,100,13,131,1,130,1,124,16,124,15, + 100,14,131,2,83,0,119,0,119,0,119,0,41,15,78,114, + 0,0,0,0,122,18,110,101,103,97,116,105,118,101,32,100, + 97,116,97,32,115,105,122,101,114,98,0,0,0,114,12,0, + 0,0,114,110,0,0,0,114,104,0,0,0,114,99,0,0, + 0,115,4,0,0,0,80,75,3,4,122,23,98,97,100,32, + 108,111,99,97,108,32,102,105,108,101,32,104,101,97,100,101, + 114,58,32,233,26,0,0,0,114,109,0,0,0,122,26,122, + 105,112,105,109,112,111,114,116,58,32,99,97,110,39,116,32, + 114,101,97,100,32,100,97,116,97,114,145,0,0,0,105,241, + 255,255,255,41,11,114,3,0,0,0,114,116,0,0,0,114, + 117,0,0,0,114,118,0,0,0,114,22,0,0,0,114,120, + 0,0,0,114,58,0,0,0,114,125,0,0,0,114,1,0, + 0,0,114,150,0,0,0,114,149,0,0,0,41,17,114,29, + 0,0,0,114,61,0,0,0,90,8,100,97,116,97,112,97, + 116,104,114,136,0,0,0,114,140,0,0,0,114,131,0,0, + 0,114,143,0,0,0,114,137,0,0,0,114,138,0,0,0, + 114,139,0,0,0,114,129,0,0,0,114,130,0,0,0,114, + 141,0,0,0,114,142,0,0,0,114,133,0,0,0,90,8, + 114,97,119,95,100,97,116,97,114,147,0,0,0,114,9,0, + 0,0,114,9,0,0,0,114,10,0,0,0,114,59,0,0, + 0,69,2,0,0,115,74,0,0,0,20,1,8,1,8,1, + 12,2,2,2,14,1,12,1,18,1,10,1,12,1,8,1, + 16,2,18,2,16,2,16,1,12,1,8,1,2,1,14,1, + 12,1,18,1,10,1,12,1,8,1,14,255,16,128,8,3, + 4,2,2,3,10,1,12,1,8,1,10,1,2,254,2,243, + 2,240,255,128,114,59,0,0,0,99,2,0,0,0,0,0, + 0,0,0,0,0,0,2,0,0,0,3,0,0,0,67,0, + 0,0,115,16,0,0,0,116,0,124,0,124,1,24,0,131, + 1,100,1,107,1,83,0,41,2,78,114,5,0,0,0,41, + 1,218,3,97,98,115,41,2,90,2,116,49,90,2,116,50, + 114,9,0,0,0,114,9,0,0,0,114,10,0,0,0,218, + 9,95,101,113,95,109,116,105,109,101,115,2,0,0,115,4, + 0,0,0,16,2,255,128,114,153,0,0,0,99,5,0,0, + 0,0,0,0,0,0,0,0,0,14,0,0,0,6,0,0, + 0,67,0,0,0,115,254,0,0,0,124,3,124,2,100,1, + 156,2,125,5,116,0,160,1,124,4,124,3,124,5,161,3, + 125,6,124,6,100,2,64,0,100,3,107,3,125,7,124,7, + 114,63,124,6,100,4,64,0,100,3,107,3,125,8,116,2, + 106,3,100,5,107,3,114,62,124,8,115,38,116,2,106,3, + 100,6,107,2,114,62,116,4,124,0,124,2,131,2,125,9, + 124,9,100,0,117,1,114,62,116,2,160,5,116,0,106,6, + 124,9,161,2,125,10,116,0,160,7,124,4,124,10,124,3, + 124,5,161,4,1,0,110,40,116,8,124,0,124,2,131,2, + 92,2,125,11,125,12,124,11,114,103,116,9,116,10,124,4, + 100,7,100,8,133,2,25,0,131,1,124,11,131,2,114,93, + 116,10,124,4,100,8,100,9,133,2,25,0,131,1,124,12, + 107,3,114,103,116,11,160,12,100,10,124,3,155,2,157,2, + 161,1,1,0,100,0,83,0,116,13,160,14,124,4,100,9, + 100,0,133,2,25,0,161,1,125,13,116,15,124,13,116,16, + 131,2,115,125,116,17,100,11,124,1,155,2,100,12,157,3, + 131,1,130,1,124,13,83,0,41,13,78,41,2,114,47,0, + 0,0,114,13,0,0,0,114,5,0,0,0,114,0,0,0, + 0,114,93,0,0,0,90,5,110,101,118,101,114,90,6,97, + 108,119,97,121,115,114,105,0,0,0,114,100,0,0,0,114, + 101,0,0,0,122,22,98,121,116,101,99,111,100,101,32,105, + 115,32,115,116,97,108,101,32,102,111,114,32,122,16,99,111, + 109,112,105,108,101,100,32,109,111,100,117,108,101,32,122,21, + 32,105,115,32,110,111,116,32,97,32,99,111,100,101,32,111, + 98,106,101,99,116,41,18,114,21,0,0,0,90,13,95,99, + 108,97,115,115,105,102,121,95,112,121,99,218,4,95,105,109, + 112,90,21,99,104,101,99,107,95,104,97,115,104,95,98,97, + 115,101,100,95,112,121,99,115,218,15,95,103,101,116,95,112, + 121,99,95,115,111,117,114,99,101,218,11,115,111,117,114,99, + 101,95,104,97,115,104,90,17,95,82,65,87,95,77,65,71, + 73,67,95,78,85,77,66,69,82,90,18,95,118,97,108,105, + 100,97,116,101,95,104,97,115,104,95,112,121,99,218,29,95, + 103,101,116,95,109,116,105,109,101,95,97,110,100,95,115,105, + 122,101,95,111,102,95,115,111,117,114,99,101,114,153,0,0, + 0,114,2,0,0,0,114,48,0,0,0,114,81,0,0,0, + 218,7,109,97,114,115,104,97,108,90,5,108,111,97,100,115, + 114,15,0,0,0,218,10,95,99,111,100,101,95,116,121,112, + 101,218,9,84,121,112,101,69,114,114,111,114,41,14,114,32, + 0,0,0,114,60,0,0,0,114,69,0,0,0,114,41,0, + 0,0,114,132,0,0,0,90,11,101,120,99,95,100,101,116, + 97,105,108,115,114,135,0,0,0,90,10,104,97,115,104,95, + 98,97,115,101,100,90,12,99,104,101,99,107,95,115,111,117, + 114,99,101,90,12,115,111,117,114,99,101,95,98,121,116,101, + 115,114,156,0,0,0,90,12,115,111,117,114,99,101,95,109, + 116,105,109,101,90,11,115,111,117,114,99,101,95,115,105,122, + 101,114,53,0,0,0,114,9,0,0,0,114,9,0,0,0, + 114,10,0,0,0,218,15,95,117,110,109,97,114,115,104,97, + 108,95,99,111,100,101,123,2,0,0,115,74,0,0,0,2, + 2,2,1,6,254,14,5,12,2,4,1,12,1,10,1,2, + 1,2,255,8,1,2,255,10,2,8,1,4,1,4,1,2, + 1,4,254,4,5,8,1,4,255,2,128,8,4,6,255,4, + 3,22,3,18,1,2,255,4,2,8,1,4,255,4,2,18, + 2,10,1,16,1,4,1,255,128,114,161,0,0,0,99,1, + 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4, + 0,0,0,67,0,0,0,115,28,0,0,0,124,0,160,0, + 100,1,100,2,161,2,125,0,124,0,160,0,100,3,100,2, + 161,2,125,0,124,0,83,0,41,4,78,115,2,0,0,0, + 13,10,243,1,0,0,0,10,243,1,0,0,0,13,41,1, + 114,19,0,0,0,41,1,218,6,115,111,117,114,99,101,114, + 9,0,0,0,114,9,0,0,0,114,10,0,0,0,218,23, + 95,110,111,114,109,97,108,105,122,101,95,108,105,110,101,95, + 101,110,100,105,110,103,115,168,2,0,0,115,8,0,0,0, + 12,1,12,1,4,1,255,128,114,165,0,0,0,99,2,0, + 0,0,0,0,0,0,0,0,0,0,2,0,0,0,6,0, + 0,0,67,0,0,0,115,24,0,0,0,116,0,124,1,131, + 1,125,1,116,1,124,1,124,0,100,1,100,2,100,3,141, + 4,83,0,41,4,78,114,79,0,0,0,84,41,1,90,12, + 100,111,110,116,95,105,110,104,101,114,105,116,41,2,114,165, + 0,0,0,218,7,99,111,109,112,105,108,101,41,2,114,60, + 0,0,0,114,164,0,0,0,114,9,0,0,0,114,9,0, + 0,0,114,10,0,0,0,218,15,95,99,111,109,112,105,108, + 101,95,115,111,117,114,99,101,175,2,0,0,115,6,0,0, + 0,8,1,16,1,255,128,114,167,0,0,0,99,2,0,0, + 0,0,0,0,0,0,0,0,0,2,0,0,0,11,0,0, + 0,67,0,0,0,115,68,0,0,0,116,0,160,1,124,0, + 100,1,63,0,100,2,23,0,124,0,100,3,63,0,100,4, + 64,0,124,0,100,5,64,0,124,1,100,6,63,0,124,1, + 100,3,63,0,100,7,64,0,124,1,100,5,64,0,100,8, + 20,0,100,9,100,9,100,9,102,9,161,1,83,0,41,10, + 78,233,9,0,0,0,105,188,7,0,0,233,5,0,0,0, + 233,15,0,0,0,233,31,0,0,0,233,11,0,0,0,233, + 63,0,0,0,114,93,0,0,0,114,14,0,0,0,41,2, + 114,137,0,0,0,90,6,109,107,116,105,109,101,41,2,218, + 1,100,114,144,0,0,0,114,9,0,0,0,114,9,0,0, + 0,114,10,0,0,0,218,14,95,112,97,114,115,101,95,100, + 111,115,116,105,109,101,181,2,0,0,115,20,0,0,0,4, + 1,10,1,10,1,6,1,6,1,10,1,10,1,6,1,6, + 249,255,128,114,175,0,0,0,99,2,0,0,0,0,0,0, + 0,0,0,0,0,6,0,0,0,10,0,0,0,67,0,0, + 0,115,110,0,0,0,122,41,124,1,100,1,100,0,133,2, + 25,0,100,2,118,0,115,11,74,0,130,1,124,1,100,0, + 100,1,133,2,25,0,125,1,124,0,106,0,124,1,25,0, + 125,2,124,2,100,3,25,0,125,3,124,2,100,4,25,0, + 125,4,124,2,100,5,25,0,125,5,116,1,124,4,124,3, + 131,2,124,5,102,2,87,0,83,0,4,0,116,2,116,3, + 116,4,102,3,121,54,1,0,1,0,1,0,89,0,100,6, + 83,0,119,0,41,7,78,114,14,0,0,0,169,2,218,1, + 99,218,1,111,114,169,0,0,0,233,6,0,0,0,233,3, + 0,0,0,41,2,114,0,0,0,0,114,0,0,0,0,41, + 5,114,28,0,0,0,114,175,0,0,0,114,26,0,0,0, + 218,10,73,110,100,101,120,69,114,114,111,114,114,160,0,0, + 0,41,6,114,32,0,0,0,114,13,0,0,0,114,61,0, + 0,0,114,137,0,0,0,114,138,0,0,0,90,17,117,110, + 99,111,109,112,114,101,115,115,101,100,95,115,105,122,101,114, + 9,0,0,0,114,9,0,0,0,114,10,0,0,0,114,157, + 0,0,0,194,2,0,0,115,24,0,0,0,2,1,20,2, + 12,1,10,1,8,3,8,1,8,1,16,1,18,1,6,1, + 2,255,255,128,114,157,0,0,0,99,2,0,0,0,0,0, + 0,0,0,0,0,0,3,0,0,0,8,0,0,0,67,0, + 0,0,115,80,0,0,0,124,1,100,1,100,0,133,2,25, + 0,100,2,118,0,115,10,74,0,130,1,124,1,100,0,100, + 1,133,2,25,0,125,1,122,7,124,0,106,0,124,1,25, + 0,125,2,87,0,110,9,4,0,116,1,121,39,1,0,1, + 0,1,0,89,0,100,0,83,0,116,2,124,0,106,3,124, + 2,131,2,83,0,119,0,41,3,78,114,14,0,0,0,114, + 176,0,0,0,41,4,114,28,0,0,0,114,26,0,0,0, + 114,59,0,0,0,114,29,0,0,0,41,3,114,32,0,0, + 0,114,13,0,0,0,114,61,0,0,0,114,9,0,0,0, + 114,9,0,0,0,114,10,0,0,0,114,155,0,0,0,213, + 2,0,0,115,18,0,0,0,20,2,12,1,2,2,14,1, + 12,1,6,1,12,2,2,253,255,128,114,155,0,0,0,99, + 2,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0, + 11,0,0,0,67,0,0,0,115,14,1,0,0,116,0,124, + 0,124,1,131,2,125,2,100,0,125,3,116,1,68,0,93, + 100,92,3,125,4,125,5,125,6,124,2,124,4,23,0,125, + 7,116,2,106,3,100,1,124,0,106,4,116,5,124,7,100, + 2,100,3,141,5,1,0,122,7,124,0,106,6,124,7,25, + 0,125,8,87,0,110,8,4,0,116,7,121,134,1,0,1, + 0,1,0,89,0,113,9,124,8,100,4,25,0,125,9,116, + 8,124,0,106,4,124,8,131,2,125,10,100,0,125,11,124, + 5,114,89,122,10,116,9,124,0,124,9,124,7,124,1,124, + 10,131,5,125,11,87,0,110,24,4,0,116,10,121,133,1, + 0,125,12,1,0,122,8,124,12,125,3,87,0,89,0,100, + 0,125,12,126,12,110,9,100,0,125,12,126,12,119,1,116, + 11,124,9,124,10,131,2,125,11,124,11,100,0,117,0,114, + 99,113,9,124,8,100,4,25,0,125,9,124,11,124,6,124, + 9,102,3,2,0,1,0,83,0,124,3,114,124,100,5,124, + 3,155,0,157,2,125,13,116,12,124,13,124,1,100,6,141, + 2,124,3,130,2,116,12,100,7,124,1,155,2,157,2,124, + 1,100,6,141,2,130,1,119,0,119,0,41,8,78,122,13, + 116,114,121,105,110,103,32,123,125,123,125,123,125,114,93,0, + 0,0,41,1,90,9,118,101,114,98,111,115,105,116,121,114, + 0,0,0,0,122,20,109,111,100,117,108,101,32,108,111,97, + 100,32,102,97,105,108,101,100,58,32,114,65,0,0,0,114, + 64,0,0,0,41,13,114,39,0,0,0,114,95,0,0,0, + 114,48,0,0,0,114,81,0,0,0,114,29,0,0,0,114, + 20,0,0,0,114,28,0,0,0,114,26,0,0,0,114,59, + 0,0,0,114,161,0,0,0,114,80,0,0,0,114,167,0, + 0,0,114,3,0,0,0,41,14,114,32,0,0,0,114,41, + 0,0,0,114,13,0,0,0,90,12,105,109,112,111,114,116, + 95,101,114,114,111,114,114,96,0,0,0,114,97,0,0,0, + 114,54,0,0,0,114,69,0,0,0,114,61,0,0,0,114, + 43,0,0,0,114,132,0,0,0,114,53,0,0,0,90,3, + 101,120,99,114,82,0,0,0,114,9,0,0,0,114,9,0, + 0,0,114,10,0,0,0,114,51,0,0,0,228,2,0,0, + 115,60,0,0,0,10,1,4,1,14,1,8,1,22,1,2, + 1,14,1,12,1,4,1,8,2,12,1,4,1,4,1,2, + 1,20,1,14,1,16,1,8,128,10,2,8,1,2,3,8, + 1,14,1,4,2,10,1,14,1,18,2,2,241,2,247,255, + 128,114,51,0,0,0,41,46,114,91,0,0,0,90,26,95, + 102,114,111,122,101,110,95,105,109,112,111,114,116,108,105,98, + 95,101,120,116,101,114,110,97,108,114,21,0,0,0,114,1, + 0,0,0,114,2,0,0,0,90,17,95,102,114,111,122,101, + 110,95,105,109,112,111,114,116,108,105,98,114,48,0,0,0, + 114,154,0,0,0,114,116,0,0,0,114,158,0,0,0,114, + 72,0,0,0,114,137,0,0,0,114,35,0,0,0,90,7, + 95,95,97,108,108,95,95,114,20,0,0,0,90,15,112,97, + 116,104,95,115,101,112,97,114,97,116,111,114,115,114,18,0, + 0,0,114,80,0,0,0,114,3,0,0,0,114,25,0,0, + 0,218,4,116,121,112,101,114,75,0,0,0,114,119,0,0, + 0,114,121,0,0,0,114,123,0,0,0,90,13,95,76,111, + 97,100,101,114,66,97,115,105,99,115,114,4,0,0,0,114, + 95,0,0,0,114,39,0,0,0,114,40,0,0,0,114,38, + 0,0,0,114,27,0,0,0,114,128,0,0,0,114,148,0, + 0,0,114,150,0,0,0,114,59,0,0,0,114,153,0,0, + 0,114,161,0,0,0,218,8,95,95,99,111,100,101,95,95, + 114,159,0,0,0,114,165,0,0,0,114,167,0,0,0,114, + 175,0,0,0,114,157,0,0,0,114,155,0,0,0,114,51, + 0,0,0,114,9,0,0,0,114,9,0,0,0,114,9,0, + 0,0,114,10,0,0,0,218,8,60,109,111,100,117,108,101, + 62,1,0,0,0,115,92,0,0,0,4,0,8,16,16,1, + 8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,2, + 6,3,14,1,16,3,4,4,8,2,4,2,4,1,4,1, + 18,2,0,127,0,127,12,50,12,1,2,1,2,1,4,252, + 8,9,8,4,8,9,8,31,2,126,2,254,4,29,8,5, + 8,21,8,46,8,8,10,40,8,5,8,7,8,6,8,13, + 8,19,12,15,255,128, }; From a6a5c91b1ee56fa5ba7ab8c5aeca70c31cc85fd3 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 16 Apr 2021 11:26:06 +0200 Subject: [PATCH 071/108] bpo-40443: Remove unused imports (GH-25429) * pyclbr no longer uses copy * typing no longer uses ast Issue discovered by pyflakes. --- Lib/pyclbr.py | 1 - Lib/typing.py | 1 - .../next/Library/2021-04-16-02-03-00.bpo-40443.Io6FHL.rst | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-16-02-03-00.bpo-40443.Io6FHL.rst diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py index ebcc23c29da215..37f86995d6ce00 100644 --- a/Lib/pyclbr.py +++ b/Lib/pyclbr.py @@ -42,7 +42,6 @@ """ import ast -import copy import sys import importlib.util diff --git a/Lib/typing.py b/Lib/typing.py index dc2a7a478835db..ea66cf50a078f1 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -20,7 +20,6 @@ """ from abc import abstractmethod, ABCMeta -import ast import collections import collections.abc import contextlib diff --git a/Misc/NEWS.d/next/Library/2021-04-16-02-03-00.bpo-40443.Io6FHL.rst b/Misc/NEWS.d/next/Library/2021-04-16-02-03-00.bpo-40443.Io6FHL.rst new file mode 100644 index 00000000000000..f5672e6bd7bf57 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-16-02-03-00.bpo-40443.Io6FHL.rst @@ -0,0 +1,2 @@ +Remove unused imports: pyclbr no longer uses copy, and typing no longer uses +ast. Patch by Victor Stinner. From 69ca32e0d34fe17dd242592b6f8754cda7bae684 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 16 Apr 2021 11:26:40 +0200 Subject: [PATCH 072/108] bpo-41282: Fix distutils.utils.byte_compile() DeprecationWarning (GH-25406) * byte_compile() of distutils.utils no longer logs a DeprecationWarning * test_distutils no longer logs a DeprecationWarning --- Lib/distutils/__init__.py | 7 ++++--- Lib/distutils/util.py | 3 +++ Lib/test/test_distutils.py | 14 ++++++++++---- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Lib/distutils/__init__.py b/Lib/distutils/__init__.py index 8eef902f7d6204..fdad6f65a78562 100644 --- a/Lib/distutils/__init__.py +++ b/Lib/distutils/__init__.py @@ -13,7 +13,8 @@ __version__ = sys.version[:sys.version.index(' ')] -warnings.warn("The distutils package is deprecated and slated for " - "removal in Python 3.12. Use setuptools or check " - "PEP 632 for potential alternatives", +_DEPRECATION_MESSAGE = ("The distutils package is deprecated and slated for " + "removal in Python 3.12. Use setuptools or check " + "PEP 632 for potential alternatives") +warnings.warn(_DEPRECATION_MESSAGE, DeprecationWarning, 2) diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 4b002ecef1df8f..2ce5c5b64d62fa 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -9,6 +9,7 @@ import importlib.util import string import sys +import distutils from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn @@ -419,8 +420,10 @@ def byte_compile (py_files, direct=1) """ % (optimize, force, prefix, base_dir, verbose)) + msg = distutils._DEPRECATION_MESSAGE cmd = [sys.executable] cmd.extend(subprocess._optim_args_from_interpreter_flags()) + cmd.append(f'-Wignore:{msg}:DeprecationWarning') cmd.append(script_name) spawn(cmd, dry_run=dry_run) execute(os.remove, (script_name,), "removing %s" % script_name, diff --git a/Lib/test/test_distutils.py b/Lib/test/test_distutils.py index a37f11791754d2..de94da54798ce3 100644 --- a/Lib/test/test_distutils.py +++ b/Lib/test/test_distutils.py @@ -5,14 +5,20 @@ be run. """ -import distutils.tests -import test.support +import warnings +from test import support +from test.support import warnings_helper + +with warnings_helper.check_warnings( + ("The distutils package is deprecated", DeprecationWarning)): + + import distutils.tests def test_main(): # used by regrtest - test.support.run_unittest(distutils.tests.test_suite()) - test.support.reap_children() + support.run_unittest(distutils.tests.test_suite()) + support.reap_children() def load_tests(*_): From 471870fc504b0d69c767b188f180b17248be6998 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 16 Apr 2021 11:27:00 +0200 Subject: [PATCH 073/108] bpo-43844: Fix PendingDeprecationWarning in test_lib2to3 (GH-25407) --- Lib/lib2to3/tests/test_parser.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py index d5db66b9b1e7b9..1aba0e88945a40 100644 --- a/Lib/lib2to3/tests/test_parser.py +++ b/Lib/lib2to3/tests/test_parser.py @@ -84,12 +84,16 @@ def test_load_grammar_from_subprocess(self): # different hash randomization seed. sub_env = dict(os.environ) sub_env['PYTHONHASHSEED'] = 'random' - subprocess.check_call( - [sys.executable, '-c', """ + code = """ from lib2to3.pgen2 import driver as pgen2_driver pgen2_driver.load_grammar(%r, save=True, force=True) - """ % (grammar_sub_copy,)], - env=sub_env) + """ % (grammar_sub_copy,) + msg = ("lib2to3 package is deprecated and may not be able " + "to parse Python 3.10+") + cmd = [sys.executable, + f'-Wignore:{msg}:PendingDeprecationWarning', + '-c', code] + subprocess.check_call( cmd, env=sub_env) self.assertTrue(os.path.exists(pickle_sub_name)) with open(pickle_name, 'rb') as pickle_f_1, \ From 75ec103b3adbb7c619a0e22fa60f3d34c5a9e603 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 16 Apr 2021 14:32:01 +0200 Subject: [PATCH 074/108] bpo-43842: Fix race condition in test_logging SMTP test (GH-25436) Fix a race condition in the SMTP test of test_logging. Don't close a file descriptor (socket) from a different thread while asyncore.loop() is polling the file descriptor. --- Lib/test/test_logging.py | 7 +++++-- .../next/Tests/2021-04-16-14-07-40.bpo-43842.w60GAH.rst | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2021-04-16-14-07-40.bpo-43842.w60GAH.rst diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 6179e28759cceb..bb31e29ca76911 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -829,6 +829,7 @@ def __init__(self, addr, handler, poll_interval, sockmap): self.port = self.socket.getsockname()[1] self._handler = handler self._thread = None + self._quit = False self.poll_interval = poll_interval def process_message(self, peer, mailfrom, rcpttos, data): @@ -860,16 +861,18 @@ def serve_forever(self, poll_interval): :func:`select` or :func:`poll` call by :func:`asyncore.loop`. """ - asyncore.loop(poll_interval, map=self._map) + while not self._quit: + asyncore.loop(poll_interval, map=self._map, count=1) def stop(self): """ Stop the thread by closing the server instance. Wait for the server thread to terminate. """ - self.close() + self._quit = True threading_helper.join_thread(self._thread) self._thread = None + self.close() asyncore.close_all(map=self._map, ignore_all=True) diff --git a/Misc/NEWS.d/next/Tests/2021-04-16-14-07-40.bpo-43842.w60GAH.rst b/Misc/NEWS.d/next/Tests/2021-04-16-14-07-40.bpo-43842.w60GAH.rst new file mode 100644 index 00000000000000..5b4a120eb86371 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-04-16-14-07-40.bpo-43842.w60GAH.rst @@ -0,0 +1,4 @@ +Fix a race condition in the SMTP test of test_logging. Don't close a file +descriptor (socket) from a different thread while asyncore.loop() is polling +the file descriptor. +Patch by Victor Stinner. From b136b1aac4b7d07e3120ee59e41c02bc86032162 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 16 Apr 2021 14:33:10 +0200 Subject: [PATCH 075/108] bpo-43843: libregrtest uses threading.excepthook (GH-25400) test.libregrtest now marks a test as ENV_CHANGED (altered the execution environment) if a thread raises an exception but does not catch it. It sets a hook on threading.excepthook. Use --fail-env-changed option to mark the test as failed. libregrtest regrtest_unraisable_hook() explicitly flushs sys.stdout, sys.stderr and sys.__stderr__. --- Lib/test/libregrtest/setup.py | 4 ++- Lib/test/libregrtest/utils.py | 33 +++++++++++++++++++ Lib/test/test_regrtest.py | 33 ++++++++++++++++++- Lib/test/test_socketserver.py | 7 ++-- Lib/test/test_threading.py | 13 ++++++++ .../2021-04-14-13-22-44.bpo-43843.ruIQKD.rst | 5 +++ 6 files changed, 91 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2021-04-14-13-22-44.bpo-43843.ruIQKD.rst diff --git a/Lib/test/libregrtest/setup.py b/Lib/test/libregrtest/setup.py index 715d4b96cf91d4..83ce2f73f4e5a6 100644 --- a/Lib/test/libregrtest/setup.py +++ b/Lib/test/libregrtest/setup.py @@ -10,7 +10,8 @@ except ImportError: gc = None -from test.libregrtest.utils import setup_unraisable_hook +from test.libregrtest.utils import (setup_unraisable_hook, + setup_threading_excepthook) def setup_tests(ns): @@ -81,6 +82,7 @@ def _test_audit_hook(name, args): sys.addaudithook(_test_audit_hook) setup_unraisable_hook() + setup_threading_excepthook() if ns.timeout is not None: # For a slow buildbot worker, increase SHORT_TIMEOUT and LONG_TIMEOUT diff --git a/Lib/test/libregrtest/utils.py b/Lib/test/libregrtest/utils.py index 13efdb45818b7d..89d7e7e5354054 100644 --- a/Lib/test/libregrtest/utils.py +++ b/Lib/test/libregrtest/utils.py @@ -68,14 +68,23 @@ def print_warning(msg): orig_unraisablehook = None +def flush_std_streams(): + if sys.stdout is not None: + sys.stdout.flush() + if sys.stderr is not None: + sys.stderr.flush() + + def regrtest_unraisable_hook(unraisable): global orig_unraisablehook support.environment_altered = True print_warning("Unraisable exception") old_stderr = sys.stderr try: + flush_std_streams() sys.stderr = sys.__stderr__ orig_unraisablehook(unraisable) + sys.stderr.flush() finally: sys.stderr = old_stderr @@ -86,6 +95,30 @@ def setup_unraisable_hook(): sys.unraisablehook = regrtest_unraisable_hook +orig_threading_excepthook = None + + +def regrtest_threading_excepthook(args): + global orig_threading_excepthook + support.environment_altered = True + print_warning(f"Uncaught thread exception: {args.exc_type.__name__}") + old_stderr = sys.stderr + try: + flush_std_streams() + sys.stderr = sys.__stderr__ + orig_threading_excepthook(args) + sys.stderr.flush() + finally: + sys.stderr = old_stderr + + +def setup_threading_excepthook(): + global orig_threading_excepthook + import threading + orig_threading_excepthook = threading.excepthook + threading.excepthook = regrtest_threading_excepthook + + def clear_caches(): # Clear the warnings registry, so they can be displayed again for mod in sys.modules.values(): diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 38321e04b54a9e..054776ccf4808a 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -1236,7 +1236,7 @@ def test_sleep(self): def test_unraisable_exc(self): # --fail-env-changed must catch unraisable exception. - # The exceptioin must be displayed even if sys.stderr is redirected. + # The exception must be displayed even if sys.stderr is redirected. code = textwrap.dedent(r""" import unittest import weakref @@ -1267,6 +1267,37 @@ def test_unraisable_exc(self): self.assertIn("Warning -- Unraisable exception", output) self.assertIn("Exception: weakref callback bug", output) + def test_threading_excepthook(self): + # --fail-env-changed must catch uncaught thread exception. + # The exception must be displayed even if sys.stderr is redirected. + code = textwrap.dedent(r""" + import threading + import unittest + from test.support import captured_stderr + + class MyObject: + pass + + def func_bug(): + raise Exception("bug in thread") + + class Tests(unittest.TestCase): + def test_threading_excepthook(self): + with captured_stderr() as stderr: + thread = threading.Thread(target=func_bug) + thread.start() + thread.join() + self.assertEqual(stderr.getvalue(), '') + """) + testname = self.create_test(code=code) + + output = self.run_tests("--fail-env-changed", "-v", testname, exitcode=3) + self.check_executed_tests(output, [testname], + env_changed=[testname], + fail_env_changed=True) + self.assertIn("Warning -- Uncaught thread exception", output) + self.assertIn("Exception: bug in thread", output) + def test_cleanup(self): dirname = os.path.join(self.tmptestdir, "test_python_123") os.mkdir(dirname) diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 954e0331352fb5..211321f37617e9 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -323,8 +323,11 @@ def test_threading_handled(self): self.check_result(handled=True) def test_threading_not_handled(self): - ThreadingErrorTestServer(SystemExit) - self.check_result(handled=False) + with threading_helper.catch_threading_exception() as cm: + ThreadingErrorTestServer(SystemExit) + self.check_result(handled=False) + + self.assertIs(cm.exc_type, SystemExit) @requires_forking def test_forking_handled(self): diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 49a4af8365afce..f44f17f2978f7b 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -32,6 +32,11 @@ platforms_to_skip = ('netbsd5', 'hp-ux11') +def restore_default_excepthook(testcase): + testcase.addCleanup(setattr, threading, 'excepthook', threading.excepthook) + threading.excepthook = threading.__excepthook__ + + # A trivial mutable counter. class Counter(object): def __init__(self): @@ -427,6 +432,8 @@ def _run(self, other_ref, yet_another): if self.should_raise: raise SystemExit + restore_default_excepthook(self) + cyclic_object = RunSelfFunction(should_raise=False) weak_cyclic_object = weakref.ref(cyclic_object) cyclic_object.thread.join() @@ -1331,6 +1338,10 @@ def run(self): class ExceptHookTests(BaseTestCase): + def setUp(self): + restore_default_excepthook(self) + super().setUp() + def test_excepthook(self): with support.captured_output("stderr") as stderr: thread = ThreadRunFail(name="excepthook thread") @@ -1501,6 +1512,8 @@ class BarrierTests(lock_tests.BarrierTests): class MiscTestCase(unittest.TestCase): def test__all__(self): + restore_default_excepthook(self) + extra = {"ThreadError"} not_exported = {'currentThread', 'activeCount'} support.check__all__(self, threading, ('threading', '_thread'), diff --git a/Misc/NEWS.d/next/Tests/2021-04-14-13-22-44.bpo-43843.ruIQKD.rst b/Misc/NEWS.d/next/Tests/2021-04-14-13-22-44.bpo-43843.ruIQKD.rst new file mode 100644 index 00000000000000..d1085ec2395b80 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-04-14-13-22-44.bpo-43843.ruIQKD.rst @@ -0,0 +1,5 @@ +:mod:`test.libregrtest` now marks a test as ENV_CHANGED (altered the execution +environment) if a thread raises an exception but does not catch it. It sets a +hook on :func:`threading.excepthook`. Use ``--fail-env-changed`` option to mark +the test as failed. +Patch by Victor Stinner. From 3b82cae774638ecf2baaee8fe2cac8fedafb2ca7 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Fri, 16 Apr 2021 16:38:55 +0100 Subject: [PATCH 076/108] bpo-38530: Properly extend UnboundLocalError from NameError (GH-25444) --- Objects/exceptions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 9916ce88549ed7..4a2fc27a8740c8 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -1393,7 +1393,8 @@ ComplexExtendsException(PyExc_Exception, NameError, /* * UnboundLocalError extends NameError */ -SimpleExtendsException(PyExc_NameError, UnboundLocalError, + +MiddlingExtendsException(PyExc_NameError, UnboundLocalError, NameError, "Local name referenced but not bound to a value."); /* From 0ad81d4db2f409d72f469d0b74ab597be772a68e Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Fri, 16 Apr 2021 17:12:03 +0100 Subject: [PATCH 077/108] bpo-38530: Match exactly AttributeError and NameError when offering suggestions (GH-25443) --- Lib/test/test_exceptions.py | 15 +++++++++++++++ Python/suggestions.c | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index ebeb67b4512822..bd20b232e541fe 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1537,6 +1537,21 @@ def f(): self.assertNotIn("blech", err.getvalue()) + def test_unbound_local_error_doesn_not_match(self): + def foo(): + something = 3 + print(somethong) + somethong = 3 + + try: + foo() + except UnboundLocalError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("something", err.getvalue()) + + class AttributeErrorTests(unittest.TestCase): def test_attributes(self): # Setting 'attr' should not be a problem. diff --git a/Python/suggestions.c b/Python/suggestions.c index 258e3f1833e6b5..e4227609207390 100644 --- a/Python/suggestions.c +++ b/Python/suggestions.c @@ -181,9 +181,9 @@ offer_suggestions_for_name_error(PyNameErrorObject *exc) { PyObject *_Py_Offer_Suggestions(PyObject *exception) { PyObject *result = NULL; assert(!PyErr_Occurred()); - if (PyErr_GivenExceptionMatches(exception, PyExc_AttributeError)) { + if (Py_IS_TYPE(exception, (PyTypeObject*)PyExc_AttributeError)) { result = offer_suggestions_for_attribute_error((PyAttributeErrorObject *) exception); - } else if (PyErr_GivenExceptionMatches(exception, PyExc_NameError)) { + } else if (Py_IS_TYPE(exception, (PyTypeObject*)PyExc_NameError)) { result = offer_suggestions_for_name_error((PyNameErrorObject *) exception); } return result; From 62ec63864822de1dd1933225584e8503ac40c1f9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 16 Apr 2021 19:12:14 +0200 Subject: [PATCH 078/108] bpo-43862: Enhance -W cmdline option documentation (GH-25439) The -W format is "action:message:category:module:lineno". Update also the Python manual page. --- Doc/c-api/init_config.rst | 7 +++ Doc/tools/susp-ignored.csv | 6 +- Doc/using/cmdline.rst | 63 ++++++++++++-------- Misc/python.man | 117 +++++++++++++++++++------------------ 4 files changed, 113 insertions(+), 80 deletions(-) diff --git a/Doc/c-api/init_config.rst b/Doc/c-api/init_config.rst index 5e9296a5470d44..325e60706167e4 100644 --- a/Doc/c-api/init_config.rst +++ b/Doc/c-api/init_config.rst @@ -1135,6 +1135,13 @@ PyConfig item of :data:`warnings.filters` which is checked first (highest priority). + The :option:`-W` command line options adds its value to + :c:member:`~PyConfig.warnoptions`, it can be used multiple times. + + The :envvar:`PYTHONWARNINGS` environment variable can also be used to add + warning options. Multiple options can be specified, separated by commas + (``,``). + Default: empty list. .. c:member:: int write_bytecode diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv index a3ee3326d255d8..b9e10678d46486 100644 --- a/Doc/tools/susp-ignored.csv +++ b/Doc/tools/susp-ignored.csv @@ -279,7 +279,11 @@ tutorial/stdlib2,,:start,"fields = struct.unpack(' Date: Fri, 16 Apr 2021 19:42:34 +0200 Subject: [PATCH 079/108] bpo-43867: multiprocessing Server catchs SystemExit (GH-25441) The multiprocessing Server class now explicitly catchs SystemExit and closes the client connection in this case. It happens when the Server.serve_client() method reachs the end of file (EOF). --- Lib/multiprocessing/managers.py | 20 +++++++++++++------ .../2021-04-16-16-46-44.bpo-43867.xT9QjF.rst | 3 +++ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-16-16-46-44.bpo-43867.xT9QjF.rst diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py index 0eb16c664cfab3..6ee9521c76b48f 100644 --- a/Lib/multiprocessing/managers.py +++ b/Lib/multiprocessing/managers.py @@ -192,11 +192,8 @@ def accepter(self): t.daemon = True t.start() - def handle_request(self, c): - ''' - Handle a new connection - ''' - funcname = result = request = None + def _handle_request(self, c): + request = None try: connection.deliver_challenge(c, self.authkey) connection.answer_challenge(c, self.authkey) @@ -213,6 +210,7 @@ def handle_request(self, c): msg = ('#TRACEBACK', format_exc()) else: msg = ('#RETURN', result) + try: c.send(msg) except Exception as e: @@ -224,7 +222,17 @@ def handle_request(self, c): util.info(' ... request was %r', request) util.info(' ... exception was %r', e) - c.close() + def handle_request(self, conn): + ''' + Handle a new connection + ''' + try: + self._handle_request(conn) + except SystemExit: + # Server.serve_client() calls sys.exit(0) on EOF + pass + finally: + conn.close() def serve_client(self, conn): ''' diff --git a/Misc/NEWS.d/next/Library/2021-04-16-16-46-44.bpo-43867.xT9QjF.rst b/Misc/NEWS.d/next/Library/2021-04-16-16-46-44.bpo-43867.xT9QjF.rst new file mode 100644 index 00000000000000..1ec914e5ee9d03 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-16-16-46-44.bpo-43867.xT9QjF.rst @@ -0,0 +1,3 @@ +The :mod:`multiprocessing` ``Server`` class now explicitly catchs +:exc:`SystemExit` and closes the client connection in this case. It happens +when the ``Server.serve_client()`` method reachs the end of file (EOF). From adf24bd835ed8f76dcc51aa98c8c54275e86965b Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Fri, 16 Apr 2021 17:13:38 -0600 Subject: [PATCH 080/108] bpo-43856: Add a versionadded directive to the importlib.metadata docs (GH-25445) Use a versionadded directive to generate the text "New in version 3.8." (to match with the documentation of other modules). Automerge-Triggered-By: GH:jaraco --- Doc/library/importlib.metadata.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index 3cd200b7119923..0f0a8dd91eea1e 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -7,6 +7,8 @@ .. module:: importlib.metadata :synopsis: The implementation of the importlib metadata. +.. versionadded:: 3.8 + **Source code:** :source:`Lib/importlib/metadata.py` .. note:: From cfaa2d338bd72af63a35a424515b47a183cefc14 Mon Sep 17 00:00:00 2001 From: Ikko Ashimine Date: Sat, 17 Apr 2021 15:32:53 +0900 Subject: [PATCH 081/108] Fix typo in exceptions.rst (GH-25434) attemps -> attempts --- Doc/c-api/exceptions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 158672d86b325d..21c508dc30ae22 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -512,7 +512,7 @@ Signal Handling and if so, invokes the corresponding signal handler. If the :mod:`signal` module is supported, this can invoke a signal handler written in Python. - The function attemps to handle all pending signals, and then returns ``0``. + The function attempts to handle all pending signals, and then returns ``0``. However, if a Python signal handler raises an exception, the error indicator is set and the function returns ``-1`` immediately (such that other pending signals may not have been handled yet: they will be on the From b467d9a24011992242c95d9157d3455f8a84466b Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 17 Apr 2021 10:07:19 +0200 Subject: [PATCH 082/108] bpo-43522: Fix SSLContext.hostname_checks_common_name (GH-24899) Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. Signed-off-by: Christian Heimes --- Doc/library/ssl.rst | 5 + Lib/test/allsans.pem | 243 ++++++++++++------ Lib/test/capath/b1930218.0 | 40 +-- Lib/test/capath/ceff1710.0 | 40 +-- Lib/test/idnsans.pem | 232 ++++++++--------- Lib/test/keycert2.pem | 124 ++++----- Lib/test/keycert3.pem | 224 ++++++++-------- Lib/test/keycert4.pem | 224 ++++++++-------- Lib/test/keycertecc.pem | 106 ++++---- Lib/test/make_ssl_certs.py | 58 ++++- Lib/test/nosan.pem | 130 ++++++++++ Lib/test/pycacert.pem | 146 +++++------ Lib/test/pycakey.pem | 76 +++--- Lib/test/revocation.crl | 20 +- Lib/test/test_asyncio/utils.py | 2 +- Lib/test/test_ssl.py | 30 ++- .../2021-03-16-22-37-32.bpo-43522.dhNwOu.rst | 1 + Modules/_ssl.c | 5 + 18 files changed, 997 insertions(+), 709 deletions(-) create mode 100644 Lib/test/nosan.pem create mode 100644 Misc/NEWS.d/next/Library/2021-03-16-22-37-32.bpo-43522.dhNwOu.rst diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 587d3b3ac9f616..f7bdd56d2b31f3 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -2047,6 +2047,11 @@ to speed up repeated connections from the same clients. .. versionadded:: 3.7 + .. versionchanged:: 3.10 + + The flag had no effect with OpenSSL before version 1.1.1k. Python 3.8.9, + 3.9.3, and 3.10 include workarounds for previous versions. + .. attribute:: SSLContext.security_level An integer representing the `security level diff --git a/Lib/test/allsans.pem b/Lib/test/allsans.pem index 6eebde7a57f15a..e400e178a1f599 100644 --- a/Lib/test/allsans.pem +++ b/Lib/test/allsans.pem @@ -1,81 +1,170 @@ -----BEGIN PRIVATE KEY----- -MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQCg/pM6dP7BTFNc -qe6wIJIBB7HjwL42bp0vjcCVl4Z3MRWFswYpfxy+o+8+PguMp4K6zndA5fwNkK/H -3HmtanncUfPqnV0usN0NHQGh/f9xRoNmB1q2L7kTuO99o0KLQgvonRT2snf8rq9n -tPRzhHUGYhog7zzNxetYV309PHpPr19BcKepDtM5RMk2aBnoN5vtItorjXiDosFm -6o5wQHrcupcVydszba6P75BEbc1XIWvq2Fv8muaw4pCe81QYINyLqgcPNO/nF3Os -5EI4HKjCNRSCOhOcWqYctXLXN9lBdMBBvQc3zDmYzh1eIZewzZXPVEQT33xPkhxz -HNmhcIctpWX4LTRF6FulkcbeuZDga3gkZYJf/M6IpU1WYXr6q8sNxbgmRRX/NuHo -V9oDwBzLG07rKUiqRHfjGqoCRmmVeVYpryvXUNjHGH0nlVzz/8lTUxAnJorO3Fdc -I+6zKLUPICdAlvz51AH6yopgPFhrdgA0pVzPO6L5G8SRQCxKhAUCAwEAAQKCAYAa -2jtOTcNMFGH3G7TfFZ+kolbuaPCQ/aQkEV2k1dAswzgWw8RsWXI+7fLyi8C7Zhks -9VD4tyNyU8at7D0zSoYm1Fh9sl+fcQp9rG/gSBA6IYu7EdD0gEM7YeY4K2nm9k4s -Lz8W4q+WqsBA6PK47cfjF6vKAH1AyRk28+jEtPiln9egf5zHWtyqOanh9D0V+Wh9 -hgmjqAYI1rWxZ7/4Qxj7Bfg7Px7blhi+kzOZ5kKQnNd2JT46hM+jgzah/G3zVE+R -FFW6ksmJgZ+dCuSbE7HEJmKms1CWq/1Cll0A3uy4JTDZOrK4KcZQ9UjjWJWvlXQm -uNXSSAp1k287DLVUm9c22SDeXpb9PyKmzyvJvVmMqqBx6QzHZ/L7WPzpUWAoLcU+ -ZHT7vggDymkIO+fcRbUzv8s5R7RnLbcBga51/5OCUvAWDoJXNw0qwYZOIbfTnQgs -8xbCmbMzllyYM/dK3GxQAwfn8Hzk+DbS/NObMjHLCWLfYeUvutXJSNly6Ny+ZcEC -gcEAzo5Y1UFOfBX4MZLIZ69LfgaXj9URobMwqlEwKil8pWQMa951ga3moLt91nOe -SAQz3meFTBX/VAb2ZHLeIf3FoNkiIx48PkxsR/hhLHpvl26zEg3yXs3tv0IFBx2R -EEnLNpQaAQFR9S1yDOaG2rsb17ZDKyp9isDpAENHAmEnT/XJn+Dc0SOH1EVDjUeM -JqToAF/fjIx/RF4oUJCAgOPBMlRy5ywLQk8uDi6ft0NCzzCi0eCuk1Ty3KzWFGwx -7cYRAoHBAMeIPCzHG3No4JGUFunslVwo5TuC7maO6qYKbq0OyvwWfL4b7gjrMBR9 -d5WyZlp/Vf40O463dg8x8qPNOFWp49f3hxTvvfnt2/m3+CQuDOLfqBbHufZApP1J -U9MubUNnDFHHeJ9l0tg2nhiLw24GHeMARZhA/BimMQPY0OpZPpLVxAUArM2EB7hI -glQpYCtdXhqwl1pl0u3TZ08y3BXYNg9BycdpGRMWSsAwsApJRgNuI/dfDKu0uMYF -/pUhXVPatQKBwGgLpAun3dT7bA3sli5ESo6s22OEPGFrVbQ1OUHDrBnTj742TJKJ -+oY0a2q+ypgUJdx94NM2sWquJybqBaKxpf8j4OI3tLjc3h5SqwAwnE13YZRSmifP -K1cP9mBjMFM4GLjhWUfwVkxeG/kLlhpP7fJ2yNbRjHN8QOH1AavdLGRGts1mA1UF -xMHUMfbUd3Bv2L13ja/KhcD2fPA4GcLS9tpXV5nCwdkg8V4LdkBmDR04rotx1f44 -6Czokt2usmfHQQKBwFkufxbUd2SB/72Rnxw27hse/DY5My0Lu70y9HzNG9TIiEDA -YwgBdp/x5D04W58fQuQ3nFcRkOcBwB2OYBuJr5ibvfiRnyvSMHvQykwBeSj+Jjbo -VinGgvfiimDdY2C48jyrFzLHZBHXd5oo/dRzT3Bicri2cvbhcQ7zHY1hDiK7AL3r -q1DALmMjpXzQcXdwZ9suCrgQwtIhpw8zAEOTO7ZeBT3nr5lkYUy9djFixrRJyjGK -fjNQtzVrAHrPStNr8QKBwQDCC0zhsCnTv4sAJmW7LL6Ayd5rbWhUZ6px1xY0yHMA -hehj+xbaiC6cfVr5Rg0ncvaa8AExu4kXpVsupTyNwvC4NgzLHtfBw6WUdOnd1awE -kSrDtDReBt2wByAcQwttQsrJ1/Pt6zcNJJI4Z9s8G4NTcQWJwUhU20N55JQKR//l -OQJqhq9NVhte/ctDjVwOHs/OhDNvxsAWxdjnf/O2up0os+M2bFkmHuaVW0vQbqTQ -mw7Vbzk2Ff5oT6E3kbC8Ur4= +MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQDBGvj+Uy/VUyTR +mmIA1UEENThh0+pWODcvvUlkeIo+XTJ3FhF4/RVjImDHjozl28Xf2TzKnvQJa1KC +pqa7fr8cL9QMwk4pH+S4ulxOu02Bl3Yafx2oJVUML37vciJg+zkzPx1k3tXFjXkr +LGjZwOoufBC3AmPuq2xHFBzHrvp5/DIRH2slQFM9fpVZzN77gYyzxba0wCfCPpCf +eJFRyYKW8c7MXrwnM82YtE7Rlnf227EkCdMNaSeZLUIxeVpcnScqZl0SIbR3YEiV +0LPFkx0wJFm8qUEFU/h+0jamgy/ON+11nqmMlp3BjNi/JTVsa7N7A3dvdHC7VVlr +WnUgU6MoSniyL6ijpucyHtZzK2mJy0sHR8PadHKow0O423/5N8GKTSOvaGMXTjAe +OGs+9/P1ZYo3IjjQPz/NV3QlhK8zRqxF3cW0ekHHkT+/jZjCvSKm6mdbMQunKE1W ++dokAc815pb48Mzf1eWKd/7UyUf7CXussyAaJ3clpaK1sbbn9m0CAwEAAQKCAYAe +BaCCgdJk+xk1USg9cuo5ykBqzTSYlQLXdDlN2oO7sGehJhgvVEGX+QdM3ze+oM2B +wNd3tQDB2iKo11oCunDh4/m2xhq6wA+iPK8POoWRSUf+VJb6xlsTmurENV1s8IHz +GrPqM87OePFGqg/fEuQVuAotObzppVMfNdxHm0er4W6zRMw2rWqDnAOCQ5zDQ1/p +ryp5rYpA49M+R9NoAMlByHRbR7s+6Qnk3NuIMDmUcpF2xeQ/KIMUiHnLEU/gKDpi +bsk+VtyjlibR4zhh9/cJrLTApAIA+4eC176EJvKXCh5UIjd92JC7741HTNQXJpvG +9PXbzhyUCmncr04U+46snGHdwD+lG4LS7oBGACTLMtpcMrlgAm6XCg4T8gRVE/9n +FvCkqPHBR+vnhOxm+0x0yUY/DstJby6IPYPsfGK/s2n//j/vJrAZE1Pxlm9EPU13 +MRLcHstwjAc/NXRPnUN1DfcQvPLx6Tt6rqw3Wm1KO75kM+HZ56BX9/Bi1TgkiI0C +gcEA5JTlXssJ3W8Cz6w1ZtGsThHQBDbvHF2D5AdqO7y6/eqzCQgBQl9BTfXOzsvP +I1gf2CLEFBtGK09UjAuJQg90/NlKur7i7xt7HpAzEfGsDAL4P5BW5JnMNrzpJjjL +0uUDsPJlA75Wi29N2SFiaIslY0sZ6nckInat5GRe4O1AMSHoJ5suY9yTZTU3XB4O +A+XyddutI1GsFZgl8/8LyyNMcyNjxG3T5sr7IKf5/nIv6oMDjC2zLVZa8QS/MEnL +Kaa7AoHBANhEsxfcjw2MaPkrsqAsOP0dDf7g2rdz6wKT5BzZu9e+/E76NmvVDpns +e+kCjql9Os3/wonOMINvn1bTCQGTgk8+dw1fMyqg+zQCvH4ImcE6LSqhzblVHsIB +zZ7rW86trri1U9+olNHG4nwkus0i4LV8eeORns+j8DgXr6/eOvjX3ZW5TyU7/Qgm +SiSdBapzJbom3xJrbo9KQsrN5PVCOwuwrgY0o+2BeKyKhnt4uGv0bR+ii06EOJUA +WvjD7gLI9wKBwGVRXk3jH29IOm3EvjLh80bzfEmx89CV3tUfOEZcRGIyOsNhCfXa +dP7SWqWtDxZyhELwPgtPf43I7wfYQTHH2ioNQqN94ubrPmpwrkJg5cq5MkIyf2F6 +jlsg5xMrD6VeH4G6H25GWuQZJN9+fbkrHBpj+ovD3X9tLWzT1H5Miyx8BAQyM6DN +74Nn0C8Dn2C49vyor5i9JdK4ivIY9ahH8CYE5L73k3p0NFXoPtY61ORUyCjFROtu +oIa+fOQxgVzn6wKBwQC3DD7BnY7/Gq7m51ODOqrpoaPs7Qhyagyp298hhDD3hNEt +T56sWmLHaV/fcqipUDNrlGRmGzz4ooutA2YGDYIn7Gj7ym4WULcN6Jr92e25nLIJ ++XWUvjUQZFJThkXogxz1fZSGI7wCamHcTYJGipTDR54rPV+7w7hY4cN0CZbEdIE6 +buRMUZ/zO+VZZAYdpORz0N7SSlgDtAkgenCmHe64EEzbN8bgCcvHzl/RNfZyeSm7 +supSBJuXkfttvvg/JzUCgcEAlx0Pep9qCLvpk0WqzijBVHc3zK4wYxjhN2MBkF42 +SLWfogKpiPfIqxX6YF94roIA0VlW6Pj50v+sbPwq8nwsgFNhml80A4ODKr3O3Y3M +fXDBJW5W5ZRb/vhIKRjXyCSckSRfj7N8HUYjCLkxQansNWimrldmSet0H2mYJN0Y +JpBXdqpa76zoHzWpKFwD0fSVzvnMelPHSDCNOdIEHmR8e1x2F1/ufR/9/dBzPULY +HMj0OhQHoi8kJyMIj3+bQkbC -----END PRIVATE KEY----- +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + cb:2d:80:99:5a:69:52:5f + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server + Validity + Not Before: Aug 29 14:23:16 2018 GMT + Not After : Oct 28 14:23:16 2037 GMT + Subject: C=XY, L=Castle Anthrax, O=Python Software Foundation, CN=allsans + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (3072 bit) + Modulus: + 00:c1:1a:f8:fe:53:2f:d5:53:24:d1:9a:62:00:d5: + 41:04:35:38:61:d3:ea:56:38:37:2f:bd:49:64:78: + 8a:3e:5d:32:77:16:11:78:fd:15:63:22:60:c7:8e: + 8c:e5:db:c5:df:d9:3c:ca:9e:f4:09:6b:52:82:a6: + a6:bb:7e:bf:1c:2f:d4:0c:c2:4e:29:1f:e4:b8:ba: + 5c:4e:bb:4d:81:97:76:1a:7f:1d:a8:25:55:0c:2f: + 7e:ef:72:22:60:fb:39:33:3f:1d:64:de:d5:c5:8d: + 79:2b:2c:68:d9:c0:ea:2e:7c:10:b7:02:63:ee:ab: + 6c:47:14:1c:c7:ae:fa:79:fc:32:11:1f:6b:25:40: + 53:3d:7e:95:59:cc:de:fb:81:8c:b3:c5:b6:b4:c0: + 27:c2:3e:90:9f:78:91:51:c9:82:96:f1:ce:cc:5e: + bc:27:33:cd:98:b4:4e:d1:96:77:f6:db:b1:24:09: + d3:0d:69:27:99:2d:42:31:79:5a:5c:9d:27:2a:66: + 5d:12:21:b4:77:60:48:95:d0:b3:c5:93:1d:30:24: + 59:bc:a9:41:05:53:f8:7e:d2:36:a6:83:2f:ce:37: + ed:75:9e:a9:8c:96:9d:c1:8c:d8:bf:25:35:6c:6b: + b3:7b:03:77:6f:74:70:bb:55:59:6b:5a:75:20:53: + a3:28:4a:78:b2:2f:a8:a3:a6:e7:32:1e:d6:73:2b: + 69:89:cb:4b:07:47:c3:da:74:72:a8:c3:43:b8:db: + 7f:f9:37:c1:8a:4d:23:af:68:63:17:4e:30:1e:38: + 6b:3e:f7:f3:f5:65:8a:37:22:38:d0:3f:3f:cd:57: + 74:25:84:af:33:46:ac:45:dd:c5:b4:7a:41:c7:91: + 3f:bf:8d:98:c2:bd:22:a6:ea:67:5b:31:0b:a7:28: + 4d:56:f9:da:24:01:cf:35:e6:96:f8:f0:cc:df:d5: + e5:8a:77:fe:d4:c9:47:fb:09:7b:ac:b3:20:1a:27: + 77:25:a5:a2:b5:b1:b6:e7:f6:6d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Alternative Name: + DNS:allsans, othername:, othername:, email:user@example.org, DNS:www.example.org, DirName:/C=XY/L=Castle Anthrax/O=Python Software Foundation/CN=dirname example, URI:https://www.python.org/, IP Address:127.0.0.1, IP Address:0:0:0:0:0:0:0:1, Registered ID:1.2.3.4.5 + X509v3 Key Usage: critical + Digital Signature, Key Encipherment + X509v3 Extended Key Usage: + TLS Web Server Authentication, TLS Web Client Authentication + X509v3 Basic Constraints: critical + CA:FALSE + X509v3 Subject Key Identifier: + D4:F1:D8:23:E0:A7:E9:CA:12:45:A0:0D:03:C2:25:A6:E8:65:BC:EE + X509v3 Authority Key Identifier: + keyid:B3:8A:A0:A2:BA:71:F1:A8:24:79:D4:A4:5B:25:36:15:1E:49:C8:CD + DirName:/C=XY/O=Python Software Foundation CA/CN=our-ca-server + serial:CB:2D:80:99:5A:69:52:5B + + Authority Information Access: + CA Issuers - URI:http://testca.pythontest.net/testca/pycacert.cer + OCSP - URI:http://testca.pythontest.net/testca/ocsp/ + + X509v3 CRL Distribution Points: + + Full Name: + URI:http://testca.pythontest.net/testca/revocation.crl + + Signature Algorithm: sha256WithRSAEncryption + 70:77:d8:82:b0:f4:ab:de:84:ce:88:32:63:5e:23:0f:b6:58: + a2:b1:65:ff:12:22:0b:88:a6:fa:06:40:9a:e7:63:a7:5d:ae: + 94:c5:68:3c:4b:e9:95:34:01:75:24:df:9d:6e:9b:e4:ff:3f: + 61:97:29:7b:ab:34:2c:14:d3:01:d2:eb:fb:84:40:db:12:54: + 7e:7a:44:bc:08:eb:9f:e2:15:0b:11:4f:25:d2:56:51:95:ad: + 6d:ad:07:aa:6a:61:f9:39:d5:82:8c:45:31:9f:2a:ff:18:98: + 49:0c:bb:17:ad:d5:24:d3:d1:c7:c4:10:3e:c4:79:26:58:f4: + c5:de:82:16:c4:c3:c4:a7:a3:62:22:41:90:36:0f:bc:4c:fd: + 6a:18:22:f2:87:e9:07:db:b4:3d:65:00:e4:70:f9:d6:e5:a8: + a1:b9:c9:9d:e7:5d:78:aa:98:d5:f8:f4:fd:5c:d9:4c:d0:6d: + bf:87:71:d3:5b:ec:f4:bf:46:f9:c8:f8:10:c5:72:af:c3:15: + b9:c4:06:67:0b:3f:f6:f4:64:c5:27:74:c1:6b:00:37:da:ea: + 18:36:77:36:a7:3e:80:2e:5d:54:0f:01:df:ce:9e:97:dd:c9: + f2:8b:59:82:c5:65:31:c8:73:20:fd:24:23:25:d8:00:df:90: + 93:26:76:08:0a:06:a9:0e:d3:d3:4c:6f:ef:a7:fb:de:eb:2a: + 40:b9:e4:b1:44:0c:37:ca:c6:9e:44:4a:b4:7c:2c:40:52:35: + bb:b3:71:28:3d:35:fd:be:c9:4f:54:b3:99:c5:5f:84:38:fb: + 2b:fb:ea:dd:88:e8:9d:c1:9b:67:87:3d:79:7b:3d:7e:61:1f: + 70:3c:b7:c8:4c:17:a5:0c:a3:28:c7:ab:48:11:14:f7:98:7a: + da:4e:fb:91:76:89:0a:a6:c6:72:e0:96:d9:f1:80:ea:68:90: + 37:5c:c6:69:c7:d7:bc:c7:d1:ae:5b:a9:12:59:c6:e4:6c:61: + a9:8b:ba:51:b3:13 -----BEGIN CERTIFICATE----- -MIIHMDCCBZigAwIBAgIJALVVA6v9zJS5MA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV -BAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9u -IFNvZnR3YXJlIEZvdW5kYXRpb24xEDAOBgNVBAMMB2FsbHNhbnMwHhcNMTgwODI5 -MTQyMzE3WhcNMjgwODI2MTQyMzE3WjBdMQswCQYDVQQGEwJYWTEXMBUGA1UEBwwO -Q2FzdGxlIEFudGhyYXgxIzAhBgNVBAoMGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0 -aW9uMRAwDgYDVQQDDAdhbGxzYW5zMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB -igKCAYEAoP6TOnT+wUxTXKnusCCSAQex48C+Nm6dL43AlZeGdzEVhbMGKX8cvqPv -Pj4LjKeCus53QOX8DZCvx9x5rWp53FHz6p1dLrDdDR0Bof3/cUaDZgdati+5E7jv -faNCi0IL6J0U9rJ3/K6vZ7T0c4R1BmIaIO88zcXrWFd9PTx6T69fQXCnqQ7TOUTJ -NmgZ6Deb7SLaK414g6LBZuqOcEB63LqXFcnbM22uj++QRG3NVyFr6thb/JrmsOKQ -nvNUGCDci6oHDzTv5xdzrORCOByowjUUgjoTnFqmHLVy1zfZQXTAQb0HN8w5mM4d -XiGXsM2Vz1REE998T5IccxzZoXCHLaVl+C00RehbpZHG3rmQ4Gt4JGWCX/zOiKVN -VmF6+qvLDcW4JkUV/zbh6FfaA8AcyxtO6ylIqkR34xqqAkZplXlWKa8r11DYxxh9 -J5Vc8//JU1MQJyaKztxXXCPusyi1DyAnQJb8+dQB+sqKYDxYa3YANKVczzui+RvE -kUAsSoQFAgMBAAGjggLxMIIC7TCCATAGA1UdEQSCAScwggEjggdhbGxzYW5zoB4G -AyoDBKAXDBVzb21lIG90aGVyIGlkZW50aWZpZXKgNQYGKwYBBQICoCswKaAQGw5L -RVJCRVJPUy5SRUFMTaEVMBOgAwIBAaEMMAobCHVzZXJuYW1lgRB1c2VyQGV4YW1w -bGUub3Jngg93d3cuZXhhbXBsZS5vcmekZzBlMQswCQYDVQQGEwJYWTEXMBUGA1UE -BwwOQ2FzdGxlIEFudGhyYXgxIzAhBgNVBAoMGlB5dGhvbiBTb2Z0d2FyZSBGb3Vu -ZGF0aW9uMRgwFgYDVQQDDA9kaXJuYW1lIGV4YW1wbGWGF2h0dHBzOi8vd3d3LnB5 -dGhvbi5vcmcvhwR/AAABhxAAAAAAAAAAAAAAAAAAAAABiAQqAwQFMA4GA1UdDwEB -/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/ -BAIwADAdBgNVHQ4EFgQUoLHAHNTWrHkSCUYkhn5NH0S40CAwgY8GA1UdIwSBhzCB -hIAUoLHAHNTWrHkSCUYkhn5NH0S40CChYaRfMF0xCzAJBgNVBAYTAlhZMRcwFQYD -VQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZv -dW5kYXRpb24xEDAOBgNVBAMMB2FsbHNhbnOCCQC1VQOr/cyUuTCBgwYIKwYBBQUH -AQEEdzB1MDwGCCsGAQUFBzAChjBodHRwOi8vdGVzdGNhLnB5dGhvbnRlc3QubmV0 -L3Rlc3RjYS9weWNhY2VydC5jZXIwNQYIKwYBBQUHMAGGKWh0dHA6Ly90ZXN0Y2Eu -cHl0aG9udGVzdC5uZXQvdGVzdGNhL29jc3AvMEMGA1UdHwQ8MDowOKA2oDSGMmh0 -dHA6Ly90ZXN0Y2EucHl0aG9udGVzdC5uZXQvdGVzdGNhL3Jldm9jYXRpb24uY3Js -MA0GCSqGSIb3DQEBCwUAA4IBgQAeKJKycO2DES98gyR2e/GzPYEw87cCS0cEpiiP -3CEUgzfEbF0X89GDKEey4H3Irvosbvt2hEcf2RNpahLUL/fUv53bDmHNmL8qJg5E -UJVMOHvOpSOjqoqeRuSyG0GnnAuUwcxdrZY6UzLdslhuq9F8UjgHr6KSMx56G9uK -LmTy5njMab0in2xL/YRX/0nogK3BHqpUHrfCdEYZkciRxtAa+OPpWn4dcZi+Fpf7 -ZYSgPLNt+djtFDMIAk5Bo+XDaQdW3dhF0w44enrGAOV0xPE+/jOuenNhKBafjuNb -lkeSr45+QZsi1rd18ny8z3uuaGqIAziFgmllZOH2D8giTn6+5jZcCNZCoGKUkPI9 -l/GMWwxg4HQYYlZcsZzTCem9Rb2XcrasAbmhFapMtR+QAwSed5vKE7ZdtQhj74kB -7Q0E7Lkgpp6BaObb2As8/f0K/UlSVSvrYk+i3JT9wK/qqkRGxsTFEF7N9t0rKu8y -4JdQDtZCI552MsFvYW6m+IOYgxg= +MIIHDTCCBXWgAwIBAgIJAMstgJlaaVJfMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV +BAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEW +MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0zNzEwMjgx +NDIzMTZaMF0xCzAJBgNVBAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEj +MCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZvdW5kYXRpb24xEDAOBgNVBAMMB2Fs +bHNhbnMwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDBGvj+Uy/VUyTR +mmIA1UEENThh0+pWODcvvUlkeIo+XTJ3FhF4/RVjImDHjozl28Xf2TzKnvQJa1KC +pqa7fr8cL9QMwk4pH+S4ulxOu02Bl3Yafx2oJVUML37vciJg+zkzPx1k3tXFjXkr +LGjZwOoufBC3AmPuq2xHFBzHrvp5/DIRH2slQFM9fpVZzN77gYyzxba0wCfCPpCf +eJFRyYKW8c7MXrwnM82YtE7Rlnf227EkCdMNaSeZLUIxeVpcnScqZl0SIbR3YEiV +0LPFkx0wJFm8qUEFU/h+0jamgy/ON+11nqmMlp3BjNi/JTVsa7N7A3dvdHC7VVlr +WnUgU6MoSniyL6ijpucyHtZzK2mJy0sHR8PadHKow0O423/5N8GKTSOvaGMXTjAe +OGs+9/P1ZYo3IjjQPz/NV3QlhK8zRqxF3cW0ekHHkT+/jZjCvSKm6mdbMQunKE1W ++dokAc815pb48Mzf1eWKd/7UyUf7CXussyAaJ3clpaK1sbbn9m0CAwEAAaOCAt4w +ggLaMIIBMAYDVR0RBIIBJzCCASOCB2FsbHNhbnOgHgYDKgMEoBcMFXNvbWUgb3Ro +ZXIgaWRlbnRpZmllcqA1BgYrBgEFAgKgKzApoBAbDktFUkJFUk9TLlJFQUxNoRUw +E6ADAgEBoQwwChsIdXNlcm5hbWWBEHVzZXJAZXhhbXBsZS5vcmeCD3d3dy5leGFt +cGxlLm9yZ6RnMGUxCzAJBgNVBAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJh +eDEjMCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZvdW5kYXRpb24xGDAWBgNVBAMM +D2Rpcm5hbWUgZXhhbXBsZYYXaHR0cHM6Ly93d3cucHl0aG9uLm9yZy+HBH8AAAGH +EAAAAAAAAAAAAAAAAAAAAAGIBCoDBAUwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQW +MBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBTU +8dgj4KfpyhJFoA0DwiWm6GW87jB9BgNVHSMEdjB0gBSziqCiunHxqCR51KRbJTYV +HknIzaFRpE8wTTELMAkGA1UEBhMCWFkxJjAkBgNVBAoMHVB5dGhvbiBTb2Z0d2Fy +ZSBGb3VuZGF0aW9uIENBMRYwFAYDVQQDDA1vdXItY2Etc2VydmVyggkAyy2AmVpp +UlswgYMGCCsGAQUFBwEBBHcwdTA8BggrBgEFBQcwAoYwaHR0cDovL3Rlc3RjYS5w +eXRob250ZXN0Lm5ldC90ZXN0Y2EvcHljYWNlcnQuY2VyMDUGCCsGAQUFBzABhilo +dHRwOi8vdGVzdGNhLnB5dGhvbnRlc3QubmV0L3Rlc3RjYS9vY3NwLzBDBgNVHR8E +PDA6MDigNqA0hjJodHRwOi8vdGVzdGNhLnB5dGhvbnRlc3QubmV0L3Rlc3RjYS9y +ZXZvY2F0aW9uLmNybDANBgkqhkiG9w0BAQsFAAOCAYEAcHfYgrD0q96EzogyY14j +D7ZYorFl/xIiC4im+gZAmudjp12ulMVoPEvplTQBdSTfnW6b5P8/YZcpe6s0LBTT +AdLr+4RA2xJUfnpEvAjrn+IVCxFPJdJWUZWtba0Hqmph+TnVgoxFMZ8q/xiYSQy7 +F63VJNPRx8QQPsR5Jlj0xd6CFsTDxKejYiJBkDYPvEz9ahgi8ofpB9u0PWUA5HD5 +1uWoobnJneddeKqY1fj0/VzZTNBtv4dx01vs9L9G+cj4EMVyr8MVucQGZws/9vRk +xSd0wWsAN9rqGDZ3Nqc+gC5dVA8B386el93J8otZgsVlMchzIP0kIyXYAN+QkyZ2 +CAoGqQ7T00xv76f73usqQLnksUQMN8rGnkRKtHwsQFI1u7NxKD01/b7JT1SzmcVf +hDj7K/vq3YjoncGbZ4c9eXs9fmEfcDy3yEwXpQyjKMerSBEU95h62k77kXaJCqbG +cuCW2fGA6miQN1zGacfXvMfRrlupElnG5GxhqYu6UbMT -----END CERTIFICATE----- diff --git a/Lib/test/capath/b1930218.0 b/Lib/test/capath/b1930218.0 index 730e7fd911a551..941d7919f8033e 100644 --- a/Lib/test/capath/b1930218.0 +++ b/Lib/test/capath/b1930218.0 @@ -1,26 +1,26 @@ -----BEGIN CERTIFICATE----- MIIEbTCCAtWgAwIBAgIJAMstgJlaaVJbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV BAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEW -MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0yODA4MjYx +MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0zNzEwMjgx NDIzMTZaME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUg Rm91bmRhdGlvbiBDQTEWMBQGA1UEAwwNb3VyLWNhLXNlcnZlcjCCAaIwDQYJKoZI -hvcNAQEBBQADggGPADCCAYoCggGBAJftVUG6NheV23Ec0+FhrFhz48aWzysfuAj1 -nUtLxzD2uAuzUnKgu8lNO47fIo4BV4HJknPMAMbscLA6F0DB3/KMNkzEp4HntiRo -4qB+NQcvoFv5RUb3HvBGEf7KGjxQ8SapX5winPhB4d9PEpUZL1yQARdufj59z+kJ -ryX4+EJ3LW1fNvJ4Hn1Kh2hjbAZxG436Jf7U0/WlF7Hv6hfLVMgnmYDLPEXxLFIc -3R9RRSBQHl6rV3MbQXiW3oSket2PMIU2WHl2oNJhyBuplJljxu74FL+0UlYxl/rr -rFOelc5MxFpKt8oDJ1s1V84C3OzKafiKWjnLFiAVAyRhbPR6/LZI5VkQXEnQI5/7 -cV466WifNHKAJ7Y/TLHZ22N/Z2hKbhH46MD0WhY5Uwto3nf6Ref4kc14zSiUl3FU -+8/wN97JJsXcG56JbQmsyERxy23xlzHVTCAzv3VKoODcaRHtKrRkEBEwiw6wpxDY -isWqG8gmiiXnZp+lahovfF+DxnhPHwIDAQABo1AwTjAdBgNVHQ4EFgQU3b/K2ubR -NLo3dSHKb5oIKPI1tkgwHwYDVR0jBBgwFoAU3b/K2ubRNLo3dSHKb5oIKPI1tkgw -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAYEAM2pU02vA1wFfnfQFwZNm -kFDQtxjpsB5KoLbadpOvhNutFVQxFRPk3n5ODNUJHDQ1tuVM1m9lfTJf6/ypawf3 -SYLlgX4HgJpj+CzDQLyP1CraPtHuCLdNp4TK9D+hmEW+sQVp59/Xmasb7oswzPf8 -59QLF66Xv+R7/Q+ntIV541niFoe/HylFLCOTdr7Ahx3e7CtCauW7yPQKSggKjFzY -fU3RuL/V9yntktGUBOg1Bld/LCOXh6U1jSbTGkfyFtfZxtQfI0PTJpk5yiD0cSNv -DEp2dvd2H7P+v0ew/CpWgeHS3e4I2PT/WtwlYYqRArmGHPJQc3YlNfy2JSYVy+vE -K2EMHOfuLxeb7PDUoYTn0q/e5BskFKcBh+OrKVhGoNnACuCN11nTG/hUID54paXI -T4sDxJaf7PtHz3YtjWU0J7/6rgEFivOSCt2JbJehx+dgUees60t9LLhlyf5dakhV -juTH+WpA4bhkRem1WSmlX899WH1keeWkCawedmU9lMRo +hvcNAQEBBQADggGPADCCAYoCggGBALGE009cBICRT4JJujAL9+jL+RTvPZ8LPwpi +/BsgpSDRYF+HWh8W0e2XcKbaGwMsfqBbPE4vFn4OiSmJ4RANONpqd183E7Moj3tc +dq2e6NP1nvWDqhAHjeZRmPB8DVLyDCEe2LmZJqklAye7XKsuMyei1iOog4dEKZ+X +tSRv17kK/Sjuu/tBWOodmd1EhquYvhzcy6mJHTZcqehHtfRSSKq1pGfvPtfi0zPe +mCnYerBZXOexDsz9n+v21ToOC8/+Cz2iv0UYzpTnqVVgiNTYhFB5BS5BA3SuZyb2 +WxIImM4Kl+0BD4lPF1z6Ph01JEeSMr/3pBgrPNBImeGizaPMUFMgtcbjZoV7VxDs +M0/Bd+cbfoHGxPNFIMCR3RN2ewOv9naOooNjV91jvLtaHBdSitYGSMwPx9NP6Noi +bIb5TlymKQc72FZMWbMgSQd7lITPK8McGk6HZJK6QuHmrX0d9lSQbyvps8xLKzMm +I/1lwDzwea3JwYHvNwTgJz6w7hW+UQIDAQABo1AwTjAdBgNVHQ4EFgQUs4qgorpx +8agkedSkWyU2FR5JyM0wHwYDVR0jBBgwFoAUs4qgorpx8agkedSkWyU2FR5JyM0w +DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAYEAazIv5wUY6lzJlfTgwgxB +XxoKlcnHfQXuilYpNVBAt/6fe1scw2kvoMvSuJEvUBli9ycYbZV7UxYVolrcFOP7 +sTKpadumM0c8ux/S3HD5ai4M2Ixt5V0dQzxOkd6gyNqgSw6dXrYPSknwe7ZTnv01 +FFvjTbQYpjZh6I8zm9QF+VRm3+DLGKNO3BeooLPBqPTWncp/aFMa15Xa6NOeSABx +lZkRB8+WwH3OfTDoT+GDFjOh/1mbPkznOjgBnw9nTP0ti0rUAUY3M+gTaxWpHWh2 +RaKCM2kmMGAFyI+9tHWrvnqLSGhwQLQbUcXmeq1rT9sXwGBnLmNhmyxImbh2RaCe +zO8zHlBOq3LDZciyebM1gyF404tsOhjoZTI5uMCdcS81NorAF2LYiz7hIhgrTGOm +Dp0K+qtbNfuIkXdMjYydqc/8q8LmWgV7fgRuOc+Tzmc7esuvtjbh+3FkRdSm8M7v +dQSZaZrliAoQAnSJ7HWERIBI38H36TfOzpKSXIkiCHMf -----END CERTIFICATE----- diff --git a/Lib/test/capath/ceff1710.0 b/Lib/test/capath/ceff1710.0 index 730e7fd911a551..941d7919f8033e 100644 --- a/Lib/test/capath/ceff1710.0 +++ b/Lib/test/capath/ceff1710.0 @@ -1,26 +1,26 @@ -----BEGIN CERTIFICATE----- MIIEbTCCAtWgAwIBAgIJAMstgJlaaVJbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV BAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEW -MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0yODA4MjYx +MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0zNzEwMjgx NDIzMTZaME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUg Rm91bmRhdGlvbiBDQTEWMBQGA1UEAwwNb3VyLWNhLXNlcnZlcjCCAaIwDQYJKoZI -hvcNAQEBBQADggGPADCCAYoCggGBAJftVUG6NheV23Ec0+FhrFhz48aWzysfuAj1 -nUtLxzD2uAuzUnKgu8lNO47fIo4BV4HJknPMAMbscLA6F0DB3/KMNkzEp4HntiRo -4qB+NQcvoFv5RUb3HvBGEf7KGjxQ8SapX5winPhB4d9PEpUZL1yQARdufj59z+kJ -ryX4+EJ3LW1fNvJ4Hn1Kh2hjbAZxG436Jf7U0/WlF7Hv6hfLVMgnmYDLPEXxLFIc -3R9RRSBQHl6rV3MbQXiW3oSket2PMIU2WHl2oNJhyBuplJljxu74FL+0UlYxl/rr -rFOelc5MxFpKt8oDJ1s1V84C3OzKafiKWjnLFiAVAyRhbPR6/LZI5VkQXEnQI5/7 -cV466WifNHKAJ7Y/TLHZ22N/Z2hKbhH46MD0WhY5Uwto3nf6Ref4kc14zSiUl3FU -+8/wN97JJsXcG56JbQmsyERxy23xlzHVTCAzv3VKoODcaRHtKrRkEBEwiw6wpxDY -isWqG8gmiiXnZp+lahovfF+DxnhPHwIDAQABo1AwTjAdBgNVHQ4EFgQU3b/K2ubR -NLo3dSHKb5oIKPI1tkgwHwYDVR0jBBgwFoAU3b/K2ubRNLo3dSHKb5oIKPI1tkgw -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAYEAM2pU02vA1wFfnfQFwZNm -kFDQtxjpsB5KoLbadpOvhNutFVQxFRPk3n5ODNUJHDQ1tuVM1m9lfTJf6/ypawf3 -SYLlgX4HgJpj+CzDQLyP1CraPtHuCLdNp4TK9D+hmEW+sQVp59/Xmasb7oswzPf8 -59QLF66Xv+R7/Q+ntIV541niFoe/HylFLCOTdr7Ahx3e7CtCauW7yPQKSggKjFzY -fU3RuL/V9yntktGUBOg1Bld/LCOXh6U1jSbTGkfyFtfZxtQfI0PTJpk5yiD0cSNv -DEp2dvd2H7P+v0ew/CpWgeHS3e4I2PT/WtwlYYqRArmGHPJQc3YlNfy2JSYVy+vE -K2EMHOfuLxeb7PDUoYTn0q/e5BskFKcBh+OrKVhGoNnACuCN11nTG/hUID54paXI -T4sDxJaf7PtHz3YtjWU0J7/6rgEFivOSCt2JbJehx+dgUees60t9LLhlyf5dakhV -juTH+WpA4bhkRem1WSmlX899WH1keeWkCawedmU9lMRo +hvcNAQEBBQADggGPADCCAYoCggGBALGE009cBICRT4JJujAL9+jL+RTvPZ8LPwpi +/BsgpSDRYF+HWh8W0e2XcKbaGwMsfqBbPE4vFn4OiSmJ4RANONpqd183E7Moj3tc +dq2e6NP1nvWDqhAHjeZRmPB8DVLyDCEe2LmZJqklAye7XKsuMyei1iOog4dEKZ+X +tSRv17kK/Sjuu/tBWOodmd1EhquYvhzcy6mJHTZcqehHtfRSSKq1pGfvPtfi0zPe +mCnYerBZXOexDsz9n+v21ToOC8/+Cz2iv0UYzpTnqVVgiNTYhFB5BS5BA3SuZyb2 +WxIImM4Kl+0BD4lPF1z6Ph01JEeSMr/3pBgrPNBImeGizaPMUFMgtcbjZoV7VxDs +M0/Bd+cbfoHGxPNFIMCR3RN2ewOv9naOooNjV91jvLtaHBdSitYGSMwPx9NP6Noi +bIb5TlymKQc72FZMWbMgSQd7lITPK8McGk6HZJK6QuHmrX0d9lSQbyvps8xLKzMm +I/1lwDzwea3JwYHvNwTgJz6w7hW+UQIDAQABo1AwTjAdBgNVHQ4EFgQUs4qgorpx +8agkedSkWyU2FR5JyM0wHwYDVR0jBBgwFoAUs4qgorpx8agkedSkWyU2FR5JyM0w +DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAYEAazIv5wUY6lzJlfTgwgxB +XxoKlcnHfQXuilYpNVBAt/6fe1scw2kvoMvSuJEvUBli9ycYbZV7UxYVolrcFOP7 +sTKpadumM0c8ux/S3HD5ai4M2Ixt5V0dQzxOkd6gyNqgSw6dXrYPSknwe7ZTnv01 +FFvjTbQYpjZh6I8zm9QF+VRm3+DLGKNO3BeooLPBqPTWncp/aFMa15Xa6NOeSABx +lZkRB8+WwH3OfTDoT+GDFjOh/1mbPkznOjgBnw9nTP0ti0rUAUY3M+gTaxWpHWh2 +RaKCM2kmMGAFyI+9tHWrvnqLSGhwQLQbUcXmeq1rT9sXwGBnLmNhmyxImbh2RaCe +zO8zHlBOq3LDZciyebM1gyF404tsOhjoZTI5uMCdcS81NorAF2LYiz7hIhgrTGOm +Dp0K+qtbNfuIkXdMjYydqc/8q8LmWgV7fgRuOc+Tzmc7esuvtjbh+3FkRdSm8M7v +dQSZaZrliAoQAnSJ7HWERIBI38H36TfOzpKSXIkiCHMf -----END CERTIFICATE----- diff --git a/Lib/test/idnsans.pem b/Lib/test/idnsans.pem index e8a41fe5e565e8..cbcac7818ddc67 100644 --- a/Lib/test/idnsans.pem +++ b/Lib/test/idnsans.pem @@ -1,84 +1,84 @@ -----BEGIN PRIVATE KEY----- -MIIG/wIBADANBgkqhkiG9w0BAQEFAASCBukwggblAgEAAoIBgQDAfkvfgnT/+ATq -IiR5ksgGW4EJK900MkBsY9TXQcNdbrGqbyG4EwEvbDWzsAWBqgg76Alto7JgxKl2 -gNskz3T007xycOVAy4z31gzEWMTx+GxNbCiicJfCZjw6Z4Ck/UipooXAAy/S7jwC -z369E4RGa5jsIxxJ+NdDqAheoROIeUKawkfF7xXTyzkwuTuNj2YcV/TvJcsGVGQT -j4tZVSbDVvL38PlQX62VoGmEDK8pl8GL2GUQK3y+gP2VFDHepGxqqXxPLITxpdBF -aIoQcY4YV+nJtNu8vlUzDMizCHKII+YP9JdstxOLCyEbmjLv3rk4tHgIJuOfOyRh -3KjIcdghmNZcZ7vOvpbr341gKBNRLVmsAxtJCqqMfWvNOc6rXfp20bCnL/SDDJeB -/71/KfVeVaffXRtfEWcwJW6YRp7p2MealzAsnUA5xscOKItYhvmJ1FJlUB8LDZ+d -WESld2a4CIdK9lpuf3LDqy+wmcGTdnoVoi2RT68SDYHAb/bbtx0CAwEAAQKCAYEA -qNuhjzYPkKNvHDxLJuKd2QXYEcWKzEjwvqRsh0/HI2UBMXM/bwws0/7mtPPKQM55 -XqPT8XvR9JVP2wZ6NrZN8J71BqcGVGq7BIWeuXbtfR3hU6F3m9eNKRkp6En3TcRq -Q3SwQ5oID86wkf6XPSGrvWKRyUObg0BpBY6XmPtP+T32MXAQKg/rY9k4GAfFuA59 -EowN7uOGT80j5Qzcvsa1tFHH3bxj2B+2VDVdmlrOJXxcamKvdRnQ2gSpbmdCv/4X -HKmRiP7m2qVMxRaNh3kcL/gACGvZw3rUE7K0PwjW+sQ6lRlWF9IqUSDZaswxWrie -EaM2et9qD80g3eUV3gMi6I8BIdmD20p/yqa/l0bQk75Y6KQRUlN5HTodFL1u4/7V -W9N9wVIlx5DB1yJBkCZBDoebr4Y1UOGs4rrkcOd6F+zCeRSwKPFAng5vHpZ8jclS -1X2pV/KnKWIUfcFH9+v6pD9Y+VC5tz5LgaFz4SYFxgMF69t+PCpdoR2+0zwSWKGB -AoHBAPr/bC0L7V/HXeoiNxXjOSAYDgyVvzZC3i8cbW2/7DqdY7DfDmZbabdEX1mu -kaY9S/5abVV5W1eQACh1Cd/MaRkUbm+5nTy/bF9jXfh8408MzrGbAR9KF9GfWgqC -UxRiAkCa2gLuAhfc6uqokf5yZK0F+kZGGYWEeGcFK46i+8JstqknW0LsN1hhd+wE -PFokf+/22NiV0t1T0GERz18fFu0XoQC60D9qaW56EI+6OTADw71XkVh35jbNBa96 -bLPVzQKBwQDEVGMtpARdwoU59fRfDBo9S8iJJ/jTFpJs5nrqGZKah4J2pkTBiDpW -ZNxesVKL6IuvWghIuZGnBw5ovWT9JKQ2NHD4GDm/XJ6veVWOxc7THiBhCvJaG5N7 -3Jbxyn+eJ5yBO9PeR6slZbDrgDSIFUI++XD9A7abod8eTZHh6Q3pYT5mRuvfuDS1 -nlrkvMgGC1ZCQXCVTdq8MmMS9jea4UXhJLn4paGSKQSYXWLWVxTX3Mgk0640XpXN -HvsdCBMgFpECgcEAtESQkAXZ9Yk9tTPftlOcqqU8KeO/EhyScOmM2l8WLb7uY5DA -SdlrotlzVfjf2LJ7ivGtRs9DQC9HPcdZUSgBb6bR7mI0QPYGwreePSKNKzA6nyqB -ctSHKOG3DIcvXhtKHNZar/H7BOKAwgpR2JqWHgKGDsS3/cH3q531+5qpEKl9wx1m -GTmIQmy2cYdVRTSjwlfaxCtO5/ETXzQoaNvuXlgzJVAG0xT9JgB7No78FbUOd0WW -OSDb8g3sAGz/92UdAoHBAJqaOV9/gVC0FWWHIWCXjzIls00OhQr1A2luNeyTJrc5 -bqswU4RzWj0eP8rxqCc0gIsdQtjCCMiW7enc+uG9MPLeaPd1XEQtE2jrC0zax/vI -BYdlr2L1xDYNh2/wHn7UgpHiIv0vQr64TZGl67gdxYUBuNAFVI9J8QFT5EUZ2TKm -uRShVK1fyWIbyUfGwVzBILQcBCQOoukAZLRR34e/Td/1o90B0THfyxaQs3xGJsu1 -uIYHi28B7MUSWHyMF0N1gQKBwB9jtS7k7ZRgb0WzsgutRzJLfirmMeahzJwAQ46o -2xRT1y7vr0Idh9OSTz8Iqva6Frse21HT6agymamqEeC2aYwq+ikA0V7K3AhG3PiN -S5diC+RIZybeTthBTO1yj5pKDniZl+NGe3vIunXMrjZIuk/03VFK2etqdYcXguwH -SkwvuKqC3vvzcJW8dV2qIJ3Bz9LWz0QKqJQZBlCZvfzHf1jN5rpJJPQezys4k723 -ZPGg6Smyks3ElGXevVdidVcPUA== +MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQC8sqplTuHuLjbW +TL5SL2D1fw9U6WQzLVAF5gsyhd5lr2FpfYwjrob5Mav91aOLbJRTvoNyXsJ26FPS +0RycRGXbomcIEJxXGy9aI+0MLYBt1G5mgqCH+HcVCwPzCNlhVnTwvpgA7y8zs3+6 +ezZAPWkF0yWOMYLtTcq9A5GWeavt5VMgm1KZF3gO4k58oPyk3Ae9D0LAaYsX6DFi +BYx41eUR5UbSb5IYXaDd8d6jqW/jnYhgc6Cxkv1gTJFn87V5lrG0vYMSRUtWDQ9Y +Jh/EKAxjGw7AeY429p6TE4UoJhDmoFYR2NLvawhNIplxol/v0fs0veFQjI/UsTD8 +2tRfnYL4IX8szhLsE5/5Iq8aiLHjVbIMwmDYAa0P63Ap2kf1biSn9mpDL8lQazSo +yr8xzIq2QS5HMvGbeMAmS0ih10Zx84uVmkWlavgvtSflw8K/ZXT9c70rZp/TdBGY +95cOFsbg5U/20M/Llpis9tcBCaoVaYSFupatrP+p8y19qP2nebsCAwEAAQKCAYEA +uaYWWwHW6pzxOrnabcVLYX0WunW9LVShbIw97AElI2n/LuhkXh6xkK48BsqP0vaK +oDHJ5VYxgQdmoP03Zs8sX4BSWe7twg1u8wJxkA+cUXI1BAn0opHjpwJlalEEfe2v +s8PwjMrF59nsCq56W42PrDlms5UmuQ5WLsw6Co++hZmfxW7LPu+GIS6qBZfluNT5 +kBpZlDDCtkyteUD4SVI3wvmOSi+Wzv4e7P2wC9kByjENIcfhC5QQURRD4sA1hWCp +2SThYWqJOCEc2SvGgoqgTRaJuQ2aVG9qrntXt0N4V+WdJWXBK0jedkB2flLve1fR +KmDYuc9k/c1svmS3Y+iZohBha9H8jpuJmXYBxxg1iNg9m7qkfg8F8wxCYLQKB+U6 +tjRS7by+jSE08On7mpDDhJORnlh+rfEuWPPwAKQpLpdp76KDTvR++GvfOMUiOrFM +e9s5aXp+vcgkSSqYvigE+sFpCjQWwkGBkMdT16Pf9CzhQaM08YuLnzfLEYgLFw6R +AoHBAN5NQINBmlq/cptGSru66kfecqHfI7xHnnGWKAkto/B1x7Crrgs4Tk5b4vaA +JmAqatt5P1e7zco7uAXXebY5VURuH/30TlkuaB+oGFp0OMw6165n8RVPT2ZaDViK +ssJ9LT8fJ+23TWCCT2Z1zUlM/NnHAMjKOVsJK3/KEkVvlc7ROC7uVooc78AsQehg +zpL3GBYEeBukT8aNUMqUlesCsIs/dQHW7DzQL2xGkQagm5/PDsxaCsT7ynA8eL3X +TW+IXwKBwQDZTV3TaG6wqtL8y2DR0lN5jY/eYayX4e18iZ+XEZVTntPdVVyJIE4d +0A5ZfcILb9WE8R21iptROYSjcH/05j+3fQMJ1WAK0sNfGTUNNT3jYU8YzLvos+wW +G8E+mNMpFPWNvLV5Qrl4VvoifGh8AMvplUEz8uAzGJbXbRxUPcmjth2ph8zULEDn +/+o4OcT3gh1bp+HCqch0OuiJRn9qNUpsJG5GMm5FtjBjZM97ucZ1/0DaWl3JUxUN +/pueo3J9vCUCgcBg2Fjdlcvv8u2z1aijJmgATVm1SWfhE3ZkV50zem2sSTNotTJK +cwoyOveimeueA3ywBp9g0lFx5Bhkex3sFAggmrVXRoKHeZ8lA28woOdJmezybxfp +R7b4iQy9YRdFgZEfqawUdMHB5KNAqNt5LpANNBQUZX0dOt53eooBM/6Yri8CyxRq +cPbFysIfwWTdQ8Z7eRD2Qdv7TP9AcgDp9C8DSu7nkUEzsSKn0gpGT9vcgDEbN7Lv +ZB4qTT3wvoZeq5MCgcBIG18eDtJkN1sp3Yb0OTnP5QSvg3PVNngq0jQt2fzWMacW +FARP0HN7exW35n4kc2jD44q7OhJOAqsb3PHo3xqXlZkTg0WKceO4w9GR32/46spn +bVCRaFrX/z/BuM6hHD5bWRpS8aw/3YTFOsklFNKVYRyw01BIREmRlLhIz/QAKidv +oQt8AG9NTON44tqUUw3Q40WL5fEJeJ6/JrCTGrnmZrRdANEMuucVpFchNEVB1IC9 +tCzY6IPdD/atzojoZi0CgcB2x9oWLjJ0XJIp2pMAb8nCMVjkKrznKFjZbDm8EQBs +ou7pM2zkO3VRcWT1BXQocinJsjQqjQiTawP6IN2FQgT0d89V+pwd+jdvpdildQhP +1/6SErVRZV//oopKTsC6TIBL/EmW1TkP3ulQIZs8YklFgybeHdDyNFi+VgPXkVGe +IHp0nEzrui9q0YJsjHfFHBeGyzDSfbiBYiF7Auk66gYZbXufebP/LZNG/FIamPP3 +rwYIeeV1IVwk9tPBw6fGwrs= -----END PRIVATE KEY----- Certificate: Data: Version: 3 (0x2) Serial Number: - cb:2d:80:99:5a:69:52:5f - Signature Algorithm: sha256WithRSAEncryption + cb:2d:80:99:5a:69:52:60 + Signature Algorithm: sha256WithRSAEncryption Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server Validity - Not Before: Aug 29 14:23:17 2018 GMT - Not After : Jul 7 14:23:17 2028 GMT + Not Before: Aug 29 14:23:16 2018 GMT + Not After : Oct 28 14:23:16 2037 GMT Subject: C=XY, L=Castle Anthrax, O=Python Software Foundation, CN=idnsans Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (3072 bit) + RSA Public-Key: (3072 bit) Modulus: - 00:c0:7e:4b:df:82:74:ff:f8:04:ea:22:24:79:92: - c8:06:5b:81:09:2b:dd:34:32:40:6c:63:d4:d7:41: - c3:5d:6e:b1:aa:6f:21:b8:13:01:2f:6c:35:b3:b0: - 05:81:aa:08:3b:e8:09:6d:a3:b2:60:c4:a9:76:80: - db:24:cf:74:f4:d3:bc:72:70:e5:40:cb:8c:f7:d6: - 0c:c4:58:c4:f1:f8:6c:4d:6c:28:a2:70:97:c2:66: - 3c:3a:67:80:a4:fd:48:a9:a2:85:c0:03:2f:d2:ee: - 3c:02:cf:7e:bd:13:84:46:6b:98:ec:23:1c:49:f8: - d7:43:a8:08:5e:a1:13:88:79:42:9a:c2:47:c5:ef: - 15:d3:cb:39:30:b9:3b:8d:8f:66:1c:57:f4:ef:25: - cb:06:54:64:13:8f:8b:59:55:26:c3:56:f2:f7:f0: - f9:50:5f:ad:95:a0:69:84:0c:af:29:97:c1:8b:d8: - 65:10:2b:7c:be:80:fd:95:14:31:de:a4:6c:6a:a9: - 7c:4f:2c:84:f1:a5:d0:45:68:8a:10:71:8e:18:57: - e9:c9:b4:db:bc:be:55:33:0c:c8:b3:08:72:88:23: - e6:0f:f4:97:6c:b7:13:8b:0b:21:1b:9a:32:ef:de: - b9:38:b4:78:08:26:e3:9f:3b:24:61:dc:a8:c8:71: - d8:21:98:d6:5c:67:bb:ce:be:96:eb:df:8d:60:28: - 13:51:2d:59:ac:03:1b:49:0a:aa:8c:7d:6b:cd:39: - ce:ab:5d:fa:76:d1:b0:a7:2f:f4:83:0c:97:81:ff: - bd:7f:29:f5:5e:55:a7:df:5d:1b:5f:11:67:30:25: - 6e:98:46:9e:e9:d8:c7:9a:97:30:2c:9d:40:39:c6: - c7:0e:28:8b:58:86:f9:89:d4:52:65:50:1f:0b:0d: - 9f:9d:58:44:a5:77:66:b8:08:87:4a:f6:5a:6e:7f: - 72:c3:ab:2f:b0:99:c1:93:76:7a:15:a2:2d:91:4f: - af:12:0d:81:c0:6f:f6:db:b7:1d + 00:bc:b2:aa:65:4e:e1:ee:2e:36:d6:4c:be:52:2f: + 60:f5:7f:0f:54:e9:64:33:2d:50:05:e6:0b:32:85: + de:65:af:61:69:7d:8c:23:ae:86:f9:31:ab:fd:d5: + a3:8b:6c:94:53:be:83:72:5e:c2:76:e8:53:d2:d1: + 1c:9c:44:65:db:a2:67:08:10:9c:57:1b:2f:5a:23: + ed:0c:2d:80:6d:d4:6e:66:82:a0:87:f8:77:15:0b: + 03:f3:08:d9:61:56:74:f0:be:98:00:ef:2f:33:b3: + 7f:ba:7b:36:40:3d:69:05:d3:25:8e:31:82:ed:4d: + ca:bd:03:91:96:79:ab:ed:e5:53:20:9b:52:99:17: + 78:0e:e2:4e:7c:a0:fc:a4:dc:07:bd:0f:42:c0:69: + 8b:17:e8:31:62:05:8c:78:d5:e5:11:e5:46:d2:6f: + 92:18:5d:a0:dd:f1:de:a3:a9:6f:e3:9d:88:60:73: + a0:b1:92:fd:60:4c:91:67:f3:b5:79:96:b1:b4:bd: + 83:12:45:4b:56:0d:0f:58:26:1f:c4:28:0c:63:1b: + 0e:c0:79:8e:36:f6:9e:93:13:85:28:26:10:e6:a0: + 56:11:d8:d2:ef:6b:08:4d:22:99:71:a2:5f:ef:d1: + fb:34:bd:e1:50:8c:8f:d4:b1:30:fc:da:d4:5f:9d: + 82:f8:21:7f:2c:ce:12:ec:13:9f:f9:22:af:1a:88: + b1:e3:55:b2:0c:c2:60:d8:01:ad:0f:eb:70:29:da: + 47:f5:6e:24:a7:f6:6a:43:2f:c9:50:6b:34:a8:ca: + bf:31:cc:8a:b6:41:2e:47:32:f1:9b:78:c0:26:4b: + 48:a1:d7:46:71:f3:8b:95:9a:45:a5:6a:f8:2f:b5: + 27:e5:c3:c2:bf:65:74:fd:73:bd:2b:66:9f:d3:74: + 11:98:f7:97:0e:16:c6:e0:e5:4f:f6:d0:cf:cb:96: + 98:ac:f6:d7:01:09:aa:15:69:84:85:ba:96:ad:ac: + ff:a9:f3:2d:7d:a8:fd:a7:79:bb Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Alternative Name: @@ -90,9 +90,9 @@ Certificate: X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: - 54:53:0C:3C:4C:E3:63:C6:56:08:35:9C:5E:F4:C1:A1:04:3A:C2:C9 + 5C:BE:18:7F:7B:3F:CE:99:66:80:79:53:4B:DD:33:1B:42:A5:7E:00 X509v3 Authority Key Identifier: - keyid:DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48 + keyid:B3:8A:A0:A2:BA:71:F1:A8:24:79:D4:A4:5B:25:36:15:1E:49:C8:CD DirName:/C=XY/O=Python Software Foundation CA/CN=our-ca-server serial:CB:2D:80:99:5A:69:52:5B @@ -106,64 +106,64 @@ Certificate: URI:http://testca.pythontest.net/testca/revocation.crl Signature Algorithm: sha256WithRSAEncryption - 03:af:93:ab:58:98:74:3c:a1:68:53:18:13:be:56:60:77:d0: - a7:0e:c9:8a:02:1f:92:4d:21:18:61:d7:3e:9a:1d:aa:94:37: - 02:59:31:3b:71:62:d9:cb:04:e8:c7:44:41:f9:0e:0d:90:d1: - 4a:ab:4e:e2:bd:4e:60:1b:3c:eb:2a:b7:8a:ca:24:58:60:64: - d3:a6:20:f6:f5:98:6e:ca:5a:0a:91:63:97:58:f5:18:90:9f: - 17:55:9f:12:cf:22:a7:31:e6:90:da:36:61:3b:d6:42:e6:18: - 19:43:bb:17:52:28:40:a5:11:47:7f:32:fe:83:3d:c3:7d:8b: - 17:1b:5d:f7:20:3e:bd:3b:16:3d:00:01:68:ed:76:7a:a1:af: - ce:cd:dd:52:7f:19:22:db:83:c1:89:b6:90:02:4e:22:bc:b1: - 76:0c:00:ad:c5:3c:33:be:64:92:30:38:1f:b1:04:4f:53:a2: - 4a:fb:63:80:21:8b:03:72:72:4b:df:f1:9d:08:75:f0:94:06: - d3:cb:7c:df:3b:80:19:58:7a:85:ca:2a:bf:b4:8c:5d:f3:b6: - 65:24:37:b2:1d:46:da:1f:39:48:f2:eb:3a:84:98:3a:0c:59: - ff:0a:05:c2:2c:8c:b1:a5:a9:43:a9:8e:47:97:9a:d2:40:9c: - b8:c3:e6:46:1b:db:4b:85:a3:e1:e7:4e:2a:1e:b9:a6:de:ee: - a7:f0:63:3f:0f:e2:90:b6:82:70:4b:93:7f:e9:74:f3:ab:03: - 9e:04:38:f1:46:2d:f6:fe:77:0f:4a:8e:66:23:74:3e:c6:5b: - eb:0e:dd:72:c3:46:1d:a4:f0:2f:b6:18:2e:f1:1c:f9:85:69: - 0e:5a:37:5e:f8:ea:4b:2d:e7:63:ee:a1:e4:b9:f7:fa:a9:11: - 65:64:a1:b7:b5:91:81:5c:4d:b5:27:b4:16:96:4b:df:fc:c4: - 8a:26:b6:87:62:54:88:fb:1d:7d:af:97:25:65:27:38:1e:f7: - 8c:a4:16:46:f2:d9 + 5d:7a:f8:81:e0:a7:c1:3f:39:eb:d3:52:2c:e1:cb:4d:29:b3: + 77:18:17:18:9e:12:fc:11:cc:3c:49:cb:6b:f4:4d:6c:b8:d2: + f4:e9:37:f8:6b:ed:f5:d7:f1:eb:5a:41:04:c7:f3:8c:da:e1: + 05:8e:ae:58:71:d9:01:8a:32:46:b2:dd:95:46:e1:ce:82:04: + fa:0b:1c:29:75:07:85:ce:cd:59:d4:cc:f3:56:b3:72:4d:cb: + 90:0f:ce:02:21:ce:5d:17:84:96:7f:6a:00:57:42:b7:24:5b: + 07:25:1e:77:a8:9d:da:41:09:8e:29:79:b4:b0:a1:45:c8:70: + ae:2c:86:24:ae:3d:9a:74:a7:04:78:d6:1f:1b:17:c5:c1:6d: + b1:1a:fd:f4:50:2e:61:16:84:89:d0:42:3f:b6:bf:bd:52:bd: + c8:3e:8e:87:b4:f0:bd:ad:c7:51:65:2f:77:e8:69:79:0e:03: + 63:89:e7:70:ad:c8:d1:2f:1a:a5:06:d2:90:db:7c:07:35:9a: + 0b:0e:85:87:d1:70:17:a7:88:0f:c6:b5:9c:88:00:fa:f9:b2: + 0a:19:5a:4b:8d:91:12:51:5e:0e:c1:d8:9e:02:78:d0:2d:24: + 09:fe:d4:97:3c:cb:a0:1f:9a:ab:f7:0f:e2:fa:64:23:4e:53: + 0a:15:3e:f5:04:01:86:29:8b:8e:24:40:2f:b1:90:87:5c:3b: + 7b:a7:4c:06:af:c3:90:7f:e9:c6:56:42:61:15:2c:83:f1:7c: + 4f:89:17:f3:a0:11:34:3f:8d:af:75:34:60:1e:e0:f2:f3:02: + e7:aa:b3:f7:9f:1c:f8:69:f4:fe:da:57:6e:1b:95:53:70:cd: + ed:b6:bb:2a:84:eb:ab:c3:a9:b4:d5:15:a0:b2:cc:81:2d:f1: + 56:c1:54:9b:5f:14:4c:5f:ad:5f:f5:06:ee:22:60:45:e4:50: + 35:64:ac:ac:ca:4a:bf:86:78:f8:53:2d:17:d8:e8:84:c8:07: + a4:c2:29:76:c7:1f -----BEGIN CERTIFICATE----- -MIIGvTCCBSWgAwIBAgIJAMstgJlaaVJfMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV +MIIGvTCCBSWgAwIBAgIJAMstgJlaaVJgMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV BAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEW -MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTdaFw0yODA3MDcx -NDIzMTdaMF0xCzAJBgNVBAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEj +MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0zNzEwMjgx +NDIzMTZaMF0xCzAJBgNVBAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEj MCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZvdW5kYXRpb24xEDAOBgNVBAMMB2lk -bnNhbnMwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDAfkvfgnT/+ATq -IiR5ksgGW4EJK900MkBsY9TXQcNdbrGqbyG4EwEvbDWzsAWBqgg76Alto7JgxKl2 -gNskz3T007xycOVAy4z31gzEWMTx+GxNbCiicJfCZjw6Z4Ck/UipooXAAy/S7jwC -z369E4RGa5jsIxxJ+NdDqAheoROIeUKawkfF7xXTyzkwuTuNj2YcV/TvJcsGVGQT -j4tZVSbDVvL38PlQX62VoGmEDK8pl8GL2GUQK3y+gP2VFDHepGxqqXxPLITxpdBF -aIoQcY4YV+nJtNu8vlUzDMizCHKII+YP9JdstxOLCyEbmjLv3rk4tHgIJuOfOyRh -3KjIcdghmNZcZ7vOvpbr341gKBNRLVmsAxtJCqqMfWvNOc6rXfp20bCnL/SDDJeB -/71/KfVeVaffXRtfEWcwJW6YRp7p2MealzAsnUA5xscOKItYhvmJ1FJlUB8LDZ+d -WESld2a4CIdK9lpuf3LDqy+wmcGTdnoVoi2RT68SDYHAb/bbtx0CAwEAAaOCAo4w +bnNhbnMwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC8sqplTuHuLjbW +TL5SL2D1fw9U6WQzLVAF5gsyhd5lr2FpfYwjrob5Mav91aOLbJRTvoNyXsJ26FPS +0RycRGXbomcIEJxXGy9aI+0MLYBt1G5mgqCH+HcVCwPzCNlhVnTwvpgA7y8zs3+6 +ezZAPWkF0yWOMYLtTcq9A5GWeavt5VMgm1KZF3gO4k58oPyk3Ae9D0LAaYsX6DFi +BYx41eUR5UbSb5IYXaDd8d6jqW/jnYhgc6Cxkv1gTJFn87V5lrG0vYMSRUtWDQ9Y +Jh/EKAxjGw7AeY429p6TE4UoJhDmoFYR2NLvawhNIplxol/v0fs0veFQjI/UsTD8 +2tRfnYL4IX8szhLsE5/5Iq8aiLHjVbIMwmDYAa0P63Ap2kf1biSn9mpDL8lQazSo +yr8xzIq2QS5HMvGbeMAmS0ih10Zx84uVmkWlavgvtSflw8K/ZXT9c70rZp/TdBGY +95cOFsbg5U/20M/Llpis9tcBCaoVaYSFupatrP+p8y19qP2nebsCAwEAAaOCAo4w ggKKMIHhBgNVHREEgdkwgdaCB2lkbnNhbnOCH3huLS1rbmlnLTVxYS5pZG4ucHl0 aG9udGVzdC5uZXSCLnhuLS1rbmlnc2dzc2NoZW4tbGNiMHcuaWRuYTIwMDMucHl0 aG9udGVzdC5uZXSCLnhuLS1rbmlnc2djaGVuLWI0YTNkdW4uaWRuYTIwMDgucHl0 aG9udGVzdC5uZXSCJHhuLS1ueGFzbXE2Yi5pZG5hMjAwMy5weXRob250ZXN0Lm5l dIIkeG4tLW54YXNtbTFjLmlkbmEyMDA4LnB5dGhvbnRlc3QubmV0MA4GA1UdDwEB /wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/ -BAIwADAdBgNVHQ4EFgQUVFMMPEzjY8ZWCDWcXvTBoQQ6wskwfQYDVR0jBHYwdIAU -3b/K2ubRNLo3dSHKb5oIKPI1tkihUaRPME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQK +BAIwADAdBgNVHQ4EFgQUXL4Yf3s/zplmgHlTS90zG0KlfgAwfQYDVR0jBHYwdIAU +s4qgorpx8agkedSkWyU2FR5JyM2hUaRPME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQK DB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEWMBQGA1UEAwwNb3VyLWNh LXNlcnZlcoIJAMstgJlaaVJbMIGDBggrBgEFBQcBAQR3MHUwPAYIKwYBBQUHMAKG MGh0dHA6Ly90ZXN0Y2EucHl0aG9udGVzdC5uZXQvdGVzdGNhL3B5Y2FjZXJ0LmNl cjA1BggrBgEFBQcwAYYpaHR0cDovL3Rlc3RjYS5weXRob250ZXN0Lm5ldC90ZXN0 Y2Evb2NzcC8wQwYDVR0fBDwwOjA4oDagNIYyaHR0cDovL3Rlc3RjYS5weXRob250 ZXN0Lm5ldC90ZXN0Y2EvcmV2b2NhdGlvbi5jcmwwDQYJKoZIhvcNAQELBQADggGB -AAOvk6tYmHQ8oWhTGBO+VmB30KcOyYoCH5JNIRhh1z6aHaqUNwJZMTtxYtnLBOjH -REH5Dg2Q0UqrTuK9TmAbPOsqt4rKJFhgZNOmIPb1mG7KWgqRY5dY9RiQnxdVnxLP -Iqcx5pDaNmE71kLmGBlDuxdSKEClEUd/Mv6DPcN9ixcbXfcgPr07Fj0AAWjtdnqh -r87N3VJ/GSLbg8GJtpACTiK8sXYMAK3FPDO+ZJIwOB+xBE9Tokr7Y4AhiwNyckvf -8Z0IdfCUBtPLfN87gBlYeoXKKr+0jF3ztmUkN7IdRtofOUjy6zqEmDoMWf8KBcIs -jLGlqUOpjkeXmtJAnLjD5kYb20uFo+HnTioeuabe7qfwYz8P4pC2gnBLk3/pdPOr -A54EOPFGLfb+dw9KjmYjdD7GW+sO3XLDRh2k8C+2GC7xHPmFaQ5aN1746kst52Pu -oeS59/qpEWVkobe1kYFcTbUntBaWS9/8xIomtodiVIj7HX2vlyVlJzge94ykFkby -2Q== +AF16+IHgp8E/OevTUizhy00ps3cYFxieEvwRzDxJy2v0TWy40vTpN/hr7fXX8eta +QQTH84za4QWOrlhx2QGKMkay3ZVG4c6CBPoLHCl1B4XOzVnUzPNWs3JNy5APzgIh +zl0XhJZ/agBXQrckWwclHneondpBCY4pebSwoUXIcK4shiSuPZp0pwR41h8bF8XB +bbEa/fRQLmEWhInQQj+2v71Svcg+joe08L2tx1FlL3foaXkOA2OJ53CtyNEvGqUG +0pDbfAc1mgsOhYfRcBeniA/GtZyIAPr5sgoZWkuNkRJRXg7B2J4CeNAtJAn+1Jc8 +y6Afmqv3D+L6ZCNOUwoVPvUEAYYpi44kQC+xkIdcO3unTAavw5B/6cZWQmEVLIPx +fE+JF/OgETQ/ja91NGAe4PLzAueqs/efHPhp9P7aV24blVNwze22uyqE66vDqbTV +FaCyzIEt8VbBVJtfFExfrV/1Bu4iYEXkUDVkrKzKSr+GePhTLRfY6ITIB6TCKXbH +Hw== -----END CERTIFICATE----- diff --git a/Lib/test/keycert2.pem b/Lib/test/keycert2.pem index ed6ae85a4649d9..e59d45439d4b6d 100644 --- a/Lib/test/keycert2.pem +++ b/Lib/test/keycert2.pem @@ -1,66 +1,66 @@ -----BEGIN PRIVATE KEY----- -MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQDKjrjWZlfOs1Ch -qt1RoyLfqyXbHVXIAW0fTzAxfJnxvFOiWqAAKgC2qVQM8Y080kRUuRaXP/w9ywXT -+MzX6tByy5VbTYJYyTjHOH46EWLNdcqEJs4+FCVqOIYrQPQ6pGAhCXmgBy4Vb42J -ABLwb+Kt+y2Dk15tggVcAHP2Khri+lRXWvda+kZAe2F1IojmuWyCTy3FEYHic5qN -BsXcf6u1oyFV8MybOuz1zGj3vd2C+dEKO4Ohw9rRwnvHSatjM+CfwiXf8kTXzDBF -Z/8W3+6yA49pHxRbG7FE3K1TAPhkrp+BVTIUOcdI74wEA6UEkWFF5sQcmmAth59M -EQrl2CXorftEPhsKZE59dUP1+nYAPvR/mTySNCSw7/rvdf+csRSZ5ollMu/lxsht -ulJYJI03+IiDTn47FI5D+IF25REK7d4LzGIo6T73ktsT+qpSXHuTWC+IABm8AMF9 -7ljxHSwMRU/z+O5uiONRItDAgKH/OItFG54PtY2vAhaO0YiZrZcCAwEAAQKCAYB2 -hTo8IVghlySH5B1p5kXCkDcvVaPaypLaLhCp9Blzq9lX9yUF043lU4Ddrf0RaIsY -88/3IjZqxb+cP0lE0Z20fdDfwqORZfQ2BaU+PuwMAm9EEhy9kDYwR/ChoHkHUyT4 -T7392BWr70Dmt8ddLmp5mK4R/gnTk6+lHJK9p/dhdk4haxWvAyBWHJty2Yk3T6nh -OYkzdUIFidUVza+6jG2hc1lPGv3tmnYKgNeulkblm10oWphz79C6ycx5WG7TNgef -CQ3z7//Nn89YTiaUBjLvoLvxRTMwO96r7E/FaslSl/fWnF3HP3lut26Z/mNfhiwj -qn7AhUwpSNPV0qcxFWXr/rXUjdk745wv8wOODK8atjjE/vt/MRBK0rAOIPSm3ecx -37PKNtR4i+sNeDEcY1IyTHE6wFvJSy5y8AFpn5y8tbqYfhlEVWZ4pcnlrKxhWm7j -oBkB/4GBjKQgbQ7ttym9eNG1wIbZ8v9N06+yeLs/NCc4bFZEgcWjFqBH1bLtAYEC -gcEA8tt8iYNqbsDH2ognjEmbbBxrDBmyYcEKRpg1i1SUopcZl8i93IHpG7EgJIaj -l7aWSbASAxjnK02t0VZ3nNS60acibzRwY/+e8OrSqlQdMXlAB2ggBA86drDJpfBl -WGJG8TJVY9bc1TU2uuwtZR1LAMSsRHVp+3IvKLpHrne5exPd3x6KGYcuaM+Uk/rE -u6tLsFNwaCdh+iBFFDT2bnYIw7jAsokJUkwxMVxSC0/21s2blhO/q5LsN1gFC1kN -TbpXAoHBANWE7TmG2szPvujPwrK18v6iJlHCA2n50AgAQXrsetj2JcF3HYHYdHnq -z36MQ6FpBKOiQumozWvb32WTjEwdG2kix7GEfam4DAUBdqYuCHzPcR12K5Tc8hsX -NG7JXUAeS8ZJEiOdu95X59JHyBxUQtNfte5rcbaV17SVw6K6bsWVJnj60YjtJrpa -xHvv1ZRnT2WEzJGpA+ii1h3I52N7ipGBiw172qcW+bKJukMi8eHxx5CC9e5tBpnu -C+Ou/eYewQKBwHxNa0jXQrq9YY2w8s0TP8HuKbxfyrXOIHxRm9ZczFcMD8VosgUT -WUUbO+B2KXWVtwawYAfFz0ySzcy//SkAmT6F1VIl/QCx7aBSENGti+Ous98WpIxv -XvUxN4T/rl+2raj2ok4fw5g9TG4QRIvkmmciQyonDr/sicbG0bmy/fTJDl8NOpIm -ZtKurNWxHNERtAPkMTyeK7/ilHjrQtb3AzVqcvbuvR6qcONa5YN0wlrfkisWoJwo -707EdpCAXBbUsQKBwQCnpzcpu2Sj+t9ZKIElF87T93gFLETH+ppJHgJMRdDz+NqO -fTwTD2XtsNz57aLQ44f8AFVv6NZbQYq41FEOFrDGLcQE9BZDpDrz10FVnMGXVr7n -tjjkK1SCxwapkr0AsoknCYsPojO4kud46loLPHI4TGeq7HyeNCvqJMo3RRHjXIiX -58GNNUD6hHjRI/FdFH14Jf0GxmJGUU20l2Jwb7nPJJuNm9mE53pqoNA7FP4+Pj1H -kD0Q2FSdmxeE0IuWHEECgcBgw6ogJ/FRRGLcym+aApqP9BChK+W8FDfDc9Mi4p/J -g+XmetWNFGCGTlOefGqUDIkwSG+QVOEN3hxziXbsjnvfpGApqoaulAI5oRvrwIcj -QIvD2mt0PB52k5ZL9QL2K9sgBa43BJDyCKooMAlTy2XMM+NyXVxQKmzf3r3jQ5sl -Rptk7ro38a9G8Rs99RFDyOmP1haOM0KXZvPksN4nsXuTlE01cnwnI29XKAlEZaoA -pQPLXD8W/KK4mwDbmokYXmo= +MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQCf8FWxi4oVlDVx +e8NDFgb+IYAGr/hZWuY1Zq7d7g57yPoxJrgt+bN89+U7qTduqyB2Hy8G0TqeACOr +IdpPZ8P7V5E5YiASwfJ72nbVo7qR9DAKA5FE8PU0bJFmFLjDDihc970zc4ilRDfR +WylUpj68nefOY4CzFzeiqVOLX2wezs7Z0hflkSXGBmC0j1FbQU2I3YJg3CKCabhT +tU6OyKItzjJ2vVaOoQ+B0Kv8leaRQ6ANZBAFQF2LepSy5F2+oSD+QHjPr+012V5D +mrsdIc9We8YyonS1u/3HI7lLohf3W+qFroQWjn0DJI56ScV1uEr/B0+hn2jBRTM5 +d1F9BeVWm1u8BOJu50CvOeuxiVLsxJpa4T41DJznJk5V+hE4hKvDKmlrwulsRp8o +jUEyUi8dzWOBRfAijIWv3qAPjGA/J33n6+PllCczC2BsVZhVmLqSMCwp1g2JTCM/ +KC7T4vOl/EGkm76fcmLeA1Ef8oUdRg+3T77VP+HqZ2JP06J8O8MCAwEAAQKCAYAw +YvJZ82BEJQGCIrIxMpHNAm+MFmKpDdIFp9oRdDrXgjcG9bLU3e1KSmkEgq4tggIh +GlAM3PHB6ULhPC2ixj7JZHWgCaqwYhKtG6vF+HGyRFDgRrIFTGyyfoICgxReloLp +lV2dGj/l19yXLuAzJtRmFdOSYhIGnGiNgnKvAKBiNajoxyHJpv7piPZqyc0QMZJ2 +bKVMDm02TSuhz4FDuzktaGtl9uQf5GQfnvTZRrRpkC70vigGnrFuSBiCgopF6NLq +6AXl8YS3Jcu2oGWrZDfS/GlG1QmvGGsmr9wndJSGG43jcpcRZt0g1nJNu4Fioq3e +7y6Gap9TEsciuQOv/6RD457XkNARmTQxFpEwmSgOPQn2pFcDspo71Ej7azzL/Z+3 +jvnVo3wxgxBcrpyh+vhBtJARp4pT4anW4PcD6IcPSOWbnI8Ldoj1XN5QkJcBcykK +6LmsAUqsmEQDNsmnGZWyYSCns4P2vUJi0hwQz8UiQwgAta3xnq4v5On7l3cq35kC +gcEA0+joOFbZBeGlCb27tDW4VCW0cQuczzuNEoBUKnsNSqy0nx1O7hgHm/f/NQDD +cpxiD15bRQ0KM9QbQC4dGaVoLsM07hUGk97dCxQPs2zot4CodCKGohs7E154tEDP +zVg3YS5mubUmqdqtn8ZCKeeZye/Tv2ageyF300sEgj2Cd7EZ8S4sB0PxZ2tqT3jy +cBL5cDruLEWuHIQjN7WwSjxnXocpb1OU7dJ+v4zFPCkSCOoa0DTTw4jFhPEOBdqV +T619AoHBAME3QyW4QVtU2Ct9u0B1XThhqSEyOpUrcH9nOoefggwP4WF3phVx16BG +aDKUIGQ62klRa5fi2eooxcjQRLv1sWO0UzssnO6ABMnGkUiRdrowo6xukNak0RTp +0gvNoJ0SZxGF0yWSCw1Rq3qP2Koj7XDumFChAzLMyUsnoOl29SA7GfXcZp1pZTiq +kOfFMWt0CIHu/EK03YWcd4vfQEq6lus39RCSXuL++Jva3yiEl5s069RFZvP1bNrD +emkfetDSPwKBwQClk+8fVnzs44sZOW9ZOEB3P57mVbSJGHb6Zdtd9hhEqP3Y9gWe +dJg9fmGjAJ23CAp3B7s5ER9PsAQ6+c0zJNNq9ox9G2CwWgtNhLdf81FDUPxPAktA +jxZx4/dcoOe+A5gCD0elA67aOUxA86DvLVA1QXeqrn3muBfwuUUknvs6mt8yXGl6 +o9QUgxHmVxLYD3tn/iPr4+ZP0c/Sz9yXpOsAKYxuuFg+G6N9+HiEsXKuFH4vAZgV +yODNJ61VVZ4lS+ECgcAqFqOl39E81+qO7sCPdgFsermg5ZQlUmUbG52AVZq6jesG +lE21disGWs/v1JyJuNg8CGRrnZriiycqa1PNreOKWImY5kr5GSHx4jNbn3RBcr70 +nNEoMJbq+1QqBgzqqkuRYZlxIbMOn6++7v6/cTwT0aWUSr6rnjhrCqLeuG8FKlqp +V+1ydLb79QvDsQzm30vLIggJb+ShakgQS/1xSdv+OR5FEd1hjTESokbiSJ/Ny2Vj +xAp9MgUYUmSj6ZuTSXkCgcAggshdRQLom/EK2pYwffIpKfBiyLbi+KIjKxkiPEsb +jrrQbvh9ZN6iAG3StVAYB5c6vewfeIlcDT0YJDyy1hGRLRG7vf9ubPf+n7Xp1y0W +oo9L9qfCHu0jmWwtinkFYjpTDkXlxXCG2v3TllNsNX/5afYo8sb9oxXHLTpBlwZB +fw6IgNZblWQevdgmUMTP9W2W7AZUxEz4gOM6lQkOwC3U59Dx2yO6rD3An6G1tlZF +2MClyf8o5d5ePObH8rkxrpY= -----END PRIVATE KEY----- -----BEGIN CERTIFICATE----- -MIIEYjCCAsqgAwIBAgIJAJm2YulYpr+6MA0GCSqGSIb3DQEBCwUAMGIxCzAJBgNV -BAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9u -IFNvZnR3YXJlIEZvdW5kYXRpb24xFTATBgNVBAMMDGZha2Vob3N0bmFtZTAeFw0x -ODA4MjkxNDIzMTZaFw0yODA4MjYxNDIzMTZaMGIxCzAJBgNVBAYTAlhZMRcwFQYD -VQQHDA5DYXN0bGUgQW50aHJheDEjMCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZv -dW5kYXRpb24xFTATBgNVBAMMDGZha2Vob3N0bmFtZTCCAaIwDQYJKoZIhvcNAQEB -BQADggGPADCCAYoCggGBAMqOuNZmV86zUKGq3VGjIt+rJdsdVcgBbR9PMDF8mfG8 -U6JaoAAqALapVAzxjTzSRFS5Fpc//D3LBdP4zNfq0HLLlVtNgljJOMc4fjoRYs11 -yoQmzj4UJWo4hitA9DqkYCEJeaAHLhVvjYkAEvBv4q37LYOTXm2CBVwAc/YqGuL6 -VFda91r6RkB7YXUiiOa5bIJPLcURgeJzmo0Gxdx/q7WjIVXwzJs67PXMaPe93YL5 -0Qo7g6HD2tHCe8dJq2Mz4J/CJd/yRNfMMEVn/xbf7rIDj2kfFFsbsUTcrVMA+GSu -n4FVMhQ5x0jvjAQDpQSRYUXmxByaYC2Hn0wRCuXYJeit+0Q+GwpkTn11Q/X6dgA+ -9H+ZPJI0JLDv+u91/5yxFJnmiWUy7+XGyG26UlgkjTf4iINOfjsUjkP4gXblEQrt -3gvMYijpPveS2xP6qlJce5NYL4gAGbwAwX3uWPEdLAxFT/P47m6I41Ei0MCAof84 -i0Ubng+1ja8CFo7RiJmtlwIDAQABoxswGTAXBgNVHREEEDAOggxmYWtlaG9zdG5h -bWUwDQYJKoZIhvcNAQELBQADggGBAMIVLp6e6saH2NQSg8iFg8Ewg/K/etI++jHo -gCJ697AY02wtfrBox1XtljlmI2xpJtVAYZWHhrNqwrEG43aB7YEV6RqTcG6QUVqa -NbD8iNCnMKm7fP89hZizmqA1l4aHnieI3ucOqpgooM7FQwLX6qk+rSue6lD5N/5f -avsublnj8rNKyDfHpQ3AWduLoj8QqctpzI3CqoDZNLNzaDnzVWpxT1SKDQ88q7VI -W5zb+lndpdQlCu3v5HM4w5UpwL/k1htl/z6PnPseS2UdlXv6A8KITnCLg5PLP4tz -2oTAg9gjOtRP/0uwkhvicwoFzFJNVT813lzTLE1jlobMPiZhsS1mjaJGPD9GQZDK -ny3j8ogrIRGjnI4xpOMNNDVphcvwtV8fRbvURSHCj9Y4kCLpD5ODuoyEyLYicJIv -GZP456GP0iSCK5GKO0ij/YzGCkPWD5zA+mYFpMMGZPTwajenMw7TVaPXcc9CZBtr -oOjwwiLEqdkpxUj13mJYTlt5wsS/Kw== +MIIEbTCCAtWgAwIBAgIUF15VKdwjiTzzKgs6PnNpEekV9QQwDQYJKoZIhvcNAQEL +BQAwYjELMAkGA1UEBhMCWFkxFzAVBgNVBAcMDkNhc3RsZSBBbnRocmF4MSMwIQYD +VQQKDBpQeXRob24gU29mdHdhcmUgRm91bmRhdGlvbjEVMBMGA1UEAwwMZmFrZWhv +c3RuYW1lMB4XDTIxMDMxNzA4NDgyMFoXDTQwMDUxNjA4NDgyMFowYjELMAkGA1UE +BhMCWFkxFzAVBgNVBAcMDkNhc3RsZSBBbnRocmF4MSMwIQYDVQQKDBpQeXRob24g +U29mdHdhcmUgRm91bmRhdGlvbjEVMBMGA1UEAwwMZmFrZWhvc3RuYW1lMIIBojAN +BgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAn/BVsYuKFZQ1cXvDQxYG/iGABq/4 +WVrmNWau3e4Oe8j6MSa4LfmzfPflO6k3bqsgdh8vBtE6ngAjqyHaT2fD+1eROWIg +EsHye9p21aO6kfQwCgORRPD1NGyRZhS4ww4oXPe9M3OIpUQ30VspVKY+vJ3nzmOA +sxc3oqlTi19sHs7O2dIX5ZElxgZgtI9RW0FNiN2CYNwigmm4U7VOjsiiLc4ydr1W +jqEPgdCr/JXmkUOgDWQQBUBdi3qUsuRdvqEg/kB4z6/tNdleQ5q7HSHPVnvGMqJ0 +tbv9xyO5S6IX91vqha6EFo59AySOeknFdbhK/wdPoZ9owUUzOXdRfQXlVptbvATi +budArznrsYlS7MSaWuE+NQyc5yZOVfoROISrwyppa8LpbEafKI1BMlIvHc1jgUXw +IoyFr96gD4xgPyd95+vj5ZQnMwtgbFWYVZi6kjAsKdYNiUwjPygu0+LzpfxBpJu+ +n3Ji3gNRH/KFHUYPt0++1T/h6mdiT9OifDvDAgMBAAGjGzAZMBcGA1UdEQQQMA6C +DGZha2Vob3N0bmFtZTANBgkqhkiG9w0BAQsFAAOCAYEARzdkuqa0Hexi/saMkdi3 +bubpQkc7X0RYKWnjy/PgcmbvQXLiWRMZOH9rMWvd5v+ZfkgAtsbOQuP8ycioNIFY +Il5SEmxHEN81z5UNSPLOib6ky13gzrnXRAxnnO7cICG7AaMu1dHv57fqjevcx/n/ +nxPNKwKL+TDpMw7ATVZw7Py7JciKyFAfwtkvt17j/ldvaQvuwmWHzyFVrQniQcQq +QEa4jy/Y/pXHAgCKq1qbe0ush17j1ChyH7l4SkF2xJKcYYQF5ipw8zg6WeOL2NFE +G1KDJN0SsMmM3PMN1e0lLQP3G+UaatervrKXu51QleKL32Xlby+pp1w9KKs39/Tb +RT8EMe9A6cecod6TL0ZUQHow6ykNYBkfSKDLTKWnL9ifZ0C/DvgmS7DpJg3oAa1e +GhIglMrgqJflTHAI/PvEsCKM1O0Un2dVGWsUCzPfhj1cKmagyb0Zd+2Tk9xGSRs9 +2ceXMxRCjOJwEHUCFuTYeqowabdlpi0nyPbSn7JIwCpT -----END CERTIFICATE----- diff --git a/Lib/test/keycert3.pem b/Lib/test/keycert3.pem index e0a8205a660e89..f6887ba7a84e1a 100644 --- a/Lib/test/keycert3.pem +++ b/Lib/test/keycert3.pem @@ -1,84 +1,84 @@ -----BEGIN PRIVATE KEY----- -MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQCfKC83Qe9/ZGMW -YhbpARRiKco6mJI9CNNeaf7A89TE+w5Y3GSwS8uzqp5C6QebZzPNueg8HYoTwN85 -Z3xM036/Qw9KhQVth+XDAqM+19e5KHkYcxg3d3ZI1HgY170eakaLBvMDN5ULoFOw -Is2PtwM2o9cjd5mfSuWttI6+fCqop8/l8cerG9iX2GH39p3iWwWoTZuYndAA9qYv -07YWajuQ1ESWKPjHYGTnMvu4xIzibC1mXd2M6u/IjNO6g426SKFaRDWQkx01gIV/ -CyKs9DgZoeMHkKZuPqZVOxOK+A/NrmrqHFsPIsrs5wk7QAVju5/X1skpn/UGQlmM -RwBaQULOs1FagA+54RXU6qUPW0YmhJ4xOB4gHHD1vjAKEsRZ7/6zcxMyOm+M1DbK -RTH4NWjVWpnY8XaVGdRhtTpH9MjycpKhF+D2Zdy2tQXtqu2GdcMnUedt13fn9xDu -P4PophE0ip/IMgn+kb4m9e+S+K9lldQl0B+4BcGWAqHelh2KuU0CAwEAAQKCAYEA -lKiWIYjmyRjdLKUGPTES9vWNvNmRjozV0RQ0LcoSbMMLDZkeO0UwyWqOVHUQ8+ib -jIcfEjeNJxI57oZopeHOO5vJhpNlFH+g7ltiW2qERqA1K88lSXm99Bzw6FNqhCRE -K8ub5N9fyfJA+P4o/xm0WK8EXk5yIUV17p/9zJJxzgKgv2jsVTi3QG2OZGvn4Oug -ByomMZEGHkBDzdxz8c/cP1Tlk1RFuwSgews178k2xq7AYSM/s0YmHi7b/RSvptX6 -1v8P8kXNUe4AwTaNyrlvF2lwIadZ8h1hA7tCE2n44b7a7KfhAkwcbr1T59ioYh6P -zxsyPT678uD51dbtD/DXJCcoeeFOb8uzkR2KNcrnQzZpCJnRq4Gp5ybxwsxxuzpr -gz0gbNlhuWtE7EoSzmIK9t+WTS7IM2CvZymd6/OAh1Fuw6AQhSp64XRp3OfMMAAC -Ie2EPtKj4islWGT8VoUjuRYGmdRh4duAH1dkiAXOWA3R7y5a1/y/iE8KE8BtxocB -AoHBAM8aiURgpu1Fs0Oqz6izec7KSLL3l8hmW+MKUOfk/Ybng6FrTFsL5YtzR+Ap -wW4wwWnnIKEc1JLiZ7g8agRETK8hr5PwFXUn/GSWC0SMsazLJToySQS5LOV0tLzK -kJ3jtNU7tnlDGNkCHTHSoVL2T/8t+IkZI/h5Z6wjlYPvU2Iu0nVIXtiG+alv4A6M -Hrh9l5or4mjB6rGnVXeYohLkCm6s/W97ahVxLMcEdbsBo1prm2JqGnSoiR/tEFC/ -QHQnbQKBwQDEu7kW0Yg9sZ89QtYtVQ1YpixFZORaUeRIRLnpEs1w7L1mCbOZ2Lj9 -JHxsH05cYAc7HJfPwwxv3+3aGAIC/dfu4VSwEFtatAzUpzlhzKS5+HQCWB4JUNNU -MQ3+FwK2xQX4Ph8t+OzrFiYcK2g0An5UxWMa2HWIAWUOhnTOydAVsoH6yP31cVm4 -0hxoABCwflaNLNGjRUyfBpLTAcNu/YtcE+KREy7YAAgXXrhRSO4XpLsSXwLnLT7/ -YOkoBWDcTWECgcBPWnSUDZCIQ3efithMZJBciqd2Y2X19Dpq8O31HImD4jtOY0V7 -cUB/wSkeHAGwjd/eCyA2e0x8B2IEdqmMfvr+86JJxekC3dJYXCFvH5WIhsH53YCa -3bT1KlWCLP9ib/g+58VQC0R/Cc9T4sfLePNH7D5ZkZd1wlbV30CPr+i8KwKay6MD -xhvtLx+jk07GE+E9wmjbCMo7TclyrLoVEOlqZMAqshgApT+p9eyCPetwXuDHwa3n -WxhHclcZCV7R4rUCgcAkdGSnxcvpIrDPOUNWwxvmAWTStw9ZbTNP8OxCNCm9cyDl -d4bAS1h8D/a+Uk7C70hnu7Sl2w7C7Eu2zhwRUdhhe3+l4GINPK/j99i6NqGPlGpq -xMlMEJ4YS768BqeKFpg0l85PRoEgTsphDeoROSUPsEPdBZ9BxIBlYKTkbKESZDGR -twzYHljx1n1NCDYPflmrb1KpXn4EOcObNghw2KqqNUUWfOeBPwBA1FxzM4BrAStp -DBINpGS4Dc0mjViVegECgcA3hTtm82XdxQXj9LQmb/E3lKx/7H87XIOeNMmvjYuZ -iS9wKrkF+u42vyoDxcKMCnxP5056wpdST4p56r+SBwVTHcc3lGBSGcMTIfwRXrj3 -thOA2our2n4ouNIsYyTlcsQSzifwmpRmVMRPxl9fYVdEWUgB83FgHT0D9avvZnF9 -t9OccnGJXShAIZIBADhVj/JwG4FbaX42NijD5PNpVLk1Y17OV0I576T9SfaQoBjJ -aH1M/zC4aVaS0DYB/Gxq7v8= +MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQDFtLOteQlQojN7 +ztkux7m0hmGKkP1hh0hbKqTcD87jkLAqAwZWenjZMjCbbZ3vP+AObCIkYIKzPXY7 +Yi+H5M3O2mXIDxoHGjL/GWtoEyDNXvm9UC+MRuSOq2MaLHHQG0Rx2TxcYrMVUM7b +93rpN1LGRrCv1gISXM4EvEJooAR7Aadj0pG/o0fqDAdFjH6QZbhn1iZle+eGbjcf +dgH/H0F8dn1PPGoViHXicbsQ4kB6002Pf+aXP4b2QKAbflyNHEKHPHEOOTXrFjMd +c+bqKW24epEsMZI59qx9hU/4Rvp3/v+vEwTL7Nm7ilptzZn2cvGCW39LC0nNYLOz +kO3H8xwA75h6uykdB+WO/v2CKIK9M/ZO+9QNrmaokfKDamCk39b8hlCwNL6LsVpv +d3XTS5Wn4YWn92EqiltUJJoPo7pc7VTdWCg4zVFn4Q8Zh4NFNn/qTB8lEMgrsNTV +5cyZ7zhoBiUMSO45bmo2NsnE7ce/JUhlqe5uh0PT1MIBgTV+oDMCAwEAAQKCAYEA +udsy4gwblqK0tVnxz0lQqYV+os3EdO/BNHr1Oi7eNg2pngTz603812mYSjUVOHma +vtQmkH3twGQyBoc52Y1dcGzdK+IOfMjDUg7qao840ffL3I1J9ZwbdodlhZBsec94 +W3J1jP/4DDzICf8vm5g3h0+i/9m2Xt7BibAU2dg7/grC+lNUUoxDqaEfIOF/hW0q +muq1c8e0EisAROIh5FzUqhWVnWxU6eM7tuFlkuyu4whLLHB3LI466Lo+CTqT9M+v +jJYlvS5+AZW3qMBp6WOI8C+VIiBL178mo+Igkyyy5AYXcWeNkjp6ygRWvtWXIhCv +CI29mf+BP/54jAY0rQRXJ2UcSHXmM6PTDkE/L2OKeiY1Ou8gLOwun3yBVdbkXJMb +PWmUW4N8qSIJQ+vE2TDqmkqAT6m+ilzOXl1O+LLTvGyMnOiiSLXK9mC4ND3tqaQu +hvKivnI1doErcWUaIf1DHiJmLrGxrTCUKjCEoefqVq2/dDdtCfx7CqUvjl3DYKMB +AoHBAP+Vdi6D07gZFepEGCaJ+YH6cxEyO73CNnea/F1whVAzOv91kHS32jC9PAI3 +/wYlX+DLcN9mVF/q62V4SLZYfOxTPW4vWO0A45URe9s9Z795fdAcQ5jt3QFOVSnk +3XSaCkIOwckuwabGJi4+foiUEOnLLzQi1/g7x12dwejxVNhqhz5KFkOQPv8fQRed +sb5LVLYDeprsB2Vsx0fHwg4z9FvTIxLBeI7+sJD30lNpYZrCl/T9x4e1SV2Rwn2W +bghxgQKBwQDGBx07biZK9RB5g4qPl+G6vz0M+/KBfpwQbMYxSyct7u6gfGD9mWBO +qocIIr39Unac3kUL237Cn3HbgiGCRe7Mwd7XqnSSGWM5oWSlVQxEKTXYUlTbd9O9 +DKuyQGOl/AMEwD4ZbEOfQNmnd1U4nh1AV052FQY8Ry/atGFT9fApA/5X/bbenOwQ +YGDsokLzPf2BIDncpE+VNevUMoMI7EnySgjjfpL+cRld0qpLqBMo2h5VddeJ/5YM +1YcNfMQiw7MCgcEAwXqXuKa7A8aZvHpH/gS9CRRbP01TxFbdfLWrDeE8SnY9111c +Ob9kQTk/0D4rpK9uYXIgxD1m6iWghXQFN2TNTOnGuz7EhsYBgrt1k4Zsn5qND5oV +4hNPFsoB1nEW5EooMdGSCYaHuoSOKrvMdgAAvbu+xC0MaTJ3vfrK7Fik7h/WueTD +7emohuFWGVabU38bZZ5EljrPboxmX4Rs9uuFtG2lQ3GKnlVXvKaeZd6EsO9WsXPc +NHOcUmUhYokaSvIBAoHAGCxGJTsM8Zl4qVylTWH87A7sJOmccLJD2r1sdBf4cGL6 +PhzwugQ+/VtToGqdRo8Ka5u2Ufw5PQi5nVIFRSHERLpluW3VTQBMXHyXDJeVJ7zg +Fcf3E9NMxYcGbnvtrhVVSP8ulWvh1U7VQtwOSxsB9xixOzjVygXmkYvzVYxwBJG4 +OoV+DS6aomUhb8Fe6tJmX5zPc1+bV1t9ril8VVqCrFDdROfuiaDEt+8/Wnzp2dLG +YShBZ1cLugVWtw7D4nqBAoHAF29k64iAxY5Y4OOibVkqjUCPyqG2oxiXqgO7CxZp +FGUat5UtV2mIBlSENs1o5AZ1nPlgWtPtg0xVCaG2t/Rq7ugvUfAnAhUK6zX8FS+T +gCXE+7iKuuIJiCo13/iAwF/CLfuXvj4CZ71ta0wX9w99f1FcPEk0x+ytiyuWJK8K +tyubL34JwNrnkh/8e3LcV3L88Sk9ZmxeTz31f3cA3Fy2ZJOAUMD9dKXeKtY7azzt +MkhXedRsdLSKqMh0VGeGHoLS -----END PRIVATE KEY----- Certificate: Data: Version: 3 (0x2) Serial Number: cb:2d:80:99:5a:69:52:5c - Signature Algorithm: sha256WithRSAEncryption + Signature Algorithm: sha256WithRSAEncryption Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server Validity Not Before: Aug 29 14:23:16 2018 GMT - Not After : Jul 7 14:23:16 2028 GMT + Not After : Oct 28 14:23:16 2037 GMT Subject: C=XY, L=Castle Anthrax, O=Python Software Foundation, CN=localhost Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (3072 bit) + RSA Public-Key: (3072 bit) Modulus: - 00:9f:28:2f:37:41:ef:7f:64:63:16:62:16:e9:01: - 14:62:29:ca:3a:98:92:3d:08:d3:5e:69:fe:c0:f3: - d4:c4:fb:0e:58:dc:64:b0:4b:cb:b3:aa:9e:42:e9: - 07:9b:67:33:cd:b9:e8:3c:1d:8a:13:c0:df:39:67: - 7c:4c:d3:7e:bf:43:0f:4a:85:05:6d:87:e5:c3:02: - a3:3e:d7:d7:b9:28:79:18:73:18:37:77:76:48:d4: - 78:18:d7:bd:1e:6a:46:8b:06:f3:03:37:95:0b:a0: - 53:b0:22:cd:8f:b7:03:36:a3:d7:23:77:99:9f:4a: - e5:ad:b4:8e:be:7c:2a:a8:a7:cf:e5:f1:c7:ab:1b: - d8:97:d8:61:f7:f6:9d:e2:5b:05:a8:4d:9b:98:9d: - d0:00:f6:a6:2f:d3:b6:16:6a:3b:90:d4:44:96:28: - f8:c7:60:64:e7:32:fb:b8:c4:8c:e2:6c:2d:66:5d: - dd:8c:ea:ef:c8:8c:d3:ba:83:8d:ba:48:a1:5a:44: - 35:90:93:1d:35:80:85:7f:0b:22:ac:f4:38:19:a1: - e3:07:90:a6:6e:3e:a6:55:3b:13:8a:f8:0f:cd:ae: - 6a:ea:1c:5b:0f:22:ca:ec:e7:09:3b:40:05:63:bb: - 9f:d7:d6:c9:29:9f:f5:06:42:59:8c:47:00:5a:41: - 42:ce:b3:51:5a:80:0f:b9:e1:15:d4:ea:a5:0f:5b: - 46:26:84:9e:31:38:1e:20:1c:70:f5:be:30:0a:12: - c4:59:ef:fe:b3:73:13:32:3a:6f:8c:d4:36:ca:45: - 31:f8:35:68:d5:5a:99:d8:f1:76:95:19:d4:61:b5: - 3a:47:f4:c8:f2:72:92:a1:17:e0:f6:65:dc:b6:b5: - 05:ed:aa:ed:86:75:c3:27:51:e7:6d:d7:77:e7:f7: - 10:ee:3f:83:e8:a6:11:34:8a:9f:c8:32:09:fe:91: - be:26:f5:ef:92:f8:af:65:95:d4:25:d0:1f:b8:05: - c1:96:02:a1:de:96:1d:8a:b9:4d + 00:c5:b4:b3:ad:79:09:50:a2:33:7b:ce:d9:2e:c7: + b9:b4:86:61:8a:90:fd:61:87:48:5b:2a:a4:dc:0f: + ce:e3:90:b0:2a:03:06:56:7a:78:d9:32:30:9b:6d: + 9d:ef:3f:e0:0e:6c:22:24:60:82:b3:3d:76:3b:62: + 2f:87:e4:cd:ce:da:65:c8:0f:1a:07:1a:32:ff:19: + 6b:68:13:20:cd:5e:f9:bd:50:2f:8c:46:e4:8e:ab: + 63:1a:2c:71:d0:1b:44:71:d9:3c:5c:62:b3:15:50: + ce:db:f7:7a:e9:37:52:c6:46:b0:af:d6:02:12:5c: + ce:04:bc:42:68:a0:04:7b:01:a7:63:d2:91:bf:a3: + 47:ea:0c:07:45:8c:7e:90:65:b8:67:d6:26:65:7b: + e7:86:6e:37:1f:76:01:ff:1f:41:7c:76:7d:4f:3c: + 6a:15:88:75:e2:71:bb:10:e2:40:7a:d3:4d:8f:7f: + e6:97:3f:86:f6:40:a0:1b:7e:5c:8d:1c:42:87:3c: + 71:0e:39:35:eb:16:33:1d:73:e6:ea:29:6d:b8:7a: + 91:2c:31:92:39:f6:ac:7d:85:4f:f8:46:fa:77:fe: + ff:af:13:04:cb:ec:d9:bb:8a:5a:6d:cd:99:f6:72: + f1:82:5b:7f:4b:0b:49:cd:60:b3:b3:90:ed:c7:f3: + 1c:00:ef:98:7a:bb:29:1d:07:e5:8e:fe:fd:82:28: + 82:bd:33:f6:4e:fb:d4:0d:ae:66:a8:91:f2:83:6a: + 60:a4:df:d6:fc:86:50:b0:34:be:8b:b1:5a:6f:77: + 75:d3:4b:95:a7:e1:85:a7:f7:61:2a:8a:5b:54:24: + 9a:0f:a3:ba:5c:ed:54:dd:58:28:38:cd:51:67:e1: + 0f:19:87:83:45:36:7f:ea:4c:1f:25:10:c8:2b:b0: + d4:d5:e5:cc:99:ef:38:68:06:25:0c:48:ee:39:6e: + 6a:36:36:c9:c4:ed:c7:bf:25:48:65:a9:ee:6e:87: + 43:d3:d4:c2:01:81:35:7e:a0:33 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Alternative Name: @@ -90,9 +90,9 @@ Certificate: X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: - 8F:EA:1D:E3:33:5C:00:16:B3:8B:6F:6B:6F:D3:4C:CB:B5:CB:7C:55 + 85:75:10:25:D0:2C:80:50:24:1A:5B:57:70:DE:B5:CB:71:A9:3B:7B X509v3 Authority Key Identifier: - keyid:DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48 + keyid:B3:8A:A0:A2:BA:71:F1:A8:24:79:D4:A4:5B:25:36:15:1E:49:C8:CD DirName:/C=XY/O=Python Software Foundation CA/CN=our-ca-server serial:CB:2D:80:99:5A:69:52:5B @@ -106,59 +106,59 @@ Certificate: URI:http://testca.pythontest.net/testca/revocation.crl Signature Algorithm: sha256WithRSAEncryption - 27:f5:8c:59:10:f4:c6:e7:28:00:bf:ba:8d:7b:13:03:f1:1c: - a6:5f:b3:06:55:a4:22:b9:db:b2:d5:46:bd:f7:0c:dd:43:6e: - b4:79:65:67:21:0c:2a:55:ee:40:8e:85:9f:9f:47:bb:0a:2a: - 4d:b6:64:74:98:a0:7f:ae:dc:f1:2e:db:42:77:18:e0:75:8b: - 26:35:68:c3:41:ed:6b:c8:77:72:6f:6a:9a:5d:55:69:02:fd: - 5a:54:c8:57:cb:b0:65:03:16:e2:0f:00:39:99:66:a0:9b:88: - 93:17:e2:5a:2d:79:35:5f:97:57:78:c4:af:f5:99:5e:86:ab: - d3:11:ad:1a:a2:0d:fa:52:10:b9:fe:bf:9d:ce:33:d9:86:b2: - 9c:16:f8:d6:75:08:8a:db:0a:e5:b4:2b:16:7f:b4:f9:2a:9f: - c3:d2:77:d7:cd:65:1e:f4:6c:1e:eb:59:b9:f0:ae:5f:a4:1f: - cc:4a:c4:b9:7a:a9:d9:6b:32:68:3b:e1:65:b0:84:b7:90:c4: - ae:fe:f4:37:4f:21:a0:de:9f:3a:b1:e5:cc:16:04:66:3f:0b: - 41:dc:42:3d:20:3e:ec:b7:95:2b:35:57:fa:be:7f:b6:3a:ba: - ca:4f:58:fe:75:3e:08:89:2c:8c:b0:5d:2e:f9:89:10:2b:f9: - 41:46:4f:3c:00:b7:27:d3:65:24:28:17:23:26:31:42:ea:7e: - 4e:93:e4:7b:68:54:ca:9f:46:f3:ef:2b:e9:85:0c:b5:84:b2: - d5:35:34:80:75:2b:f0:91:23:b8:08:01:8e:b9:0a:54:d4:fb: - 34:52:fe:d9:45:f0:80:3b:b6:c1:6f:82:d1:1f:f2:3b:08:f6: - 46:a6:96:27:61:4b:58:32:7a:0e:1d:59:c5:44:ad:5e:1a:79: - 33:c1:d4:05:2f:4a:d3:d8:42:42:8d:33:e3:63:ca:d5:87:97: - 9b:4d:b8:1a:03:34:bb:1c:d2:02:3f:59:23:e2:23:80:88:63: - c2:f0:a2:63:a8:8b + 95:f3:56:bb:d5:8c:70:bd:d1:de:da:63:b0:29:d7:db:60:27: + d6:59:fd:61:1b:30:c6:d0:5d:73:7d:34:e1:68:e3:28:a6:89: + e6:60:bd:89:d3:0e:f4:72:ad:72:76:f8:86:21:fd:75:3c:f8: + 6d:be:9c:04:e1:82:03:69:6c:ae:d0:55:ba:5e:f2:ca:f5:0f: + 8e:d6:d9:8d:c8:56:46:f4:f8:ac:74:2a:19:7b:8e:47:70:1f: + fb:fb:bd:69:02:a1:a5:4a:6e:21:1c:04:14:15:55:bf:bf:24: + 43:c8:17:03:be:3e:2c:ea:db:c8:af:1d:fd:52:df:d6:15:49: + 9e:c2:44:69:ef:f1:45:43:83:b2:1e:cf:14:1c:13:3f:fe:9c: + 71:cb:e7:1b:18:56:36:a7:af:44:f1:0b:a1:79:44:46:f9:43: + 46:29:d8:b0:ca:49:4d:65:60:d3:f6:8e:74:bc:62:9e:1e:8d: + 4b:29:9a:b4:0d:f0:a2:77:5b:34:e4:11:2f:a7:25:c5:e5:07: + 76:12:ae:be:75:73:15:e4:0a:7d:53:38:56:3f:79:6d:6e:ca: + ed:80:ab:56:ed:7e:8b:1c:e7:e3:d4:62:30:22:70:e7:29:b2: + 03:3c:fe:fa:3d:f0:36:c0:4d:11:a2:99:d3:29:31:27:b8:c5: + b8:15:a3:3c:4f:9b:73:5e:2b:b2:fb:cb:fd:75:47:b8:17:bd: + 21:d8:e6:c1:b9:ff:73:81:d8:25:08:6d:08:5e:1c:a5:83:50: + de:67:e6:da:d0:8e:5a:d3:f2:2a:b1:3f:b8:80:21:07:6a:71: + 15:6d:05:eb:51:b3:59:8d:d4:15:46:7e:02:a8:13:01:16:99: + bd:03:cc:70:71:2a:23:16:78:af:d1:d5:01:9d:04:b4:63:93: + 9a:04:3a:92:2e:e6:7e:73:93:a5:fe:50:9b:bd:0e:ea:54:86: + 6f:7c:e5:14:77:fe:c2:28:5a:4a:0e:d7:2d:8c:e9:ed:61:29: + b2:53:ff:6c:04:bc -----BEGIN CERTIFICATE----- MIIF8TCCBFmgAwIBAgIJAMstgJlaaVJcMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV BAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEW -MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0yODA3MDcx +MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0zNzEwMjgx NDIzMTZaMF8xCzAJBgNVBAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEj MCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZvdW5kYXRpb24xEjAQBgNVBAMMCWxv -Y2FsaG9zdDCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAJ8oLzdB739k -YxZiFukBFGIpyjqYkj0I015p/sDz1MT7DljcZLBLy7OqnkLpB5tnM8256DwdihPA -3zlnfEzTfr9DD0qFBW2H5cMCoz7X17koeRhzGDd3dkjUeBjXvR5qRosG8wM3lQug -U7AizY+3Azaj1yN3mZ9K5a20jr58Kqinz+Xxx6sb2JfYYff2neJbBahNm5id0AD2 -pi/TthZqO5DURJYo+MdgZOcy+7jEjOJsLWZd3Yzq78iM07qDjbpIoVpENZCTHTWA -hX8LIqz0OBmh4weQpm4+plU7E4r4D82uauocWw8iyuznCTtABWO7n9fWySmf9QZC -WYxHAFpBQs6zUVqAD7nhFdTqpQ9bRiaEnjE4HiAccPW+MAoSxFnv/rNzEzI6b4zU -NspFMfg1aNVamdjxdpUZ1GG1Okf0yPJykqEX4PZl3La1Be2q7YZ1wydR523Xd+f3 -EO4/g+imETSKn8gyCf6Rvib175L4r2WV1CXQH7gFwZYCod6WHYq5TQIDAQABo4IB +Y2FsaG9zdDCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAMW0s615CVCi +M3vO2S7HubSGYYqQ/WGHSFsqpNwPzuOQsCoDBlZ6eNkyMJttne8/4A5sIiRggrM9 +djtiL4fkzc7aZcgPGgcaMv8Za2gTIM1e+b1QL4xG5I6rYxoscdAbRHHZPFxisxVQ +ztv3euk3UsZGsK/WAhJczgS8QmigBHsBp2PSkb+jR+oMB0WMfpBluGfWJmV754Zu +Nx92Af8fQXx2fU88ahWIdeJxuxDiQHrTTY9/5pc/hvZAoBt+XI0cQoc8cQ45NesW +Mx1z5uopbbh6kSwxkjn2rH2FT/hG+nf+/68TBMvs2buKWm3NmfZy8YJbf0sLSc1g +s7OQ7cfzHADvmHq7KR0H5Y7+/YIogr0z9k771A2uZqiR8oNqYKTf1vyGULA0voux +Wm93ddNLlafhhaf3YSqKW1Qkmg+julztVN1YKDjNUWfhDxmHg0U2f+pMHyUQyCuw +1NXlzJnvOGgGJQxI7jluajY2ycTtx78lSGWp7m6HQ9PUwgGBNX6gMwIDAQABo4IB wDCCAbwwFAYDVR0RBA0wC4IJbG9jYWxob3N0MA4GA1UdDwEB/wQEAwIFoDAdBgNV HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4E -FgQUj+od4zNcABazi29rb9NMy7XLfFUwfQYDVR0jBHYwdIAU3b/K2ubRNLo3dSHK -b5oIKPI1tkihUaRPME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29m +FgQUhXUQJdAsgFAkGltXcN61y3GpO3swfQYDVR0jBHYwdIAUs4qgorpx8agkedSk +WyU2FR5JyM2hUaRPME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29m dHdhcmUgRm91bmRhdGlvbiBDQTEWMBQGA1UEAwwNb3VyLWNhLXNlcnZlcoIJAMst gJlaaVJbMIGDBggrBgEFBQcBAQR3MHUwPAYIKwYBBQUHMAKGMGh0dHA6Ly90ZXN0 Y2EucHl0aG9udGVzdC5uZXQvdGVzdGNhL3B5Y2FjZXJ0LmNlcjA1BggrBgEFBQcw AYYpaHR0cDovL3Rlc3RjYS5weXRob250ZXN0Lm5ldC90ZXN0Y2Evb2NzcC8wQwYD VR0fBDwwOjA4oDagNIYyaHR0cDovL3Rlc3RjYS5weXRob250ZXN0Lm5ldC90ZXN0 -Y2EvcmV2b2NhdGlvbi5jcmwwDQYJKoZIhvcNAQELBQADggGBACf1jFkQ9MbnKAC/ -uo17EwPxHKZfswZVpCK527LVRr33DN1DbrR5ZWchDCpV7kCOhZ+fR7sKKk22ZHSY -oH+u3PEu20J3GOB1iyY1aMNB7WvId3JvappdVWkC/VpUyFfLsGUDFuIPADmZZqCb -iJMX4loteTVfl1d4xK/1mV6Gq9MRrRqiDfpSELn+v53OM9mGspwW+NZ1CIrbCuW0 -KxZ/tPkqn8PSd9fNZR70bB7rWbnwrl+kH8xKxLl6qdlrMmg74WWwhLeQxK7+9DdP -IaDenzqx5cwWBGY/C0HcQj0gPuy3lSs1V/q+f7Y6uspPWP51PgiJLIywXS75iRAr -+UFGTzwAtyfTZSQoFyMmMULqfk6T5HtoVMqfRvPvK+mFDLWEstU1NIB1K/CRI7gI -AY65ClTU+zRS/tlF8IA7tsFvgtEf8jsI9kamlidhS1gyeg4dWcVErV4aeTPB1AUv -StPYQkKNM+NjytWHl5tNuBoDNLsc0gI/WSPiI4CIY8LwomOoiw== +Y2EvcmV2b2NhdGlvbi5jcmwwDQYJKoZIhvcNAQELBQADggGBAJXzVrvVjHC90d7a +Y7Ap19tgJ9ZZ/WEbMMbQXXN9NOFo4yimieZgvYnTDvRyrXJ2+IYh/XU8+G2+nATh +ggNpbK7QVbpe8sr1D47W2Y3IVkb0+Kx0Khl7jkdwH/v7vWkCoaVKbiEcBBQVVb+/ +JEPIFwO+Pizq28ivHf1S39YVSZ7CRGnv8UVDg7IezxQcEz/+nHHL5xsYVjanr0Tx +C6F5REb5Q0Yp2LDKSU1lYNP2jnS8Yp4ejUspmrQN8KJ3WzTkES+nJcXlB3YSrr51 +cxXkCn1TOFY/eW1uyu2Aq1btfosc5+PUYjAicOcpsgM8/vo98DbATRGimdMpMSe4 +xbgVozxPm3NeK7L7y/11R7gXvSHY5sG5/3OB2CUIbQheHKWDUN5n5trQjlrT8iqx +P7iAIQdqcRVtBetRs1mN1BVGfgKoEwEWmb0DzHBxKiMWeK/R1QGdBLRjk5oEOpIu +5n5zk6X+UJu9DupUhm985RR3/sIoWkoO1y2M6e1hKbJT/2wEvA== -----END CERTIFICATE----- diff --git a/Lib/test/keycert4.pem b/Lib/test/keycert4.pem index d1ebb82486de24..1003d67fd075ec 100644 --- a/Lib/test/keycert4.pem +++ b/Lib/test/keycert4.pem @@ -1,84 +1,84 @@ -----BEGIN PRIVATE KEY----- -MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQDGjpiHzq7ghxhM -ZzrnRsGBC/cmw8EREIdbqlrz/l8BFaWeipvO5Hb/MyU8xs2zLUrqIr2JNf+Eii8Y -m4bYmZclFra4jomaiSlxTZOe3dMV8m4vAq4eT2mSfZZC1+XAutqdz7WhHxhMVEm3 -AyTWvTC3qCbnlbX5VIoQUwFrsSWqDiHyaGdK3rrOTKFUKM8YPiq/BZkm6A4eiFci -5wd/SPD+w0pIscZbQW1MUr5bs54uylWaUmtfI8KJt6BDZQ/uA06c6i863sSCEI6L -gq+wyikeJGNMxZMfgu3dzfv4BiZBQX0ZhiRvqseDSdPcuVa2Ifb6CFlg298neweY -4EAIE1O+uqo5h8FF1aUOMZpQEZuzsp9R/TAMBHX1YmVjG/kRdBeaHe3whzB1Pfue -PIX2ZTMmLNYbYbfnmxhk1nn8aAvoT98pNw8y3/2k2KNsu24n9uSkkxAoqJ19WKwm -mL8MpJKAzLv45tRvhN+QLtnRdu+LJ9m29npQHFmYLbdqRfmidnMCAwEAAQKCAYBd -w1C8MRnb5W/QBJ+IP515NxFLOP2e9VM2MkgpGGH8vSAssf/Jv5GCCcD35lmU1zqd -PjKK7PjwueBrmmYfOshpN0Sp+oV4eHUdkCi5yL65inYFtRpMLewIxU2D2zgfvx0l -kMSQhYKP6O22gsGOtmCfGcTlb4kzaHyaINh25nyGxY26TxsX+/3zFbTJbUv+grzk -39vmx4aDXJbpYHfl36gOZmJZ2bl1tnvKovhJjZSRO/MYoPsbPmPLbO89ZCgVmXFc -GVkb5Cram6i3iyutSDjxWN7Fb8uy8pFLPGAXZgF7pQoXPSEHZe8GEWBnWSC9KaDa -uM9Ir847/Muy1ceCmxKcI2WrSjoH2AhPcmHgvbPE9Mynr6+uzReSP3q7Wh9PHm23 -oFx3DwdCfmjysnpAMBawNmJdWyxVDbZ6eyrhp17ADpsMaDTynZ+fJjgMr+MmWtbU -YSRD0wWtl/DrzsaePZsOjCpKYJyulC+rh9/Zz1aiwrGWPbgEAzDrD6Q1Zp0mUCEC -gcEA+XskmGIB9rRPy+YQmRgzQ555PsjLWsnQsNktP6KBhlQjFKJZXRZ0DxDTS7h8 -NrJrUDBmwfsgzggVbeO55VP5FGwD6DNeO/Bz++Fdevh8uKQFHDfk4sbIUPS91qw4 -s7OW7PR7C7Jf7Dnjmsn42o2lO4FsbcEn2F+PHOvoLl/OrSx73lS/RkdOEItW8d8/ -ExRohylnba/I2vCE9bNZd4DGjMW87j/THKPadDZWEqWggcrjY8x6ibSQGm2n2Tka -8B+vAoHBAMu+zl8kqFlYDG24dGfVpMaOYj5Osj0cV5f7O2pZ15sCevjiqoKGHH7G -O8EiI5pRBZ893+Fsx6YWmcKue88lfGvaoQjV0LUbfMfX/FoD39w/ZLx31yKEiFuc -KvMiRV5mO3kQiHBVX9vamzr5NeaErccXY9LnhaKOMX9blgiDQZH7fc3RhodcFWrC -9yfX6ryfidpPnRvK7Ops7hVnFKyyS4FaAarnzH1B2WcVcD4lYYxhMc8VXeU3eKOh -j1fI/F5ifQKBwQDpCjB670HqUzAexL9IYqSwSz3yedoK6m24ZIWx5XicI8fJJIXZ -QHoVAKB/IMtWxH8dnri+Bnj0O/TYe1pQb4pBm0xjAGjMEKYm6LNLhQXr67qiS0vQ -0eKYTKVv+9vTcLRQj2bI3Exh+wkys+tzK9DmrtS8CSvRICIs3+g4OWJzvRPP8NXj -LgQrzBzhPqpKhkvFxdVJTmSOrxFj+a5exLmzEZqT6qanIB+VYpQwQuqVkxGpTX5B -V5ssNLYPYRpapx0CgcByCtQixzcAA1u5knR9pkT76ris3YnA0Ptqk3I3XiBjoGjK -pL0CICUVBMpvmTdKai12a8DDwgqiOaZJJTchxH63NAHNGzkeFkuq5IdYrzB/bHBr -WbzukjZs6KXVv4oKg7ioVAu6rN7iBaO7x8BWzk8i0EHMzFCto1+rRM1e6HEsUBOj -v7LIU0+dmZGUGLRIbhhQPR3Yb6ZatSwyiKc23vmKZqHmUqbQOaqBm6te7beDRugF -XJVY9sqs9IJyhYpVHlUCgcAPoslwYKeAXagsxdQrH3D9VJDXVOHWKMBqQZDio5dB -Q80uWpuxtt6nhZkQO1JIWnYb6v+zbDbcgjByBIDuxCdBW9d+QQnanKmVyrXguK91 -C3OcHHOmSduFdWC3/zYW1mW97Tz1sXyam2hly1u3L5kW+GnE1hr9VVPjQNrO9+Ge -qW0coaJqKY78q3Rm2dtyZeJSFFI1o/DQ3blyItsFpg/QrR+a5XrS6Nw2ZLIL4Azo -J1CTgMwjhwlMNCI4t4dkHd0= +MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQC34y3S6iXdmdvd +M/2aFBe6CvRvZwhh1huGl7IQRtdoakPqMLlEdNHJtNeF5M27xLei+p4wt7N1Jyi0 +2keHQb1m9TqH5AruOkE2ti+15zEoKoU9aWydTiH+epKTT0yjg2NcKQjRUaWcbhzB +H4EMKuCIlzIIz8/EIKkOqhCDwq6+Fv3Ays+z7Bz+yR80ixivKu/l7SjxQ7z7R/kC +I7OViRcIO5QBQPj7VLvCTz4VA6u/LdXngK2HNuau6WXm5yNNQbqrB11AEJcYZf/c +VrneV4F+ZjLloAKgSn9GB8eWOyilTQ18TcKd+H2icipRaP/+QR/KPx5GK/SXU3my +qm62QOGI7t/5ktVdjGhs6tHZxw1SRiipiLYWbtVRrSxa4wYlgpgoUwvrvvtC5kAN +nTw1VGWsxcs+6a7+PocYnJiq7k4b5OAUb3Ryvl9DLAMy8NqpRWo4cHD/XQ3FCYwF +HlOSgx/dL5Se0i3dW1KzbP6OvaNg6nl/1EXPUsJ1ATS8nzvzhccCAwEAAQKCAYEA +nD3GvaJ9MeB802JNZBEWZ9jO/6jHknldQeq6POI0PF+t/NoRUH0BkyS4yucxdw0a +CrxulG5BaJUxHRkqFV5iE4zhgnzcXLXamyYJO8GIHtyiASAGTVIJyDNVPxztvTDx +x2iGOXPqBxP4Eo82EqSLywLMXHhVzAsEGZWeGpXb61+Vk62+9Nz1dfZlMTvOaWdO +Fkp/sx8e/1KT3KGBANlOXIxioP4Xj1Tbg6nY0fogf3vud5j52B1pu8xL7PkPIaFq +DEGz3XvWhBF/+Cs5iDeYz8eQpfQig7HdHVn2D8dZmzQgpLw1yGbPAnqrgopWfm7R +MqiyFe82p2t+vfSoG5jz28XxPtzBJV3ljxKxlbnclqu/CAYSjzaYohDzyhjdZOZI +r9DOfWOqu01Ha3EEsApn95fusHHGTH2FOy0u61FSTrfLfqsLw9WRJPWleirKikhf +SZzi223QrmzZMtuCF7VgTx3ghDhBmFD8uzVVQ1SwPZ8CgftRkFcn1llXIAfJ3iHB +AoHBAOg3DOIdtUVgpjMKhpAyuH54fYvGl7afIMNbKRle0kCiP45wtGJ43RPMqiR8 +1rxZB3+iapICI/lnhk3O7vVRkR64yiqQBcl/hXZ1BhyD6iDXWYmm5mcnymcoqfwc +p9TfzEPyGPb3SM2YlI0cSPRqM/jDvGvnDeKIpzEKvUlwJ59WoN2HOHTIXf+XbN5n +unpuTt6YKJvc48DrXsPnUzkCmUfbOmgHfeb9/qBs/8kY4YJMsZEjqf88o7mCJCIy +BtDxTwKBwQDKuOwE8e0GIA01ZHd6RfR+ZCvmp2oauxal4EJsBx+ZZnhEWGaSm1fE +Bf/ih074ghcSKoSrdYpD1xGZ6fGVWMx3jcL11yLDOUiiPDJsm8hUBZ0IW1qXyfCP +l7xy1bUkWwPXdmFuGp1exrcjooKrFNuTdYiK4nQZSKuCfXQRADrmEJmM+gYwhqI7 +4XsYo848B9A4hbY6RLEox4uvo/RmafY0iR0PMhVEc+ydNLKB/4LpahZqBQ4kTpMv +o4+rEvYt1gkCgcB08gx177ozx1nMCLf99N0/LBUmCIytNvR8DfPjyAIg9NUHOjFO +CkpkR0VEfO50Cm4hVD1RbOyLFRzpIJbtSvfHvg5qYv/XG3auUn8Sa0jE408/aKNO +PhbL3wnEYvYO2ep4KXtzHNQ4XmgprJ39IWMtG/5PZRx0ApgYtazgSDBcKXd4OTow +bhwQtUTpuNmMAPONXJnO7O5yYNbn2B7sbiedrYV7kJJSe4X5awtiTjp7sX4XdxuM +5BAcQ7NI2WLfZTcCgcBp/X9hIoATmMRvKwUQx+yJ/KO7Z8KhETpJJdR0mNDbqmit +Cy8t7cxYb+6WqLoQUivv0o0k/EJ7L8JDH76woAnfZB4P3RiOy69/K0wN3vFBhOHS +kbju7aU53lKoE7YuuOtsRrewEng/KlRsbDY3bqNTGLt4KegbpBQQGLmLffxNd1Zh +EAQWcP33ou9yNYrJdihWtQpOssWRlash/O32ceZJF3s7C6t068tFclz2fPocQdxQ +OC5pqy9nU/P0tOhDlMkCgcEAosaBJLIeAYlOU0+2uSx5g5mIqOOTyrDEmqqad6T/ +wkB7vW2QaoDvLL22Yrzdn9vQ0V0rqzhVtan7sq5pn/BQJAueZYN8rFxS3uuW+UQk +Nsc4GLJzU8Az/2DvqEIrnE7zRc5E1FOI9gKLrBlpJB2o0hVcBznDe05Gax6Kjqbm +jHqzyU73SpxpEy3OesClCeCQIMr47HaL9aSqaEX4U9bMpgHi0HgTTHqvJ5pch0hY +dYl+WAE9LAyF1DF29BirEXVw -----END PRIVATE KEY----- Certificate: Data: Version: 3 (0x2) Serial Number: cb:2d:80:99:5a:69:52:5d - Signature Algorithm: sha256WithRSAEncryption + Signature Algorithm: sha256WithRSAEncryption Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server Validity Not Before: Aug 29 14:23:16 2018 GMT - Not After : Jul 7 14:23:16 2028 GMT + Not After : Oct 28 14:23:16 2037 GMT Subject: C=XY, L=Castle Anthrax, O=Python Software Foundation, CN=fakehostname Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (3072 bit) + RSA Public-Key: (3072 bit) Modulus: - 00:c6:8e:98:87:ce:ae:e0:87:18:4c:67:3a:e7:46: - c1:81:0b:f7:26:c3:c1:11:10:87:5b:aa:5a:f3:fe: - 5f:01:15:a5:9e:8a:9b:ce:e4:76:ff:33:25:3c:c6: - cd:b3:2d:4a:ea:22:bd:89:35:ff:84:8a:2f:18:9b: - 86:d8:99:97:25:16:b6:b8:8e:89:9a:89:29:71:4d: - 93:9e:dd:d3:15:f2:6e:2f:02:ae:1e:4f:69:92:7d: - 96:42:d7:e5:c0:ba:da:9d:cf:b5:a1:1f:18:4c:54: - 49:b7:03:24:d6:bd:30:b7:a8:26:e7:95:b5:f9:54: - 8a:10:53:01:6b:b1:25:aa:0e:21:f2:68:67:4a:de: - ba:ce:4c:a1:54:28:cf:18:3e:2a:bf:05:99:26:e8: - 0e:1e:88:57:22:e7:07:7f:48:f0:fe:c3:4a:48:b1: - c6:5b:41:6d:4c:52:be:5b:b3:9e:2e:ca:55:9a:52: - 6b:5f:23:c2:89:b7:a0:43:65:0f:ee:03:4e:9c:ea: - 2f:3a:de:c4:82:10:8e:8b:82:af:b0:ca:29:1e:24: - 63:4c:c5:93:1f:82:ed:dd:cd:fb:f8:06:26:41:41: - 7d:19:86:24:6f:aa:c7:83:49:d3:dc:b9:56:b6:21: - f6:fa:08:59:60:db:df:27:7b:07:98:e0:40:08:13: - 53:be:ba:aa:39:87:c1:45:d5:a5:0e:31:9a:50:11: - 9b:b3:b2:9f:51:fd:30:0c:04:75:f5:62:65:63:1b: - f9:11:74:17:9a:1d:ed:f0:87:30:75:3d:fb:9e:3c: - 85:f6:65:33:26:2c:d6:1b:61:b7:e7:9b:18:64:d6: - 79:fc:68:0b:e8:4f:df:29:37:0f:32:df:fd:a4:d8: - a3:6c:bb:6e:27:f6:e4:a4:93:10:28:a8:9d:7d:58: - ac:26:98:bf:0c:a4:92:80:cc:bb:f8:e6:d4:6f:84: - df:90:2e:d9:d1:76:ef:8b:27:d9:b6:f6:7a:50:1c: - 59:98:2d:b7:6a:45:f9:a2:76:73 + 00:b7:e3:2d:d2:ea:25:dd:99:db:dd:33:fd:9a:14: + 17:ba:0a:f4:6f:67:08:61:d6:1b:86:97:b2:10:46: + d7:68:6a:43:ea:30:b9:44:74:d1:c9:b4:d7:85:e4: + cd:bb:c4:b7:a2:fa:9e:30:b7:b3:75:27:28:b4:da: + 47:87:41:bd:66:f5:3a:87:e4:0a:ee:3a:41:36:b6: + 2f:b5:e7:31:28:2a:85:3d:69:6c:9d:4e:21:fe:7a: + 92:93:4f:4c:a3:83:63:5c:29:08:d1:51:a5:9c:6e: + 1c:c1:1f:81:0c:2a:e0:88:97:32:08:cf:cf:c4:20: + a9:0e:aa:10:83:c2:ae:be:16:fd:c0:ca:cf:b3:ec: + 1c:fe:c9:1f:34:8b:18:af:2a:ef:e5:ed:28:f1:43: + bc:fb:47:f9:02:23:b3:95:89:17:08:3b:94:01:40: + f8:fb:54:bb:c2:4f:3e:15:03:ab:bf:2d:d5:e7:80: + ad:87:36:e6:ae:e9:65:e6:e7:23:4d:41:ba:ab:07: + 5d:40:10:97:18:65:ff:dc:56:b9:de:57:81:7e:66: + 32:e5:a0:02:a0:4a:7f:46:07:c7:96:3b:28:a5:4d: + 0d:7c:4d:c2:9d:f8:7d:a2:72:2a:51:68:ff:fe:41: + 1f:ca:3f:1e:46:2b:f4:97:53:79:b2:aa:6e:b6:40: + e1:88:ee:df:f9:92:d5:5d:8c:68:6c:ea:d1:d9:c7: + 0d:52:46:28:a9:88:b6:16:6e:d5:51:ad:2c:5a:e3: + 06:25:82:98:28:53:0b:eb:be:fb:42:e6:40:0d:9d: + 3c:35:54:65:ac:c5:cb:3e:e9:ae:fe:3e:87:18:9c: + 98:aa:ee:4e:1b:e4:e0:14:6f:74:72:be:5f:43:2c: + 03:32:f0:da:a9:45:6a:38:70:70:ff:5d:0d:c5:09: + 8c:05:1e:53:92:83:1f:dd:2f:94:9e:d2:2d:dd:5b: + 52:b3:6c:fe:8e:bd:a3:60:ea:79:7f:d4:45:cf:52: + c2:75:01:34:bc:9f:3b:f3:85:c7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Alternative Name: @@ -90,9 +90,9 @@ Certificate: X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: - 52:E0:93:AA:52:55:B7:BB:E7:A8:E0:8C:DE:41:2E:F4:07:F0:36:FB + C8:BD:A8:B4:C0:F2:32:10:73:47:9C:48:81:32:F8:BA:BB:26:84:97 X509v3 Authority Key Identifier: - keyid:DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48 + keyid:B3:8A:A0:A2:BA:71:F1:A8:24:79:D4:A4:5B:25:36:15:1E:49:C8:CD DirName:/C=XY/O=Python Software Foundation CA/CN=our-ca-server serial:CB:2D:80:99:5A:69:52:5B @@ -106,59 +106,59 @@ Certificate: URI:http://testca.pythontest.net/testca/revocation.crl Signature Algorithm: sha256WithRSAEncryption - 29:d2:3f:82:3f:c1:38:35:a6:bd:81:10:fe:64:ec:ff:7e:e1: - c6:6f:7f:86:65:f9:31:6f:fb:ef:32:4e:2f:87:c8:42:de:6c: - 8d:b8:06:08:8f:37:70:95:7d:e1:40:d4:82:2b:8d:b3:4a:fd: - 34:c5:9e:df:ff:01:53:4a:4f:08:f4:58:e1:74:fc:78:e3:3e: - 71:a7:5e:66:07:ea:d2:04:31:e2:75:a8:4c:80:17:86:92:20: - d2:32:a7:9a:65:8b:1a:5f:f1:4c:c8:50:6d:00:fc:99:bf:69: - b3:48:f3:45:5a:ee:35:50:14:b8:f3:92:92:c6:9f:0e:5d:eb: - 0d:e8:ec:f2:a4:09:6b:dc:66:2b:fc:df:4c:fc:65:a1:ae:d3: - b5:88:6a:a4:e7:08:1c:94:49:e0:b8:c1:04:8c:21:09:6c:55: - 4b:2c:97:10:f1:8c:6c:d0:bb:ba:8d:93:e8:47:8b:4d:8e:7d: - 7d:85:53:18:c8:f8:f4:8f:67:3a:b1:aa:3e:18:34:6c:3a:e6: - a6:c7:2f:be:83:38:f5:d5:e5:d2:17:28:61:6c:b6:49:99:21: - 69:a4:a8:b6:94:76:fd:18:ad:35:52:45:64:fb:f1:5d:8e:bb: - c0:21:2e:59:55:24:af:bb:8f:b2:0a:7b:17:f0:34:97:8e:68: - a9:f2:d0:3e:f6:73:82:f8:7c:4e:9a:70:7d:d6:b3:8c:cc:85: - 04:5c:02:8f:74:da:88:3a:20:a8:7e:c2:9e:b0:dd:56:1f:ce: - cd:42:16:c6:14:91:ad:30:e0:dc:76:f2:2c:56:ea:38:45:d8: - c0:3e:b8:90:fa:f3:38:99:ec:44:07:35:8f:69:62:0c:f9:ef: - b7:9d:e5:15:42:6e:fb:fe:4c:ff:e8:94:5a:1a:b0:80:b2:0e: - 17:3d:e1:87:a8:08:84:93:74:68:8d:29:df:ca:0b:6a:44:32: - 8a:51:3b:d6:38:db:bd:e3:2a:1b:5e:20:48:81:82:19:91:c6: - 87:8c:0f:cd:51:ea + 76:87:76:4d:e4:0f:88:bf:2c:f3:58:67:c0:97:6c:cd:59:18: + 82:83:4c:04:19:a5:6d:aa:fa:64:3d:49:32:3e:e1:56:95:b2: + 13:f7:cf:d3:11:b0:72:b7:5b:e7:d7:85:69:51:3c:b6:54:80: + 45:2f:28:10:21:20:b9:ba:e9:27:5a:b7:3f:82:b7:69:f5:46: + f5:bf:a2:8b:17:7f:f2:14:d1:46:97:b5:8b:47:fb:9f:e8:5c: + 05:0e:9d:11:bd:7c:9a:03:84:0b:ca:29:66:4a:ca:0d:6f:09: + 1e:7a:27:c1:7f:03:96:70:8d:18:a5:2f:a4:98:a5:19:aa:8c: + 5d:1e:8c:3e:bb:6d:3b:c0:33:c0:15:e1:bd:09:3d:9f:e8:dc: + 12:d4:cb:44:1d:06:f5:e8:d6:4e:a1:2d:5c:9f:5d:1f:5b:2a: + c3:4d:40:8d:da:d1:78:80:d0:c6:31:72:10:48:8a:e9:10:7a: + 13:30:11:b2:9e:67:0e:ed:a1:aa:ec:73:2d:f0:b8:8a:22:75: + 0f:30:69:5c:50:7e:91:ce:da:91:c7:70:8c:65:ff:f6:58:fb: + 00:bd:45:cc:e2:e4:e3:e5:16:36:7d:f3:a2:4a:9c:45:ff:d9: + a5:16:e0:2f:b5:5b:6c:e6:8a:13:15:48:73:bd:7c:80:33:c3: + d4:3b:3a:1d:85:0e:a4:f7:f7:fb:48:0c:e9:a0:4b:5e:8a:5c: + 67:f8:25:02:6f:cd:72:c1:aa:5a:93:64:7c:14:20:43:e0:13: + 7f:0d:e1:0d:61:5e:2e:2c:cd:7a:2e:2a:ae:b6:75:6a:5f:a0: + 1a:9b:b6:67:2d:b0:a5:1c:54:bc:8c:70:7e:15:2b:c0:50:e3: + 03:bb:a4:a5:fc:45:01:c9:3f:a7:b8:18:dc:3e:08:07:a1:9b: + f5:bd:95:bd:49:e8:10:7c:91:7d:2d:c4:c2:98:b6:b7:51:69: + d7:0a:68:40:b5:0f:85:a0:a9:67:77:c6:68:cb:0e:58:34:b3: + 58:e7:c8:7c:09:67 -----BEGIN CERTIFICATE----- MIIF9zCCBF+gAwIBAgIJAMstgJlaaVJdMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV BAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEW -MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0yODA3MDcx +MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0zNzEwMjgx NDIzMTZaMGIxCzAJBgNVBAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEj MCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZvdW5kYXRpb24xFTATBgNVBAMMDGZh -a2Vob3N0bmFtZTCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAMaOmIfO -ruCHGExnOudGwYEL9ybDwREQh1uqWvP+XwEVpZ6Km87kdv8zJTzGzbMtSuoivYk1 -/4SKLxibhtiZlyUWtriOiZqJKXFNk57d0xXybi8Crh5PaZJ9lkLX5cC62p3PtaEf -GExUSbcDJNa9MLeoJueVtflUihBTAWuxJaoOIfJoZ0reus5MoVQozxg+Kr8FmSbo -Dh6IVyLnB39I8P7DSkixxltBbUxSvluzni7KVZpSa18jwom3oENlD+4DTpzqLzre -xIIQjouCr7DKKR4kY0zFkx+C7d3N+/gGJkFBfRmGJG+qx4NJ09y5VrYh9voIWWDb -3yd7B5jgQAgTU766qjmHwUXVpQ4xmlARm7Oyn1H9MAwEdfViZWMb+RF0F5od7fCH -MHU9+548hfZlMyYs1htht+ebGGTWefxoC+hP3yk3DzLf/aTYo2y7bif25KSTECio -nX1YrCaYvwykkoDMu/jm1G+E35Au2dF274sn2bb2elAcWZgtt2pF+aJ2cwIDAQAB +a2Vob3N0bmFtZTCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBALfjLdLq +Jd2Z290z/ZoUF7oK9G9nCGHWG4aXshBG12hqQ+owuUR00cm014XkzbvEt6L6njC3 +s3UnKLTaR4dBvWb1OofkCu46QTa2L7XnMSgqhT1pbJ1OIf56kpNPTKODY1wpCNFR +pZxuHMEfgQwq4IiXMgjPz8QgqQ6qEIPCrr4W/cDKz7PsHP7JHzSLGK8q7+XtKPFD +vPtH+QIjs5WJFwg7lAFA+PtUu8JPPhUDq78t1eeArYc25q7pZebnI01BuqsHXUAQ +lxhl/9xWud5XgX5mMuWgAqBKf0YHx5Y7KKVNDXxNwp34faJyKlFo//5BH8o/HkYr +9JdTebKqbrZA4Yju3/mS1V2MaGzq0dnHDVJGKKmIthZu1VGtLFrjBiWCmChTC+u+ ++0LmQA2dPDVUZazFyz7prv4+hxicmKruThvk4BRvdHK+X0MsAzLw2qlFajhwcP9d +DcUJjAUeU5KDH90vlJ7SLd1bUrNs/o69o2DqeX/URc9SwnUBNLyfO/OFxwIDAQAB o4IBwzCCAb8wFwYDVR0RBBAwDoIMZmFrZWhvc3RuYW1lMA4GA1UdDwEB/wQEAwIF oDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAd -BgNVHQ4EFgQUUuCTqlJVt7vnqOCM3kEu9AfwNvswfQYDVR0jBHYwdIAU3b/K2ubR -NLo3dSHKb5oIKPI1tkihUaRPME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRo +BgNVHQ4EFgQUyL2otMDyMhBzR5xIgTL4ursmhJcwfQYDVR0jBHYwdIAUs4qgorpx +8agkedSkWyU2FR5JyM2hUaRPME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRo b24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEWMBQGA1UEAwwNb3VyLWNhLXNlcnZl coIJAMstgJlaaVJbMIGDBggrBgEFBQcBAQR3MHUwPAYIKwYBBQUHMAKGMGh0dHA6 Ly90ZXN0Y2EucHl0aG9udGVzdC5uZXQvdGVzdGNhL3B5Y2FjZXJ0LmNlcjA1Bggr BgEFBQcwAYYpaHR0cDovL3Rlc3RjYS5weXRob250ZXN0Lm5ldC90ZXN0Y2Evb2Nz cC8wQwYDVR0fBDwwOjA4oDagNIYyaHR0cDovL3Rlc3RjYS5weXRob250ZXN0Lm5l -dC90ZXN0Y2EvcmV2b2NhdGlvbi5jcmwwDQYJKoZIhvcNAQELBQADggGBACnSP4I/ -wTg1pr2BEP5k7P9+4cZvf4Zl+TFv++8yTi+HyELebI24BgiPN3CVfeFA1IIrjbNK -/TTFnt//AVNKTwj0WOF0/HjjPnGnXmYH6tIEMeJ1qEyAF4aSINIyp5plixpf8UzI -UG0A/Jm/abNI80Va7jVQFLjzkpLGnw5d6w3o7PKkCWvcZiv830z8ZaGu07WIaqTn -CByUSeC4wQSMIQlsVUsslxDxjGzQu7qNk+hHi02OfX2FUxjI+PSPZzqxqj4YNGw6 -5qbHL76DOPXV5dIXKGFstkmZIWmkqLaUdv0YrTVSRWT78V2Ou8AhLllVJK+7j7IK -exfwNJeOaKny0D72c4L4fE6acH3Ws4zMhQRcAo902og6IKh+wp6w3VYfzs1CFsYU -ka0w4Nx28ixW6jhF2MA+uJD68ziZ7EQHNY9pYgz577ed5RVCbvv+TP/olFoasICy -Dhc94YeoCISTdGiNKd/KC2pEMopRO9Y4273jKhteIEiBghmRxoeMD81R6g== +dC90ZXN0Y2EvcmV2b2NhdGlvbi5jcmwwDQYJKoZIhvcNAQELBQADggGBAHaHdk3k +D4i/LPNYZ8CXbM1ZGIKDTAQZpW2q+mQ9STI+4VaVshP3z9MRsHK3W+fXhWlRPLZU +gEUvKBAhILm66Sdatz+Ct2n1RvW/oosXf/IU0UaXtYtH+5/oXAUOnRG9fJoDhAvK +KWZKyg1vCR56J8F/A5ZwjRilL6SYpRmqjF0ejD67bTvAM8AV4b0JPZ/o3BLUy0Qd +BvXo1k6hLVyfXR9bKsNNQI3a0XiA0MYxchBIiukQehMwEbKeZw7toarscy3wuIoi +dQ8waVxQfpHO2pHHcIxl//ZY+wC9Rczi5OPlFjZ986JKnEX/2aUW4C+1W2zmihMV +SHO9fIAzw9Q7Oh2FDqT39/tIDOmgS16KXGf4JQJvzXLBqlqTZHwUIEPgE38N4Q1h +Xi4szXouKq62dWpfoBqbtmctsKUcVLyMcH4VK8BQ4wO7pKX8RQHJP6e4GNw+CAeh +m/W9lb1J6BB8kX0txMKYtrdRadcKaEC1D4WgqWd3xmjLDlg0s1jnyHwJZw== -----END CERTIFICATE----- diff --git a/Lib/test/keycertecc.pem b/Lib/test/keycertecc.pem index 02eda2835f07a1..81daa4ccb94217 100644 --- a/Lib/test/keycertecc.pem +++ b/Lib/test/keycertecc.pem @@ -1,31 +1,31 @@ -----BEGIN PRIVATE KEY----- -MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDBL2Y5JfpzbgHw+t4Q+ -c5SHhsZcD9ylEtUMg7OyF9xW6j+3VIVORGaokcOtE0Z2Y5ehZANiAASzz/rInKUz -onpxP5bLxmq8fmrtgRSS0jRPUOU16XKX+KtifnLbmLHQtPrctdkRRROCxnURz2fB -ihQTJkXyBMSswNTRCs+4DUKbMAfihigMVYgdWbZPFBDleo5aeFw4/FM= +MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDBcNwE+cm17mmr7Yg6d +0DNCnheGFOjkYH4tYzTyCkcZGShkmF/tKhIqb3imKz0Kx9+hZANiAATyp8ws6CuN +OI2/3MC4jZVSkmoDzm/X/ZrkEm4TVHKPSZ6kzZRpmmUlLS9l7SQZSLYyDAFBFzoG +JJYHhZNQXEO7HFszn6KnvLjhwS6ddzlaHPziEknrSr0OKhJmdJHrQAQ= -----END PRIVATE KEY----- Certificate: Data: Version: 3 (0x2) Serial Number: cb:2d:80:99:5a:69:52:5e - Signature Algorithm: sha256WithRSAEncryption + Signature Algorithm: sha256WithRSAEncryption Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server Validity Not Before: Aug 29 14:23:16 2018 GMT - Not After : Jul 7 14:23:16 2028 GMT + Not After : Oct 28 14:23:16 2037 GMT Subject: C=XY, L=Castle Anthrax, O=Python Software Foundation, CN=localhost-ecc Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (384 bit) pub: - 04:b3:cf:fa:c8:9c:a5:33:a2:7a:71:3f:96:cb:c6: - 6a:bc:7e:6a:ed:81:14:92:d2:34:4f:50:e5:35:e9: - 72:97:f8:ab:62:7e:72:db:98:b1:d0:b4:fa:dc:b5: - d9:11:45:13:82:c6:75:11:cf:67:c1:8a:14:13:26: - 45:f2:04:c4:ac:c0:d4:d1:0a:cf:b8:0d:42:9b:30: - 07:e2:86:28:0c:55:88:1d:59:b6:4f:14:10:e5:7a: - 8e:5a:78:5c:38:fc:53 + 04:f2:a7:cc:2c:e8:2b:8d:38:8d:bf:dc:c0:b8:8d: + 95:52:92:6a:03:ce:6f:d7:fd:9a:e4:12:6e:13:54: + 72:8f:49:9e:a4:cd:94:69:9a:65:25:2d:2f:65:ed: + 24:19:48:b6:32:0c:01:41:17:3a:06:24:96:07:85: + 93:50:5c:43:bb:1c:5b:33:9f:a2:a7:bc:b8:e1:c1: + 2e:9d:77:39:5a:1c:fc:e2:12:49:eb:4a:bd:0e:2a: + 12:66:74:91:eb:40:04 ASN1 OID: secp384r1 NIST CURVE: P-384 X509v3 extensions: @@ -38,9 +38,9 @@ Certificate: X509v3 Basic Constraints: critical CA:FALSE X509v3 Subject Key Identifier: - C6:82:22:BF:4F:3D:40:AD:9B:16:AD:E7:C5:ED:C4:82:EB:35:97:98 + 79:11:98:86:15:4F:48:F4:31:0B:D2:CC:C8:26:3A:09:07:5D:96:40 X509v3 Authority Key Identifier: - keyid:DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48 + keyid:B3:8A:A0:A2:BA:71:F1:A8:24:79:D4:A4:5B:25:36:15:1E:49:C8:CD DirName:/C=XY/O=Python Software Foundation CA/CN=our-ca-server serial:CB:2D:80:99:5A:69:52:5B @@ -54,53 +54,53 @@ Certificate: URI:http://testca.pythontest.net/testca/revocation.crl Signature Algorithm: sha256WithRSAEncryption - 76:e3:19:4d:34:78:50:3e:fa:63:53:d6:3f:01:87:e8:f4:a3: - a9:81:5b:31:d6:de:3a:98:f3:bb:70:4d:29:35:1f:b0:6a:b3: - 9d:bf:03:2b:79:c4:f2:0b:32:f8:fc:f6:cb:13:47:28:81:fa: - 96:b3:1a:1d:bd:4b:f6:35:df:87:ef:6e:74:63:87:3d:7e:2b: - c6:78:d4:8e:ef:03:e6:01:11:22:4e:1b:ef:2c:c1:c5:4e:3f: - 4a:07:ae:92:ef:d3:ac:79:59:7c:60:89:4b:3d:39:08:ef:c4: - 9a:dc:b0:8b:ee:5f:30:40:d3:c2:f3:f8:90:77:9d:8c:a7:07: - b9:5f:62:83:4d:37:fa:36:e1:1d:26:2b:cc:8f:7c:6f:f1:23: - 87:71:48:40:ad:6b:30:16:47:4c:d7:98:bb:f5:9b:63:c8:66: - 47:65:58:d2:c1:07:81:14:0c:25:20:87:b9:1d:ab:0b:56:db: - 2c:ab:36:db:7f:c7:42:52:af:91:d6:fb:18:cf:94:f7:1e:25: - 99:ce:20:78:c6:f8:69:6e:9c:53:f3:fe:90:3e:4d:ca:d5:d6: - ac:6e:02:17:be:4a:0f:fe:e6:14:d4:ce:25:df:17:8f:6f:b9: - d3:28:dc:b4:98:ef:05:6f:eb:20:14:1c:c1:e9:9d:02:7b:0e: - 0f:e4:a8:bc:3b:62:e0:42:0c:b0:f7:a1:63:fe:98:d7:aa:b0: - f6:ed:ff:ab:4f:1a:9a:8f:eb:f0:86:61:d2:d3:a5:08:d0:db: - e4:d6:a9:0e:ec:08:6f:af:fb:ef:73:3f:47:69:97:90:b2:5a: - 6f:31:66:a7:4c:32:0c:e9:ea:18:ce:a9:79:9c:f5:c4:42:f5: - 68:53:b2:a4:8c:98:3f:97:34:62:61:41:0a:54:d7:0b:cd:33: - c8:62:62:da:f7:07:c6:c6:3b:fa:68:ca:5f:62:3e:57:db:bd: - cb:16:94:07:9a:b5:31:55:b8:f8:cb:b0:7f:a0:d1:82:df:71: - c8:90:60:b3:88:b0 + 6e:42:e8:a2:2d:28:14:e3:25:5c:c1:7e:54:e9:3a:ff:30:db: + 94:ba:b2:f6:5f:ae:9a:c1:90:b3:4f:ce:65:1d:84:64:c0:71: + 2c:44:8e:7e:00:79:f5:8c:4a:1d:34:13:44:de:99:2e:db:53: + ee:ec:74:97:4d:59:1a:09:82:4f:98:75:91:a7:a0:b9:da:5e: + 68:f5:32:85:be:36:3d:83:d4:ee:f9:87:67:31:85:41:53:9a: + e7:05:96:13:1c:88:2e:7f:33:b1:ee:bd:f9:50:52:24:ed:3d: + 92:95:6e:30:c3:af:74:a9:ee:15:bb:da:7c:14:50:8e:e3:99: + ea:ba:b4:37:8a:50:61:26:de:01:93:b8:a2:6b:d9:c7:38:5e: + b2:f8:96:3d:a8:9f:7d:0c:71:d4:7e:cc:a0:57:af:7e:ce:3f: + a7:a7:27:68:c1:28:d7:4f:44:c1:b4:93:c3:c7:35:2b:50:c3: + 8e:2c:d0:46:c1:3f:e1:67:d3:f0:81:ae:f3:5c:3e:4f:d5:a8: + 07:8f:e0:eb:ef:d8:dc:47:e0:3d:58:eb:de:0e:7f:b2:58:cb: + 5c:f1:2f:65:7e:0f:0d:cc:ca:ba:83:53:63:bc:dd:18:0c:ee: + ed:ec:96:88:d0:38:c5:d7:ab:e7:55:79:7b:6d:ba:c0:a0:e9: + 5c:ca:7c:fb:f8:70:c7:fb:f5:b2:b5:74:cb:f7:c0:0d:20:9f: + 1d:b7:4c:bf:8a:8d:cd:e3:bc:4e:30:78:02:12:a0:9b:d5:8f: + 49:3c:95:91:76:6e:7c:54:dc:61:7a:2e:20:ed:35:25:e0:c5: + 17:50:02:83:00:74:8f:f0:1c:97:96:08:fc:2e:63:a4:f7:97: + 87:43:2a:32:04:2d:4c:f9:1a:07:bf:68:91:fc:50:21:a1:3c: + 8d:8f:fb:83:57:83:1f:b6:55:5c:55:2f:58:64:ad:f3:27:ba: + d0:e3:cd:58:01:a3:c9:ba:1d:95:dc:30:d5:af:b9:20:ad:d9: + 48:ba:8d:9a:66:ee -----BEGIN CERTIFICATE----- MIIEyzCCAzOgAwIBAgIJAMstgJlaaVJeMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV BAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEW -MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0yODA3MDcx +MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0zNzEwMjgx NDIzMTZaMGMxCzAJBgNVBAYTAlhZMRcwFQYDVQQHDA5DYXN0bGUgQW50aHJheDEj MCEGA1UECgwaUHl0aG9uIFNvZnR3YXJlIEZvdW5kYXRpb24xFjAUBgNVBAMMDWxv -Y2FsaG9zdC1lY2MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASzz/rInKUzonpxP5bL -xmq8fmrtgRSS0jRPUOU16XKX+KtifnLbmLHQtPrctdkRRROCxnURz2fBihQTJkXy -BMSswNTRCs+4DUKbMAfihigMVYgdWbZPFBDleo5aeFw4/FOjggHEMIIBwDAYBgNV +Y2FsaG9zdC1lY2MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAATyp8ws6CuNOI2/3MC4 +jZVSkmoDzm/X/ZrkEm4TVHKPSZ6kzZRpmmUlLS9l7SQZSLYyDAFBFzoGJJYHhZNQ +XEO7HFszn6KnvLjhwS6ddzlaHPziEknrSr0OKhJmdJHrQASjggHEMIIBwDAYBgNV HREEETAPgg1sb2NhbGhvc3QtZWNjMA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAU -BggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUxoIi -v089QK2bFq3nxe3Egus1l5gwfQYDVR0jBHYwdIAU3b/K2ubRNLo3dSHKb5oIKPI1 -tkihUaRPME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUg +BggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUeRGY +hhVPSPQxC9LMyCY6CQddlkAwfQYDVR0jBHYwdIAUs4qgorpx8agkedSkWyU2FR5J +yM2hUaRPME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUg Rm91bmRhdGlvbiBDQTEWMBQGA1UEAwwNb3VyLWNhLXNlcnZlcoIJAMstgJlaaVJb MIGDBggrBgEFBQcBAQR3MHUwPAYIKwYBBQUHMAKGMGh0dHA6Ly90ZXN0Y2EucHl0 aG9udGVzdC5uZXQvdGVzdGNhL3B5Y2FjZXJ0LmNlcjA1BggrBgEFBQcwAYYpaHR0 cDovL3Rlc3RjYS5weXRob250ZXN0Lm5ldC90ZXN0Y2Evb2NzcC8wQwYDVR0fBDww OjA4oDagNIYyaHR0cDovL3Rlc3RjYS5weXRob250ZXN0Lm5ldC90ZXN0Y2EvcmV2 -b2NhdGlvbi5jcmwwDQYJKoZIhvcNAQELBQADggGBAHbjGU00eFA++mNT1j8Bh+j0 -o6mBWzHW3jqY87twTSk1H7Bqs52/Ayt5xPILMvj89ssTRyiB+pazGh29S/Y134fv -bnRjhz1+K8Z41I7vA+YBESJOG+8swcVOP0oHrpLv06x5WXxgiUs9OQjvxJrcsIvu -XzBA08Lz+JB3nYynB7lfYoNNN/o24R0mK8yPfG/xI4dxSECtazAWR0zXmLv1m2PI -ZkdlWNLBB4EUDCUgh7kdqwtW2yyrNtt/x0JSr5HW+xjPlPceJZnOIHjG+GlunFPz -/pA+TcrV1qxuAhe+Sg/+5hTUziXfF49vudMo3LSY7wVv6yAUHMHpnQJ7Dg/kqLw7 -YuBCDLD3oWP+mNeqsPbt/6tPGpqP6/CGYdLTpQjQ2+TWqQ7sCG+v++9zP0dpl5Cy -Wm8xZqdMMgzp6hjOqXmc9cRC9WhTsqSMmD+XNGJhQQpU1wvNM8hiYtr3B8bGO/po -yl9iPlfbvcsWlAeatTFVuPjLsH+g0YLfcciQYLOIsA== +b2NhdGlvbi5jcmwwDQYJKoZIhvcNAQELBQADggGBAG5C6KItKBTjJVzBflTpOv8w +25S6svZfrprBkLNPzmUdhGTAcSxEjn4AefWMSh00E0TemS7bU+7sdJdNWRoJgk+Y +dZGnoLnaXmj1MoW+Nj2D1O75h2cxhUFTmucFlhMciC5/M7HuvflQUiTtPZKVbjDD +r3Sp7hW72nwUUI7jmeq6tDeKUGEm3gGTuKJr2cc4XrL4lj2on30McdR+zKBXr37O +P6enJ2jBKNdPRMG0k8PHNStQw44s0EbBP+Fn0/CBrvNcPk/VqAeP4Ovv2NxH4D1Y +694Of7JYy1zxL2V+Dw3MyrqDU2O83RgM7u3slojQOMXXq+dVeXttusCg6VzKfPv4 +cMf79bK1dMv3wA0gnx23TL+Kjc3jvE4weAISoJvVj0k8lZF2bnxU3GF6LiDtNSXg +xRdQAoMAdI/wHJeWCPwuY6T3l4dDKjIELUz5Gge/aJH8UCGhPI2P+4NXgx+2VVxV +L1hkrfMnutDjzVgBo8m6HZXcMNWvuSCt2Ui6jZpm7g== -----END CERTIFICATE----- diff --git a/Lib/test/make_ssl_certs.py b/Lib/test/make_ssl_certs.py index 41b5f46c882ca3..c62896f861dab6 100644 --- a/Lib/test/make_ssl_certs.py +++ b/Lib/test/make_ssl_certs.py @@ -7,6 +7,9 @@ import tempfile from subprocess import * +startdate = "20180829142316Z" +enddate = "20371028142316Z" + req_template = """ [ default ] base_url = http://testca.pythontest.net/testca @@ -21,6 +24,8 @@ O = Python Software Foundation CN = {hostname} + [req_x509_extensions_nosan] + [req_x509_extensions_simple] subjectAltName = @san @@ -70,8 +75,12 @@ database = $dir/index.txt crlnumber = $dir/crl.txt default_md = sha256 - default_days = 3600 - default_crl_days = 3600 + startdate = {startdate} + default_startdate = {startdate} + enddate = {enddate} + default_enddate = {enddate} + default_days = 7000 + default_crl_days = 7000 certificate = pycacert.pem private_key = pycakey.pem serial = $dir/serial @@ -116,10 +125,15 @@ def make_cert_key(hostname, sign=False, extra_san='', tempnames.append(f.name) req_file, cert_file, key_file = tempnames try: - req = req_template.format(hostname=hostname, extra_san=extra_san) + req = req_template.format( + hostname=hostname, + extra_san=extra_san, + startdate=startdate, + enddate=enddate + ) with open(req_file, 'w') as f: f.write(req) - args = ['req', '-new', '-days', '3650', '-nodes', + args = ['req', '-new', '-nodes', '-days', '7000', '-newkey', key, '-keyout', key_file, '-extensions', ext, '-config', req_file] @@ -168,19 +182,30 @@ def make_ca(): f.write("00") with open(os.path.join('cadir','index.txt.attr'),'w+') as f: f.write('unique_subject = no') + # random start value for serial numbers + with open(os.path.join('cadir','serial'), 'w') as f: + f.write('CB2D80995A69525B\n') with tempfile.NamedTemporaryFile("w") as t: - t.write(req_template.format(hostname='our-ca-server', extra_san='')) + req = req_template.format( + hostname='our-ca-server', + extra_san='', + startdate=startdate, + enddate=enddate + ) + t.write(req) t.flush() with tempfile.NamedTemporaryFile() as f: - args = ['req', '-new', '-days', '3650', '-extensions', 'v3_ca', '-nodes', - '-newkey', 'rsa:3072', '-keyout', 'pycakey.pem', + args = ['req', '-config', t.name, '-new', + '-nodes', + '-newkey', 'rsa:3072', + '-keyout', 'pycakey.pem', '-out', f.name, '-subj', '/C=XY/L=Castle Anthrax/O=Python Software Foundation CA/CN=our-ca-server'] check_call(['openssl'] + args) - args = ['ca', '-config', t.name, '-create_serial', + args = ['ca', '-config', t.name, '-out', 'pycacert.pem', '-batch', '-outdir', TMP_CADIR, - '-keyfile', 'pycakey.pem', '-days', '3650', + '-keyfile', 'pycakey.pem', '-selfsign', '-extensions', 'v3_ca', '-infiles', f.name ] check_call(['openssl'] + args) args = ['ca', '-config', t.name, '-gencrl', '-out', 'revocation.crl'] @@ -223,18 +248,18 @@ def print_cert(path): f.write(key) f.write(cert) - cert, key = make_cert_key('localhost', True) + cert, key = make_cert_key('localhost', sign=True) with open('keycert3.pem', 'w') as f: f.write(key) f.write(cert) - cert, key = make_cert_key('fakehostname', True) + cert, key = make_cert_key('fakehostname', sign=True) with open('keycert4.pem', 'w') as f: f.write(key) f.write(cert) cert, key = make_cert_key( - 'localhost-ecc', True, key='param:secp384r1.pem' + 'localhost-ecc', sign=True, key='param:secp384r1.pem' ) with open('keycertecc.pem', 'w') as f: f.write(key) @@ -254,7 +279,7 @@ def print_cert(path): 'RID.1 = 1.2.3.4.5', ] - cert, key = make_cert_key('allsans', extra_san='\n'.join(extra_san)) + cert, key = make_cert_key('allsans', sign=True, extra_san='\n'.join(extra_san)) with open('allsans.pem', 'w') as f: f.write(key) f.write(cert) @@ -271,11 +296,16 @@ def print_cert(path): ] # IDN SANS, signed - cert, key = make_cert_key('idnsans', True, extra_san='\n'.join(extra_san)) + cert, key = make_cert_key('idnsans', sign=True, extra_san='\n'.join(extra_san)) with open('idnsans.pem', 'w') as f: f.write(key) f.write(cert) + cert, key = make_cert_key('nosan', sign=True, ext='req_x509_extensions_nosan') + with open('nosan.pem', 'w') as f: + f.write(key) + f.write(cert) + unmake_ca() print("update Lib/test/test_ssl.py and Lib/test/test_asyncio/util.py") print_cert('keycert.pem') diff --git a/Lib/test/nosan.pem b/Lib/test/nosan.pem new file mode 100644 index 00000000000000..ec10cdcabb9e35 --- /dev/null +++ b/Lib/test/nosan.pem @@ -0,0 +1,130 @@ +-----BEGIN PRIVATE KEY----- +MIIG/QIBADANBgkqhkiG9w0BAQEFAASCBucwggbjAgEAAoIBgQCv3sUoOE4F7Pye +AT2Q6XpXrGUOu1fYgdnItLLLhvn7ACuHMj7TA5UKXxsepJn5m2Ji9LvAbksr1IWd +LZAvNgjwsUR+E4HbY108BhVt9sk3HFkvE0OOFbAa14ICtYPe18P/4Hv6Zfu/GJDU +rwXHNCUu0p6i/mospZ5O3sx5MgVaShknGAEC3Kp7zOgusMmE8XSbkNQa3ARMkW4o +kTqWKAeAHDjVFVyyhzZQmo+gaLzhWfJVSZhlJsuiLoZGGrVTq85EiXsE4l8rPaI+ +mKkVzWP13IZW+Fx1tiIktumdHWb1OQWrvm8AiT9b8PcFCUUrvhQFcLDSCZjKlQ0t +RWrSSKrrVsSldOreqRLtpjGzFJpGnTcvslL7rP5pg5DjBsYmVcDjrmRuJuhGq52X +/6HEC97GouVK8tT1LVMv1wufVPn+i9TzwxOuRWeUvVqLAJgWQ9N3yKdymH+VrpZk +/oB9ScyDakGezZBW5CeOQbNJ8WoX58jNxefGjtqKxmyztu43r3ECAwEAAQKCAYBQ +fVoqYCqFV8L95X9x1QljGsldhqxbsIIl811o/KtoDtndFEfgd2E8z+4vhhHaRR0w +QOW02kWZF7jXCMVWdhp9XgQE15S0/bLsB7TDERFiIZ1HiD+AxbhFcKBV8REbahCQ +CQN0xDwFZ47RaBDy7JCf71EfM+UP7fSYECvww83jVspQNBIyZx+3bT5OMCbqqz88 ++3m3mT52dJDADEeN9WAJZ+Ey1IYKRwu6tCJLvePEF1BrbDVNBgZogXZ+mzalxpjr +4RpGPMMa+VWc8HmDVd+LtpwKJcQD00GvUP4fNywn+5jvNWl54FdQiTLPrieTWxas +XUQ2crxP7Aqr2/vsU5Ruru5uF7H+ssMHp9YQDhpJ2+SVhQ9P+/loXCuKGt+BrB2Z +MlitO3f+vfRtzATmJ8G0qFrOqZK1A/qsiyIze240C1hAl3oy2xpZqTDGp4gRWwoi +OIN0HmH9UbP7bbNQY1x/zstTbza4/7rGb1+DZKeZIMu7QjBCU0rtsJpGtUvcQGEC +gcEA42GMYSL/HljZMF1LsDhTX/cmP8FDNgONhWYxT+w0Csnj1usLNBaT63dYnEiW +QKydRR4casAR1Kdy4Yfcy2lCy1kCfwqkQYk8fxSsOSHRjUfwC1SnfdYlwKFMxw4a +oZF0R4oVCBYrfP+8kqrj+5gs/gXblsw72XkYtbCdIriKKdmUzTx7MegzSqh2PVRi +rJzuwCZQ/O0NfhwdOHxLQDo0dgD+vv9e+KOSoJ9FDv8HH1tnolpRMdkSA8AJR/Nk +DXt1AoHBAMYBfTKQZ2jqLKybe4tP+YKjvjVp8vJx0iNUXFN/P6hBaSBOgq85uxXL +X3s7N/pkOCjyE95B8QusIkbnbfdyEP89O4bTbUHPXyAkHyRkR7Vny49HYuaR/aXQ +mXC0J2z5bXVpCQ514l/R/Io3wBph+hbG3To7pp9pMOV4qzvibUZaTZFwH+q+xDwf +SKSFy3fcomgH4/K5/QuKVj0jOUQsYjQQWb8GukS2KZK3zYJIAG1bBcsCVpSuBdW0 +eCZgqjnwjQKBwCUyUwWc9QEg5b68tGIKhNEhHDe3xOf0ItWcxxpc+JJ/Pm9tGfMW +cnJFntBKK5I+6qdg6qMn8oLINcnhMORxvsSHNhpUQlSaP7RGTHo4JxCmoQUpfxDd +1GUzvdyeWQrvQYdmdlRRVCHpsA6KOCtzVIDlsmtz06Ka5cjrMHl6mNeJyYbdiwW6 +B5ICBv23bUDxlzkFy5/ko51qufkAlErYeraHKSVTn1SrZZQzGdf/LkoZ6NUtUzUF +XqYQZzRHA6oU9QKBwDslzLljC5D6ivfQxln6POV6dmJMUOd9erFVDPNgSqq/R2EA +MueXDjzXcKFGMlWYxHHuxmKZPiEnfWHC1kWZjFxCdVq0I6oKATd/stHTJtyYseUO +BQwtRiDXLE7PcguKgtkU1EC+lC3dc1vyhW8cH3HYW9N+aCqsaI/TuQr9e3kNlqhA +XzhnXgU7rx5+XSZkARukZ8JlLqLY4yQGNqAXxgoZbEW1A8VsyQRr5XbqfT4td5CK +FUT6qwGIlG+aZp9CLQKBwQCQkwdW9A/Q4Ffq8+XTL1hJ24m/q11OLAPODUypOhWw +OCbX2fkv59pSBe6niZDBls1NpHB9mzalBrJCfU+yKC667gKcKULOnWULIoOQvmcg +Ka3hkkW28gTnCjfDIYm3IdsLjc67zJplOixaKgxhO8NtJZGtg0oLIrofG8EYRInv +OmtGw+XE+s4TVs6WgXnEg9zWQ5ZYtqQVn6PT5jsz+Nrvipi61HWHVBd7g+78ojps +3suWxl0FvgzTW5HD16WRXeI= +-----END PRIVATE KEY----- +Certificate: + Data: + Version: 1 (0x0) + Serial Number: + cb:2d:80:99:5a:69:52:61 + Signature Algorithm: sha256WithRSAEncryption + Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server + Validity + Not Before: Aug 29 14:23:16 2018 GMT + Not After : Oct 28 14:23:16 2037 GMT + Subject: C=XY, L=Castle Anthrax, O=Python Software Foundation, CN=nosan + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public-Key: (3072 bit) + Modulus: + 00:af:de:c5:28:38:4e:05:ec:fc:9e:01:3d:90:e9: + 7a:57:ac:65:0e:bb:57:d8:81:d9:c8:b4:b2:cb:86: + f9:fb:00:2b:87:32:3e:d3:03:95:0a:5f:1b:1e:a4: + 99:f9:9b:62:62:f4:bb:c0:6e:4b:2b:d4:85:9d:2d: + 90:2f:36:08:f0:b1:44:7e:13:81:db:63:5d:3c:06: + 15:6d:f6:c9:37:1c:59:2f:13:43:8e:15:b0:1a:d7: + 82:02:b5:83:de:d7:c3:ff:e0:7b:fa:65:fb:bf:18: + 90:d4:af:05:c7:34:25:2e:d2:9e:a2:fe:6a:2c:a5: + 9e:4e:de:cc:79:32:05:5a:4a:19:27:18:01:02:dc: + aa:7b:cc:e8:2e:b0:c9:84:f1:74:9b:90:d4:1a:dc: + 04:4c:91:6e:28:91:3a:96:28:07:80:1c:38:d5:15: + 5c:b2:87:36:50:9a:8f:a0:68:bc:e1:59:f2:55:49: + 98:65:26:cb:a2:2e:86:46:1a:b5:53:ab:ce:44:89: + 7b:04:e2:5f:2b:3d:a2:3e:98:a9:15:cd:63:f5:dc: + 86:56:f8:5c:75:b6:22:24:b6:e9:9d:1d:66:f5:39: + 05:ab:be:6f:00:89:3f:5b:f0:f7:05:09:45:2b:be: + 14:05:70:b0:d2:09:98:ca:95:0d:2d:45:6a:d2:48: + aa:eb:56:c4:a5:74:ea:de:a9:12:ed:a6:31:b3:14: + 9a:46:9d:37:2f:b2:52:fb:ac:fe:69:83:90:e3:06: + c6:26:55:c0:e3:ae:64:6e:26:e8:46:ab:9d:97:ff: + a1:c4:0b:de:c6:a2:e5:4a:f2:d4:f5:2d:53:2f:d7: + 0b:9f:54:f9:fe:8b:d4:f3:c3:13:ae:45:67:94:bd: + 5a:8b:00:98:16:43:d3:77:c8:a7:72:98:7f:95:ae: + 96:64:fe:80:7d:49:cc:83:6a:41:9e:cd:90:56:e4: + 27:8e:41:b3:49:f1:6a:17:e7:c8:cd:c5:e7:c6:8e: + da:8a:c6:6c:b3:b6:ee:37:af:71 + Exponent: 65537 (0x10001) + Signature Algorithm: sha256WithRSAEncryption + 91:42:c2:15:57:42:47:77:e7:0f:c5:55:26:b1:5b:c3:5e:ba: + 81:db:e1:a4:9f:b8:42:5a:21:c9:8c:18:ae:0f:90:ab:9a:24: + e7:d2:78:fc:bd:97:29:b1:5c:46:1f:5b:b8:d2:a7:87:f1:50: + 53:5b:d3:be:57:74:bd:e5:75:db:50:81:f7:37:95:0b:69:ef: + 39:8c:5c:82:d5:64:62:d5:8b:e9:e0:31:e1:73:d2:5a:2c:de: + 43:5a:06:e5:d3:4d:d0:35:e0:9f:c2:73:31:bc:35:69:d4:fb: + 7d:f0:1a:33:f7:f6:25:72:9c:a6:84:05:08:f6:b5:e8:04:10: + f1:1f:f2:95:ad:a1:f8:d8:80:a5:eb:75:43:99:33:90:0c:79: + fc:c0:87:08:95:20:aa:c2:81:0b:22:6f:56:f4:8f:2a:23:f8: + 40:47:1c:03:a5:b1:04:0a:04:4a:df:d0:88:a8:bc:31:f2:42: + 9b:d8:11:14:9e:e3:68:ea:07:2c:15:de:d2:36:5a:15:38:ed: + d2:af:0e:b4:b6:1d:a0:57:94:ea:c3:c7:4c:14:57:81:00:57: + 94:d3:b0:27:69:d7:48:02:6c:e5:97:f7:be:22:7c:38:24:af: + b2:b0:7b:08:75:1e:ca:2e:c7:41:ef:8b:74:cf:c9:c3:6f:39: + b9:52:41:18:c6:70:24:54:51:04:fe:5f:88:70:35:e5:1c:8e: + d6:67:69:44:44:33:9b:8c:fe:a5:b9:95:48:66:84:f3:1a:04: + ab:a3:57:c1:b6:b4:2f:28:12:45:2b:cb:42:d3:f4:a5:ce:7b: + 6c:1f:e4:c8:a9:e7:d4:6d:c8:27:2d:69:26:c5:e8:73:10:54: + 1f:c3:bf:fd:aa:f5:95:6f:f6:ca:d5:06:8f:1b:79:93:e3:86: + ba:8d:fe:a8:10:8f:95:3e:14:09:bf:ca:88:59:e2:93:b6:ec: + 03:a9:7e:dd:1f:5f:13:d3:29:b3:a6:f3:6a:df:30:53:44:c8: + cd:e5:82:57:bc:9c +-----BEGIN CERTIFICATE----- +MIIEJDCCAowCCQDLLYCZWmlSYTANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQGEwJY +WTEmMCQGA1UECgwdUHl0aG9uIFNvZnR3YXJlIEZvdW5kYXRpb24gQ0ExFjAUBgNV +BAMMDW91ci1jYS1zZXJ2ZXIwHhcNMTgwODI5MTQyMzE2WhcNMzcxMDI4MTQyMzE2 +WjBbMQswCQYDVQQGEwJYWTEXMBUGA1UEBwwOQ2FzdGxlIEFudGhyYXgxIzAhBgNV +BAoMGlB5dGhvbiBTb2Z0d2FyZSBGb3VuZGF0aW9uMQ4wDAYDVQQDDAVub3NhbjCC +AaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBAK/exSg4TgXs/J4BPZDpeles +ZQ67V9iB2ci0ssuG+fsAK4cyPtMDlQpfGx6kmfmbYmL0u8BuSyvUhZ0tkC82CPCx +RH4TgdtjXTwGFW32yTccWS8TQ44VsBrXggK1g97Xw//ge/pl+78YkNSvBcc0JS7S +nqL+aiylnk7ezHkyBVpKGScYAQLcqnvM6C6wyYTxdJuQ1BrcBEyRbiiROpYoB4Ac +ONUVXLKHNlCaj6BovOFZ8lVJmGUmy6IuhkYatVOrzkSJewTiXys9oj6YqRXNY/Xc +hlb4XHW2IiS26Z0dZvU5Bau+bwCJP1vw9wUJRSu+FAVwsNIJmMqVDS1FatJIqutW +xKV06t6pEu2mMbMUmkadNy+yUvus/mmDkOMGxiZVwOOuZG4m6EarnZf/ocQL3sai +5Ury1PUtUy/XC59U+f6L1PPDE65FZ5S9WosAmBZD03fIp3KYf5WulmT+gH1JzINq +QZ7NkFbkJ45Bs0nxahfnyM3F58aO2orGbLO27jevcQIDAQABMA0GCSqGSIb3DQEB +CwUAA4IBgQCRQsIVV0JHd+cPxVUmsVvDXrqB2+Gkn7hCWiHJjBiuD5CrmiTn0nj8 +vZcpsVxGH1u40qeH8VBTW9O+V3S95XXbUIH3N5ULae85jFyC1WRi1Yvp4DHhc9Ja +LN5DWgbl003QNeCfwnMxvDVp1Pt98Boz9/YlcpymhAUI9rXoBBDxH/KVraH42ICl +63VDmTOQDHn8wIcIlSCqwoELIm9W9I8qI/hARxwDpbEECgRK39CIqLwx8kKb2BEU +nuNo6gcsFd7SNloVOO3Srw60th2gV5Tqw8dMFFeBAFeU07AnaddIAmzll/e+Inw4 +JK+ysHsIdR7KLsdB74t0z8nDbzm5UkEYxnAkVFEE/l+IcDXlHI7WZ2lERDObjP6l +uZVIZoTzGgSro1fBtrQvKBJFK8tC0/SlzntsH+TIqefUbcgnLWkmxehzEFQfw7/9 +qvWVb/bK1QaPG3mT44a6jf6oEI+VPhQJv8qIWeKTtuwDqX7dH18T0ymzpvNq3zBT +RMjN5YJXvJw= +-----END CERTIFICATE----- diff --git a/Lib/test/pycacert.pem b/Lib/test/pycacert.pem index 73150c960f3581..360cd57426a5a8 100644 --- a/Lib/test/pycacert.pem +++ b/Lib/test/pycacert.pem @@ -3,97 +3,97 @@ Certificate: Version: 3 (0x2) Serial Number: cb:2d:80:99:5a:69:52:5b - Signature Algorithm: sha256WithRSAEncryption + Signature Algorithm: sha256WithRSAEncryption Issuer: C=XY, O=Python Software Foundation CA, CN=our-ca-server Validity Not Before: Aug 29 14:23:16 2018 GMT - Not After : Aug 26 14:23:16 2028 GMT + Not After : Oct 28 14:23:16 2037 GMT Subject: C=XY, O=Python Software Foundation CA, CN=our-ca-server Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (3072 bit) + RSA Public-Key: (3072 bit) Modulus: - 00:97:ed:55:41:ba:36:17:95:db:71:1c:d3:e1:61: - ac:58:73:e3:c6:96:cf:2b:1f:b8:08:f5:9d:4b:4b: - c7:30:f6:b8:0b:b3:52:72:a0:bb:c9:4d:3b:8e:df: - 22:8e:01:57:81:c9:92:73:cc:00:c6:ec:70:b0:3a: - 17:40:c1:df:f2:8c:36:4c:c4:a7:81:e7:b6:24:68: - e2:a0:7e:35:07:2f:a0:5b:f9:45:46:f7:1e:f0:46: - 11:fe:ca:1a:3c:50:f1:26:a9:5f:9c:22:9c:f8:41: - e1:df:4f:12:95:19:2f:5c:90:01:17:6e:7e:3e:7d: - cf:e9:09:af:25:f8:f8:42:77:2d:6d:5f:36:f2:78: - 1e:7d:4a:87:68:63:6c:06:71:1b:8d:fa:25:fe:d4: - d3:f5:a5:17:b1:ef:ea:17:cb:54:c8:27:99:80:cb: - 3c:45:f1:2c:52:1c:dd:1f:51:45:20:50:1e:5e:ab: - 57:73:1b:41:78:96:de:84:a4:7a:dd:8f:30:85:36: - 58:79:76:a0:d2:61:c8:1b:a9:94:99:63:c6:ee:f8: - 14:bf:b4:52:56:31:97:fa:eb:ac:53:9e:95:ce:4c: - c4:5a:4a:b7:ca:03:27:5b:35:57:ce:02:dc:ec:ca: - 69:f8:8a:5a:39:cb:16:20:15:03:24:61:6c:f4:7a: - fc:b6:48:e5:59:10:5c:49:d0:23:9f:fb:71:5e:3a: - e9:68:9f:34:72:80:27:b6:3f:4c:b1:d9:db:63:7f: - 67:68:4a:6e:11:f8:e8:c0:f4:5a:16:39:53:0b:68: - de:77:fa:45:e7:f8:91:cd:78:cd:28:94:97:71:54: - fb:cf:f0:37:de:c9:26:c5:dc:1b:9e:89:6d:09:ac: - c8:44:71:cb:6d:f1:97:31:d5:4c:20:33:bf:75:4a: - a0:e0:dc:69:11:ed:2a:b4:64:10:11:30:8b:0e:b0: - a7:10:d8:8a:c5:aa:1b:c8:26:8a:25:e7:66:9f:a5: - 6a:1a:2f:7c:5f:83:c6:78:4f:1f + 00:b1:84:d3:4f:5c:04:80:91:4f:82:49:ba:30:0b: + f7:e8:cb:f9:14:ef:3d:9f:0b:3f:0a:62:fc:1b:20: + a5:20:d1:60:5f:87:5a:1f:16:d1:ed:97:70:a6:da: + 1b:03:2c:7e:a0:5b:3c:4e:2f:16:7e:0e:89:29:89: + e1:10:0d:38:da:6a:77:5f:37:13:b3:28:8f:7b:5c: + 76:ad:9e:e8:d3:f5:9e:f5:83:aa:10:07:8d:e6:51: + 98:f0:7c:0d:52:f2:0c:21:1e:d8:b9:99:26:a9:25: + 03:27:bb:5c:ab:2e:33:27:a2:d6:23:a8:83:87:44: + 29:9f:97:b5:24:6f:d7:b9:0a:fd:28:ee:bb:fb:41: + 58:ea:1d:99:dd:44:86:ab:98:be:1c:dc:cb:a9:89: + 1d:36:5c:a9:e8:47:b5:f4:52:48:aa:b5:a4:67:ef: + 3e:d7:e2:d3:33:de:98:29:d8:7a:b0:59:5c:e7:b1: + 0e:cc:fd:9f:eb:f6:d5:3a:0e:0b:cf:fe:0b:3d:a2: + bf:45:18:ce:94:e7:a9:55:60:88:d4:d8:84:50:79: + 05:2e:41:03:74:ae:67:26:f6:5b:12:08:98:ce:0a: + 97:ed:01:0f:89:4f:17:5c:fa:3e:1d:35:24:47:92: + 32:bf:f7:a4:18:2b:3c:d0:48:99:e1:a2:cd:a3:cc: + 50:53:20:b5:c6:e3:66:85:7b:57:10:ec:33:4f:c1: + 77:e7:1b:7e:81:c6:c4:f3:45:20:c0:91:dd:13:76: + 7b:03:af:f6:76:8e:a2:83:63:57:dd:63:bc:bb:5a: + 1c:17:52:8a:d6:06:48:cc:0f:c7:d3:4f:e8:da:22: + 6c:86:f9:4e:5c:a6:29:07:3b:d8:56:4c:59:b3:20: + 49:07:7b:94:84:cf:2b:c3:1c:1a:4e:87:64:92:ba: + 42:e1:e6:ad:7d:1d:f6:54:90:6f:2b:e9:b3:cc:4b: + 2b:33:26:23:fd:65:c0:3c:f0:79:ad:c9:c1:81:ef: + 37:04:e0:27:3e:b0:ee:15:be:51 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Subject Key Identifier: - DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48 + B3:8A:A0:A2:BA:71:F1:A8:24:79:D4:A4:5B:25:36:15:1E:49:C8:CD X509v3 Authority Key Identifier: - keyid:DD:BF:CA:DA:E6:D1:34:BA:37:75:21:CA:6F:9A:08:28:F2:35:B6:48 + keyid:B3:8A:A0:A2:BA:71:F1:A8:24:79:D4:A4:5B:25:36:15:1E:49:C8:CD X509v3 Basic Constraints: CA:TRUE Signature Algorithm: sha256WithRSAEncryption - 33:6a:54:d3:6b:c0:d7:01:5f:9d:f4:05:c1:93:66:90:50:d0: - b7:18:e9:b0:1e:4a:a0:b6:da:76:93:af:84:db:ad:15:54:31: - 15:13:e4:de:7e:4e:0c:d5:09:1c:34:35:b6:e5:4c:d6:6f:65: - 7d:32:5f:eb:fc:a9:6b:07:f7:49:82:e5:81:7e:07:80:9a:63: - f8:2c:c3:40:bc:8f:d4:2a:da:3e:d1:ee:08:b7:4d:a7:84:ca: - f4:3f:a1:98:45:be:b1:05:69:e7:df:d7:99:ab:1b:ee:8b:30: - cc:f7:fc:e7:d4:0b:17:ae:97:bf:e4:7b:fd:0f:a7:b4:85:79: - e3:59:e2:16:87:bf:1f:29:45:2c:23:93:76:be:c0:87:1d:de: - ec:2b:42:6a:e5:bb:c8:f4:0a:4a:08:0a:8c:5c:d8:7d:4d:d1: - b8:bf:d5:f7:29:ed:92:d1:94:04:e8:35:06:57:7f:2c:23:97: - 87:a5:35:8d:26:d3:1a:47:f2:16:d7:d9:c6:d4:1f:23:43:d3: - 26:99:39:ca:20:f4:71:23:6f:0c:4a:76:76:f7:76:1f:b3:fe: - bf:47:b0:fc:2a:56:81:e1:d2:dd:ee:08:d8:f4:ff:5a:dc:25: - 61:8a:91:02:b9:86:1c:f2:50:73:76:25:35:fc:b6:25:26:15: - cb:eb:c4:2b:61:0c:1c:e7:ee:2f:17:9b:ec:f0:d4:a1:84:e7: - d2:af:de:e4:1b:24:14:a7:01:87:e3:ab:29:58:46:a0:d9:c0: - 0a:e0:8d:d7:59:d3:1b:f8:54:20:3e:78:a5:a5:c8:4f:8b:03: - c4:96:9f:ec:fb:47:cf:76:2d:8d:65:34:27:bf:fa:ae:01:05: - 8a:f3:92:0a:dd:89:6c:97:a1:c7:e7:60:51:e7:ac:eb:4b:7d: - 2c:b8:65:c9:fe:5d:6a:48:55:8e:e4:c7:f9:6a:40:e1:b8:64: - 45:e9:b5:59:29:a5:5f:cf:7d:58:7d:64:79:e5:a4:09:ac:1e: - 76:65:3d:94:c4:68 + 6b:32:2f:e7:05:18:ea:5c:c9:95:f4:e0:c2:0c:41:5f:1a:0a: + 95:c9:c7:7d:05:ee:8a:56:29:35:50:40:b7:fe:9f:7b:5b:1c: + c3:69:2f:a0:cb:d2:b8:91:2f:50:19:62:f7:27:18:6d:95:7b: + 53:16:15:a2:5a:dc:14:e3:fb:b1:32:a9:69:db:a6:33:47:3c: + bb:1f:d2:dc:70:f9:6a:2e:0c:d8:8c:6d:e5:5d:1d:43:3c:4e: + 91:de:a0:c8:da:a0:4b:0e:9d:5e:b6:0f:4a:49:f0:7b:b6:53: + 9e:fd:35:14:5b:e3:4d:b4:18:a6:36:61:e8:8f:33:9b:d4:05: + f9:54:66:df:e0:cb:18:a3:4e:dc:17:a8:a0:b3:c1:a8:f4:d6: + 9d:ca:7f:68:53:1a:d7:95:da:e8:d3:9e:48:00:71:95:99:11: + 07:cf:96:c0:7d:ce:7d:30:e8:4f:e1:83:16:33:a1:ff:59:9b: + 3e:4c:e7:3a:38:01:9f:0f:67:4c:fd:2d:8b:4a:d4:01:46:37: + 33:e8:13:6b:15:a9:1d:68:76:45:a2:82:33:69:26:30:60:05: + c8:8f:bd:b4:75:ab:be:7a:8b:48:68:70:40:b4:1b:51:c5:e6: + 7a:ad:6b:4f:db:17:c0:60:67:2e:63:61:9b:2c:48:99:b8:76: + 45:a0:9e:cc:ef:33:1e:50:4e:ab:72:c3:65:c8:b2:79:b3:35: + 83:21:78:d3:8b:6c:3a:18:e8:65:32:39:b8:c0:9d:71:2f:35: + 36:8a:c0:17:62:d8:8b:3e:e1:22:18:2b:4c:63:a6:0e:9d:0a: + fa:ab:5b:35:fb:88:91:77:4c:8d:8c:9d:a9:cf:fc:ab:c2:e6: + 5a:05:7b:7e:04:6e:39:cf:93:ce:67:3b:7a:cb:af:b6:36:e1: + fb:71:64:45:d4:a6:f0:ce:ef:75:04:99:69:9a:e5:88:0a:10: + 02:74:89:ec:75:84:44:80:48:df:c1:f7:e9:37:ce:ce:92:92: + 5c:89:22:08:73:1f -----BEGIN CERTIFICATE----- MIIEbTCCAtWgAwIBAgIJAMstgJlaaVJbMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNV BAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUgRm91bmRhdGlvbiBDQTEW -MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0yODA4MjYx +MBQGA1UEAwwNb3VyLWNhLXNlcnZlcjAeFw0xODA4MjkxNDIzMTZaFw0zNzEwMjgx NDIzMTZaME0xCzAJBgNVBAYTAlhZMSYwJAYDVQQKDB1QeXRob24gU29mdHdhcmUg Rm91bmRhdGlvbiBDQTEWMBQGA1UEAwwNb3VyLWNhLXNlcnZlcjCCAaIwDQYJKoZI -hvcNAQEBBQADggGPADCCAYoCggGBAJftVUG6NheV23Ec0+FhrFhz48aWzysfuAj1 -nUtLxzD2uAuzUnKgu8lNO47fIo4BV4HJknPMAMbscLA6F0DB3/KMNkzEp4HntiRo -4qB+NQcvoFv5RUb3HvBGEf7KGjxQ8SapX5winPhB4d9PEpUZL1yQARdufj59z+kJ -ryX4+EJ3LW1fNvJ4Hn1Kh2hjbAZxG436Jf7U0/WlF7Hv6hfLVMgnmYDLPEXxLFIc -3R9RRSBQHl6rV3MbQXiW3oSket2PMIU2WHl2oNJhyBuplJljxu74FL+0UlYxl/rr -rFOelc5MxFpKt8oDJ1s1V84C3OzKafiKWjnLFiAVAyRhbPR6/LZI5VkQXEnQI5/7 -cV466WifNHKAJ7Y/TLHZ22N/Z2hKbhH46MD0WhY5Uwto3nf6Ref4kc14zSiUl3FU -+8/wN97JJsXcG56JbQmsyERxy23xlzHVTCAzv3VKoODcaRHtKrRkEBEwiw6wpxDY -isWqG8gmiiXnZp+lahovfF+DxnhPHwIDAQABo1AwTjAdBgNVHQ4EFgQU3b/K2ubR -NLo3dSHKb5oIKPI1tkgwHwYDVR0jBBgwFoAU3b/K2ubRNLo3dSHKb5oIKPI1tkgw -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAYEAM2pU02vA1wFfnfQFwZNm -kFDQtxjpsB5KoLbadpOvhNutFVQxFRPk3n5ODNUJHDQ1tuVM1m9lfTJf6/ypawf3 -SYLlgX4HgJpj+CzDQLyP1CraPtHuCLdNp4TK9D+hmEW+sQVp59/Xmasb7oswzPf8 -59QLF66Xv+R7/Q+ntIV541niFoe/HylFLCOTdr7Ahx3e7CtCauW7yPQKSggKjFzY -fU3RuL/V9yntktGUBOg1Bld/LCOXh6U1jSbTGkfyFtfZxtQfI0PTJpk5yiD0cSNv -DEp2dvd2H7P+v0ew/CpWgeHS3e4I2PT/WtwlYYqRArmGHPJQc3YlNfy2JSYVy+vE -K2EMHOfuLxeb7PDUoYTn0q/e5BskFKcBh+OrKVhGoNnACuCN11nTG/hUID54paXI -T4sDxJaf7PtHz3YtjWU0J7/6rgEFivOSCt2JbJehx+dgUees60t9LLhlyf5dakhV -juTH+WpA4bhkRem1WSmlX899WH1keeWkCawedmU9lMRo +hvcNAQEBBQADggGPADCCAYoCggGBALGE009cBICRT4JJujAL9+jL+RTvPZ8LPwpi +/BsgpSDRYF+HWh8W0e2XcKbaGwMsfqBbPE4vFn4OiSmJ4RANONpqd183E7Moj3tc +dq2e6NP1nvWDqhAHjeZRmPB8DVLyDCEe2LmZJqklAye7XKsuMyei1iOog4dEKZ+X +tSRv17kK/Sjuu/tBWOodmd1EhquYvhzcy6mJHTZcqehHtfRSSKq1pGfvPtfi0zPe +mCnYerBZXOexDsz9n+v21ToOC8/+Cz2iv0UYzpTnqVVgiNTYhFB5BS5BA3SuZyb2 +WxIImM4Kl+0BD4lPF1z6Ph01JEeSMr/3pBgrPNBImeGizaPMUFMgtcbjZoV7VxDs +M0/Bd+cbfoHGxPNFIMCR3RN2ewOv9naOooNjV91jvLtaHBdSitYGSMwPx9NP6Noi +bIb5TlymKQc72FZMWbMgSQd7lITPK8McGk6HZJK6QuHmrX0d9lSQbyvps8xLKzMm +I/1lwDzwea3JwYHvNwTgJz6w7hW+UQIDAQABo1AwTjAdBgNVHQ4EFgQUs4qgorpx +8agkedSkWyU2FR5JyM0wHwYDVR0jBBgwFoAUs4qgorpx8agkedSkWyU2FR5JyM0w +DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAYEAazIv5wUY6lzJlfTgwgxB +XxoKlcnHfQXuilYpNVBAt/6fe1scw2kvoMvSuJEvUBli9ycYbZV7UxYVolrcFOP7 +sTKpadumM0c8ux/S3HD5ai4M2Ixt5V0dQzxOkd6gyNqgSw6dXrYPSknwe7ZTnv01 +FFvjTbQYpjZh6I8zm9QF+VRm3+DLGKNO3BeooLPBqPTWncp/aFMa15Xa6NOeSABx +lZkRB8+WwH3OfTDoT+GDFjOh/1mbPkznOjgBnw9nTP0ti0rUAUY3M+gTaxWpHWh2 +RaKCM2kmMGAFyI+9tHWrvnqLSGhwQLQbUcXmeq1rT9sXwGBnLmNhmyxImbh2RaCe +zO8zHlBOq3LDZciyebM1gyF404tsOhjoZTI5uMCdcS81NorAF2LYiz7hIhgrTGOm +Dp0K+qtbNfuIkXdMjYydqc/8q8LmWgV7fgRuOc+Tzmc7esuvtjbh+3FkRdSm8M7v +dQSZaZrliAoQAnSJ7HWERIBI38H36TfOzpKSXIkiCHMf -----END CERTIFICATE----- diff --git a/Lib/test/pycakey.pem b/Lib/test/pycakey.pem index c283f89098684d..819bdef1ff9bfc 100644 --- a/Lib/test/pycakey.pem +++ b/Lib/test/pycakey.pem @@ -1,40 +1,40 @@ -----BEGIN PRIVATE KEY----- -MIIG/AIBADANBgkqhkiG9w0BAQEFAASCBuYwggbiAgEAAoIBgQCX7VVBujYXldtx -HNPhYaxYc+PGls8rH7gI9Z1LS8cw9rgLs1JyoLvJTTuO3yKOAVeByZJzzADG7HCw -OhdAwd/yjDZMxKeB57YkaOKgfjUHL6Bb+UVG9x7wRhH+yho8UPEmqV+cIpz4QeHf -TxKVGS9ckAEXbn4+fc/pCa8l+PhCdy1tXzbyeB59SodoY2wGcRuN+iX+1NP1pRex -7+oXy1TIJ5mAyzxF8SxSHN0fUUUgUB5eq1dzG0F4lt6EpHrdjzCFNlh5dqDSYcgb -qZSZY8bu+BS/tFJWMZf666xTnpXOTMRaSrfKAydbNVfOAtzsymn4ilo5yxYgFQMk -YWz0evy2SOVZEFxJ0COf+3FeOulonzRygCe2P0yx2dtjf2doSm4R+OjA9FoWOVML -aN53+kXn+JHNeM0olJdxVPvP8DfeySbF3BueiW0JrMhEcctt8Zcx1UwgM791SqDg -3GkR7Sq0ZBARMIsOsKcQ2IrFqhvIJool52afpWoaL3xfg8Z4Tx8CAwEAAQKCAYB6 -1g1kwyYRE70FS4WUaOBr8+dqHW0LNO4bcFrpEi/PSuurqiUzQPoT3DoXXhoWLseN -zGh476yBKZJDKfS7CwYCmZMdprK4uZvu/E6f7Or7EGrbckOtCQkew8iw9L8ZnWgd -FjyThPjdUIdLgidIHcDJWjVHuLKh3B9KD+ZpEU/IjYtRLvbCPJSKQMQShrBE1Rau -SF6IF5P4vK7X0162NlQqMLpQBAKLml93VJcERzVY1u53JJnkG1loIrNvE32zvZ0C -ZnGVpWwamixVrO9K66F+Ml3Y3bkguF8aPUitc+l+yPmUSXmcDcKmhw9DZA0k5t39 -FxVYGn1uJlvHll8QvV9aZtzuTSkAN8VWNufGwivLLsoRlRb1LtGWqHY583FlUWtz -99ABCBehZ2EpAP+MrRj+pyKuMrkQH61bbOhjqifBM8MhHdn9uNmMpvnKyGPMIdRY -cLH4i2S5aQVvmsQbOa98DLOFGXdf+z5HuwdxHtG1S3J7jkT+FkIyYDehJA3X8UEC -gcEAyCpD8rMFfR5qLwrajhy8vbV7TIkNfFHEkm9tCWDBHwuOJqA0DFuMDAKl7cMv -Uo7Z6R2Fqe2OyWvxYkOi/CSjvtT+PTiA0ux1tXUZcxcRSIsLqQZV+elsKcv+QJPy -vf02vNvHjaMaRwl+NYtqpfr1s/3EdJnWCNC3nV1dD+mWVJoO3kGAK5grLAPM1/uP -stARN5Tnh3Doh8e1Yl4V4UKcVqyVqDykX1OLSmPqNH86T4Um0B4h+jf4UBBdDBz1 -rD3JAoHBAMJOZ3M7LqX+F2haSrF/hnG1y9qAqDWGsvy+8YgjFwPFWu7LvqLuXLuz -S3+5GGhplMuM0itqA9PyPotlgtG5O9hAU8SyMitrx1uTW+Q2U3iYPZQ9O327l1cO -F2jKljq0aJrXp+5iWUq8t/FG6DAqYYUCY/X1SheqEXCgCh4ldRhXig3TBYbVZNs9 -7azN0lk408AO/Hx7WYreFQVS7A/EJhk/M1yyIqnJESuxkDefjV4hTVkRXhh+MrCe -vF/jHqh5pwKBwHxXPQRbzvINXbrBTEjxcxGJ1gESNg1fIfQxQZOMxgrJ+9DkvdBb -YiDn2DldgV0Qni8ghrKrfoKDClyXVXy6KfnWh+Rx4BymhOxmxJto3fSpY2HpLKll -JirErLli7my1CjbBdDH4+s7cB8mtRF+9CLp5znr8QSgSt60KnU/QM/F0Df5kxADQ -syjRZ4NXoslaVQeo+TZ6nggSuAtWFNNstH9nEESE/zq0RBe+/3MDAa76MMUhosuz -zw21TIfEyZvoeQKBwDpszNpvPzWWU3+DNtZsXAaw/Vz0Np/xorwwxfuDYZY2r4MC -LI5dUfD2losPIvGyXZVfAIshU4lVW80adt2M7xu1K/sHAeLgg49bndPfKfYnAM0k -JFFIKNd6WzudPtLkEFgO5GXfmK3KVRztjz98XtpZv6jjWqYG8zuEQ8aQyMbK+63w -d8b1P2BVHLRLJybA2Zr0ZqMfi+sfn/570pNjDXml8VG8FoQq+0jCGXVAOofFR7ay -bDK9L4zADjBe4IcUHQKBwFwj8TEVlWxtG+IWO5d+vyuP0OPjSYOmYq4dCMyZ2+Xy -Y+XDYEhlgGTVxafRMTwt57VV3hJTtRxUZziDA++atr8+gPio+QHBYg1JgCKsqKYL -TGoSVrM1jTfdl1orwkpgQmq2q5j7ExpNA3Spsm5kyCaJ1S/8Ivusqaod8S4t7UhW -BRec3gQ+UYv/V3Pc9hS1Zdzf5+G+PDOYoNmveY16hcu0DKc/PlqGtJuBoQjjH7ir -1YVK9GAgLk0VqJvePnF57A== +MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQCxhNNPXASAkU+C +SbowC/foy/kU7z2fCz8KYvwbIKUg0WBfh1ofFtHtl3Cm2hsDLH6gWzxOLxZ+Dokp +ieEQDTjaandfNxOzKI97XHatnujT9Z71g6oQB43mUZjwfA1S8gwhHti5mSapJQMn +u1yrLjMnotYjqIOHRCmfl7Ukb9e5Cv0o7rv7QVjqHZndRIarmL4c3MupiR02XKno +R7X0UkiqtaRn7z7X4tMz3pgp2HqwWVznsQ7M/Z/r9tU6DgvP/gs9or9FGM6U56lV +YIjU2IRQeQUuQQN0rmcm9lsSCJjOCpftAQ+JTxdc+j4dNSRHkjK/96QYKzzQSJnh +os2jzFBTILXG42aFe1cQ7DNPwXfnG36BxsTzRSDAkd0TdnsDr/Z2jqKDY1fdY7y7 +WhwXUorWBkjMD8fTT+jaImyG+U5cpikHO9hWTFmzIEkHe5SEzyvDHBpOh2SSukLh +5q19HfZUkG8r6bPMSyszJiP9ZcA88HmtycGB7zcE4Cc+sO4VvlECAwEAAQKCAYB7 +gUnzALYxLOgAYYMkQm9si9zz768TpCNr+ooj5YZ9Wq6OSAEveBT+FErQCxaYErDW +qCNA0gn4Eezj9YWcQVa4vzHmEM+n6iRJU39ONC0Qqua5Ma10EY1sHIEnb2dlufku +YeOu3RrEu3eCgRxsDGySuvv5OxinV4kN++KPQzD3EOopPE+U81YFLCsMgsyfPlmm +gwc/IKIuXDHp5Vp2bXkZK98CYLV8RddjUw7SrkZNwx6cI9eET0CgTs7y4SrevoOy +jCdnA0j1HvL8AbLQuYoXo9fdGYDeq55hyYlxSMYLaEToZG3DJ0UAldrT+r7x52D8 +2QMnJUo2XHzVYPlXPJIAkFJisZZ36TkBvywCgXZMMLibPo9U6V0nfkybTtXKoory +nmgBv+XSGSNrVWMiygpDPqpX1G6bBgqUX3CiTlxtSkYYz1M4Vgj2cux5XEPTnVCq +CLVzvNIXZt1RyzXPxGWpPidCjOaiWBRT4u1Dol9fs3PmVvDaRxcKo9nspiUHCfEC +gcEA4GgxZ+IJwpAMHkdYId0oxjKgTqIg+Ua+EwfUoQT10ERl/k/V4cDwJRHT8lML +rKhTNQJMEE040jq+6mPJDl1KqMb/v05Q7fF22ToGw1HkZwK52O6CeEiJW4/J6bR1 +pZGN0irsa6GvzV65Y6gZVFEUl0JPRf8wPvQHXsWAw8/2LuXkXjV0ieIMq4pbWJf4 +kaid7dYLHnobiP9RVk7BGr7ifmCshoPjWp4TRMwYf6iIZrqMxUSX0QY8Xsqx6bch +LLx/AoHBAMqCvvwUKTrF4gKh5jyl6T6DTZ/Dujaz7BuAJdsSSHvuTa/Y1EfsQHZN +jABn89ZqHYDiyyCuVFO3dqhLtsPjhyFMSXj+98JYcL3FGKnqQqRTwtzzx2P2lV5X +U0WhrNRb3iLu79Tr8pE/2EPnvTr+J5b0DHEeRyM72LWs43zrDYHorH0/Aa5Qd37F +gDLCTBEl8jO5irRuAIq/KV9ZFnn8JDjNGVpXgHPW3354ON1YaMLnPASk7FQizSOQ +QZAsyxtdLwKBwGUosvTYYXvygXP4x1LkpmfKFJe94E1exXpAsmovmTvcSXn9tTXC +Sr77LWb0ZrPbYT7pHS7QEMg8MSnp941hIrG4mzs666KHkgLUdI4B0YtaIDsZMXlV +gY3j4KpYbhxH4/2U2eSfC2fxxnKVKW3n6vdQrfmo0q/eQ6BGOgiLK7fybCLHyBQL +8Zg2k3z5bNUEhMTdE0AW3WjBZ4IXmFcdK26616r/szJ7RcZilrydVXexqpmWlTVl +sTst9kucAPlwswKBwQCwf7my/GNezR8Jik+fZj7edBQQfcdra+8JnOvhfpLcKLte +2s1RjjA0q6usou1bYAsszP2bEzV97XWmgq7dFg4tUE7s/NO1d91zGDhBx2Gj1TkN +2A5dKonOuq9iDeITB6qYqcUvvyEfxRRZQr2jj+WzZCr/4BLCO6PJ29A9jKOuKLtF +QcfWRF2RiNMN6lffzkHFIR4p2YHxa2DEsGGtmbt8Ig3Jtl/HFmydzmxJRoev71dY ++ODdB6PhLhZmcRPoWpMCgcEAhGArwL68GwwRMqAX79gMv8tVT0CJnDyGk5mD/ZIB +Nzt0yQFO7rTEa1l1vAtOiVJ9IpAak2lgbEwodOfGnQst7lujNYDFzTRPTFt/lID1 +u6JBxmqawOSlqa00bt4l2YsTZV+BfSznBP6XO1PK4iR3o5G3NkoKJjZWm3e3asHk +6eTeMLcsIJ+Fp7gG0ve2EdQwhVSVMFEu4Q4C2FcJeU++L4kYpY7sTnAjUtiLvtHn +yp3jllEn3CBD8Uhs4B+sL/6p -----END PRIVATE KEY----- diff --git a/Lib/test/revocation.crl b/Lib/test/revocation.crl index c05461ca7f9389..621675eb5c183d 100644 --- a/Lib/test/revocation.crl +++ b/Lib/test/revocation.crl @@ -1,14 +1,14 @@ -----BEGIN X509 CRL----- MIICJjCBjwIBATANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQGEwJYWTEmMCQGA1UE CgwdUHl0aG9uIFNvZnR3YXJlIEZvdW5kYXRpb24gQ0ExFjAUBgNVBAMMDW91ci1j -YS1zZXJ2ZXIXDTE4MDgyOTE0MjMxNloXDTI4MDcwNzE0MjMxNlqgDjAMMAoGA1Ud -FAQDAgEAMA0GCSqGSIb3DQEBCwUAA4IBgQCPhrtGSbuvxPAI3YWQFDB4iOWdBnVk -ugW1lsifmCsE86FfID0EwUut1SRHlksltMtcoULMEIdu8yMLWci++4ve22EEuMKT -HUc3T/wBIuQUhA7U4deFG8CZPAxRpNoK470y7dkD4OVf0Gxa6WYDl9z8mXKmWCB9 -hvzqVfLWNSLTAVPsHtkD5PXdi5yRkQr6wYD7poWaIvkpsn7EKCY6Tw5V3rsbRuZq -AGVCq5TH3mctcmwLloCJ4Xr/1q0DsRrYxeeLYxE+UpvvCbVBKgtjBK7zINS7AbcJ -CYCYKUwGWv1fYKJ+KQQHf75mT3jQ9lWuzOj/YWK4k1EBnYmVGuKKt73lLFxC6h3y -MUnaBZc1KZSyJj0IxfHg/o6qx8NgKOl9XRIQ5g5B30cwpPOskGhEhodbTTY3bPtm -RQ36JvQZngzmkhyhr+MDEV5yUTOShfUiclzQOx26CmLmLHWxOZgXtFZob/oKrvbm -Gen/+7K7YTw6hfY52U7J2FuQRGOyzBXfBYQ= +YS1zZXJ2ZXIXDTIxMDMxNzA4NDgyMFoXDTQwMDUxNjA4NDgyMFqgDjAMMAoGA1Ud +FAQDAgEAMA0GCSqGSIb3DQEBCwUAA4IBgQCd2GrHb4zr2R8eK7YMHwlkgICxbWP1 +4nuEi55yzUcmMcCZJ6ZQV3yYqTlAULGQ9qWAUdhsyH+yu3hRKFKHQv0DAdKKxgow +66YasAQQ99DskXOPxmRoIA7qtIWZbLtBwHQJWh+uUFlTdUXitGIX5Xie74xu5YIr +moa3QeuZyG5+gigSTUyst5T/J/cHfBzlAJLc2k3Ty4EPYXKHCVnrZWJbRmxq199l +A7S+eBb9qWXSYXCn6v+EZ76pUS3u/66kZ86PO3h9294BzdhxbCJ27dQXNHw6owe2 +Iyiv0aWx+TNSGSf4yCqaYTH6RtEoviI3h/inVFHNGgjlMzdaGw/0I3bkB0rt2WSR +Vck37HnXvQvVEkgO/39C0WKZus6m4gmOgZcbJbXaR8uIR5Hmw3SEyGEPEIBu6tXV +BLJOSOSu2vVUH5GUIrpvK9FTySKYa+MGryoPasuqZNfwpaXK+ON2G6QsmcXPWZY0 +Dry6t0w2geW6UYVGmb831i8ZP3JVVVwcwi0= -----END X509 CRL----- diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py index 67180f7eb3955a..0032c9a331f752 100644 --- a/Lib/test/test_asyncio/utils.py +++ b/Lib/test/test_asyncio/utils.py @@ -59,7 +59,7 @@ def data_file(filename): 'issuer': ((('countryName', 'XY'),), (('organizationName', 'Python Software Foundation CA'),), (('commonName', 'our-ca-server'),)), - 'notAfter': 'Jul 7 14:23:16 2028 GMT', + 'notAfter': 'Oct 28 14:23:16 2037 GMT', 'notBefore': 'Aug 29 14:23:16 2018 GMT', 'serialNumber': 'CB2D80995A69525C', 'subject': ((('countryName', 'XY'),), diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 140aecc712738e..54007c78ed31ae 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -110,7 +110,7 @@ def data_file(*name): 'issuer': ((('countryName', 'XY'),), (('organizationName', 'Python Software Foundation CA'),), (('commonName', 'our-ca-server'),)), - 'notAfter': 'Jul 7 14:23:16 2028 GMT', + 'notAfter': 'Oct 28 14:23:16 2037 GMT', 'notBefore': 'Aug 29 14:23:16 2018 GMT', 'serialNumber': 'CB2D80995A69525C', 'subject': ((('countryName', 'XY'),), @@ -131,6 +131,8 @@ def data_file(*name): # cert with all kinds of subject alt names ALLSANFILE = data_file("allsans.pem") IDNSANSFILE = data_file("idnsans.pem") +NOSANFILE = data_file("nosan.pem") +NOSAN_HOSTNAME = 'localhost' REMOTE_HOST = "self-signed.pythontest.net" @@ -345,6 +347,8 @@ def testing_context(server_cert=SIGNED_CERTFILE): hostname = SIGNED_CERTFILE_HOSTNAME elif server_cert == SIGNED_CERTFILE2: hostname = SIGNED_CERTFILE2_HOSTNAME + elif server_cert == NOSANFILE: + hostname = NOSAN_HOSTNAME else: raise ValueError(server_cert) @@ -3027,6 +3031,30 @@ def test_check_hostname(self): "check_hostname requires server_hostname"): client_context.wrap_socket(s) + @unittest.skipUnless( + ssl.HAS_NEVER_CHECK_COMMON_NAME, "test requires hostname_checks_common_name" + ) + def test_hostname_checks_common_name(self): + client_context, server_context, hostname = testing_context() + assert client_context.hostname_checks_common_name + client_context.hostname_checks_common_name = False + + # default cert has a SAN + server = ThreadedEchoServer(context=server_context, chatty=True) + with server: + with client_context.wrap_socket(socket.socket(), + server_hostname=hostname) as s: + s.connect((HOST, server.port)) + + client_context, server_context, hostname = testing_context(NOSANFILE) + client_context.hostname_checks_common_name = False + server = ThreadedEchoServer(context=server_context, chatty=True) + with server: + with client_context.wrap_socket(socket.socket(), + server_hostname=hostname) as s: + with self.assertRaises(ssl.SSLCertVerificationError): + s.connect((HOST, server.port)) + def test_ecc_cert(self): client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) client_context.load_verify_locations(SIGNING_CA) diff --git a/Misc/NEWS.d/next/Library/2021-03-16-22-37-32.bpo-43522.dhNwOu.rst b/Misc/NEWS.d/next/Library/2021-03-16-22-37-32.bpo-43522.dhNwOu.rst new file mode 100644 index 00000000000000..a17e1b44637383 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-03-16-22-37-32.bpo-43522.dhNwOu.rst @@ -0,0 +1 @@ +Fix problem with :attr:`~ssl.SSLContext.hostname_checks_common_name`. OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. diff --git a/Modules/_ssl.c b/Modules/_ssl.c index d2b257e1ff462c..951f9699278db7 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -964,6 +964,11 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, _setSSLError(NULL, 0, __FILE__, __LINE__); return NULL; } + /* bpo43522 and OpenSSL < 1.1.1l: copy hostflags manually */ +#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION < 0x101010cf + X509_VERIFY_PARAM *ssl_params = SSL_get0_param(self->ssl); + X509_VERIFY_PARAM_set_hostflags(ssl_params, sslctx->hostflags); +#endif SSL_set_app_data(self->ssl, self); if (sock) { SSL_set_fd(self->ssl, Py_SAFE_DOWNCAST(sock->sock_fd, SOCKET_T, int)); From 39258d3595300bc7b952854c915f63ae2d4b9c3e Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 17 Apr 2021 11:36:35 +0200 Subject: [PATCH 083/108] bpo-43669: PEP 644: Require OpenSSL 1.1.1 or newer (GH-23014) - Remove HAVE_X509_VERIFY_PARAM_SET1_HOST check - Update hashopenssl to require OpenSSL 1.1.1 - multissltests only OpenSSL > 1.1.0 - ALPN is always supported - SNI is always supported - Remove deprecated NPN code. Python wrappers are no-op. - ECDH is always supported - Remove OPENSSL_VERSION_1_1 macro - Remove locking callbacks - Drop PY_OPENSSL_1_1_API macro - Drop HAVE_SSL_CTX_CLEAR_OPTIONS macro - SSL_CTRL_GET_MAX_PROTO_VERSION is always defined now - security level is always available now - get_num_tickets is available with TLS 1.3 - X509_V_ERR MISMATCH is always available now - Always set SSL_MODE_RELEASE_BUFFERS - X509_V_FLAG_TRUSTED_FIRST is always available - get_ciphers is always supported - SSL_CTX_set_keylog_callback is always available - Update Modules/Setup with static link example - Mention PEP in whatsnew - Drop 1.0.2 and 1.1.0 from GHA tests --- .github/workflows/build.yml | 2 +- Doc/using/unix.rst | 1 + Doc/whatsnew/3.10.rst | 6 +- Lib/ssl.py | 10 +- Lib/test/test_ssl.py | 119 +- .../2021-03-30-14-19-39.bpo-43669.lWMUYx.rst | 1 + Modules/Setup | 22 +- Modules/_hashopenssl.c | 66 +- Modules/_ssl.c | 537 +- Modules/_ssl/debughelpers.c | 4 - Modules/clinic/_hashopenssl.c.h | 14 +- Modules/clinic/_ssl.c.h | 87 +- Tools/ssl/multissltests.py | 6 +- configure | 12795 +++++++--------- configure.ac | 36 - pyconfig.h.in | 3 - setup.py | 41 +- 17 files changed, 5310 insertions(+), 8440 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2021-03-30-14-19-39.bpo-43669.lWMUYx.rst diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6e6ce3085415c..333c508ef53a79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -177,7 +177,7 @@ jobs: strategy: fail-fast: false matrix: - openssl_ver: [1.0.2u, 1.1.0l, 1.1.1k, 3.0.0-alpha14] + openssl_ver: [1.1.1k, 3.0.0-alpha14] env: OPENSSL_VER: ${{ matrix.openssl_ver }} MULTISSL_DIR: ${{ github.workspace }}/multissl diff --git a/Doc/using/unix.rst b/Doc/using/unix.rst index 09dd5b0ac6e909..1d1fa8bd85d7ed 100644 --- a/Doc/using/unix.rst +++ b/Doc/using/unix.rst @@ -135,6 +135,7 @@ some Unices may not have the :program:`env` command, so you may need to hardcode To use shell commands in your Python scripts, look at the :mod:`subprocess` module. +.. _unix_custom_openssl: Custom OpenSSL ============== diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 6623adfbf4f3d3..0198b6e75deab3 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -65,6 +65,7 @@ Summary -- Release highlights .. PEP-sized items next. +* :pep:`644`, require OpenSSL 1.1.1 or newer New Features @@ -1438,6 +1439,10 @@ CPython bytecode changes Build Changes ============= +* :pep:`644`: Python now requires OpenSSL 1.1.1 or newer. OpenSSL 1.0.2 is no + longer supported. + (Contributed by Christian Heimes in :issue:`43669`.) + * The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now required to build Python. (Contributed by Victor Stinner in :issue:`36020`.) @@ -1483,7 +1488,6 @@ Build Changes (Contributed by Christian Heimes in :issue:`43466`.) - C API Changes ============= diff --git a/Lib/ssl.py b/Lib/ssl.py index 30f4e5934febf9..9c1ba581dd66f5 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -909,15 +909,12 @@ def selected_npn_protocol(self): """Return the currently selected NPN protocol as a string, or ``None`` if a next protocol was not negotiated or if NPN is not supported by one of the peers.""" - if _ssl.HAS_NPN: - return self._sslobj.selected_npn_protocol() def selected_alpn_protocol(self): """Return the currently selected ALPN protocol as a string, or ``None`` if a next protocol was not negotiated or if ALPN is not supported by one of the peers.""" - if _ssl.HAS_ALPN: - return self._sslobj.selected_alpn_protocol() + return self._sslobj.selected_alpn_protocol() def cipher(self): """Return the currently selected cipher as a 3-tuple ``(name, @@ -1126,10 +1123,7 @@ def getpeercert(self, binary_form=False): @_sslcopydoc def selected_npn_protocol(self): self._checkClosed() - if self._sslobj is None or not _ssl.HAS_NPN: - return None - else: - return self._sslobj.selected_npn_protocol() + return None @_sslcopydoc def selected_alpn_protocol(self): diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 54007c78ed31ae..3ad14c63968e64 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -40,7 +40,6 @@ PROTOCOLS = sorted(ssl._PROTOCOL_NAMES) HOST = socket_helper.HOST IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL') -IS_OPENSSL_1_1_0 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0) IS_OPENSSL_1_1_1 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 1) IS_OPENSSL_3_0_0 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (3, 0, 0) PY_SSL_DEFAULT_CIPHERS = sysconfig.get_config_var('PY_SSL_DEFAULT_CIPHERS') @@ -270,18 +269,6 @@ def handle_error(prefix): if support.verbose: sys.stdout.write(prefix + exc_format) -def can_clear_options(): - # 0.9.8m or higher - return ssl._OPENSSL_API_VERSION >= (0, 9, 8, 13, 15) - -def no_sslv2_implies_sslv3_hello(): - # 0.9.7h or higher - return ssl.OPENSSL_VERSION_INFO >= (0, 9, 7, 8, 15) - -def have_verify_flags(): - # 0.9.8 or higher - return ssl.OPENSSL_VERSION_INFO >= (0, 9, 8, 0, 15) - def _have_secp_curves(): if not ssl.HAS_ECDH: return False @@ -372,17 +359,15 @@ def test_constants(self): ssl.OP_SINGLE_DH_USE if ssl.HAS_ECDH: ssl.OP_SINGLE_ECDH_USE - if ssl.OPENSSL_VERSION_INFO >= (1, 0): - ssl.OP_NO_COMPRESSION + ssl.OP_NO_COMPRESSION self.assertIn(ssl.HAS_SNI, {True, False}) self.assertIn(ssl.HAS_ECDH, {True, False}) ssl.OP_NO_SSLv2 ssl.OP_NO_SSLv3 ssl.OP_NO_TLSv1 ssl.OP_NO_TLSv1_3 - if ssl.OPENSSL_VERSION_INFO >= (1, 0, 1): - ssl.OP_NO_TLSv1_1 - ssl.OP_NO_TLSv1_2 + ssl.OP_NO_TLSv1_1 + ssl.OP_NO_TLSv1_2 self.assertEqual(ssl.PROTOCOL_TLS, ssl.PROTOCOL_SSLv23) def test_private_init(self): @@ -1161,7 +1146,6 @@ def test_python_ciphers(self): self.assertNotIn("RC4", name) self.assertNotIn("3DES", name) - @unittest.skipIf(ssl.OPENSSL_VERSION_INFO < (1, 0, 2, 0, 0), 'OpenSSL too old') def test_get_ciphers(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ctx.set_ciphers('AESGCM') @@ -1181,15 +1165,11 @@ def test_options(self): self.assertEqual(default, ctx.options) ctx.options |= ssl.OP_NO_TLSv1 self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options) - if can_clear_options(): - ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1) - self.assertEqual(default, ctx.options) - ctx.options = 0 - # Ubuntu has OP_NO_SSLv3 forced on by default - self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3) - else: - with self.assertRaises(ValueError): - ctx.options = 0 + ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1) + self.assertEqual(default, ctx.options) + ctx.options = 0 + # Ubuntu has OP_NO_SSLv3 forced on by default + self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3) def test_verify_mode_protocol(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) @@ -1327,8 +1307,6 @@ def test_security_level(self): } self.assertIn(ctx.security_level, security_level_range) - @unittest.skipUnless(have_verify_flags(), - "verify_flags need OpenSSL > 0.9.8") def test_verify_flags(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) # default value @@ -1797,7 +1775,6 @@ class MySSLObject(ssl.SSLObject): obj = ctx.wrap_bio(ssl.MemoryBIO(), ssl.MemoryBIO()) self.assertIsInstance(obj, MySSLObject) - @unittest.skipUnless(IS_OPENSSL_1_1_1, "Test requires OpenSSL 1.1.1") def test_num_tickest(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) self.assertEqual(ctx.num_tickets, 2) @@ -2956,8 +2933,6 @@ def test_getpeercert(self): after = ssl.cert_time_to_seconds(cert['notAfter']) self.assertLess(before, after) - @unittest.skipUnless(have_verify_flags(), - "verify_flags need OpenSSL > 0.9.8") def test_crl_check(self): if support.verbose: sys.stdout.write("\n") @@ -3859,12 +3834,7 @@ def test_version_basic(self): self.assertIs(s.version(), None) self.assertIs(s._sslobj, None) s.connect((HOST, server.port)) - if IS_OPENSSL_1_1_1 and has_tls_version('TLSv1_3'): - self.assertEqual(s.version(), 'TLSv1.3') - elif ssl.OPENSSL_VERSION_INFO >= (1, 0, 2): - self.assertEqual(s.version(), 'TLSv1.2') - else: # 0.9.8 to 1.0.1 - self.assertIn(s.version(), ('TLSv1', 'TLSv1.2')) + self.assertEqual(s.version(), 'TLSv1.3') self.assertIs(s._sslobj, None) self.assertIs(s.version(), None) @@ -3966,8 +3936,6 @@ def test_default_ecdh_curve(self): # explicitly using the 'ECCdraft' cipher alias. Otherwise, # our default cipher list should prefer ECDH-based ciphers # automatically. - if ssl.OPENSSL_VERSION_INFO < (1, 0, 0): - context.set_ciphers("ECCdraft:ECDH") with ThreadedEchoServer(context=context) as server: with context.wrap_socket(socket.socket()) as s: s.connect((HOST, server.port)) @@ -4099,15 +4067,11 @@ def test_ecdh_curve(self): server_context.set_ciphers("ECDHE:!eNULL:!aNULL") server_context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 try: - stats = server_params_test(client_context, server_context, - chatty=True, connectionchatty=True, - sni_name=hostname) + server_params_test(client_context, server_context, + chatty=True, connectionchatty=True, + sni_name=hostname) except ssl.SSLError: - pass - else: - # OpenSSL 1.0.2 does not fail although it should. - if IS_OPENSSL_1_1_0: - self.fail("mismatch curve did not fail") + self.fail("mismatch curve did not fail") def test_selected_alpn_protocol(self): # selected_alpn_protocol() is None unless ALPN is used. @@ -4117,7 +4081,6 @@ def test_selected_alpn_protocol(self): sni_name=hostname) self.assertIs(stats['client_alpn_protocol'], None) - @unittest.skipUnless(ssl.HAS_ALPN, "ALPN support required") def test_selected_alpn_protocol_if_server_uses_alpn(self): # selected_alpn_protocol() is None unless ALPN is used by the client. client_context, server_context, hostname = testing_context() @@ -4127,7 +4090,6 @@ def test_selected_alpn_protocol_if_server_uses_alpn(self): sni_name=hostname) self.assertIs(stats['client_alpn_protocol'], None) - @unittest.skipUnless(ssl.HAS_ALPN, "ALPN support needed for this test") def test_alpn_protocols(self): server_protocols = ['foo', 'bar', 'milkshake'] protocol_tests = [ @@ -4150,22 +4112,17 @@ def test_alpn_protocols(self): except ssl.SSLError as e: stats = e - if (expected is None and IS_OPENSSL_1_1_0 - and ssl.OPENSSL_VERSION_INFO < (1, 1, 0, 6)): - # OpenSSL 1.1.0 to 1.1.0e raises handshake error - self.assertIsInstance(stats, ssl.SSLError) - else: - msg = "failed trying %s (s) and %s (c).\n" \ - "was expecting %s, but got %%s from the %%s" \ - % (str(server_protocols), str(client_protocols), - str(expected)) - client_result = stats['client_alpn_protocol'] - self.assertEqual(client_result, expected, - msg % (client_result, "client")) - server_result = stats['server_alpn_protocols'][-1] \ - if len(stats['server_alpn_protocols']) else 'nothing' - self.assertEqual(server_result, expected, - msg % (server_result, "server")) + msg = "failed trying %s (s) and %s (c).\n" \ + "was expecting %s, but got %%s from the %%s" \ + % (str(server_protocols), str(client_protocols), + str(expected)) + client_result = stats['client_alpn_protocol'] + self.assertEqual(client_result, expected, + msg % (client_result, "client")) + server_result = stats['server_alpn_protocols'][-1] \ + if len(stats['server_alpn_protocols']) else 'nothing' + self.assertEqual(server_result, expected, + msg % (server_result, "server")) def test_selected_npn_protocol(self): # selected_npn_protocol() is None unless NPN is used @@ -4175,31 +4132,8 @@ def test_selected_npn_protocol(self): sni_name=hostname) self.assertIs(stats['client_npn_protocol'], None) - @unittest.skipUnless(ssl.HAS_NPN, "NPN support needed for this test") def test_npn_protocols(self): - server_protocols = ['http/1.1', 'spdy/2'] - protocol_tests = [ - (['http/1.1', 'spdy/2'], 'http/1.1'), - (['spdy/2', 'http/1.1'], 'http/1.1'), - (['spdy/2', 'test'], 'spdy/2'), - (['abc', 'def'], 'abc') - ] - for client_protocols, expected in protocol_tests: - client_context, server_context, hostname = testing_context() - server_context.set_npn_protocols(server_protocols) - client_context.set_npn_protocols(client_protocols) - stats = server_params_test(client_context, server_context, - chatty=True, connectionchatty=True, - sni_name=hostname) - msg = "failed trying %s (s) and %s (c).\n" \ - "was expecting %s, but got %%s from the %%s" \ - % (str(server_protocols), str(client_protocols), - str(expected)) - client_result = stats['client_npn_protocol'] - self.assertEqual(client_result, expected, msg % (client_result, "client")) - server_result = stats['server_npn_protocols'][-1] \ - if len(stats['server_npn_protocols']) else 'nothing' - self.assertEqual(server_result, expected, msg % (server_result, "server")) + assert not ssl.HAS_NPN def sni_contexts(self): server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) @@ -4369,8 +4303,7 @@ def test_session(self): self.assertGreater(session.time, 0) self.assertGreater(session.timeout, 0) self.assertTrue(session.has_ticket) - if ssl.OPENSSL_VERSION_INFO > (1, 0, 1): - self.assertGreater(session.ticket_lifetime_hint, 0) + self.assertGreater(session.ticket_lifetime_hint, 0) self.assertFalse(stats['session_reused']) sess_stat = server_context.session_stats() self.assertEqual(sess_stat['accept'], 1) diff --git a/Misc/NEWS.d/next/Build/2021-03-30-14-19-39.bpo-43669.lWMUYx.rst b/Misc/NEWS.d/next/Build/2021-03-30-14-19-39.bpo-43669.lWMUYx.rst new file mode 100644 index 00000000000000..48c74813daa903 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2021-03-30-14-19-39.bpo-43669.lWMUYx.rst @@ -0,0 +1 @@ +Implement :pep:`644`. Python now requires OpenSSL 1.1.1 or newer. diff --git a/Modules/Setup b/Modules/Setup index a5fbaf6381be5d..cce78582a1e28a 100644 --- a/Modules/Setup +++ b/Modules/Setup @@ -207,11 +207,23 @@ _symtable symtablemodule.c #_socket socketmodule.c # Socket module helper for SSL support; you must comment out the other -# socket line above, and possibly edit the SSL variable: -#SSL=/usr/local/ssl -#_ssl _ssl.c \ -# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -# -L$(SSL)/lib -lssl -lcrypto +# socket line above, and edit the OPENSSL variable: +# OPENSSL=/path/to/openssl/directory +# _ssl _ssl.c \ +# -I$(OPENSSL)/include -L$(OPENSSL)/lib \ +# -lssl -lcrypto +#_hashlib _hashopenssl.c \ +# -I$(OPENSSL)/include -L$(OPENSSL)/lib \ +# -lcrypto + +# To statically link OpenSSL: +# _ssl _ssl.c \ +# -I$(OPENSSL)/include -L$(OPENSSL)/lib \ +# -l:libssl.a -Wl,--exclude-libs,libssl.a \ +# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a +#_hashlib _hashopenssl.c \ +# -I$(OPENSSL)/include -L$(OPENSSL)/lib \ +# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a # The crypt module is now disabled by default because it breaks builds # on many systems (where -lcrypt is needed), e.g. Linux (I believe). diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 272df354e6702b..870ee89fdafc63 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -38,51 +38,12 @@ # error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL" #endif -#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) -/* OpenSSL < 1.1.0 */ -#define EVP_MD_CTX_new EVP_MD_CTX_create -#define EVP_MD_CTX_free EVP_MD_CTX_destroy - -HMAC_CTX * -HMAC_CTX_new(void) -{ - HMAC_CTX *ctx = OPENSSL_malloc(sizeof(HMAC_CTX)); - if (ctx != NULL) { - memset(ctx, 0, sizeof(HMAC_CTX)); - HMAC_CTX_init(ctx); - } - return ctx; -} - -void -HMAC_CTX_free(HMAC_CTX *ctx) -{ - if (ctx != NULL) { - HMAC_CTX_cleanup(ctx); - OPENSSL_free(ctx); - } -} - -const EVP_MD * -HMAC_CTX_get_md(const HMAC_CTX *ctx) -{ - return ctx->md; -} -#endif - #define MUNCH_SIZE INT_MAX -#ifdef NID_sha3_224 +#define PY_OPENSSL_HAS_SCRYPT 1 #define PY_OPENSSL_HAS_SHA3 1 -#endif - -#if defined(EVP_MD_FLAG_XOF) && defined(NID_shake128) #define PY_OPENSSL_HAS_SHAKE 1 -#endif - -#if defined(NID_blake2b512) && !defined(OPENSSL_NO_BLAKE2) #define PY_OPENSSL_HAS_BLAKE2 1 -#endif static PyModuleDef _hashlibmodule; @@ -1252,8 +1213,7 @@ pbkdf2_hmac_impl(PyObject *module, const char *hash_name, return key_obj; } -#if OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_SCRYPT) && !defined(LIBRESSL_VERSION_NUMBER) -#define PY_SCRYPT 1 +#ifdef PY_OPENSSL_HAS_SCRYPT /* XXX: Parameters salt, n, r and p should be required keyword-only parameters. They are optional in the Argument Clinic declaration only due to a @@ -1376,7 +1336,7 @@ _hashlib_scrypt_impl(PyObject *module, Py_buffer *password, Py_buffer *salt, } return key_obj; } -#endif +#endif /* PY_OPENSSL_HAS_SCRYPT */ /* Fast HMAC for hmac.digest() */ @@ -1844,12 +1804,6 @@ hashlib_md_meth_names(PyObject *module) return 0; } -/* LibreSSL doesn't support FIPS: - https://marc.info/?l=openbsd-misc&m=139819485423701&w=2 - - Ted Unangst wrote: "I figured I should mention our current libressl policy - wrt FIPS mode. It's gone and it's not coming back." */ -#ifndef LIBRESSL_VERSION_NUMBER /*[clinic input] _hashlib.get_fips_mode -> int @@ -1887,7 +1841,6 @@ _hashlib_get_fips_mode_impl(PyObject *module) return result; #endif } -#endif // !LIBRESSL_VERSION_NUMBER static int @@ -2067,17 +2020,6 @@ hashlib_free(void *m) } /* Py_mod_exec functions */ -static int -hashlib_openssl_legacy_init(PyObject *module) -{ -#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - /* Load all digest algorithms and initialize cpuid */ - OPENSSL_add_all_algorithms_noconf(); - ERR_load_crypto_strings(); -#endif - return 0; -} - static int hashlib_init_evptype(PyObject *module) { @@ -2200,8 +2142,6 @@ hashlib_exception(PyObject *module) static PyModuleDef_Slot hashlib_slots[] = { - /* OpenSSL 1.0.2 and LibreSSL */ - {Py_mod_exec, hashlib_openssl_legacy_init}, {Py_mod_exec, hashlib_init_evptype}, {Py_mod_exec, hashlib_init_evpxoftype}, {Py_mod_exec, hashlib_init_hmactype}, diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 951f9699278db7..f441a16625bc76 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -29,9 +29,9 @@ #define _PySSL_FIX_ERRNO #define PySSL_BEGIN_ALLOW_THREADS_S(save) \ - do { if (_ssl_locks_count>0) { (save) = PyEval_SaveThread(); } } while (0) + do { (save) = PyEval_SaveThread(); } while(0) #define PySSL_END_ALLOW_THREADS_S(save) \ - do { if (_ssl_locks_count>0) { PyEval_RestoreThread(save); } _PySSL_FIX_ERRNO; } while (0) + do { PyEval_RestoreThread(save); _PySSL_FIX_ERRNO; } while(0) #define PySSL_BEGIN_ALLOW_THREADS { \ PyThreadState *_save = NULL; \ PySSL_BEGIN_ALLOW_THREADS_S(_save); @@ -62,16 +62,6 @@ static PySocketModule_APIObject PySocketModule; #include "openssl/bio.h" #include "openssl/dh.h" -#ifndef HAVE_X509_VERIFY_PARAM_SET1_HOST -# ifdef LIBRESSL_VERSION_NUMBER -# error "LibreSSL is missing X509_VERIFY_PARAM_set1_host(), see https://github.com/libressl-portable/portable/issues/381" -# elif OPENSSL_VERSION_NUMBER > 0x1000200fL -# define HAVE_X509_VERIFY_PARAM_SET1_HOST -# else -# error "libssl is too old and does not support X509_VERIFY_PARAM_set1_host()" -# endif -#endif - #ifndef OPENSSL_THREADS # error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL" #endif @@ -142,15 +132,7 @@ static void _PySSLFixErrno(void) { #include "_ssl_data.h" #endif -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) -# define OPENSSL_VERSION_1_1 1 -# define PY_OPENSSL_1_1_API 1 -#endif - -/* OpenSSL API 1.1.0+ does not include version methods. Define the methods - * unless OpenSSL is compiled without the methods. It's the easiest way to - * make 1.0.2, 1.1.0, 1.1.1, and 3.0.0 happy without deprecation warnings. - */ +/* OpenSSL API 1.1.0+ does not include version methods */ #ifndef OPENSSL_NO_TLS1_METHOD extern const SSL_METHOD *TLSv1_method(void); #endif @@ -161,129 +143,12 @@ extern const SSL_METHOD *TLSv1_1_method(void); extern const SSL_METHOD *TLSv1_2_method(void); #endif -/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */ -#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL -# define PY_OPENSSL_1_1_API 1 -#endif - -/* SNI support (client- and server-side) appeared in OpenSSL 1.0.0 and 0.9.8f - * This includes the SSL_set_SSL_CTX() function. - */ -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME -# define HAVE_SNI 1 -#else -# define HAVE_SNI 0 -#endif - -#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation -# define HAVE_ALPN 1 -#else -# define HAVE_ALPN 0 -#endif - -/* We cannot rely on OPENSSL_NO_NEXTPROTONEG because LibreSSL 2.6.1 dropped - * NPN support but did not set OPENSSL_NO_NEXTPROTONEG for compatibility - * reasons. The check for TLSEXT_TYPE_next_proto_neg works with - * OpenSSL 1.0.1+ and LibreSSL. - * OpenSSL 1.1.1-pre1 dropped NPN but still has TLSEXT_TYPE_next_proto_neg. - */ -#ifdef OPENSSL_NO_NEXTPROTONEG -# define HAVE_NPN 0 -#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER) -# define HAVE_NPN 0 -#elif defined(TLSEXT_TYPE_next_proto_neg) -# define HAVE_NPN 1 -#else -# define HAVE_NPN 0 -#endif - -#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER) -#define HAVE_OPENSSL_KEYLOG 1 -#endif - #ifndef INVALID_SOCKET /* MS defines this */ #define INVALID_SOCKET (-1) #endif -/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */ -#ifndef OPENSSL_VERSION_1_1 -#define HAVE_OPENSSL_CRYPTO_LOCK -#endif - -#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2) +/* OpenSSL 1.1 does not have SSL 2.0 */ #define OPENSSL_NO_SSL2 -#endif - -#ifndef PY_OPENSSL_1_1_API -/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */ - -#define TLS_method SSLv23_method -#define TLS_client_method SSLv23_client_method -#define TLS_server_method SSLv23_server_method -#define ASN1_STRING_get0_data ASN1_STRING_data -#define X509_get0_notBefore X509_get_notBefore -#define X509_get0_notAfter X509_get_notAfter -#define OpenSSL_version_num SSLeay -#define OpenSSL_version SSLeay_version -#define OPENSSL_VERSION SSLEAY_VERSION - -static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne) -{ - return ne->set; -} - -#ifndef OPENSSL_NO_COMP -/* LCOV_EXCL_START */ -static int COMP_get_type(const COMP_METHOD *meth) -{ - return meth->type; -} -/* LCOV_EXCL_STOP */ -#endif - -static pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx) -{ - return ctx->default_passwd_callback; -} - -static void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx) -{ - return ctx->default_passwd_callback_userdata; -} - -static int X509_OBJECT_get_type(X509_OBJECT *x) -{ - return x->type; -} - -static X509 *X509_OBJECT_get0_X509(X509_OBJECT *x) -{ - return x->data.x509; -} - -static int BIO_up_ref(BIO *b) -{ - CRYPTO_add(&b->references, 1, CRYPTO_LOCK_BIO); - return 1; -} - -static STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *store) { - return store->objs; -} - -static int -SSL_SESSION_has_ticket(const SSL_SESSION *s) -{ - return (s->tlsext_ticklen > 0) ? 1 : 0; -} - -static unsigned long -SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s) -{ - return s->tlsext_tick_lifetime_hint; -} - -#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */ /* Default cipher suites */ #ifndef PY_SSL_DEFAULT_CIPHERS @@ -395,24 +260,10 @@ enum py_proto_version { #endif }; - -/* serves as a flag to see whether we've initialized the SSL thread support. */ -/* 0 means no, greater than 0 means yes */ - -static unsigned int _ssl_locks_count = 0; - /* SSL socket object */ #define X509_NAME_MAXLEN 256 -/* SSL_CTX_clear_options() and SSL_clear_options() were first added in - * OpenSSL 0.9.8m but do not appear in some 0.9.9-dev versions such the - * 0.9.9 from "May 2008" that NetBSD 5.0 uses. */ -#if OPENSSL_VERSION_NUMBER >= 0x009080dfL && OPENSSL_VERSION_NUMBER != 0x00909000L -# define HAVE_SSL_CTX_CLEAR_OPTIONS -#else -# undef HAVE_SSL_CTX_CLEAR_OPTIONS -#endif /* In case of 'tls-unique' it will be 12 bytes for TLS, 36 bytes for * older SSL, but let's be safe */ @@ -422,17 +273,9 @@ static unsigned int _ssl_locks_count = 0; typedef struct { PyObject_HEAD SSL_CTX *ctx; -#if HAVE_NPN - unsigned char *npn_protocols; - int npn_protocols_len; -#endif -#if HAVE_ALPN unsigned char *alpn_protocols; unsigned int alpn_protocols_len; -#endif -#ifndef OPENSSL_NO_TLSEXT PyObject *set_sni_cb; -#endif int check_hostname; /* OpenSSL has no API to get hostflags from X509_VERIFY_PARAM* struct. * We have to maintain our own copy. OpenSSL's hostflags default to 0. @@ -443,10 +286,8 @@ typedef struct { int post_handshake_auth; #endif PyObject *msg_cb; -#ifdef HAVE_OPENSSL_KEYLOG PyObject *keylog_filename; BIO *keylog_bio; -#endif } PySSLContext; typedef struct { @@ -652,23 +493,18 @@ fill_and_set_sslerror(PySSLSocket *sslsock, PyObject *type, int ssl_errno, } switch (verify_code) { -#ifdef X509_V_ERR_HOSTNAME_MISMATCH - /* OpenSSL >= 1.0.2, LibreSSL >= 2.5.3 */ case X509_V_ERR_HOSTNAME_MISMATCH: verify_obj = PyUnicode_FromFormat( "Hostname mismatch, certificate is not valid for '%S'.", sslsock->server_hostname ); break; -#endif -#ifdef X509_V_ERR_IP_ADDRESS_MISMATCH case X509_V_ERR_IP_ADDRESS_MISMATCH: verify_obj = PyUnicode_FromFormat( "IP address mismatch, certificate is not valid for '%S'.", sslsock->server_hostname ); break; -#endif default: verify_str = X509_verify_cert_error_string(verify_code); if (verify_str != NULL) { @@ -1995,7 +1831,6 @@ cipher_to_tuple(const SSL_CIPHER *cipher) return NULL; } -#if OPENSSL_VERSION_NUMBER >= 0x10002000UL static PyObject * cipher_to_dict(const SSL_CIPHER *cipher) { @@ -2004,10 +1839,8 @@ cipher_to_dict(const SSL_CIPHER *cipher) unsigned long cipher_id; int alg_bits, strength_bits, len; char buf[512] = {0}; -#if OPENSSL_VERSION_1_1 int aead, nid; const char *skcipher = NULL, *digest = NULL, *kx = NULL, *auth = NULL; -#endif /* can be NULL */ cipher_name = SSL_CIPHER_get_name(cipher); @@ -2020,7 +1853,6 @@ cipher_to_dict(const SSL_CIPHER *cipher) buf[len-1] = '\0'; strength_bits = SSL_CIPHER_get_bits(cipher, &alg_bits); -#if OPENSSL_VERSION_1_1 aead = SSL_CIPHER_is_aead(cipher); nid = SSL_CIPHER_get_cipher_nid(cipher); skcipher = nid != NID_undef ? OBJ_nid2ln(nid) : NULL; @@ -2030,13 +1862,10 @@ cipher_to_dict(const SSL_CIPHER *cipher) kx = nid != NID_undef ? OBJ_nid2ln(nid) : NULL; nid = SSL_CIPHER_get_auth_nid(cipher); auth = nid != NID_undef ? OBJ_nid2ln(nid) : NULL; -#endif return Py_BuildValue( "{sksssssssisi" -#if OPENSSL_VERSION_1_1 "sOssssssss" -#endif "}", "id", cipher_id, "name", cipher_name, @@ -2044,16 +1873,13 @@ cipher_to_dict(const SSL_CIPHER *cipher) "description", buf, "strength_bits", strength_bits, "alg_bits", alg_bits -#if OPENSSL_VERSION_1_1 ,"aead", aead ? Py_True : Py_False, "symmetric", skcipher, "digest", digest, "kea", kx, "auth", auth -#endif ); } -#endif /*[clinic input] _ssl._SSLSocket.shared_ciphers @@ -2124,28 +1950,6 @@ _ssl__SSLSocket_version_impl(PySSLSocket *self) return PyUnicode_FromString(version); } -#if HAVE_NPN -/*[clinic input] -_ssl._SSLSocket.selected_npn_protocol -[clinic start generated code]*/ - -static PyObject * -_ssl__SSLSocket_selected_npn_protocol_impl(PySSLSocket *self) -/*[clinic end generated code: output=b91d494cd207ecf6 input=c28fde139204b826]*/ -{ - const unsigned char *out; - unsigned int outlen; - - SSL_get0_next_proto_negotiated(self->ssl, - &out, &outlen); - - if (out == NULL) - Py_RETURN_NONE; - return PyUnicode_FromStringAndSize((char *)out, outlen); -} -#endif - -#if HAVE_ALPN /*[clinic input] _ssl._SSLSocket.selected_alpn_protocol [clinic start generated code]*/ @@ -2163,7 +1967,6 @@ _ssl__SSLSocket_selected_alpn_protocol_impl(PySSLSocket *self) Py_RETURN_NONE; return PyUnicode_FromStringAndSize((char *)out, outlen); } -#endif /*[clinic input] _ssl._SSLSocket.compression @@ -2200,11 +2003,6 @@ static int PySSL_set_context(PySSLSocket *self, PyObject *value, void *closure) { if (PyObject_TypeCheck(value, PySSLContext_Type)) { -#if !HAVE_SNI - PyErr_SetString(PyExc_NotImplementedError, "setting a socket's " - "context is not supported by your OpenSSL library"); - return -1; -#else Py_INCREF(value); Py_SETREF(self->ctx, (PySSLContext *)value); SSL_set_SSL_CTX(self->ssl, self->ctx->ctx); @@ -2213,7 +2011,6 @@ static int PySSL_set_context(PySSLSocket *self, PyObject *value, self->ssl, self->ctx->msg_cb ? _PySSL_msg_callback : NULL ); -#endif } else { PyErr_SetString(PyExc_TypeError, "The value must be a SSLContext"); return -1; @@ -2840,8 +2637,6 @@ _ssl__SSLSocket_verify_client_post_handshake_impl(PySSLSocket *self) #endif } -#ifdef OPENSSL_VERSION_1_1 - static SSL_SESSION* _ssl_session_dup(SSL_SESSION *session) { SSL_SESSION *newsession = NULL; @@ -2882,7 +2677,6 @@ _ssl_session_dup(SSL_SESSION *session) { } return NULL; } -#endif static PyObject * PySSL_get_session(PySSLSocket *self, void *closure) { @@ -2891,7 +2685,6 @@ PySSL_get_session(PySSLSocket *self, void *closure) { PySSLSession *pysess; SSL_SESSION *session; -#ifdef OPENSSL_VERSION_1_1 /* duplicate session as workaround for session bug in OpenSSL 1.1.0, * https://github.com/openssl/openssl/issues/1550 */ session = SSL_get0_session(self->ssl); /* borrowed reference */ @@ -2901,12 +2694,10 @@ PySSL_get_session(PySSLSocket *self, void *closure) { if ((session = _ssl_session_dup(session)) == NULL) { return NULL; } -#else session = SSL_get1_session(self->ssl); if (session == NULL) { Py_RETURN_NONE; } -#endif pysess = PyObject_GC_New(PySSLSession, PySSLSession_Type); if (pysess == NULL) { SSL_SESSION_free(session); @@ -2925,9 +2716,7 @@ static int PySSL_set_session(PySSLSocket *self, PyObject *value, void *closure) { PySSLSession *pysess; -#ifdef OPENSSL_VERSION_1_1 SSL_SESSION *session; -#endif int result; if (!PySSLSession_Check(value)) { @@ -2951,7 +2740,6 @@ static int PySSL_set_session(PySSLSocket *self, PyObject *value, "Cannot set session after handshake."); return -1; } -#ifdef OPENSSL_VERSION_1_1 /* duplicate session */ if ((session = _ssl_session_dup(pysess->session)) == NULL) { return -1; @@ -2959,9 +2747,6 @@ static int PySSL_set_session(PySSLSocket *self, PyObject *value, result = SSL_set_session(self->ssl, session); /* free duplicate, SSL_set_session() bumps ref count */ SSL_SESSION_free(session); -#else - result = SSL_set_session(self->ssl, pysess->session); -#endif if (result == 0) { _setSSLError(NULL, 0, __FILE__, __LINE__); return -1; @@ -3012,7 +2797,6 @@ static PyMethodDef PySSLMethods[] = { _SSL__SSLSOCKET_CIPHER_METHODDEF _SSL__SSLSOCKET_SHARED_CIPHERS_METHODDEF _SSL__SSLSOCKET_VERSION_METHODDEF - _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF _SSL__SSLSOCKET_COMPRESSION_METHODDEF _SSL__SSLSOCKET_SHUTDOWN_METHODDEF @@ -3089,9 +2873,6 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) SSL_CTX *ctx = NULL; X509_VERIFY_PARAM *params; int result; -#if defined(SSL_MODE_RELEASE_BUFFERS) - unsigned long libver; -#endif PySSL_BEGIN_ALLOW_THREADS switch(proto_version) { @@ -3156,19 +2937,10 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) self->hostflags = X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS; self->protocol = proto_version; self->msg_cb = NULL; -#ifdef HAVE_OPENSSL_KEYLOG self->keylog_filename = NULL; self->keylog_bio = NULL; -#endif -#if HAVE_NPN - self->npn_protocols = NULL; -#endif -#if HAVE_ALPN self->alpn_protocols = NULL; -#endif -#ifndef OPENSSL_NO_TLSEXT self->set_sni_cb = NULL; -#endif /* Don't check host name by default */ if (proto_version == PY_SSL_VERSION_TLS_CLIENT) { self->check_hostname = 1; @@ -3230,37 +3002,9 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) return NULL; } -#if defined(SSL_MODE_RELEASE_BUFFERS) /* Set SSL_MODE_RELEASE_BUFFERS. This potentially greatly reduces memory - usage for no cost at all. However, don't do this for OpenSSL versions - between 1.0.1 and 1.0.1h or 1.0.0 and 1.0.0m, which are affected by CVE - 2014-0198. I can't find exactly which beta fixed this CVE, so be - conservative and assume it wasn't fixed until release. We do this check - at runtime to avoid problems from the dynamic linker. - See #25672 for more on this. */ - libver = OpenSSL_version_num(); - if (!(libver >= 0x10001000UL && libver < 0x1000108fUL) && - !(libver >= 0x10000000UL && libver < 0x100000dfUL)) { - SSL_CTX_set_mode(self->ctx, SSL_MODE_RELEASE_BUFFERS); - } -#endif - - -#if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1) - /* Allow automatic ECDH curve selection (on OpenSSL 1.0.2+), or use - prime256v1 by default. This is Apache mod_ssl's initialization - policy, so we should be safe. OpenSSL 1.1 has it enabled by default. - */ -#if defined(SSL_CTX_set_ecdh_auto) - SSL_CTX_set_ecdh_auto(self->ctx, 1); -#else - { - EC_KEY *key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); - SSL_CTX_set_tmp_ecdh(self->ctx, key); - EC_KEY_free(key); - } -#endif -#endif + usage for no cost at all. */ + SSL_CTX_set_mode(self->ctx, SSL_MODE_RELEASE_BUFFERS); #define SID_CTX "Python" SSL_CTX_set_session_id_context(self->ctx, (const unsigned char *) SID_CTX, @@ -3268,11 +3012,9 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) #undef SID_CTX params = SSL_CTX_get0_param(self->ctx); -#ifdef X509_V_FLAG_TRUSTED_FIRST /* Improve trust chain building when cross-signed intermediate certificates are present. See https://bugs.python.org/issue23476. */ X509_VERIFY_PARAM_set_flags(params, X509_V_FLAG_TRUSTED_FIRST); -#endif X509_VERIFY_PARAM_set_hostflags(params, self->hostflags); #ifdef TLS1_3_VERSION @@ -3286,9 +3028,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) static int context_traverse(PySSLContext *self, visitproc visit, void *arg) { -#ifndef OPENSSL_NO_TLSEXT Py_VISIT(self->set_sni_cb); -#endif Py_VISIT(self->msg_cb); return 0; } @@ -3296,11 +3036,8 @@ context_traverse(PySSLContext *self, visitproc visit, void *arg) static int context_clear(PySSLContext *self) { -#ifndef OPENSSL_NO_TLSEXT Py_CLEAR(self->set_sni_cb); -#endif Py_CLEAR(self->msg_cb); -#ifdef HAVE_OPENSSL_KEYLOG Py_CLEAR(self->keylog_filename); if (self->keylog_bio != NULL) { PySSL_BEGIN_ALLOW_THREADS @@ -3308,7 +3045,6 @@ context_clear(PySSLContext *self) PySSL_END_ALLOW_THREADS self->keylog_bio = NULL; } -#endif return 0; } @@ -3320,12 +3056,7 @@ context_dealloc(PySSLContext *self) PyObject_GC_UnTrack(self); context_clear(self); SSL_CTX_free(self->ctx); -#if HAVE_NPN - PyMem_Free(self->npn_protocols); -#endif -#if HAVE_ALPN - PyMem_Free(self->alpn_protocols); -#endif + PyMem_FREE(self->alpn_protocols); Py_TYPE(self)->tp_free(self); Py_DECREF(tp); } @@ -3353,7 +3084,6 @@ _ssl__SSLContext_set_ciphers_impl(PySSLContext *self, const char *cipherlist) Py_RETURN_NONE; } -#if OPENSSL_VERSION_NUMBER >= 0x10002000UL /*[clinic input] _ssl._SSLContext.get_ciphers [clinic start generated code]*/ @@ -3396,10 +3126,8 @@ _ssl__SSLContext_get_ciphers_impl(PySSLContext *self) return result; } -#endif -#if HAVE_NPN || HAVE_ALPN static int do_protocol_selection(int alpn, unsigned char **out, unsigned char *outlen, const unsigned char *server_protocols, unsigned int server_protocols_len, @@ -3423,77 +3151,7 @@ do_protocol_selection(int alpn, unsigned char **out, unsigned char *outlen, return SSL_TLSEXT_ERR_OK; } -#endif - -#if HAVE_NPN -/* this callback gets passed to SSL_CTX_set_next_protos_advertise_cb */ -static int -_advertiseNPN_cb(SSL *s, - const unsigned char **data, unsigned int *len, - void *args) -{ - PySSLContext *ssl_ctx = (PySSLContext *) args; - - if (ssl_ctx->npn_protocols == NULL) { - *data = (unsigned char *)""; - *len = 0; - } else { - *data = ssl_ctx->npn_protocols; - *len = ssl_ctx->npn_protocols_len; - } - return SSL_TLSEXT_ERR_OK; -} -/* this callback gets passed to SSL_CTX_set_next_proto_select_cb */ -static int -_selectNPN_cb(SSL *s, - unsigned char **out, unsigned char *outlen, - const unsigned char *server, unsigned int server_len, - void *args) -{ - PySSLContext *ctx = (PySSLContext *)args; - return do_protocol_selection(0, out, outlen, server, server_len, - ctx->npn_protocols, ctx->npn_protocols_len); -} -#endif - -/*[clinic input] -_ssl._SSLContext._set_npn_protocols - protos: Py_buffer - / -[clinic start generated code]*/ - -static PyObject * -_ssl__SSLContext__set_npn_protocols_impl(PySSLContext *self, - Py_buffer *protos) -/*[clinic end generated code: output=72b002c3324390c6 input=319fcb66abf95bd7]*/ -{ -#if HAVE_NPN - PyMem_Free(self->npn_protocols); - self->npn_protocols = PyMem_Malloc(protos->len); - if (self->npn_protocols == NULL) - return PyErr_NoMemory(); - memcpy(self->npn_protocols, protos->buf, protos->len); - self->npn_protocols_len = (int) protos->len; - - /* set both server and client callbacks, because the context can - * be used to create both types of sockets */ - SSL_CTX_set_next_protos_advertised_cb(self->ctx, - _advertiseNPN_cb, - self); - SSL_CTX_set_next_proto_select_cb(self->ctx, - _selectNPN_cb, - self); - - Py_RETURN_NONE; -#else - PyErr_SetString(PyExc_NotImplementedError, - "The NPN extension requires OpenSSL 1.0.1 or later."); - return NULL; -#endif -} - -#if HAVE_ALPN static int _selectALPN_cb(SSL *s, const unsigned char **out, unsigned char *outlen, @@ -3505,7 +3163,6 @@ _selectALPN_cb(SSL *s, ctx->alpn_protocols, ctx->alpn_protocols_len, client_protocols, client_protocols_len); } -#endif /*[clinic input] _ssl._SSLContext._set_alpn_protocols @@ -3518,7 +3175,6 @@ _ssl__SSLContext__set_alpn_protocols_impl(PySSLContext *self, Py_buffer *protos) /*[clinic end generated code: output=87599a7f76651a9b input=9bba964595d519be]*/ { -#if HAVE_ALPN if ((size_t)protos->len > UINT_MAX) { PyErr_Format(PyExc_OverflowError, "protocols longer than %u bytes", UINT_MAX); @@ -3537,11 +3193,6 @@ _ssl__SSLContext__set_alpn_protocols_impl(PySSLContext *self, SSL_CTX_set_alpn_select_cb(self->ctx, _selectALPN_cb, self); Py_RETURN_NONE; -#else - PyErr_SetString(PyExc_NotImplementedError, - "The ALPN extension requires OpenSSL 1.0.2 or later."); - return NULL; -#endif } static PyObject * @@ -3617,9 +3268,6 @@ set_verify_flags(PySSLContext *self, PyObject *arg, void *c) } /* Getter and setter for protocol version */ -#if defined(SSL_CTRL_GET_MAX_PROTO_VERSION) - - static int set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what) { @@ -3714,9 +3362,8 @@ set_maximum_version(PySSLContext *self, PyObject *arg, void *c) { return set_min_max_proto_version(self, arg, 1); } -#endif /* SSL_CTRL_GET_MAX_PROTO_VERSION */ -#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER) +#ifdef TLS1_3_VERSION static PyObject * get_num_tickets(PySSLContext *self, void *c) { @@ -3747,16 +3394,14 @@ set_num_tickets(PySSLContext *self, PyObject *arg, void *c) PyDoc_STRVAR(PySSLContext_num_tickets_doc, "Control the number of TLSv1.3 session tickets"); -#endif /* OpenSSL 1.1.1 */ +#endif /* TLS1_3_VERSION */ -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) static PyObject * get_security_level(PySSLContext *self, void *c) { return PyLong_FromLong(SSL_CTX_get_security_level(self->ctx)); } PyDoc_STRVAR(PySSLContext_security_level_doc, "The current security level"); -#endif /* OpenSSL 1.1.0 */ static PyObject * get_options(PySSLContext *self, void *c) @@ -3774,13 +3419,7 @@ set_options(PySSLContext *self, PyObject *arg, void *c) clear = opts & ~new_opts; set = ~opts & new_opts; if (clear) { -#ifdef HAVE_SSL_CTX_CLEAR_OPTIONS SSL_CTX_clear_options(self->ctx, clear); -#else - PyErr_SetString(PyExc_ValueError, - "can't clear options before OpenSSL 0.9.8m"); - return -1; -#endif } if (set) SSL_CTX_set_options(self->ctx, set); @@ -4468,7 +4107,6 @@ _ssl__SSLContext_set_default_verify_paths_impl(PySSLContext *self) Py_RETURN_NONE; } -#ifndef OPENSSL_NO_ECDH /*[clinic input] _ssl._SSLContext.set_ecdh_curve name: object @@ -4503,9 +4141,7 @@ _ssl__SSLContext_set_ecdh_curve(PySSLContext *self, PyObject *name) EC_KEY_free(key); Py_RETURN_NONE; } -#endif -#if HAVE_SNI && !defined(OPENSSL_NO_TLSEXT) static int _servername_callback(SSL *s, int *al, void *args) { @@ -4609,7 +4245,6 @@ _servername_callback(SSL *s, int *al, void *args) PyGILState_Release(gstate); return ret; } -#endif static PyObject * get_sni_callback(PySSLContext *self, void *c) @@ -4630,7 +4265,6 @@ set_sni_callback(PySSLContext *self, PyObject *arg, void *c) "sni_callback cannot be set on TLS_CLIENT context"); return -1; } -#if HAVE_SNI && !defined(OPENSSL_NO_TLSEXT) Py_CLEAR(self->set_sni_cb); if (arg == Py_None) { SSL_CTX_set_tlsext_servername_callback(self->ctx, NULL); @@ -4648,13 +4282,6 @@ set_sni_callback(PySSLContext *self, PyObject *arg, void *c) SSL_CTX_set_tlsext_servername_arg(self->ctx, self); } return 0; -#else - PyErr_SetString(PyExc_NotImplementedError, - "The TLS extension servername callback, " - "SSL_CTX_set_tlsext_servername_callback, " - "is not in the current OpenSSL library."); - return -1; -#endif } PyDoc_STRVAR(PySSLContext_sni_callback_doc, @@ -4779,21 +4406,17 @@ static PyGetSetDef context_getsetlist[] = { (setter) set_check_hostname, NULL}, {"_host_flags", (getter) get_host_flags, (setter) set_host_flags, NULL}, -#if SSL_CTRL_GET_MAX_PROTO_VERSION {"minimum_version", (getter) get_minimum_version, (setter) set_minimum_version, NULL}, {"maximum_version", (getter) get_maximum_version, (setter) set_maximum_version, NULL}, -#endif -#ifdef HAVE_OPENSSL_KEYLOG {"keylog_filename", (getter) _PySSLContext_get_keylog_filename, (setter) _PySSLContext_set_keylog_filename, NULL}, -#endif {"_msg_callback", (getter) _PySSLContext_get_msg_callback, (setter) _PySSLContext_set_msg_callback, NULL}, {"sni_callback", (getter) get_sni_callback, (setter) set_sni_callback, PySSLContext_sni_callback_doc}, -#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER) +#ifdef TLS1_3_VERSION {"num_tickets", (getter) get_num_tickets, (setter) set_num_tickets, PySSLContext_num_tickets_doc}, #endif @@ -4812,10 +4435,8 @@ static PyGetSetDef context_getsetlist[] = { (setter) set_verify_flags, NULL}, {"verify_mode", (getter) get_verify_mode, (setter) set_verify_mode, NULL}, -#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER) {"security_level", (getter) get_security_level, NULL, PySSLContext_security_level_doc}, -#endif {NULL}, /* sentinel */ }; @@ -4824,7 +4445,6 @@ static struct PyMethodDef context_methods[] = { _SSL__SSLCONTEXT__WRAP_BIO_METHODDEF _SSL__SSLCONTEXT_SET_CIPHERS_METHODDEF _SSL__SSLCONTEXT__SET_ALPN_PROTOCOLS_METHODDEF - _SSL__SSLCONTEXT__SET_NPN_PROTOCOLS_METHODDEF _SSL__SSLCONTEXT_LOAD_CERT_CHAIN_METHODDEF _SSL__SSLCONTEXT_LOAD_DH_PARAMS_METHODDEF _SSL__SSLCONTEXT_LOAD_VERIFY_LOCATIONS_METHODDEF @@ -5281,11 +4901,7 @@ PySSL_RAND(int len, int pseudo) if (bytes == NULL) return NULL; if (pseudo) { -#ifdef PY_OPENSSL_1_1_API ok = RAND_bytes((unsigned char*)PyBytes_AS_STRING(bytes), len); -#else - ok = RAND_pseudo_bytes((unsigned char*)PyBytes_AS_STRING(bytes), len); -#endif if (ok == 0 || ok == 1) return Py_BuildValue("NO", bytes, ok == 1 ? Py_True : Py_False); } @@ -5840,92 +5456,6 @@ static PyMethodDef PySSL_methods[] = { }; -#ifdef HAVE_OPENSSL_CRYPTO_LOCK - -/* an implementation of OpenSSL threading operations in terms - * of the Python C thread library - * Only used up to 1.0.2. OpenSSL 1.1.0+ has its own locking code. - */ - -static PyThread_type_lock *_ssl_locks = NULL; - -#if OPENSSL_VERSION_NUMBER >= 0x10000000 -/* use new CRYPTO_THREADID API. */ -static void -_ssl_threadid_callback(CRYPTO_THREADID *id) -{ - CRYPTO_THREADID_set_numeric(id, PyThread_get_thread_ident()); -} -#else -/* deprecated CRYPTO_set_id_callback() API. */ -static unsigned long -_ssl_thread_id_function (void) { - return PyThread_get_thread_ident(); -} -#endif - -static void _ssl_thread_locking_function - (int mode, int n, const char *file, int line) { - /* this function is needed to perform locking on shared data - structures. (Note that OpenSSL uses a number of global data - structures that will be implicitly shared whenever multiple - threads use OpenSSL.) Multi-threaded applications will - crash at random if it is not set. - - locking_function() must be able to handle up to - CRYPTO_num_locks() different mutex locks. It sets the n-th - lock if mode & CRYPTO_LOCK, and releases it otherwise. - - file and line are the file number of the function setting the - lock. They can be useful for debugging. - */ - - if ((_ssl_locks == NULL) || - (n < 0) || ((unsigned)n >= _ssl_locks_count)) - return; - - if (mode & CRYPTO_LOCK) { - PyThread_acquire_lock(_ssl_locks[n], 1); - } else { - PyThread_release_lock(_ssl_locks[n]); - } -} - -static int _setup_ssl_threads(void) { - - unsigned int i; - - if (_ssl_locks == NULL) { - _ssl_locks_count = CRYPTO_num_locks(); - _ssl_locks = PyMem_Calloc(_ssl_locks_count, - sizeof(PyThread_type_lock)); - if (_ssl_locks == NULL) { - PyErr_NoMemory(); - return 0; - } - for (i = 0; i < _ssl_locks_count; i++) { - _ssl_locks[i] = PyThread_allocate_lock(); - if (_ssl_locks[i] == NULL) { - unsigned int j; - for (j = 0; j < i; j++) { - PyThread_free_lock(_ssl_locks[j]); - } - PyMem_Free(_ssl_locks); - return 0; - } - } - CRYPTO_set_locking_callback(_ssl_thread_locking_function); -#if OPENSSL_VERSION_NUMBER >= 0x10000000 - CRYPTO_THREADID_set_callback(_ssl_threadid_callback); -#else - CRYPTO_set_id_callback(_ssl_thread_id_function); -#endif - } - return 1; -} - -#endif /* HAVE_OPENSSL_CRYPTO_LOCK for OpenSSL < 1.1.0 */ - static int sslmodule_init_types(PyObject *module) { @@ -6205,10 +5735,8 @@ sslmodule_init_constants(PyObject *m) X509_V_FLAG_X509_STRICT); PyModule_AddIntConstant(m, "VERIFY_ALLOW_PROXY_CERTS", X509_V_FLAG_ALLOW_PROXY_CERTS); -#ifdef X509_V_FLAG_TRUSTED_FIRST PyModule_AddIntConstant(m, "VERIFY_X509_TRUSTED_FIRST", X509_V_FLAG_TRUSTED_FIRST); -#endif /* Alert Descriptions from ssl.h */ /* note RESERVED constants no longer intended for use have been removed */ @@ -6365,31 +5893,11 @@ sslmodule_init_constants(PyObject *m) PyModule_AddObject((m), (key), bool_obj); \ } while (0) -#if HAVE_SNI addbool(m, "HAS_SNI", 1); -#else - addbool(m, "HAS_SNI", 0); -#endif - addbool(m, "HAS_TLS_UNIQUE", 1); - -#ifndef OPENSSL_NO_ECDH addbool(m, "HAS_ECDH", 1); -#else - addbool(m, "HAS_ECDH", 0); -#endif - -#if HAVE_NPN - addbool(m, "HAS_NPN", 1); -#else addbool(m, "HAS_NPN", 0); -#endif - -#if HAVE_ALPN addbool(m, "HAS_ALPN", 1); -#else - addbool(m, "HAS_ALPN", 0); -#endif #if defined(SSL2_VERSION) && !defined(OPENSSL_NO_SSL2) addbool(m, "HAS_SSLv2", 1); @@ -6430,29 +5938,6 @@ sslmodule_init_constants(PyObject *m) return 0; } -static int -sslmodule_legacy(PyObject *module) -{ -#ifndef OPENSSL_VERSION_1_1 - /* Load all algorithms and initialize cpuid */ - OPENSSL_add_all_algorithms_noconf(); - /* Init OpenSSL */ - SSL_load_error_strings(); - SSL_library_init(); -#endif - -#ifdef HAVE_OPENSSL_CRYPTO_LOCK - /* note that this will start threading if not already started */ - if (!_setup_ssl_threads()) { - return 0; - } -#elif OPENSSL_VERSION_1_1 - /* OpenSSL 1.1.0 builtin thread support is enabled */ - _ssl_locks_count++; -#endif - return 0; -} - PyDoc_STRVAR(module_doc, "Implementation module for SSL socket operations. See the socket module\n\ for documentation."); @@ -6491,8 +5976,6 @@ PyInit__ssl(void) return NULL; if (sslmodule_init_versioninfo(m) != 0) return NULL; - if (sslmodule_legacy(m) != 0) - return NULL; return m; } diff --git a/Modules/_ssl/debughelpers.c b/Modules/_ssl/debughelpers.c index af56f9d28d1642..f39372ca53d9e1 100644 --- a/Modules/_ssl/debughelpers.c +++ b/Modules/_ssl/debughelpers.c @@ -114,8 +114,6 @@ _PySSLContext_set_msg_callback(PySSLContext *self, PyObject *arg, void *c) { return 0; } -#ifdef HAVE_OPENSSL_KEYLOG - static void _PySSL_keylog_callback(const SSL *ssl, const char *line) { @@ -219,5 +217,3 @@ _PySSLContext_set_keylog_filename(PySSLContext *self, PyObject *arg, void *c) { SSL_CTX_set_keylog_callback(self->ctx, _PySSL_keylog_callback); return 0; } - -#endif diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index fbdff26026f6cc..de01489e6a3b02 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -950,7 +950,7 @@ pbkdf2_hmac(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject return return_value; } -#if (OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_SCRYPT) && !defined(LIBRESSL_VERSION_NUMBER)) +#if defined(PY_OPENSSL_HAS_SCRYPT) PyDoc_STRVAR(_hashlib_scrypt__doc__, "scrypt($module, /, password, *, salt=None, n=None, r=None, p=None,\n" @@ -1068,7 +1068,7 @@ _hashlib_scrypt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj return return_value; } -#endif /* (OPENSSL_VERSION_NUMBER > 0x10100000L && !defined(OPENSSL_NO_SCRYPT) && !defined(LIBRESSL_VERSION_NUMBER)) */ +#endif /* defined(PY_OPENSSL_HAS_SCRYPT) */ PyDoc_STRVAR(_hashlib_hmac_singleshot__doc__, "hmac_digest($module, /, key, msg, digest)\n" @@ -1275,8 +1275,6 @@ _hashlib_HMAC_hexdigest(HMACobject *self, PyObject *Py_UNUSED(ignored)) return _hashlib_HMAC_hexdigest_impl(self); } -#if !defined(LIBRESSL_VERSION_NUMBER) - PyDoc_STRVAR(_hashlib_get_fips_mode__doc__, "get_fips_mode($module, /)\n" "--\n" @@ -1312,8 +1310,6 @@ _hashlib_get_fips_mode(PyObject *module, PyObject *Py_UNUSED(ignored)) return return_value; } -#endif /* !defined(LIBRESSL_VERSION_NUMBER) */ - PyDoc_STRVAR(_hashlib_compare_digest__doc__, "compare_digest($module, a, b, /)\n" "--\n" @@ -1389,8 +1385,4 @@ _hashlib_compare_digest(PyObject *module, PyObject *const *args, Py_ssize_t narg #ifndef _HASHLIB_SCRYPT_METHODDEF #define _HASHLIB_SCRYPT_METHODDEF #endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */ - -#ifndef _HASHLIB_GET_FIPS_MODE_METHODDEF - #define _HASHLIB_GET_FIPS_MODE_METHODDEF -#endif /* !defined(_HASHLIB_GET_FIPS_MODE_METHODDEF) */ -/*[clinic end generated code: output=980087de1b03ad42 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=162369cb9d43f1cc input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index 43469d3c358242..95aad0c21df9a0 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -139,29 +139,6 @@ _ssl__SSLSocket_version(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) return _ssl__SSLSocket_version_impl(self); } -#if (HAVE_NPN) - -PyDoc_STRVAR(_ssl__SSLSocket_selected_npn_protocol__doc__, -"selected_npn_protocol($self, /)\n" -"--\n" -"\n"); - -#define _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF \ - {"selected_npn_protocol", (PyCFunction)_ssl__SSLSocket_selected_npn_protocol, METH_NOARGS, _ssl__SSLSocket_selected_npn_protocol__doc__}, - -static PyObject * -_ssl__SSLSocket_selected_npn_protocol_impl(PySSLSocket *self); - -static PyObject * -_ssl__SSLSocket_selected_npn_protocol(PySSLSocket *self, PyObject *Py_UNUSED(ignored)) -{ - return _ssl__SSLSocket_selected_npn_protocol_impl(self); -} - -#endif /* (HAVE_NPN) */ - -#if (HAVE_ALPN) - PyDoc_STRVAR(_ssl__SSLSocket_selected_alpn_protocol__doc__, "selected_alpn_protocol($self, /)\n" "--\n" @@ -179,8 +156,6 @@ _ssl__SSLSocket_selected_alpn_protocol(PySSLSocket *self, PyObject *Py_UNUSED(ig return _ssl__SSLSocket_selected_alpn_protocol_impl(self); } -#endif /* (HAVE_ALPN) */ - PyDoc_STRVAR(_ssl__SSLSocket_compression__doc__, "compression($self, /)\n" "--\n" @@ -452,8 +427,6 @@ _ssl__SSLContext_set_ciphers(PySSLContext *self, PyObject *arg) return return_value; } -#if (OPENSSL_VERSION_NUMBER >= 0x10002000UL) - PyDoc_STRVAR(_ssl__SSLContext_get_ciphers__doc__, "get_ciphers($self, /)\n" "--\n" @@ -471,44 +444,6 @@ _ssl__SSLContext_get_ciphers(PySSLContext *self, PyObject *Py_UNUSED(ignored)) return _ssl__SSLContext_get_ciphers_impl(self); } -#endif /* (OPENSSL_VERSION_NUMBER >= 0x10002000UL) */ - -PyDoc_STRVAR(_ssl__SSLContext__set_npn_protocols__doc__, -"_set_npn_protocols($self, protos, /)\n" -"--\n" -"\n"); - -#define _SSL__SSLCONTEXT__SET_NPN_PROTOCOLS_METHODDEF \ - {"_set_npn_protocols", (PyCFunction)_ssl__SSLContext__set_npn_protocols, METH_O, _ssl__SSLContext__set_npn_protocols__doc__}, - -static PyObject * -_ssl__SSLContext__set_npn_protocols_impl(PySSLContext *self, - Py_buffer *protos); - -static PyObject * -_ssl__SSLContext__set_npn_protocols(PySSLContext *self, PyObject *arg) -{ - PyObject *return_value = NULL; - Py_buffer protos = {NULL, NULL}; - - if (PyObject_GetBuffer(arg, &protos, PyBUF_SIMPLE) != 0) { - goto exit; - } - if (!PyBuffer_IsContiguous(&protos, 'C')) { - _PyArg_BadArgument("_set_npn_protocols", "argument", "contiguous buffer", arg); - goto exit; - } - return_value = _ssl__SSLContext__set_npn_protocols_impl(self, &protos); - -exit: - /* Cleanup for protos */ - if (protos.obj) { - PyBuffer_Release(&protos); - } - - return return_value; -} - PyDoc_STRVAR(_ssl__SSLContext__set_alpn_protocols__doc__, "_set_alpn_protocols($self, protos, /)\n" "--\n" @@ -829,8 +764,6 @@ _ssl__SSLContext_set_default_verify_paths(PySSLContext *self, PyObject *Py_UNUSE return _ssl__SSLContext_set_default_verify_paths_impl(self); } -#if !defined(OPENSSL_NO_ECDH) - PyDoc_STRVAR(_ssl__SSLContext_set_ecdh_curve__doc__, "set_ecdh_curve($self, name, /)\n" "--\n" @@ -839,8 +772,6 @@ PyDoc_STRVAR(_ssl__SSLContext_set_ecdh_curve__doc__, #define _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF \ {"set_ecdh_curve", (PyCFunction)_ssl__SSLContext_set_ecdh_curve, METH_O, _ssl__SSLContext_set_ecdh_curve__doc__}, -#endif /* !defined(OPENSSL_NO_ECDH) */ - PyDoc_STRVAR(_ssl__SSLContext_cert_store_stats__doc__, "cert_store_stats($self, /)\n" "--\n" @@ -1420,22 +1351,6 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #endif /* defined(_MSC_VER) */ -#ifndef _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF - #define _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF -#endif /* !defined(_SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF) */ - -#ifndef _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF - #define _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF -#endif /* !defined(_SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF) */ - -#ifndef _SSL__SSLCONTEXT_GET_CIPHERS_METHODDEF - #define _SSL__SSLCONTEXT_GET_CIPHERS_METHODDEF -#endif /* !defined(_SSL__SSLCONTEXT_GET_CIPHERS_METHODDEF) */ - -#ifndef _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF - #define _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF -#endif /* !defined(_SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF) */ - #ifndef _SSL_RAND_EGD_METHODDEF #define _SSL_RAND_EGD_METHODDEF #endif /* !defined(_SSL_RAND_EGD_METHODDEF) */ @@ -1447,4 +1362,4 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=2bb53a80040c9b35 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9468e58904a565a2 input=a9049054013a1b77]*/ diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py index dd8d211646df3e..90213b3dff5e18 100755 --- a/Tools/ssl/multissltests.py +++ b/Tools/ssl/multissltests.py @@ -43,21 +43,17 @@ log = logging.getLogger("multissl") OPENSSL_OLD_VERSIONS = [ - "1.0.2u", - "1.1.0l", ] OPENSSL_RECENT_VERSIONS = [ "1.1.1k", - # "3.0.0-alpha14" + "3.0.0-alpha14" ] LIBRESSL_OLD_VERSIONS = [ - "2.9.2", ] LIBRESSL_RECENT_VERSIONS = [ - "3.2.4", ] # store files in ../multissl diff --git a/configure b/configure index e03b9ac5b3ddbb..ad0367fe0e20bb 100755 --- a/configure +++ b/configure @@ -1,12 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for python 3.10. +# Generated by GNU Autoconf 2.69 for python 3.10. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -17,16 +16,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -36,46 +33,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -84,6 +81,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -92,12 +96,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -109,10 +109,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -134,22 +154,20 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -169,53 +187,42 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ) -then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null -then : + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -223,21 +230,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -255,19 +255,18 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and + $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: https://bugs.python.org/ about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script @@ -295,7 +294,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -313,14 +311,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -335,7 +325,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -344,7 +334,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -383,13 +373,12 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -401,27 +390,18 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -433,9 +413,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -462,7 +442,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -506,7 +486,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -520,10 +500,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -537,13 +513,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -619,36 +588,40 @@ PACKAGE_URL='' ac_unique_file="Include/object.h" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_c_list= ac_subst_vars='LTLIBOBJS TEST_MODULES LIBRARY_DEPS @@ -702,7 +675,6 @@ LDSHARED SHLIB_SUFFIX LIBTOOL_CRUFT OTHER_LIBTOOL_OPT -EGREP UNIVERSAL_ARCH_FLAGS LDFLAGS_NODIST CFLAGS_NODIST @@ -746,6 +718,7 @@ DLLLIBRARY LDLIBRARY LIBRARY BUILDEXEEXT +EGREP NO_AS_NEEDED MULTIARCH_CPPFLAGS PLATFORM_TRIPLET @@ -819,7 +792,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -943,7 +915,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -973,6 +944,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1013,9 +986,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1039,9 +1012,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1194,15 +1167,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1252,9 +1216,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1268,9 +1232,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1314,9 +1278,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1332,7 +1296,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1340,7 +1304,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1396,7 +1360,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1493,7 +1457,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1690,9 +1653,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1720,8 +1683,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1729,7 +1691,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1739,9 +1701,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF python configure 3.10 -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1758,14 +1720,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1773,15 +1735,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1803,7 +1764,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1811,15 +1772,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1835,14 +1795,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1850,18 +1810,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1876,43 +1835,101 @@ fi } # ac_fn_c_try_link -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## --------------------------------------- ## +## Report this to https://bugs.python.org/ ## +## --------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_c_check_header_compile +} # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- -# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that -# executables *can* be run. +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack @@ -1922,26 +1939,25 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status @@ -1952,6 +1968,37 @@ fi } # ac_fn_c_try_run +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -1959,18 +2006,17 @@ fi ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -1978,13 +2024,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -1992,19 +2037,18 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2023,7 +2067,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; @@ -2033,15 +2077,14 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -2051,10 +2094,9 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break -else $as_nop +else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= @@ -2062,14 +2104,14 @@ else $as_nop fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; @@ -2079,15 +2121,14 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; @@ -2097,10 +2138,9 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break -else $as_nop +else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= @@ -2108,14 +2148,14 @@ else $as_nop fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done -else $as_nop +else ac_lo= ac_hi= fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val @@ -2123,7 +2163,7 @@ while test "x$ac_lo" != "x$ac_hi"; do /* end confdefs.h. */ $4 int -main (void) +main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; @@ -2133,13 +2173,12 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid -else $as_nop +else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; @@ -2149,12 +2188,12 @@ esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 -static long int longval (void) { return $2; } -static unsigned long int ulongval (void) { return $2; } +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } #include #include int -main (void) +main () { FILE *f = fopen ("conftest.val", "w"); @@ -2182,10 +2221,9 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -2217,9 +2254,16 @@ else $as_nop #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -2237,51 +2281,47 @@ choke me #endif int -main (void) +main () { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func -# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR -# ------------------------------------------------------------------ +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. -ac_fn_check_decl () +# accordingly. +ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -printf %s "checking whether $as_decl_name is declared... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - eval ac_save_FLAGS=\$$6 - as_fn_append $6 " $5" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { #ifndef $as_decl_name #ifdef __cplusplus @@ -2295,22 +2335,19 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - eval $6=\$ac_save_FLAGS - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_check_decl +} # ac_fn_c_check_decl # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- @@ -2319,17 +2356,16 @@ printf "%s\n" "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -printf %s "checking for $2.$3... " >&6; } -if eval test \${$4+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (ac_aggr.$3) @@ -2338,15 +2374,14 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main (void) +main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -2355,50 +2390,29 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" -else $as_nop +else eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by python $as_me 3.10, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2431,12 +2445,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2471,7 +2481,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2506,13 +2516,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2523,8 +2531,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2548,7 +2556,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2556,14 +2564,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2571,15 +2579,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2587,8 +2595,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2602,48 +2610,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2653,504 +2676,85 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' - -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' - -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" -as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" -as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" -as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" - -# Auxiliary files required by this configure script. -ac_aux_files="install-sh config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." - -# Search for a directory containing all of the required auxiliary files, -# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. -# If we don't find one directory that contains all the files we need, -# we report the set of missing files from the *first* directory in -# $ac_aux_dir_candidates and give up. -ac_missing_aux_files="" -ac_first_candidate=: -printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in $ac_aux_dir_candidates -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - as_found=: - - printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 - ac_aux_dir_found=yes - ac_install_sh= - for ac_aux in $ac_aux_files - do - # As a special case, if "install-sh" is required, that requirement - # can be satisfied by any of "install-sh", "install.sh", or "shtool", - # and $ac_install_sh is set appropriately for whichever one is found. - if test x"$ac_aux" = x"install-sh" - then - if test -f "${as_dir}install-sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 - ac_install_sh="${as_dir}install-sh -c" - elif test -f "${as_dir}install.sh"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 - ac_install_sh="${as_dir}install.sh -c" - elif test -f "${as_dir}shtool"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 - ac_install_sh="${as_dir}shtool install -c" - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} install-sh" - else - break - fi - fi - else - if test -f "${as_dir}${ac_aux}"; then - printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 - else - ac_aux_dir_found=no - if $ac_first_candidate; then - ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" - else - break - fi - fi - fi - done - if test "$ac_aux_dir_found" = yes; then - ac_aux_dir="$as_dir" - break - fi - ac_first_candidate=false - - as_found=false -done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 -fi - - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -if test -f "${ac_aux_dir}config.guess"; then - ac_config_guess="$SHELL ${ac_aux_dir}config.guess" -fi -if test -f "${ac_aux_dir}config.sub"; then - ac_config_sub="$SHELL ${ac_aux_dir}config.sub" -fi -if test -f "$ac_aux_dir/configure"; then - ac_configure="$SHELL ${ac_aux_dir}configure" -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' - and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -3180,12 +2784,11 @@ if test -e $srcdir/.git then # Extract the first word of "git", so it can be a program name with args. set dummy git; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_HAS_GIT+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_HAS_GIT+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$HAS_GIT"; then ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test. else @@ -3193,15 +2796,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAS_GIT="found" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3213,11 +2812,11 @@ fi fi HAS_GIT=$ac_cv_prog_HAS_GIT if test -n "$HAS_GIT"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5 -printf "%s\n" "$HAS_GIT" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5 +$as_echo "$HAS_GIT" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3239,30 +2838,55 @@ fi ac_config_headers="$ac_config_headers pyconfig.h" +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - # Make sure we can run config.sub. -$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -printf %s "checking build system type... " >&6; } -if test ${ac_cv_build+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -printf "%s\n" "$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -3281,22 +2905,21 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -printf %s "checking host system type... " >&6; } -if test ${ac_cv_host+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -printf "%s\n" "$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -3325,12 +2948,11 @@ for ac_prog in python$PACKAGE_VERSION python3 python do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PYTHON_FOR_REGEN+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$PYTHON_FOR_REGEN"; then ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test. else @@ -3338,15 +2960,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3357,11 +2975,11 @@ fi fi PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN if test -n "$PYTHON_FOR_REGEN"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5 -printf "%s\n" "$PYTHON_FOR_REGEN" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5 +$as_echo "$PYTHON_FOR_REGEN" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3372,8 +2990,8 @@ test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3" if test "$cross_compiling" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5 -printf %s "checking for python interpreter for cross build... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5 +$as_echo_n "checking for python interpreter for cross build... " >&6; } if test -z "$PYTHON_FOR_BUILD"; then for interp in python$PACKAGE_VERSION python3 python; do which $interp >/dev/null 2>&1 || continue @@ -3385,8 +3003,8 @@ printf %s "checking for python interpreter for cross build... " >&6; } if test x$interp = x; then as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 -printf "%s\n" "$interp" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 +$as_echo "$interp" >&6; } PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp fi elif test "$cross_compiling" = maybe; then @@ -3420,28 +3038,28 @@ SOVERSION=1.0 # The later defininition of _XOPEN_SOURCE disables certain features # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone). -printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h +$as_echo "#define _GNU_SOURCE 1" >>confdefs.h # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables # certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable # them. -printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h +$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable # them. -printf "%s\n" "#define __BSD_VISIBLE 1" >>confdefs.h +$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable # them. -printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h +$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h @@ -3451,11 +3069,10 @@ define_xopen_source=yes CONFIG_ARGS="$ac_configure_args" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5 -printf %s "checking for --enable-universalsdk... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5 +$as_echo_n "checking for --enable-universalsdk... " >&6; } # Check whether --enable-universalsdk was given. -if test ${enable_universalsdk+y} -then : +if test "${enable_universalsdk+set}" = set; then : enableval=$enable_universalsdk; case $enableval in yes) @@ -3487,7 +3104,7 @@ then : esac -else $as_nop +else UNIVERSALSDK= enable_universalsdk= @@ -3496,11 +3113,11 @@ fi if test -n "${UNIVERSALSDK}" then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5 -printf "%s\n" "${UNIVERSALSDK}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5 +$as_echo "${UNIVERSALSDK}" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3522,12 +3139,11 @@ then fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5 -printf %s "checking for --with-universal-archs... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5 +$as_echo_n "checking for --with-universal-archs... " >&6; } # Check whether --with-universal-archs was given. -if test ${with_universal_archs+y} -then : +if test "${with_universal_archs+set}" = set; then : withval=$with_universal_archs; UNIVERSAL_ARCHS="$withval" @@ -3535,23 +3151,22 @@ fi if test -n "${UNIVERSALSDK}" then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5 -printf "%s\n" "${UNIVERSAL_ARCHS}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5 +$as_echo "${UNIVERSAL_ARCHS}" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Check whether --with-framework-name was given. -if test ${with_framework_name+y} -then : +if test "${with_framework_name+set}" = set; then : withval=$with_framework_name; PYTHONFRAMEWORK=${withval} PYTHONFRAMEWORKDIR=${withval}.framework PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'` -else $as_nop +else PYTHONFRAMEWORK=Python PYTHONFRAMEWORKDIR=Python.framework @@ -3560,8 +3175,7 @@ else $as_nop fi # Check whether --enable-framework was given. -if test ${enable_framework+y} -then : +if test "${enable_framework+set}" = set; then : enableval=$enable_framework; case $enableval in yes) @@ -3650,7 +3264,7 @@ then : esac -else $as_nop +else PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework @@ -3685,7 +3299,9 @@ fi -printf "%s\n" "#define _PYTHONFRAMEWORK \"${PYTHONFRAMEWORK}\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}" +_ACEOF ##AC_ARG_WITH(dyld, @@ -3694,8 +3310,8 @@ printf "%s\n" "#define _PYTHONFRAMEWORK \"${PYTHONFRAMEWORK}\"" >>confdefs.h ## # Set name for machine-dependent library files -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5 -printf %s "checking MACHDEP... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5 +$as_echo_n "checking MACHDEP... " >&6; } if test -z "$MACHDEP" then # avoid using uname for cross builds @@ -3745,8 +3361,8 @@ then '') MACHDEP="unknown";; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5 -printf "%s\n" "\"$MACHDEP\"" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5 +$as_echo "\"$MACHDEP\"" >&6; } if test "$cross_compiling" = yes; then @@ -3795,7 +3411,7 @@ case $ac_sys_system/$ac_sys_release in # also defined. This can be overridden by defining _BSD_SOURCE # As this has a different meaning on Linux, only define it on OpenBSD -printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h +$as_echo "#define _BSD_SOURCE 1" >>confdefs.h ;; OpenBSD/*) @@ -3803,7 +3419,7 @@ printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h # also defined. This can be overridden by defining _BSD_SOURCE # As this has a different meaning on Linux, only define it on OpenBSD -printf "%s\n" "#define _BSD_SOURCE 1" >>confdefs.h +$as_echo "#define _BSD_SOURCE 1" >>confdefs.h ;; # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of @@ -3861,7 +3477,7 @@ if test $define_xopen_source = yes then # X/Open 7, incorporating POSIX.1-2008 -printf "%s\n" "#define _XOPEN_SOURCE 700" >>confdefs.h +$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires @@ -3869,11 +3485,11 @@ printf "%s\n" "#define _XOPEN_SOURCE 700" >>confdefs.h # several APIs are not declared. Since this is also needed in some # cases for HP-UX, we define it globally. -printf "%s\n" "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h +$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h -printf "%s\n" "#define _POSIX_C_SOURCE 200809L" >>confdefs.h +$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h fi @@ -3888,7 +3504,7 @@ esac if test $define_stdc_a1 = yes then -printf "%s\n" "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h +$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h fi @@ -3952,8 +3568,8 @@ then then if test -n "`"$found_gcc" --version | grep llvm-gcc`" then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5 -printf "%s\n" "$as_me: Detected llvm-gcc, falling back to clang" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5 +$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;} CC="$found_clang" CXX="$found_clang++" fi @@ -3961,8 +3577,8 @@ printf "%s\n" "$as_me: Detected llvm-gcc, falling back to clang" >&6;} elif test -z "$found_gcc" -a -n "$found_clang" then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5 -printf "%s\n" "$as_me: No GCC found, use CLANG" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5 +$as_echo "$as_me: No GCC found, use CLANG" >&6;} CC="$found_clang" CXX="$found_clang++" @@ -3971,8 +3587,8 @@ printf "%s\n" "$as_me: No GCC found, use CLANG" >&6;} found_clang=`/usr/bin/xcrun -find clang 2>/dev/null` if test -n "${found_clang}" then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5 -printf "%s\n" "$as_me: Using clang from Xcode.app" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5 +$as_echo "$as_me: Using clang from Xcode.app" >&6;} CC="${found_clang}" CXX="`/usr/bin/xcrun -find clang++`" @@ -3981,15 +3597,6 @@ printf "%s\n" "$as_me: Using clang from Xcode.app" >&6;} fi fi fi - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3998,12 +3605,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4011,15 +3617,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4030,11 +3632,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4043,12 +3645,11 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4056,15 +3657,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4075,11 +3672,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4087,8 +3684,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4101,12 +3698,11 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4114,15 +3710,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4133,11 +3725,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4146,12 +3738,11 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4160,19 +3751,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4188,18 +3775,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4210,12 +3797,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4223,15 +3809,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4242,11 +3824,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4259,12 +3841,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4272,15 +3853,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4291,11 +3868,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4307,138 +3884,34 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi -else - CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4448,7 +3921,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4456,7 +3929,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4468,9 +3941,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4491,12 +3964,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4513,7 +3985,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4529,46 +4001,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4582,15 +4052,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4599,7 +4069,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4611,8 +4081,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4620,10 +4090,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4631,40 +4101,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4678,12 +4147,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -then : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4692,32 +4160,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4727,33 +4194,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4762,60 +4225,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4830,144 +4290,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -4981,36 +4391,40 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -printf %s "checking how to run the C preprocessor... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test ${ac_cv_prog_CPP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -5022,11 +4436,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -5036,8 +4449,7 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : break fi @@ -5049,24 +4461,29 @@ fi else ac_cv_prog_CPP=$CPP fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -5078,11 +4495,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -5092,12 +4508,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok -then : +if $ac_preproc_ok; then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -5108,12 +4523,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -printf %s "checking for grep that handles long lines and -e... " >&6; } -if test ${ac_cv_path_GREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5121,15 +4535,10 @@ else $as_nop for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in grep ggrep - do + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP @@ -5138,13 +4547,13 @@ case `"$ac_path_GREP" --version 2>&1` in ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5172,17 +4581,16 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -printf %s "checking for a sed that does not truncate output... " >&6; } -if test ${ac_cv_path_SED+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -5196,15 +4604,10 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in sed gsed - do + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -5213,13 +4616,13 @@ case `"$ac_path_SED" --version 2>&1` in ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" '' >> "conftest.nl" + $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5247,20 +4650,19 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -printf "%s\n" "$ac_cv_path_SED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=" >&5 -printf %s "checking for --with-cxx-main=... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=" >&5 +$as_echo_n "checking for --with-cxx-main=... " >&6; } # Check whether --with-cxx_main was given. -if test ${with_cxx_main+y} -then : +if test "${with_cxx_main+set}" = set; then : withval=$with_cxx_main; case $withval in @@ -5275,15 +4677,15 @@ then : CXX=$withval fi;; esac -else $as_nop +else with_cxx_main=no MAINCC='$(CC)' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5 -printf "%s\n" "$with_cxx_main" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5 +$as_echo "$with_cxx_main" >&6; } preset_cxx="$CXX" if test -z "$CXX" @@ -5292,12 +4694,11 @@ then gcc) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args. set dummy ${ac_tool_prefix}g++; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $CXX in [\\/]* | ?:[\\/]*) ac_cv_path_CXX="$CXX" # Let the user override the test with a path. @@ -5307,15 +4708,11 @@ else $as_nop for as_dir in notfound do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5327,11 +4724,11 @@ esac fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5340,12 +4737,11 @@ if test -z "$ac_cv_path_CXX"; then ac_pt_CXX=$CXX # Extract the first word of "g++", so it can be a program name with args. set dummy g++; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. @@ -5355,15 +4751,11 @@ else $as_nop for as_dir in notfound do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5375,11 +4767,11 @@ esac fi ac_pt_CXX=$ac_cv_path_ac_pt_CXX if test -n "$ac_pt_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 -printf "%s\n" "$ac_pt_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 +$as_echo "$ac_pt_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_CXX" = x; then @@ -5387,8 +4779,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_pt_CXX @@ -5400,12 +4792,11 @@ fi cc) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args. set dummy ${ac_tool_prefix}c++; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $CXX in [\\/]* | ?:[\\/]*) ac_cv_path_CXX="$CXX" # Let the user override the test with a path. @@ -5415,15 +4806,11 @@ else $as_nop for as_dir in notfound do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5435,11 +4822,11 @@ esac fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5448,12 +4835,11 @@ if test -z "$ac_cv_path_CXX"; then ac_pt_CXX=$CXX # Extract the first word of "c++", so it can be a program name with args. set dummy c++; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. @@ -5463,15 +4849,11 @@ else $as_nop for as_dir in notfound do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5483,11 +4865,11 @@ esac fi ac_pt_CXX=$ac_cv_path_ac_pt_CXX if test -n "$ac_pt_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 -printf "%s\n" "$ac_pt_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 +$as_echo "$ac_pt_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_CXX" = x; then @@ -5495,8 +4877,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_pt_CXX @@ -5508,12 +4890,11 @@ fi clang|*/clang) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args. set dummy ${ac_tool_prefix}clang++; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $CXX in [\\/]* | ?:[\\/]*) ac_cv_path_CXX="$CXX" # Let the user override the test with a path. @@ -5523,15 +4904,11 @@ else $as_nop for as_dir in notfound do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5543,11 +4920,11 @@ esac fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5556,12 +4933,11 @@ if test -z "$ac_cv_path_CXX"; then ac_pt_CXX=$CXX # Extract the first word of "clang++", so it can be a program name with args. set dummy clang++; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. @@ -5571,15 +4947,11 @@ else $as_nop for as_dir in notfound do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5591,11 +4963,11 @@ esac fi ac_pt_CXX=$ac_cv_path_ac_pt_CXX if test -n "$ac_pt_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 -printf "%s\n" "$ac_pt_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 +$as_echo "$ac_pt_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_CXX" = x; then @@ -5603,8 +4975,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_pt_CXX @@ -5616,12 +4988,11 @@ fi icc|*/icc) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args. set dummy ${ac_tool_prefix}icpc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $CXX in [\\/]* | ?:[\\/]*) ac_cv_path_CXX="$CXX" # Let the user override the test with a path. @@ -5631,15 +5002,11 @@ else $as_nop for as_dir in notfound do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_CXX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5651,11 +5018,11 @@ esac fi CXX=$ac_cv_path_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5664,12 +5031,11 @@ if test -z "$ac_cv_path_CXX"; then ac_pt_CXX=$CXX # Extract the first word of "icpc", so it can be a program name with args. set dummy icpc; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. @@ -5679,15 +5045,11 @@ else $as_nop for as_dir in notfound do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_CXX="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5699,11 +5061,11 @@ esac fi ac_pt_CXX=$ac_cv_path_ac_pt_CXX if test -n "$ac_pt_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 -printf "%s\n" "$ac_pt_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 +$as_echo "$ac_pt_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_CXX" = x; then @@ -5711,8 +5073,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_pt_CXX @@ -5734,12 +5096,11 @@ then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else @@ -5747,15 +5108,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5766,11 +5123,11 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5783,12 +5140,11 @@ if test -z "$CXX"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else @@ -5796,15 +5152,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5815,11 +5167,11 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -printf "%s\n" "$ac_ct_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5831,8 +5183,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -5846,12 +5198,12 @@ fi fi if test "$preset_cxx" != "$CXX" then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: + { $as_echo "$as_me:${as_lineno-$LINENO}: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. " >&5 -printf "%s\n" "$as_me: +$as_echo "$as_me: By default, distutils will build C++ extension modules with \"$CXX\". If this is not intended, then set CXX on the configure command line. @@ -5862,8 +5214,8 @@ fi MULTIARCH=$($CC --print-multiarch 2>/dev/null) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5 -printf %s "checking for the platform triplet based on compiler characteristics... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5 +$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; } cat >> conftest.c <conftest.out 2>/dev/null; then PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5 -printf "%s\n" "$PLATFORM_TRIPLET" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5 +$as_echo "$PLATFORM_TRIPLET" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } fi rm -f conftest.c conftest.out @@ -6033,8 +5385,8 @@ if test x$MULTIARCH != x; then fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5 -printf %s "checking for -Wl,--no-as-needed... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5 +$as_echo_n "checking for -Wl,--no-as-needed... " >&6; } save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--no-as-needed" @@ -6042,203 +5394,290 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : NO_AS_NEEDED="-Wl,--no-as-needed" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else NO_AS_NEEDED="" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" # checks for UNIX variants that set C preprocessor variables -ac_header= ac_cache= -for ac_item in $ac_header_c_list + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do - if test $ac_cache; then - ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item - fi -done - - - - - - - - -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : - -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" - - - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if test ${ac_cv_safe_to_define___extensions__+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#include +#include -# define __EXTENSIONS__ 1 - $ac_includes_default int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_safe_to_define___extensions__=yes -else $as_nop - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 -printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } -if test ${ac_cv_should_define__xopen_source+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_should_define__xopen_source=no - if test $ac_cv_header_wchar_h = yes -then : +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include - #include - mbstate_t x; -int -main (void) -{ +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi -else $as_nop +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif - #define _XOPEN_SOURCE 500 - #include - mbstate_t x; +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int -main (void) +main () { - - ; + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_should_define__xopen_source=yes +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 -printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h - printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h +fi - printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h +fi - printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h +done - printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h - printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h - printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes +else + MINIX= +fi - printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h - printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h + if test "$MINIX" = yes; then - printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h - printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h - printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h - printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h +$as_echo "#define _MINIX 1" >>confdefs.h - printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h + fi - if test $ac_cv_header_minix_config_h = yes -then : - MINIX=yes - printf "%s\n" "#define _MINIX 1" >>confdefs.h - printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ -else $as_nop - MINIX= + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no fi - if test $ac_cv_safe_to_define___extensions__ = yes -then : - printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - if test $ac_cv_should_define__xopen_source = yes -then : - printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5 -printf %s "checking for the Android API level... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5 +$as_echo_n "checking for the Android API level... " >&6; } cat >> conftest.c <conftest.out 2>/dev/null; then ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out` _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out` - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5 -printf "%s\n" "$ANDROID_API_LEVEL" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5 +$as_echo "$ANDROID_API_LEVEL" >&6; } if test -z "$ANDROID_API_LEVEL"; then echo 'Fatal: you must define __ANDROID_API__' exit 1 fi -printf "%s\n" "#define ANDROID_API_LEVEL $ANDROID_API_LEVEL" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ANDROID_API_LEVEL $ANDROID_API_LEVEL +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5 -printf %s "checking for the Android arm ABI... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5 -printf "%s\n" "$_arm_arch" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5 +$as_echo_n "checking for the Android arm ABI... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5 +$as_echo "$_arm_arch" >&6; } if test "$_arm_arch" = 7; then BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16" LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8" fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not Android" >&5 -printf "%s\n" "not Android" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5 +$as_echo "not Android" >&6; } fi rm -f conftest.c conftest.out @@ -6284,12 +5725,11 @@ atheos*|Linux*/1*) esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5 -printf %s "checking for --with-suffix... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5 +$as_echo_n "checking for --with-suffix... " >&6; } # Check whether --with-suffix was given. -if test ${with_suffix+y} -then : +if test "${with_suffix+set}" = set; then : withval=$with_suffix; case $withval in no) EXEEXT=;; @@ -6298,26 +5738,26 @@ then : esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5 -printf "%s\n" "$EXEEXT" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5 +$as_echo "$EXEEXT" >&6; } # Test whether we're running on a non-case-sensitive system, in which # case we give a warning if no ext is given -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5 -printf %s "checking for case-insensitive build directory... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5 +$as_echo_n "checking for case-insensitive build directory... " >&6; } if test ! -d CaseSensitiveTestDir; then mkdir CaseSensitiveTestDir fi if test -d casesensitivetestdir then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } BUILDEXEEXT=.exe else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } BUILDEXEEXT=$EXEEXT fi rmdir CaseSensitiveTestDir @@ -6330,14 +5770,14 @@ hp*|HP*) esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5 -printf %s "checking LIBRARY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5 +$as_echo_n "checking LIBRARY... " >&6; } if test -z "$LIBRARY" then LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5 -printf "%s\n" "$LIBRARY" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5 +$as_echo "$LIBRARY" >&6; } # LDLIBRARY is the name of the library to link against (as opposed to the # name of the library into which to insert object files). BLDLIBRARY is also @@ -6376,8 +5816,8 @@ LDVERSION="$VERSION" # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: # python might then depend on the C++ runtime -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5 -printf %s "checking LINKCC... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5 +$as_echo_n "checking LINKCC... " >&6; } if test -z "$LINKCC" then LINKCC='$(PURIFY) $(MAINCC)' @@ -6388,8 +5828,8 @@ then LINKCC=qcc;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5 -printf "%s\n" "$LINKCC" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5 +$as_echo "$LINKCC" >&6; } # EXPORTSYMS holds the list of exported symbols for AIX. # EXPORTSFROM holds the module name exporting symbols on AIX. @@ -6397,16 +5837,16 @@ EXPORTSYMS= EXPORTSFROM= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5 -printf %s "checking EXPORTSYMS... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXPORTSYMS" >&5 +$as_echo_n "checking EXPORTSYMS... " >&6; } case $ac_sys_system in AIX*) EXPORTSYMS="Modules/python.exp" EXPORTSFROM=. # the main executable ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5 -printf "%s\n" "$EXPORTSYMS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPORTSYMS" >&5 +$as_echo "$EXPORTSYMS" >&6; } # GNULD is set to "yes" if the GNU linker is used. If this goes wrong # make sure we default having it set to "no": this is used by @@ -6414,8 +5854,8 @@ printf "%s\n" "$EXPORTSYMS" >&6; } # to linker command lines, and failing to detect GNU ld simply results # in the same bahaviour as before. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -printf %s "checking for GNU ld... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +$as_echo_n "checking for GNU ld... " >&6; } ac_prog=ld if test "$GCC" = yes; then ac_prog=`$CC -print-prog-name=ld` @@ -6426,14 +5866,13 @@ case `"$ac_prog" -V 2>&1 < /dev/null` in *) GNULD=no;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5 -printf "%s\n" "$GNULD" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5 +$as_echo "$GNULD" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5 -printf %s "checking for --enable-shared... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5 +$as_echo_n "checking for --enable-shared... " >&6; } # Check whether --enable-shared was given. -if test ${enable_shared+y} -then : +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; fi @@ -6447,14 +5886,13 @@ then enable_shared="no";; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -printf "%s\n" "$enable_shared" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +$as_echo "$enable_shared" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5 -printf %s "checking for --enable-profiling... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5 +$as_echo_n "checking for --enable-profiling... " >&6; } # Check whether --enable-profiling was given. -if test ${enable_profiling+y} -then : +if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; fi @@ -6465,28 +5903,27 @@ if test "x$enable_profiling" = xyes; then /* end confdefs.h. */ int main() { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -else $as_nop +else enable_profiling=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CC="$ac_save_cc" else enable_profiling=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5 -printf "%s\n" "$enable_profiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5 +$as_echo "$enable_profiling" >&6; } if test "x$enable_profiling" = xyes; then BASECFLAGS="-pg $BASECFLAGS" LDFLAGS="-pg $LDFLAGS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5 -printf %s "checking LDLIBRARY... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5 +$as_echo_n "checking LDLIBRARY... " >&6; } # MacOSX framework builds need more magic. LDLIBRARY is the dynamic # library that we build, but we do not want to link against it (we @@ -6507,7 +5944,7 @@ fi if test $enable_shared = "yes"; then PY_ENABLE_SHARED=1 -printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h +$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h case $ac_sys_system in CYGWIN*) @@ -6571,8 +6008,8 @@ if test "$cross_compiling" = yes; then RUNSHARED= fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 -printf "%s\n" "$LDLIBRARY" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 +$as_echo "$LDLIBRARY" >&6; } if test -n "$ac_tool_prefix"; then @@ -6580,12 +6017,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6593,15 +6029,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6612,11 +6044,11 @@ fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -printf "%s\n" "$AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6629,12 +6061,11 @@ if test -z "$AR"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -6642,15 +6073,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6661,11 +6088,11 @@ fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -printf "%s\n" "$ac_ct_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6677,8 +6104,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -6698,12 +6125,11 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_READELF+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$READELF"; then ac_cv_prog_READELF="$READELF" # Let the user override the test. else @@ -6711,15 +6137,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_READELF="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6730,11 +6152,11 @@ fi fi READELF=$ac_cv_prog_READELF if test -n "$READELF"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 -printf "%s\n" "$READELF" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 +$as_echo "$READELF" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6747,12 +6169,11 @@ if test -z "$READELF"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_READELF+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_READELF+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_READELF"; then ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. else @@ -6760,15 +6181,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_READELF="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6779,11 +6196,11 @@ fi fi ac_ct_READELF=$ac_cv_prog_ac_ct_READELF if test -n "$ac_ct_READELF"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 -printf "%s\n" "$ac_ct_READELF" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 +$as_echo "$ac_ct_READELF" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -6795,8 +6212,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac READELF=$ac_ct_READELF @@ -6821,8 +6238,7 @@ hp*|HP*) INSTALL="${srcdir}/install-sh -c" fi esac - - # Find a good install program. We prefer a C program (faster), +# Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -6836,25 +6252,20 @@ esac # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -printf %s "checking for a BSD-compatible install... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - # Account for fact that we put trailing slashes in our PATH walk. -case $as_dir in #(( - ./ | /[cC]/* | \ + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -6864,13 +6275,13 @@ case $as_dir in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -6878,12 +6289,12 @@ case $as_dir in #(( echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -6899,7 +6310,7 @@ IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi - if test ${ac_cv_path_install+y}; then + if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -6909,8 +6320,8 @@ fi INSTALL=$ac_install_sh fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -6920,31 +6331,25 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 -printf %s "checking for a race-free mkdir -p... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test ${ac_cv_path_mkdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue - case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done @@ -6955,7 +6360,7 @@ IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version - if test ${ac_cv_path_mkdir+y}; then + if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -6965,8 +6370,8 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -printf "%s\n" "$MKDIR_P" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } # Not every filesystem supports hard links @@ -6983,63 +6388,60 @@ fi ABIFLAGS="" # Check for --with-pydebug -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5 -printf %s "checking for --with-pydebug... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5 +$as_echo_n "checking for --with-pydebug... " >&6; } # Check whether --with-pydebug was given. -if test ${with_pydebug+y} -then : +if test "${with_pydebug+set}" = set; then : withval=$with_pydebug; if test "$withval" != no then -printf "%s\n" "#define Py_DEBUG 1" >>confdefs.h +$as_echo "#define Py_DEBUG 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; Py_DEBUG='true' ABIFLAGS="${ABIFLAGS}d" -else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; Py_DEBUG='false' +else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; Py_DEBUG='false' fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Check for --with-trace-refs # --with-trace-refs -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5 -printf %s "checking for --with-trace-refs... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5 +$as_echo_n "checking for --with-trace-refs... " >&6; } # Check whether --with-trace-refs was given. -if test ${with_trace_refs+y} -then : +if test "${with_trace_refs+set}" = set; then : withval=$with_trace_refs; -else $as_nop +else with_trace_refs=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5 -printf "%s\n" "$with_trace_refs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5 +$as_echo "$with_trace_refs" >&6; } if test "$with_trace_refs" = "yes" then -printf "%s\n" "#define Py_TRACE_REFS 1" >>confdefs.h +$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h fi # Check for --with-assertions. # This allows enabling assertions without Py_DEBUG. assertions='false' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5 -printf %s "checking for --with-assertions... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5 +$as_echo_n "checking for --with-assertions... " >&6; } # Check whether --with-assertions was given. -if test ${with_assertions+y} -then : +if test "${with_assertions+set}" = set; then : withval=$with_assertions; if test "$withval" != no then @@ -7048,40 +6450,39 @@ fi fi if test "$assertions" = 'true'; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } elif test "$Py_DEBUG" = 'true'; then assertions='true' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5 -printf "%s\n" "implied by --with-pydebug" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5 +$as_echo "implied by --with-pydebug" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Enable optimization flags Py_OPT='false' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5 -printf %s "checking for --enable-optimizations... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5 +$as_echo_n "checking for --enable-optimizations... " >&6; } # Check whether --enable-optimizations was given. -if test ${enable_optimizations+y} -then : +if test "${enable_optimizations+set}" = set; then : enableval=$enable_optimizations; if test "$enableval" != no then Py_OPT='true' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; else Py_OPT='false' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "$Py_OPT" = 'true' ; then @@ -7094,12 +6495,11 @@ if test "$Py_OPT" = 'true' ; then DEF_MAKE_RULE="build_all" case $CC in *gcc*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5 -printf %s "checking whether C compiler accepts -fno-semantic-interposition... " >&6; } -if test ${ax_cv_check_cflags___fno_semantic_interposition+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5 +$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; } +if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -fno-semantic-interposition" @@ -7107,31 +6507,29 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___fno_semantic_interposition=yes -else $as_nop +else ax_cv_check_cflags___fno_semantic_interposition=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5 -printf "%s\n" "$ax_cv_check_cflags___fno_semantic_interposition" >&6; } -if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5 +$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; } +if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then : CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition" LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition" -else $as_nop +else : fi @@ -7146,14 +6544,14 @@ else fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5 -printf %s "checking PROFILE_TASK... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5 +$as_echo_n "checking PROFILE_TASK... " >&6; } if test -z "$PROFILE_TASK" then PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)' fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5 -printf "%s\n" "$PROFILE_TASK" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5 +$as_echo "$PROFILE_TASK" >&6; } # Make llvm-relatec checks work on systems where llvm tools are not installed with their # normal names in the default $PATH (ie: Ubuntu). They exist under the @@ -7176,26 +6574,25 @@ then fi # Enable LTO flags -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5 -printf %s "checking for --with-lto... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5 +$as_echo_n "checking for --with-lto... " >&6; } # Check whether --with-lto was given. -if test ${with_lto+y} -then : +if test "${with_lto+set}" = set; then : withval=$with_lto; if test "$withval" != no then Py_LTO='true' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; else Py_LTO='false' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "$Py_LTO" = 'true' ; then @@ -7205,12 +6602,11 @@ if test "$Py_LTO" = 'true' ; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_LLVM_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_LLVM_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else case $LLVM_AR in [\\/]* | ?:[\\/]*) ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path. @@ -7220,15 +6616,11 @@ else $as_nop for as_dir in ${llvm_path} do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_LLVM_AR="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7240,11 +6632,11 @@ esac fi LLVM_AR=$ac_cv_path_LLVM_AR if test -n "$LLVM_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5 -printf "%s\n" "$LLVM_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5 +$as_echo "$LLVM_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7253,12 +6645,11 @@ if test -z "$ac_cv_path_LLVM_AR"; then ac_pt_LLVM_AR=$LLVM_AR # Extract the first word of "llvm-ar", so it can be a program name with args. set dummy llvm-ar; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_LLVM_AR+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_LLVM_AR in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path. @@ -7268,15 +6659,11 @@ else $as_nop for as_dir in ${llvm_path} do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_LLVM_AR="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7288,11 +6675,11 @@ esac fi ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR if test -n "$ac_pt_LLVM_AR"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5 -printf "%s\n" "$ac_pt_LLVM_AR" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5 +$as_echo "$ac_pt_LLVM_AR" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_LLVM_AR" = x; then @@ -7300,8 +6687,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LLVM_AR=$ac_pt_LLVM_AR @@ -7324,8 +6711,8 @@ fi then LLVM_AR='/usr/bin/xcrun llvm-ar' LLVM_AR_FOUND=found - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5 -printf "%s\n" "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5 +$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;} fi fi if test $LLVM_AR_FOUND = not-found @@ -7379,12 +6766,11 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args. set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_LLVM_PROFDATA+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_LLVM_PROFDATA+:} false; then : + $as_echo_n "(cached) " >&6 +else case $LLVM_PROFDATA in [\\/]* | ?:[\\/]*) ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path. @@ -7394,15 +6780,11 @@ else $as_nop for as_dir in ${llvm_path} do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7414,11 +6796,11 @@ esac fi LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA if test -n "$LLVM_PROFDATA"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5 -printf "%s\n" "$LLVM_PROFDATA" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5 +$as_echo "$LLVM_PROFDATA" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -7427,12 +6809,11 @@ if test -z "$ac_cv_path_LLVM_PROFDATA"; then ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA # Extract the first word of "llvm-profdata", so it can be a program name with args. set dummy llvm-profdata; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_LLVM_PROFDATA+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_LLVM_PROFDATA in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path. @@ -7442,15 +6823,11 @@ else $as_nop for as_dir in ${llvm_path} do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7462,11 +6839,11 @@ esac fi ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA if test -n "$ac_pt_LLVM_PROFDATA"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5 -printf "%s\n" "$ac_pt_LLVM_PROFDATA" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5 +$as_echo "$ac_pt_LLVM_PROFDATA" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_LLVM_PROFDATA" = x; then @@ -7474,8 +6851,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA @@ -7500,8 +6877,8 @@ then # https://apple.stackexchange.com/questions/197053/ LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata' LLVM_PROF_FOUND=found - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5 -printf "%s\n" "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5 +$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;} fi fi LLVM_PROF_ERR=no @@ -7645,20 +7022,19 @@ case $GCC in yes) CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5 -printf %s "checking for -Wextra... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5 +$as_echo_n "checking for -Wextra... " >&6; } ac_save_cc="$CC" CC="$CC -Wextra -Werror" - if test ${ac_cv_extra_warnings+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_extra_warnings+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -7666,22 +7042,21 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_extra_warnings=yes -else $as_nop +else ac_cv_extra_warnings=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5 -printf "%s\n" "$ac_cv_extra_warnings" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5 +$as_echo "$ac_cv_extra_warnings" >&6; } if test $ac_cv_extra_warnings = yes then @@ -7692,21 +7067,20 @@ printf "%s\n" "$ac_cv_extra_warnings" >&6; } # GCC produce warnings for legal Python code. Enable # -fno-strict-aliasing on versions of GCC that support but produce # warnings. See Issue3326 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5 -printf %s "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5 +$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; } ac_save_cc="$CC" CC="$CC -fno-strict-aliasing" save_CFLAGS="$CFLAGS" - if test ${ac_cv_no_strict_aliasing+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_no_strict_aliasing+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -7714,8 +7088,7 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : CC="$ac_save_cc -fstrict-aliasing" CFLAGS="$CFLAGS -Werror -Wstrict-aliasing" @@ -7724,7 +7097,7 @@ then : void f(int **x) {} int -main (void) +main () { double *x; f((int **) &x); ; @@ -7732,30 +7105,29 @@ double *x; f((int **) &x); } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_no_strict_aliasing=no -else $as_nop +else ac_cv_no_strict_aliasing=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else $as_nop +else ac_cv_no_strict_aliasing=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$save_CFLAGS" CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5 -printf "%s\n" "$ac_cv_no_strict_aliasing" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5 +$as_echo "$ac_cv_no_strict_aliasing" >&6; } if test $ac_cv_no_strict_aliasing = yes then BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" @@ -7768,21 +7140,20 @@ printf "%s\n" "$ac_cv_no_strict_aliasing" >&6; } ac_cv_disable_unused_result_warning=no ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5 -printf %s "checking if we can turn off $CC unused result warning... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5 +$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; } ac_save_cc="$CC" CC="$CC -Wunused-result -Werror" save_CFLAGS="$CFLAGS" - if test ${ac_cv_disable_unused_result_warning+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_disable_unused_result_warning+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -7790,23 +7161,22 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_disable_unused_result_warning=yes -else $as_nop +else ac_cv_disable_unused_result_warning=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$save_CFLAGS" CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5 -printf "%s\n" "$ac_cv_disable_unused_result_warning" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5 +$as_echo "$ac_cv_disable_unused_result_warning" >&6; } ;; esac @@ -7816,20 +7186,19 @@ printf "%s\n" "$ac_cv_disable_unused_result_warning" >&6; } CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5 -printf %s "checking if we can turn off $CC unused parameter warning... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5 +$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; } ac_save_cc="$CC" CC="$CC -Wunused-parameter -Werror" - if test ${ac_cv_disable_unused_parameter_warning+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_disable_unused_parameter_warning+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -7837,42 +7206,40 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_disable_unused_parameter_warning=yes -else $as_nop +else ac_cv_disable_unused_parameter_warning=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5 -printf "%s\n" "$ac_cv_disable_unused_parameter_warning" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5 +$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; } if test $ac_cv_disable_unused_parameter_warning = yes then CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5 -printf %s "checking if we can turn off $CC missing field initializers warning... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5 +$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; } ac_save_cc="$CC" CC="$CC -Wmissing-field-initializers -Werror" - if test ${ac_cv_disable_missing_field_initializers+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_disable_missing_field_initializers+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -7880,43 +7247,41 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_disable_missing_field_initializers=yes -else $as_nop +else ac_cv_disable_missing_field_initializers=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5 -printf "%s\n" "$ac_cv_disable_missing_field_initializers" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5 +$as_echo "$ac_cv_disable_missing_field_initializers" >&6; } if test $ac_cv_disable_missing_field_initializers = yes then CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5 -printf %s "checking if we can turn on $CC mixed sign comparison warning... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5 +$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; } ac_save_cc="$CC" CC="$CC -Wsign-compare" save_CFLAGS="$CFLAGS" - if test ${ac_cv_enable_sign_compare_warning+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_enable_sign_compare_warning+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -7924,44 +7289,42 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_enable_sign_compare_warning=yes -else $as_nop +else ac_cv_enable_sign_compare_warning=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$save_CFLAGS" CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5 -printf "%s\n" "$ac_cv_enable_sign_compare_warning" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5 +$as_echo "$ac_cv_enable_sign_compare_warning" >&6; } if test $ac_cv_enable_sign_compare_warning = yes then BASECFLAGS="$BASECFLAGS -Wsign-compare" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5 -printf %s "checking if we can turn on $CC unreachable code warning... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5 +$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; } ac_save_cc="$CC" CC="$CC -Wunreachable-code" save_CFLAGS="$CFLAGS" - if test ${ac_cv_enable_unreachable_code_warning+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_enable_unreachable_code_warning+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -7969,17 +7332,16 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_enable_unreachable_code_warning=yes -else $as_nop +else ac_cv_enable_unreachable_code_warning=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$save_CFLAGS" @@ -8000,23 +7362,22 @@ fi else ac_cv_enable_unreachable_code_warning=no fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5 -printf "%s\n" "$ac_cv_enable_unreachable_code_warning" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5 +$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5 -printf %s "checking if we can turn on $CC strict-prototypes warning... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5 +$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; } ac_save_cc="$CC" CC="$CC -Werror -Wstrict-prototypes" - if test ${ac_cv_enable_enable_strict_prototypes_warning+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -8024,42 +7385,40 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_enable_strict_prototypes_warning=yes -else $as_nop +else ac_cv_enable_strict_prototypes_warning=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5 -printf "%s\n" "$ac_cv_enable_strict_prototypes_warning" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5 +$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; } if test $ac_cv_enable_strict_prototypes_warning = yes then CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5 -printf %s "checking if we can make implicit function declaration an error in $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5 +$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; } ac_save_cc="$CC" CC="$CC -Werror=implicit-function-declaration" - if test ${ac_cv_enable_implicit_function_declaration_error+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_enable_implicit_function_declaration_error+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -8067,42 +7426,40 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_enable_implicit_function_declaration_error=yes -else $as_nop +else ac_cv_enable_implicit_function_declaration_error=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5 -printf "%s\n" "$ac_cv_enable_implicit_function_declaration_error" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5 +$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; } if test $ac_cv_enable_implicit_function_declaration_error = yes then CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5 -printf %s "checking if we can use visibility in $CC... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5 +$as_echo_n "checking if we can use visibility in $CC... " >&6; } ac_save_cc="$CC" CC="$CC -fvisibility=hidden" - if test ${ac_cv_enable_visibility+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_enable_visibility+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -8110,22 +7467,21 @@ main (void) } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_enable_visibility=yes -else $as_nop +else ac_cv_enable_visibility=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$ac_save_cc" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5 -printf "%s\n" "$ac_cv_enable_visibility" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5 +$as_echo "$ac_cv_enable_visibility" >&6; } if test $ac_cv_enable_visibility = yes then @@ -8151,8 +7507,8 @@ printf "%s\n" "$ac_cv_enable_visibility" >&6; } # used to be here, but non-Apple gcc doesn't accept them. if test "${CC}" = gcc then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5 -printf %s "checking which compiler should be used... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5 +$as_echo_n "checking which compiler should be used... " >&6; } case "${UNIVERSALSDK}" in */MacOSX10.4u.sdk) # Build using 10.4 SDK, force usage of gcc when the @@ -8162,8 +7518,8 @@ printf %s "checking which compiler should be used... " >&6; } CPP=cpp-4.0 ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } fi if test "${enable_universalsdk}" @@ -8238,8 +7594,8 @@ printf "%s\n" "$CC" >&6; } # below to pick either 10.3, 10.4, or 10.5 as the target. # 4. If we are running on OS X 10.2 or earlier, good luck! - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5 -printf %s "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5 +$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; } cur_target_major=`sw_vers -productVersion | \ sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` cur_target_minor=`sw_vers -productVersion | \ @@ -8276,33 +7632,32 @@ printf %s "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; } MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET" export MACOSX_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET='' - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5 -printf "%s\n" "$MACOSX_DEPLOYMENT_TARGET" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5 +$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5 -printf %s "checking if specified universal architectures work... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if specified universal architectures work" >&5 +$as_echo_n "checking if specified universal architectures work... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { printf("%d", 42); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5 fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # end of Darwin* tests @@ -8348,16 +7703,14 @@ fi # complain if unaccepted options are passed (e.g. gcc on Mac OS X). # So we have to see first whether pthreads are available without # options before we can check whether -Kpthread improves anything. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5 -printf %s "checking whether pthreads are available without options... " >&6; } -if test ${ac_cv_pthread_is_default+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5 +$as_echo_n "checking whether pthreads are available without options... " >&6; } +if ${ac_cv_pthread_is_default+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_pthread_is_default=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8375,14 +7728,13 @@ int main(){ } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_pthread_is_default=yes ac_cv_kthread=no ac_cv_pthread=no -else $as_nop +else ac_cv_pthread_is_default=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -8392,8 +7744,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5 -printf "%s\n" "$ac_cv_pthread_is_default" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5 +$as_echo "$ac_cv_pthread_is_default" >&6; } if test $ac_cv_pthread_is_default = yes @@ -8405,18 +7757,16 @@ else # Some compilers won't report that they do not support -Kpthread, # so we need to run a program to see whether it really made the # function available. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5 -printf %s "checking whether $CC accepts -Kpthread... " >&6; } -if test ${ac_cv_kpthread+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5 +$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } +if ${ac_cv_kpthread+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_cc="$CC" CC="$CC -Kpthread" -if test "$cross_compiling" = yes -then : +if test "$cross_compiling" = yes; then : ac_cv_kpthread=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8434,10 +7784,9 @@ int main(){ } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_kpthread=yes -else $as_nop +else ac_cv_kpthread=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -8447,8 +7796,8 @@ fi CC="$ac_save_cc" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5 -printf "%s\n" "$ac_cv_kpthread" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5 +$as_echo "$ac_cv_kpthread" >&6; } fi if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no @@ -8458,18 +7807,16 @@ then # Some compilers won't report that they do not support -Kthread, # so we need to run a program to see whether it really made the # function available. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5 -printf %s "checking whether $CC accepts -Kthread... " >&6; } -if test ${ac_cv_kthread+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5 +$as_echo_n "checking whether $CC accepts -Kthread... " >&6; } +if ${ac_cv_kthread+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_cc="$CC" CC="$CC -Kthread" -if test "$cross_compiling" = yes -then : +if test "$cross_compiling" = yes; then : ac_cv_kthread=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8487,10 +7834,9 @@ int main(){ } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_kthread=yes -else $as_nop +else ac_cv_kthread=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -8500,8 +7846,8 @@ fi CC="$ac_save_cc" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5 -printf "%s\n" "$ac_cv_kthread" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5 +$as_echo "$ac_cv_kthread" >&6; } fi if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no @@ -8511,18 +7857,16 @@ then # Some compilers won't report that they do not support -pthread, # so we need to run a program to see whether it really made the # function available. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5 -printf %s "checking whether $CC accepts -pthread... " >&6; } -if test ${ac_cv_pthread+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5 +$as_echo_n "checking whether $CC accepts -pthread... " >&6; } +if ${ac_cv_pthread+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_cc="$CC" CC="$CC -pthread" -if test "$cross_compiling" = yes -then : +if test "$cross_compiling" = yes; then : ac_cv_pthread=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -8540,10 +7884,9 @@ int main(){ } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_pthread=yes -else $as_nop +else ac_cv_pthread=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -8553,8 +7896,8 @@ fi CC="$ac_save_cc" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5 -printf "%s\n" "$ac_cv_pthread" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5 +$as_echo "$ac_cv_pthread" >&6; } fi # If we have set a CC compiler flag for thread support then @@ -8562,8 +7905,8 @@ fi ac_cv_cxx_thread=no if test ! -z "$CXX" then -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5 -printf %s "checking whether $CXX also accepts flags for thread support... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5 +$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; } ac_save_cxx="$CXX" if test "$ac_cv_kpthread" = "yes" @@ -8593,702 +7936,358 @@ then fi rm -fr conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5 -printf "%s\n" "$ac_cv_cxx_thread" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5 +$as_echo "$ac_cv_cxx_thread" >&6; } fi CXX="$ac_save_cxx" # checks for header files -# Autoupdate added the next two lines to ensure that your configure -# script's behavior did not change. They are probably safe to remove. - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -printf %s "checking for egrep... " >&6; } -if test ${ac_cv_path_EGREP+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_prog in egrep - do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - printf %s 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -printf "%s\n" "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - - -ac_fn_c_check_header_compile "$LINENO" "asm/types.h" "ac_cv_header_asm_types_h" "$ac_includes_default" -if test "x$ac_cv_header_asm_types_h" = xyes -then : - printf "%s\n" "#define HAVE_ASM_TYPES_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "crypt.h" "ac_cv_header_crypt_h" "$ac_includes_default" -if test "x$ac_cv_header_crypt_h" = xyes -then : - printf "%s\n" "#define HAVE_CRYPT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "conio.h" "ac_cv_header_conio_h" "$ac_includes_default" -if test "x$ac_cv_header_conio_h" = xyes -then : - printf "%s\n" "#define HAVE_CONIO_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "direct.h" "ac_cv_header_direct_h" "$ac_includes_default" -if test "x$ac_cv_header_direct_h" = xyes -then : - printf "%s\n" "#define HAVE_DIRECT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" -if test "x$ac_cv_header_dlfcn_h" = xyes -then : - printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include -fi -ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" -if test "x$ac_cv_header_errno_h" = xyes -then : - printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no fi -ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" -if test "x$ac_cv_header_fcntl_h" = xyes -then : - printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default" -if test "x$ac_cv_header_grp_h" = xyes -then : - printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -fi -ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default" -if test "x$ac_cv_header_ieeefp_h" = xyes -then : - printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no fi -ac_fn_c_check_header_compile "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default" -if test "x$ac_cv_header_io_h" = xyes -then : - printf "%s\n" "#define HAVE_IO_H 1" >>confdefs.h +rm -f conftest* fi -ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" -if test "x$ac_cv_header_langinfo_h" = xyes -then : - printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" -if test "x$ac_cv_header_libintl_h" = xyes -then : - printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include -fi -ac_fn_c_check_header_compile "$LINENO" "process.h" "ac_cv_header_process_h" "$ac_includes_default" -if test "x$ac_cv_header_process_h" = xyes -then : - printf "%s\n" "#define HAVE_PROCESS_H 1" >>confdefs.h +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : +else + ac_cv_header_stdc=no fi -ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h +rm -f conftest* fi -ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default" -if test "x$ac_cv_header_sched_h" = xyes -then : - printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "shadow.h" "ac_cv_header_shadow_h" "$ac_includes_default" -if test "x$ac_cv_header_shadow_h" = xyes -then : - printf "%s\n" "#define HAVE_SHADOW_H 1" >>confdefs.h +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif -fi -ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" -if test "x$ac_cv_header_signal_h" = xyes -then : - printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : +else + ac_cv_header_stdc=no fi -ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default" -if test "x$ac_cv_header_stropts_h" = xyes -then : - printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" -if test "x$ac_cv_header_termios_h" = xyes -then : - printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h fi -ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default" -if test "x$ac_cv_header_utime_h" = xyes -then : - printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h - fi -ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default" -if test "x$ac_cv_header_poll_h" = xyes -then : - printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then -fi -ac_fn_c_check_header_compile "$LINENO" "sys/devpoll.h" "ac_cv_header_sys_devpoll_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_devpoll_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -ac_fn_c_check_header_compile "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_epoll_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_poll_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h +for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \ +fcntl.h grp.h \ +ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \ +sched.h shadow.h signal.h stropts.h termios.h \ +utime.h \ +poll.h sys/devpoll.h sys/epoll.h sys/poll.h \ +sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \ +sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \ +sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \ +sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \ +sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \ +libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ +linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \ +sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h \ +sys/mman.h sys/eventfd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_audioio_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_AUDIOIO_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_xattr_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_XATTR_H 1" >>confdefs.h +done -fi -ac_fn_c_check_header_compile "$LINENO" "sys/bsdtty.h" "ac_cv_header_sys_bsdtty_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_bsdtty_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_BSDTTY_H 1" >>confdefs.h +ac_header_dirent=no +for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 +$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +if eval \${$as_ac_Header+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include <$ac_hdr> +int +main () +{ +if ((DIR *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" +else + eval "$as_ac_Header=no" fi -ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_event_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_EVENT_H 1" >>confdefs.h - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_file_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h +eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 +_ACEOF +ac_header_dirent=$ac_hdr; break fi -ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_ioctl_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "sys/kern_control.h" "ac_cv_header_sys_kern_control_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_kern_control_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_KERN_CONTROL_H 1" >>confdefs.h +done +# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. +if test $ac_header_dirent = dirent.h; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (); +int +main () +{ +return opendir (); + ; + return 0; +} +_ACEOF +for ac_lib in '' dir; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res fi -ac_fn_c_check_header_compile "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_loadavg_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_LOADAVG_H 1" >>confdefs.h - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_opendir+:} false; then : + break fi -ac_fn_c_check_header_compile "$LINENO" "sys/lock.h" "ac_cv_header_sys_lock_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_lock_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_LOCK_H 1" >>confdefs.h +done +if ${ac_cv_search_opendir+:} false; then : +else + ac_cv_search_opendir=no fi -ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mkdev_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_MKDEV_H 1" >>confdefs.h - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -ac_fn_c_check_header_compile "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_modem_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_MODEM_H 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } +ac_res=$ac_cv_search_opendir +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_param_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_random_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_select_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/sendfile.h" "ac_cv_header_sys_sendfile_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sendfile_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SENDFILE_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_socket_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_statvfs_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_stat_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/syscall.h" "ac_cv_header_sys_syscall_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_syscall_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SYSCALL_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/sys_domain.h" "ac_cv_header_sys_sys_domain_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sys_domain_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SYS_DOMAIN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/termio.h" "ac_cv_header_sys_termio_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_termio_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TERMIO_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_time_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_times_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_types_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_uio_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_un_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_utsname_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_wait_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default" -if test "x$ac_cv_header_pty_h" = xyes -then : - printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default" -if test "x$ac_cv_header_libutil_h" = xyes -then : - printf "%s\n" "#define HAVE_LIBUTIL_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_resource_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default" -if test "x$ac_cv_header_netpacket_packet_h" = xyes -then : - printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default" -if test "x$ac_cv_header_sysexits_h" = xyes -then : - printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "bluetooth.h" "ac_cv_header_bluetooth_h" "$ac_includes_default" -if test "x$ac_cv_header_bluetooth_h" = xyes -then : - printf "%s\n" "#define HAVE_BLUETOOTH_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "linux/tipc.h" "ac_cv_header_linux_tipc_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_tipc_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_TIPC_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "linux/random.h" "ac_cv_header_linux_random_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_random_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_RANDOM_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default" -if test "x$ac_cv_header_spawn_h" = xyes -then : - printf "%s\n" "#define HAVE_SPAWN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default" -if test "x$ac_cv_header_util_h" = xyes -then : - printf "%s\n" "#define HAVE_UTIL_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default" -if test "x$ac_cv_header_alloca_h" = xyes -then : - printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" -if test "x$ac_cv_header_endian_h" = xyes -then : - printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_endian_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysmacros_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "linux/memfd.h" "ac_cv_header_linux_memfd_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_memfd_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_MEMFD_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "linux/wait.h" "ac_cv_header_linux_wait_h" "$ac_includes_default" -if test "x$ac_cv_header_linux_wait_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_WAIT_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/memfd.h" "ac_cv_header_sys_memfd_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_memfd_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_MEMFD_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mman_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/eventfd.h" "ac_cv_header_sys_eventfd_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_eventfd_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_EVENTFD_H 1" >>confdefs.h - -fi - -ac_header_dirent=no -for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 -printf %s "checking for $ac_hdr that defines DIR... " >&6; } -if eval test \${$as_ac_Header+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include <$ac_hdr> - -int -main (void) -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$as_ac_Header=yes" -else $as_nop - eval "$as_ac_Header=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$as_ac_Header - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Header"\" = x"yes" -then : - cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 -_ACEOF - -ac_header_dirent=$ac_hdr; break -fi - -done -# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. -if test $ac_header_dirent = dirent.h; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -printf %s "checking for library containing opendir... " >&6; } -if test ${ac_cv_search_opendir+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 +$as_echo_n "checking for library containing opendir... " >&6; } +if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char opendir (); int -main (void) +main () { return opendir (); ; return 0; } _ACEOF -for ac_lib in '' dir -do +for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_opendir+y} -then : + if ${ac_cv_search_opendir+:} false; then : break fi done -if test ${ac_cv_search_opendir+y} -then : +if ${ac_cv_search_opendir+:} false; then : -else $as_nop +else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -printf "%s\n" "$ac_cv_search_opendir" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 +$as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 +$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } +if ${ac_cv_header_sys_types_h_makedev+:} false; then : + $as_echo_n "(cached) " >&6 else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 -printf %s "checking for library containing opendir... " >&6; } -if test ${ac_cv_search_opendir+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); +#include int -main (void) +main () { -return opendir (); +return makedev(0, 0); ; return 0; } _ACEOF -for ac_lib in '' x -do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO" -then : - ac_cv_search_opendir=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext - if test ${ac_cv_search_opendir+y} -then : - break -fi -done -if test ${ac_cv_search_opendir+y} -then : - -else $as_nop - ac_cv_search_opendir=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_header_sys_types_h_makedev=yes +else + ac_cv_header_sys_types_h_makedev=no fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 -printf "%s\n" "$ac_cv_search_opendir" >&6; } -ac_res=$ac_cv_search_opendir -if test "$ac_res" != no -then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 +$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } -fi +if test $ac_cv_header_sys_types_h_makedev = no; then +ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : +$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h -ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mkdev_h" = xyes -then : +fi -printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h -fi -if test $ac_cv_header_sys_mkdev_h = no; then - ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_sysmacros_h" = xyes -then : + if test $ac_cv_header_sys_mkdev_h = no; then + ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : -printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h +$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h fi + + fi fi @@ -9296,17 +8295,24 @@ fi # http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 SAVE_CFLAGS=$CFLAGS CFLAGS="-std=c99 $CFLAGS" -ac_fn_c_check_header_compile "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" -if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes -then : - printf "%s\n" "#define HAVE_BLUETOOTH_BLUETOOTH_H 1" >>confdefs.h +for ac_header in bluetooth/bluetooth.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" +if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BLUETOOTH_BLUETOOTH_H 1 +_ACEOF fi +done + CFLAGS=$SAVE_CFLAGS # On Darwin (OS X) net/if.h requires sys/socket.h to be imported first. -ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include +for ac_header in net/if.h +do : + ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include #ifdef STDC_HEADERS # include # include @@ -9320,15 +8326,20 @@ ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#incl #endif " -if test "x$ac_cv_header_net_if_h" = xyes -then : - printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h +if test "x$ac_cv_header_net_if_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NET_IF_H 1 +_ACEOF fi +done + # On Linux, netlink.h requires asm/types.h -ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" " +for ac_header in linux/netlink.h +do : + ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" " #ifdef HAVE_ASM_TYPES_H #include #endif @@ -9337,15 +8348,20 @@ ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_net #endif " -if test "x$ac_cv_header_linux_netlink_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_NETLINK_H 1" >>confdefs.h +if test "x$ac_cv_header_linux_netlink_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_NETLINK_H 1 +_ACEOF fi +done + # On Linux, qrtr.h requires asm/types.h -ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" " +for ac_header in linux/qrtr.h +do : + ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" " #ifdef HAVE_ASM_TYPES_H #include #endif @@ -9354,101 +8370,80 @@ ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h #endif " -if test "x$ac_cv_header_linux_qrtr_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_QRTR_H 1" >>confdefs.h +if test "x$ac_cv_header_linux_qrtr_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_QRTR_H 1 +_ACEOF fi - -ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" " -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -" -if test "x$ac_cv_header_linux_vm_sockets_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_VM_SOCKETS_H 1" >>confdefs.h - -fi +done -# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h -ac_fn_c_check_header_compile "$LINENO" "linux/can.h" "ac_cv_header_linux_can_h" " +for ac_header in linux/vm_sockets.h +do : + ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" " #ifdef HAVE_SYS_SOCKET_H #include #endif " -if test "x$ac_cv_header_linux_can_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_CAN_H 1" >>confdefs.h +if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINUX_VM_SOCKETS_H 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "linux/can/bcm.h" "ac_cv_header_linux_can_bcm_h" " -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -" -if test "x$ac_cv_header_linux_can_bcm_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_CAN_BCM_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "linux/can/j1939.h" "ac_cv_header_linux_can_j1939_h" " -#ifdef HAVE_SYS_SOCKET_H -#include -#endif +done -" -if test "x$ac_cv_header_linux_can_j1939_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_CAN_J1939_H 1" >>confdefs.h -fi -ac_fn_c_check_header_compile "$LINENO" "linux/can/raw.h" "ac_cv_header_linux_can_raw_h" " +# On Linux, can.h, can/bcm.h, can/j1939.h, can/raw.h require sys/socket.h +for ac_header in linux/can.h linux/can/bcm.h linux/can/j1939.h linux/can/raw.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " #ifdef HAVE_SYS_SOCKET_H #include #endif " -if test "x$ac_cv_header_linux_can_raw_h" = xyes -then : - printf "%s\n" "#define HAVE_LINUX_CAN_RAW_H 1" >>confdefs.h +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi +done + # checks for typedefs was_it_defined=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5 -printf %s "checking for clock_t in time.h... " >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5 +$as_echo_n "checking for clock_t in time.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "clock_t" >/dev/null 2>&1 -then : + $EGREP "clock_t" >/dev/null 2>&1; then : was_it_defined=yes -else $as_nop +else -printf "%s\n" "#define clock_t long" >>confdefs.h +$as_echo "#define clock_t long" >>confdefs.h fi -rm -rf conftest* +rm -f conftest* -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5 -printf "%s\n" "$was_it_defined" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5 +$as_echo "$was_it_defined" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5 -printf %s "checking for makedev... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5 +$as_echo_n "checking for makedev... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9461,7 +8456,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main (void) +main () { makedev(0, 0) @@ -9470,25 +8465,24 @@ main (void) } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_has_makedev=yes -else $as_nop +else ac_cv_has_makedev=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5 -printf "%s\n" "$ac_cv_has_makedev" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5 +$as_echo "$ac_cv_has_makedev" >&6; } if test "$ac_cv_has_makedev" = "yes"; then -printf "%s\n" "#define HAVE_MAKEDEV 1" >>confdefs.h +$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h fi # byte swapping -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5 -printf %s "checking for le64toh... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5 +$as_echo_n "checking for le64toh... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9499,7 +8493,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main (void) +main () { le64toh(1) @@ -9508,19 +8502,18 @@ main (void) } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_has_le64toh=yes -else $as_nop +else ac_cv_has_le64toh=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5 -printf "%s\n" "$ac_cv_has_le64toh" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5 +$as_echo "$ac_cv_has_le64toh" >&6; } if test "$ac_cv_has_le64toh" = "yes"; then -printf "%s\n" "#define HAVE_HTOLE64 1" >>confdefs.h +$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h fi @@ -9536,15 +8529,15 @@ if test "$use_lfs" = "yes"; then case $ac_sys_system/$ac_sys_release in AIX*) -printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h +$as_echo "#define _LARGE_FILES 1" >>confdefs.h ;; esac -printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h +$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h -printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h +$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h fi @@ -9557,121 +8550,96 @@ EOF # Type availability checks ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = xyes -then : +if test "x$ac_cv_type_mode_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define mode_t int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" -if test "x$ac_cv_type_off_t" = xyes -then : +if test "x$ac_cv_type_off_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define off_t long int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF fi +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : - ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default -" -if test "x$ac_cv_type_pid_t" = xyes -then : - -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #if defined _WIN64 && !defined __CYGWIN__ - LLP64 - #endif - -int -main (void) -{ - - ; - return 0; -} +else +cat >>confdefs.h <<_ACEOF +#define pid_t int _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - ac_pid_type='int' -else $as_nop - ac_pid_type='__int64' -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h - fi - -printf "%s\n" "#define RETSIGTYPE void" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE void +_ACEOF ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes -then : +if test "x$ac_cv_type_size_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define size_t unsigned int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -printf %s "checking for uid_t in sys/types.h... " >&6; } -if test ${ac_cv_type_uid_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 +$as_echo_n "checking for uid_t in sys/types.h... " >&6; } +if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1 -then : + $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes -else $as_nop +else ac_cv_type_uid_t=no fi -rm -rf conftest* +rm -f conftest* fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -printf "%s\n" "$ac_cv_type_uid_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 +$as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then -printf "%s\n" "#define uid_t int" >>confdefs.h +$as_echo "#define uid_t int" >>confdefs.h -printf "%s\n" "#define gid_t int" >>confdefs.h +$as_echo "#define gid_t int" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" -if test "x$ac_cv_type_ssize_t" = xyes -then : +if test "x$ac_cv_type_ssize_t" = xyes; then : -printf "%s\n" "#define HAVE_SSIZE_T 1" >>confdefs.h +$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default" -if test "x$ac_cv_type___uint128_t" = xyes -then : +if test "x$ac_cv_type___uint128_t" = xyes; then : -printf "%s\n" "#define HAVE_GCC_UINT128_T 1" >>confdefs.h +$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h fi @@ -9682,19 +8650,17 @@ fi # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 -printf %s "checking size of int... " >&6; } -if test ${ac_cv_sizeof_int+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 +$as_echo_n "checking size of int... " >&6; } +if ${ac_cv_sizeof_int+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : + +else if test "$ac_cv_type_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else @@ -9703,31 +8669,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 -printf "%s\n" "$ac_cv_sizeof_int" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 +$as_echo "$ac_cv_sizeof_int" >&6; } -printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_INT $ac_cv_sizeof_int +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 -printf %s "checking size of long... " >&6; } -if test ${ac_cv_sizeof_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 +$as_echo_n "checking size of long... " >&6; } +if ${ac_cv_sizeof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : + +else if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else @@ -9736,30 +8702,33 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 -printf "%s\n" "$ac_cv_sizeof_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 +$as_echo "$ac_cv_sizeof_long" >&6; } -printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF # The cast to long int works around a bug in the HP C Compiler, # see AC_CHECK_SIZEOF for more information. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5 -printf %s "checking alignment of long... " >&6; } -if test ${ac_cv_alignof_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5 +$as_echo_n "checking alignment of long... " >&6; } +if ${ac_cv_alignof_long+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default -typedef struct { char x; long y; } ac__type_alignof_;" -then : +#ifndef offsetof +# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) +#endif +typedef struct { char x; long y; } ac__type_alignof_;"; then : -else $as_nop +else if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of long See \`config.log' for more details" "$LINENO" 5; } else @@ -9768,31 +8737,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5 -printf "%s\n" "$ac_cv_alignof_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5 +$as_echo "$ac_cv_alignof_long" >&6; } -printf "%s\n" "#define ALIGNOF_LONG $ac_cv_alignof_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ALIGNOF_LONG $ac_cv_alignof_long +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 -printf %s "checking size of long long... " >&6; } -if test ${ac_cv_sizeof_long_long+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 +$as_echo_n "checking size of long long... " >&6; } +if ${ac_cv_sizeof_long_long+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : + +else if test "$ac_cv_type_long_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else @@ -9801,31 +8770,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 -printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 +$as_echo "$ac_cv_sizeof_long_long" >&6; } -printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 -printf %s "checking size of void *... " >&6; } -if test ${ac_cv_sizeof_void_p+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if ${ac_cv_sizeof_void_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + +else if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else @@ -9834,31 +8803,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 -printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } -printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 -printf %s "checking size of short... " >&6; } -if test ${ac_cv_sizeof_short+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 +$as_echo_n "checking size of short... " >&6; } +if ${ac_cv_sizeof_short+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : + +else if test "$ac_cv_type_short" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else @@ -9867,31 +8836,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 -printf "%s\n" "$ac_cv_sizeof_short" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 +$as_echo "$ac_cv_sizeof_short" >&6; } -printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SHORT $ac_cv_sizeof_short +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 -printf %s "checking size of float... " >&6; } -if test ${ac_cv_sizeof_float+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 +$as_echo_n "checking size of float... " >&6; } +if ${ac_cv_sizeof_float+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : + +else if test "$ac_cv_type_float" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (float) See \`config.log' for more details" "$LINENO" 5; } else @@ -9900,31 +8869,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 -printf "%s\n" "$ac_cv_sizeof_float" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 +$as_echo "$ac_cv_sizeof_float" >&6; } -printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FLOAT $ac_cv_sizeof_float +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 -printf %s "checking size of double... " >&6; } -if test ${ac_cv_sizeof_double+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 +$as_echo_n "checking size of double... " >&6; } +if ${ac_cv_sizeof_double+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : + +else if test "$ac_cv_type_double" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (double) See \`config.log' for more details" "$LINENO" 5; } else @@ -9933,31 +8902,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 -printf "%s\n" "$ac_cv_sizeof_double" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 +$as_echo "$ac_cv_sizeof_double" >&6; } -printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_DOUBLE $ac_cv_sizeof_double +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5 -printf %s "checking size of fpos_t... " >&6; } -if test ${ac_cv_sizeof_fpos_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5 +$as_echo_n "checking size of fpos_t... " >&6; } +if ${ac_cv_sizeof_fpos_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then : + +else if test "$ac_cv_type_fpos_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (fpos_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -9966,31 +8935,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5 -printf "%s\n" "$ac_cv_sizeof_fpos_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5 +$as_echo "$ac_cv_sizeof_fpos_t" >&6; } -printf "%s\n" "#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 -printf %s "checking size of size_t... " >&6; } -if test ${ac_cv_sizeof_size_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 +$as_echo_n "checking size of size_t... " >&6; } +if ${ac_cv_sizeof_size_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : + +else if test "$ac_cv_type_size_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -9999,30 +8968,33 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 -printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 +$as_echo "$ac_cv_sizeof_size_t" >&6; } -printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t +_ACEOF # The cast to long int works around a bug in the HP C Compiler, # see AC_CHECK_SIZEOF for more information. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5 -printf %s "checking alignment of size_t... " >&6; } -if test ${ac_cv_alignof_size_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of size_t" >&5 +$as_echo_n "checking alignment of size_t... " >&6; } +if ${ac_cv_alignof_size_t+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default -typedef struct { char x; size_t y; } ac__type_alignof_;" -then : +#ifndef offsetof +# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) +#endif +typedef struct { char x; size_t y; } ac__type_alignof_;"; then : -else $as_nop +else if test "$ac_cv_type_size_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of size_t See \`config.log' for more details" "$LINENO" 5; } else @@ -10031,31 +9003,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5 -printf "%s\n" "$ac_cv_alignof_size_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5 +$as_echo "$ac_cv_alignof_size_t" >&6; } -printf "%s\n" "#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5 -printf %s "checking size of pid_t... " >&6; } -if test ${ac_cv_sizeof_pid_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5 +$as_echo_n "checking size of pid_t... " >&6; } +if ${ac_cv_sizeof_pid_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then : + +else if test "$ac_cv_type_pid_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (pid_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -10064,31 +9036,31 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5 -printf "%s\n" "$ac_cv_sizeof_pid_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5 +$as_echo "$ac_cv_sizeof_pid_t" >&6; } -printf "%s\n" "#define SIZEOF_PID_T $ac_cv_sizeof_pid_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_PID_T $ac_cv_sizeof_pid_t +_ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5 -printf %s "checking size of uintptr_t... " >&6; } -if test ${ac_cv_sizeof_uintptr_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5 +$as_echo_n "checking size of uintptr_t... " >&6; } +if ${ac_cv_sizeof_uintptr_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then : + +else if test "$ac_cv_type_uintptr_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (uintptr_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -10097,22 +9069,23 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5 -printf "%s\n" "$ac_cv_sizeof_uintptr_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5 +$as_echo "$ac_cv_sizeof_uintptr_t" >&6; } -printf "%s\n" "#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 -printf %s "checking for long double... " >&6; } -if test ${ac_cv_type_long_double+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 +$as_echo_n "checking for long double... " >&6; } +if ${ac_cv_type_long_double+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "$GCC" = yes; then ac_cv_type_long_double=yes else @@ -10122,7 +9095,7 @@ else $as_nop not support it. */ long double foo = 0.0L; int -main (void) +main () { static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */ sizeof (double) <= sizeof (long double))]; @@ -10133,20 +9106,19 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_long_double=yes -else $as_nop +else ac_cv_type_long_double=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5 -printf "%s\n" "$ac_cv_type_long_double" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5 +$as_echo "$ac_cv_type_long_double" >&6; } if test $ac_cv_type_long_double = yes; then -printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h +$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h fi @@ -10154,19 +9126,17 @@ printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 -printf %s "checking size of long double... " >&6; } -if test ${ac_cv_sizeof_long_double+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 +$as_echo_n "checking size of long double... " >&6; } +if ${ac_cv_sizeof_long_double+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : + +else if test "$ac_cv_type_long_double" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long double) See \`config.log' for more details" "$LINENO" 5; } else @@ -10175,12 +9145,14 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 -printf "%s\n" "$ac_cv_sizeof_long_double" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 +$as_echo "$ac_cv_sizeof_long_double" >&6; } -printf "%s\n" "#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double +_ACEOF @@ -10188,19 +9160,17 @@ printf "%s\n" "#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double" >>confdefs. # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5 -printf %s "checking size of _Bool... " >&6; } -if test ${ac_cv_sizeof__Bool+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default" -then : - -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5 +$as_echo_n "checking size of _Bool... " >&6; } +if ${ac_cv_sizeof__Bool+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then : + +else if test "$ac_cv_type__Bool" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (_Bool) See \`config.log' for more details" "$LINENO" 5; } else @@ -10209,12 +9179,14 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5 -printf "%s\n" "$ac_cv_sizeof__Bool" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5 +$as_echo "$ac_cv_sizeof__Bool" >&6; } -printf "%s\n" "#define SIZEOF__BOOL $ac_cv_sizeof__Bool" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF__BOOL $ac_cv_sizeof__Bool +_ACEOF @@ -10222,24 +9194,22 @@ printf "%s\n" "#define SIZEOF__BOOL $ac_cv_sizeof__Bool" >>confdefs.h # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 -printf %s "checking size of off_t... " >&6; } -if test ${ac_cv_sizeof_off_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 +$as_echo_n "checking size of off_t... " >&6; } +if ${ac_cv_sizeof_off_t+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" " #ifdef HAVE_SYS_TYPES_H #include #endif -" -then : +"; then : -else $as_nop +else if test "$ac_cv_type_off_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -10248,39 +9218,40 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 -printf "%s\n" "$ac_cv_sizeof_off_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 +$as_echo "$ac_cv_sizeof_off_t" >&6; } -printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_OFF_T $ac_cv_sizeof_off_t +_ACEOF -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5 -printf %s "checking whether to enable large file support... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5 +$as_echo_n "checking whether to enable large file support... " >&6; } if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then -printf "%s\n" "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h +$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 -printf %s "checking size of time_t... " >&6; } -if test ${ac_cv_sizeof_time_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 +$as_echo_n "checking size of time_t... " >&6; } +if ${ac_cv_sizeof_time_t+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" " #ifdef HAVE_SYS_TYPES_H #include @@ -10289,13 +9260,12 @@ else $as_nop #include #endif -" -then : +"; then : -else $as_nop +else if test "$ac_cv_type_time_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (time_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -10304,12 +9274,14 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 -printf "%s\n" "$ac_cv_sizeof_time_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 +$as_echo "$ac_cv_sizeof_time_t" >&6; } -printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_TIME_T $ac_cv_sizeof_time_t +_ACEOF @@ -10323,15 +9295,15 @@ elif test "$ac_cv_pthread" = "yes" then CC="$CC -pthread" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5 -printf %s "checking for pthread_t... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5 +$as_echo_n "checking for pthread_t... " >&6; } have_pthread_t=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { pthread_t x; x = *(pthread_t*)0; ; @@ -10339,36 +9311,33 @@ pthread_t x; x = *(pthread_t*)0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : have_pthread_t=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5 -printf "%s\n" "$have_pthread_t" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5 +$as_echo "$have_pthread_t" >&6; } if test "$have_pthread_t" = yes ; then # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5 -printf %s "checking size of pthread_t... " >&6; } -if test ${ac_cv_sizeof_pthread_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5 +$as_echo_n "checking size of pthread_t... " >&6; } +if ${ac_cv_sizeof_pthread_t+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" " #ifdef HAVE_PTHREAD_H #include #endif -" -then : +"; then : -else $as_nop +else if test "$ac_cv_type_pthread_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (pthread_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -10377,12 +9346,14 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5 -printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5 +$as_echo "$ac_cv_sizeof_pthread_t" >&6; } -printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t +_ACEOF fi @@ -10393,20 +9364,18 @@ fi # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5 -printf %s "checking size of pthread_key_t... " >&6; } -if test ${ac_cv_sizeof_pthread_key_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5 +$as_echo_n "checking size of pthread_key_t... " >&6; } +if ${ac_cv_sizeof_pthread_key_t+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include -" -then : +"; then : -else $as_nop +else if test "$ac_cv_type_pthread_key_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (pthread_key_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -10415,46 +9384,47 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5 -printf "%s\n" "$ac_cv_sizeof_pthread_key_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5 +$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; } -printf "%s\n" "#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t +_ACEOF -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5 -printf %s "checking whether pthread_key_t is compatible with int... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5 +$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; } if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { pthread_key_t k; k * 1; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_pthread_key_t_is_arithmetic_type=yes -else $as_nop +else ac_pthread_key_t_is_arithmetic_type=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5 -printf "%s\n" "$ac_pthread_key_t_is_arithmetic_type" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5 +$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; } if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then -printf "%s\n" "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h +$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi CC="$ac_save_cc" @@ -10488,10 +9458,9 @@ case $ac_sys_system/$ac_sys_release in else LIBTOOL_CRUFT="" fi - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : ac_osx_32bit=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10506,10 +9475,9 @@ else $as_nop } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_osx_32bit=yes -else $as_nop +else ac_osx_32bit=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -10551,40 +9519,40 @@ fi LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5 -printf %s "checking for --enable-framework... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5 +$as_echo_n "checking for --enable-framework... " >&6; } if test "$enable_framework" then BASECFLAGS="$BASECFLAGS -fno-common -dynamic" # -F. is needed to allow linking to the framework while # in the build location. -printf "%s\n" "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h +$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } if test $enable_shared = "yes" then as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5 fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5 -printf %s "checking for dyld... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5 +$as_echo_n "checking for dyld... " >&6; } case $ac_sys_system/$ac_sys_release in Darwin/*) -printf "%s\n" "#define WITH_DYLD 1" >>confdefs.h +$as_echo "#define WITH_DYLD 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5 -printf "%s\n" "always on for Darwin" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5 +$as_echo "always on for Darwin" >&6; } ;; *) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ;; esac @@ -10598,8 +9566,8 @@ esac # SHLIB_SUFFIX is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5 -printf %s "checking the extension of shared libraries... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5 +$as_echo_n "checking the extension of shared libraries... " >&6; } if test -z "$SHLIB_SUFFIX"; then case $ac_sys_system in hp*|HP*) @@ -10612,15 +9580,15 @@ if test -z "$SHLIB_SUFFIX"; then *) SHLIB_SUFFIX=.so;; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5 -printf "%s\n" "$SHLIB_SUFFIX" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5 +$as_echo "$SHLIB_SUFFIX" >&6; } # LDSHARED is the ld *command* used to create shared library # -- "cc -G" on SunOS 5.x. # (Shared libraries in this instance are shared modules to be loaded into # Python, as opposed to building Python itself as a shared library.) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5 -printf %s "checking LDSHARED... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5 +$as_echo_n "checking LDSHARED... " >&6; } if test -z "$LDSHARED" then case $ac_sys_system/$ac_sys_release in @@ -10750,14 +9718,14 @@ then *) LDSHARED="ld";; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5 -printf "%s\n" "$LDSHARED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5 +$as_echo "$LDSHARED" >&6; } LDCXXSHARED=${LDCXXSHARED-$LDSHARED} BLDSHARED=${BLDSHARED-$LDSHARED} # CCSHARED are the C *flags* used to create objects to go into a shared # library (module) -- this is only needed for a few systems -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5 -printf %s "checking CCSHARED... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5 +$as_echo_n "checking CCSHARED... " >&6; } if test -z "$CCSHARED" then case $ac_sys_system/$ac_sys_release in @@ -10788,12 +9756,12 @@ then CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic" esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5 -printf "%s\n" "$CCSHARED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5 +$as_echo "$CCSHARED" >&6; } # LINKFORSHARED are the flags passed to the $(CC) command that links # the python executable -- this is only needed for a few systems -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5 -printf %s "checking LINKFORSHARED... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5 +$as_echo_n "checking LINKFORSHARED... " >&6; } if test -z "$LINKFORSHARED" then case $ac_sys_system/$ac_sys_release in @@ -10850,13 +9818,13 @@ then LINKFORSHARED='-Wl,-export-dynamic';; esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5 -printf "%s\n" "$LINKFORSHARED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5 +$as_echo "$LINKFORSHARED" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5 -printf %s "checking CFLAGSFORSHARED... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5 +$as_echo_n "checking CFLAGSFORSHARED... " >&6; } if test ! "$LIBRARY" = "$LDLIBRARY" then case $ac_sys_system in @@ -10868,8 +9836,8 @@ then CFLAGSFORSHARED='$(CCSHARED)' esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5 -printf "%s\n" "$CFLAGSFORSHARED" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5 +$as_echo "$CFLAGSFORSHARED" >&6; } # SHLIBS are libraries (except -lc and -lm) to link to the python shared # library (with --enable-shared). @@ -10880,23 +9848,22 @@ printf "%s\n" "$CFLAGSFORSHARED" >&6; } # don't need to link LIBS explicitly. The default should be only changed # on systems where this approach causes problems. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5 -printf %s "checking SHLIBS... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5 +$as_echo_n "checking SHLIBS... " >&6; } case "$ac_sys_system" in *) SHLIBS='$(LIBS)';; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5 -printf "%s\n" "$SHLIBS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5 +$as_echo "$SHLIBS" >&6; } # checks for libraries -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5 -printf %s "checking for sendfile in -lsendfile... " >&6; } -if test ${ac_cv_lib_sendfile_sendfile+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5 +$as_echo_n "checking for sendfile in -lsendfile... " >&6; } +if ${ac_cv_lib_sendfile_sendfile+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsendfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10905,41 +9872,43 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char sendfile (); int -main (void) +main () { return sendfile (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sendfile_sendfile=yes -else $as_nop +else ac_cv_lib_sendfile_sendfile=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5 -printf "%s\n" "$ac_cv_lib_sendfile_sendfile" >&6; } -if test "x$ac_cv_lib_sendfile_sendfile" = xyes -then : - printf "%s\n" "#define HAVE_LIBSENDFILE 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5 +$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; } +if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSENDFILE 1 +_ACEOF LIBS="-lsendfile $LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -printf %s "checking for dlopen in -ldl... " >&6; } -if test ${ac_cv_lib_dl_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10948,41 +9917,43 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char dlopen (); int -main (void) +main () { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes -else $as_nop +else ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes -then : - printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF LIBS="-ldl $LIBS" fi # Dynamic linking for SunOS/Solaris and SYSV -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -printf %s "checking for shl_load in -ldld... " >&6; } -if test ${ac_cv_lib_dld_shl_load+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10991,30 +9962,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shl_load (); int -main (void) +main () { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes -else $as_nop +else ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes -then : - printf "%s\n" "#define HAVE_LIBDLD 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDLD 1 +_ACEOF LIBS="-ldld $LIBS" @@ -11022,27 +9996,27 @@ fi # Dynamic linking for HP-UX # checks for uuid.h location -ac_fn_c_check_header_compile "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default" -if test "x$ac_cv_header_uuid_uuid_h" = xyes -then : - printf "%s\n" "#define HAVE_UUID_UUID_H 1" >>confdefs.h +for ac_header in uuid/uuid.h uuid.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default" -if test "x$ac_cv_header_uuid_h" = xyes -then : - printf "%s\n" "#define HAVE_UUID_H 1" >>confdefs.h -fi +done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5 -printf %s "checking for uuid_generate_time_safe... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5 +$as_echo_n "checking for uuid_generate_time_safe... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef uuid_generate_time_safe @@ -11053,29 +10027,28 @@ void *x = uuid_generate_time_safe return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h +$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007) # FreeBSD and OpenBSD provides support as well -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5 -printf %s "checking for uuid_create... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5 +$as_echo_n "checking for uuid_create... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef uuid_create @@ -11086,29 +10059,28 @@ void *x = uuid_create return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_UUID_CREATE 1" >>confdefs.h +$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet # stream in big-endian byte-order -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5 -printf %s "checking for uuid_enc_be... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5 +$as_echo_n "checking for uuid_enc_be... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef uuid_enc_be @@ -11119,29 +10091,27 @@ void *x = uuid_enc_be return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_UUID_ENC_BE 1" >>confdefs.h +$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # 'Real Time' functions on Solaris # posix4 on Solaris 2.6 # pthread (first!) on Linux -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5 -printf %s "checking for library containing sem_init... " >&6; } -if test ${ac_cv_search_sem_init+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5 +$as_echo_n "checking for library containing sem_init... " >&6; } +if ${ac_cv_search_sem_init+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11149,60 +10119,57 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char sem_init (); int -main (void) +main () { return sem_init (); ; return 0; } _ACEOF -for ac_lib in '' pthread rt posix4 -do +for ac_lib in '' pthread rt posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sem_init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_sem_init+y} -then : + if ${ac_cv_search_sem_init+:} false; then : break fi done -if test ${ac_cv_search_sem_init+y} -then : +if ${ac_cv_search_sem_init+:} false; then : -else $as_nop +else ac_cv_search_sem_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5 -printf "%s\n" "$ac_cv_search_sem_init" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5 +$as_echo "$ac_cv_search_sem_init" >&6; } ac_res=$ac_cv_search_sem_init -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # check if we need libintl for locale functions -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5 -printf %s "checking for textdomain in -lintl... " >&6; } -if test ${ac_cv_lib_intl_textdomain+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5 +$as_echo_n "checking for textdomain in -lintl... " >&6; } +if ${ac_cv_lib_intl_textdomain+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11211,31 +10178,32 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char textdomain (); int -main (void) +main () { return textdomain (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_textdomain=yes -else $as_nop +else ac_cv_lib_intl_textdomain=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5 -printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; } -if test "x$ac_cv_lib_intl_textdomain" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5 +$as_echo "$ac_cv_lib_intl_textdomain" >&6; } +if test "x$ac_cv_lib_intl_textdomain" = xyes; then : -printf "%s\n" "#define WITH_LIBINTL 1" >>confdefs.h +$as_echo "#define WITH_LIBINTL 1" >>confdefs.h LIBS="-lintl $LIBS" fi @@ -11243,14 +10211,14 @@ fi # checks for system dependent C++ extensions support case "$ac_sys_system" in - AIX*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5 -printf %s "checking for genuine AIX C++ extensions support... " >&6; } + AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5 +$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { loadAndInit("", 0, "") ; @@ -11258,49 +10226,48 @@ loadAndInit("", 0, "") } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h +$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag # of the AIX system used to build/package Python executable. This tag serves # as a baseline for bdist module packages - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5 -printf %s "checking for the system builddate... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5 +$as_echo_n "checking for the system builddate... " >&6; } AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }') -printf "%s\n" "#define AIX_BUILDDATE $AIX_BUILDDATE" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define AIX_BUILDDATE $AIX_BUILDDATE +_ACEOF - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5 -printf "%s\n" "$AIX_BUILDDATE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5 +$as_echo "$AIX_BUILDDATE" >&6; } ;; *) ;; esac # check for systems that require aligned memory access -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5 -printf %s "checking aligned memory access is required... " >&6; } -if test ${ac_cv_aligned_required+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5 +$as_echo_n "checking aligned memory access is required... " >&6; } +if ${ac_cv_aligned_required+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_aligned_required=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11317,10 +10284,9 @@ int main() return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_aligned_required=no -else $as_nop +else ac_cv_aligned_required=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -11330,33 +10296,32 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5 -printf "%s\n" "$ac_cv_aligned_required" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5 +$as_echo "$ac_cv_aligned_required" >&6; } if test "$ac_cv_aligned_required" = yes ; then -printf "%s\n" "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h +$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h fi # str, bytes and memoryview hash algorithm -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5 -printf %s "checking for --with-hash-algorithm... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5 +$as_echo_n "checking for --with-hash-algorithm... " >&6; } # Check whether --with-hash_algorithm was given. -if test ${with_hash_algorithm+y} -then : +if test "${with_hash_algorithm+set}" = set; then : withval=$with_hash_algorithm; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -printf "%s\n" "$withval" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } case "$withval" in siphash24) - printf "%s\n" "#define Py_HASH_ALGORITHM 1" >>confdefs.h + $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h ;; fnv) - printf "%s\n" "#define Py_HASH_ALGORITHM 2" >>confdefs.h + $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h ;; *) @@ -11364,9 +10329,9 @@ case "$withval" in ;; esac -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5 -printf "%s\n" "default" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 +$as_echo "default" >&6; } fi @@ -11385,12 +10350,11 @@ validate_tzpath() { } TZPATH="/usr/share/zoneinfo:/usr/lib/zoneinfo:/usr/share/lib/zoneinfo:/etc/zoneinfo" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5 -printf %s "checking for --with-tzpath... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tzpath" >&5 +$as_echo_n "checking for --with-tzpath... " >&6; } # Check whether --with-tzpath was given. -if test ${with_tzpath+y} -then : +if test "${with_tzpath+set}" = set; then : withval=$with_tzpath; case "$withval" in yes) @@ -11399,84 +10363,80 @@ case "$withval" in *) validate_tzpath "$withval" TZPATH="$withval" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5 -printf "%s\n" "\"$withval\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$withval\"" >&5 +$as_echo "\"$withval\"" >&6; } ;; esac -else $as_nop +else validate_tzpath "$TZPATH" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5 -printf "%s\n" "\"$TZPATH\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5 +$as_echo "\"$TZPATH\"" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5 -printf %s "checking for --with-address-sanitizer... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5 +$as_echo_n "checking for --with-address-sanitizer... " >&6; } # Check whether --with-address_sanitizer was given. -if test ${with_address_sanitizer+y} -then : +if test "${with_address_sanitizer+set}" = set; then : withval=$with_address_sanitizer; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -printf "%s\n" "$withval" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS" LDFLAGS="-fsanitize=address $LDFLAGS" # ASan works by controlling memory allocation, our own malloc interferes. with_pymalloc="no" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5 -printf %s "checking for --with-memory-sanitizer... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5 +$as_echo_n "checking for --with-memory-sanitizer... " >&6; } # Check whether --with-memory_sanitizer was given. -if test ${with_memory_sanitizer+y} -then : +if test "${with_memory_sanitizer+set}" = set; then : withval=$with_memory_sanitizer; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -printf "%s\n" "$withval" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS" LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS" # MSan works by controlling memory allocation, our own malloc interferes. with_pymalloc="no" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5 -printf %s "checking for --with-undefined-behavior-sanitizer... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5 +$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; } # Check whether --with-undefined_behavior_sanitizer was given. -if test ${with_undefined_behavior_sanitizer+y} -then : +if test "${with_undefined_behavior_sanitizer+set}" = set; then : withval=$with_undefined_behavior_sanitizer; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -printf "%s\n" "$withval" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } BASECFLAGS="-fsanitize=undefined $BASECFLAGS" LDFLAGS="-fsanitize=undefined $LDFLAGS" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 -printf %s "checking for t_open in -lnsl... " >&6; } -if test ${ac_cv_lib_nsl_t_open+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 +$as_echo_n "checking for t_open in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_t_open+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11485,38 +10445,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char t_open (); int -main (void) +main () { return t_open (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_t_open=yes -else $as_nop +else ac_cv_lib_nsl_t_open=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 -printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; } -if test "x$ac_cv_lib_nsl_t_open" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 +$as_echo "$ac_cv_lib_nsl_t_open" >&6; } +if test "x$ac_cv_lib_nsl_t_open" = xyes; then : LIBS="-lnsl $LIBS" fi # SVR4 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 -printf %s "checking for socket in -lsocket... " >&6; } -if test ${ac_cv_lib_socket_socket+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 +$as_echo_n "checking for socket in -lsocket... " >&6; } +if ${ac_cv_lib_socket_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -11525,47 +10485,47 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char socket (); int -main (void) +main () { return socket (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes -else $as_nop +else ac_cv_lib_socket_socket=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 -printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 +$as_echo "$ac_cv_lib_socket_socket" >&6; } +if test "x$ac_cv_lib_socket_socket" = xyes; then : LIBS="-lsocket $LIBS" fi # SVR4 sockets -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5 -printf %s "checking for --with-libs... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5 +$as_echo_n "checking for --with-libs... " >&6; } # Check whether --with-libs was given. -if test ${with_libs+y} -then : +if test "${with_libs+set}" = set; then : withval=$with_libs; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -printf "%s\n" "$withval" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } LIBS="$withval $LIBS" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -11580,12 +10540,11 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -11595,15 +10554,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -11615,11 +10570,11 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -printf "%s\n" "$PKG_CONFIG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -11628,12 +10583,11 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. @@ -11643,15 +10597,11 @@ else $as_nop for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -11663,11 +10613,11 @@ esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -11675,8 +10625,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -11688,41 +10638,39 @@ fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check for use of the system expat library -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5 -printf %s "checking for --with-system-expat... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5 +$as_echo_n "checking for --with-system-expat... " >&6; } # Check whether --with-system_expat was given. -if test ${with_system_expat+y} -then : +if test "${with_system_expat+set}" = set; then : withval=$with_system_expat; -else $as_nop +else with_system_expat="no" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5 -printf "%s\n" "$with_system_expat" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5 +$as_echo "$with_system_expat" >&6; } # Check for use of the system libffi library -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5 -printf %s "checking for --with-system-ffi... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5 +$as_echo_n "checking for --with-system-ffi... " >&6; } # Check whether --with-system_ffi was given. -if test ${with_system_ffi+y} -then : +if test "${with_system_ffi+set}" = set; then : withval=$with_system_ffi; fi @@ -11739,15 +10687,15 @@ then as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5 ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5 -printf "%s\n" "$with_system_ffi" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5 +$as_echo "$with_system_ffi" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } if test "$with_system_ffi" != "" then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5 -printf "%s\n" "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5 +$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;} fi with_system_ffi="yes" fi @@ -11760,30 +10708,28 @@ fi # Check for use of the system libmpdec library -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5 -printf %s "checking for --with-system-libmpdec... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5 +$as_echo_n "checking for --with-system-libmpdec... " >&6; } # Check whether --with-system_libmpdec was given. -if test ${with_system_libmpdec+y} -then : +if test "${with_system_libmpdec+set}" = set; then : withval=$with_system_libmpdec; -else $as_nop +else with_system_libmpdec="no" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5 -printf "%s\n" "$with_system_libmpdec" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5 +$as_echo "$with_system_libmpdec" >&6; } # Check whether _decimal should use a coroutine-local or thread-local context -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5 -printf %s "checking for --with-decimal-contextvar... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-decimal-contextvar" >&5 +$as_echo_n "checking for --with-decimal-contextvar... " >&6; } # Check whether --with-decimal_contextvar was given. -if test ${with_decimal_contextvar+y} -then : +if test "${with_decimal_contextvar+set}" = set; then : withval=$with_decimal_contextvar; -else $as_nop +else with_decimal_contextvar="yes" fi @@ -11791,57 +10737,54 @@ fi if test "$with_decimal_contextvar" != "no" then -printf "%s\n" "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h +$as_echo "#define WITH_DECIMAL_CONTEXTVAR 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5 -printf "%s\n" "$with_decimal_contextvar" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_decimal_contextvar" >&5 +$as_echo "$with_decimal_contextvar" >&6; } # Check for support for loadable sqlite extensions -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5 -printf %s "checking for --enable-loadable-sqlite-extensions... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5 +$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; } # Check whether --enable-loadable-sqlite-extensions was given. -if test ${enable_loadable_sqlite_extensions+y} -then : +if test "${enable_loadable_sqlite_extensions+set}" = set; then : enableval=$enable_loadable_sqlite_extensions; -else $as_nop +else enable_loadable_sqlite_extensions="no" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5 -printf "%s\n" "$enable_loadable_sqlite_extensions" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5 +$as_echo "$enable_loadable_sqlite_extensions" >&6; } # Check for --with-tcltk-includes=path and --with-tcltk-libs=path -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5 -printf %s "checking for --with-tcltk-includes... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5 +$as_echo_n "checking for --with-tcltk-includes... " >&6; } # Check whether --with-tcltk-includes was given. -if test ${with_tcltk_includes+y} -then : +if test "${with_tcltk_includes+set}" = set; then : withval=$with_tcltk_includes; -else $as_nop +else with_tcltk_includes="default" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5 -printf "%s\n" "$with_tcltk_includes" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5 -printf %s "checking for --with-tcltk-libs... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5 +$as_echo "$with_tcltk_includes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5 +$as_echo_n "checking for --with-tcltk-libs... " >&6; } # Check whether --with-tcltk-libs was given. -if test ${with_tcltk_libs+y} -then : +if test "${with_tcltk_libs+set}" = set; then : withval=$with_tcltk_libs; -else $as_nop +else with_tcltk_libs="default" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5 -printf "%s\n" "$with_tcltk_libs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5 +$as_echo "$with_tcltk_libs" >&6; } if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault then if test "x$with_tcltk_includes" != "x$with_tcltk_libs" @@ -11861,12 +10804,11 @@ else fi # Check for --with-dbmliborder -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 -printf %s "checking for --with-dbmliborder... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 +$as_echo_n "checking for --with-dbmliborder... " >&6; } # Check whether --with-dbmliborder was given. -if test ${with_dbmliborder+y} -then : +if test "${with_dbmliborder+set}" = set; then : withval=$with_dbmliborder; if test x$with_dbmliborder = xyes then @@ -11881,8 +10823,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 -printf "%s\n" "$with_dbmliborder" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 +$as_echo "$with_dbmliborder" >&6; } # Templates for things AC_DEFINEd more than once. # For a single AC_DEFINE, no template is needed. @@ -11891,7 +10833,7 @@ printf "%s\n" "$with_dbmliborder" >&6; } if test "$ac_cv_pthread_is_default" = yes then # Defining _REENTRANT on system with POSIX threads should not hurt. - printf "%s\n" "#define _REENTRANT 1" >>confdefs.h + $as_echo "#define _REENTRANT 1" >>confdefs.h posix_threads=yes if test "$ac_sys_system" = "SunOS"; then @@ -11926,8 +10868,8 @@ else # According to the POSIX spec, a pthreads implementation must # define _POSIX_THREADS in unistd.h. Some apparently don't # (e.g. gnu pth with pthread emulation) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5 -printf %s "checking for _POSIX_THREADS in unistd.h... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5 +$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11938,26 +10880,25 @@ yes _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : + $EGREP "yes" >/dev/null 2>&1; then : unistd_defines_pthreads=yes -else $as_nop +else unistd_defines_pthreads=no fi -rm -rf conftest* +rm -f conftest* - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5 -printf "%s\n" "$unistd_defines_pthreads" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5 +$as_echo "$unistd_defines_pthreads" >&6; } - printf "%s\n" "#define _REENTRANT 1" >>confdefs.h + $as_echo "#define _REENTRANT 1" >>confdefs.h # Just looking for pthread_create in libpthread is not enough: # on HP/UX, pthread.h renames pthread_create to a different symbol name. # So we really have to include pthread.h, and then link. _libs=$LIBS LIBS="$LIBS -lpthread" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 -printf %s "checking for pthread_create in -lpthread... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11966,7 +10907,7 @@ printf %s "checking for pthread_create in -lpthread... " >&6; } void * start_routine (void *arg) { exit (0); } int -main (void) +main () { pthread_create (NULL, NULL, start_routine, NULL) @@ -11974,30 +10915,27 @@ pthread_create (NULL, NULL, start_routine, NULL) return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } posix_threads=yes -else $as_nop +else LIBS=$_libs ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach" -if test "x$ac_cv_func_pthread_detach" = xyes -then : +if test "x$ac_cv_func_pthread_detach" = xyes; then : posix_threads=yes -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 -printf %s "checking for pthread_create in -lpthreads... " >&6; } -if test ${ac_cv_lib_pthreads_pthread_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 +$as_echo_n "checking for pthread_create in -lpthreads... " >&6; } +if ${ac_cv_lib_pthreads_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12006,41 +10944,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char pthread_create (); int -main (void) +main () { return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthreads_pthread_create=yes -else $as_nop +else ac_cv_lib_pthreads_pthread_create=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 -printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; } -if test "x$ac_cv_lib_pthreads_pthread_create" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } +if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then : posix_threads=yes LIBS="$LIBS -lpthreads" -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 -printf %s "checking for pthread_create in -lc_r... " >&6; } -if test ${ac_cv_lib_c_r_pthread_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 +$as_echo_n "checking for pthread_create in -lc_r... " >&6; } +if ${ac_cv_lib_c_r_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12049,41 +10987,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char pthread_create (); int -main (void) +main () { return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_r_pthread_create=yes -else $as_nop +else ac_cv_lib_c_r_pthread_create=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 -printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; } -if test "x$ac_cv_lib_c_r_pthread_create" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 +$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } +if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : posix_threads=yes LIBS="$LIBS -lc_r" -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 -printf %s "checking for __pthread_create_system in -lpthread... " >&6; } -if test ${ac_cv_lib_pthread___pthread_create_system+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 +$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } +if ${ac_cv_lib_pthread___pthread_create_system+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12092,41 +11030,41 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char __pthread_create_system (); int -main (void) +main () { return __pthread_create_system (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread___pthread_create_system=yes -else $as_nop +else ac_cv_lib_pthread___pthread_create_system=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 -printf "%s\n" "$ac_cv_lib_pthread___pthread_create_system" >&6; } -if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 +$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } +if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then : posix_threads=yes LIBS="$LIBS -lpthread" -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 -printf %s "checking for pthread_create in -lcma... " >&6; } -if test ${ac_cv_lib_cma_pthread_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 +$as_echo_n "checking for pthread_create in -lcma... " >&6; } +if ${ac_cv_lib_cma_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lcma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12135,34 +11073,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char pthread_create (); int -main (void) +main () { return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cma_pthread_create=yes -else $as_nop +else ac_cv_lib_cma_pthread_create=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 -printf "%s\n" "$ac_cv_lib_cma_pthread_create" >&6; } -if test "x$ac_cv_lib_cma_pthread_create" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 +$as_echo "$ac_cv_lib_cma_pthread_create" >&6; } +if test "x$ac_cv_lib_cma_pthread_create" = xyes; then : posix_threads=yes LIBS="$LIBS -lcma" -else $as_nop +else as_fn_error $? "could not find pthreads on your system" "$LINENO" 5 @@ -12178,15 +11117,14 @@ fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5 -printf %s "checking for usconfig in -lmpc... " >&6; } -if test ${ac_cv_lib_mpc_usconfig+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5 +$as_echo_n "checking for usconfig in -lmpc... " >&6; } +if ${ac_cv_lib_mpc_usconfig+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lmpc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12195,29 +11133,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char usconfig (); int -main (void) +main () { return usconfig (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mpc_usconfig=yes -else $as_nop +else ac_cv_lib_mpc_usconfig=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 -printf "%s\n" "$ac_cv_lib_mpc_usconfig" >&6; } -if test "x$ac_cv_lib_mpc_usconfig" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 +$as_echo "$ac_cv_lib_mpc_usconfig" >&6; } +if test "x$ac_cv_lib_mpc_usconfig" = xyes; then : LIBS="$LIBS -lmpc" @@ -12229,36 +11168,34 @@ fi if test "$posix_threads" = "yes"; then if test "$unistd_defines_pthreads" = "no"; then -printf "%s\n" "#define _POSIX_THREADS 1" >>confdefs.h +$as_echo "#define _POSIX_THREADS 1" >>confdefs.h fi # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. case $ac_sys_system/$ac_sys_release in SunOS/5.6) -printf "%s\n" "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h +$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h ;; SunOS/5.8) -printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ;; AIX/*) -printf "%s\n" "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h ;; esac - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 -printf %s "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } - if test ${ac_cv_pthread_system_supported+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 +$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } + if ${ac_cv_pthread_system_supported+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_pthread_system_supported=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12276,10 +11213,9 @@ else $as_nop return (0); } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_pthread_system_supported=yes -else $as_nop +else ac_cv_pthread_system_supported=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -12289,61 +11225,64 @@ fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 -printf "%s\n" "$ac_cv_pthread_system_supported" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 +$as_echo "$ac_cv_pthread_system_supported" >&6; } if test "$ac_cv_pthread_system_supported" = "yes"; then -printf "%s\n" "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h +$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h fi - - for ac_func in pthread_sigmask + for ac_func in pthread_sigmask do : ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask" -if test "x$ac_cv_func_pthread_sigmask" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h +if test "x$ac_cv_func_pthread_sigmask" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREAD_SIGMASK 1 +_ACEOF case $ac_sys_system in CYGWIN*) -printf "%s\n" "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h ;; esac fi - done - ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid" -if test "x$ac_cv_func_pthread_getcpuclockid" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_GETCPUCLOCKID 1" >>confdefs.h + + for ac_func in pthread_getcpuclockid +do : + ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid" +if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PTHREAD_GETCPUCLOCKID 1 +_ACEOF fi +done fi # Check for enable-ipv6 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 -printf %s "checking if --enable-ipv6 is specified... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 +$as_echo_n "checking if --enable-ipv6 is specified... " >&6; } # Check whether --enable-ipv6 was given. -if test ${enable_ipv6+y} -then : +if test "${enable_ipv6+set}" = set; then : enableval=$enable_ipv6; case "$enableval" in no) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ipv6=no ;; - *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define ENABLE_IPV6 1" >>confdefs.h ipv6=yes ;; esac -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12351,39 +11290,38 @@ else $as_nop #include #include int -main (void) +main () { int domain = AF_INET6; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ipv6=yes -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ipv6=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ipv6" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 -printf %s "checking if RFC2553 API is available... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 +$as_echo_n "checking if RFC2553 API is available... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main (void) +main () { struct sockaddr_in6 x; x.sin6_scope_id; @@ -12392,25 +11330,24 @@ struct sockaddr_in6 x; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } ipv6=yes -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } ipv6=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "$ipv6" = "yes"; then - printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h + $as_echo "#define ENABLE_IPV6 1" >>confdefs.h fi @@ -12422,8 +11359,8 @@ ipv6lib=none ipv6trylibc=no if test "$ipv6" = "yes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 -printf %s "checking ipv6 stack type... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 +$as_echo_n "checking ipv6 stack type... " >&6; } for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do case $i in @@ -12437,11 +11374,10 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : + $EGREP "yes" >/dev/null 2>&1; then : ipv6type=$i fi -rm -rf conftest* +rm -f conftest* ;; kame) @@ -12454,14 +11390,13 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : + $EGREP "yes" >/dev/null 2>&1; then : ipv6type=$i; ipv6lib=inet6 ipv6libdir=/usr/local/v6/lib ipv6trylibc=yes fi -rm -rf conftest* +rm -f conftest* ;; linux-glibc) @@ -12474,12 +11409,11 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : + $EGREP "yes" >/dev/null 2>&1; then : ipv6type=$i; ipv6trylibc=yes fi -rm -rf conftest* +rm -f conftest* ;; linux-inet6) @@ -12508,13 +11442,12 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : + $EGREP "yes" >/dev/null 2>&1; then : ipv6type=$i; ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -rf conftest* +rm -f conftest* ;; v6d) @@ -12527,14 +11460,13 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : + $EGREP "yes" >/dev/null 2>&1; then : ipv6type=$i; ipv6lib=v6; ipv6libdir=/usr/local/v6/lib; BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" fi -rm -rf conftest* +rm -f conftest* ;; zeta) @@ -12547,13 +11479,12 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 -then : + $EGREP "yes" >/dev/null 2>&1; then : ipv6type=$i; ipv6lib=inet6; ipv6libdir=/usr/local/v6/lib fi -rm -rf conftest* +rm -f conftest* ;; esac @@ -12561,8 +11492,8 @@ rm -rf conftest* break fi done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 -printf "%s\n" "$ipv6type" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 +$as_echo "$ipv6type" >&6; } fi if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then @@ -12581,1633 +11512,591 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5 -printf %s "checking for CAN_RAW_FD_FRAMES... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5 +$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* CAN_RAW_FD_FRAMES available check */ #include int -main (void) +main () { int can_raw_fd_frames = CAN_RAW_FD_FRAMES; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h +$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5 -printf %s "checking for CAN_RAW_JOIN_FILTERS... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_JOIN_FILTERS" >&5 +$as_echo_n "checking for CAN_RAW_JOIN_FILTERS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int can_raw_join_filters = CAN_RAW_JOIN_FILTERS; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - - -printf "%s\n" "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - -# Check for --with-doc-strings -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5 -printf %s "checking for --with-doc-strings... " >&6; } - -# Check whether --with-doc-strings was given. -if test ${with_doc_strings+y} -then : - withval=$with_doc_strings; -fi - - -if test -z "$with_doc_strings" -then with_doc_strings="yes" -fi -if test "$with_doc_strings" != "no" -then - -printf "%s\n" "#define WITH_DOC_STRINGS 1" >>confdefs.h - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 -printf "%s\n" "$with_doc_strings" >&6; } - -# Check for Python-specific malloc support -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 -printf %s "checking for --with-pymalloc... " >&6; } - -# Check whether --with-pymalloc was given. -if test ${with_pymalloc+y} -then : - withval=$with_pymalloc; -fi - - -if test -z "$with_pymalloc" -then - with_pymalloc="yes" -fi -if test "$with_pymalloc" != "no" -then - -printf "%s\n" "#define WITH_PYMALLOC 1" >>confdefs.h - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 -printf "%s\n" "$with_pymalloc" >&6; } - -# Check for --with-c-locale-coercion -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5 -printf %s "checking for --with-c-locale-coercion... " >&6; } - -# Check whether --with-c-locale-coercion was given. -if test ${with_c_locale_coercion+y} -then : - withval=$with_c_locale_coercion; -fi - - -if test -z "$with_c_locale_coercion" -then - with_c_locale_coercion="yes" -fi -if test "$with_c_locale_coercion" != "no" -then - -printf "%s\n" "#define PY_COERCE_C_LOCALE 1" >>confdefs.h - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5 -printf "%s\n" "$with_c_locale_coercion" >&6; } - -# Check for Valgrind support -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 -printf %s "checking for --with-valgrind... " >&6; } - -# Check whether --with-valgrind was given. -if test ${with_valgrind+y} -then : - withval=$with_valgrind; -else $as_nop - with_valgrind=no -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 -printf "%s\n" "$with_valgrind" >&6; } -if test "$with_valgrind" != no; then - ac_fn_c_check_header_compile "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" -if test "x$ac_cv_header_valgrind_valgrind_h" = xyes -then : - -printf "%s\n" "#define WITH_VALGRIND 1" >>confdefs.h - -else $as_nop - as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 - -fi - - OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" -fi - -# Check for DTrace support -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5 -printf %s "checking for --with-dtrace... " >&6; } - -# Check whether --with-dtrace was given. -if test ${with_dtrace+y} -then : - withval=$with_dtrace; -else $as_nop - with_dtrace=no -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 -printf "%s\n" "$with_dtrace" >&6; } - - - - - -DTRACE= -DTRACE_HEADERS= -DTRACE_OBJS= - -if test "$with_dtrace" = "yes" -then - # Extract the first word of "dtrace", so it can be a program name with args. -set dummy dtrace; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_path_DTRACE+y} -then : - printf %s "(cached) " >&6 -else $as_nop - case $DTRACE in - [\\/]* | ?:[\\/]*) - ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_path_DTRACE="$as_dir$ac_word$ac_exec_ext" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" - ;; -esac -fi -DTRACE=$ac_cv_path_DTRACE -if test -n "$DTRACE"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 -printf "%s\n" "$DTRACE" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - - if test "$DTRACE" = "not found"; then - as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 - fi - -printf "%s\n" "#define WITH_DTRACE 1" >>confdefs.h - - DTRACE_HEADERS="Include/pydtrace_probes.h" - - # On OS X, DTrace providers do not need to be explicitly compiled and - # linked into the binary. Correspondingly, dtrace(1) is missing the ELF - # generation flag '-G'. We check for presence of this flag, rather than - # hardcoding support by OS, in the interest of robustness. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5 -printf %s "checking whether DTrace probes require linking... " >&6; } -if test ${ac_cv_dtrace_link+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_dtrace_link=no - echo 'BEGIN{}' > conftest.d - "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ - ac_cv_dtrace_link=yes - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 -printf "%s\n" "$ac_cv_dtrace_link" >&6; } - if test "$ac_cv_dtrace_link" = "yes"; then - DTRACE_OBJS="Python/pydtrace.o" - fi -fi - -# -I${DLINCLDIR} is added to the compile rule for importdl.o - -DLINCLDIR=. - -# the dlopen() function means we might want to use dynload_shlib.o. some -# platforms have dlopen(), but don't want to use it. -ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes -then : - printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h - -fi - - -# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic -# loading of modules. - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5 -printf %s "checking DYNLOADFILE... " >&6; } -if test -z "$DYNLOADFILE" -then - case $ac_sys_system/$ac_sys_release in - hp*|HP*) DYNLOADFILE="dynload_hpux.o";; - *) - # use dynload_shlib.c and dlopen() if we have it; otherwise stub - # out any dynamic loading - if test "$ac_cv_func_dlopen" = yes - then DYNLOADFILE="dynload_shlib.o" - else DYNLOADFILE="dynload_stub.o" - fi - ;; - esac -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 -printf "%s\n" "$DYNLOADFILE" >&6; } -if test "$DYNLOADFILE" != "dynload_stub.o" -then - -printf "%s\n" "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h - -fi - -# MACHDEP_OBJS can be set to platform-specific object files needed by Python - - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 -printf %s "checking MACHDEP_OBJS... " >&6; } -if test -z "$MACHDEP_OBJS" -then - MACHDEP_OBJS=$extra_machdep_objs -else - MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" -fi -if test -z "$MACHDEP_OBJS"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 -printf "%s\n" "$MACHDEP_OBJS" >&6; } -fi - -# checks for library functions -ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm" -if test "x$ac_cv_func_alarm" = xyes -then : - printf "%s\n" "#define HAVE_ALARM 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4" -if test "x$ac_cv_func_accept4" = xyes -then : - printf "%s\n" "#define HAVE_ACCEPT4 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer" -if test "x$ac_cv_func_setitimer" = xyes -then : - printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getitimer" "ac_cv_func_getitimer" -if test "x$ac_cv_func_getitimer" = xyes -then : - printf "%s\n" "#define HAVE_GETITIMER 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" -if test "x$ac_cv_func_bind_textdomain_codeset" = xyes -then : - printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "chown" "ac_cv_func_chown" -if test "x$ac_cv_func_chown" = xyes -then : - printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "clock" "ac_cv_func_clock" -if test "x$ac_cv_func_clock" = xyes -then : - printf "%s\n" "#define HAVE_CLOCK 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr" -if test "x$ac_cv_func_confstr" = xyes -then : - printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "close_range" "ac_cv_func_close_range" -if test "x$ac_cv_func_close_range" = xyes -then : - printf "%s\n" "#define HAVE_CLOSE_RANGE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range" -if test "x$ac_cv_func_copy_file_range" = xyes -then : - printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ctermid" "ac_cv_func_ctermid" -if test "x$ac_cv_func_ctermid" = xyes -then : - printf "%s\n" "#define HAVE_CTERMID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3" -if test "x$ac_cv_func_dup3" = xyes -then : - printf "%s\n" "#define HAVE_DUP3 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "execv" "ac_cv_func_execv" -if test "x$ac_cv_func_execv" = xyes -then : - printf "%s\n" "#define HAVE_EXECV 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero" -if test "x$ac_cv_func_explicit_bzero" = xyes -then : - printf "%s\n" "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "explicit_memset" "ac_cv_func_explicit_memset" -if test "x$ac_cv_func_explicit_memset" = xyes -then : - printf "%s\n" "#define HAVE_EXPLICIT_MEMSET 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat" -if test "x$ac_cv_func_faccessat" = xyes -then : - printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod" -if test "x$ac_cv_func_fchmod" = xyes -then : - printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fchmodat" "ac_cv_func_fchmodat" -if test "x$ac_cv_func_fchmodat" = xyes -then : - printf "%s\n" "#define HAVE_FCHMODAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown" -if test "x$ac_cv_func_fchown" = xyes -then : - printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat" -if test "x$ac_cv_func_fchownat" = xyes -then : - printf "%s\n" "#define HAVE_FCHOWNAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fdwalk" "ac_cv_func_fdwalk" -if test "x$ac_cv_func_fdwalk" = xyes -then : - printf "%s\n" "#define HAVE_FDWALK 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fexecve" "ac_cv_func_fexecve" -if test "x$ac_cv_func_fexecve" = xyes -then : - printf "%s\n" "#define HAVE_FEXECVE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fdopendir" "ac_cv_func_fdopendir" -if test "x$ac_cv_func_fdopendir" = xyes -then : - printf "%s\n" "#define HAVE_FDOPENDIR 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork" -if test "x$ac_cv_func_fork" = xyes -then : - printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fpathconf" "ac_cv_func_fpathconf" -if test "x$ac_cv_func_fpathconf" = xyes -then : - printf "%s\n" "#define HAVE_FPATHCONF 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat" -if test "x$ac_cv_func_fstatat" = xyes -then : - printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ftime" "ac_cv_func_ftime" -if test "x$ac_cv_func_ftime" = xyes -then : - printf "%s\n" "#define HAVE_FTIME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" -if test "x$ac_cv_func_ftruncate" = xyes -then : - printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "futimesat" "ac_cv_func_futimesat" -if test "x$ac_cv_func_futimesat" = xyes -then : - printf "%s\n" "#define HAVE_FUTIMESAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "futimens" "ac_cv_func_futimens" -if test "x$ac_cv_func_futimens" = xyes -then : - printf "%s\n" "#define HAVE_FUTIMENS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "futimes" "ac_cv_func_futimes" -if test "x$ac_cv_func_futimes" = xyes -then : - printf "%s\n" "#define HAVE_FUTIMES 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" -if test "x$ac_cv_func_gai_strerror" = xyes -then : - printf "%s\n" "#define HAVE_GAI_STRERROR 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" -if test "x$ac_cv_func_getentropy" = xyes -then : - printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getgrgid_r" "ac_cv_func_getgrgid_r" -if test "x$ac_cv_func_getgrgid_r" = xyes -then : - printf "%s\n" "#define HAVE_GETGRGID_R 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getgrnam_r" "ac_cv_func_getgrnam_r" -if test "x$ac_cv_func_getgrnam_r" = xyes -then : - printf "%s\n" "#define HAVE_GETGRNAM_R 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getgrouplist" "ac_cv_func_getgrouplist" -if test "x$ac_cv_func_getgrouplist" = xyes -then : - printf "%s\n" "#define HAVE_GETGROUPLIST 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" -if test "x$ac_cv_func_getgroups" = xyes -then : - printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getlogin" "ac_cv_func_getlogin" -if test "x$ac_cv_func_getlogin" = xyes -then : - printf "%s\n" "#define HAVE_GETLOGIN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg" -if test "x$ac_cv_func_getloadavg" = xyes -then : - printf "%s\n" "#define HAVE_GETLOADAVG 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername" -if test "x$ac_cv_func_getpeername" = xyes -then : - printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid" -if test "x$ac_cv_func_getpgid" = xyes -then : - printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid" -if test "x$ac_cv_func_getpid" = xyes -then : - printf "%s\n" "#define HAVE_GETPID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getpriority" "ac_cv_func_getpriority" -if test "x$ac_cv_func_getpriority" = xyes -then : - printf "%s\n" "#define HAVE_GETPRIORITY 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid" -if test "x$ac_cv_func_getresuid" = xyes -then : - printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getresgid" "ac_cv_func_getresgid" -if test "x$ac_cv_func_getresgid" = xyes -then : - printf "%s\n" "#define HAVE_GETRESGID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent" -if test "x$ac_cv_func_getpwent" = xyes -then : - printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getpwnam_r" "ac_cv_func_getpwnam_r" -if test "x$ac_cv_func_getpwnam_r" = xyes -then : - printf "%s\n" "#define HAVE_GETPWNAM_R 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r" -if test "x$ac_cv_func_getpwuid_r" = xyes -then : - printf "%s\n" "#define HAVE_GETPWUID_R 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam" -if test "x$ac_cv_func_getspnam" = xyes -then : - printf "%s\n" "#define HAVE_GETSPNAM 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getspent" "ac_cv_func_getspent" -if test "x$ac_cv_func_getspent" = xyes -then : - printf "%s\n" "#define HAVE_GETSPENT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getsid" "ac_cv_func_getsid" -if test "x$ac_cv_func_getsid" = xyes -then : - printf "%s\n" "#define HAVE_GETSID 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd" -if test "x$ac_cv_func_getwd" = xyes -then : - printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex" -if test "x$ac_cv_func_if_nameindex" = xyes -then : - printf "%s\n" "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups" -if test "x$ac_cv_func_initgroups" = xyes -then : - printf "%s\n" "#define HAVE_INITGROUPS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill" -if test "x$ac_cv_func_kill" = xyes -then : - printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg" -if test "x$ac_cv_func_killpg" = xyes -then : - printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown" -if test "x$ac_cv_func_lchown" = xyes -then : - printf "%s\n" "#define HAVE_LCHOWN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "lockf" "ac_cv_func_lockf" -if test "x$ac_cv_func_lockf" = xyes -then : - printf "%s\n" "#define HAVE_LOCKF 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "linkat" "ac_cv_func_linkat" -if test "x$ac_cv_func_linkat" = xyes -then : - printf "%s\n" "#define HAVE_LINKAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat" -if test "x$ac_cv_func_lstat" = xyes -then : - printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "lutimes" "ac_cv_func_lutimes" -if test "x$ac_cv_func_lutimes" = xyes -then : - printf "%s\n" "#define HAVE_LUTIMES 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = xyes -then : - printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" -if test "x$ac_cv_func_memrchr" = xyes -then : - printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc" -if test "x$ac_cv_func_mbrtowc" = xyes -then : - printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mkdirat" "ac_cv_func_mkdirat" -if test "x$ac_cv_func_mkdirat" = xyes -then : - printf "%s\n" "#define HAVE_MKDIRAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" -if test "x$ac_cv_func_mkfifo" = xyes -then : - printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "madvise" "ac_cv_func_madvise" -if test "x$ac_cv_func_madvise" = xyes -then : - printf "%s\n" "#define HAVE_MADVISE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mkfifoat" "ac_cv_func_mkfifoat" -if test "x$ac_cv_func_mkfifoat" = xyes -then : - printf "%s\n" "#define HAVE_MKFIFOAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mknod" "ac_cv_func_mknod" -if test "x$ac_cv_func_mknod" = xyes -then : - printf "%s\n" "#define HAVE_MKNOD 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mknodat" "ac_cv_func_mknodat" -if test "x$ac_cv_func_mknodat" = xyes -then : - printf "%s\n" "#define HAVE_MKNODAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime" -if test "x$ac_cv_func_mktime" = xyes -then : - printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap" -if test "x$ac_cv_func_mremap" = xyes -then : - printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice" -if test "x$ac_cv_func_nice" = xyes -then : - printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat" -if test "x$ac_cv_func_openat" = xyes -then : - printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf" -if test "x$ac_cv_func_pathconf" = xyes -then : - printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pause" "ac_cv_func_pause" -if test "x$ac_cv_func_pause" = xyes -then : - printf "%s\n" "#define HAVE_PAUSE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" -if test "x$ac_cv_func_pipe2" = xyes -then : - printf "%s\n" "#define HAVE_PIPE2 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock" -if test "x$ac_cv_func_plock" = xyes -then : - printf "%s\n" "#define HAVE_PLOCK 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" -if test "x$ac_cv_func_poll" = xyes -then : - printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate" -if test "x$ac_cv_func_posix_fallocate" = xyes -then : - printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" -if test "x$ac_cv_func_posix_fadvise" = xyes -then : - printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn" -if test "x$ac_cv_func_posix_spawn" = xyes -then : - printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp" -if test "x$ac_cv_func_posix_spawnp" = xyes -then : - printf "%s\n" "#define HAVE_POSIX_SPAWNP 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" -if test "x$ac_cv_func_pread" = xyes -then : - printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "preadv" "ac_cv_func_preadv" -if test "x$ac_cv_func_preadv" = xyes -then : - printf "%s\n" "#define HAVE_PREADV 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "preadv2" "ac_cv_func_preadv2" -if test "x$ac_cv_func_preadv2" = xyes -then : - printf "%s\n" "#define HAVE_PREADV2 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock" -if test "x$ac_cv_func_pthread_condattr_setclock" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pthread_init" "ac_cv_func_pthread_init" -if test "x$ac_cv_func_pthread_init" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_INIT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill" -if test "x$ac_cv_func_pthread_kill" = xyes -then : - printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite" -if test "x$ac_cv_func_pwrite" = xyes -then : - printf "%s\n" "#define HAVE_PWRITE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pwritev" "ac_cv_func_pwritev" -if test "x$ac_cv_func_pwritev" = xyes -then : - printf "%s\n" "#define HAVE_PWRITEV 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "pwritev2" "ac_cv_func_pwritev2" -if test "x$ac_cv_func_pwritev2" = xyes -then : - printf "%s\n" "#define HAVE_PWRITEV2 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink" -if test "x$ac_cv_func_readlink" = xyes -then : - printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "readlinkat" "ac_cv_func_readlinkat" -if test "x$ac_cv_func_readlinkat" = xyes -then : - printf "%s\n" "#define HAVE_READLINKAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "readv" "ac_cv_func_readv" -if test "x$ac_cv_func_readv" = xyes -then : - printf "%s\n" "#define HAVE_READV 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath" -if test "x$ac_cv_func_realpath" = xyes -then : - printf "%s\n" "#define HAVE_REALPATH 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "renameat" "ac_cv_func_renameat" -if test "x$ac_cv_func_renameat" = xyes -then : - printf "%s\n" "#define HAVE_RENAMEAT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "sem_open" "ac_cv_func_sem_open" -if test "x$ac_cv_func_sem_open" = xyes -then : - printf "%s\n" "#define HAVE_SEM_OPEN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait" -if test "x$ac_cv_func_sem_timedwait" = xyes -then : - printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "sem_getvalue" "ac_cv_func_sem_getvalue" -if test "x$ac_cv_func_sem_getvalue" = xyes -then : - printf "%s\n" "#define HAVE_SEM_GETVALUE 1" >>confdefs.h +if ac_fn_c_try_compile "$LINENO"; then : -fi -ac_fn_c_check_func "$LINENO" "sem_unlink" "ac_cv_func_sem_unlink" -if test "x$ac_cv_func_sem_unlink" = xyes -then : - printf "%s\n" "#define HAVE_SEM_UNLINK 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile" -if test "x$ac_cv_func_sendfile" = xyes -then : - printf "%s\n" "#define HAVE_SENDFILE 1" >>confdefs.h +$as_echo "#define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "setegid" "ac_cv_func_setegid" -if test "x$ac_cv_func_setegid" = xyes -then : - printf "%s\n" "#define HAVE_SETEGID 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -fi -ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid" -if test "x$ac_cv_func_seteuid" = xyes -then : - printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h +else -fi -ac_fn_c_check_func "$LINENO" "setgid" "ac_cv_func_setgid" -if test "x$ac_cv_func_setgid" = xyes -then : - printf "%s\n" "#define HAVE_SETGID 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -ac_fn_c_check_func "$LINENO" "sethostname" "ac_cv_func_sethostname" -if test "x$ac_cv_func_sethostname" = xyes -then : - printf "%s\n" "#define HAVE_SETHOSTNAME 1" >>confdefs.h +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" -if test "x$ac_cv_func_setlocale" = xyes -then : - printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h +# Check for --with-doc-strings +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5 +$as_echo_n "checking for --with-doc-strings... " >&6; } +# Check whether --with-doc-strings was given. +if test "${with_doc_strings+set}" = set; then : + withval=$with_doc_strings; fi -ac_fn_c_check_func "$LINENO" "setregid" "ac_cv_func_setregid" -if test "x$ac_cv_func_setregid" = xyes -then : - printf "%s\n" "#define HAVE_SETREGID 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "setreuid" "ac_cv_func_setreuid" -if test "x$ac_cv_func_setreuid" = xyes -then : - printf "%s\n" "#define HAVE_SETREUID 1" >>confdefs.h +if test -z "$with_doc_strings" +then with_doc_strings="yes" fi -ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid" -if test "x$ac_cv_func_setresuid" = xyes -then : - printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h +if test "$with_doc_strings" != "no" +then -fi -ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid" -if test "x$ac_cv_func_setresgid" = xyes -then : - printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h +$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" -if test "x$ac_cv_func_setsid" = xyes -then : - printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 +$as_echo "$with_doc_strings" >&6; } -fi -ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid" -if test "x$ac_cv_func_setpgid" = xyes -then : - printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h +# Check for Python-specific malloc support +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 +$as_echo_n "checking for --with-pymalloc... " >&6; } +# Check whether --with-pymalloc was given. +if test "${with_pymalloc+set}" = set; then : + withval=$with_pymalloc; fi -ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp" -if test "x$ac_cv_func_setpgrp" = xyes -then : - printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority" -if test "x$ac_cv_func_setpriority" = xyes -then : - printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h +if test -z "$with_pymalloc" +then + with_pymalloc="yes" fi -ac_fn_c_check_func "$LINENO" "setuid" "ac_cv_func_setuid" -if test "x$ac_cv_func_setuid" = xyes -then : - printf "%s\n" "#define HAVE_SETUID 1" >>confdefs.h +if test "$with_pymalloc" != "no" +then -fi -ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" -if test "x$ac_cv_func_setvbuf" = xyes -then : - printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h +$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "sched_get_priority_max" "ac_cv_func_sched_get_priority_max" -if test "x$ac_cv_func_sched_get_priority_max" = xyes -then : - printf "%s\n" "#define HAVE_SCHED_GET_PRIORITY_MAX 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 +$as_echo "$with_pymalloc" >&6; } -fi -ac_fn_c_check_func "$LINENO" "sched_setaffinity" "ac_cv_func_sched_setaffinity" -if test "x$ac_cv_func_sched_setaffinity" = xyes -then : - printf "%s\n" "#define HAVE_SCHED_SETAFFINITY 1" >>confdefs.h +# Check for --with-c-locale-coercion +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5 +$as_echo_n "checking for --with-c-locale-coercion... " >&6; } +# Check whether --with-c-locale-coercion was given. +if test "${with_c_locale_coercion+set}" = set; then : + withval=$with_c_locale_coercion; fi -ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler" -if test "x$ac_cv_func_sched_setscheduler" = xyes -then : - printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "sched_setparam" "ac_cv_func_sched_setparam" -if test "x$ac_cv_func_sched_setparam" = xyes -then : - printf "%s\n" "#define HAVE_SCHED_SETPARAM 1" >>confdefs.h +if test -z "$with_c_locale_coercion" +then + with_c_locale_coercion="yes" fi -ac_fn_c_check_func "$LINENO" "sched_rr_get_interval" "ac_cv_func_sched_rr_get_interval" -if test "x$ac_cv_func_sched_rr_get_interval" = xyes -then : - printf "%s\n" "#define HAVE_SCHED_RR_GET_INTERVAL 1" >>confdefs.h +if test "$with_c_locale_coercion" != "no" +then -fi -ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" -if test "x$ac_cv_func_sigaction" = xyes -then : - printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h +$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack" -if test "x$ac_cv_func_sigaltstack" = xyes -then : - printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5 +$as_echo "$with_c_locale_coercion" >&6; } -fi -ac_fn_c_check_func "$LINENO" "sigfillset" "ac_cv_func_sigfillset" -if test "x$ac_cv_func_sigfillset" = xyes -then : - printf "%s\n" "#define HAVE_SIGFILLSET 1" >>confdefs.h +# Check for Valgrind support +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 +$as_echo_n "checking for --with-valgrind... " >&6; } +# Check whether --with-valgrind was given. +if test "${with_valgrind+set}" = set; then : + withval=$with_valgrind; +else + with_valgrind=no fi -ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt" -if test "x$ac_cv_func_siginterrupt" = xyes -then : - printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "sigpending" "ac_cv_func_sigpending" -if test "x$ac_cv_func_sigpending" = xyes -then : - printf "%s\n" "#define HAVE_SIGPENDING 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 +$as_echo "$with_valgrind" >&6; } +if test "$with_valgrind" != no; then + ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" +if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : -fi -ac_fn_c_check_func "$LINENO" "sigrelse" "ac_cv_func_sigrelse" -if test "x$ac_cv_func_sigrelse" = xyes -then : - printf "%s\n" "#define HAVE_SIGRELSE 1" >>confdefs.h +$as_echo "#define WITH_VALGRIND 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "sigtimedwait" "ac_cv_func_sigtimedwait" -if test "x$ac_cv_func_sigtimedwait" = xyes -then : - printf "%s\n" "#define HAVE_SIGTIMEDWAIT 1" >>confdefs.h +else + as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 fi -ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait" -if test "x$ac_cv_func_sigwait" = xyes -then : - printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "sigwaitinfo" "ac_cv_func_sigwaitinfo" -if test "x$ac_cv_func_sigwaitinfo" = xyes -then : - printf "%s\n" "#define HAVE_SIGWAITINFO 1" >>confdefs.h + OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" fi -ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" -if test "x$ac_cv_func_snprintf" = xyes -then : - printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "splice" "ac_cv_func_splice" -if test "x$ac_cv_func_splice" = xyes -then : - printf "%s\n" "#define HAVE_SPLICE 1" >>confdefs.h +# Check for DTrace support +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5 +$as_echo_n "checking for --with-dtrace... " >&6; } +# Check whether --with-dtrace was given. +if test "${with_dtrace+set}" = set; then : + withval=$with_dtrace; +else + with_dtrace=no fi -ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" -if test "x$ac_cv_func_strftime" = xyes -then : - printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" -if test "x$ac_cv_func_strlcpy" = xyes -then : - printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 +$as_echo "$with_dtrace" >&6; } -fi -ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal" -if test "x$ac_cv_func_strsignal" = xyes -then : - printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "symlinkat" "ac_cv_func_symlinkat" -if test "x$ac_cv_func_symlinkat" = xyes -then : - printf "%s\n" "#define HAVE_SYMLINKAT 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync" -if test "x$ac_cv_func_sync" = xyes -then : - printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" -if test "x$ac_cv_func_sysconf" = xyes -then : - printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp" -if test "x$ac_cv_func_tcgetpgrp" = xyes -then : - printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h +DTRACE= +DTRACE_HEADERS= +DTRACE_OBJS= -fi -ac_fn_c_check_func "$LINENO" "tcsetpgrp" "ac_cv_func_tcsetpgrp" -if test "x$ac_cv_func_tcsetpgrp" = xyes -then : - printf "%s\n" "#define HAVE_TCSETPGRP 1" >>confdefs.h +if test "$with_dtrace" = "yes" +then + # Extract the first word of "dtrace", so it can be a program name with args. +set dummy dtrace; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DTRACE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DTRACE in + [\\/]* | ?:[\\/]*) + ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" + ;; +esac fi -ac_fn_c_check_func "$LINENO" "tempnam" "ac_cv_func_tempnam" -if test "x$ac_cv_func_tempnam" = xyes -then : - printf "%s\n" "#define HAVE_TEMPNAM 1" >>confdefs.h - +DTRACE=$ac_cv_path_DTRACE +if test -n "$DTRACE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 +$as_echo "$DTRACE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm" -if test "x$ac_cv_func_timegm" = xyes -then : - printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times" -if test "x$ac_cv_func_times" = xyes -then : - printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "tmpfile" "ac_cv_func_tmpfile" -if test "x$ac_cv_func_tmpfile" = xyes -then : - printf "%s\n" "#define HAVE_TMPFILE 1" >>confdefs.h + if test "$DTRACE" = "not found"; then + as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 + fi -fi -ac_fn_c_check_func "$LINENO" "tmpnam" "ac_cv_func_tmpnam" -if test "x$ac_cv_func_tmpnam" = xyes -then : - printf "%s\n" "#define HAVE_TMPNAM 1" >>confdefs.h +$as_echo "#define WITH_DTRACE 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "tmpnam_r" "ac_cv_func_tmpnam_r" -if test "x$ac_cv_func_tmpnam_r" = xyes -then : - printf "%s\n" "#define HAVE_TMPNAM_R 1" >>confdefs.h + DTRACE_HEADERS="Include/pydtrace_probes.h" -fi -ac_fn_c_check_func "$LINENO" "truncate" "ac_cv_func_truncate" -if test "x$ac_cv_func_truncate" = xyes -then : - printf "%s\n" "#define HAVE_TRUNCATE 1" >>confdefs.h + # On OS X, DTrace providers do not need to be explicitly compiled and + # linked into the binary. Correspondingly, dtrace(1) is missing the ELF + # generation flag '-G'. We check for presence of this flag, rather than + # hardcoding support by OS, in the interest of robustness. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5 +$as_echo_n "checking whether DTrace probes require linking... " >&6; } +if ${ac_cv_dtrace_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_dtrace_link=no + echo 'BEGIN{}' > conftest.d + "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ + ac_cv_dtrace_link=yes fi -ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" -if test "x$ac_cv_func_uname" = xyes -then : - printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 +$as_echo "$ac_cv_dtrace_link" >&6; } + if test "$ac_cv_dtrace_link" = "yes"; then + DTRACE_OBJS="Python/pydtrace.o" + fi fi -ac_fn_c_check_func "$LINENO" "unlinkat" "ac_cv_func_unlinkat" -if test "x$ac_cv_func_unlinkat" = xyes -then : - printf "%s\n" "#define HAVE_UNLINKAT 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "utimensat" "ac_cv_func_utimensat" -if test "x$ac_cv_func_utimensat" = xyes -then : - printf "%s\n" "#define HAVE_UTIMENSAT 1" >>confdefs.h +# -I${DLINCLDIR} is added to the compile rule for importdl.o -fi -ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes" -if test "x$ac_cv_func_utimes" = xyes -then : - printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h +DLINCLDIR=. -fi -ac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork" -if test "x$ac_cv_func_vfork" = xyes -then : - printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h +# the dlopen() function means we might want to use dynload_shlib.o. some +# platforms have dlopen(), but don't want to use it. +for ac_func in dlopen +do : + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLOPEN 1 +_ACEOF fi -ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid" -if test "x$ac_cv_func_waitid" = xyes -then : - printf "%s\n" "#define HAVE_WAITID 1" >>confdefs.h +done -fi -ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" -if test "x$ac_cv_func_waitpid" = xyes -then : - printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3" -if test "x$ac_cv_func_wait3" = xyes -then : - printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h +# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic +# loading of modules. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5 +$as_echo_n "checking DYNLOADFILE... " >&6; } +if test -z "$DYNLOADFILE" +then + case $ac_sys_system/$ac_sys_release in + hp*|HP*) DYNLOADFILE="dynload_hpux.o";; + *) + # use dynload_shlib.c and dlopen() if we have it; otherwise stub + # out any dynamic loading + if test "$ac_cv_func_dlopen" = yes + then DYNLOADFILE="dynload_shlib.o" + else DYNLOADFILE="dynload_stub.o" + fi + ;; + esac fi -ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4" -if test "x$ac_cv_func_wait4" = xyes -then : - printf "%s\n" "#define HAVE_WAIT4 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 +$as_echo "$DYNLOADFILE" >&6; } +if test "$DYNLOADFILE" != "dynload_stub.o" +then -fi -ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll" -if test "x$ac_cv_func_wcscoll" = xyes -then : - printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h +$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "wcsftime" "ac_cv_func_wcsftime" -if test "x$ac_cv_func_wcsftime" = xyes -then : - printf "%s\n" "#define HAVE_WCSFTIME 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "wcsxfrm" "ac_cv_func_wcsxfrm" -if test "x$ac_cv_func_wcsxfrm" = xyes -then : - printf "%s\n" "#define HAVE_WCSXFRM 1" >>confdefs.h +# MACHDEP_OBJS can be set to platform-specific object files needed by Python -fi -ac_fn_c_check_func "$LINENO" "wmemcmp" "ac_cv_func_wmemcmp" -if test "x$ac_cv_func_wmemcmp" = xyes -then : - printf "%s\n" "#define HAVE_WMEMCMP 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 +$as_echo_n "checking MACHDEP_OBJS... " >&6; } +if test -z "$MACHDEP_OBJS" +then + MACHDEP_OBJS=$extra_machdep_objs +else + MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" fi -ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev" -if test "x$ac_cv_func_writev" = xyes -then : - printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h - +if test -z "$MACHDEP_OBJS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 +$as_echo "$MACHDEP_OBJS" >&6; } fi -ac_fn_c_check_func "$LINENO" "_getpty" "ac_cv_func__getpty" -if test "x$ac_cv_func__getpty" = xyes -then : - printf "%s\n" "#define HAVE__GETPTY 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "rtpSpawn" "ac_cv_func_rtpSpawn" -if test "x$ac_cv_func_rtpSpawn" = xyes -then : - printf "%s\n" "#define HAVE_RTPSPAWN 1" >>confdefs.h +# checks for library functions +for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ + clock confstr close_range copy_file_range ctermid dup3 execv explicit_bzero \ + explicit_memset faccessat fchmod fchmodat fchown fchownat \ + fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ + futimens futimes gai_strerror getentropy \ + getgrgid_r getgrnam_r \ + getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ + getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \ + if_nameindex \ + initgroups kill killpg lchown lockf linkat lstat lutimes mmap \ + memrchr mbrtowc mkdirat mkfifo \ + madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ + posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \ + pthread_condattr_setclock pthread_init pthread_kill pwrite pwritev pwritev2 \ + readlink readlinkat readv realpath renameat \ + sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \ + setgid sethostname \ + setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \ + sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \ + sched_rr_get_interval \ + sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \ + sigtimedwait sigwait sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \ + sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ + truncate uname unlinkat utimensat utimes vfork waitid waitpid wait3 wait4 \ + wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done # Force lchmod off for Linux. Linux disallows changing the mode of symbolic # links. Some libc implementations have a stub lchmod implementation that always # returns an error. if test "$MACHDEP" != linux; then + for ac_func in lchmod +do : ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod" -if test "x$ac_cv_func_lchmod" = xyes -then : - printf "%s\n" "#define HAVE_LCHMOD 1" >>confdefs.h - -fi - -fi - -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 -printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } -if test ${ac_cv_c_undeclared_builtin_options+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_save_CFLAGS=$CFLAGS - ac_cv_c_undeclared_builtin_options='cannot detect' - for ac_arg in '' -fno-builtin; do - CFLAGS="$ac_save_CFLAGS $ac_arg" - # This test program should *not* compile successfully. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main (void) -{ -(void) strchr; - ; - return 0; -} +if test "x$ac_cv_func_lchmod" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LCHMOD 1 _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - -else $as_nop - # This test program should compile successfully. - # No library function is consistently available on - # freestanding implementations, so test against a dummy - # declaration. Include always-available headers on the - # off chance that they somehow elicit warnings. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -extern void ac_decl (int, char *); - -int -main (void) -{ -(void) ac_decl (0, (char *) 0); - (void) ac_decl; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - if test x"$ac_arg" = x -then : - ac_cv_c_undeclared_builtin_options='none needed' -else $as_nop - ac_cv_c_undeclared_builtin_options=$ac_arg -fi - break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +done + fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - done - CFLAGS=$ac_save_CFLAGS - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 -printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } - case $ac_cv_c_undeclared_builtin_options in #( - 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot make $CC report undeclared builtins -See \`config.log' for more details" "$LINENO" 5; } ;; #( - 'none needed') : - ac_c_undeclared_builtin_options='' ;; #( - *) : - ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; -esac -ac_fn_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include +ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include #include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_dirfd" = xyes -then : +" +if test "x$ac_cv_have_decl_dirfd" = xyes; then : -printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h +$as_echo "#define HAVE_DIRFD 1" >>confdefs.h fi + # For some functions, having a definition is not sufficient, since # we want to take their address. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 -printf %s "checking for chroot... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 +$as_echo_n "checking for chroot... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=chroot ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CHROOT 1" >>confdefs.h +$as_echo "#define HAVE_CHROOT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for link" >&5 -printf %s "checking for link... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 +$as_echo_n "checking for link... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=link ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_LINK 1" >>confdefs.h +$as_echo "#define HAVE_LINK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 -printf %s "checking for symlink... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 +$as_echo_n "checking for symlink... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=symlink ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_SYMLINK 1" >>confdefs.h +$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5 -printf %s "checking for fchdir... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5 +$as_echo_n "checking for fchdir... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=fchdir ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h +$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5 -printf %s "checking for fsync... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5 +$as_echo_n "checking for fsync... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=fsync ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h +$as_echo "#define HAVE_FSYNC 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 -printf %s "checking for fdatasync... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 +$as_echo_n "checking for fdatasync... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=fdatasync ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h +$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5 -printf %s "checking for epoll... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5 +$as_echo_n "checking for epoll... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=epoll_create ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_EPOLL 1" >>confdefs.h +$as_echo "#define HAVE_EPOLL 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5 -printf %s "checking for epoll_create1... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5 +$as_echo_n "checking for epoll_create1... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=epoll_create1 ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h +$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5 -printf %s "checking for kqueue... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5 +$as_echo_n "checking for kqueue... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14215,28 +12104,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main (void) +main () { int x=kqueue() ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_KQUEUE 1" >>confdefs.h +$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5 -printf %s "checking for prlimit... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5 +$as_echo_n "checking for prlimit... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14244,55 +12132,53 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main (void) +main () { void *x=prlimit ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_PRLIMIT 1" >>confdefs.h +$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5 -printf %s "checking for _dyld_shared_cache_contains_path... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5 +$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=_dyld_shared_cache_contains_path ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h +$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5 -printf %s "checking for memfd_create... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5 +$as_echo_n "checking for memfd_create... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14304,29 +12190,28 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main (void) +main () { void *x=memfd_create ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h +$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5 -printf %s "checking for eventfd... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for eventfd" >&5 +$as_echo_n "checking for eventfd... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14335,26 +12220,25 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main (void) +main () { int x = eventfd(0, EFD_CLOEXEC) ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_EVENTFD 1" >>confdefs.h +$as_echo "#define HAVE_EVENTFD 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # On some systems (eg. FreeBSD 5), we would find a definition of the # functions ctermid_r, setgroups in the library, but no prototype @@ -14362,46 +12246,44 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # address to avoid compiler warnings and potential miscompilations # because of the missing prototypes. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5 -printf %s "checking for ctermid_r... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5 +$as_echo_n "checking for ctermid_r... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void* p = ctermid_r ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CTERMID_R 1" >>confdefs.h +$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5 -printf %s "checking for flock declaration... " >&6; } -if test ${ac_cv_flock_decl+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5 +$as_echo_n "checking for flock declaration... " >&6; } +if ${ac_cv_flock_decl+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void* p = flock @@ -14409,34 +12291,32 @@ void* p = flock return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_flock_decl=yes -else $as_nop +else ac_cv_flock_decl=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 -printf "%s\n" "$ac_cv_flock_decl" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 +$as_echo "$ac_cv_flock_decl" >&6; } if test "x${ac_cv_flock_decl}" = xyes; then - for ac_func in flock do : ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" -if test "x$ac_cv_func_flock" = xyes -then : - printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 -printf %s "checking for flock in -lbsd... " >&6; } -if test ${ac_cv_lib_bsd_flock+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test "x$ac_cv_func_flock" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FLOCK 1 +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 +$as_echo_n "checking for flock in -lbsd... " >&6; } +if ${ac_cv_lib_bsd_flock+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14445,111 +12325,109 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char flock (); int -main (void) +main () { return flock (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_flock=yes -else $as_nop +else ac_cv_lib_bsd_flock=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 -printf "%s\n" "$ac_cv_lib_bsd_flock" >&6; } -if test "x$ac_cv_lib_bsd_flock" = xyes -then : - printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 +$as_echo "$ac_cv_lib_bsd_flock" >&6; } +if test "x$ac_cv_lib_bsd_flock" = xyes; then : + $as_echo "#define HAVE_FLOCK 1" >>confdefs.h -printf "%s\n" "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h +$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h fi fi - done + fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 -printf %s "checking for getpagesize... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 +$as_echo_n "checking for getpagesize... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void* p = getpagesize ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h +$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5 -printf %s "checking for broken unsetenv... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5 +$as_echo_n "checking for broken unsetenv... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int res = unsetenv("DUMMY") ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -else $as_nop +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else -printf "%s\n" "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext for ac_prog in true do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_TRUE+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_TRUE+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$TRUE"; then ac_cv_prog_TRUE="$TRUE" # Let the user override the test. else @@ -14557,15 +12435,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_TRUE="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -14576,11 +12450,11 @@ fi fi TRUE=$ac_cv_prog_TRUE if test -n "$TRUE"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5 -printf "%s\n" "$TRUE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5 +$as_echo "$TRUE" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -14589,12 +12463,11 @@ done test -n "$TRUE" || TRUE="/bin/true" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5 -printf %s "checking for inet_aton in -lc... " >&6; } -if test ${ac_cv_lib_c_inet_aton+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5 +$as_echo_n "checking for inet_aton in -lc... " >&6; } +if ${ac_cv_lib_c_inet_aton+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14603,37 +12476,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char inet_aton (); int -main (void) +main () { return inet_aton (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_inet_aton=yes -else $as_nop +else ac_cv_lib_c_inet_aton=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 -printf "%s\n" "$ac_cv_lib_c_inet_aton" >&6; } -if test "x$ac_cv_lib_c_inet_aton" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 +$as_echo "$ac_cv_lib_c_inet_aton" >&6; } +if test "x$ac_cv_lib_c_inet_aton" = xyes; then : $ac_cv_prog_TRUE -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 -printf %s "checking for inet_aton in -lresolv... " >&6; } -if test ${ac_cv_lib_resolv_inet_aton+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 +$as_echo_n "checking for inet_aton in -lresolv... " >&6; } +if ${ac_cv_lib_resolv_inet_aton+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14642,30 +12515,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char inet_aton (); int -main (void) +main () { return inet_aton (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_resolv_inet_aton=yes -else $as_nop +else ac_cv_lib_resolv_inet_aton=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 -printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; } -if test "x$ac_cv_lib_resolv_inet_aton" = xyes -then : - printf "%s\n" "#define HAVE_LIBRESOLV 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 +$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } +if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESOLV 1 +_ACEOF LIBS="-lresolv $LIBS" @@ -14677,16 +12553,14 @@ fi # On Tru64, chflags seems to be present, but calling it will # exit Python -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5 -printf %s "checking for chflags... " >&6; } -if test ${ac_cv_have_chflags+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5 +$as_echo_n "checking for chflags... " >&6; } +if ${ac_cv_have_chflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_have_chflags=cross -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14700,10 +12574,9 @@ int main(int argc, char*argv[]) } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_have_chflags=yes -else $as_nop +else ac_cv_have_chflags=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -14712,34 +12585,31 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 -printf "%s\n" "$ac_cv_have_chflags" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 +$as_echo "$ac_cv_have_chflags" >&6; } if test "$ac_cv_have_chflags" = cross ; then ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" -if test "x$ac_cv_func_chflags" = xyes -then : +if test "x$ac_cv_func_chflags" = xyes; then : ac_cv_have_chflags="yes" -else $as_nop +else ac_cv_have_chflags="no" fi fi if test "$ac_cv_have_chflags" = yes ; then -printf "%s\n" "#define HAVE_CHFLAGS 1" >>confdefs.h +$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5 -printf %s "checking for lchflags... " >&6; } -if test ${ac_cv_have_lchflags+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5 +$as_echo_n "checking for lchflags... " >&6; } +if ${ac_cv_have_lchflags+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_have_lchflags=cross -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14753,10 +12623,9 @@ int main(int argc, char*argv[]) } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_have_lchflags=yes -else $as_nop +else ac_cv_have_lchflags=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -14765,21 +12634,20 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 -printf "%s\n" "$ac_cv_have_lchflags" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 +$as_echo "$ac_cv_have_lchflags" >&6; } if test "$ac_cv_have_lchflags" = cross ; then ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags" -if test "x$ac_cv_func_lchflags" = xyes -then : +if test "x$ac_cv_func_lchflags" = xyes; then : ac_cv_have_lchflags="yes" -else $as_nop +else ac_cv_have_lchflags="no" fi fi if test "$ac_cv_have_lchflags" = yes ; then -printf "%s\n" "#define HAVE_LCHFLAGS 1" >>confdefs.h +$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h fi @@ -14792,12 +12660,11 @@ Darwin/*) ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 -printf %s "checking for inflateCopy in -lz... " >&6; } -if test ${ac_cv_lib_z_inflateCopy+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 +$as_echo_n "checking for inflateCopy in -lz... " >&6; } +if ${ac_cv_lib_z_inflateCopy+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14806,31 +12673,32 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char inflateCopy (); int -main (void) +main () { return inflateCopy (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_inflateCopy=yes -else $as_nop +else ac_cv_lib_z_inflateCopy=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 -printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; } -if test "x$ac_cv_lib_z_inflateCopy" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 +$as_echo "$ac_cv_lib_z_inflateCopy" >&6; } +if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : -printf "%s\n" "#define HAVE_ZLIB_COPY 1" >>confdefs.h +$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h fi @@ -14842,38 +12710,37 @@ Darwin/*) ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5 -printf %s "checking for hstrerror... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5 +$as_echo_n "checking for hstrerror... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void* p = hstrerror; hstrerror(0) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_HSTRERROR 1" >>confdefs.h +$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 -printf %s "checking for inet_aton... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 +$as_echo_n "checking for inet_aton... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14883,30 +12750,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main (void) +main () { void* p = inet_aton;inet_aton(0,0) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h +$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 -printf %s "checking for inet_pton... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 +$as_echo_n "checking for inet_pton... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14916,30 +12782,29 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main (void) +main () { void* p = inet_pton ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h +$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # On some systems, setgroups is in unistd.h, on others, in grp.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5 -printf %s "checking for setgroups... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5 +$as_echo_n "checking for setgroups... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14949,44 +12814,42 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main (void) +main () { void* p = setgroups ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_SETGROUPS 1" >>confdefs.h +$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # check for openpty and forkpty - - for ac_func in openpty +for ac_func in openpty do : ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" -if test "x$ac_cv_func_openpty" = xyes -then : - printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 -printf %s "checking for openpty in -lutil... " >&6; } -if test ${ac_cv_lib_util_openpty+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test "x$ac_cv_func_openpty" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENPTY 1 +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 +$as_echo_n "checking for openpty in -lutil... " >&6; } +if ${ac_cv_lib_util_openpty+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14995,38 +12858,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char openpty (); int -main (void) +main () { return openpty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_util_openpty=yes -else $as_nop +else ac_cv_lib_util_openpty=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 -printf "%s\n" "$ac_cv_lib_util_openpty" >&6; } -if test "x$ac_cv_lib_util_openpty" = xyes -then : - printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 +$as_echo "$ac_cv_lib_util_openpty" >&6; } +if test "x$ac_cv_lib_util_openpty" = xyes; then : + $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h LIBS="$LIBS -lutil" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5 -printf %s "checking for openpty in -lbsd... " >&6; } -if test ${ac_cv_lib_bsd_openpty+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5 +$as_echo_n "checking for openpty in -lbsd... " >&6; } +if ${ac_cv_lib_bsd_openpty+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15035,30 +12898,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char openpty (); int -main (void) +main () { return openpty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_openpty=yes -else $as_nop +else ac_cv_lib_bsd_openpty=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5 -printf "%s\n" "$ac_cv_lib_bsd_openpty" >&6; } -if test "x$ac_cv_lib_bsd_openpty" = xyes -then : - printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5 +$as_echo "$ac_cv_lib_bsd_openpty" >&6; } +if test "x$ac_cv_lib_bsd_openpty" = xyes; then : + $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h LIBS="$LIBS -lbsd" fi @@ -15067,23 +12931,22 @@ fi fi - done - for ac_func in forkpty +for ac_func in forkpty do : ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty" -if test "x$ac_cv_func_forkpty" = xyes -then : - printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 -printf %s "checking for forkpty in -lutil... " >&6; } -if test ${ac_cv_lib_util_forkpty+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test "x$ac_cv_func_forkpty" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FORKPTY 1 +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 +$as_echo_n "checking for forkpty in -lutil... " >&6; } +if ${ac_cv_lib_util_forkpty+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15092,38 +12955,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char forkpty (); int -main (void) +main () { return forkpty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_util_forkpty=yes -else $as_nop +else ac_cv_lib_util_forkpty=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5 -printf "%s\n" "$ac_cv_lib_util_forkpty" >&6; } -if test "x$ac_cv_lib_util_forkpty" = xyes -then : - printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5 +$as_echo "$ac_cv_lib_util_forkpty" >&6; } +if test "x$ac_cv_lib_util_forkpty" = xyes; then : + $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h LIBS="$LIBS -lutil" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5 -printf %s "checking for forkpty in -lbsd... " >&6; } -if test ${ac_cv_lib_bsd_forkpty+y} -then : - printf %s "(cached) " >&6 -else $as_nop +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5 +$as_echo_n "checking for forkpty in -lbsd... " >&6; } +if ${ac_cv_lib_bsd_forkpty+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15132,30 +12995,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char forkpty (); int -main (void) +main () { return forkpty (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_forkpty=yes -else $as_nop +else ac_cv_lib_bsd_forkpty=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5 -printf "%s\n" "$ac_cv_lib_bsd_forkpty" >&6; } -if test "x$ac_cv_lib_bsd_forkpty" = xyes -then : - printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5 +$as_echo "$ac_cv_lib_bsd_forkpty" >&6; } +if test "x$ac_cv_lib_bsd_forkpty" = xyes; then : + $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h LIBS="$LIBS -lbsd" fi @@ -15164,54 +13028,28 @@ fi fi - done -# check for long file support functions -ac_fn_c_check_func "$LINENO" "fseek64" "ac_cv_func_fseek64" -if test "x$ac_cv_func_fseek64" = xyes -then : - printf "%s\n" "#define HAVE_FSEEK64 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fseeko" "ac_cv_func_fseeko" -if test "x$ac_cv_func_fseeko" = xyes -then : - printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "fstatvfs" "ac_cv_func_fstatvfs" -if test "x$ac_cv_func_fstatvfs" = xyes -then : - printf "%s\n" "#define HAVE_FSTATVFS 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ftell64" "ac_cv_func_ftell64" -if test "x$ac_cv_func_ftell64" = xyes -then : - printf "%s\n" "#define HAVE_FTELL64 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "ftello" "ac_cv_func_ftello" -if test "x$ac_cv_func_ftello" = xyes -then : - printf "%s\n" "#define HAVE_FTELLO 1" >>confdefs.h -fi -ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs" -if test "x$ac_cv_func_statvfs" = xyes -then : - printf "%s\n" "#define HAVE_STATVFS 1" >>confdefs.h +# check for long file support functions +for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" -if test "x$ac_cv_func_dup2" = xyes -then : - printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h +if test "x$ac_cv_func_dup2" = xyes; then : + $as_echo "#define HAVE_DUP2 1" >>confdefs.h -else $as_nop +else case " $LIBOBJS " in *" dup2.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS dup2.$ac_objext" @@ -15221,72 +13059,70 @@ esac fi - for ac_func in getpgrp +for ac_func in getpgrp do : ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp" -if test "x$ac_cv_func_getpgrp" = xyes -then : - printf "%s\n" "#define HAVE_GETPGRP 1" >>confdefs.h +if test "x$ac_cv_func_getpgrp" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETPGRP 1 +_ACEOF cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { getpgrp(0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define GETPGRP_HAVE_ARG 1" >>confdefs.h +$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - done - for ac_func in setpgrp +for ac_func in setpgrp do : ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp" -if test "x$ac_cv_func_setpgrp" = xyes -then : - printf "%s\n" "#define HAVE_SETPGRP 1" >>confdefs.h +if test "x$ac_cv_func_setpgrp" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SETPGRP 1 +_ACEOF cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { setpgrp(0,0); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define SETPGRP_HAVE_ARG 1" >>confdefs.h +$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - done + # We search for both crypt and crypt_r as one or the other may be defined # This gets us our -lcrypt in LIBS when required on the target platform. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 -printf %s "checking for library containing crypt... " >&6; } -if test ${ac_cv_search_crypt+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 +$as_echo_n "checking for library containing crypt... " >&6; } +if ${ac_cv_search_crypt+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15294,58 +13130,55 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char crypt (); int -main (void) +main () { return crypt (); ; return 0; } _ACEOF -for ac_lib in '' crypt -do +for ac_lib in '' crypt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_crypt=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_crypt+y} -then : + if ${ac_cv_search_crypt+:} false; then : break fi done -if test ${ac_cv_search_crypt+y} -then : +if ${ac_cv_search_crypt+:} false; then : -else $as_nop +else ac_cv_search_crypt=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 -printf "%s\n" "$ac_cv_search_crypt" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 +$as_echo "$ac_cv_search_crypt" >&6; } ac_res=$ac_cv_search_crypt -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5 -printf %s "checking for library containing crypt_r... " >&6; } -if test ${ac_cv_search_crypt_r+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5 +$as_echo_n "checking for library containing crypt_r... " >&6; } +if ${ac_cv_search_crypt_r+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15353,56 +13186,53 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char crypt_r (); int -main (void) +main () { return crypt_r (); ; return 0; } _ACEOF -for ac_lib in '' crypt -do +for ac_lib in '' crypt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_crypt_r=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_crypt_r+y} -then : + if ${ac_cv_search_crypt_r+:} false; then : break fi done -if test ${ac_cv_search_crypt_r+y} -then : +if ${ac_cv_search_crypt_r+:} false; then : -else $as_nop +else ac_cv_search_crypt_r=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 -printf "%s\n" "$ac_cv_search_crypt_r" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 +$as_echo "$ac_cv_search_crypt_r" >&6; } ac_res=$ac_cv_search_crypt_r -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r" -if test "x$ac_cv_func_crypt_r" = xyes -then : +if test "x$ac_cv_func_crypt_r" = xyes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15410,7 +13240,7 @@ then : #include int -main (void) +main () { struct crypt_data d; @@ -15420,33 +13250,31 @@ char *r = crypt_r("", "", &d); return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CRYPT_R 1" >>confdefs.h +$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - - for ac_func in clock_gettime +for ac_func in clock_gettime do : ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" -if test "x$ac_cv_func_clock_gettime" = xyes -then : - printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 -printf %s "checking for clock_gettime in -lrt... " >&6; } -if test ${ac_cv_lib_rt_clock_gettime+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test "x$ac_cv_func_clock_gettime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CLOCK_GETTIME 1 +_ACEOF + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15455,60 +13283,60 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char clock_gettime (); int -main (void) +main () { return clock_gettime (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes -else $as_nop +else ac_cv_lib_rt_clock_gettime=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 -printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; } -if test "x$ac_cv_lib_rt_clock_gettime" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : LIBS="$LIBS -lrt" - printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h + $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h -printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h +$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h fi fi - done - for ac_func in clock_getres +for ac_func in clock_getres do : ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" -if test "x$ac_cv_func_clock_getres" = xyes -then : - printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5 -printf %s "checking for clock_getres in -lrt... " >&6; } -if test ${ac_cv_lib_rt_clock_getres+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test "x$ac_cv_func_clock_getres" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CLOCK_GETRES 1 +_ACEOF + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5 +$as_echo_n "checking for clock_getres in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_getres+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15517,56 +13345,56 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char clock_getres (); int -main (void) +main () { return clock_getres (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_getres=yes -else $as_nop +else ac_cv_lib_rt_clock_getres=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5 -printf "%s\n" "$ac_cv_lib_rt_clock_getres" >&6; } -if test "x$ac_cv_lib_rt_clock_getres" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5 +$as_echo "$ac_cv_lib_rt_clock_getres" >&6; } +if test "x$ac_cv_lib_rt_clock_getres" = xyes; then : - printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h + $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi fi - done - for ac_func in clock_settime +for ac_func in clock_settime do : ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime" -if test "x$ac_cv_func_clock_settime" = xyes -then : - printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h - -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5 -printf %s "checking for clock_settime in -lrt... " >&6; } -if test ${ac_cv_lib_rt_clock_settime+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test "x$ac_cv_func_clock_settime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CLOCK_SETTIME 1 +_ACEOF + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5 +$as_echo_n "checking for clock_settime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_settime+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -15575,42 +13403,43 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char clock_settime (); int -main (void) +main () { return clock_settime (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_settime=yes -else $as_nop +else ac_cv_lib_rt_clock_settime=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5 -printf "%s\n" "$ac_cv_lib_rt_clock_settime" >&6; } -if test "x$ac_cv_lib_rt_clock_settime" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5 +$as_echo "$ac_cv_lib_rt_clock_settime" >&6; } +if test "x$ac_cv_lib_rt_clock_settime" = xyes; then : - printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h + $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h fi fi - done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for major" >&5 -printf %s "checking for major... " >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5 +$as_echo_n "checking for major... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15623,7 +13452,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #endif int -main (void) +main () { makedev(major(0),minor(0)); @@ -15632,28 +13461,27 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : -printf "%s\n" "#define HAVE_DEVICE_MACROS 1" >>confdefs.h +$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # On OSF/1 V5.1, getaddrinfo is available, but a define # for [no]getaddrinfo in netdb.h. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 -printf %s "checking for getaddrinfo... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 +$as_echo_n "checking for getaddrinfo... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15663,40 +13491,37 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main (void) +main () { getaddrinfo(NULL, NULL, NULL, NULL); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_getaddrinfo=yes -else $as_nop +else have_getaddrinfo=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5 -printf "%s\n" "$have_getaddrinfo" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5 +$as_echo "$have_getaddrinfo" >&6; } if test $have_getaddrinfo = yes then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5 -printf %s "checking getaddrinfo bug... " >&6; } - if test ${ac_cv_buggy_getaddrinfo+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5 +$as_echo_n "checking getaddrinfo bug... " >&6; } + if ${ac_cv_buggy_getaddrinfo+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : if test "${enable_ipv6+set}" = set; then ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" else ac_cv_buggy_getaddrinfo=yes fi -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15790,10 +13615,9 @@ int main() } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_buggy_getaddrinfo=no -else $as_nop +else ac_cv_buggy_getaddrinfo=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -15804,8 +13628,8 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5 -printf "%s\n" "$ac_cv_buggy_getaddrinfo" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5 +$as_echo "$ac_cv_buggy_getaddrinfo" >&6; } if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes then @@ -15817,42 +13641,70 @@ then fi else -printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h +$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h fi -ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" -if test "x$ac_cv_func_getnameinfo" = xyes -then : - printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h +for ac_func in getnameinfo +do : + ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" +if test "x$ac_cv_func_getnameinfo" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETNAMEINFO 1 +_ACEOF fi +done # checks for structures +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes +else + ac_cv_header_time=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } +if test $ac_cv_header_time = yes; then -# Obsolete code to be removed. -if test $ac_cv_header_sys_time_h = yes; then - -printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi -# End of obsolete code. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 -printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test ${ac_cv_struct_tm+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 +$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +if ${ac_cv_struct_tm+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main (void) +main () { struct tm tm; int *p = &tm.tm_sec; @@ -15861,19 +13713,18 @@ struct tm tm; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h -else $as_nop +else ac_cv_struct_tm=sys/time.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 -printf "%s\n" "$ac_cv_struct_tm" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 +$as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then -printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h +$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi @@ -15881,35 +13732,37 @@ ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_ #include <$ac_cv_struct_tm> " -if test "x$ac_cv_member_struct_tm_tm_zone" = xyes -then : +if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_TM_TM_ZONE 1 +_ACEOF fi if test "$ac_cv_member_struct_tm_tm_zone" = yes; then -printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h +$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h else - ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_tzname" = xyes -then : + ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include +" +if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 -printf %s "checking for tzname... " >&6; } -if test ${ac_cv_var_tzname+y} -then : - printf %s "(cached) " >&6 -else $as_nop +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_TZNAME $ac_have_decl +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 +$as_echo_n "checking for tzname... " >&6; } +if ${ac_cv_var_tzname+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -15918,81 +13771,86 @@ extern char *tzname[]; #endif int -main (void) +main () { return tzname[0][0]; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_var_tzname=yes -else $as_nop +else ac_cv_var_tzname=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 -printf "%s\n" "$ac_cv_var_tzname" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 +$as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then -printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h +$as_echo "#define HAVE_TZNAME 1" >>confdefs.h fi fi ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_rdev" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_RDEV 1 +_ACEOF fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blksize" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +_ACEOF fi ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_flags" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_STAT_ST_FLAGS 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_FLAGS 1 +_ACEOF fi ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_gen" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_STAT_ST_GEN 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_GEN 1 +_ACEOF fi ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 +_ACEOF fi ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" -if test "x$ac_cv_member_struct_stat_st_blocks" = xyes -then : +if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_STAT_ST_BLOCKS 1 +_ACEOF fi @@ -16002,10 +13860,11 @@ ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_p #include " -if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes -then : +if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_GECOS 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PASSWD_PW_GECOS 1 +_ACEOF fi @@ -16014,10 +13873,11 @@ ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_ #include " -if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes -then : +if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then : -printf "%s\n" "#define HAVE_STRUCT_PASSWD_PW_PASSWD 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PASSWD_PW_PASSWD 1 +_ACEOF fi @@ -16025,54 +13885,53 @@ fi # Issue #21085: In Cygwin, siginfo_t does not have si_band field. ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include " -if test "x$ac_cv_member_siginfo_t_si_band" = xyes -then : +if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then : -printf "%s\n" "#define HAVE_SIGINFO_T_SI_BAND 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_SIGINFO_T_SI_BAND 1 +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5 -printf %s "checking for time.h that defines altzone... " >&6; } -if test ${ac_cv_header_time_altzone+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5 +$as_echo_n "checking for time.h that defines altzone... " >&6; } +if ${ac_cv_header_time_altzone+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { return altzone; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time_altzone=yes -else $as_nop +else ac_cv_header_time_altzone=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5 -printf "%s\n" "$ac_cv_header_time_altzone" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5 +$as_echo "$ac_cv_header_time_altzone" >&6; } if test $ac_cv_header_time_altzone = yes; then -printf "%s\n" "#define HAVE_ALTZONE 1" >>confdefs.h +$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h fi was_it_defined=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5 -printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16081,102 +13940,96 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main (void) +main () { ; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h +$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h was_it_defined=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5 -printf "%s\n" "$was_it_defined" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5 +$as_echo "$was_it_defined" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5 -printf %s "checking for addrinfo... " >&6; } -if test ${ac_cv_struct_addrinfo+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5 +$as_echo_n "checking for addrinfo... " >&6; } +if ${ac_cv_struct_addrinfo+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { struct addrinfo a ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_addrinfo=yes -else $as_nop +else ac_cv_struct_addrinfo=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5 -printf "%s\n" "$ac_cv_struct_addrinfo" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5 +$as_echo "$ac_cv_struct_addrinfo" >&6; } if test $ac_cv_struct_addrinfo = yes; then -printf "%s\n" "#define HAVE_ADDRINFO 1" >>confdefs.h +$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5 -printf %s "checking for sockaddr_storage... " >&6; } -if test ${ac_cv_struct_sockaddr_storage+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5 +$as_echo_n "checking for sockaddr_storage... " >&6; } +if ${ac_cv_struct_sockaddr_storage+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include # include int -main (void) +main () { struct sockaddr_storage s ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_sockaddr_storage=yes -else $as_nop +else ac_cv_struct_sockaddr_storage=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 -printf "%s\n" "$ac_cv_struct_sockaddr_storage" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 +$as_echo "$ac_cv_struct_sockaddr_storage" >&6; } if test $ac_cv_struct_sockaddr_storage = yes; then -printf "%s\n" "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h +$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5 -printf %s "checking for sockaddr_alg... " >&6; } -if test ${ac_cv_struct_sockaddr_alg+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5 +$as_echo_n "checking for sockaddr_alg... " >&6; } +if ${ac_cv_struct_sockaddr_alg+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16184,43 +14037,41 @@ else $as_nop # include # include int -main (void) +main () { struct sockaddr_alg s ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_sockaddr_alg=yes -else $as_nop +else ac_cv_struct_sockaddr_alg=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5 -printf "%s\n" "$ac_cv_struct_sockaddr_alg" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5 +$as_echo "$ac_cv_struct_sockaddr_alg" >&6; } if test $ac_cv_struct_sockaddr_alg = yes; then -printf "%s\n" "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h +$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h fi # checks for compiler characteristics -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 -printf %s "checking whether char is unsigned... " >&6; } -if test ${ac_cv_c_char_unsigned+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 +$as_echo_n "checking whether char is unsigned... " >&6; } +if ${ac_cv_c_char_unsigned+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { static int test_array [1 - 2 * !(((char) -1) < 0)]; test_array [0] = 0; @@ -16230,32 +14081,30 @@ return test_array [0]; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_char_unsigned=no -else $as_nop +else ac_cv_c_char_unsigned=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 -printf "%s\n" "$ac_cv_c_char_unsigned" >&6; } -if test $ac_cv_c_char_unsigned = yes; then - printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 +$as_echo "$ac_cv_c_char_unsigned" >&6; } +if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then + $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 -printf %s "checking for an ANSI C-conforming const... " >&6; } -if test ${ac_cv_c_const+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if ${ac_cv_c_const+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __cplusplus @@ -16268,7 +14117,7 @@ main (void) /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; - /* IBM XL C 1.02.0.0 rejects this. + /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -16296,7 +14145,7 @@ main (void) iptr p = 0; ++p; } - { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying + { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; @@ -16312,78 +14161,75 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes -else $as_nop +else ac_cv_c_const=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 -printf "%s\n" "$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -printf "%s\n" "#define const /**/" >>confdefs.h +$as_echo "#define const /**/" >>confdefs.h fi works=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5 -printf %s "checking for working signed char... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5 +$as_echo_n "checking for working signed char... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { signed char c; ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : works=yes -else $as_nop +else -printf "%s\n" "#define signed /**/" >>confdefs.h +$as_echo "#define signed /**/" >>confdefs.h fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5 -printf "%s\n" "$works" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5 +$as_echo "$works" >&6; } have_prototypes=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5 -printf %s "checking for prototypes... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5 +$as_echo_n "checking for prototypes... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(int x) { return 0; } int -main (void) +main () { return foo(10); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_PROTOTYPES 1" >>confdefs.h +$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h have_prototypes=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5 -printf "%s\n" "$have_prototypes" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5 +$as_echo "$have_prototypes" >&6; } works=no -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5 -printf %s "checking for variable length prototypes and stdarg.h... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5 +$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16398,29 +14244,28 @@ int foo(int x, ...) { } int -main (void) +main () { return foo(10, "", 3.14); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h +$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h works=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $works" >&5 -printf "%s\n" "$works" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5 +$as_echo "$works" >&6; } # check for socketpair -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5 -printf %s "checking for socketpair... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5 +$as_echo_n "checking for socketpair... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16428,36 +14273,35 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext #include int -main (void) +main () { void *x=socketpair ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h +$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # check if sockaddr has sa_len member -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5 -printf %s "checking if sockaddr has sa_len member... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5 +$as_echo_n "checking if sockaddr has sa_len member... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int -main (void) +main () { struct sockaddr x; x.sa_len = 0; @@ -16465,31 +14309,29 @@ x.sa_len = 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -printf "%s\n" "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h +$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" -if test "x$ac_cv_func_gethostbyname_r" = xyes -then : +if test "x$ac_cv_func_gethostbyname_r" = xyes; then : - printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5 -printf %s "checking gethostbyname_r with 6 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5 +$as_echo_n "checking gethostbyname_r with 6 args... " >&6; } OLD_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16498,7 +14340,7 @@ printf %s "checking gethostbyname_r with 6 args... " >&6; } # include int -main (void) +main () { char *name; @@ -16513,30 +14355,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h -printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h +$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5 -printf %s "checking gethostbyname_r with 5 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5 +$as_echo_n "checking gethostbyname_r with 5 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include int -main (void) +main () { char *name; @@ -16551,30 +14392,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h -printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h +$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5 -printf %s "checking gethostbyname_r with 3 args... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5 +$as_echo_n "checking gethostbyname_r with 3 args... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include int -main (void) +main () { char *name; @@ -16587,40 +14427,43 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : - printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h + $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h -printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h +$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$OLD_CFLAGS -else $as_nop +else + for ac_func in gethostbyname +do : ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -if test "x$ac_cv_func_gethostbyname" = xyes -then : - printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h +if test "x$ac_cv_func_gethostbyname" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETHOSTBYNAME 1 +_ACEOF fi +done fi @@ -16636,16 +14479,14 @@ fi # Linux requires this for correct f.p. operations ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control" -if test "x$ac_cv_func___fpu_control" = xyes -then : - -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5 -printf %s "checking for __fpu_control in -lieee... " >&6; } -if test ${ac_cv_lib_ieee___fpu_control+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if test "x$ac_cv_func___fpu_control" = xyes; then : + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5 +$as_echo_n "checking for __fpu_control in -lieee... " >&6; } +if ${ac_cv_lib_ieee___fpu_control+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16654,30 +14495,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char __fpu_control (); int -main (void) +main () { return __fpu_control (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ieee___fpu_control=yes -else $as_nop +else ac_cv_lib_ieee___fpu_control=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5 -printf "%s\n" "$ac_cv_lib_ieee___fpu_control" >&6; } -if test "x$ac_cv_lib_ieee___fpu_control" = xyes -then : - printf "%s\n" "#define HAVE_LIBIEEE 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5 +$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } +if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBIEEE 1 +_ACEOF LIBS="-lieee $LIBS" @@ -16693,51 +14537,49 @@ case $ac_sys_system in Darwin) ;; *) LIBM=-lm esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5 -printf %s "checking for --with-libm=STRING... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5 +$as_echo_n "checking for --with-libm=STRING... " >&6; } # Check whether --with-libm was given. -if test ${with_libm+y} -then : +if test "${with_libm+set}" = set; then : withval=$with_libm; if test "$withval" = no then LIBM= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5 -printf "%s\n" "force LIBM empty" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5 +$as_echo "force LIBM empty" >&6; } elif test "$withval" != yes then LIBM=$withval - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5 -printf "%s\n" "set LIBM=\"$withval\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5 +$as_echo "set LIBM=\"$withval\"" >&6; } else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5 fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5 -printf "%s\n" "default LIBM=\"$LIBM\"" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5 +$as_echo "default LIBM=\"$LIBM\"" >&6; } fi # check for --with-libc=... -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5 -printf %s "checking for --with-libc=STRING... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5 +$as_echo_n "checking for --with-libc=STRING... " >&6; } # Check whether --with-libc was given. -if test ${with_libc+y} -then : +if test "${with_libc+set}" = set; then : withval=$with_libc; if test "$withval" = no then LIBC= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5 -printf "%s\n" "force LIBC empty" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5 +$as_echo "force LIBC empty" >&6; } elif test "$withval" != yes then LIBC=$withval - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5 -printf "%s\n" "set LIBC=\"$withval\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5 +$as_echo "set LIBC=\"$withval\"" >&6; } else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5 fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5 -printf "%s\n" "default LIBC=\"$LIBC\"" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5 +$as_echo "default LIBC=\"$LIBC\"" >&6; } fi @@ -16745,13 +14587,13 @@ fi # * Check for gcc x64 inline assembler * # ************************************** -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5 -printf %s "checking for x64 gcc inline assembler... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5 +$as_echo_n "checking for x64 gcc inline assembler... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { __asm__ __volatile__ ("movq %rcx, %rax"); @@ -16760,20 +14602,19 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_gcc_asm_for_x64=yes -else $as_nop +else have_gcc_asm_for_x64=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5 -printf "%s\n" "$have_gcc_asm_for_x64" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5 +$as_echo "$have_gcc_asm_for_x64" >&6; } if test "$have_gcc_asm_for_x64" = yes then -printf "%s\n" "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h +$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h fi @@ -16781,12 +14622,11 @@ fi # * Check for various properties of floating point * # ************************************************** -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5 -printf %s "checking whether float word ordering is bigendian... " >&6; } -if test ${ax_cv_c_float_words_bigendian+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5 +$as_echo_n "checking whether float word ordering is bigendian... " >&6; } +if ${ax_cv_c_float_words_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_cv_c_float_words_bigendian=unknown @@ -16798,8 +14638,7 @@ double d = 909042349670368103374704789055050114762116927356156320147971208440534 _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : if grep noonsees conftest.$ac_objext >/dev/null ; then @@ -16815,15 +14654,15 @@ fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5 -printf "%s\n" "$ax_cv_c_float_words_bigendian" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5 +$as_echo "$ax_cv_c_float_words_bigendian" >&6; } case $ax_cv_c_float_words_bigendian in yes) -printf "%s\n" "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h +$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h ;; no) ;; @@ -16840,12 +14679,12 @@ esac if test "$ax_cv_c_float_words_bigendian" = "yes" then -printf "%s\n" "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h +$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h elif test "$ax_cv_c_float_words_bigendian" = "no" then -printf "%s\n" "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h +$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h else # Some ARM platforms use a mixed-endian representation for doubles. @@ -16855,7 +14694,7 @@ else # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big # or little, then it must be this? -printf "%s\n" "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h +$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h fi @@ -16869,13 +14708,13 @@ fi # This inline assembler syntax may also work for suncc and icc, # so we try it on all platforms. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 -printf %s "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 +$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { unsigned short cw; @@ -16886,30 +14725,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_gcc_asm_for_x87=yes -else $as_nop +else have_gcc_asm_for_x87=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5 -printf "%s\n" "$have_gcc_asm_for_x87" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5 +$as_echo "$have_gcc_asm_for_x87" >&6; } if test "$have_gcc_asm_for_x87" = yes then -printf "%s\n" "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h +$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5 -printf %s "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5 +$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { unsigned int fpcr; @@ -16920,20 +14758,19 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_gcc_asm_for_mc68881=yes -else $as_nop +else have_gcc_asm_for_mc68881=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5 -printf "%s\n" "$have_gcc_asm_for_mc68881" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5 +$as_echo "$have_gcc_asm_for_mc68881" >&6; } if test "$have_gcc_asm_for_mc68881" = yes then -printf "%s\n" "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h +$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h fi @@ -16942,15 +14779,14 @@ fi # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding # mode is round-to-nearest and double rounding issues are present, and # 0 otherwise. See http://bugs.python.org/issue2937 for more info. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5 -printf %s "checking for x87-style double rounding... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5 +$as_echo_n "checking for x87-style double rounding... " >&6; } # $BASECFLAGS may affect the result ac_save_cc="$CC" CC="$CC $BASECFLAGS" -if test "$cross_compiling" = yes -then : +if test "$cross_compiling" = yes; then : ac_cv_x87_double_rounding=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -16974,10 +14810,9 @@ int main() { } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_x87_double_rounding=no -else $as_nop +else ac_cv_x87_double_rounding=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -16985,12 +14820,12 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi CC="$ac_save_cc" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5 -printf "%s\n" "$ac_cv_x87_double_rounding" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5 +$as_echo "$ac_cv_x87_double_rounding" >&6; } if test "$ac_cv_x87_double_rounding" = yes then -printf "%s\n" "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h +$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h fi @@ -17001,125 +14836,63 @@ fi LIBS_SAVE=$LIBS LIBS="$LIBS $LIBM" -ac_fn_c_check_func "$LINENO" "acosh" "ac_cv_func_acosh" -if test "x$ac_cv_func_acosh" = xyes -then : - printf "%s\n" "#define HAVE_ACOSH 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "asinh" "ac_cv_func_asinh" -if test "x$ac_cv_func_asinh" = xyes -then : - printf "%s\n" "#define HAVE_ASINH 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "atanh" "ac_cv_func_atanh" -if test "x$ac_cv_func_atanh" = xyes -then : - printf "%s\n" "#define HAVE_ATANH 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "copysign" "ac_cv_func_copysign" -if test "x$ac_cv_func_copysign" = xyes -then : - printf "%s\n" "#define HAVE_COPYSIGN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "erf" "ac_cv_func_erf" -if test "x$ac_cv_func_erf" = xyes -then : - printf "%s\n" "#define HAVE_ERF 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "erfc" "ac_cv_func_erfc" -if test "x$ac_cv_func_erfc" = xyes -then : - printf "%s\n" "#define HAVE_ERFC 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "expm1" "ac_cv_func_expm1" -if test "x$ac_cv_func_expm1" = xyes -then : - printf "%s\n" "#define HAVE_EXPM1 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite" -if test "x$ac_cv_func_finite" = xyes -then : - printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "gamma" "ac_cv_func_gamma" -if test "x$ac_cv_func_gamma" = xyes -then : - printf "%s\n" "#define HAVE_GAMMA 1" >>confdefs.h - -fi - -ac_fn_c_check_func "$LINENO" "hypot" "ac_cv_func_hypot" -if test "x$ac_cv_func_hypot" = xyes -then : - printf "%s\n" "#define HAVE_HYPOT 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "lgamma" "ac_cv_func_lgamma" -if test "x$ac_cv_func_lgamma" = xyes -then : - printf "%s\n" "#define HAVE_LGAMMA 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "log1p" "ac_cv_func_log1p" -if test "x$ac_cv_func_log1p" = xyes -then : - printf "%s\n" "#define HAVE_LOG1P 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2" -if test "x$ac_cv_func_log2" = xyes -then : - printf "%s\n" "#define HAVE_LOG2 1" >>confdefs.h +for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_func "$LINENO" "round" "ac_cv_func_round" -if test "x$ac_cv_func_round" = xyes -then : - printf "%s\n" "#define HAVE_ROUND 1" >>confdefs.h +done -fi -ac_fn_c_check_func "$LINENO" "tgamma" "ac_cv_func_tgamma" -if test "x$ac_cv_func_tgamma" = xyes -then : - printf "%s\n" "#define HAVE_TGAMMA 1" >>confdefs.h +for ac_func in hypot lgamma log1p log2 round tgamma +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done -ac_fn_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_isinf" = xyes -then : +ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include +" +if test "x$ac_cv_have_decl_isinf" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_ISINF $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_isnan" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISINF $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include +" +if test "x$ac_cv_have_decl_isnan" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_ISNAN $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_isfinite" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISNAN $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include +" +if test "x$ac_cv_have_decl_isfinite" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_ISFINITE $ac_have_decl" >>confdefs.h + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISFINITE $ac_have_decl +_ACEOF # For multiprocessing module, check that sem_open @@ -17127,16 +14900,14 @@ printf "%s\n" "#define HAVE_DECL_ISFINITE $ac_have_decl" >>confdefs.h # the kernel module that provides POSIX semaphores # isn't loaded by default, so an attempt to call # sem_open results in a 'Signal 12' error. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5 -printf %s "checking whether POSIX semaphores are enabled... " >&6; } -if test ${ac_cv_posix_semaphores_enabled+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5 +$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; } +if ${ac_cv_posix_semaphores_enabled+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_posix_semaphores_enabled=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17158,10 +14929,9 @@ int main(void) { } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_posix_semaphores_enabled=yes -else $as_nop +else ac_cv_posix_semaphores_enabled=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -17171,26 +14941,24 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5 -printf "%s\n" "$ac_cv_posix_semaphores_enabled" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5 +$as_echo "$ac_cv_posix_semaphores_enabled" >&6; } if test $ac_cv_posix_semaphores_enabled = no then -printf "%s\n" "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h +$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h fi # Multiprocessing check for broken sem_getvalue -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5 -printf %s "checking for broken sem_getvalue... " >&6; } -if test ${ac_cv_broken_sem_getvalue+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5 +$as_echo_n "checking for broken sem_getvalue... " >&6; } +if ${ac_cv_broken_sem_getvalue+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_broken_sem_getvalue=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17216,10 +14984,9 @@ int main(void){ } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_broken_sem_getvalue=no -else $as_nop +else ac_cv_broken_sem_getvalue=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -17229,95 +14996,110 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5 -printf "%s\n" "$ac_cv_broken_sem_getvalue" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5 +$as_echo "$ac_cv_broken_sem_getvalue" >&6; } if test $ac_cv_broken_sem_getvalue = yes then -printf "%s\n" "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h fi -ac_fn_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes -then : +ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include +" +if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_RTLD_LAZY $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_RTLD_NOW" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTLD_LAZY $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include +" +if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_RTLD_NOW $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTLD_NOW $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include +" +if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include +" +if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_RTLD_LOCAL $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTLD_LOCAL $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include +" +if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_RTLD_NODELETE $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTLD_NODELETE $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include +" +if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include +" +if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes -then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include +" +if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_RTLD_MEMBER $ac_have_decl" >>confdefs.h + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_RTLD_MEMBER $ac_have_decl +_ACEOF # determine what size digit to use for Python's longs -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5 -printf %s "checking digit size for Python's longs... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5 +$as_echo_n "checking digit size for Python's longs... " >&6; } # Check whether --enable-big-digits was given. -if test ${enable_big_digits+y} -then : +if test "${enable_big_digits+set}" = set; then : enableval=$enable_big_digits; case $enable_big_digits in yes) enable_big_digits=30 ;; @@ -17328,34 +15110,36 @@ no) *) as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5 -printf "%s\n" "$enable_big_digits" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5 +$as_echo "$enable_big_digits" >&6; } -printf "%s\n" "#define PYLONG_BITS_IN_DIGIT $enable_big_digits" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PYLONG_BITS_IN_DIGIT $enable_big_digits +_ACEOF -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 -printf "%s\n" "no value specified" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 +$as_echo "no value specified" >&6; } fi # check for wchar.h -ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" -if test "x$ac_cv_header_wchar_h" = xyes -then : +ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" +if test "x$ac_cv_header_wchar_h" = xyes; then : -printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h +$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h wchar_h="yes" -else $as_nop +else wchar_h="no" fi + # determine wchar_t size if test "$wchar_h" = yes then @@ -17363,20 +15147,18 @@ then # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 -printf %s "checking size of wchar_t... " >&6; } -if test ${ac_cv_sizeof_wchar_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 +$as_echo_n "checking size of wchar_t... " >&6; } +if ${ac_cv_sizeof_wchar_t+:} false; then : + $as_echo_n "(cached) " >&6 +else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include -" -then : +"; then : -else $as_nop +else if test "$ac_cv_type_wchar_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (wchar_t) See \`config.log' for more details" "$LINENO" 5; } else @@ -17385,18 +15167,20 @@ See \`config.log' for more details" "$LINENO" 5; } fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 -printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 +$as_echo "$ac_cv_sizeof_wchar_t" >&6; } -printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t +_ACEOF fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5 -printf %s "checking for UCS-4 tcl... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5 +$as_echo_n "checking for UCS-4 tcl... " >&6; } have_ucs4_tcl=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17406,41 +15190,38 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext # error "NOT UCS4_TCL" #endif int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_UCS4_TCL 1" >>confdefs.h +$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h have_ucs4_tcl=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5 -printf "%s\n" "$have_ucs4_tcl" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5 +$as_echo "$have_ucs4_tcl" >&6; } # check whether wchar_t is signed or not if test "$wchar_h" = yes then # check whether wchar_t is signed or not - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5 -printf %s "checking whether wchar_t is signed... " >&6; } - if test ${ac_cv_wchar_t_signed+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - if test "$cross_compiling" = yes -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5 +$as_echo_n "checking whether wchar_t is signed... " >&6; } + if ${ac_cv_wchar_t_signed+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : ac_cv_wchar_t_signed=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17452,10 +15233,9 @@ else $as_nop } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_wchar_t_signed=yes -else $as_nop +else ac_cv_wchar_t_signed=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -17464,33 +15244,32 @@ fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5 -printf "%s\n" "$ac_cv_wchar_t_signed" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5 +$as_echo "$ac_cv_wchar_t_signed" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5 -printf %s "checking whether wchar_t is usable... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5 +$as_echo_n "checking whether wchar_t is usable... " >&6; } # wchar_t is only usable if it maps to an unsigned type if test "$ac_cv_sizeof_wchar_t" -ge 2 \ -a "$ac_cv_wchar_t_signed" = "no" then -printf "%s\n" "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h +$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # check for endianness - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 -printf %s "checking whether byte ordering is bigendian... " >&6; } -if test ${ac_cv_c_bigendian+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17501,8 +15280,7 @@ else $as_nop typedef int dummy; _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. @@ -17526,7 +15304,7 @@ then : fi done fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17535,7 +15313,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include int -main (void) +main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ @@ -17547,8 +15325,7 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17556,7 +15333,7 @@ then : #include int -main (void) +main () { #if BYTE_ORDER != BIG_ENDIAN not big endian @@ -17566,15 +15343,14 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes -else $as_nop +else ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). @@ -17583,7 +15359,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext #include int -main (void) +main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros @@ -17593,15 +15369,14 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef _BIG_ENDIAN not big endian @@ -17611,33 +15386,31 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes -else $as_nop +else ac_cv_c_bigendian=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -unsigned short int ascii_mm[] = +short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - unsigned short int ascii_ii[] = + short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } - unsigned short int ebcdic_ii[] = + short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - unsigned short int ebcdic_mm[] = + short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; @@ -17645,15 +15418,14 @@ unsigned short int ascii_mm[] = extern int foo; int -main (void) +main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi @@ -17666,13 +15438,13 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int -main (void) +main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -17688,10 +15460,9 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no -else $as_nop +else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -17700,17 +15471,17 @@ fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 -printf "%s\n" "$ac_cv_c_bigendian" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) - printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) -printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) @@ -17735,15 +15506,15 @@ printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h # In Python 3.2 and older, --with-wide-unicode added a 'u' flag. # In Python 3.7 and older, --with-pymalloc added a 'm' flag. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5 -printf %s "checking ABIFLAGS... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5 -printf "%s\n" "$ABIFLAGS" >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 -printf %s "checking SOABI... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5 +$as_echo_n "checking ABIFLAGS... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5 +$as_echo "$ABIFLAGS" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 +$as_echo_n "checking SOABI... " >&6; } SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5 -printf "%s\n" "$SOABI" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5 +$as_echo "$SOABI" >&6; } # Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then @@ -17751,18 +15522,20 @@ if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} -printf "%s\n" "#define ALT_SOABI \"${ALT_SOABI}\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define ALT_SOABI "${ALT_SOABI}" +_ACEOF fi EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5 -printf %s "checking LDVERSION... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5 +$as_echo_n "checking LDVERSION... " >&6; } LDVERSION='$(VERSION)$(ABIFLAGS)' -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5 -printf "%s\n" "$LDVERSION" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5 +$as_echo "$LDVERSION" >&6; } # On Android and Cygwin the shared libraries must be linked with libpython. @@ -17781,12 +15554,11 @@ BINLIBDEST='$(LIBDIR)/python$(VERSION)' # /usr/$LIDIRNAME/python$VERSION PLATLIBDIR="lib" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5 -printf %s "checking for --with-platlibdir... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-platlibdir" >&5 +$as_echo_n "checking for --with-platlibdir... " >&6; } # Check whether --with-platlibdir was given. -if test ${with_platlibdir+y} -then : +if test "${with_platlibdir+set}" = set; then : withval=$with_platlibdir; # ignore 3 options: # --with-platlibdir @@ -17794,17 +15566,17 @@ then : # --without-platlibdir if test -n "$withval" -a "$withval" != yes -a "$withval" != no then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } PLATLIBDIR="$withval" BINLIBDEST='${exec_prefix}/${PLATLIBDIR}/python$(VERSION)' else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -17820,40 +15592,37 @@ fi # Check for --with-wheel-pkg-dir=PATH WHEEL_PKG_DIR="" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5 -printf %s "checking for --with-wheel-pkg-dir... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wheel-pkg-dir" >&5 +$as_echo_n "checking for --with-wheel-pkg-dir... " >&6; } # Check whether --with-wheel-pkg-dir was given. -if test ${with_wheel_pkg_dir+y} -then : +if test "${with_wheel_pkg_dir+set}" = set; then : withval=$with_wheel_pkg_dir; if test -n "$withval"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } WHEEL_PKG_DIR="$withval" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5 -printf %s "checking whether right shift extends the sign bit... " >&6; } -if test ${ac_cv_rshift_extends_sign+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5 +$as_echo_n "checking whether right shift extends the sign bit... " >&6; } +if ${ac_cv_rshift_extends_sign+:} false; then : + $as_echo_n "(cached) " >&6 +else + +if test "$cross_compiling" = yes; then : ac_cv_rshift_extends_sign=yes -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17863,10 +15632,9 @@ int main() } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_rshift_extends_sign=yes -else $as_nop +else ac_cv_rshift_extends_sign=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -17875,28 +15643,27 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5 -printf "%s\n" "$ac_cv_rshift_extends_sign" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5 +$as_echo "$ac_cv_rshift_extends_sign" >&6; } if test "$ac_cv_rshift_extends_sign" = no then -printf "%s\n" "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h +$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h fi # check for getc_unlocked and related locking functions -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5 -printf %s "checking for getc_unlocked() and friends... " >&6; } -if test ${ac_cv_have_getc_unlocked+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5 +$as_echo_n "checking for getc_unlocked() and friends... " >&6; } +if ${ac_cv_have_getc_unlocked+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen("/dev/null", "r"); @@ -17908,31 +15675,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_have_getc_unlocked=yes -else $as_nop +else ac_cv_have_getc_unlocked=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5 -printf "%s\n" "$ac_cv_have_getc_unlocked" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5 +$as_echo "$ac_cv_have_getc_unlocked" >&6; } if test "$ac_cv_have_getc_unlocked" = yes then -printf "%s\n" "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h +$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h fi # Check whether --with-readline was given. -if test ${with_readline+y} -then : +if test "${with_readline+set}" = set; then : withval=$with_readline; -else $as_nop +else with_readline=yes fi @@ -17947,7 +15712,7 @@ if test "$with_readline" != no; then editline|edit) LIBREADLINE=edit -printf "%s\n" "#define WITH_EDITLINE 1" >>confdefs.h +$as_echo "#define WITH_EDITLINE 1" >>confdefs.h ;; yes|readline) @@ -17961,8 +15726,8 @@ printf "%s\n" "#define WITH_EDITLINE 1" >>confdefs.h # On some systems we need to link readline to a termcap compatible # library. NOTE: Keep the precedence of listed libraries synchronised # with setup.py. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5 -printf %s "checking how to link readline libs... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5 +$as_echo_n "checking how to link readline libs... " >&6; } for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do if test -z "$py_libtermcap"; then READLINE_LIBS="-l$LIBREADLINE" @@ -17976,20 +15741,22 @@ printf %s "checking how to link readline libs... " >&6; } /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char readline (); int -main (void) +main () { return readline (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : py_cv_lib_readline=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $py_cv_lib_readline = yes; then break @@ -17999,20 +15766,20 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ # Uncomment this line if you want to use READLINE_LIBS in Makefile or scripts #AC_SUBST([READLINE_LIBS]) if test $py_cv_lib_readline = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 -printf "%s\n" "none" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5 -printf "%s\n" "$READLINE_LIBS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5 +$as_echo "$READLINE_LIBS" >&6; } -printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h +$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h fi fi if test "$py_cv_lib_readline" = yes; then # check for readline 2.2 - ac_fn_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" " + ac_fn_c_check_decl "$LINENO" "rl_completion_append_character" "ac_cv_have_decl_rl_completion_append_character" " #include /* Must be first for Gnu Readline */ #ifdef WITH_EDITLINE # include @@ -18020,14 +15787,14 @@ if test "$py_cv_lib_readline" = yes; then # include #endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes -then : +" +if test "x$ac_cv_have_decl_rl_completion_append_character" = xyes; then : -printf "%s\n" "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h +$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h fi - ac_fn_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" " + + ac_fn_c_check_decl "$LINENO" "rl_completion_suppress_append" "ac_cv_have_decl_rl_completion_suppress_append" " #include /* Must be first for Gnu Readline */ #ifdef WITH_EDITLINE # include @@ -18035,22 +15802,21 @@ fi # include #endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes -then : +" +if test "x$ac_cv_have_decl_rl_completion_suppress_append" = xyes; then : -printf "%s\n" "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h +$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h fi + # check for readline 4.0 - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_pre_input_hook" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5 -printf %s "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_pre_input_hook" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -l$LIBREADLINE" >&5 +$as_echo_n "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18059,44 +15825,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char rl_pre_input_hook (); int -main (void) +main () { return rl_pre_input_hook (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : -printf "%s\n" "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h +$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h fi # also in 4.0 - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_display_matches_hook" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5 -printf %s "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_display_matches_hook" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -l$LIBREADLINE" >&5 +$as_echo_n "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18105,44 +15871,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char rl_completion_display_matches_hook (); int -main (void) +main () { return rl_completion_display_matches_hook (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : -printf "%s\n" "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h +$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h fi # also in 4.0, but not in editline - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_resize_terminal" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5 -printf %s "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_resize_terminal" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -l$LIBREADLINE" >&5 +$as_echo_n "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18151,44 +15917,44 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char rl_resize_terminal (); int -main (void) +main () { return rl_resize_terminal (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : -printf "%s\n" "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h +$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h fi # check for readline 4.2 - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_rl_completion_matches" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5 -printf %s "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_rl_completion_matches" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -l$LIBREADLINE" >&5 +$as_echo_n "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18197,38 +15963,39 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char rl_completion_matches (); int -main (void) +main () { return rl_completion_matches (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : -printf "%s\n" "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h +$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h fi # also in readline 4.2 - ac_fn_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" " + ac_fn_c_check_decl "$LINENO" "rl_catch_signals" "ac_cv_have_decl_rl_catch_signals" " #include /* Must be first for Gnu Readline */ #ifdef WITH_EDITLINE # include @@ -18236,21 +16003,20 @@ fi # include #endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_rl_catch_signals" = xyes -then : +" +if test "x$ac_cv_have_decl_rl_catch_signals" = xyes; then : -printf "%s\n" "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h +$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h fi - as_ac_Lib=`printf "%s\n" "ac_cv_lib_$LIBREADLINE""_append_history" | $as_tr_sh` -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5 -printf %s "checking for append_history in -l$LIBREADLINE... " >&6; } -if eval test \${$as_ac_Lib+y} -then : - printf %s "(cached) " >&6 -else $as_nop + + as_ac_Lib=`$as_echo "ac_cv_lib_$LIBREADLINE''_append_history" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -l$LIBREADLINE" >&5 +$as_echo_n "checking for append_history in -l$LIBREADLINE... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-l$LIBREADLINE $READLINE_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -18259,32 +16025,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char append_history (); int -main (void) +main () { return append_history (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" -else $as_nop +else eval "$as_ac_Lib=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } -if eval test \"x\$"$as_ac_Lib"\" = x"yes" -then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : -printf "%s\n" "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h +$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h fi @@ -18293,17 +16060,15 @@ fi # End of readline checks: restore LIBS LIBS=$LIBS_no_readline -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5 -printf %s "checking for broken nice()... " >&6; } -if test ${ac_cv_broken_nice+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5 +$as_echo_n "checking for broken nice()... " >&6; } +if ${ac_cv_broken_nice+:} false; then : + $as_echo_n "(cached) " >&6 +else -if test "$cross_compiling" = yes -then : +if test "$cross_compiling" = yes; then : ac_cv_broken_nice=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18318,10 +16083,9 @@ int main() } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_broken_nice=yes -else $as_nop +else ac_cv_broken_nice=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -18330,25 +16094,23 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5 -printf "%s\n" "$ac_cv_broken_nice" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5 +$as_echo "$ac_cv_broken_nice" >&6; } if test "$ac_cv_broken_nice" = yes then -printf "%s\n" "#define HAVE_BROKEN_NICE 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5 -printf %s "checking for broken poll()... " >&6; } -if test ${ac_cv_broken_poll+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5 +$as_echo_n "checking for broken poll()... " >&6; } +if ${ac_cv_broken_poll+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_broken_poll=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18372,10 +16134,9 @@ int main() } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_broken_poll=yes -else $as_nop +else ac_cv_broken_poll=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -18384,27 +16145,25 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5 -printf "%s\n" "$ac_cv_broken_poll" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5 +$as_echo "$ac_cv_broken_poll" >&6; } if test "$ac_cv_broken_poll" = yes then -printf "%s\n" "#define HAVE_BROKEN_POLL 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h fi # check tzset(3) exists and works like we expect it to -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5 -printf %s "checking for working tzset()... " >&6; } -if test ${ac_cv_working_tzset+y} -then : - printf %s "(cached) " >&6 -else $as_nop - -if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5 +$as_echo_n "checking for working tzset()... " >&6; } +if ${ac_cv_working_tzset+:} false; then : + $as_echo_n "(cached) " >&6 +else + +if test "$cross_compiling" = yes; then : ac_cv_working_tzset=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18472,10 +16231,9 @@ int main() } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_working_tzset=yes -else $as_nop +else ac_cv_working_tzset=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -18484,27 +16242,26 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5 -printf "%s\n" "$ac_cv_working_tzset" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5 +$as_echo "$ac_cv_working_tzset" >&6; } if test "$ac_cv_working_tzset" = yes then -printf "%s\n" "#define HAVE_WORKING_TZSET 1" >>confdefs.h +$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h fi # Look for subsecond timestamps in struct stat -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5 -printf %s "checking for tv_nsec in struct stat... " >&6; } -if test ${ac_cv_stat_tv_nsec+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5 +$as_echo_n "checking for tv_nsec in struct stat... " >&6; } +if ${ac_cv_stat_tv_nsec+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { struct stat st; @@ -18514,36 +16271,34 @@ st.st_mtim.tv_nsec = 1; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_stat_tv_nsec=yes -else $as_nop +else ac_cv_stat_tv_nsec=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5 -printf "%s\n" "$ac_cv_stat_tv_nsec" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5 +$as_echo "$ac_cv_stat_tv_nsec" >&6; } if test "$ac_cv_stat_tv_nsec" = yes then -printf "%s\n" "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h +$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h fi # Look for BSD style subsecond timestamps in struct stat -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5 -printf %s "checking for tv_nsec2 in struct stat... " >&6; } -if test ${ac_cv_stat_tv_nsec2+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5 +$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; } +if ${ac_cv_stat_tv_nsec2+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { struct stat st; @@ -18553,21 +16308,20 @@ st.st_mtimespec.tv_nsec = 1; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_stat_tv_nsec2=yes -else $as_nop +else ac_cv_stat_tv_nsec2=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5 -printf "%s\n" "$ac_cv_stat_tv_nsec2" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5 +$as_echo "$ac_cv_stat_tv_nsec2" >&6; } if test "$ac_cv_stat_tv_nsec2" = yes then -printf "%s\n" "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h +$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h fi @@ -18577,46 +16331,50 @@ if test "$cross_compiling" = no; then CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" fi -ac_fn_c_check_header_compile "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default" -if test "x$ac_cv_header_curses_h" = xyes -then : - printf "%s\n" "#define HAVE_CURSES_H 1" >>confdefs.h +for ac_header in curses.h ncurses.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -ac_fn_c_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" -if test "x$ac_cv_header_ncurses_h" = xyes -then : - printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h -fi +done # On Solaris, term.h requires curses.h -ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" " +for ac_header in term.h +do : + ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" " #ifdef HAVE_CURSES_H #include #endif " -if test "x$ac_cv_header_term_h" = xyes -then : - printf "%s\n" "#define HAVE_TERM_H 1" >>confdefs.h +if test "x$ac_cv_header_term_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TERM_H 1 +_ACEOF fi +done + # On HP/UX 11.0, mvwdelch is a block with a return statement -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5 -printf %s "checking whether mvwdelch is an expression... " >&6; } -if test ${ac_cv_mvwdelch_is_expression+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5 +$as_echo_n "checking whether mvwdelch is an expression... " >&6; } +if ${ac_cv_mvwdelch_is_expression+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { int rtn; @@ -18626,22 +16384,21 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_mvwdelch_is_expression=yes -else $as_nop +else ac_cv_mvwdelch_is_expression=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5 -printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5 +$as_echo "$ac_cv_mvwdelch_is_expression" >&6; } if test "$ac_cv_mvwdelch_is_expression" = yes then -printf "%s\n" "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h +$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h fi @@ -18649,12 +16406,11 @@ fi # structs since version 5.7. If the macro is defined as zero before including # [n]curses.h, ncurses will expose fields of the structs regardless of the # configuration. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5 -printf %s "checking whether WINDOW has _flags... " >&6; } -if test ${ac_cv_window_has_flags+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5 +$as_echo_n "checking whether WINDOW has _flags... " >&6; } +if ${ac_cv_window_has_flags+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18662,7 +16418,7 @@ else $as_nop #include int -main (void) +main () { WINDOW *w; @@ -18672,33 +16428,32 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_window_has_flags=yes -else $as_nop +else ac_cv_window_has_flags=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5 -printf "%s\n" "$ac_cv_window_has_flags" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5 +$as_echo "$ac_cv_window_has_flags" >&6; } if test "$ac_cv_window_has_flags" = yes then -printf "%s\n" "#define WINDOW_HAS_FLAGS 1" >>confdefs.h +$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5 -printf %s "checking for is_pad... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5 +$as_echo_n "checking for is_pad... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef is_pad @@ -18709,108 +16464,104 @@ void *x=is_pad return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5 -printf %s "checking for is_term_resized... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5 +$as_echo_n "checking for is_term_resized... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=is_term_resized ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5 -printf %s "checking for resize_term... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5 +$as_echo_n "checking for resize_term... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=resize_term ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5 -printf %s "checking for resizeterm... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5 +$as_echo_n "checking for resizeterm... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { void *x=resizeterm ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5 -printf %s "checking for immedok... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5 +$as_echo_n "checking for immedok... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef immedok @@ -18821,27 +16572,26 @@ void *x=immedok return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5 -printf %s "checking for syncok... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5 +$as_echo_n "checking for syncok... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef syncok @@ -18852,27 +16602,26 @@ void *x=syncok return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5 -printf %s "checking for wchgat... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5 +$as_echo_n "checking for wchgat... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef wchgat @@ -18883,27 +16632,26 @@ void *x=wchgat return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for filter" >&5 -printf %s "checking for filter... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5 +$as_echo_n "checking for filter... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef filter @@ -18914,27 +16662,26 @@ void *x=filter return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_FILTER 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5 -printf %s "checking for has_key... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5 +$as_echo_n "checking for has_key... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef has_key @@ -18945,27 +16692,26 @@ void *x=has_key return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5 -printf %s "checking for typeahead... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5 +$as_echo_n "checking for typeahead... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef typeahead @@ -18976,27 +16722,26 @@ void *x=typeahead return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5 -printf %s "checking for use_env... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5 +$as_echo_n "checking for use_env... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { #ifndef use_env @@ -19007,48 +16752,46 @@ void *x=use_env return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h +$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # last curses configure check CPPFLAGS=$ac_save_cppflags -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 -printf "%s\n" "$as_me: checking for device files" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 +$as_echo "$as_me: checking for device files" >&6;} if test "x$cross_compiling" = xyes; then if test "${ac_cv_file__dev_ptmx+set}" != set; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 -printf %s "checking for /dev/ptmx... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5 -printf "%s\n" "not set" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 +$as_echo_n "checking for /dev/ptmx... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 +$as_echo "not set" >&6; } as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 fi if test "${ac_cv_file__dev_ptc+set}" != set; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 -printf %s "checking for /dev/ptc... " >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5 -printf "%s\n" "not set" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 +$as_echo_n "checking for /dev/ptc... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 +$as_echo "not set" >&6; } as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 -printf %s "checking for /dev/ptmx... " >&6; } -if test ${ac_cv_file__dev_ptmx+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 +$as_echo_n "checking for /dev/ptmx... " >&6; } +if ${ac_cv_file__dev_ptmx+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/ptmx"; then @@ -19057,24 +16800,22 @@ else ac_cv_file__dev_ptmx=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5 -printf "%s\n" "$ac_cv_file__dev_ptmx" >&6; } -if test "x$ac_cv_file__dev_ptmx" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5 +$as_echo "$ac_cv_file__dev_ptmx" >&6; } +if test "x$ac_cv_file__dev_ptmx" = xyes; then : fi if test "x$ac_cv_file__dev_ptmx" = xyes; then -printf "%s\n" "#define HAVE_DEV_PTMX 1" >>confdefs.h +$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 -printf %s "checking for /dev/ptc... " >&6; } -if test ${ac_cv_file__dev_ptc+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 +$as_echo_n "checking for /dev/ptc... " >&6; } +if ${ac_cv_file__dev_ptc+:} false; then : + $as_echo_n "(cached) " >&6 +else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/ptc"; then @@ -19083,16 +16824,15 @@ else ac_cv_file__dev_ptc=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5 -printf "%s\n" "$ac_cv_file__dev_ptc" >&6; } -if test "x$ac_cv_file__dev_ptc" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5 +$as_echo "$ac_cv_file__dev_ptc" >&6; } +if test "x$ac_cv_file__dev_ptc" = xyes; then : fi if test "x$ac_cv_file__dev_ptc" = xyes; then -printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h +$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h fi @@ -19101,17 +16841,15 @@ then LIBS="$LIBS -framework CoreFoundation" fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5 -printf %s "checking for %zd printf() format support... " >&6; } -if test ${ac_cv_have_size_t_format+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5 +$as_echo_n "checking for %zd printf() format support... " >&6; } +if ${ac_cv_have_size_t_format+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_have_size_t_format="cross -- assuming yes" -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19151,10 +16889,9 @@ int main() } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_have_size_t_format=yes -else $as_nop +else ac_cv_have_size_t_format=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -19162,11 +16899,11 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5 -printf "%s\n" "$ac_cv_have_size_t_format" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5 +$as_echo "$ac_cv_have_size_t_format" >&6; } if test "$ac_cv_have_size_t_format" != no ; then -printf "%s\n" "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h +$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h fi @@ -19179,26 +16916,23 @@ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " #endif " -if test "x$ac_cv_type_socklen_t" = xyes -then : +if test "x$ac_cv_type_socklen_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define socklen_t int" >>confdefs.h +$as_echo "#define socklen_t int" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5 -printf %s "checking for broken mbstowcs... " >&6; } -if test ${ac_cv_broken_mbstowcs+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5 +$as_echo_n "checking for broken mbstowcs... " >&6; } +if ${ac_cv_broken_mbstowcs+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_broken_mbstowcs=no -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19212,10 +16946,9 @@ int main() { } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_broken_mbstowcs=no -else $as_nop +else ac_cv_broken_mbstowcs=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -19224,60 +16957,57 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5 -printf "%s\n" "$ac_cv_broken_mbstowcs" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5 +$as_echo "$ac_cv_broken_mbstowcs" >&6; } if test "$ac_cv_broken_mbstowcs" = yes then -printf "%s\n" "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h fi # Check for --with-computed-gotos -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5 -printf %s "checking for --with-computed-gotos... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5 +$as_echo_n "checking for --with-computed-gotos... " >&6; } # Check whether --with-computed-gotos was given. -if test ${with_computed_gotos+y} -then : +if test "${with_computed_gotos+set}" = set; then : withval=$with_computed_gotos; if test "$withval" = yes then -printf "%s\n" "#define USE_COMPUTED_GOTOS 1" >>confdefs.h +$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi if test "$withval" = no then -printf "%s\n" "#define USE_COMPUTED_GOTOS 0" >>confdefs.h +$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 -printf "%s\n" "no value specified" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 +$as_echo "no value specified" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5 -printf %s "checking whether $CC supports computed gotos... " >&6; } -if test ${ac_cv_computed_gotos+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5 +$as_echo_n "checking whether $CC supports computed gotos... " >&6; } +if ${ac_cv_computed_gotos+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : if test "${with_computed_gotos+set}" = set; then ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos" else ac_cv_computed_gotos=no fi -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19293,10 +17023,9 @@ LABEL2: } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_computed_gotos=yes -else $as_nop +else ac_cv_computed_gotos=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -19305,18 +17034,18 @@ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5 -printf "%s\n" "$ac_cv_computed_gotos" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5 +$as_echo "$ac_cv_computed_gotos" >&6; } case "$ac_cv_computed_gotos" in yes*) -printf "%s\n" "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h +$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h esac case $ac_sys_system in AIX*) -printf "%s\n" "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h +$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h ;; esac @@ -19330,26 +17059,26 @@ done SRCDIRS="Parser Objects Python Modules Modules/_io Programs" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5 -printf %s "checking for build directories... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5 +$as_echo_n "checking for build directories... " >&6; } for dir in $SRCDIRS; do if test ! -d $dir; then mkdir $dir fi done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } # Availability of -O2: -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5 -printf %s "checking for -O2... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5 +$as_echo_n "checking for -O2... " >&6; } saved_cflags="$CFLAGS" CFLAGS="-O2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { @@ -19357,30 +17086,28 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : have_O2=yes -else $as_nop +else have_O2=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5 -printf "%s\n" "$have_O2" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5 +$as_echo "$have_O2" >&6; } CFLAGS="$saved_cflags" # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect: # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5 -printf %s "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5 +$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; } saved_cflags="$CFLAGS" CFLAGS="-O2 -D_FORTIFY_SOURCE=2" if test "$have_O2" = no; then CFLAGS="" fi -if test "$cross_compiling" = yes -then : +if test "$cross_compiling" = yes; then : have_glibc_memmove_bug=undefined -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19400,10 +17127,9 @@ int main() { } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : have_glibc_memmove_bug=no -else $as_nop +else have_glibc_memmove_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -19411,11 +17137,11 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi CFLAGS="$saved_cflags" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5 -printf "%s\n" "$have_glibc_memmove_bug" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5 +$as_echo "$have_glibc_memmove_bug" >&6; } if test "$have_glibc_memmove_bug" = yes; then -printf "%s\n" "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h +$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h fi @@ -19425,14 +17151,13 @@ if test "$have_gcc_asm_for_x87" = yes; then # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html case $CC in *gcc*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5 -printf %s "checking for gcc ipa-pure-const bug... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5 +$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; } saved_cflags="$CFLAGS" CFLAGS="-O2" - if test "$cross_compiling" = yes -then : + if test "$cross_compiling" = yes; then : have_ipa_pure_const_bug=undefined -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19453,10 +17178,9 @@ else $as_nop } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : have_ipa_pure_const_bug=no -else $as_nop +else have_ipa_pure_const_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -19464,11 +17188,11 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi CFLAGS="$saved_cflags" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5 -printf "%s\n" "$have_ipa_pure_const_bug" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5 +$as_echo "$have_ipa_pure_const_bug" >&6; } if test "$have_ipa_pure_const_bug" = yes; then -printf "%s\n" "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h +$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h fi ;; @@ -19476,8 +17200,8 @@ printf "%s\n" "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h fi # Check for stdatomic.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5 -printf %s "checking for stdatomic.h... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5 +$as_echo_n "checking for stdatomic.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19494,27 +17218,26 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_stdatomic_h=yes -else $as_nop +else have_stdatomic_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5 -printf "%s\n" "$have_stdatomic_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5 +$as_echo "$have_stdatomic_h" >&6; } if test "$have_stdatomic_h" = yes; then -printf "%s\n" "#define HAVE_STD_ATOMIC 1" >>confdefs.h +$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h fi # Check for GCC >= 4.7 and clang __atomic builtin functions -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5 -printf %s "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic_load_n and __atomic_store_n functions" >&5 +$as_echo_n "checking for builtin __atomic_load_n and __atomic_store_n functions... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19528,33 +17251,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_builtin_atomic=yes -else $as_nop +else have_builtin_atomic=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5 -printf "%s\n" "$have_builtin_atomic" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5 +$as_echo "$have_builtin_atomic" >&6; } if test "$have_builtin_atomic" = yes; then -printf "%s\n" "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h +$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h fi # ensurepip option -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5 -printf %s "checking for ensurepip... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5 +$as_echo_n "checking for ensurepip... " >&6; } # Check whether --with-ensurepip was given. -if test ${with_ensurepip+y} -then : +if test "${with_ensurepip+set}" = set; then : withval=$with_ensurepip; -else $as_nop +else with_ensurepip=upgrade fi @@ -19568,13 +17289,13 @@ case $with_ensurepip in #( *) : as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5 -printf "%s\n" "$ENSUREPIP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5 +$as_echo "$ENSUREPIP" >&6; } # check if the dirent structure of a d_type field and DT_UNKNOWN is defined -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5 -printf %s "checking if the dirent structure of a d_type field... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5 +$as_echo_n "checking if the dirent structure of a d_type field... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19588,26 +17309,25 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_dirent_d_type=yes -else $as_nop +else have_dirent_d_type=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5 -printf "%s\n" "$have_dirent_d_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5 +$as_echo "$have_dirent_d_type" >&6; } if test "$have_dirent_d_type" = yes; then -printf "%s\n" "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h +$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h fi # check if the Linux getrandom() syscall is available -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5 -printf %s "checking for the Linux getrandom() syscall... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5 +$as_echo_n "checking for the Linux getrandom() syscall... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19627,27 +17347,26 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_getrandom_syscall=yes -else $as_nop +else have_getrandom_syscall=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5 -printf "%s\n" "$have_getrandom_syscall" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5 +$as_echo "$have_getrandom_syscall" >&6; } if test "$have_getrandom_syscall" = yes; then -printf "%s\n" "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h +$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h fi # check if the getrandom() function is available # the test was written for the Solaris function of -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5 -printf %s "checking for the getrandom() function... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5 +$as_echo_n "checking for the getrandom() function... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19665,20 +17384,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : have_getrandom=yes -else $as_nop +else have_getrandom=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5 -printf "%s\n" "$have_getrandom" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5 +$as_echo "$have_getrandom" >&6; } if test "$have_getrandom" = yes; then -printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h +$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h fi @@ -19686,12 +17404,11 @@ fi # shm_* may only be available if linking against librt save_LIBS="$LIBS" save_includes_default="$ac_includes_default" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5 -printf %s "checking for library containing shm_open... " >&6; } -if test ${ac_cv_search_shm_open+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5 +$as_echo_n "checking for library containing shm_open... " >&6; } +if ${ac_cv_search_shm_open+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19699,64 +17416,67 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char shm_open (); int -main (void) +main () { return shm_open (); ; return 0; } _ACEOF -for ac_lib in '' rt -do +for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO" -then : + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_shm_open=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_shm_open+y} -then : + if ${ac_cv_search_shm_open+:} false; then : break fi done -if test ${ac_cv_search_shm_open+y} -then : +if ${ac_cv_search_shm_open+:} false; then : -else $as_nop +else ac_cv_search_shm_open=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5 -printf "%s\n" "$ac_cv_search_shm_open" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5 +$as_echo "$ac_cv_search_shm_open" >&6; } ac_res=$ac_cv_search_shm_open -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi if test "$ac_cv_search_shm_open" = "-lrt"; then -printf "%s\n" "#define SHM_NEEDS_LIBRT 1" >>confdefs.h +$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h fi -ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mman_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h +for ac_header in sys/mman.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mman_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_MMAN_H 1 +_ACEOF fi +done + # temporarily override ac_includes_default for AC_CHECK_FUNCS below ac_includes_default="\ ${ac_includes_default} @@ -19766,18 +17486,17 @@ ${ac_includes_default} # endif #endif " -ac_fn_c_check_func "$LINENO" "shm_open" "ac_cv_func_shm_open" -if test "x$ac_cv_func_shm_open" = xyes -then : - printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h - -fi -ac_fn_c_check_func "$LINENO" "shm_unlink" "ac_cv_func_shm_unlink" -if test "x$ac_cv_func_shm_unlink" = xyes -then : - printf "%s\n" "#define HAVE_SHM_UNLINK 1" >>confdefs.h +for ac_func in shm_open shm_unlink +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF fi +done # we don't want to link with librt always, restore LIBS LIBS="$save_LIBS" @@ -19788,8 +17507,7 @@ ac_includes_default="$save_includes_default" found=false # Check whether --with-openssl was given. -if test ${with_openssl+y} -then : +if test "${with_openssl+set}" = set; then : withval=$with_openssl; case "$withval" in "" | y | ye | yes | n | no) @@ -19799,19 +17517,18 @@ then : ;; esac -else $as_nop +else # if pkg-config is installed and openssl has installed a .pc file, # then use that information and don't search ssldirs if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$PKG_CONFIG"; then ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. else @@ -19819,15 +17536,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19838,11 +17551,11 @@ fi fi PKG_CONFIG=$ac_cv_prog_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -printf "%s\n" "$PKG_CONFIG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -19851,12 +17564,11 @@ if test -z "$ac_cv_prog_PKG_CONFIG"; then ac_ct_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_PKG_CONFIG"; then ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. else @@ -19864,15 +17576,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -19883,11 +17591,11 @@ fi fi ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG if test -n "$ac_ct_PKG_CONFIG"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 -printf "%s\n" "$ac_ct_PKG_CONFIG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 +$as_echo "$ac_ct_PKG_CONFIG" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_PKG_CONFIG" = x; then @@ -19895,8 +17603,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_ct_PKG_CONFIG @@ -19930,19 +17638,19 @@ fi if ! $found; then OPENSSL_INCLUDES= for ssldir in $ssldirs; do - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5 -printf %s "checking for openssl/ssl.h in $ssldir... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5 +$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; } if test -f "$ssldir/include/openssl/ssl.h"; then OPENSSL_INCLUDES="-I$ssldir/include" OPENSSL_LDFLAGS="-L$ssldir/lib" OPENSSL_LIBS="-lssl -lcrypto" found=true - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } break else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi done @@ -19953,8 +17661,8 @@ printf "%s\n" "no" >&6; } # try the preprocessor and linker with our new flags, # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5 -printf %s "checking whether compiling and linking against OpenSSL works... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5 +$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; } echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \ "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5 @@ -19968,28 +17676,27 @@ printf %s "checking whether compiling and linking against OpenSSL works... " >&6 /* end confdefs.h. */ #include int -main (void) +main () { SSL_new(NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } have_openssl=yes -else $as_nop +else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } have_openssl=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" @@ -20000,70 +17707,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \ -if test "$have_openssl" = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5 -printf %s "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; } - - save_LIBS="$LIBS" - save_LDFLAGS="$LDFLAGS" - save_CPPFLAGS="$CPPFLAGS" - LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" - LIBS="$OPENSSL_LIBS $LIBS" - CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - -int -main (void) -{ - - X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new(); - X509_VERIFY_PARAM_set1_host(p, "localhost", 0); - X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1"); - X509_VERIFY_PARAM_set_hostflags(p, 0); - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - - ac_cv_has_x509_verify_param_set1_host=yes - -else $as_nop - - ac_cv_has_x509_verify_param_set1_host=no - -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5 -printf "%s\n" "$ac_cv_has_x509_verify_param_set1_host" >&6; } - if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then - -printf "%s\n" "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h - - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" -fi - # rpath to libssl and libcrypto -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5 -printf %s "checking for --with-openssl-rpath... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5 +$as_echo_n "checking for --with-openssl-rpath... " >&6; } # Check whether --with-openssl-rpath was given. -if test ${with_openssl_rpath+y} -then : +if test "${with_openssl_rpath+set}" = set; then : withval=$with_openssl_rpath; -else $as_nop +else with_openssl_rpath=no fi @@ -20074,54 +17725,54 @@ case $with_openssl_rpath in #( no) : OPENSSL_RPATH= ;; #( *) : - if test -d "$with_openssl_rpath" -then : + if test -d "$with_openssl_rpath"; then : OPENSSL_RPATH="$with_openssl_rpath" -else $as_nop +else as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5 fi ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5 -printf "%s\n" "$OPENSSL_RPATH" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL_RPATH" >&5 +$as_echo "$OPENSSL_RPATH" >&6; } # ssl module default cipher suite string -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5 -printf %s "checking for --with-ssl-default-suites... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5 +$as_echo_n "checking for --with-ssl-default-suites... " >&6; } # Check whether --with-ssl-default-suites was given. -if test ${with_ssl_default_suites+y} -then : +if test "${with_ssl_default_suites+set}" = set; then : withval=$with_ssl_default_suites; -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -printf "%s\n" "$withval" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } case "$withval" in python) - printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h + $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h ;; openssl) - printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h + $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h ;; *) - printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h + $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h - printf "%s\n" "#define PY_SSL_DEFAULT_CIPHER_STRING \"$withval\"" >>confdefs.h + cat >>confdefs.h <<_ACEOF +#define PY_SSL_DEFAULT_CIPHER_STRING "$withval" +_ACEOF ;; esac -else $as_nop +else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: python" >&5 -printf "%s\n" "python" >&6; } -printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5 +$as_echo "python" >&6; } +$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h fi @@ -20130,14 +17781,13 @@ fi # builtin hash modules default_hashlib_hashes="md5,sha1,sha256,sha512,sha3,blake2" -printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h +$as_echo "#define PY_BUILTIN_HASHLIB_HASHES /**/" >>confdefs.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5 -printf %s "checking for --with-builtin-hashlib-hashes... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-builtin-hashlib-hashes" >&5 +$as_echo_n "checking for --with-builtin-hashlib-hashes... " >&6; } # Check whether --with-builtin-hashlib-hashes was given. -if test ${with_builtin_hashlib_hashes+y} -then : +if test "${with_builtin_hashlib_hashes+set}" = set; then : withval=$with_builtin_hashlib_hashes; case "$withval" in yes) @@ -20147,16 +17797,20 @@ case "$withval" in withval="" ;; esac -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 -printf "%s\n" "$withval" >&6; } -printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$withval\"" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 +$as_echo "$withval" >&6; } +cat >>confdefs.h <<_ACEOF +#define PY_BUILTIN_HASHLIB_HASHES "$withval" +_ACEOF -else $as_nop +else -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5 -printf "%s\n" "$default_hashlib_hashes" >&6; }; -printf "%s\n" "#define PY_BUILTIN_HASHLIB_HASHES \"$default_hashlib_hashes\"" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_hashlib_hashes" >&5 +$as_echo "$default_hashlib_hashes" >&6; }; +cat >>confdefs.h <<_ACEOF +#define PY_BUILTIN_HASHLIB_HASHES "$default_hashlib_hashes" +_ACEOF fi @@ -20164,50 +17818,48 @@ fi # --with-experimental-isolated-subinterpreters -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5 -printf %s "checking for --with-experimental-isolated-subinterpreters... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-experimental-isolated-subinterpreters" >&5 +$as_echo_n "checking for --with-experimental-isolated-subinterpreters... " >&6; } # Check whether --with-experimental-isolated-subinterpreters was given. -if test ${with_experimental_isolated_subinterpreters+y} -then : +if test "${with_experimental_isolated_subinterpreters+set}" = set; then : withval=$with_experimental_isolated_subinterpreters; if test "$withval" != no then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; }; - printf "%s\n" "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; + $as_echo "#define EXPERIMENTAL_ISOLATED_SUBINTERPRETERS 1" >>confdefs.h else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi # --with-static-libpython STATIC_LIBPYTHON=1 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5 -printf %s "checking for --with-static-libpython... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-static-libpython" >&5 +$as_echo_n "checking for --with-static-libpython... " >&6; } # Check whether --with-static-libpython was given. -if test ${with_static_libpython+y} -then : +if test "${with_static_libpython+set}" = set; then : withval=$with_static_libpython; if test "$withval" = no then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; STATIC_LIBPYTHON=0 else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; }; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi LIBRARY_DEPS='$(PY3LIBRARY) $(EXPORTSYMS)' @@ -20224,22 +17876,21 @@ fi # Check whether to disable test modules. Once set, setup.py will not build # test extension modules and "make install" will not install test suites. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5 -printf %s "checking for --disable-test-modules... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --disable-test-modules" >&5 +$as_echo_n "checking for --disable-test-modules... " >&6; } # Check whether --enable-test-modules was given. -if test ${enable_test_modules+y} -then : +if test "${enable_test_modules+set}" = set; then : enableval=$enable_test_modules; fi if test "$enable_test_modules" = no; then TEST_MODULES=no - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else TEST_MODULES=yes - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -20276,8 +17927,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -20307,15 +17958,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -20329,8 +17980,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -20347,7 +17998,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -20364,8 +18015,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -20388,16 +18039,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -20407,46 +18056,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -20455,6 +18104,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -20463,12 +18119,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -20480,10 +18132,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -20496,14 +18168,13 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -20530,20 +18201,18 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset - # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null -then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' -else $as_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -20555,13 +18224,12 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null -then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -20592,7 +18260,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -20614,10 +18282,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -20631,12 +18295,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -20678,7 +18336,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -20687,7 +18345,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -20750,7 +18408,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by python $as_me 3.10, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -20808,16 +18466,14 @@ $config_headers Report bugs to ." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ python config.status 3.10 -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -20856,15 +18512,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -20872,7 +18528,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -20881,7 +18537,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -20909,7 +18565,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -20923,7 +18579,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -20957,8 +18613,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files - test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -21294,7 +18950,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -21302,17 +18958,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -21329,7 +18985,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -21353,9 +19009,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -21417,8 +19073,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -21462,9 +19118,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -21480,20 +19136,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -21539,8 +19195,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -21564,4 +19220,3 @@ if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then echo "" >&6 echo "" >&6 fi - diff --git a/configure.ac b/configure.ac index 8b3ab1e16f6af6..3df9bd0acec628 100644 --- a/configure.ac +++ b/configure.ac @@ -5781,42 +5781,6 @@ ac_includes_default="$save_includes_default" # Check for usable OpenSSL AX_CHECK_OPENSSL([have_openssl=yes],[have_openssl=no]) -if test "$have_openssl" = yes; then - AC_MSG_CHECKING([for X509_VERIFY_PARAM_set1_host in libssl]) - - save_LIBS="$LIBS" - save_LDFLAGS="$LDFLAGS" - save_CPPFLAGS="$CPPFLAGS" - LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" - LIBS="$OPENSSL_LIBS $LIBS" - CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([ - [#include ] - ], [ - [X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();] - [X509_VERIFY_PARAM_set1_host(p, "localhost", 0);] - [X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");] - [X509_VERIFY_PARAM_set_hostflags(p, 0);] - ]) - ], - [ - ac_cv_has_x509_verify_param_set1_host=yes - ], - [ - ac_cv_has_x509_verify_param_set1_host=no - ]) - AC_MSG_RESULT($ac_cv_has_x509_verify_param_set1_host) - if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then - AC_DEFINE(HAVE_X509_VERIFY_PARAM_SET1_HOST, 1, - [Define if libssl has X509_VERIFY_PARAM_set1_host and related function]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" -fi - # rpath to libssl and libcrypto AC_MSG_CHECKING(for --with-openssl-rpath) AC_ARG_WITH(openssl-rpath, diff --git a/pyconfig.h.in b/pyconfig.h.in index 9b713ac93e75ea..6e54d553b7750f 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1356,9 +1356,6 @@ /* Define to 1 if you have the `writev' function. */ #undef HAVE_WRITEV -/* Define if libssl has X509_VERIFY_PARAM_set1_host and related function */ -#undef HAVE_X509_VERIFY_PARAM_SET1_HOST - /* Define if the zlib library has inflateCopy */ #undef HAVE_ZLIB_COPY diff --git a/setup.py b/setup.py index f8b7a17e772b11..605f7d628e7338 100644 --- a/setup.py +++ b/setup.py @@ -551,10 +551,7 @@ def print_three_column(lst): for l in (self.missing, self.failed, self.failed_on_import)): print() print("Could not build the ssl module!") - print("Python requires an OpenSSL 1.0.2 or 1.1 compatible " - "libssl with X509_VERIFY_PARAM_set1_host().") - print("LibreSSL 2.6.4 and earlier do not provide the necessary " - "APIs, https://github.com/libressl-portable/portable/issues/381") + print("Python requires a OpenSSL 1.1.1 or newer") if sysconfig.get_config_var("OPENSSL_LDFLAGS"): print("Custom linker flags may require --with-openssl-rpath=auto") print() @@ -2431,13 +2428,13 @@ def split_var(name, sep): self.missing.extend(['_ssl', '_hashlib']) return None, None - # OpenSSL 1.0.2 uses Kerberos for KRB5 ciphers - krb5_h = find_file( - 'krb5.h', self.inc_dirs, - ['/usr/kerberos/include'] + self.add(Extension( + '_ssl', ['_ssl.c'], + include_dirs=openssl_includes, + library_dirs=openssl_libdirs, + libraries=openssl_libs, + depends=['socketmodule.h', '_ssl/debughelpers.c']) ) - if krb5_h: - ssl_incs.extend(krb5_h) if openssl_rpath == 'auto': runtime_library_dirs = openssl_libdirs[:] @@ -2468,24 +2465,14 @@ def split_var(name, sep): # don't link OpenSSL shared libraries. openssl_extension_kwargs["libraries"] = [] - if config_vars.get("HAVE_X509_VERIFY_PARAM_SET1_HOST"): - self.add( - Extension( - '_ssl', - ['_ssl.c'], - depends=[ - 'socketmodule.h', - '_ssl/debughelpers.c', - '_ssl_data.h', - '_ssl_data_111.h', - '_ssl_data_300.h', - ], - **openssl_extension_kwargs - ) + self.add( + Extension( + '_ssl', + ['_ssl.c'], + depends=['socketmodule.h', '_ssl/debughelpers.c'], + **openssl_extension_kwargs ) - else: - self.missing.append('_ssl') - + ) self.add( Extension( '_hashlib', From ea39f82b97e0625334af560ef9876684d8e5abeb Mon Sep 17 00:00:00 2001 From: andrei kulakov Date: Sat, 17 Apr 2021 05:59:18 -0400 Subject: [PATCH 084/108] Fix a typo in subprocess documentation (GH-25426) Fix a typo per conversation with vstinner on IRC: in posix => on posix. --- Doc/library/subprocess.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 07b8ad77655dbe..b60db58d182e6c 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -543,7 +543,7 @@ functions. If *cwd* is not ``None``, the function changes the working directory to *cwd* before executing the child. *cwd* can be a string, bytes or - :term:`path-like ` object. In POSIX, the function + :term:`path-like ` object. On POSIX, the function looks for *executable* (or for the first item in *args*) relative to *cwd* if the executable path is a relative path. From b8d0fa035d74ae6ae00794c9af636b427c5dc650 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 17 Apr 2021 15:49:50 +0200 Subject: [PATCH 085/108] bpo-43669: Remove OpenSSL 0.9 to 1.1.0 specific documentation (GH-25453) --- Doc/library/hashlib.rst | 2 - Doc/library/ssl.rst | 112 ++++------------------------------------ Modules/_ssl.c | 33 ------------ Modules/clinic/_ssl.c.h | 40 +------------- 4 files changed, 12 insertions(+), 175 deletions(-) diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index 6f92152a778276..48c0bab1eb306d 100644 --- a/Doc/library/hashlib.rst +++ b/Doc/library/hashlib.rst @@ -280,8 +280,6 @@ include a `salt `_. factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). *dklen* is the length of the derived key. - .. availability:: OpenSSL 1.1+. - .. versionadded:: 3.6 diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index f7bdd56d2b31f3..9f7459217a8fbe 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -58,6 +58,11 @@ by SSL sockets created through the :meth:`SSLContext.wrap_socket` method. In the future the ssl module will require at least OpenSSL 1.0.2 or 1.1.0. +.. versionchanged:: 3.10 + + :pep:`644` has been implemented. The ssl module requires OpenSSL 1.1.1 + or newer. + Functions, Constants, and Exceptions ------------------------------------ @@ -325,19 +330,6 @@ Random generation :func:`ssl.RAND_egd` and :func:`ssl.RAND_add` to increase the randomness of the pseudo-random number generator. -.. function:: RAND_egd(path) - - If you are running an entropy-gathering daemon (EGD) somewhere, and *path* - is the pathname of a socket connection open to it, this will read 256 bytes - of randomness from the socket, and add it to the SSL pseudo-random number - generator to increase the security of generated secret keys. This is - typically only necessary on systems without better sources of randomness. - - See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for sources - of entropy-gathering daemons. - - .. availability:: not available with LibreSSL and OpenSSL > 1.1.0. - .. function:: RAND_add(bytes, entropy) Mix the given *bytes* into the SSL pseudo-random number generator. The @@ -879,8 +871,6 @@ Constants Disable compression on the SSL channel. This is useful if the application protocol supports its own compression scheme. - This option is only available with OpenSSL 1.0.0 and later. - .. versionadded:: 3.3 .. class:: Options @@ -1593,25 +1583,7 @@ to speed up repeated connections from the same clients. >>> ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23) >>> ctx.set_ciphers('ECDHE+AESGCM:!ECDSA') - >>> ctx.get_ciphers() # OpenSSL 1.0.x - [{'alg_bits': 256, - 'description': 'ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA ' - 'Enc=AESGCM(256) Mac=AEAD', - 'id': 50380848, - 'name': 'ECDHE-RSA-AES256-GCM-SHA384', - 'protocol': 'TLSv1/SSLv3', - 'strength_bits': 256}, - {'alg_bits': 128, - 'description': 'ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA ' - 'Enc=AESGCM(128) Mac=AEAD', - 'id': 50380847, - 'name': 'ECDHE-RSA-AES128-GCM-SHA256', - 'protocol': 'TLSv1/SSLv3', - 'strength_bits': 128}] - - On OpenSSL 1.1 and newer the cipher dict contains additional fields:: - - >>> ctx.get_ciphers() # OpenSSL 1.1+ + >>> ctx.get_ciphers() [{'aead': True, 'alg_bits': 256, 'auth': 'auth-rsa', @@ -1637,8 +1609,6 @@ to speed up repeated connections from the same clients. 'strength_bits': 128, 'symmetric': 'aes-128-gcm'}] - .. availability:: OpenSSL 1.0.2+. - .. versionadded:: 3.6 .. method:: SSLContext.set_default_verify_paths() @@ -1663,8 +1633,8 @@ to speed up repeated connections from the same clients. when connected, the :meth:`SSLSocket.cipher` method of SSL sockets will give the currently selected cipher. - OpenSSL 1.1.1 has TLS 1.3 cipher suites enabled by default. The suites - cannot be disabled with :meth:`~SSLContext.set_ciphers`. + TLS 1.3 cipher suites cannot be disabled with + :meth:`~SSLContext.set_ciphers`. .. method:: SSLContext.set_alpn_protocols(protocols) @@ -1678,10 +1648,6 @@ to speed up repeated connections from the same clients. This method will raise :exc:`NotImplementedError` if :data:`HAS_ALPN` is ``False``. - OpenSSL 1.1.0 to 1.1.0e will abort the handshake and raise :exc:`SSLError` - when both sides support ALPN but cannot agree on a protocol. 1.1.0f+ - behaves like 1.0.2, :meth:`SSLSocket.selected_alpn_protocol` returns None. - .. versionadded:: 3.5 .. method:: SSLContext.set_npn_protocols(protocols) @@ -1883,7 +1849,7 @@ to speed up repeated connections from the same clients. .. method:: SSLContext.session_stats() Get statistics about the SSL sessions created or managed by this context. - A dictionary is returned which maps the names of each `piece of information `_ to their + A dictionary is returned which maps the names of each `piece of information `_ to their numeric values. For example, here is the total number of hits and misses in the session cache since the context was created:: @@ -1926,10 +1892,6 @@ to speed up repeated connections from the same clients. :attr:`~SSLContext.verify_mode` is :data:`CERT_NONE`. Previously the same operation would have failed with a :exc:`ValueError`. - .. note:: - - This features requires OpenSSL 0.9.8f or newer. - .. attribute:: SSLContext.keylog_filename Write TLS keys to a keylog file, whenever key material is generated or @@ -1940,10 +1902,6 @@ to speed up repeated connections from the same clients. .. versionadded:: 3.8 - .. note:: - - This features requires OpenSSL 1.1.1 or newer. - .. attribute:: SSLContext.maximum_version A :class:`TLSVersion` enum member representing the highest supported @@ -1960,11 +1918,6 @@ to speed up repeated connections from the same clients. :attr:`~SSLContext.maximum_version` set to :attr:`TLSVersion.TLSv1_2` will not be able to establish a TLS 1.2 connection. - .. note:: - - This attribute is not available unless the ssl module is compiled - with OpenSSL 1.1.0g or newer. - .. versionadded:: 3.7 .. attribute:: SSLContext.minimum_version @@ -1972,11 +1925,6 @@ to speed up repeated connections from the same clients. Like :attr:`SSLContext.maximum_version` except it is the lowest supported version or :attr:`TLSVersion.MINIMUM_SUPPORTED`. - .. note:: - - This attribute is not available unless the ssl module is compiled - with OpenSSL 1.1.0g or newer. - .. versionadded:: 3.7 .. attribute:: SSLContext.num_tickets @@ -1985,11 +1933,6 @@ to speed up repeated connections from the same clients. :attr:`TLS_PROTOCOL_SERVER` context. The setting has no impact on TLS 1.0 to 1.2 connections. - .. note:: - - This attribute is not available unless the ssl module is compiled - with OpenSSL 1.1.1 or newer. - .. versionadded:: 3.8 .. attribute:: SSLContext.options @@ -1998,11 +1941,6 @@ to speed up repeated connections from the same clients. The default value is :data:`OP_ALL`, but you can specify other options such as :data:`OP_NO_SSLv2` by ORing them together. - .. note:: - With versions of OpenSSL older than 0.9.8m, it is only possible - to set options, not to clear them. Attempting to clear an option - (by resetting the corresponding bits) will raise a :exc:`ValueError`. - .. versionchanged:: 3.6 :attr:`SSLContext.options` returns :class:`Options` flags: @@ -2025,10 +1963,6 @@ to speed up repeated connections from the same clients. :meth:`SSLSocket.verify_client_post_handshake` is called and some I/O is performed. - .. note:: - Only available with OpenSSL 1.1.1 and TLS 1.3 enabled. Without TLS 1.3 - support, the property value is None and can't be modified - .. versionadded:: 3.8 .. attribute:: SSLContext.protocol @@ -2042,9 +1976,6 @@ to speed up repeated connections from the same clients. subject common name in the absence of a subject alternative name extension (default: true). - .. note:: - Only writeable with OpenSSL 1.1.0 or higher. - .. versionadded:: 3.7 .. versionchanged:: 3.10 @@ -2058,8 +1989,6 @@ to speed up repeated connections from the same clients. `_ for the context. This attribute is read-only. - .. availability:: OpenSSL 1.1.0 or newer - .. versionadded:: 3.10 .. attribute:: SSLContext.verify_flags @@ -2067,7 +1996,6 @@ to speed up repeated connections from the same clients. The flags for certificate verification operations. You can set flags like :data:`VERIFY_CRL_CHECK_LEAF` by ORing them together. By default OpenSSL does neither require nor verify certificate revocation lists (CRLs). - Available only with openssl version 0.9.8+. .. versionadded:: 3.4 @@ -2733,9 +2661,8 @@ TLS 1.3 .. versionadded:: 3.7 -Python has provisional and experimental support for TLS 1.3 with OpenSSL -1.1.1. The new protocol behaves slightly differently than previous version -of TLS/SSL. Some new TLS 1.3 features are not yet available. +The TLS 1.3 protocol behaves slightly differently than previous version +of TLS/SSL. Some new TLS 1.3 features are not yet available. - TLS 1.3 uses a disjunct set of cipher suites. All AES-GCM and ChaCha20 cipher suites are enabled by default. The method @@ -2752,23 +2679,6 @@ of TLS/SSL. Some new TLS 1.3 features are not yet available. signature algorithm configuration, and rekeying are not supported yet. -.. _ssl-libressl: - -LibreSSL support ----------------- - -LibreSSL is a fork of OpenSSL 1.0.1. The ssl module has limited support for -LibreSSL. Some features are not available when the ssl module is compiled -with LibreSSL. - -* LibreSSL >= 2.6.1 no longer supports NPN. The methods - :meth:`SSLContext.set_npn_protocols` and - :meth:`SSLSocket.selected_npn_protocol` are not available. -* :meth:`SSLContext.set_default_verify_paths` ignores the env vars - :envvar:`SSL_CERT_FILE` and :envvar:`SSL_CERT_PATH` although - :func:`get_default_verify_paths` still reports them. - - .. seealso:: Class :class:`socket.socket` diff --git a/Modules/_ssl.c b/Modules/_ssl.c index f441a16625bc76..92aabcb4fded9c 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -4971,38 +4971,6 @@ _ssl_RAND_status_impl(PyObject *module) return PyLong_FromLong(RAND_status()); } -#ifndef OPENSSL_NO_EGD -/* LCOV_EXCL_START */ -/*[clinic input] -_ssl.RAND_egd - path: object(converter="PyUnicode_FSConverter") - / - -Queries the entropy gather daemon (EGD) on the socket named by 'path'. - -Returns number of bytes read. Raises SSLError if connection to EGD -fails or if it does not provide enough data to seed PRNG. -[clinic start generated code]*/ - -static PyObject * -_ssl_RAND_egd_impl(PyObject *module, PyObject *path) -/*[clinic end generated code: output=02a67c7c367f52fa input=1aeb7eb948312195]*/ -{ - int bytes = RAND_egd(PyBytes_AsString(path)); - Py_DECREF(path); - if (bytes == -1) { - PyErr_SetString(PySSLErrorObject, - "EGD connection failed or EGD did not return " - "enough data to seed the PRNG"); - return NULL; - } - return PyLong_FromLong(bytes); -} -/* LCOV_EXCL_STOP */ -#endif /* OPENSSL_NO_EGD */ - - - /*[clinic input] _ssl.get_default_verify_paths @@ -5445,7 +5413,6 @@ static PyMethodDef PySSL_methods[] = { _SSL_RAND_ADD_METHODDEF _SSL_RAND_BYTES_METHODDEF _SSL_RAND_PSEUDO_BYTES_METHODDEF - _SSL_RAND_EGD_METHODDEF _SSL_RAND_STATUS_METHODDEF _SSL_GET_DEFAULT_VERIFY_PATHS_METHODDEF _SSL_ENUM_CERTIFICATES_METHODDEF diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index 95aad0c21df9a0..74ab5a8244d49f 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -1105,40 +1105,6 @@ _ssl_RAND_status(PyObject *module, PyObject *Py_UNUSED(ignored)) return _ssl_RAND_status_impl(module); } -#if !defined(OPENSSL_NO_EGD) - -PyDoc_STRVAR(_ssl_RAND_egd__doc__, -"RAND_egd($module, path, /)\n" -"--\n" -"\n" -"Queries the entropy gather daemon (EGD) on the socket named by \'path\'.\n" -"\n" -"Returns number of bytes read. Raises SSLError if connection to EGD\n" -"fails or if it does not provide enough data to seed PRNG."); - -#define _SSL_RAND_EGD_METHODDEF \ - {"RAND_egd", (PyCFunction)_ssl_RAND_egd, METH_O, _ssl_RAND_egd__doc__}, - -static PyObject * -_ssl_RAND_egd_impl(PyObject *module, PyObject *path); - -static PyObject * -_ssl_RAND_egd(PyObject *module, PyObject *arg) -{ - PyObject *return_value = NULL; - PyObject *path; - - if (!PyUnicode_FSConverter(arg, &path)) { - goto exit; - } - return_value = _ssl_RAND_egd_impl(module, path); - -exit: - return return_value; -} - -#endif /* !defined(OPENSSL_NO_EGD) */ - PyDoc_STRVAR(_ssl_get_default_verify_paths__doc__, "get_default_verify_paths($module, /)\n" "--\n" @@ -1351,10 +1317,6 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #endif /* defined(_MSC_VER) */ -#ifndef _SSL_RAND_EGD_METHODDEF - #define _SSL_RAND_EGD_METHODDEF -#endif /* !defined(_SSL_RAND_EGD_METHODDEF) */ - #ifndef _SSL_ENUM_CERTIFICATES_METHODDEF #define _SSL_ENUM_CERTIFICATES_METHODDEF #endif /* !defined(_SSL_ENUM_CERTIFICATES_METHODDEF) */ @@ -1362,4 +1324,4 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=9468e58904a565a2 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=ae3d1851daba6562 input=a9049054013a1b77]*/ From 76beadb8ff86eb2bb248bf918bfb20c4069932f4 Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Sat, 17 Apr 2021 09:53:24 -0400 Subject: [PATCH 086/108] Fix typo in a dataclasses comment. (GH-25454) --- Lib/dataclasses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py index 3ccfbbd92035a2..1b95bb961d9ecb 100644 --- a/Lib/dataclasses.py +++ b/Lib/dataclasses.py @@ -718,7 +718,7 @@ def _get_field(cls, a_name, a_type): # In addition to checking for actual types here, also check for # string annotations. get_type_hints() won't always work for us # (see https://github.com/python/typing/issues/508 for example), - # plus it's expensive and would require an eval for every stirng + # plus it's expensive and would require an eval for every string # annotation. So, make a best effort to see if this is a ClassVar # or InitVar using regex's and checking that the thing referenced # is actually of the correct type. From 7f1305ef9ea7234e1a5aacbea17490232e9b7dc2 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 17 Apr 2021 20:06:38 +0200 Subject: [PATCH 087/108] bpo-42333: Port _ssl extension to multiphase initialization (PEP 489) (GH-23253) - Introduce sslmodule_slots - Introduce sslmodulestate - Use sslmodulestate - Get rid of PyState_FindModule - Move new structs and helpers to header file - Use macros to access state - Keep a strong ref to socket type --- .../2021-04-17-19-31-17.bpo-42333.cgbtZO.rst | 1 + Modules/_ssl.c | 752 ++++++++++-------- Modules/_ssl.h | 45 ++ Modules/_ssl/debughelpers.c | 6 +- Modules/clinic/_ssl.c.h | 20 +- setup.py | 10 +- 6 files changed, 468 insertions(+), 366 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-17-19-31-17.bpo-42333.cgbtZO.rst create mode 100644 Modules/_ssl.h diff --git a/Misc/NEWS.d/next/Library/2021-04-17-19-31-17.bpo-42333.cgbtZO.rst b/Misc/NEWS.d/next/Library/2021-04-17-19-31-17.bpo-42333.cgbtZO.rst new file mode 100644 index 00000000000000..da2df1f614c101 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-17-19-31-17.bpo-42333.cgbtZO.rst @@ -0,0 +1 @@ +Port ``_ssl`` extension module to multiphase initialization. diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 92aabcb4fded9c..376d3bb11a40bb 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -25,6 +25,11 @@ #include "Python.h" +/* Include symbols from _socket module */ +#include "socketmodule.h" + +#include "_ssl.h" + /* Redefined below for Windows debug builds after important #includes */ #define _PySSL_FIX_ERRNO @@ -39,10 +44,6 @@ #define PySSL_UNBLOCK_THREADS PySSL_BEGIN_ALLOW_THREADS_S(_save); #define PySSL_END_ALLOW_THREADS PySSL_END_ALLOW_THREADS_S(_save); } -/* Include symbols from _socket module */ -#include "socketmodule.h" - -static PySocketModule_APIObject PySocketModule; #if defined(HAVE_POLL_H) #include @@ -66,24 +67,13 @@ static PySocketModule_APIObject PySocketModule; # error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL" #endif -/* SSL error object */ -static PyObject *PySSLErrorObject; -static PyObject *PySSLCertVerificationErrorObject; -static PyObject *PySSLZeroReturnErrorObject; -static PyObject *PySSLWantReadErrorObject; -static PyObject *PySSLWantWriteErrorObject; -static PyObject *PySSLSyscallErrorObject; -static PyObject *PySSLEOFErrorObject; -/* Error mappings */ -static PyObject *err_codes_to_names; -static PyObject *err_names_to_codes; -static PyObject *lib_codes_to_names; struct py_ssl_error_code { const char *mnemonic; int library, reason; }; + struct py_ssl_library_code { const char *library; int code; @@ -288,6 +278,8 @@ typedef struct { PyObject *msg_cb; PyObject *keylog_filename; BIO *keylog_bio; + /* Cached module state, also used in SSLSocket and SSLSession code. */ + _sslmodulestate *state; } PySSLContext; typedef struct { @@ -329,11 +321,6 @@ typedef struct { PySSLContext *ctx; } PySSLSession; -static PyTypeObject *PySSLContext_Type; -static PyTypeObject *PySSLSocket_Type; -static PyTypeObject *PySSLMemoryBIO_Type; -static PyTypeObject *PySSLSession_Type; - static inline _PySSLError _PySSL_errno(int failed, const SSL *ssl, int retcode) { _PySSLError err = { 0 }; @@ -350,12 +337,12 @@ static inline _PySSLError _PySSL_errno(int failed, const SSL *ssl, int retcode) /*[clinic input] module _ssl -class _ssl._SSLContext "PySSLContext *" "PySSLContext_Type" -class _ssl._SSLSocket "PySSLSocket *" "PySSLSocket_Type" -class _ssl.MemoryBIO "PySSLMemoryBIO *" "PySSLMemoryBIO_Type" -class _ssl.SSLSession "PySSLSession *" "PySSLSession_Type" +class _ssl._SSLContext "PySSLContext *" "get_state_type(type)->PySSLContext_Type" +class _ssl._SSLSocket "PySSLSocket *" "get_state_type(type)->PySSLSocket_Type" +class _ssl.MemoryBIO "PySSLMemoryBIO *" "get_state_type(type)->PySSLMemoryBIO_Type" +class _ssl.SSLSession "PySSLSession *" "get_state_type(type)->PySSLSession_Type" [clinic start generated code]*/ -/*[clinic end generated code: output=da39a3ee5e6b4b0d input=cc4883756da17954]*/ +/*[clinic end generated code: output=da39a3ee5e6b4b0d input=d293bed8bae240fd]*/ #include "clinic/_ssl.c.h" @@ -363,9 +350,6 @@ static int PySSL_select(PySocketSockObject *s, int writing, _PyTime_t timeout); static int PySSL_set_owner(PySSLSocket *, PyObject *, void *); static int PySSL_set_session(PySSLSocket *, PyObject *, void *); -#define PySSLSocket_Check(v) Py_IS_TYPE(v, PySSLSocket_Type) -#define PySSLMemoryBIO_Check(v) Py_IS_TYPE(v, PySSLMemoryBIO_Type) -#define PySSLSession_Check(v) Py_IS_TYPE(v, PySSLSession_Type) typedef enum { SOCKET_IS_NONBLOCKING, @@ -443,7 +427,8 @@ static PyType_Spec sslerror_type_spec = { }; static void -fill_and_set_sslerror(PySSLSocket *sslsock, PyObject *type, int ssl_errno, +fill_and_set_sslerror(_sslmodulestate *state, + PySSLSocket *sslsock, PyObject *type, int ssl_errno, const char *errstr, int lineno, unsigned long errcode) { PyObject *err_value = NULL, *reason_obj = NULL, *lib_obj = NULL; @@ -462,7 +447,7 @@ fill_and_set_sslerror(PySSLSocket *sslsock, PyObject *type, int ssl_errno, key = Py_BuildValue("ii", lib, reason); if (key == NULL) goto fail; - reason_obj = PyDict_GetItemWithError(err_codes_to_names, key); + reason_obj = PyDict_GetItemWithError(state->err_codes_to_names, key); Py_DECREF(key); if (reason_obj == NULL && PyErr_Occurred()) { goto fail; @@ -470,7 +455,7 @@ fill_and_set_sslerror(PySSLSocket *sslsock, PyObject *type, int ssl_errno, key = PyLong_FromLong(lib); if (key == NULL) goto fail; - lib_obj = PyDict_GetItemWithError(lib_codes_to_names, key); + lib_obj = PyDict_GetItemWithError(state->lib_codes_to_names, key); Py_DECREF(key); if (lib_obj == NULL && PyErr_Occurred()) { goto fail; @@ -482,7 +467,7 @@ fill_and_set_sslerror(PySSLSocket *sslsock, PyObject *type, int ssl_errno, errstr = "unknown error"; /* verify code for cert validation error */ - if ((sslsock != NULL) && (type == PySSLCertVerificationErrorObject)) { + if ((sslsock != NULL) && (type == state->PySSLCertVerificationErrorObject)) { const char *verify_str = NULL; long verify_code; @@ -554,7 +539,7 @@ fill_and_set_sslerror(PySSLSocket *sslsock, PyObject *type, int ssl_errno, if (_PyObject_SetAttrId(err_value, &PyId_library, lib_obj)) goto fail; - if ((sslsock != NULL) && (type == PySSLCertVerificationErrorObject)) { + if ((sslsock != NULL) && (type == state->PySSLCertVerificationErrorObject)) { /* Only set verify code / message for SSLCertVerificationError */ if (_PyObject_SetAttrId(err_value, &PyId_verify_code, verify_code_obj)) @@ -585,12 +570,17 @@ PySSL_ChainExceptions(PySSLSocket *sslsock) { static PyObject * PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) { - PyObject *type = PySSLErrorObject; + PyObject *type; char *errstr = NULL; _PySSLError err; enum py_ssl_error p = PY_SSL_ERROR_NONE; unsigned long e = 0; + assert(sslsock != NULL); + + _sslmodulestate *state = get_state_sock(sslsock); + type = state->PySSLErrorObject; + assert(ret <= 0); e = ERR_peek_last_error(); @@ -600,17 +590,17 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) switch (err.ssl) { case SSL_ERROR_ZERO_RETURN: errstr = "TLS/SSL connection has been closed (EOF)"; - type = PySSLZeroReturnErrorObject; + type = state->PySSLZeroReturnErrorObject; p = PY_SSL_ERROR_ZERO_RETURN; break; case SSL_ERROR_WANT_READ: errstr = "The operation did not complete (read)"; - type = PySSLWantReadErrorObject; + type = state->PySSLWantReadErrorObject; p = PY_SSL_ERROR_WANT_READ; break; case SSL_ERROR_WANT_WRITE: p = PY_SSL_ERROR_WANT_WRITE; - type = PySSLWantWriteErrorObject; + type = state->PySSLWantWriteErrorObject; errstr = "The operation did not complete (write)"; break; case SSL_ERROR_WANT_X509_LOOKUP: @@ -627,7 +617,7 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) PySocketSockObject *s = GET_SOCKET(sslsock); if (ret == 0 || (((PyObject *)s) == Py_None)) { p = PY_SSL_ERROR_EOF; - type = PySSLEOFErrorObject; + type = state->PySSLEOFErrorObject; errstr = "EOF occurred in violation of protocol"; } else if (s && ret == -1) { /* underlying BIO reported an I/O error */ @@ -643,12 +633,12 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) } else { p = PY_SSL_ERROR_EOF; - type = PySSLEOFErrorObject; + type = state->PySSLEOFErrorObject; errstr = "EOF occurred in violation of protocol"; } } else { /* possible? */ p = PY_SSL_ERROR_SYSCALL; - type = PySSLSyscallErrorObject; + type = state->PySSLSyscallErrorObject; errstr = "Some I/O error occurred"; } } else { @@ -665,7 +655,7 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) } if (ERR_GET_LIB(e) == ERR_LIB_SSL && ERR_GET_REASON(e) == SSL_R_CERTIFICATE_VERIFY_FAILED) { - type = PySSLCertVerificationErrorObject; + type = state->PySSLCertVerificationErrorObject; } break; } @@ -674,20 +664,20 @@ PySSL_SetError(PySSLSocket *sslsock, int ret, const char *filename, int lineno) errstr = "Invalid error code"; } } - fill_and_set_sslerror(sslsock, type, p, errstr, lineno, e); + fill_and_set_sslerror(state, sslsock, type, p, errstr, lineno, e); ERR_clear_error(); PySSL_ChainExceptions(sslsock); return NULL; } static PyObject * -_setSSLError (const char *errstr, int errcode, const char *filename, int lineno) { - +_setSSLError (_sslmodulestate *state, const char *errstr, int errcode, const char *filename, int lineno) +{ if (errstr == NULL) errcode = ERR_peek_last_error(); else errcode = 0; - fill_and_set_sslerror(NULL, PySSLErrorObject, errcode, errstr, lineno, errcode); + fill_and_set_sslerror(state, NULL, state->PySSLErrorObject, errcode, errstr, lineno, errcode); ERR_clear_error(); return NULL; } @@ -734,7 +724,7 @@ _ssl_configure_hostname(PySSLSocket *self, const char* server_hostname) /* Only send SNI extension for non-IP hostnames */ if (ip == NULL) { if (!SSL_set_tlsext_host_name(self->ssl, server_hostname)) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_sock(self), NULL, 0, __FILE__, __LINE__); goto error; } } @@ -743,13 +733,13 @@ _ssl_configure_hostname(PySSLSocket *self, const char* server_hostname) if (ip == NULL) { if (!X509_VERIFY_PARAM_set1_host(param, server_hostname, strlen(server_hostname))) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_sock(self), NULL, 0, __FILE__, __LINE__); goto error; } } else { if (!X509_VERIFY_PARAM_set1_ip(param, ASN1_STRING_get0_data(ip), ASN1_STRING_length(ip))) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_sock(self), NULL, 0, __FILE__, __LINE__); goto error; } } @@ -773,7 +763,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, SSL_CTX *ctx = sslctx->ctx; _PySSLError err = { 0 }; - self = PyObject_New(PySSLSocket, PySSLSocket_Type); + self = PyObject_New(PySSLSocket, get_state_ctx(sslctx)->PySSLSocket_Type); if (self == NULL) return NULL; @@ -797,7 +787,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, PySSL_END_ALLOW_THREADS if (self->ssl == NULL) { Py_DECREF(self); - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); return NULL; } /* bpo43522 and OpenSSL < 1.1.1l: copy hostflags manually */ @@ -902,7 +892,8 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) if (sock) { if (((PyObject*)sock) == Py_None) { - _setSSLError("Underlying socket connection gone", + _setSSLError(get_state_sock(self), + "Underlying socket connection gone", PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__); return NULL; } @@ -947,11 +938,11 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) ERRSTR("The handshake operation timed out")); goto error; } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_sock(self)->PySSLErrorObject, ERRSTR("Underlying socket has been closed.")); goto error; } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_sock(self)->PySSLErrorObject, ERRSTR("Underlying socket too large for select().")); goto error; } else if (sockstate == SOCKET_IS_NONBLOCKING) { @@ -972,7 +963,7 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) } static PyObject * -_asn1obj2py(const ASN1_OBJECT *name, int no_name) +_asn1obj2py(_sslmodulestate *state, const ASN1_OBJECT *name, int no_name) { char buf[X509_NAME_MAXLEN]; char *namebuf = buf; @@ -981,7 +972,7 @@ _asn1obj2py(const ASN1_OBJECT *name, int no_name) buflen = OBJ_obj2txt(namebuf, X509_NAME_MAXLEN, name, no_name); if (buflen < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); return NULL; } /* initial buffer is too small for oid + terminating null byte */ @@ -996,7 +987,7 @@ _asn1obj2py(const ASN1_OBJECT *name, int no_name) } buflen = OBJ_obj2txt(namebuf, buflen + 1, name, no_name); if (buflen < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); goto done; } } @@ -1016,7 +1007,8 @@ _asn1obj2py(const ASN1_OBJECT *name, int no_name) } static PyObject * -_create_tuple_for_attribute(ASN1_OBJECT *name, ASN1_STRING *value) +_create_tuple_for_attribute(_sslmodulestate *state, + ASN1_OBJECT *name, ASN1_STRING *value) { Py_ssize_t buflen; unsigned char *valuebuf = NULL; @@ -1024,16 +1016,16 @@ _create_tuple_for_attribute(ASN1_OBJECT *name, ASN1_STRING *value) buflen = ASN1_STRING_to_UTF8(&valuebuf, value); if (buflen < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); return NULL; } - attr = Py_BuildValue("Ns#", _asn1obj2py(name, 0), valuebuf, buflen); + attr = Py_BuildValue("Ns#", _asn1obj2py(state, name, 0), valuebuf, buflen); OPENSSL_free(valuebuf); return attr; } static PyObject * -_create_tuple_for_X509_NAME (X509_NAME *xname) +_create_tuple_for_X509_NAME (_sslmodulestate *state, X509_NAME *xname) { PyObject *dn = NULL; /* tuple which represents the "distinguished name" */ PyObject *rdn = NULL; /* tuple to hold a "relative distinguished name" */ @@ -1085,7 +1077,7 @@ _create_tuple_for_X509_NAME (X509_NAME *xname) /* now add this attribute to the current RDN */ name = X509_NAME_ENTRY_get_object(entry); value = X509_NAME_ENTRY_get_data(entry); - attr = _create_tuple_for_attribute(name, value); + attr = _create_tuple_for_attribute(state, name, value); /* fprintf(stderr, "RDN level %d, attribute %s: %s\n", entry->set, @@ -1132,7 +1124,7 @@ _create_tuple_for_X509_NAME (X509_NAME *xname) } static PyObject * -_get_peer_alt_names (X509 *certificate) { +_get_peer_alt_names (_sslmodulestate *state, X509 *certificate) { /* this code follows the procedure outlined in OpenSSL's crypto/x509v3/v3_prn.c:X509v3_EXT_print() @@ -1156,7 +1148,7 @@ _get_peer_alt_names (X509 *certificate) { /* get a memory buffer */ biobuf = BIO_new(BIO_s_mem()); if (biobuf == NULL) { - PyErr_SetString(PySSLErrorObject, "failed to allocate BIO"); + PyErr_SetString(state->PySSLErrorObject, "failed to allocate BIO"); return NULL; } @@ -1193,7 +1185,7 @@ _get_peer_alt_names (X509 *certificate) { } PyTuple_SET_ITEM(t, 0, v); - v = _create_tuple_for_X509_NAME (name->d.dirn); + v = _create_tuple_for_X509_NAME(state, name->d.dirn); if (v == NULL) { Py_DECREF(t); goto fail; @@ -1252,7 +1244,7 @@ _get_peer_alt_names (X509 *certificate) { len = i2t_ASN1_OBJECT(buf, sizeof(buf)-1, name->d.rid); if (len < 0) { Py_DECREF(t); - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); goto fail; } else if (len >= (int)sizeof(buf)) { v = PyUnicode_FromString(""); @@ -1335,7 +1327,7 @@ _get_peer_alt_names (X509 *certificate) { GENERAL_NAME_print(biobuf, name); len = BIO_gets(biobuf, buf, sizeof(buf)-1); if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); goto fail; } vptr = strchr(buf, ':'); @@ -1511,7 +1503,7 @@ _get_crl_dp(X509 *certificate) { } static PyObject * -_decode_certificate(X509 *certificate) { +_decode_certificate(_sslmodulestate *state, X509 *certificate) { PyObject *retval = NULL; BIO *biobuf = NULL; @@ -1532,6 +1524,7 @@ _decode_certificate(X509 *certificate) { return NULL; peer = _create_tuple_for_X509_NAME( + state, X509_get_subject_name(certificate)); if (peer == NULL) goto fail0; @@ -1542,6 +1535,7 @@ _decode_certificate(X509 *certificate) { Py_DECREF(peer); issuer = _create_tuple_for_X509_NAME( + state, X509_get_issuer_name(certificate)); if (issuer == NULL) goto fail0; @@ -1563,7 +1557,7 @@ _decode_certificate(X509 *certificate) { /* get a memory buffer */ biobuf = BIO_new(BIO_s_mem()); if (biobuf == NULL) { - PyErr_SetString(PySSLErrorObject, "failed to allocate BIO"); + PyErr_SetString(state->PySSLErrorObject, "failed to allocate BIO"); goto fail0; } @@ -1573,7 +1567,7 @@ _decode_certificate(X509 *certificate) { i2a_ASN1_INTEGER(biobuf, serialNumber); len = BIO_gets(biobuf, buf, sizeof(buf)-1); if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); goto fail1; } sn_obj = PyUnicode_FromStringAndSize(buf, len); @@ -1590,7 +1584,7 @@ _decode_certificate(X509 *certificate) { ASN1_TIME_print(biobuf, notBefore); len = BIO_gets(biobuf, buf, sizeof(buf)-1); if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); goto fail1; } pnotBefore = PyUnicode_FromStringAndSize(buf, len); @@ -1607,7 +1601,7 @@ _decode_certificate(X509 *certificate) { ASN1_TIME_print(biobuf, notAfter); len = BIO_gets(biobuf, buf, sizeof(buf)-1); if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); goto fail1; } pnotAfter = PyUnicode_FromStringAndSize(buf, len); @@ -1621,7 +1615,7 @@ _decode_certificate(X509 *certificate) { /* Now look for subjectAltName */ - peer_alt_names = _get_peer_alt_names(certificate); + peer_alt_names = _get_peer_alt_names(state, certificate); if (peer_alt_names == NULL) goto fail1; else if (peer_alt_names != Py_None) { @@ -1680,7 +1674,7 @@ _decode_certificate(X509 *certificate) { } static PyObject * -_certificate_to_der(X509 *certificate) +_certificate_to_der(_sslmodulestate *state, X509 *certificate) { unsigned char *bytes_buf = NULL; int len; @@ -1689,7 +1683,7 @@ _certificate_to_der(X509 *certificate) bytes_buf = NULL; len = i2d_X509(certificate, &bytes_buf); if (len < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); return NULL; } /* this is actually an immutable bytes sequence */ @@ -1712,27 +1706,28 @@ _ssl__test_decode_cert_impl(PyObject *module, PyObject *path) PyObject *retval = NULL; X509 *x=NULL; BIO *cert; + _sslmodulestate *state = get_ssl_state(module); if ((cert=BIO_new(BIO_s_file())) == NULL) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(state->PySSLErrorObject, "Can't malloc memory to read file"); goto fail0; } if (BIO_read_filename(cert, PyBytes_AsString(path)) <= 0) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(state->PySSLErrorObject, "Can't open file"); goto fail0; } x = PEM_read_bio_X509(cert, NULL, NULL, NULL); if (x == NULL) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(state->PySSLErrorObject, "Error decoding PEM-encoded file"); goto fail0; } - retval = _decode_certificate(x); + retval = _decode_certificate(state, x); X509_free(x); fail0: @@ -1777,13 +1772,13 @@ _ssl__SSLSocket_getpeercert_impl(PySSLSocket *self, int binary_mode) if (binary_mode) { /* return cert in DER-encoded format */ - result = _certificate_to_der(peer_cert); + result = _certificate_to_der(get_state_sock(self), peer_cert); } else { verification = SSL_CTX_get_verify_mode(SSL_get_SSL_CTX(self->ssl)); if ((verification & SSL_VERIFY_PEER) == 0) result = PyDict_New(); else - result = _decode_certificate(peer_cert); + result = _decode_certificate(get_state_sock(self), peer_cert); } X509_free(peer_cert); return result; @@ -2002,7 +1997,7 @@ static PySSLContext *PySSL_get_context(PySSLSocket *self, void *closure) { static int PySSL_set_context(PySSLSocket *self, PyObject *value, void *closure) { - if (PyObject_TypeCheck(value, PySSLContext_Type)) { + if (PyObject_TypeCheck(value, self->ctx->state->PySSLContext_Type)) { Py_INCREF(value); Py_SETREF(self->ctx, (PySSLContext *)value); SSL_set_SSL_CTX(self->ssl, self->ctx->ctx); @@ -2201,7 +2196,8 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) if (sock != NULL) { if (((PyObject*)sock) == Py_None) { - _setSSLError("Underlying socket connection gone", + _setSSLError(get_state_sock(self), + "Underlying socket connection gone", PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__); return NULL; } @@ -2232,11 +2228,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) "The write operation timed out"); goto error; } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_sock(self)->PySSLErrorObject, "Underlying socket has been closed."); goto error; } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_sock(self)->PySSLErrorObject, "Underlying socket too large for select()."); goto error; } @@ -2267,7 +2263,7 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) "The write operation timed out"); goto error; } else if (sockstate == SOCKET_HAS_BEEN_CLOSED) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_sock(self)->PySSLErrorObject, "Underlying socket has been closed."); goto error; } else if (sockstate == SOCKET_IS_NONBLOCKING) { @@ -2346,7 +2342,8 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1, if (sock != NULL) { if (((PyObject*)sock) == Py_None) { - _setSSLError("Underlying socket connection gone", + _setSSLError(get_state_sock(self), + "Underlying socket connection gone", PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__); return NULL; } @@ -2472,7 +2469,8 @@ _ssl__SSLSocket_shutdown_impl(PySSLSocket *self) if (sock != NULL) { /* Guard against closed socket */ if ((((PyObject*)sock) == Py_None) || (sock->sock_fd == INVALID_SOCKET)) { - _setSSLError("Underlying socket connection gone", + _setSSLError(get_state_sock(self), + "Underlying socket connection gone", PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__); return NULL; } @@ -2541,7 +2539,7 @@ _ssl__SSLSocket_shutdown_impl(PySSLSocket *self) goto error; } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_sock(self)->PySSLErrorObject, "Underlying socket too large for select()."); goto error; } @@ -2626,7 +2624,7 @@ _ssl__SSLSocket_verify_client_post_handshake_impl(PySSLSocket *self) #ifdef TLS1_3_VERSION int err = SSL_verify_client_post_handshake(self->ssl); if (err == 0) - return _setSSLError(NULL, 0, __FILE__, __LINE__); + return _setSSLError(get_state_sock(self), NULL, 0, __FILE__, __LINE__); else Py_RETURN_NONE; #else @@ -2698,7 +2696,7 @@ PySSL_get_session(PySSLSocket *self, void *closure) { if (session == NULL) { Py_RETURN_NONE; } - pysess = PyObject_GC_New(PySSLSession, PySSLSession_Type); + pysess = PyObject_GC_New(PySSLSession, self->ctx->state->PySSLSession_Type); if (pysess == NULL) { SSL_SESSION_free(session); return NULL; @@ -2719,7 +2717,7 @@ static int PySSL_set_session(PySSLSocket *self, PyObject *value, SSL_SESSION *session; int result; - if (!PySSLSession_Check(value)) { + if (!Py_IS_TYPE(value, get_state_sock(self)->PySSLSession_Type)) { PyErr_SetString(PyExc_TypeError, "Value is not a SSLSession."); return -1; } @@ -2748,7 +2746,7 @@ static int PySSL_set_session(PySSLSocket *self, PyObject *value, /* free duplicate, SSL_set_session() bumps ref count */ SSL_SESSION_free(session); if (result == 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_sock(self), NULL, 0, __FILE__, __LINE__); return -1; } return 0; @@ -2821,7 +2819,6 @@ static PyType_Spec PySSLSocket_spec = { PySSLSocket_slots, }; - /* * _SSLContext objects */ @@ -2874,6 +2871,15 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) X509_VERIFY_PARAM *params; int result; + /* slower approach, walk MRO and get borrowed reference to module. + * _PyType_GetModuleByDef is required for SSLContext subclasses */ + PyObject *module = _PyType_GetModuleByDef(type, &_sslmodule_def); + if (module == NULL) { + PyErr_SetString(PyExc_RuntimeError, + "Cannot find internal module state"); + return NULL; + } + PySSL_BEGIN_ALLOW_THREADS switch(proto_version) { #if defined(SSL3_VERSION) && !defined(OPENSSL_NO_SSL3) @@ -2923,7 +2929,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) return NULL; } if (ctx == NULL) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_ssl_state(module), NULL, 0, __FILE__, __LINE__); return NULL; } @@ -2941,6 +2947,8 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) self->keylog_bio = NULL; self->alpn_protocols = NULL; self->set_sni_cb = NULL; + self->state = get_ssl_state(module); + /* Don't check host name by default */ if (proto_version == PY_SSL_VERSION_TLS_CLIENT) { self->check_hostname = 1; @@ -2997,7 +3005,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) if (result == 0) { Py_DECREF(self); ERR_clear_error(); - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_ctx(self)->PySSLErrorObject, "No cipher can be selected."); return NULL; } @@ -3077,7 +3085,7 @@ _ssl__SSLContext_set_ciphers_impl(PySSLContext *self, const char *cipherlist) otherwise the error will be reported again when another SSL call is done. */ ERR_clear_error(); - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_ctx(self)->PySSLErrorObject, "No cipher can be selected."); return NULL; } @@ -3100,7 +3108,7 @@ _ssl__SSLContext_get_ciphers_impl(PySSLContext *self) ssl = SSL_new(self->ctx); if (ssl == NULL) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); goto exit; } sk = SSL_get_ciphers(ssl); @@ -3209,7 +3217,7 @@ get_verify_mode(PySSLContext *self, void *c) case SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT: return PyLong_FromLong(PY_SSL_CERT_REQUIRED); } - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_ctx(self)->PySSLErrorObject, "invalid return value from SSL_CTX_get_verify_mode"); return NULL; } @@ -3254,13 +3262,13 @@ set_verify_flags(PySSLContext *self, PyObject *arg, void *c) set = ~flags & new_flags; if (clear) { if (!X509_VERIFY_PARAM_clear_flags(param, clear)) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); return -1; } } if (set) { if (!X509_VERIFY_PARAM_set_flags(param, set)) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); return -1; } } @@ -3675,7 +3683,7 @@ _ssl__SSLContext_load_cert_chain_impl(PySSLContext *self, PyObject *certfile, PyErr_SetFromErrno(PyExc_OSError); } else { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); } goto error; } @@ -3696,7 +3704,7 @@ _ssl__SSLContext_load_cert_chain_impl(PySSLContext *self, PyObject *certfile, PyErr_SetFromErrno(PyExc_OSError); } else { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); } goto error; } @@ -3704,7 +3712,7 @@ _ssl__SSLContext_load_cert_chain_impl(PySSLContext *self, PyObject *certfile, r = SSL_CTX_check_private_key(self->ctx); PySSL_END_ALLOW_THREADS_S(pw_info.thread_state); if (r != 1) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); goto error; } SSL_CTX_set_default_passwd_cb(self->ctx, orig_passwd_cb); @@ -3745,7 +3753,7 @@ _add_ca_certs(PySSLContext *self, const void *data, Py_ssize_t len, biobuf = BIO_new_mem_buf(data, (int)len); if (biobuf == NULL) { - _setSSLError("Can't allocate buffer", 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), "Can't allocate buffer", 0, __FILE__, __LINE__); return -1; } @@ -3798,7 +3806,7 @@ _add_ca_certs(PySSLContext *self, const void *data, Py_ssize_t len, ERR_clear_error(); retval = 0; } else { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); retval = -1; } @@ -3915,7 +3923,7 @@ _ssl__SSLContext_load_verify_locations_impl(PySSLContext *self, PyErr_SetFromErrno(PyExc_OSError); } else { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); } goto error; } @@ -3963,13 +3971,13 @@ _ssl__SSLContext_load_dh_params(PySSLContext *self, PyObject *filepath) PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, filepath); } else { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); } return NULL; } if (!SSL_CTX_set_tmp_dh(self->ctx, dh)) { DH_free(dh); - return _setSSLError(NULL, 0, __FILE__, __LINE__); + return _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); } DH_free(dh); Py_RETURN_NONE; @@ -3977,7 +3985,7 @@ _ssl__SSLContext_load_dh_params(PySSLContext *self, PyObject *filepath) /*[clinic input] _ssl._SSLContext._wrap_socket - sock: object(subclass_of="PySocketModule.Sock_Type") + sock: object(subclass_of="get_state_ctx(self)->Sock_Type") server_side: int server_hostname as hostname_obj: object = None * @@ -3990,7 +3998,7 @@ static PyObject * _ssl__SSLContext__wrap_socket_impl(PySSLContext *self, PyObject *sock, int server_side, PyObject *hostname_obj, PyObject *owner, PyObject *session) -/*[clinic end generated code: output=f103f238633940b4 input=957d5006183d1894]*/ +/*[clinic end generated code: output=f103f238633940b4 input=f5916eadbc6eae81]*/ { char *hostname = NULL; PyObject *res; @@ -4013,8 +4021,8 @@ _ssl__SSLContext__wrap_socket_impl(PySSLContext *self, PyObject *sock, /*[clinic input] _ssl._SSLContext._wrap_bio - incoming: object(subclass_of="PySSLMemoryBIO_Type", type="PySSLMemoryBIO *") - outgoing: object(subclass_of="PySSLMemoryBIO_Type", type="PySSLMemoryBIO *") + incoming: object(subclass_of="get_state_ctx(self)->PySSLMemoryBIO_Type", type="PySSLMemoryBIO *") + outgoing: object(subclass_of="get_state_ctx(self)->PySSLMemoryBIO_Type", type="PySSLMemoryBIO *") server_side: int server_hostname as hostname_obj: object = None * @@ -4028,7 +4036,7 @@ _ssl__SSLContext__wrap_bio_impl(PySSLContext *self, PySSLMemoryBIO *incoming, PySSLMemoryBIO *outgoing, int server_side, PyObject *hostname_obj, PyObject *owner, PyObject *session) -/*[clinic end generated code: output=5c5d6d9b41f99332 input=63867b8f3e1a1aa3]*/ +/*[clinic end generated code: output=5c5d6d9b41f99332 input=331edeec9c738382]*/ { char *hostname = NULL; PyObject *res; @@ -4101,7 +4109,7 @@ _ssl__SSLContext_set_default_verify_paths_impl(PySSLContext *self) /*[clinic end generated code: output=0bee74e6e09deaaa input=35f3408021463d74]*/ { if (!SSL_CTX_set_default_verify_paths(self->ctx)) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); return NULL; } Py_RETURN_NONE; @@ -4134,7 +4142,7 @@ _ssl__SSLContext_set_ecdh_curve(PySSLContext *self, PyObject *name) } key = EC_KEY_new_by_curve_name(nid); if (key == NULL) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); return NULL; } SSL_CTX_set_tmp_ecdh(self->ctx, key); @@ -4146,7 +4154,7 @@ static int _servername_callback(SSL *s, int *al, void *args) { int ret; - PySSLContext *ssl_ctx = (PySSLContext *) args; + PySSLContext *sslctx = (PySSLContext *) args; PySSLSocket *ssl; PyObject *result; /* The high-level ssl.SSLSocket object */ @@ -4154,7 +4162,7 @@ _servername_callback(SSL *s, int *al, void *args) const char *servername = SSL_get_servername(s, TLSEXT_NAMETYPE_host_name); PyGILState_STATE gstate = PyGILState_Ensure(); - if (ssl_ctx->set_sni_cb == NULL) { + if (sslctx->set_sni_cb == NULL) { /* remove race condition in this the call back while if removing the * callback is in progress */ PyGILState_Release(gstate); @@ -4162,7 +4170,7 @@ _servername_callback(SSL *s, int *al, void *args) } ssl = SSL_get_app_data(s); - assert(PySSLSocket_Check(ssl)); + assert(Py_IS_TYPE(ssl, get_state_ctx(sslctx)->PySSLSocket_Type)); /* The servername callback expects an argument that represents the current * SSL connection and that has a .context attribute that can be changed to @@ -4184,8 +4192,8 @@ _servername_callback(SSL *s, int *al, void *args) goto error; if (servername == NULL) { - result = PyObject_CallFunctionObjArgs(ssl_ctx->set_sni_cb, ssl_socket, - Py_None, ssl_ctx, NULL); + result = PyObject_CallFunctionObjArgs(sslctx->set_sni_cb, ssl_socket, + Py_None, sslctx, NULL); } else { PyObject *servername_bytes; @@ -4193,7 +4201,7 @@ _servername_callback(SSL *s, int *al, void *args) servername_bytes = PyBytes_FromString(servername); if (servername_bytes == NULL) { - PyErr_WriteUnraisable((PyObject *) ssl_ctx); + PyErr_WriteUnraisable((PyObject *) sslctx); goto error; } /* server_hostname was encoded to an A-label by our caller; put it @@ -4207,14 +4215,14 @@ _servername_callback(SSL *s, int *al, void *args) } Py_DECREF(servername_bytes); result = PyObject_CallFunctionObjArgs( - ssl_ctx->set_sni_cb, ssl_socket, servername_str, - ssl_ctx, NULL); + sslctx->set_sni_cb, ssl_socket, servername_str, + sslctx, NULL); Py_DECREF(servername_str); } Py_DECREF(ssl_socket); if (result == NULL) { - PyErr_WriteUnraisable(ssl_ctx->set_sni_cb); + PyErr_WriteUnraisable(sslctx->set_sni_cb); *al = SSL_AD_HANDSHAKE_FAILURE; ret = SSL_TLSEXT_ERR_ALERT_FATAL; } @@ -4380,9 +4388,9 @@ _ssl__SSLContext_get_ca_certs_impl(PySSLContext *self, int binary_form) continue; } if (binary_form) { - ci = _certificate_to_der(cert); + ci = _certificate_to_der(get_state_ctx(self), cert); } else { - ci = _decode_certificate(cert); + ci = _decode_certificate(get_state_ctx(self), cert); } if (ci == NULL) { goto error; @@ -4495,8 +4503,7 @@ _ssl_MemoryBIO_impl(PyTypeObject *type) bio = BIO_new(BIO_s_mem()); if (bio == NULL) { - PyErr_SetString(PySSLErrorObject, - "failed to allocate BIO"); + PyErr_SetString(PyExc_MemoryError, "failed to allocate BIO"); return NULL; } /* Since our BIO is non-blocking an empty read() does not indicate EOF, @@ -4575,8 +4582,9 @@ _ssl_MemoryBIO_read_impl(PySSLMemoryBIO *self, int len) nbytes = BIO_read(self->bio, PyBytes_AS_STRING(result), len); if (nbytes < 0) { + _sslmodulestate *state = get_state_mbio(self); Py_DECREF(result); - _setSSLError(NULL, 0, __FILE__, __LINE__); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); return NULL; } @@ -4611,14 +4619,18 @@ _ssl_MemoryBIO_write_impl(PySSLMemoryBIO *self, Py_buffer *b) } if (self->eof_written) { - PyErr_SetString(PySSLErrorObject, + PyObject *module = PyType_GetModule(Py_TYPE(self)); + if (module == NULL) + return NULL; + PyErr_SetString(get_ssl_state(module)->PySSLErrorObject, "cannot write() after write_eof()"); return NULL; } nbytes = BIO_write(self->bio, b->buf, (int)b->len); if (nbytes < 0) { - _setSSLError(NULL, 0, __FILE__, __LINE__); + _sslmodulestate *state = get_state_mbio(self); + _setSSLError(state, NULL, 0, __FILE__, __LINE__); return NULL; } @@ -4699,13 +4711,14 @@ static PyObject * PySSLSession_richcompare(PyObject *left, PyObject *right, int op) { int result; + PyTypeObject *sesstype = ((PySSLSession*)left)->ctx->state->PySSLSession_Type; if (left == NULL || right == NULL) { PyErr_BadInternalCall(); return NULL; } - if (!PySSLSession_Check(left) || !PySSLSession_Check(right)) { + if (!Py_IS_TYPE(left, sesstype) || !Py_IS_TYPE(right, sesstype)) { Py_RETURN_NOTIMPLEMENTED; } @@ -4884,7 +4897,7 @@ _ssl_RAND_add_impl(PyObject *module, Py_buffer *view, double entropy) } static PyObject * -PySSL_RAND(int len, int pseudo) +PySSL_RAND(PyObject *module, int len, int pseudo) { int ok; PyObject *bytes; @@ -4916,7 +4929,7 @@ PySSL_RAND(int len, int pseudo) errstr = ERR_reason_error_string(err); v = Py_BuildValue("(ks)", err, errstr); if (v != NULL) { - PyErr_SetObject(PySSLErrorObject, v); + PyErr_SetObject(get_ssl_state(module)->PySSLErrorObject, v); Py_DECREF(v); } return NULL; @@ -4934,7 +4947,7 @@ static PyObject * _ssl_RAND_bytes_impl(PyObject *module, int n) /*[clinic end generated code: output=977da635e4838bc7 input=678ddf2872dfebfc]*/ { - return PySSL_RAND(n, 0); + return PySSL_RAND(module, n, 0); } /*[clinic input] @@ -4952,7 +4965,7 @@ static PyObject * _ssl_RAND_pseudo_bytes_impl(PyObject *module, int n) /*[clinic end generated code: output=b1509e937000e52d input=58312bd53f9bbdd0]*/ { - return PySSL_RAND(n, 1); + return PySSL_RAND(module, n, 1); } /*[clinic input] @@ -5014,7 +5027,7 @@ _ssl_get_default_verify_paths_impl(PyObject *module) } static PyObject* -asn1obj2py(ASN1_OBJECT *obj) +asn1obj2py(_sslmodulestate *state, ASN1_OBJECT *obj) { int nid; const char *ln, *sn; @@ -5026,7 +5039,7 @@ asn1obj2py(ASN1_OBJECT *obj) } sn = OBJ_nid2sn(nid); ln = OBJ_nid2ln(nid); - return Py_BuildValue("issN", nid, sn, ln, _asn1obj2py(obj, 1)); + return Py_BuildValue("issN", nid, sn, ln, _asn1obj2py(state, obj, 1)); } /*[clinic input] @@ -5052,7 +5065,7 @@ _ssl_txt2obj_impl(PyObject *module, const char *txt, int name) PyErr_Format(PyExc_ValueError, "unknown object '%.100s'", txt); return NULL; } - result = asn1obj2py(obj); + result = asn1obj2py(get_ssl_state(module), obj); ASN1_OBJECT_free(obj); return result; } @@ -5081,7 +5094,7 @@ _ssl_nid2obj_impl(PyObject *module, int nid) PyErr_Format(PyExc_ValueError, "unknown NID %i", nid); return NULL; } - result = asn1obj2py(obj); + result = asn1obj2py(get_ssl_state(module), obj); ASN1_OBJECT_free(obj); return result; } @@ -5423,72 +5436,39 @@ static PyMethodDef PySSL_methods[] = { }; -static int -sslmodule_init_types(PyObject *module) -{ - PySSLContext_Type = (PyTypeObject *)PyType_FromModuleAndSpec( - module, &PySSLContext_spec, NULL - ); - if (PySSLContext_Type == NULL) - return -1; - - PySSLSocket_Type = (PyTypeObject *)PyType_FromModuleAndSpec( - module, &PySSLSocket_spec, NULL - ); - if (PySSLSocket_Type == NULL) - return -1; - - PySSLMemoryBIO_Type = (PyTypeObject *)PyType_FromModuleAndSpec( - module, &PySSLMemoryBIO_spec, NULL - ); - if (PySSLMemoryBIO_Type == NULL) - return -1; - - PySSLSession_Type = (PyTypeObject *)PyType_FromModuleAndSpec( - module, &PySSLSession_spec, NULL - ); - if (PySSLSession_Type == NULL) - return -1; - - if (PyModule_AddType(module, PySSLContext_Type)) - return -1; - if (PyModule_AddType(module, PySSLSocket_Type)) - return -1; - if (PyModule_AddType(module, PySSLMemoryBIO_Type)) - return -1; - if (PyModule_AddType(module, PySSLSession_Type)) - return -1; - - return 0; -} +PyDoc_STRVAR(module_doc, +"Implementation module for SSL socket operations. See the socket module\n\ +for documentation."); static int sslmodule_init_exceptions(PyObject *module) { + _sslmodulestate *state = get_ssl_state(module); PyObject *bases = NULL; -#define add_exception(exc, name, doc, base) \ -do { \ - (exc) = PyErr_NewExceptionWithDoc("ssl." name, (doc), (base), NULL); \ - if ((exc) == NULL) goto error; \ - if (PyModule_AddObjectRef(module, name, exc) < 0) goto error; \ +#define add_exception(exc, name, doc, base) \ +do { \ + (exc) = PyErr_NewExceptionWithDoc("ssl." name, (doc), (base), NULL); \ + if ((state) == NULL) goto error; \ + if (PyModule_AddObjectRef(module, name, exc) < 0) goto error; \ } while(0) - PySSLErrorObject = PyType_FromSpecWithBases(&sslerror_type_spec, PyExc_OSError); - if (PySSLErrorObject == NULL) { + state->PySSLErrorObject = PyType_FromSpecWithBases( + &sslerror_type_spec, PyExc_OSError); + if (state->PySSLErrorObject == NULL) { goto error; } - if (PyModule_AddObjectRef(module, "SSLError", PySSLErrorObject) < 0) { + if (PyModule_AddObjectRef(module, "SSLError", state->PySSLErrorObject) < 0) { goto error; } /* ssl.CertificateError used to be a subclass of ValueError */ - bases = PyTuple_Pack(2, PySSLErrorObject, PyExc_ValueError); + bases = PyTuple_Pack(2, state->PySSLErrorObject, PyExc_ValueError); if (bases == NULL) { goto error; } add_exception( - PySSLCertVerificationErrorObject, + state->PySSLCertVerificationErrorObject, "SSLCertVerificationError", SSLCertVerificationError_doc, bases @@ -5496,38 +5476,38 @@ do { \ Py_CLEAR(bases); add_exception( - PySSLZeroReturnErrorObject, + state->PySSLZeroReturnErrorObject, "SSLZeroReturnError", SSLZeroReturnError_doc, - PySSLErrorObject + state->PySSLErrorObject ); add_exception( - PySSLWantWriteErrorObject, + state->PySSLWantWriteErrorObject, "SSLWantWriteError", SSLWantWriteError_doc, - PySSLErrorObject + state->PySSLErrorObject ); add_exception( - PySSLWantReadErrorObject, + state->PySSLWantReadErrorObject, "SSLWantReadError", SSLWantReadError_doc, - PySSLErrorObject + state->PySSLErrorObject ); add_exception( - PySSLSyscallErrorObject, + state->PySSLSyscallErrorObject, "SSLSyscallError", SSLSyscallError_doc, - PySSLErrorObject + state->PySSLErrorObject ); add_exception( - PySSLEOFErrorObject, + state->PySSLEOFErrorObject, "SSLEOFError", SSLEOFError_doc, - PySSLErrorObject + state->PySSLErrorObject ); #undef add_exception @@ -5540,128 +5520,21 @@ do { \ static int sslmodule_init_socketapi(PyObject *module) { - PySocketModule_APIObject *socket_api; + _sslmodulestate *state = get_ssl_state(module); + PySocketModule_APIObject *sockmod = PySocketModule_ImportModuleAndAPI(); - /* Load _socket module and its C API */ - socket_api = PySocketModule_ImportModuleAndAPI(); - if (socket_api == NULL) + if ((sockmod == NULL) || (sockmod->Sock_Type == NULL)) { return -1; - PySocketModule = *socket_api; - - return 0; -} - -static int -sslmodule_init_errorcodes(PyObject *module) -{ - struct py_ssl_error_code *errcode; - struct py_ssl_library_code *libcode; - - /* Mappings for error codes */ - err_codes_to_names = PyDict_New(); - if (err_codes_to_names == NULL) - return -1; - err_names_to_codes = PyDict_New(); - if (err_names_to_codes == NULL) - return -1; - lib_codes_to_names = PyDict_New(); - if (lib_codes_to_names == NULL) - return -1; - - errcode = error_codes; - while (errcode->mnemonic != NULL) { - PyObject *mnemo, *key; - mnemo = PyUnicode_FromString(errcode->mnemonic); - key = Py_BuildValue("ii", errcode->library, errcode->reason); - if (mnemo == NULL || key == NULL) - return -1; - if (PyDict_SetItem(err_codes_to_names, key, mnemo)) - return -1; - if (PyDict_SetItem(err_names_to_codes, mnemo, key)) - return -1; - Py_DECREF(key); - Py_DECREF(mnemo); - errcode++; } - - libcode = library_codes; - while (libcode->library != NULL) { - PyObject *mnemo, *key; - key = PyLong_FromLong(libcode->code); - mnemo = PyUnicode_FromString(libcode->library); - if (key == NULL || mnemo == NULL) - return -1; - if (PyDict_SetItem(lib_codes_to_names, key, mnemo)) - return -1; - Py_DECREF(key); - Py_DECREF(mnemo); - libcode++; - } - - if (PyModule_AddObject(module, "err_codes_to_names", err_codes_to_names)) - return -1; - if (PyModule_AddObject(module, "err_names_to_codes", err_names_to_codes)) - return -1; - if (PyModule_AddObject(module, "lib_codes_to_names", lib_codes_to_names)) - return -1; - - return 0; -} - -static void -parse_openssl_version(unsigned long libver, - unsigned int *major, unsigned int *minor, - unsigned int *fix, unsigned int *patch, - unsigned int *status) -{ - *status = libver & 0xF; - libver >>= 4; - *patch = libver & 0xFF; - libver >>= 8; - *fix = libver & 0xFF; - libver >>= 8; - *minor = libver & 0xFF; - libver >>= 8; - *major = libver & 0xFF; -} - -static int -sslmodule_init_versioninfo(PyObject *m) -{ - PyObject *r; - unsigned long libver; - unsigned int major, minor, fix, patch, status; - - /* OpenSSL version */ - /* SSLeay() gives us the version of the library linked against, - which could be different from the headers version. - */ - libver = OpenSSL_version_num(); - r = PyLong_FromUnsignedLong(libver); - if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION_NUMBER", r)) - return -1; - - parse_openssl_version(libver, &major, &minor, &fix, &patch, &status); - r = Py_BuildValue("IIIII", major, minor, fix, patch, status); - if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION_INFO", r)) - return -1; - - r = PyUnicode_FromString(OpenSSL_version(OPENSSL_VERSION)); - if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION", r)) - return -1; - - libver = OPENSSL_VERSION_NUMBER; - parse_openssl_version(libver, &major, &minor, &fix, &patch, &status); - r = Py_BuildValue("IIIII", major, minor, fix, patch, status); - if (r == NULL || PyModule_AddObject(m, "_OPENSSL_API_VERSION", r)) - return -1; - + state->Sock_Type = sockmod->Sock_Type; + Py_INCREF(state->Sock_Type); return 0; } static int sslmodule_init_constants(PyObject *m) { + PyModule_AddStringConstant(m, "_DEFAULT_CIPHERS", PY_SSL_DEFAULT_CIPHER_STRING); @@ -5905,44 +5778,235 @@ sslmodule_init_constants(PyObject *m) return 0; } -PyDoc_STRVAR(module_doc, -"Implementation module for SSL socket operations. See the socket module\n\ -for documentation."); +static int +sslmodule_init_errorcodes(PyObject *module) +{ + _sslmodulestate *state = get_ssl_state(module); + struct py_ssl_error_code *errcode; + struct py_ssl_library_code *libcode; -static struct PyModuleDef _sslmodule = { - PyModuleDef_HEAD_INIT, - "_ssl", - module_doc, - -1, - PySSL_methods, - NULL, - NULL, - NULL, - NULL + /* Mappings for error codes */ + state->err_codes_to_names = PyDict_New(); + if (state->err_codes_to_names == NULL) + return -1; + state->err_names_to_codes = PyDict_New(); + if (state->err_names_to_codes == NULL) + return -1; + state->lib_codes_to_names = PyDict_New(); + if (state->lib_codes_to_names == NULL) + return -1; + + errcode = error_codes; + while (errcode->mnemonic != NULL) { + PyObject *mnemo, *key; + mnemo = PyUnicode_FromString(errcode->mnemonic); + key = Py_BuildValue("ii", errcode->library, errcode->reason); + if (mnemo == NULL || key == NULL) + return -1; + if (PyDict_SetItem(state->err_codes_to_names, key, mnemo)) + return -1; + if (PyDict_SetItem(state->err_names_to_codes, mnemo, key)) + return -1; + Py_DECREF(key); + Py_DECREF(mnemo); + errcode++; + } + + libcode = library_codes; + while (libcode->library != NULL) { + PyObject *mnemo, *key; + key = PyLong_FromLong(libcode->code); + mnemo = PyUnicode_FromString(libcode->library); + if (key == NULL || mnemo == NULL) + return -1; + if (PyDict_SetItem(state->lib_codes_to_names, key, mnemo)) + return -1; + Py_DECREF(key); + Py_DECREF(mnemo); + libcode++; + } + + if (PyModule_AddObjectRef(module, "err_codes_to_names", state->err_codes_to_names)) + return -1; + if (PyModule_AddObjectRef(module, "err_names_to_codes", state->err_names_to_codes)) + return -1; + if (PyModule_AddObjectRef(module, "lib_codes_to_names", state->lib_codes_to_names)) + return -1; + + return 0; +} + +static void +parse_openssl_version(unsigned long libver, + unsigned int *major, unsigned int *minor, + unsigned int *fix, unsigned int *patch, + unsigned int *status) +{ + *status = libver & 0xF; + libver >>= 4; + *patch = libver & 0xFF; + libver >>= 8; + *fix = libver & 0xFF; + libver >>= 8; + *minor = libver & 0xFF; + libver >>= 8; + *major = libver & 0xFF; +} + +static int +sslmodule_init_versioninfo(PyObject *m) +{ + PyObject *r; + unsigned long libver; + unsigned int major, minor, fix, patch, status; + + /* OpenSSL version */ + /* SSLeay() gives us the version of the library linked against, + which could be different from the headers version. + */ + libver = OpenSSL_version_num(); + r = PyLong_FromUnsignedLong(libver); + if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION_NUMBER", r)) + return -1; + + parse_openssl_version(libver, &major, &minor, &fix, &patch, &status); + r = Py_BuildValue("IIIII", major, minor, fix, patch, status); + if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION_INFO", r)) + return -1; + + r = PyUnicode_FromString(OpenSSL_version(OPENSSL_VERSION)); + if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION", r)) + return -1; + + libver = OPENSSL_VERSION_NUMBER; + parse_openssl_version(libver, &major, &minor, &fix, &patch, &status); + r = Py_BuildValue("IIIII", major, minor, fix, patch, status); + if (r == NULL || PyModule_AddObject(m, "_OPENSSL_API_VERSION", r)) + return -1; + + return 0; +} + +static int +sslmodule_init_types(PyObject *module) +{ + _sslmodulestate *state = get_ssl_state(module); + + state->PySSLContext_Type = (PyTypeObject *)PyType_FromModuleAndSpec( + module, &PySSLContext_spec, NULL + ); + if (state->PySSLContext_Type == NULL) + return -1; + + state->PySSLSocket_Type = (PyTypeObject *)PyType_FromModuleAndSpec( + module, &PySSLSocket_spec, NULL + ); + if (state->PySSLSocket_Type == NULL) + return -1; + + state->PySSLMemoryBIO_Type = (PyTypeObject *)PyType_FromModuleAndSpec( + module, &PySSLMemoryBIO_spec, NULL + ); + if (state->PySSLMemoryBIO_Type == NULL) + return -1; + + state->PySSLSession_Type = (PyTypeObject *)PyType_FromModuleAndSpec( + module, &PySSLSession_spec, NULL + ); + if (state->PySSLSession_Type == NULL) + return -1; + + if (PyModule_AddType(module, state->PySSLContext_Type)) + return -1; + if (PyModule_AddType(module, state->PySSLSocket_Type)) + return -1; + if (PyModule_AddType(module, state->PySSLMemoryBIO_Type)) + return -1; + if (PyModule_AddType(module, state->PySSLSession_Type)) + return -1; + + return 0; +} + +static PyModuleDef_Slot sslmodule_slots[] = { + {Py_mod_exec, sslmodule_init_types}, + {Py_mod_exec, sslmodule_init_exceptions}, + {Py_mod_exec, sslmodule_init_socketapi}, + {Py_mod_exec, sslmodule_init_errorcodes}, + {Py_mod_exec, sslmodule_init_constants}, + {Py_mod_exec, sslmodule_init_versioninfo}, + {0, NULL} }; -PyMODINIT_FUNC -PyInit__ssl(void) +static int +sslmodule_traverse(PyObject *m, visitproc visit, void *arg) { - PyObject *m; + _sslmodulestate *state = get_ssl_state(m); + + Py_VISIT(state->PySSLContext_Type); + Py_VISIT(state->PySSLSocket_Type); + Py_VISIT(state->PySSLMemoryBIO_Type); + Py_VISIT(state->PySSLSession_Type); + Py_VISIT(state->PySSLErrorObject); + Py_VISIT(state->PySSLCertVerificationErrorObject); + Py_VISIT(state->PySSLZeroReturnErrorObject); + Py_VISIT(state->PySSLWantReadErrorObject); + Py_VISIT(state->PySSLWantWriteErrorObject); + Py_VISIT(state->PySSLSyscallErrorObject); + Py_VISIT(state->PySSLEOFErrorObject); + Py_VISIT(state->err_codes_to_names); + Py_VISIT(state->err_names_to_codes); + Py_VISIT(state->lib_codes_to_names); + Py_VISIT(state->Sock_Type); - m = PyModule_Create(&_sslmodule); - if (m == NULL) - return NULL; + return 0; +} - if (sslmodule_init_types(m) != 0) - return NULL; - if (sslmodule_init_exceptions(m) != 0) - return NULL; - if (sslmodule_init_socketapi(m) != 0) - return NULL; - if (sslmodule_init_errorcodes(m) != 0) - return NULL; - if (sslmodule_init_constants(m) != 0) - return NULL; - if (sslmodule_init_versioninfo(m) != 0) - return NULL; +static int +sslmodule_clear(PyObject *m) +{ + _sslmodulestate *state = get_ssl_state(m); + + Py_CLEAR(state->PySSLContext_Type); + Py_CLEAR(state->PySSLSocket_Type); + Py_CLEAR(state->PySSLMemoryBIO_Type); + Py_CLEAR(state->PySSLSession_Type); + Py_CLEAR(state->PySSLErrorObject); + Py_CLEAR(state->PySSLCertVerificationErrorObject); + Py_CLEAR(state->PySSLZeroReturnErrorObject); + Py_CLEAR(state->PySSLWantReadErrorObject); + Py_CLEAR(state->PySSLWantWriteErrorObject); + Py_CLEAR(state->PySSLSyscallErrorObject); + Py_CLEAR(state->PySSLEOFErrorObject); + Py_CLEAR(state->err_codes_to_names); + Py_CLEAR(state->err_names_to_codes); + Py_CLEAR(state->lib_codes_to_names); + Py_CLEAR(state->Sock_Type); + + return 0; +} + +static void +sslmodule_free(void *m) +{ + sslmodule_clear((PyObject *)m); +} - return m; +static struct PyModuleDef _sslmodule_def = { + PyModuleDef_HEAD_INIT, + .m_name = "_ssl", + .m_doc = module_doc, + .m_size = sizeof(_sslmodulestate), + .m_methods = PySSL_methods, + .m_slots = sslmodule_slots, + .m_traverse = sslmodule_traverse, + .m_clear = sslmodule_clear, + .m_free = sslmodule_free +}; + +PyMODINIT_FUNC +PyInit__ssl(void) +{ + return PyModuleDef_Init(&_sslmodule_def); } diff --git a/Modules/_ssl.h b/Modules/_ssl.h new file mode 100644 index 00000000000000..3fd517b6d3683f --- /dev/null +++ b/Modules/_ssl.h @@ -0,0 +1,45 @@ +#ifndef Py_SSL_H +#define Py_SSL_H + +/* + * ssl module state + */ +typedef struct { + /* Types */ + PyTypeObject *PySSLContext_Type; + PyTypeObject *PySSLSocket_Type; + PyTypeObject *PySSLMemoryBIO_Type; + PyTypeObject *PySSLSession_Type; + /* SSL error object */ + PyObject *PySSLErrorObject; + PyObject *PySSLCertVerificationErrorObject; + PyObject *PySSLZeroReturnErrorObject; + PyObject *PySSLWantReadErrorObject; + PyObject *PySSLWantWriteErrorObject; + PyObject *PySSLSyscallErrorObject; + PyObject *PySSLEOFErrorObject; + /* Error mappings */ + PyObject *err_codes_to_names; + PyObject *err_names_to_codes; + PyObject *lib_codes_to_names; + /* socket type from module CAPI */ + PyTypeObject *Sock_Type; +} _sslmodulestate; + +static struct PyModuleDef _sslmodule_def; + +Py_LOCAL_INLINE(_sslmodulestate*) +get_ssl_state(PyObject *module) +{ + void *state = PyModule_GetState(module); + assert(state != NULL); + return (_sslmodulestate *)state; +} + +#define get_state_type(type) \ + (get_ssl_state(_PyType_GetModuleByDef(type, &_sslmodule_def))) +#define get_state_ctx(c) (((PySSLContext *)(c))->state) +#define get_state_sock(s) (((PySSLSocket *)(s))->ctx->state) +#define get_state_mbio(b) ((_sslmodulestate *)PyType_GetModuleState(Py_TYPE(b))) + +#endif /* Py_SSL_H */ diff --git a/Modules/_ssl/debughelpers.c b/Modules/_ssl/debughelpers.c index f39372ca53d9e1..03c125eb44fd3a 100644 --- a/Modules/_ssl/debughelpers.c +++ b/Modules/_ssl/debughelpers.c @@ -21,7 +21,7 @@ _PySSL_msg_callback(int write_p, int version, int content_type, threadstate = PyGILState_Ensure(); ssl_obj = (PySSLSocket *)SSL_get_app_data(ssl); - assert(PySSLSocket_Check(ssl_obj)); + assert(Py_IS_TYPE(ssl_obj, get_state_sock(ssl_obj)->PySSLSocket_Type)); if (ssl_obj->ctx->msg_cb == NULL) { PyGILState_Release(threadstate); return; @@ -125,7 +125,7 @@ _PySSL_keylog_callback(const SSL *ssl, const char *line) threadstate = PyGILState_Ensure(); ssl_obj = (PySSLSocket *)SSL_get_app_data(ssl); - assert(PySSLSocket_Check(ssl_obj)); + assert(Py_IS_TYPE(ssl_obj, get_state_sock(ssl_obj)->PySSLSocket_Type)); if (ssl_obj->ctx->keylog_bio == NULL) { return; } @@ -199,7 +199,7 @@ _PySSLContext_set_keylog_filename(PySSLContext *self, PyObject *arg, void *c) { self->keylog_bio = BIO_new_fp(fp, BIO_CLOSE | BIO_FP_TEXT); if (self->keylog_bio == NULL) { - PyErr_SetString(PySSLErrorObject, + PyErr_SetString(get_state_ctx(self)->PySSLErrorObject, "Can't malloc memory for keylog file"); return -1; } diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index 74ab5a8244d49f..45c3095a9f6f00 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -374,7 +374,7 @@ _ssl__SSLContext(PyTypeObject *type, PyObject *args, PyObject *kwargs) PyObject *return_value = NULL; int proto_version; - if ((type == PySSLContext_Type) && + if ((type == get_state_type(type)->PySSLContext_Type) && !_PyArg_NoKeywords("_SSLContext", kwargs)) { goto exit; } @@ -619,8 +619,8 @@ _ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *const *args, Py_ssiz if (!args) { goto exit; } - if (!PyObject_TypeCheck(args[0], PySocketModule.Sock_Type)) { - _PyArg_BadArgument("_wrap_socket", "argument 'sock'", (PySocketModule.Sock_Type)->tp_name, args[0]); + if (!PyObject_TypeCheck(args[0], get_state_ctx(self)->Sock_Type)) { + _PyArg_BadArgument("_wrap_socket", "argument 'sock'", (get_state_ctx(self)->Sock_Type)->tp_name, args[0]); goto exit; } sock = args[0]; @@ -689,13 +689,13 @@ _ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *const *args, Py_ssize_t if (!args) { goto exit; } - if (!PyObject_TypeCheck(args[0], PySSLMemoryBIO_Type)) { - _PyArg_BadArgument("_wrap_bio", "argument 'incoming'", (PySSLMemoryBIO_Type)->tp_name, args[0]); + if (!PyObject_TypeCheck(args[0], get_state_ctx(self)->PySSLMemoryBIO_Type)) { + _PyArg_BadArgument("_wrap_bio", "argument 'incoming'", (get_state_ctx(self)->PySSLMemoryBIO_Type)->tp_name, args[0]); goto exit; } incoming = (PySSLMemoryBIO *)args[0]; - if (!PyObject_TypeCheck(args[1], PySSLMemoryBIO_Type)) { - _PyArg_BadArgument("_wrap_bio", "argument 'outgoing'", (PySSLMemoryBIO_Type)->tp_name, args[1]); + if (!PyObject_TypeCheck(args[1], get_state_ctx(self)->PySSLMemoryBIO_Type)) { + _PyArg_BadArgument("_wrap_bio", "argument 'outgoing'", (get_state_ctx(self)->PySSLMemoryBIO_Type)->tp_name, args[1]); goto exit; } outgoing = (PySSLMemoryBIO *)args[1]; @@ -850,11 +850,11 @@ _ssl_MemoryBIO(PyTypeObject *type, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - if ((type == PySSLMemoryBIO_Type) && + if ((type == get_state_type(type)->PySSLMemoryBIO_Type) && !_PyArg_NoPositional("MemoryBIO", args)) { goto exit; } - if ((type == PySSLMemoryBIO_Type) && + if ((type == get_state_type(type)->PySSLMemoryBIO_Type) && !_PyArg_NoKeywords("MemoryBIO", kwargs)) { goto exit; } @@ -1324,4 +1324,4 @@ _ssl_enum_crls(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje #ifndef _SSL_ENUM_CRLS_METHODDEF #define _SSL_ENUM_CRLS_METHODDEF #endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */ -/*[clinic end generated code: output=ae3d1851daba6562 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=83e68c77bd96789a input=a9049054013a1b77]*/ diff --git a/setup.py b/setup.py index 605f7d628e7338..af384409553eb8 100644 --- a/setup.py +++ b/setup.py @@ -2428,14 +2428,6 @@ def split_var(name, sep): self.missing.extend(['_ssl', '_hashlib']) return None, None - self.add(Extension( - '_ssl', ['_ssl.c'], - include_dirs=openssl_includes, - library_dirs=openssl_libdirs, - libraries=openssl_libs, - depends=['socketmodule.h', '_ssl/debughelpers.c']) - ) - if openssl_rpath == 'auto': runtime_library_dirs = openssl_libdirs[:] elif not openssl_rpath: @@ -2469,7 +2461,7 @@ def split_var(name, sep): Extension( '_ssl', ['_ssl.c'], - depends=['socketmodule.h', '_ssl/debughelpers.c'], + depends=['socketmodule.h', '_ssl/debughelpers.c', '_ssl.h'], **openssl_extension_kwargs ) ) From 3ab4bea5a3ac28820781cf62a768c65370c9054c Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 17 Apr 2021 22:26:54 +0100 Subject: [PATCH 088/108] bpo-38530: Include builtins in NameError suggestions (GH-25460) --- Lib/test/test_exceptions.py | 24 ++++++++++++++++++++---- Python/suggestions.c | 12 +++++++++++- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index bd20b232e541fe..b730858a997354 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1477,6 +1477,16 @@ def func(): sys.__excepthook__(*sys.exc_info()) self.assertIn("global_for_suggestions?", err.getvalue()) + def test_name_error_suggestions_from_builtins(self): + def func(): + print(AttributeErrop) + try: + func() + except NameError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + self.assertIn("AttributeError?", err.getvalue()) + def test_name_error_suggestions_do_not_trigger_for_long_names(self): def f(): somethingverywronghehehehehehe = None @@ -1490,7 +1500,7 @@ def f(): self.assertNotIn("somethingverywronghehe", err.getvalue()) - def test_name_error_suggestions_do_not_trigger_for_big_dicts(self): + def test_name_error_suggestions_do_not_trigger_for_too_many_locals(self): def f(): # Mutating locals() is unreliable, so we need to do it by hand a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = a10 = a11 = a12 = a13 = \ @@ -1501,7 +1511,13 @@ def f(): a62 = a63 = a64 = a65 = a66 = a67 = a68 = a69 = a70 = a71 = a72 = a73 = \ a74 = a75 = a76 = a77 = a78 = a79 = a80 = a81 = a82 = a83 = a84 = a85 = \ a86 = a87 = a88 = a89 = a90 = a91 = a92 = a93 = a94 = a95 = a96 = a97 = \ - a98 = a99 = a100 = a101 = a102 = a103 = None + a98 = a99 = a100 = a101 = a102 = a103 = a104 = a105 = a106 = a107 = \ + a108 = a109 = a110 = a111 = a112 = a113 = a114 = a115 = a116 = a117 = \ + a118 = a119 = a120 = a121 = a122 = a123 = a124 = a125 = a126 = \ + a127 = a128 = a129 = a130 = a131 = a132 = a133 = a134 = a135 = a136 = \ + a137 = a138 = a139 = a140 = a141 = a142 = a143 = a144 = a145 = \ + a146 = a147 = a148 = a149 = a150 = a151 = a152 = a153 = a154 = a155 = \ + a156 = a157 = a158 = a159 = a160 = a161 = None print(a0) try: @@ -1510,7 +1526,7 @@ def f(): with support.captured_stderr() as err: sys.__excepthook__(*sys.exc_info()) - self.assertNotIn("a10", err.getvalue()) + self.assertNotIn("a1", err.getvalue()) def test_name_error_with_custom_exceptions(self): def f(): @@ -1643,7 +1659,7 @@ class A: blech = None # A class with a very big __dict__ will not be consider # for suggestions. - for index in range(101): + for index in range(160): setattr(A, f"index_{index}", None) try: diff --git a/Python/suggestions.c b/Python/suggestions.c index e4227609207390..aa4870d13e1abf 100644 --- a/Python/suggestions.c +++ b/Python/suggestions.c @@ -4,7 +4,7 @@ #include "pycore_pyerrors.h" #define MAX_DISTANCE 3 -#define MAX_CANDIDATE_ITEMS 100 +#define MAX_CANDIDATE_ITEMS 160 #define MAX_STRING_SIZE 25 /* Calculate the Levenshtein distance between string1 and string2 */ @@ -171,6 +171,16 @@ offer_suggestions_for_name_error(PyNameErrorObject *exc) { } suggestions = calculate_suggestions(dir, name); Py_DECREF(dir); + if (suggestions != NULL) { + return suggestions; + } + + dir = PySequence_List(frame->f_builtins); + if (dir == NULL) { + return NULL; + } + suggestions = calculate_suggestions(dir, name); + Py_DECREF(dir); return suggestions; } From 685719871ac3fb6aff3468b9c5328fc66f5486d7 Mon Sep 17 00:00:00 2001 From: stratakis Date: Sat, 17 Apr 2021 23:27:07 +0200 Subject: [PATCH 089/108] bpo-37630: Do not skip the sha3 tests in case of missing builtin sha3 module (GH-20986) Since we can use now the sha3 and shake algorithms from OpenSSL, we shouldn't skip the tests in case the builtin algorithm was not compiled or removed. --- Lib/test/test_hashlib.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index 0e06fdc9885dc5..bf9f5594004602 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -60,13 +60,6 @@ requires_blake2 = unittest.skipUnless(_blake2, 'requires _blake2') -try: - import _sha3 -except ImportError: - _sha3 = None - -requires_sha3 = unittest.skipUnless(_sha3, 'requires _sha3') - def hexstr(s): assert isinstance(s, bytes), repr(s) @@ -389,7 +382,6 @@ def test_no_unicode_blake2(self): self.check_no_unicode('blake2b') self.check_no_unicode('blake2s') - @requires_sha3 def test_no_unicode_sha3(self): self.check_no_unicode('sha3_224') self.check_no_unicode('sha3_256') @@ -425,7 +417,6 @@ def test_blocksize_name(self): self.check_blocksize_name('sha384', 128, 48) self.check_blocksize_name('sha512', 128, 64) - @requires_sha3 def test_blocksize_name_sha3(self): self.check_blocksize_name('sha3_224', 144, 28) self.check_blocksize_name('sha3_256', 136, 32) @@ -446,7 +437,6 @@ def check_sha3(self, name, capacity, rate, suffix): self.assertEqual(m._rate_bits, rate) self.assertEqual(m._suffix, suffix) - @requires_sha3 def test_extra_sha3(self): self.check_sha3('sha3_224', 448, 1152, b'\x06') self.check_sha3('sha3_256', 512, 1088, b'\x06') @@ -786,68 +776,56 @@ def test_blake2s_vectors(self): key = bytes.fromhex(key) self.check('blake2s', msg, md, key=key) - @requires_sha3 def test_case_sha3_224_0(self): self.check('sha3_224', b"", "6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7") - @requires_sha3 def test_case_sha3_224_vector(self): for msg, md in read_vectors('sha3_224'): self.check('sha3_224', msg, md) - @requires_sha3 def test_case_sha3_256_0(self): self.check('sha3_256', b"", "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a") - @requires_sha3 def test_case_sha3_256_vector(self): for msg, md in read_vectors('sha3_256'): self.check('sha3_256', msg, md) - @requires_sha3 def test_case_sha3_384_0(self): self.check('sha3_384', b"", "0c63a75b845e4f7d01107d852e4c2485c51a50aaaa94fc61995e71bbee983a2a"+ "c3713831264adb47fb6bd1e058d5f004") - @requires_sha3 def test_case_sha3_384_vector(self): for msg, md in read_vectors('sha3_384'): self.check('sha3_384', msg, md) - @requires_sha3 def test_case_sha3_512_0(self): self.check('sha3_512', b"", "a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a6"+ "15b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26") - @requires_sha3 def test_case_sha3_512_vector(self): for msg, md in read_vectors('sha3_512'): self.check('sha3_512', msg, md) - @requires_sha3 def test_case_shake_128_0(self): self.check('shake_128', b"", "7f9c2ba4e88f827d616045507605853ed73b8093f6efbc88eb1a6eacfa66ef26", True) self.check('shake_128', b"", "7f9c", True) - @requires_sha3 def test_case_shake128_vector(self): for msg, md in read_vectors('shake_128'): self.check('shake_128', msg, md, True) - @requires_sha3 def test_case_shake_256_0(self): self.check('shake_256', b"", "46b9dd2b0ba88d13233b3feb743eeb243fcd52ea62b81b82b50c27646ed5762f", True) self.check('shake_256', b"", "46b9", True) - @requires_sha3 def test_case_shake256_vector(self): for msg, md in read_vectors('shake_256'): self.check('shake_256', msg, md, True) From 8bf274a5002c013dd4086f6390fa19452b63ac1d Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 17 Apr 2021 22:41:46 +0100 Subject: [PATCH 090/108] Small changes to the section about SyntaxErrors in the 3.10 What's New document (GH-25461) --- Doc/whatsnew/3.10.rst | 128 +++++++++++++++++++++++------------------- 1 file changed, 70 insertions(+), 58 deletions(-) diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 0198b6e75deab3..523668c7653315 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -176,90 +176,102 @@ have been incorporated. Some of the most notable ones: * Missing ``:`` before blocks: -.. code-block:: python + .. code-block:: python - >>> if rocket.position > event_horizon - File "", line 1 - if rocket.position > event_horizon - ^ - SyntaxError: expected ':' + >>> if rocket.position > event_horizon + File "", line 1 + if rocket.position > event_horizon + ^ + SyntaxError: expected ':' + (Contributed by Pablo Galindo in :issue:`42997`) * Unparenthesised tuples in comprehensions targets: -.. code-block:: python + .. code-block:: python - >>> {x,y for x,y in range(100)} - File "", line 1 - {x,y for x,y in range(100)} - ^ - SyntaxError: did you forget parentheses around the comprehension target? + >>> {x,y for x,y in range(100)} + File "", line 1 + {x,y for x,y in range(100)} + ^ + SyntaxError: did you forget parentheses around the comprehension target? -* Missing commas in collection literals: + (Contributed by Pablo Galindo in :issue:`43017`) -.. code-block:: python +* Missing commas in collection literals and between expressions: + + .. code-block:: python - >>> items = { - ... x: 1, - ... y: 2 - ... z: 3, - File "", line 3 - y: 2 - ^ - SyntaxError: invalid syntax. Perhaps you forgot a comma? + >>> items = { + ... x: 1, + ... y: 2 + ... z: 3, + File "", line 3 + y: 2 + ^ + SyntaxError: invalid syntax. Perhaps you forgot a comma? + + (Contributed by Pablo Galindo in :issue:`43822`) * Exception groups without parentheses: -.. code-block:: python + .. code-block:: python - >>> try: - ... build_dyson_sphere() - ... except NotEnoughScienceError, NotEnoughResourcesError: - File "", line 3 - except NotEnoughScienceError, NotEnoughResourcesError: - ^ - SyntaxError: exception group must be parenthesized + >>> try: + ... build_dyson_sphere() + ... except NotEnoughScienceError, NotEnoughResourcesError: + File "", line 3 + except NotEnoughScienceError, NotEnoughResourcesError: + ^ + SyntaxError: exception group must be parenthesized + + (Contributed by Pablo Galindo in :issue:`43149`) * Missing ``:`` and values in dictionary literals: -.. code-block:: python + .. code-block:: python + + >>> values = { + ... x: 1, + ... y: 2, + ... z: + ... } + File "", line 4 + z: + ^ + SyntaxError: expression expected after dictionary key and ':' - >>> values = { - ... x: 1, - ... y: 2, - ... z: - ... } - File "", line 4 - z: - ^ - SyntaxError: expression expected after dictionary key and ':' - - >>> values = {x:1, y:2, z w:3} - File "", line 1 - values = {x:1, y:2, z w:3} - ^ - SyntaxError: ':' expected after dictionary key + >>> values = {x:1, y:2, z w:3} + File "", line 1 + values = {x:1, y:2, z w:3} + ^ + SyntaxError: ':' expected after dictionary key + + (Contributed by Pablo Galindo in :issue:`43823`) * Usage of ``=`` instead of ``==`` in comparisons: -.. code-block:: python + .. code-block:: python - >>> if rocket.position = event_horizon: - File "", line 1 - if rocket.position = event_horizon: - ^ - SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='? + >>> if rocket.position = event_horizon: + File "", line 1 + if rocket.position = event_horizon: + ^ + SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='? + + (Contributed by Pablo Galindo in :issue:`43797`) * Usage of ``*`` in f-strings: -.. code-block:: python + .. code-block:: python - >>> f"Black holes {*all_black_holes} and revelations" - File "", line 1 - (*all_black_holes) - ^ - SyntaxError: f-string: cannot use starred expression here + >>> f"Black holes {*all_black_holes} and revelations" + File "", line 1 + (*all_black_holes) + ^ + SyntaxError: f-string: cannot use starred expression here + (Contributed by Pablo Galindo in :issue:`41064`) AttributeErrors ~~~~~~~~~~~~~~~ From 0b1c169c4a009e1094fe5df938d2367e63ebeea0 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sat, 17 Apr 2021 23:28:45 +0100 Subject: [PATCH 091/108] bpo-38530: Cover more error paths in error suggestion functions (GH-25462) --- Lib/test/test_exceptions.py | 10 ++++++++++ Python/suggestions.c | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index b730858a997354..d1e1b196c42789 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1741,6 +1741,16 @@ def __dir__(self): self.assertNotIn("blech", err.getvalue()) self.assertNotIn("oh no!", err.getvalue()) + def test_attribute_error_with_bad_name(self): + try: + raise AttributeError(name=12, obj=23) + except AttributeError as exc: + with support.captured_stderr() as err: + sys.__excepthook__(*sys.exc_info()) + + self.assertNotIn("?", err.getvalue()) + + class ImportErrorTests(unittest.TestCase): def test_attributes(self): diff --git a/Python/suggestions.c b/Python/suggestions.c index aa4870d13e1abf..d4e9dc22bbc7b9 100644 --- a/Python/suggestions.c +++ b/Python/suggestions.c @@ -8,7 +8,7 @@ #define MAX_STRING_SIZE 25 /* Calculate the Levenshtein distance between string1 and string2 */ -static size_t +static Py_ssize_t levenshtein_distance(const char *a, size_t a_size, const char *b, size_t b_size) { @@ -33,7 +33,7 @@ levenshtein_distance(const char *a, size_t a_size, size_t *buffer = PyMem_Calloc(a_size, sizeof(size_t)); if (buffer == NULL) { - return 0; + return -1; } // Initialize the buffer row @@ -99,6 +99,9 @@ calculate_suggestions(PyObject *dir, } Py_ssize_t current_distance = levenshtein_distance( name_str, name_size, item_str, item_size); + if (current_distance == -1) { + return NULL; + } if (current_distance == 0 || current_distance > MAX_DISTANCE) { continue; } From f5c5c0c362f84b3af168563ac9dec1d03cf8565a Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Sun, 18 Apr 2021 00:18:13 +0100 Subject: [PATCH 092/108] Fix type group capture in the PEG highlight tool (GH-25464) --- Doc/tools/extensions/peg_highlight.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Doc/tools/extensions/peg_highlight.py b/Doc/tools/extensions/peg_highlight.py index 4ade1bfeaa047f..42101be10ea9b6 100644 --- a/Doc/tools/extensions/peg_highlight.py +++ b/Doc/tools/extensions/peg_highlight.py @@ -42,14 +42,19 @@ class PEGLexer(RegexLexer): (r"(@\w+ '''(.|\n)+?''')", bygroups(None)), (r"^(@.*)$", bygroups(None)), ], - "actions": [(r"{(.|\n)+?}", bygroups(None)),], + "actions": [ + (r"{(.|\n)+?}", bygroups(None)), + ], "strings": [ (r"'\w+?'", Keyword), (r'"\w+?"', Keyword), (r"'\W+?'", Text), (r'"\W+?"', Text), ], - "variables": [(_name + _text_ws + r"(\[.*\])?" + _text_ws + "(=)", bygroups(None, None, None, None, None),),], + "variables": [ + (_name + _text_ws + "(=)", bygroups(None, None, None),), + (_name + _text_ws + r"(\[[\w\d_\*]+?\])" + _text_ws + "(=)", bygroups(None, None, None, None, None),), + ], "invalids": [ (r"^(\s+\|\s+invalid_\w+\s*\n)", bygroups(None)), (r"^(\s+\|\s+incorrect_\w+\s*\n)", bygroups(None)), From aa6da32edc3c6ddfda5e849561e20273b8d82771 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sun, 18 Apr 2021 08:39:39 +0200 Subject: [PATCH 093/108] bpo-43362: Fix invalid free and return check in _sha3 module (GH-25463) Commit 93d50a6a8d0c5d332c11aef267e66573a09765ac / GH-21855 changed the order of variable definitions, which introduced a potential invalid free bug. Py_buffer object is now initialized earlier and the result of Keccak initialize is verified. Co-authored-by: Alex Henrie Signed-off-by: Christian Heimes Co-authored-by: Alex Henrie --- .../2021-04-18-00-56-44.bpo-43362.__5aiP.rst | 2 ++ Modules/_sha3/sha3module.c | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Security/2021-04-18-00-56-44.bpo-43362.__5aiP.rst diff --git a/Misc/NEWS.d/next/Security/2021-04-18-00-56-44.bpo-43362.__5aiP.rst b/Misc/NEWS.d/next/Security/2021-04-18-00-56-44.bpo-43362.__5aiP.rst new file mode 100644 index 00000000000000..713a683bc8eb34 --- /dev/null +++ b/Misc/NEWS.d/next/Security/2021-04-18-00-56-44.bpo-43362.__5aiP.rst @@ -0,0 +1,2 @@ +Fix invalid free in _sha3 module. The issue was introduced in 3.10.0a1. +Python 3.9 and earlier are not affected. diff --git a/Modules/_sha3/sha3module.c b/Modules/_sha3/sha3module.c index cae10f99d5b8df..27f69385cc3eb0 100644 --- a/Modules/_sha3/sha3module.c +++ b/Modules/_sha3/sha3module.c @@ -193,15 +193,16 @@ static PyObject * py_sha3_new_impl(PyTypeObject *type, PyObject *data, int usedforsecurity) /*[clinic end generated code: output=90409addc5d5e8b0 input=bcfcdf2e4368347a]*/ { + HashReturn res; + Py_buffer buf = {NULL, NULL}; + SHA3State *state = PyType_GetModuleState(type); SHA3object *self = newSHA3object(type); if (self == NULL) { goto error; } - SHA3State *state = PyType_GetModuleState(type); assert(state != NULL); - HashReturn res; if (type == state->sha3_224_type) { res = Keccak_HashInitialize_SHA3_224(&self->hash_state); } else if (type == state->sha3_256_type) { @@ -229,7 +230,12 @@ py_sha3_new_impl(PyTypeObject *type, PyObject *data, int usedforsecurity) goto error; } - Py_buffer buf = {NULL, NULL}; + if (res != SUCCESS) { + PyErr_SetString(PyExc_RuntimeError, + "internal error in SHA3 initialize()"); + goto error; + } + if (data) { GET_BUFFER_VIEW_OR_ERROR(data, &buf, goto error); if (buf.len >= HASHLIB_GIL_MINSIZE) { From 2798f247c0747d28cb857fa80803797b24696cb6 Mon Sep 17 00:00:00 2001 From: Illia Volochii Date: Sun, 18 Apr 2021 10:10:53 +0300 Subject: [PATCH 094/108] bpo-43641: Stop stating that TLS 1.2 is the most modern version in docs (GH-25041) Automerge-Triggered-By: GH:tiran --- Doc/library/ssl.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 9f7459217a8fbe..9d5e063456ec2c 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -732,9 +732,8 @@ Constants .. data:: PROTOCOL_TLSv1_2 - Selects TLS version 1.2 as the channel encryption protocol. This is the - most modern version, and probably the best choice for maximum protection, - if both sides can speak it. Available only with openssl version 1.0.1+. + Selects TLS version 1.2 as the channel encryption protocol. + Available only with openssl version 1.0.1+. .. versionadded:: 3.4 From 49fdf118aeda891401d638ac32296c7d55d54678 Mon Sep 17 00:00:00 2001 From: juhovh Date: Sun, 18 Apr 2021 21:11:48 +1000 Subject: [PATCH 095/108] bpo-36076: Add SNI support to ssl.get_server_certificate. (GH-16820) Many servers in the cloud environment require SNI to be used during the SSL/TLS handshake, therefore it is not possible to fetch their certificates using the ssl.get_server_certificate interface. This change adds an additional optional hostname argument that can be used to set the SNI. Note that it is intentionally a separate argument instead of using the host part of the addr tuple, because one might want to explicitly fetch the default certificate or fetch a certificate from a specific IP address with the specified SNI hostname. A separate argument also works better for backwards compatibility. Automerge-Triggered-By: GH:tiran --- Lib/ssl.py | 2 +- Lib/test/test_ssl.py | 26 ++++++++++++++++++- Misc/ACKS | 1 + .../2019-10-16-17-21-53.bpo-36076.FGeQQT.rst | 1 + 4 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2019-10-16-17-21-53.bpo-36076.FGeQQT.rst diff --git a/Lib/ssl.py b/Lib/ssl.py index 9c1ba581dd66f5..99d0852dad18d5 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -1475,7 +1475,7 @@ def get_server_certificate(addr, ssl_version=PROTOCOL_TLS, ca_certs=None): cert_reqs=cert_reqs, cafile=ca_certs) with create_connection(addr) as sock: - with context.wrap_socket(sock) as sslsock: + with context.wrap_socket(sock, server_hostname=host) as sslsock: dercert = sslsock.getpeercert(True) return DER_cert_to_PEM_cert(dercert) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 3ad14c63968e64..403261dda96809 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1962,7 +1962,9 @@ class SimpleBackgroundTests(unittest.TestCase): """Tests that connect to a simple server running in the background""" def setUp(self): - server = ThreadedEchoServer(SIGNED_CERTFILE) + self.server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + self.server_context.load_cert_chain(SIGNED_CERTFILE) + server = ThreadedEchoServer(context=self.server_context) self.server_addr = (HOST, server.port) server.__enter__() self.addCleanup(server.__exit__, None, None, None) @@ -2143,6 +2145,28 @@ def test_non_blocking_handshake(self): def test_get_server_certificate(self): _test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA) + @needs_sni + def test_get_server_certificate_sni(self): + host, port = self.server_addr + server_names = [] + + # We store servername_cb arguments to make sure they match the host + def servername_cb(ssl_sock, server_name, initial_context): + server_names.append(server_name) + self.server_context.set_servername_callback(servername_cb) + + pem = ssl.get_server_certificate((host, port)) + if not pem: + self.fail("No server certificate on %s:%s!" % (host, port)) + + pem = ssl.get_server_certificate((host, port), ca_certs=SIGNING_CA) + if not pem: + self.fail("No server certificate on %s:%s!" % (host, port)) + if support.verbose: + sys.stdout.write("\nVerified certificate for %s:%s is\n%s\n" % (host, port, pem)) + + self.assertEqual(server_names, [host, host]) + def test_get_server_certificate_fail(self): # Connection failure crashes ThreadedEchoServer, so run this in an # independent test method diff --git a/Misc/ACKS b/Misc/ACKS index 20359762a52171..1eeae0caef50a1 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1803,6 +1803,7 @@ Michael Urman Hector Urtubia Elizabeth Uselton Lukas Vacek +Juho Vähä-Herttua Ville Vainio Yann Vaginay Andi Vajda diff --git a/Misc/NEWS.d/next/Library/2019-10-16-17-21-53.bpo-36076.FGeQQT.rst b/Misc/NEWS.d/next/Library/2019-10-16-17-21-53.bpo-36076.FGeQQT.rst new file mode 100644 index 00000000000000..7e9bc4e461e06f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-10-16-17-21-53.bpo-36076.FGeQQT.rst @@ -0,0 +1 @@ +Added SNI support to :func:`ssl.get_server_certificate`. From 89d1550d14ba689af12eeb726e4ff8ce73cee7e1 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 19 Apr 2021 06:55:30 +0200 Subject: [PATCH 096/108] bpo-42854: Use SSL_read/write_ex() (GH-25468) The ssl module now uses ``SSL_read_ex`` and ``SSL_write_ex`` internally. The functions support reading and writing of data larger than 2 GB. Writing zero-length data no longer fails with a protocol violation error. Signed-off-by: Christian Heimes --- Doc/library/ssl.rst | 5 +++ Lib/test/test_ssl.py | 11 +++++++ .../2021-04-19-03-54-29.bpo-42854.Y4M7Tv.rst | 4 +++ Modules/_ssl.c | 32 ++++++++----------- 4 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-19-03-54-29.bpo-42854.Y4M7Tv.rst diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 9d5e063456ec2c..8bac365ffc0e4c 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -1122,6 +1122,11 @@ SSL Sockets to create instances directly. This was never documented or officially supported. + .. versionchanged:: 3.10 + Python now uses ``SSL_read_ex`` and ``SSL_write_ex`` internally. The + functions support reading and writing of data larger than 2 GB. Writing + zero-length data no longer fails with a protocol violation error. + SSL sockets also have the following additional methods and attributes: .. method:: SSLSocket.read(len=1024, buffer=None) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 403261dda96809..7b70979026dcf1 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1110,6 +1110,17 @@ def test_connect_ex_error(self): ) self.assertIn(rc, errors) + def test_read_write_zero(self): + # empty reads and writes now work, bpo-42854, bpo-31711 + client_context, server_context, hostname = testing_context() + server = ThreadedEchoServer(context=server_context) + with server: + with client_context.wrap_socket(socket.socket(), + server_hostname=hostname) as s: + s.connect((HOST, server.port)) + self.assertEqual(s.recv(0), b"") + self.assertEqual(s.send(b""), 0) + class ContextTests(unittest.TestCase): diff --git a/Misc/NEWS.d/next/Library/2021-04-19-03-54-29.bpo-42854.Y4M7Tv.rst b/Misc/NEWS.d/next/Library/2021-04-19-03-54-29.bpo-42854.Y4M7Tv.rst new file mode 100644 index 00000000000000..3941fd85635f02 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-19-03-54-29.bpo-42854.Y4M7Tv.rst @@ -0,0 +1,4 @@ +The :mod:`ssl` module now uses ``SSL_read_ex`` and ``SSL_write_ex`` +internally. The functions support reading and writing of data larger +than 2 GB. Writing zero-length data no longer fails with a protocol +violation error. diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 376d3bb11a40bb..f371d4210a4889 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -2186,7 +2186,8 @@ static PyObject * _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) /*[clinic end generated code: output=aa7a6be5527358d8 input=77262d994fe5100a]*/ { - int len; + size_t count = 0; + int retval; int sockstate; _PySSLError err; int nonblocking; @@ -2204,12 +2205,6 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) Py_INCREF(sock); } - if (b->len > INT_MAX) { - PyErr_Format(PyExc_OverflowError, - "string longer than %d bytes", INT_MAX); - goto error; - } - if (sock != NULL) { /* just in case the blocking state of the socket has been changed */ nonblocking = (sock->sock_timeout >= 0); @@ -2239,8 +2234,8 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) do { PySSL_BEGIN_ALLOW_THREADS - len = SSL_write(self->ssl, b->buf, (int)b->len); - err = _PySSL_errno(len <= 0, self->ssl, len); + retval = SSL_write_ex(self->ssl, b->buf, (int)b->len, &count); + err = _PySSL_errno(retval == 0, self->ssl, retval); PySSL_END_ALLOW_THREADS self->err = err; @@ -2273,11 +2268,11 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b) err.ssl == SSL_ERROR_WANT_WRITE); Py_XDECREF(sock); - if (len <= 0) - return PySSL_SetError(self, len, __FILE__, __LINE__); + if (retval == 0) + return PySSL_SetError(self, retval, __FILE__, __LINE__); if (PySSL_ChainExceptions(self) < 0) return NULL; - return PyLong_FromLong(len); + return PyLong_FromSize_t(count); error: Py_XDECREF(sock); PySSL_ChainExceptions(self); @@ -2327,7 +2322,8 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1, { PyObject *dest = NULL; char *mem; - int count; + size_t count = 0; + int retval; int sockstate; _PySSLError err; int nonblocking; @@ -2390,8 +2386,8 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1, do { PySSL_BEGIN_ALLOW_THREADS - count = SSL_read(self->ssl, mem, len); - err = _PySSL_errno(count <= 0, self->ssl, count); + retval = SSL_read_ex(self->ssl, mem, len, &count); + err = _PySSL_errno(retval == 0, self->ssl, retval); PySSL_END_ALLOW_THREADS self->err = err; @@ -2424,8 +2420,8 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1, } while (err.ssl == SSL_ERROR_WANT_READ || err.ssl == SSL_ERROR_WANT_WRITE); - if (count <= 0) { - PySSL_SetError(self, count, __FILE__, __LINE__); + if (retval == 0) { + PySSL_SetError(self, retval, __FILE__, __LINE__); goto error; } if (self->exc_type != NULL) @@ -2438,7 +2434,7 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1, return dest; } else { - return PyLong_FromLong(count); + return PyLong_FromSize_t(count); } error: From 2875c603b2a7691b55c2046aca54831c91efda8e Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 19 Apr 2021 07:27:10 +0200 Subject: [PATCH 097/108] bpo-43880: Show DeprecationWarnings for deprecated ssl module features (GH-25455) * ssl.OP_NO_SSLv2 * ssl.OP_NO_SSLv3 * ssl.OP_NO_TLSv1 * ssl.OP_NO_TLSv1_1 * ssl.OP_NO_TLSv1_2 * ssl.OP_NO_TLSv1_3 * ssl.PROTOCOL_SSLv2 * ssl.PROTOCOL_SSLv3 * ssl.PROTOCOL_SSLv23 (alias for PROTOCOL_TLS) * ssl.PROTOCOL_TLS * ssl.PROTOCOL_TLSv1 * ssl.PROTOCOL_TLSv1_1 * ssl.PROTOCOL_TLSv1_2 * ssl.TLSVersion.SSLv3 * ssl.TLSVersion.TLSv1 * ssl.TLSVersion.TLSv1_1 * ssl.wrap_socket() * ssl.RAND_pseudo_bytes() * ssl.RAND_egd() (already removed since it's not supported by OpenSSL 1.1.1) * ssl.SSLContext() without a protocol argument * ssl.match_hostname() * hashlib.pbkdf2_hmac() (pure Python implementation, fast OpenSSL function will stay) Signed-off-by: Christian Heimes --- Doc/library/hashlib.rst | 6 + Doc/library/ssl.rst | 61 ++-- Lib/hashlib.py | 6 + Lib/ssl.py | 53 +++- Lib/test/pythoninfo.py | 2 +- Lib/test/test_asyncio/utils.py | 4 +- Lib/test/test_ftplib.py | 2 +- Lib/test/test_hashlib.py | 6 +- Lib/test/test_imaplib.py | 2 +- Lib/test/test_nntplib.py | 2 +- Lib/test/test_poplib.py | 2 +- Lib/test/test_ssl.py | 273 ++++++++---------- .../2021-04-17-13-53-33.bpo-43880.-fC2JD.rst | 3 + Modules/_ssl.c | 84 +++++- 14 files changed, 305 insertions(+), 201 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-17-13-53-33.bpo-43880.-fC2JD.rst diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst index 48c0bab1eb306d..d77a2e5912d5e6 100644 --- a/Doc/library/hashlib.rst +++ b/Doc/library/hashlib.rst @@ -266,6 +266,12 @@ include a `salt `_. Python implementation uses an inline version of :mod:`hmac`. It is about three times slower and doesn't release the GIL. + .. deprecated:: 3.10 + + Slow Python implementation of *pbkdf2_hmac* is deprecated. In the + future the function will only be available when Python is compiled + with OpenSSL. + .. function:: scrypt(password, *, salt, n, r, p, maxmem=0, dklen=64) The function provides scrypt password-based key derivation function as diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 8bac365ffc0e4c..c954d9c8febb01 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -25,8 +25,8 @@ probably additional platforms, as long as OpenSSL is installed on that platform. Some behavior may be platform dependent, since calls are made to the operating system socket APIs. The installed version of OpenSSL may also - cause variations in behavior. For example, TLSv1.1 and TLSv1.2 come with - openssl version 1.0.1. + cause variations in behavior. For example, TLSv1.3 with OpenSSL version + 1.1.1. .. warning:: Don't use this module without reading the :ref:`ssl-security`. Doing so @@ -63,6 +63,8 @@ by SSL sockets created through the :meth:`SSLContext.wrap_socket` method. :pep:`644` has been implemented. The ssl module requires OpenSSL 1.1.1 or newer. + Use of deprecated constants and functions result in deprecation warnings. + Functions, Constants, and Exceptions ------------------------------------ @@ -136,8 +138,9 @@ purposes. :const:`None`, this function can choose to trust the system's default CA certificates instead. - The settings are: :data:`PROTOCOL_TLS`, :data:`OP_NO_SSLv2`, and - :data:`OP_NO_SSLv3` with high encryption cipher suites without RC4 and + The settings are: :data:`PROTOCOL_TLS_CLIENT` or + :data:`PROTOCOL_TLS_SERVER`, :data:`OP_NO_SSLv2`, and :data:`OP_NO_SSLv3` + with high encryption cipher suites without RC4 and without unauthenticated cipher suites. Passing :data:`~Purpose.SERVER_AUTH` as *purpose* sets :data:`~SSLContext.verify_mode` to :data:`CERT_REQUIRED` and either loads CA certificates (when at least one of *cafile*, *capath* or @@ -185,6 +188,12 @@ purposes. Support for key logging to :envvar:`SSLKEYLOGFILE` was added. + .. versionchanged:: 3.10 + + The context now uses :data:`PROTOCOL_TLS_CLIENT` or + :data:`PROTOCOL_TLS_SERVER` protocol instead of generic + :data:`PROTOCOL_TLS`. + Exceptions ^^^^^^^^^^ @@ -417,7 +426,7 @@ Certificate handling previously. Return an integer (no fractions of a second in the input format) -.. function:: get_server_certificate(addr, ssl_version=PROTOCOL_TLS, ca_certs=None) +.. function:: get_server_certificate(addr, ssl_version=PROTOCOL_TLS_CLIENT, ca_certs=None) Given the address ``addr`` of an SSL-protected server, as a (*hostname*, *port-number*) pair, fetches the server's certificate, and returns it as a @@ -654,6 +663,8 @@ Constants .. versionadded:: 3.6 + .. deprecated:: 3.10 + .. data:: PROTOCOL_TLS_CLIENT Auto-negotiate the highest protocol version like :data:`PROTOCOL_TLS`, @@ -707,7 +718,10 @@ Constants .. deprecated:: 3.6 OpenSSL has deprecated all version specific protocols. Use the default - protocol :data:`PROTOCOL_TLS` with flags like :data:`OP_NO_SSLv3` instead. + protocol :data:`PROTOCOL_TLS_SERVER` or :data:`PROTOCOL_TLS_CLIENT` + with :attr:`SSLContext.minimum_version` and + :attr:`SSLContext.maximum_version` instead. + .. data:: PROTOCOL_TLSv1 @@ -715,8 +729,7 @@ Constants .. deprecated:: 3.6 - OpenSSL has deprecated all version specific protocols. Use the default - protocol :data:`PROTOCOL_TLS` with flags like :data:`OP_NO_SSLv3` instead. + OpenSSL has deprecated all version specific protocols. .. data:: PROTOCOL_TLSv1_1 @@ -727,8 +740,7 @@ Constants .. deprecated:: 3.6 - OpenSSL has deprecated all version specific protocols. Use the default - protocol :data:`PROTOCOL_TLS` with flags like :data:`OP_NO_SSLv3` instead. + OpenSSL has deprecated all version specific protocols. .. data:: PROTOCOL_TLSv1_2 @@ -739,8 +751,7 @@ Constants .. deprecated:: 3.6 - OpenSSL has deprecated all version specific protocols. Use the default - protocol :data:`PROTOCOL_TLS` with flags like :data:`OP_NO_SSLv3` instead. + OpenSSL has deprecated all version specific protocols. .. data:: OP_ALL @@ -762,7 +773,6 @@ Constants SSLv2 is deprecated - .. data:: OP_NO_SSLv3 Prevents an SSLv3 connection. This option is only applicable in @@ -1068,6 +1078,11 @@ Constants SSL 3.0 to TLS 1.3. + .. deprecated:: 3.10 + + All :class:`TLSVersion` members except :attr:`TLSVersion.TLSv1_2` and + :attr:`TLSVersion.TLSv1_3` are deprecated. + SSL Sockets ----------- @@ -1423,7 +1438,7 @@ such as SSL configuration options, certificate(s) and private key(s). It also manages a cache of SSL sessions for server-side sockets, in order to speed up repeated connections from the same clients. -.. class:: SSLContext(protocol=PROTOCOL_TLS) +.. class:: SSLContext(protocol=None) Create a new SSL context. You may pass *protocol* which must be one of the ``PROTOCOL_*`` constants defined in this module. The parameter @@ -1472,6 +1487,12 @@ to speed up repeated connections from the same clients. ciphers, no ``NULL`` ciphers and no ``MD5`` ciphers (except for :data:`PROTOCOL_SSLv2`). + .. deprecated:: 3.10 + + :class:`SSLContext` without protocol argument is deprecated. The + context class will either require :data:`PROTOCOL_TLS_CLIENT` or + :data:`PROTOCOL_TLS_SERVER` protocol in the future. + :class:`SSLContext` objects have the following methods and attributes: @@ -1934,7 +1955,7 @@ to speed up repeated connections from the same clients. .. attribute:: SSLContext.num_tickets Control the number of TLS 1.3 session tickets of a - :attr:`TLS_PROTOCOL_SERVER` context. The setting has no impact on TLS + :attr:`PROTOCOL_TLS_SERVER` context. The setting has no impact on TLS 1.0 to 1.2 connections. .. versionadded:: 3.8 @@ -1951,6 +1972,12 @@ to speed up repeated connections from the same clients. >>> ssl.create_default_context().options # doctest: +SKIP + .. deprecated:: 3.7 + + All ``OP_NO_SSL*`` and ``OP_NO_TLS*`` options have been deprecated since + Python 3.7. Use :attr:`SSLContext.minimum_version` and + :attr:`SSLContext.maximum_version` instead. + .. attribute:: SSLContext.post_handshake_auth Enable TLS 1.3 post-handshake client authentication. Post-handshake auth @@ -2623,8 +2650,8 @@ disabled by default. :: >>> client_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) - >>> client_context.options |= ssl.OP_NO_TLSv1 - >>> client_context.options |= ssl.OP_NO_TLSv1_1 + >>> client_context.minimum_version = ssl.TLSVersion.TLSv1_3 + >>> client_context.maximum_version = ssl.TLSVersion.TLSv1_3 The SSL context created above will only allow TLSv1.2 and later (if diff --git a/Lib/hashlib.py b/Lib/hashlib.py index ffa3be049a4f35..21a73f3bf6cb62 100644 --- a/Lib/hashlib.py +++ b/Lib/hashlib.py @@ -181,6 +181,7 @@ def __hash_new(name, data=b'', **kwargs): # OpenSSL's PKCS5_PBKDF2_HMAC requires OpenSSL 1.0+ with HMAC and SHA from _hashlib import pbkdf2_hmac except ImportError: + from warnings import warn as _warn _trans_5C = bytes((x ^ 0x5C) for x in range(256)) _trans_36 = bytes((x ^ 0x36) for x in range(256)) @@ -191,6 +192,11 @@ def pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None): as OpenSSL's PKCS5_PBKDF2_HMAC for short passwords and much faster for long passwords. """ + _warn( + "Python implementation of pbkdf2_hmac() is deprecated.", + category=DeprecationWarning, + stacklevel=2 + ) if not isinstance(hash_name, str): raise TypeError(hash_name) diff --git a/Lib/ssl.py b/Lib/ssl.py index 99d0852dad18d5..d631805d6cabe5 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -381,6 +381,11 @@ def match_hostname(cert, hostname): CertificateError is raised on failure. On success, the function returns nothing. """ + warnings.warn( + "ssl module: match_hostname() is deprecated", + category=DeprecationWarning, + stacklevel=2 + ) if not cert: raise ValueError("empty or no certificate, match_hostname needs a " "SSL socket or SSL context with either " @@ -479,7 +484,15 @@ class SSLContext(_SSLContext): sslsocket_class = None # SSLSocket is assigned later. sslobject_class = None # SSLObject is assigned later. - def __new__(cls, protocol=PROTOCOL_TLS, *args, **kwargs): + def __new__(cls, protocol=None, *args, **kwargs): + if protocol is None: + warnings.warn( + "ssl module: " + "SSLContext() without protocol argument is deprecated.", + category=DeprecationWarning, + stacklevel=2 + ) + protocol = PROTOCOL_TLS self = _SSLContext.__new__(cls, protocol) return self @@ -518,6 +531,7 @@ def wrap_bio(self, incoming, outgoing, server_side=False, ) def set_npn_protocols(self, npn_protocols): + warnings.warn("NPN is deprecated, use ALPN instead", stacklevel=2) protos = bytearray() for protocol in npn_protocols: b = bytes(protocol, 'ascii') @@ -734,12 +748,15 @@ def create_default_context(purpose=Purpose.SERVER_AUTH, *, cafile=None, # SSLContext sets OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_COMPRESSION, # OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE and OP_SINGLE_ECDH_USE # by default. - context = SSLContext(PROTOCOL_TLS) - if purpose == Purpose.SERVER_AUTH: # verify certs and host name in client mode + context = SSLContext(PROTOCOL_TLS_CLIENT) context.verify_mode = CERT_REQUIRED context.check_hostname = True + elif purpose == Purpose.CLIENT_AUTH: + context = SSLContext(PROTOCOL_TLS_SERVER) + else: + raise ValueError(purpose) if cafile or capath or cadata: context.load_verify_locations(cafile, capath, cadata) @@ -755,7 +772,7 @@ def create_default_context(purpose=Purpose.SERVER_AUTH, *, cafile=None, context.keylog_filename = keylogfile return context -def _create_unverified_context(protocol=PROTOCOL_TLS, *, cert_reqs=CERT_NONE, +def _create_unverified_context(protocol=None, *, cert_reqs=CERT_NONE, check_hostname=False, purpose=Purpose.SERVER_AUTH, certfile=None, keyfile=None, cafile=None, capath=None, cadata=None): @@ -772,10 +789,18 @@ def _create_unverified_context(protocol=PROTOCOL_TLS, *, cert_reqs=CERT_NONE, # SSLContext sets OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_COMPRESSION, # OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE and OP_SINGLE_ECDH_USE # by default. - context = SSLContext(protocol) + if purpose == Purpose.SERVER_AUTH: + # verify certs and host name in client mode + if protocol is None: + protocol = PROTOCOL_TLS_CLIENT + elif purpose == Purpose.CLIENT_AUTH: + if protocol is None: + protocol = PROTOCOL_TLS_SERVER + else: + raise ValueError(purpose) - if not check_hostname: - context.check_hostname = False + context = SSLContext(protocol) + context.check_hostname = check_hostname if cert_reqs is not None: context.verify_mode = cert_reqs if check_hostname: @@ -909,6 +934,9 @@ def selected_npn_protocol(self): """Return the currently selected NPN protocol as a string, or ``None`` if a next protocol was not negotiated or if NPN is not supported by one of the peers.""" + warnings.warn( + "ssl module: NPN is deprecated, use ALPN instead", stacklevel=2 + ) def selected_alpn_protocol(self): """Return the currently selected ALPN protocol as a string, or ``None`` @@ -1123,6 +1151,9 @@ def getpeercert(self, binary_form=False): @_sslcopydoc def selected_npn_protocol(self): self._checkClosed() + warnings.warn( + "ssl module: NPN is deprecated, use ALPN instead", stacklevel=2 + ) return None @_sslcopydoc @@ -1382,7 +1413,11 @@ def wrap_socket(sock, keyfile=None, certfile=None, do_handshake_on_connect=True, suppress_ragged_eofs=True, ciphers=None): - + warnings.warn( + "ssl module: wrap_socket is deprecated, use SSLContext.wrap_socket()", + category=DeprecationWarning, + stacklevel=2 + ) if server_side and not certfile: raise ValueError("certfile must be specified for server-side " "operations") @@ -1460,7 +1495,7 @@ def PEM_cert_to_DER_cert(pem_cert_string): d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)] return base64.decodebytes(d.encode('ASCII', 'strict')) -def get_server_certificate(addr, ssl_version=PROTOCOL_TLS, ca_certs=None): +def get_server_certificate(addr, ssl_version=PROTOCOL_TLS_CLIENT, ca_certs=None): """Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index cc228fb3b54c94..278dfe7f7da7ac 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -504,7 +504,7 @@ def format_attr(attr, value): copy_attributes(info_add, ssl, 'ssl.%s', attributes, formatter=format_attr) for name, ctx in ( - ('SSLContext', ssl.SSLContext()), + ('SSLContext', ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)), ('default_https_context', ssl._create_default_https_context()), ('stdlib_context', ssl._create_stdlib_context()), ): diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py index 0032c9a331f752..3765194cd0dd27 100644 --- a/Lib/test/test_asyncio/utils.py +++ b/Lib/test/test_asyncio/utils.py @@ -91,7 +91,7 @@ def dummy_ssl_context(): if ssl is None: return None else: - return ssl.SSLContext(ssl.PROTOCOL_TLS) + return simple_client_sslcontext(disable_verify=True) def run_briefly(loop): @@ -158,7 +158,7 @@ def finish_request(self, request, client_address): # contains the ssl key and certificate files) differs # between the stdlib and stand-alone asyncio. # Prefer our own if we can find it. - context = ssl.SSLContext() + context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) context.load_cert_chain(ONLYCERT, ONLYKEY) ssock = context.wrap_socket(request, server_side=True) diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py index 154dce15e2c372..a48b429ca38027 100644 --- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -324,7 +324,7 @@ class SSLConnection(asyncore.dispatcher): _ssl_closing = False def secure_connection(self): - context = ssl.SSLContext() + context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) context.load_cert_chain(CERTFILE) socket = context.wrap_socket(self.socket, suppress_ragged_eofs=False, diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index bf9f5594004602..9e9c874445c27d 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -21,6 +21,7 @@ from test.support import _4G, bigmemtest from test.support.import_helper import import_fresh_module from test.support import threading_helper +from test.support import warnings_helper from http.client import HTTPException # Were we compiled --with-pydebug or with #define Py_DEBUG? @@ -1021,7 +1022,10 @@ def _test_pbkdf2_hmac(self, pbkdf2, supported): @unittest.skipIf(builtin_hashlib is None, "test requires builtin_hashlib") def test_pbkdf2_hmac_py(self): - self._test_pbkdf2_hmac(builtin_hashlib.pbkdf2_hmac, builtin_hashes) + with warnings_helper.check_warnings(): + self._test_pbkdf2_hmac( + builtin_hashlib.pbkdf2_hmac, builtin_hashes + ) @unittest.skipUnless(hasattr(openssl_hashlib, 'pbkdf2_hmac'), ' test requires OpenSSL > 1.0') diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 0cab7897a96dcb..c2b935f58164e5 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -96,7 +96,7 @@ class SecureTCPServer(socketserver.TCPServer): def get_request(self): newsocket, fromaddr = self.socket.accept() - context = ssl.SSLContext() + context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) context.load_cert_chain(CERTFILE) connstream = context.wrap_socket(newsocket, server_side=True) return connstream, fromaddr diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index 4dbf941036f099..230a4443894678 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -1602,7 +1602,7 @@ def run_server(self, sock): elif cmd == b'STARTTLS\r\n': reader.close() client.sendall(b'382 Begin TLS negotiation now\r\n') - context = ssl.SSLContext() + context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) context.load_cert_chain(certfile) client = context.wrap_socket( client, server_side=True) diff --git a/Lib/test/test_poplib.py b/Lib/test/test_poplib.py index 548868362a397f..c5ae9f77e4f006 100644 --- a/Lib/test/test_poplib.py +++ b/Lib/test/test_poplib.py @@ -155,7 +155,7 @@ def cmd_utf8(self, arg): def cmd_stls(self, arg): if self.tls_active is False: self.push('+OK Begin TLS negotiation') - context = ssl.SSLContext() + context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) context.load_cert_chain(CERTFILE) tls_sock = context.wrap_socket(self.socket, server_side=True, diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 7b70979026dcf1..a2c79ff5927f12 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -224,7 +224,7 @@ def has_tls_version(version): # check runtime and dynamic crypto policy settings. A TLS version may # be compiled in but disabled by a policy or config option. - ctx = ssl.SSLContext() + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) if ( hasattr(ctx, 'minimum_version') and ctx.minimum_version != ssl.TLSVersion.MINIMUM_SUPPORTED and @@ -306,12 +306,20 @@ def asn1time(cert_time): needs_sni = unittest.skipUnless(ssl.HAS_SNI, "SNI support needed for this test") +ignore_deprecation = warnings_helper.ignore_warnings( + category=DeprecationWarning +) + -def test_wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLS, *, +def test_wrap_socket(sock, *, cert_reqs=ssl.CERT_NONE, ca_certs=None, ciphers=None, certfile=None, keyfile=None, **kwargs): - context = ssl.SSLContext(ssl_version) + if not kwargs.get("server_side"): + kwargs["server_hostname"] = SIGNED_CERTFILE_HOSTNAME + context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + else: + context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) if cert_reqs is not None: if cert_reqs == ssl.CERT_NONE: context.check_hostname = False @@ -378,8 +386,8 @@ def test_private_init(self): def test_str_for_enums(self): # Make sure that the PROTOCOL_* constants have enum-like string # reprs. - proto = ssl.PROTOCOL_TLS - self.assertEqual(str(proto), 'PROTOCOL_TLS') + proto = ssl.PROTOCOL_TLS_CLIENT + self.assertEqual(str(proto), 'PROTOCOL_TLS_CLIENT') ctx = ssl.SSLContext(proto) self.assertIs(ctx.protocol, proto) @@ -390,7 +398,8 @@ def test_random(self): % (v, (v and "sufficient randomness") or "insufficient randomness")) - data, is_cryptographic = ssl.RAND_pseudo_bytes(16) + with warnings_helper.check_warnings(): + data, is_cryptographic = ssl.RAND_pseudo_bytes(16) self.assertEqual(len(data), 16) self.assertEqual(is_cryptographic, v == 1) if v: @@ -401,48 +410,13 @@ def test_random(self): # negative num is invalid self.assertRaises(ValueError, ssl.RAND_bytes, -5) - self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5) + with warnings_helper.check_warnings(): + self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5) - if hasattr(ssl, 'RAND_egd'): - self.assertRaises(TypeError, ssl.RAND_egd, 1) - self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1) ssl.RAND_add("this is a random string", 75.0) ssl.RAND_add(b"this is a random bytes object", 75.0) ssl.RAND_add(bytearray(b"this is a random bytearray object"), 75.0) - @unittest.skipUnless(hasattr(os, 'fork'), 'need os.fork') - def test_random_fork(self): - status = ssl.RAND_status() - if not status: - self.fail("OpenSSL's PRNG has insufficient randomness") - - rfd, wfd = os.pipe() - pid = os.fork() - if pid == 0: - try: - os.close(rfd) - child_random = ssl.RAND_pseudo_bytes(16)[0] - self.assertEqual(len(child_random), 16) - os.write(wfd, child_random) - os.close(wfd) - except BaseException: - os._exit(1) - else: - os._exit(0) - else: - os.close(wfd) - self.addCleanup(os.close, rfd) - support.wait_process(pid, exitcode=0) - - child_random = os.read(rfd, 16) - self.assertEqual(len(child_random), 16) - parent_random = ssl.RAND_pseudo_bytes(16)[0] - self.assertEqual(len(parent_random), 16) - - self.assertNotEqual(child_random, parent_random) - - maxDiff = None - def test_parse_cert(self): # note that this uses an 'unofficial' function in _ssl.c, # provided solely for this test, to exercise the certificate @@ -624,6 +598,7 @@ def test_timeout(self): with test_wrap_socket(s) as ss: self.assertEqual(timeout, ss.gettimeout()) + @ignore_deprecation def test_errors_sslwrap(self): sock = socket.socket() self.assertRaisesRegex(ValueError, @@ -675,6 +650,7 @@ def test_malformed_key(self): """Wrapping with a badly formatted key (syntax error)""" self.bad_cert_test("badkey.pem") + @ignore_deprecation def test_match_hostname(self): def ok(cert, hostname): ssl.match_hostname(cert, hostname) @@ -1126,17 +1102,15 @@ class ContextTests(unittest.TestCase): def test_constructor(self): for protocol in PROTOCOLS: - ssl.SSLContext(protocol) - ctx = ssl.SSLContext() + with warnings_helper.check_warnings(): + ctx = ssl.SSLContext(protocol) + self.assertEqual(ctx.protocol, protocol) + with warnings_helper.check_warnings(): + ctx = ssl.SSLContext() self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS) self.assertRaises(ValueError, ssl.SSLContext, -1) self.assertRaises(ValueError, ssl.SSLContext, 42) - def test_protocol(self): - for proto in PROTOCOLS: - ctx = ssl.SSLContext(proto) - self.assertEqual(ctx.protocol, proto) - def test_ciphers(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ctx.set_ciphers("ALL") @@ -1174,16 +1148,19 @@ def test_options(self): OP_ENABLE_MIDDLEBOX_COMPAT | OP_IGNORE_UNEXPECTED_EOF) self.assertEqual(default, ctx.options) - ctx.options |= ssl.OP_NO_TLSv1 + with warnings_helper.check_warnings(): + ctx.options |= ssl.OP_NO_TLSv1 self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options) - ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1) + with warnings_helper.check_warnings(): + ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1) self.assertEqual(default, ctx.options) ctx.options = 0 # Ubuntu has OP_NO_SSLv3 forced on by default self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3) def test_verify_mode_protocol(self): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) + with warnings_helper.check_warnings(): + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) # Default value self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) ctx.verify_mode = ssl.CERT_OPTIONAL @@ -1221,6 +1198,7 @@ def test_hostname_checks_common_name(self): @requires_minimum_version @unittest.skipIf(IS_LIBRESSL, "see bpo-34001") + @ignore_deprecation def test_min_max_version(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) # OpenSSL default is MINIMUM_SUPPORTED, however some vendors like @@ -1304,7 +1282,7 @@ def test_min_max_version(self): "requires OpenSSL >= 1.1.0" ) def test_security_level(self): - ctx = ssl.SSLContext() + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) # The default security callback allows for levels between 0-5 # with OpenSSL defaulting to 1, however some vendors override the # default value (e.g. Debian defaults to 2) @@ -1513,7 +1491,7 @@ def test_load_dh_params(self): ctx.load_dh_params(CERTFILE) def test_session_stats(self): - for proto in PROTOCOLS: + for proto in {ssl.PROTOCOL_TLS_CLIENT, ssl.PROTOCOL_TLS_SERVER}: ctx = ssl.SSLContext(proto) self.assertEqual(ctx.session_stats(), { 'number': 0, @@ -1673,7 +1651,7 @@ def _assert_context_options(self, ctx): def test_create_default_context(self): ctx = ssl.create_default_context() - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS) + self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_CLIENT) self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) self.assertTrue(ctx.check_hostname) self._assert_context_options(ctx) @@ -1682,42 +1660,49 @@ def test_create_default_context(self): cadata = f.read() ctx = ssl.create_default_context(cafile=SIGNING_CA, capath=CAPATH, cadata=cadata) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS) + self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_CLIENT) self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) self._assert_context_options(ctx) ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS) + self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) self._assert_context_options(ctx) + + def test__create_stdlib_context(self): ctx = ssl._create_stdlib_context() - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS) + self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_CLIENT) self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) self.assertFalse(ctx.check_hostname) self._assert_context_options(ctx) - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) + with warnings_helper.check_warnings(): + ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1) self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) self._assert_context_options(ctx) - ctx = ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1, - cert_reqs=ssl.CERT_REQUIRED, - check_hostname=True) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1) + with warnings_helper.check_warnings(): + ctx = ssl._create_stdlib_context( + ssl.PROTOCOL_TLSv1_2, + cert_reqs=ssl.CERT_REQUIRED, + check_hostname=True + ) + self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLSv1_2) self.assertEqual(ctx.verify_mode, ssl.CERT_REQUIRED) self.assertTrue(ctx.check_hostname) self._assert_context_options(ctx) ctx = ssl._create_stdlib_context(purpose=ssl.Purpose.CLIENT_AUTH) - self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS) + self.assertEqual(ctx.protocol, ssl.PROTOCOL_TLS_SERVER) self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) self._assert_context_options(ctx) def test_check_hostname(self): - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) + with warnings_helper.check_warnings(): + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) self.assertFalse(ctx.check_hostname) self.assertEqual(ctx.verify_mode, ssl.CERT_NONE) @@ -2042,7 +2027,9 @@ def test_non_blocking_connect_ex(self): def test_connect_with_context(self): # Same as test_connect, but with a separately created context - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + ctx.check_hostname = False + ctx.verify_mode = ssl.CERT_NONE with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s: s.connect(self.server_addr) self.assertEqual({}, s.getpeercert()) @@ -2062,9 +2049,11 @@ def test_connect_with_context_fail(self): # This should fail because we have no verification certs. Connection # failure crashes ThreadedEchoServer, so run this in an independent # test method. - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) - ctx.verify_mode = ssl.CERT_REQUIRED - s = ctx.wrap_socket(socket.socket(socket.AF_INET)) + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + s = ctx.wrap_socket( + socket.socket(socket.AF_INET), + server_hostname=SIGNED_CERTFILE_HOSTNAME + ) self.addCleanup(s.close) self.assertRaisesRegex(ssl.SSLError, "certificate verify failed", s.connect, self.server_addr) @@ -2075,19 +2064,19 @@ def test_connect_capath(self): # OpenSSL 0.9.8n and 1.0.0, as a result the capath directory must # contain both versions of each certificate (same content, different # filename) for this test to be portable across OpenSSL releases. - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) - ctx.verify_mode = ssl.CERT_REQUIRED + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ctx.load_verify_locations(capath=CAPATH) - with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s: + with ctx.wrap_socket(socket.socket(socket.AF_INET), + server_hostname=SIGNED_CERTFILE_HOSTNAME) as s: s.connect(self.server_addr) cert = s.getpeercert() self.assertTrue(cert) # Same with a bytes `capath` argument - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) - ctx.verify_mode = ssl.CERT_REQUIRED + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ctx.load_verify_locations(capath=BYTES_CAPATH) - with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s: + with ctx.wrap_socket(socket.socket(socket.AF_INET), + server_hostname=SIGNED_CERTFILE_HOSTNAME) as s: s.connect(self.server_addr) cert = s.getpeercert() self.assertTrue(cert) @@ -2096,19 +2085,19 @@ def test_connect_cadata(self): with open(SIGNING_CA) as f: pem = f.read() der = ssl.PEM_cert_to_DER_cert(pem) - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) - ctx.verify_mode = ssl.CERT_REQUIRED + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ctx.load_verify_locations(cadata=pem) - with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s: + with ctx.wrap_socket(socket.socket(socket.AF_INET), + server_hostname=SIGNED_CERTFILE_HOSTNAME) as s: s.connect(self.server_addr) cert = s.getpeercert() self.assertTrue(cert) # same with DER - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) - ctx.verify_mode = ssl.CERT_REQUIRED + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ctx.load_verify_locations(cadata=der) - with ctx.wrap_socket(socket.socket(socket.AF_INET)) as s: + with ctx.wrap_socket(socket.socket(socket.AF_INET), + server_hostname=SIGNED_CERTFILE_HOSTNAME) as s: s.connect(self.server_addr) cert = s.getpeercert() self.assertTrue(cert) @@ -2302,7 +2291,8 @@ def test_bio_read_write_data(self): sock.connect(self.server_addr) incoming = ssl.MemoryBIO() outgoing = ssl.MemoryBIO() - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) + ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE sslobj = ctx.wrap_bio(incoming, outgoing, False) self.ssl_io_loop(sock, incoming, outgoing, sslobj.do_handshake) @@ -2384,7 +2374,6 @@ def wrap_conn(self): try: self.sslconn = self.server.context.wrap_socket( self.sock, server_side=True) - self.server.selected_npn_protocols.append(self.sslconn.selected_npn_protocol()) self.server.selected_alpn_protocols.append(self.sslconn.selected_alpn_protocol()) except (ConnectionResetError, BrokenPipeError, ConnectionAbortedError) as e: # We treat ConnectionResetError as though it were an @@ -2433,8 +2422,6 @@ def wrap_conn(self): cipher = self.sslconn.cipher() if support.verbose and self.server.chatty: sys.stdout.write(" server: connection cipher is now " + str(cipher) + "\n") - sys.stdout.write(" server: selected protocol is now " - + str(self.sslconn.selected_npn_protocol()) + "\n") return True def read(self): @@ -2562,7 +2549,7 @@ def run(self): def __init__(self, certificate=None, ssl_version=None, certreqs=None, cacerts=None, chatty=True, connectionchatty=False, starttls_server=False, - npn_protocols=None, alpn_protocols=None, + alpn_protocols=None, ciphers=None, context=None): if context: self.context = context @@ -2576,8 +2563,6 @@ def __init__(self, certificate=None, ssl_version=None, self.context.load_verify_locations(cacerts) if certificate: self.context.load_cert_chain(certificate) - if npn_protocols: - self.context.set_npn_protocols(npn_protocols) if alpn_protocols: self.context.set_alpn_protocols(alpn_protocols) if ciphers: @@ -2589,7 +2574,6 @@ def __init__(self, certificate=None, ssl_version=None, self.port = socket_helper.bind_port(self.sock) self.flag = None self.active = False - self.selected_npn_protocols = [] self.selected_alpn_protocols = [] self.shared_ciphers = [] self.conn_errors = [] @@ -2796,14 +2780,12 @@ def server_params_test(client_context, server_context, indata=b"FOO\n", 'cipher': s.cipher(), 'peercert': s.getpeercert(), 'client_alpn_protocol': s.selected_alpn_protocol(), - 'client_npn_protocol': s.selected_npn_protocol(), 'version': s.version(), 'session_reused': s.session_reused, 'session': s.session, }) s.close() stats['server_alpn_protocols'] = server.selected_alpn_protocols - stats['server_npn_protocols'] = server.selected_npn_protocols stats['server_shared_ciphers'] = server.shared_ciphers return stats @@ -2829,21 +2811,26 @@ def try_protocol_combo(server_protocol, client_protocol, expect_success, (ssl.get_protocol_name(client_protocol), ssl.get_protocol_name(server_protocol), certtype)) - client_context = ssl.SSLContext(client_protocol) - client_context.options |= client_options - server_context = ssl.SSLContext(server_protocol) - server_context.options |= server_options + + with warnings_helper.check_warnings(): + # ignore Deprecation warnings + client_context = ssl.SSLContext(client_protocol) + client_context.options |= client_options + server_context = ssl.SSLContext(server_protocol) + server_context.options |= server_options min_version = PROTOCOL_TO_TLS_VERSION.get(client_protocol, None) if (min_version is not None - # SSLContext.minimum_version is only available on recent OpenSSL - # (setter added in OpenSSL 1.1.0, getter added in OpenSSL 1.1.1) - and hasattr(server_context, 'minimum_version') - and server_protocol == ssl.PROTOCOL_TLS - and server_context.minimum_version > min_version): + # SSLContext.minimum_version is only available on recent OpenSSL + # (setter added in OpenSSL 1.1.0, getter added in OpenSSL 1.1.1) + and hasattr(server_context, 'minimum_version') + and server_protocol == ssl.PROTOCOL_TLS + and server_context.minimum_version > min_version + ): # If OpenSSL configuration is strict and requires more recent TLS # version, we have to change the minimum to test old TLS versions. - server_context.minimum_version = min_version + with warnings_helper.check_warnings(): + server_context.minimum_version = min_version # NOTE: we must enable "ALL" ciphers on the client, otherwise an # SSLv23 client will send an SSLv3 hello (rather than SSLv2) @@ -2886,17 +2873,6 @@ def test_echo(self): """Basic test of an SSL client connecting to a server""" if support.verbose: sys.stdout.write("\n") - for protocol in PROTOCOLS: - if protocol in {ssl.PROTOCOL_TLS_CLIENT, ssl.PROTOCOL_TLS_SERVER}: - continue - if not has_tls_protocol(protocol): - continue - with self.subTest(protocol=ssl._PROTOCOL_NAMES[protocol]): - context = ssl.SSLContext(protocol) - context.load_cert_chain(CERTFILE) - seclevel_workaround(context) - server_params_test(context, context, - chatty=True, connectionchatty=True) client_context, server_context, hostname = testing_context() @@ -3565,8 +3541,7 @@ def test_recv_send(self): server_side=False, certfile=CERTFILE, ca_certs=CERTFILE, - cert_reqs=ssl.CERT_NONE, - ssl_version=ssl.PROTOCOL_TLS_CLIENT) + cert_reqs=ssl.CERT_NONE) s.connect((HOST, server.port)) # helper methods for standardising recv* method signatures def _recv_into(): @@ -3718,8 +3693,7 @@ def test_nonblocking_send(self): server_side=False, certfile=CERTFILE, ca_certs=CERTFILE, - cert_reqs=ssl.CERT_NONE, - ssl_version=ssl.PROTOCOL_TLS_CLIENT) + cert_reqs=ssl.CERT_NONE) s.connect((HOST, server.port)) s.setblocking(False) @@ -3788,14 +3762,11 @@ def serve(): def test_server_accept(self): # Issue #16357: accept() on a SSLSocket created through # SSLContext.wrap_socket(). - context = ssl.SSLContext(ssl.PROTOCOL_TLS) - context.verify_mode = ssl.CERT_REQUIRED - context.load_verify_locations(SIGNING_CA) - context.load_cert_chain(SIGNED_CERTFILE) + client_ctx, server_ctx, hostname = testing_context() server = socket.socket(socket.AF_INET) host = "127.0.0.1" port = socket_helper.bind_port(server) - server = context.wrap_socket(server, server_side=True) + server = server_ctx.wrap_socket(server, server_side=True) self.assertTrue(server.server_side) evt = threading.Event() @@ -3813,8 +3784,10 @@ def serve(): t.start() # Client wait until server setup and perform a connect. evt.wait() - client = context.wrap_socket(socket.socket()) - client.connect((host, port)) + client = client_ctx.wrap_socket( + socket.socket(), server_hostname=hostname + ) + client.connect((hostname, port)) client.send(b'data') client.recv() client_addr = client.getsockname() @@ -3827,14 +3800,16 @@ def serve(): self.assertEqual(peer, client_addr) def test_getpeercert_enotconn(self): - context = ssl.SSLContext(ssl.PROTOCOL_TLS) + context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + context.check_hostname = False with context.wrap_socket(socket.socket()) as sock: with self.assertRaises(OSError) as cm: sock.getpeercert() self.assertEqual(cm.exception.errno, errno.ENOTCONN) def test_do_handshake_enotconn(self): - context = ssl.SSLContext(ssl.PROTOCOL_TLS) + context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + context.check_hostname = False with context.wrap_socket(socket.socket()) as sock: with self.assertRaises(OSError) as cm: sock.do_handshake() @@ -3875,13 +3850,11 @@ def test_version_basic(self): @requires_tls_version('TLSv1_3') def test_tls1_3(self): - context = ssl.SSLContext(ssl.PROTOCOL_TLS) - context.load_cert_chain(CERTFILE) - context.options |= ( - ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 | ssl.OP_NO_TLSv1_2 - ) - with ThreadedEchoServer(context=context) as server: - with context.wrap_socket(socket.socket()) as s: + client_context, server_context, hostname = testing_context() + client_context.minimum_version = ssl.TLSVersion.TLSv1_3 + with ThreadedEchoServer(context=server_context) as server: + with client_context.wrap_socket(socket.socket(), + server_hostname=hostname) as s: s.connect((HOST, server.port)) self.assertIn(s.cipher()[0], { 'TLS_AES_256_GCM_SHA384', @@ -3892,6 +3865,8 @@ def test_tls1_3(self): @requires_minimum_version @requires_tls_version('TLSv1_2') + @requires_tls_version('TLSv1') + @ignore_deprecation def test_min_max_version_tlsv1_2(self): client_context, server_context, hostname = testing_context() # client TLSv1.0 to 1.2 @@ -3909,6 +3884,7 @@ def test_min_max_version_tlsv1_2(self): @requires_minimum_version @requires_tls_version('TLSv1_1') + @ignore_deprecation def test_min_max_version_tlsv1_1(self): client_context, server_context, hostname = testing_context() # client 1.0 to 1.2, server 1.0 to 1.1 @@ -3927,6 +3903,7 @@ def test_min_max_version_tlsv1_1(self): @requires_minimum_version @requires_tls_version('TLSv1_2') @requires_tls_version('TLSv1') + @ignore_deprecation def test_min_max_version_mismatch(self): client_context, server_context, hostname = testing_context() # client 1.0, server 1.2 (mismatch) @@ -3962,17 +3939,17 @@ def test_min_max_version_sslv3(self): def test_default_ecdh_curve(self): # Issue #21015: elliptic curve-based Diffie Hellman key exchange # should be enabled by default on SSL contexts. - context = ssl.SSLContext(ssl.PROTOCOL_TLS) - context.load_cert_chain(CERTFILE) + client_context, server_context, hostname = testing_context() # TLSv1.3 defaults to PFS key agreement and no longer has KEA in # cipher name. - context.options |= ssl.OP_NO_TLSv1_3 + client_context.maximum_version = ssl.TLSVersion.TLSv1_2 # Prior to OpenSSL 1.0.0, ECDH ciphers have to be enabled # explicitly using the 'ECCdraft' cipher alias. Otherwise, # our default cipher list should prefer ECDH-based ciphers # automatically. - with ThreadedEchoServer(context=context) as server: - with context.wrap_socket(socket.socket()) as s: + with ThreadedEchoServer(context=server_context) as server: + with client_context.wrap_socket(socket.socket(), + server_hostname=hostname) as s: s.connect((HOST, server.port)) self.assertIn("ECDH", s.cipher()[0]) @@ -4159,14 +4136,6 @@ def test_alpn_protocols(self): self.assertEqual(server_result, expected, msg % (server_result, "server")) - def test_selected_npn_protocol(self): - # selected_npn_protocol() is None unless NPN is used - client_context, server_context, hostname = testing_context() - stats = server_params_test(client_context, server_context, - chatty=True, connectionchatty=True, - sni_name=hostname) - self.assertIs(stats['client_npn_protocol'], None) - def test_npn_protocols(self): assert not ssl.HAS_NPN @@ -4313,13 +4282,11 @@ def test_sendfile(self): with open(os_helper.TESTFN, 'wb') as f: f.write(TEST_DATA) self.addCleanup(os_helper.unlink, os_helper.TESTFN) - context = ssl.SSLContext(ssl.PROTOCOL_TLS) - context.verify_mode = ssl.CERT_REQUIRED - context.load_verify_locations(SIGNING_CA) - context.load_cert_chain(SIGNED_CERTFILE) - server = ThreadedEchoServer(context=context, chatty=False) + client_context, server_context, hostname = testing_context() + server = ThreadedEchoServer(context=server_context, chatty=False) with server: - with context.wrap_socket(socket.socket()) as s: + with client_context.wrap_socket(socket.socket(), + server_hostname=hostname) as s: s.connect((HOST, server.port)) with open(os_helper.TESTFN, 'rb') as file: s.sendfile(file) @@ -4437,7 +4404,7 @@ def test_session_handling(self): class TestPostHandshakeAuth(unittest.TestCase): def test_pha_setter(self): protocols = [ - ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS_SERVER, ssl.PROTOCOL_TLS_CLIENT + ssl.PROTOCOL_TLS_SERVER, ssl.PROTOCOL_TLS_CLIENT ] for protocol in protocols: ctx = ssl.SSLContext(protocol) diff --git a/Misc/NEWS.d/next/Library/2021-04-17-13-53-33.bpo-43880.-fC2JD.rst b/Misc/NEWS.d/next/Library/2021-04-17-13-53-33.bpo-43880.-fC2JD.rst new file mode 100644 index 00000000000000..b50680afc23fd6 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-17-13-53-33.bpo-43880.-fC2JD.rst @@ -0,0 +1,3 @@ +:mod:`ssl` now raises DeprecationWarning for OP_NO_SSL/TLS* options, old TLS +versions, old protocols, and other features that have been deprecated since +Python 3.6, 3.7, or OpenSSL 1.1.0. diff --git a/Modules/_ssl.c b/Modules/_ssl.c index f371d4210a4889..934c59e26d2d45 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -682,6 +682,17 @@ _setSSLError (_sslmodulestate *state, const char *errstr, int errcode, const cha return NULL; } +static int +_ssl_deprecated(const char* name, int stacklevel) { + return PyErr_WarnFormat( + PyExc_DeprecationWarning, stacklevel, + "ssl module: %s is deprecated", name + ); +} + +#define PY_SSL_DEPRECATED(name, stacklevel, ret) \ + if (_ssl_deprecated((name), (stacklevel)) == -1) return (ret) + /* * SSL objects */ @@ -2863,6 +2874,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) { PySSLContext *self; long options; + const SSL_METHOD *method = NULL; SSL_CTX *ctx = NULL; X509_VERIFY_PARAM *params; int result; @@ -2876,54 +2888,62 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) return NULL; } - PySSL_BEGIN_ALLOW_THREADS switch(proto_version) { #if defined(SSL3_VERSION) && !defined(OPENSSL_NO_SSL3) case PY_SSL_VERSION_SSL3: - ctx = SSL_CTX_new(SSLv3_method()); + PY_SSL_DEPRECATED("PROTOCOL_SSLv3", 2, NULL); + method = SSLv3_method(); break; #endif #if (defined(TLS1_VERSION) && \ !defined(OPENSSL_NO_TLS1) && \ !defined(OPENSSL_NO_TLS1_METHOD)) case PY_SSL_VERSION_TLS1: - ctx = SSL_CTX_new(TLSv1_method()); + PY_SSL_DEPRECATED("PROTOCOL_TLSv1", 2, NULL); + method = TLSv1_method(); break; #endif #if (defined(TLS1_1_VERSION) && \ !defined(OPENSSL_NO_TLS1_1) && \ !defined(OPENSSL_NO_TLS1_1_METHOD)) case PY_SSL_VERSION_TLS1_1: - ctx = SSL_CTX_new(TLSv1_1_method()); + PY_SSL_DEPRECATED("PROTOCOL_TLSv1_1", 2, NULL); + method = TLSv1_1_method(); break; #endif #if (defined(TLS1_2_VERSION) && \ !defined(OPENSSL_NO_TLS1_2) && \ !defined(OPENSSL_NO_TLS1_2_METHOD)) case PY_SSL_VERSION_TLS1_2: - ctx = SSL_CTX_new(TLSv1_2_method()); + PY_SSL_DEPRECATED("PROTOCOL_TLSv1_2", 2, NULL); + method = TLSv1_2_method(); break; #endif case PY_SSL_VERSION_TLS: - /* SSLv23 */ - ctx = SSL_CTX_new(TLS_method()); + PY_SSL_DEPRECATED("PROTOCOL_TLS", 2, NULL); + method = TLS_method(); break; case PY_SSL_VERSION_TLS_CLIENT: - ctx = SSL_CTX_new(TLS_client_method()); + method = TLS_client_method(); break; case PY_SSL_VERSION_TLS_SERVER: - ctx = SSL_CTX_new(TLS_server_method()); + method = TLS_server_method(); break; default: - proto_version = -1; + method = NULL; } - PySSL_END_ALLOW_THREADS - if (proto_version == -1) { - PyErr_SetString(PyExc_ValueError, - "invalid or unsupported protocol version"); + if (method == NULL) { + PyErr_Format(PyExc_ValueError, + "invalid or unsupported protocol version %i", + proto_version); return NULL; } + + PySSL_BEGIN_ALLOW_THREADS + ctx = SSL_CTX_new(method); + PySSL_END_ALLOW_THREADS + if (ctx == NULL) { _setSSLError(get_ssl_state(module), NULL, 0, __FILE__, __LINE__); return NULL; @@ -3299,6 +3319,29 @@ set_min_max_proto_version(PySSLContext *self, PyObject *arg, int what) return -1; } + /* check for deprecations and supported values */ + switch(v) { + case PY_PROTO_SSLv3: + PY_SSL_DEPRECATED("TLSVersion.SSLv3", 2, -1); + break; + case PY_PROTO_TLSv1: + PY_SSL_DEPRECATED("TLSVersion.TLSv1", 2, -1); + break; + case PY_PROTO_TLSv1_1: + PY_SSL_DEPRECATED("TLSVersion.TLSv1_1", 2, -1); + break; + case PY_PROTO_MINIMUM_SUPPORTED: + case PY_PROTO_MAXIMUM_SUPPORTED: + case PY_PROTO_TLSv1_2: + case PY_PROTO_TLSv1_3: + /* ok */ + break; + default: + PyErr_Format(PyExc_ValueError, + "Unsupported TLS/SSL version 0x%x", v); + return -1; + } + if (what == 0) { switch(v) { case PY_PROTO_MINIMUM_SUPPORTED: @@ -3417,11 +3460,23 @@ static int set_options(PySSLContext *self, PyObject *arg, void *c) { long new_opts, opts, set, clear; + long opt_no = ( + SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | + SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2 | SSL_OP_NO_TLSv1_2 + ); + if (!PyArg_Parse(arg, "l", &new_opts)) return -1; opts = SSL_CTX_get_options(self->ctx); clear = opts & ~new_opts; set = ~opts & new_opts; + + if ((set & opt_no) != 0) { + if (_ssl_deprecated("Setting OP_NO_SSL* or SSL_NO_TLS* options is " + "deprecated", 2) < 0) { + return -1; + } + } if (clear) { SSL_CTX_clear_options(self->ctx, clear); } @@ -4961,6 +5016,7 @@ static PyObject * _ssl_RAND_pseudo_bytes_impl(PyObject *module, int n) /*[clinic end generated code: output=b1509e937000e52d input=58312bd53f9bbdd0]*/ { + PY_SSL_DEPRECATED("RAND_pseudo_bytes", 1, NULL); return PySSL_RAND(module, n, 1); } From d37b74f341c5a215e2fdd5eb4f8c0182f327635c Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 19 Apr 2021 08:31:29 +0200 Subject: [PATCH 098/108] bpo-43669: More test_ssl cleanups (GH-25470) Signed-off-by: Christian Heimes --- Lib/test/test_ssl.py | 99 ++++++++++---------------------------------- 1 file changed, 21 insertions(+), 78 deletions(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index a2c79ff5927f12..ae66c3e7d4a56c 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -12,7 +12,6 @@ import socket import select import time -import datetime import gc import os import errno @@ -39,9 +38,7 @@ PROTOCOLS = sorted(ssl._PROTOCOL_NAMES) HOST = socket_helper.HOST -IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL') -IS_OPENSSL_1_1_1 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 1) -IS_OPENSSL_3_0_0 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (3, 0, 0) +IS_OPENSSL_3_0_0 = ssl.OPENSSL_VERSION_INFO >= (3, 0, 0) PY_SSL_DEFAULT_CIPHERS = sysconfig.get_config_var('PY_SSL_DEFAULT_CIPHERS') PROTOCOL_TO_TLS_VERSION = {} @@ -258,31 +255,11 @@ def wrapper(*args, **kw): return decorator -requires_minimum_version = unittest.skipUnless( - hasattr(ssl.SSLContext, 'minimum_version'), - "required OpenSSL >= 1.1.0g" -) - - def handle_error(prefix): exc_format = ' '.join(traceback.format_exception(*sys.exc_info())) if support.verbose: sys.stdout.write(prefix + exc_format) -def _have_secp_curves(): - if not ssl.HAS_ECDH: - return False - ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) - try: - ctx.set_ecdh_curve("secp384r1") - except ValueError: - return False - else: - return True - - -HAVE_SECP_CURVES = _have_secp_curves() - def utc_offset(): #NOTE: ignore issues like #1647654 # local time = utc time + utc offset @@ -290,21 +267,6 @@ def utc_offset(): #NOTE: ignore issues like #1647654 return -time.altzone # seconds return -time.timezone -def asn1time(cert_time): - # Some versions of OpenSSL ignore seconds, see #18207 - # 0.9.8.i - if ssl._OPENSSL_API_VERSION == (0, 9, 8, 9, 15): - fmt = "%b %d %H:%M:%S %Y GMT" - dt = datetime.datetime.strptime(cert_time, fmt) - dt = dt.replace(second=0) - cert_time = dt.strftime(fmt) - # %d adds leading zero but ASN1_TIME_print() uses leading space - if cert_time[4] == "0": - cert_time = cert_time[:4] + " " + cert_time[5:] - - return cert_time - -needs_sni = unittest.skipUnless(ssl.HAS_SNI, "SNI support needed for this test") ignore_deprecation = warnings_helper.ignore_warnings( category=DeprecationWarning @@ -365,11 +327,12 @@ def test_constants(self): ssl.CERT_REQUIRED ssl.OP_CIPHER_SERVER_PREFERENCE ssl.OP_SINGLE_DH_USE - if ssl.HAS_ECDH: - ssl.OP_SINGLE_ECDH_USE + ssl.OP_SINGLE_ECDH_USE ssl.OP_NO_COMPRESSION - self.assertIn(ssl.HAS_SNI, {True, False}) - self.assertIn(ssl.HAS_ECDH, {True, False}) + self.assertEqual(ssl.HAS_SNI, True) + self.assertEqual(ssl.HAS_ECDH, True) + self.assertEqual(ssl.HAS_TLSv1_2, True) + self.assertEqual(ssl.HAS_TLSv1_3, True) ssl.OP_NO_SSLv2 ssl.OP_NO_SSLv3 ssl.OP_NO_TLSv1 @@ -537,8 +500,8 @@ def test_openssl_version(self): self.assertIsInstance(t, tuple) self.assertIsInstance(s, str) # Some sanity checks follow - # >= 0.9 - self.assertGreaterEqual(n, 0x900000) + # >= 1.1.1 + self.assertGreaterEqual(n, 0x10101000) # < 4.0 self.assertLess(n, 0x40000000) major, minor, fix, patch, status = t @@ -552,13 +515,13 @@ def test_openssl_version(self): self.assertLessEqual(patch, 63) self.assertGreaterEqual(status, 0) self.assertLessEqual(status, 15) - # Version string as returned by {Open,Libre}SSL, the format might change - if IS_LIBRESSL: - self.assertTrue(s.startswith("LibreSSL {:d}".format(major)), - (s, t, hex(n))) - else: - self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)), - (s, t, hex(n))) + + libressl_ver = f"LibreSSL {major:d}" + openssl_ver = f"OpenSSL {major:d}.{minor:d}.{fix:d}" + self.assertTrue( + s.startswith((openssl_ver, libressl_ver)), + (s, t, hex(n)) + ) @support.cpython_only def test_refcycle(self): @@ -1196,8 +1159,6 @@ def test_hostname_checks_common_name(self): with self.assertRaises(AttributeError): ctx.hostname_checks_common_name = True - @requires_minimum_version - @unittest.skipIf(IS_LIBRESSL, "see bpo-34001") @ignore_deprecation def test_min_max_version(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) @@ -1523,7 +1484,6 @@ def test_set_ecdh_curve(self): self.assertRaises(ValueError, ctx.set_ecdh_curve, "foo") self.assertRaises(ValueError, ctx.set_ecdh_curve, b"foo") - @needs_sni def test_sni_callback(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) @@ -1538,7 +1498,6 @@ def dummycallback(sock, servername, ctx): ctx.set_servername_callback(None) ctx.set_servername_callback(dummycallback) - @needs_sni def test_sni_callback_refcycle(self): # Reference cycles through the servername callback are detected # and cleared. @@ -1578,8 +1537,8 @@ def test_get_ca_certs(self): (('organizationalUnitName', 'http://www.cacert.org'),), (('commonName', 'CA Cert Signing Authority'),), (('emailAddress', 'support@cacert.org'),)), - 'notAfter': asn1time('Mar 29 12:29:49 2033 GMT'), - 'notBefore': asn1time('Mar 30 12:29:49 2003 GMT'), + 'notAfter': 'Mar 29 12:29:49 2033 GMT', + 'notBefore': 'Mar 30 12:29:49 2003 GMT', 'serialNumber': '00', 'crlDistributionPoints': ('https://www.cacert.org/revoke.crl',), 'subject': ((('organizationName', 'Root CA'),), @@ -1609,7 +1568,6 @@ def test_load_default_certs(self): self.assertRaises(TypeError, ctx.load_default_certs, 'SERVER_AUTH') @unittest.skipIf(sys.platform == "win32", "not-Windows specific") - @unittest.skipIf(IS_LIBRESSL, "LibreSSL doesn't support env vars") def test_load_default_certs_env(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) with os_helper.EnvironmentVarGuard() as env: @@ -2145,7 +2103,6 @@ def test_non_blocking_handshake(self): def test_get_server_certificate(self): _test_get_server_certificate(self, *self.server_addr, cert=SIGNING_CA) - @needs_sni def test_get_server_certificate_sni(self): host, port = self.server_addr server_names = [] @@ -2198,7 +2155,6 @@ def test_get_ca_certs_capath(self): self.assertTrue(cert) self.assertEqual(len(ctx.get_ca_certs()), 1) - @needs_sni def test_context_setget(self): # Check that the context of a connected socket can be replaced. ctx1 = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) @@ -3863,7 +3819,6 @@ def test_tls1_3(self): }) self.assertEqual(s.version(), 'TLSv1.3') - @requires_minimum_version @requires_tls_version('TLSv1_2') @requires_tls_version('TLSv1') @ignore_deprecation @@ -3882,7 +3837,6 @@ def test_min_max_version_tlsv1_2(self): s.connect((HOST, server.port)) self.assertEqual(s.version(), 'TLSv1.2') - @requires_minimum_version @requires_tls_version('TLSv1_1') @ignore_deprecation def test_min_max_version_tlsv1_1(self): @@ -3900,7 +3854,6 @@ def test_min_max_version_tlsv1_1(self): s.connect((HOST, server.port)) self.assertEqual(s.version(), 'TLSv1.1') - @requires_minimum_version @requires_tls_version('TLSv1_2') @requires_tls_version('TLSv1') @ignore_deprecation @@ -3920,7 +3873,6 @@ def test_min_max_version_mismatch(self): s.connect((HOST, server.port)) self.assertIn("alert", str(e.exception)) - @requires_minimum_version @requires_tls_version('SSLv3') def test_min_max_version_sslv3(self): client_context, server_context, hostname = testing_context() @@ -3935,7 +3887,6 @@ def test_min_max_version_sslv3(self): s.connect((HOST, server.port)) self.assertEqual(s.version(), 'SSLv3') - @unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL") def test_default_ecdh_curve(self): # Issue #21015: elliptic curve-based Diffie Hellman key exchange # should be enabled by default on SSL contexts. @@ -4050,15 +4001,13 @@ def test_dh_params(self): if "ADH" not in parts and "EDH" not in parts and "DHE" not in parts: self.fail("Non-DH cipher: " + cipher[0]) - @unittest.skipUnless(HAVE_SECP_CURVES, "needs secp384r1 curve support") - @unittest.skipIf(IS_OPENSSL_1_1_1, "TODO: Test doesn't work on 1.1.1") def test_ecdh_curve(self): # server secp384r1, client auto client_context, server_context, hostname = testing_context() server_context.set_ecdh_curve("secp384r1") server_context.set_ciphers("ECDHE:!eNULL:!aNULL") - server_context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + server_context.minimum_version = ssl.TLSVersion.TLSv1_2 stats = server_params_test(client_context, server_context, chatty=True, connectionchatty=True, sni_name=hostname) @@ -4067,7 +4016,7 @@ def test_ecdh_curve(self): client_context, server_context, hostname = testing_context() client_context.set_ecdh_curve("secp384r1") server_context.set_ciphers("ECDHE:!eNULL:!aNULL") - server_context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 + server_context.minimum_version = ssl.TLSVersion.TLSv1_2 stats = server_params_test(client_context, server_context, chatty=True, connectionchatty=True, sni_name=hostname) @@ -4077,13 +4026,11 @@ def test_ecdh_curve(self): client_context.set_ecdh_curve("prime256v1") server_context.set_ecdh_curve("secp384r1") server_context.set_ciphers("ECDHE:!eNULL:!aNULL") - server_context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1 - try: + server_context.minimum_version = ssl.TLSVersion.TLSv1_2 + with self.assertRaises(ssl.SSLError): server_params_test(client_context, server_context, chatty=True, connectionchatty=True, sni_name=hostname) - except ssl.SSLError: - self.fail("mismatch curve did not fail") def test_selected_alpn_protocol(self): # selected_alpn_protocol() is None unless ALPN is used. @@ -4152,7 +4099,6 @@ def check_common_name(self, stats, name): cert = stats['peercert'] self.assertIn((('commonName', name),), cert['subject']) - @needs_sni def test_sni_callback(self): calls = [] server_context, other_context, client_context = self.sni_contexts() @@ -4193,7 +4139,6 @@ def servername_cb(ssl_sock, server_name, initial_context): self.check_common_name(stats, SIGNED_CERTFILE_HOSTNAME) self.assertEqual(calls, []) - @needs_sni def test_sni_callback_alert(self): # Returning a TLS alert is reflected to the connecting client server_context, other_context, client_context = self.sni_contexts() @@ -4207,7 +4152,6 @@ def cb_returning_alert(ssl_sock, server_name, initial_context): sni_name='supermessage') self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_ACCESS_DENIED') - @needs_sni def test_sni_callback_raising(self): # Raising fails the connection with a TLS handshake failure alert. server_context, other_context, client_context = self.sni_contexts() @@ -4226,7 +4170,6 @@ def cb_raising(ssl_sock, server_name, initial_context): 'SSLV3_ALERT_HANDSHAKE_FAILURE') self.assertEqual(catch.unraisable.exc_type, ZeroDivisionError) - @needs_sni def test_sni_callback_wrong_return_type(self): # Returning the wrong return type terminates the TLS connection # with an internal error alert. From 64d975202f7a91cb8c61a050fafb4e934fcbaa4e Mon Sep 17 00:00:00 2001 From: l0x <37248016+l0x-c0d3z@users.noreply.github.com> Date: Mon, 19 Apr 2021 13:51:18 +0200 Subject: [PATCH 099/108] bpo-40849: Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag (GH-20463) This short PR exposes an openssl flag that wasn't exposed. I've also updated to doc to reflect the change. It's heavily inspired by 990fcaac3c428569697f62a80fd95ab4d4b93151. --- Doc/library/ssl.rst | 11 +++++++++++ Misc/ACKS | 1 + .../Library/2020-06-02-21-32-33.bpo-40849.zpeKx3.rst | 1 + Modules/_ssl.c | 5 +++++ 4 files changed, 18 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2020-06-02-21-32-33.bpo-40849.zpeKx3.rst diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index c954d9c8febb01..b9e54357bb9690 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -650,6 +650,17 @@ Constants .. versionadded:: 3.4.4 +.. data:: VERIFY_X509_PARTIAL_CHAIN + + Possible value for :attr:`SSLContext.verify_flags`. It instructs OpenSSL to + accept intermediate CAs in the trust store to be treated as trust-anchors, + in the same way as the self-signed root CA certificates. This makes it + possible to trust certificates issued by an intermediate CA without having + to trust its ancestor root CA. + + .. versionadded:: 3.10 + + .. class:: VerifyFlags :class:`enum.IntFlag` collection of VERIFY_* constants. diff --git a/Misc/ACKS b/Misc/ACKS index 1eeae0caef50a1..e394ea6802fbe2 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -157,6 +157,7 @@ Michel Van den Bergh Julian Berman Brice Berna Olivier Bernard +Vivien Bernet-Rollande Maxwell Bernstein Eric Beser Steven Bethard diff --git a/Misc/NEWS.d/next/Library/2020-06-02-21-32-33.bpo-40849.zpeKx3.rst b/Misc/NEWS.d/next/Library/2020-06-02-21-32-33.bpo-40849.zpeKx3.rst new file mode 100644 index 00000000000000..032a65d9963b7b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-06-02-21-32-33.bpo-40849.zpeKx3.rst @@ -0,0 +1 @@ +Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 934c59e26d2d45..4b84014d008c12 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -5630,6 +5630,11 @@ sslmodule_init_constants(PyObject *m) PyModule_AddIntConstant(m, "VERIFY_X509_TRUSTED_FIRST", X509_V_FLAG_TRUSTED_FIRST); +#ifdef X509_V_FLAG_PARTIAL_CHAIN + PyModule_AddIntConstant(m, "VERIFY_X509_PARTIAL_CHAIN", + X509_V_FLAG_PARTIAL_CHAIN); +#endif + /* Alert Descriptions from ssl.h */ /* note RESERVED constants no longer intended for use have been removed */ /* http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6 */ From 68ba0c67cac10c2545ea3b62d8b161e5b3594edd Mon Sep 17 00:00:00 2001 From: Ammar Askar Date: Mon, 19 Apr 2021 11:22:03 -0400 Subject: [PATCH 100/108] bpo-43837: Reverse order of precedence table to show tightly binding operators first (GH-25469) --- Doc/reference/expressions.rst | 58 +++++++++++++++++------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 4b4c20b8d5e286..5b153762bf4477 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -1819,8 +1819,8 @@ Operator precedence .. index:: pair: operator; precedence -The following table summarizes the operator precedence in Python, from lowest -precedence (least binding) to highest precedence (most binding). Operators in +The following table summarizes the operator precedence in Python, from highest +precedence (most binding) to lowest precedence (least binding). Operators in the same box have the same precedence. Unless the syntax is explicitly given, operators are binary. Operators in the same box group left to right (except for exponentiation, which groups from right to left). @@ -1833,50 +1833,50 @@ precedence and have a left-to-right chaining feature as described in the +-----------------------------------------------+-------------------------------------+ | Operator | Description | +===============================================+=====================================+ -| ``:=`` | Assignment expression | -+-----------------------------------------------+-------------------------------------+ -| :keyword:`lambda` | Lambda expression | +| ``(expressions...)``, | Binding or parenthesized | +| | expression, | +| ``[expressions...]``, | list display, | +| ``{key: value...}``, | dictionary display, | +| ``{expressions...}`` | set display | +-----------------------------------------------+-------------------------------------+ -| :keyword:`if ` -- :keyword:`!else` | Conditional expression | +| ``x[index]``, ``x[index:index]``, | Subscription, slicing, | +| ``x(arguments...)``, ``x.attribute`` | call, attribute reference | +-----------------------------------------------+-------------------------------------+ -| :keyword:`or` | Boolean OR | +| :keyword:`await` ``x`` | Await expression | +-----------------------------------------------+-------------------------------------+ -| :keyword:`and` | Boolean AND | +| ``**`` | Exponentiation [#]_ | +-----------------------------------------------+-------------------------------------+ -| :keyword:`not` ``x`` | Boolean NOT | +| ``+x``, ``-x``, ``~x`` | Positive, negative, bitwise NOT | +-----------------------------------------------+-------------------------------------+ -| :keyword:`in`, :keyword:`not in`, | Comparisons, including membership | -| :keyword:`is`, :keyword:`is not`, ``<``, | tests and identity tests | -| ``<=``, ``>``, ``>=``, ``!=``, ``==`` | | +| ``*``, ``@``, ``/``, ``//``, ``%`` | Multiplication, matrix | +| | multiplication, division, floor | +| | division, remainder [#]_ | +-----------------------------------------------+-------------------------------------+ -| ``|`` | Bitwise OR | +| ``+``, ``-`` | Addition and subtraction | +-----------------------------------------------+-------------------------------------+ -| ``^`` | Bitwise XOR | +| ``<<``, ``>>`` | Shifts | +-----------------------------------------------+-------------------------------------+ | ``&`` | Bitwise AND | +-----------------------------------------------+-------------------------------------+ -| ``<<``, ``>>`` | Shifts | +| ``^`` | Bitwise XOR | +-----------------------------------------------+-------------------------------------+ -| ``+``, ``-`` | Addition and subtraction | +| ``|`` | Bitwise OR | +-----------------------------------------------+-------------------------------------+ -| ``*``, ``@``, ``/``, ``//``, ``%`` | Multiplication, matrix | -| | multiplication, division, floor | -| | division, remainder [#]_ | +| :keyword:`in`, :keyword:`not in`, | Comparisons, including membership | +| :keyword:`is`, :keyword:`is not`, ``<``, | tests and identity tests | +| ``<=``, ``>``, ``>=``, ``!=``, ``==`` | | +-----------------------------------------------+-------------------------------------+ -| ``+x``, ``-x``, ``~x`` | Positive, negative, bitwise NOT | +| :keyword:`not` ``x`` | Boolean NOT | +-----------------------------------------------+-------------------------------------+ -| ``**`` | Exponentiation [#]_ | +| :keyword:`and` | Boolean AND | +-----------------------------------------------+-------------------------------------+ -| :keyword:`await` ``x`` | Await expression | +| :keyword:`or` | Boolean OR | +-----------------------------------------------+-------------------------------------+ -| ``x[index]``, ``x[index:index]``, | Subscription, slicing, | -| ``x(arguments...)``, ``x.attribute`` | call, attribute reference | +| :keyword:`if ` -- :keyword:`!else` | Conditional expression | +-----------------------------------------------+-------------------------------------+ -| ``(expressions...)``, | Binding or parenthesized | -| | expression, | -| ``[expressions...]``, | list display, | -| ``{key: value...}``, | dictionary display, | -| ``{expressions...}`` | set display | +| :keyword:`lambda` | Lambda expression | ++-----------------------------------------------+-------------------------------------+ +| ``:=`` | Assignment expression | +-----------------------------------------------+-------------------------------------+ From 4f9ffa8f9c7c31ad9480dfe99e84089017127ec9 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 19 Apr 2021 14:12:36 -0700 Subject: [PATCH 101/108] Add doctests (GH-25474) --- Doc/howto/sorting.rst | 48 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/Doc/howto/sorting.rst b/Doc/howto/sorting.rst index a8efe65353d6e1..37328c82dff270 100644 --- a/Doc/howto/sorting.rst +++ b/Doc/howto/sorting.rst @@ -18,7 +18,9 @@ Sorting Basics ============== A simple ascending sort is very easy: just call the :func:`sorted` function. It -returns a new sorted list:: +returns a new sorted list: + +.. doctest:: >>> sorted([5, 2, 3, 1, 4]) [1, 2, 3, 4, 5] @@ -28,6 +30,8 @@ in-place (and returns ``None`` to avoid confusion). Usually it's less convenient than :func:`sorted` - but if you don't need the original list, it's slightly more efficient. +.. doctest:: + >>> a = [5, 2, 3, 1, 4] >>> a.sort() >>> a @@ -36,6 +40,8 @@ more efficient. Another difference is that the :meth:`list.sort` method is only defined for lists. In contrast, the :func:`sorted` function accepts any iterable. +.. doctest:: + >>> sorted({1: 'D', 2: 'B', 3: 'B', 4: 'E', 5: 'A'}) [1, 2, 3, 4, 5] @@ -48,6 +54,8 @@ comparisons. For example, here's a case-insensitive string comparison: +.. doctest:: + >>> sorted("This is a test string from Andrew".split(), key=str.lower) ['a', 'Andrew', 'from', 'is', 'string', 'test', 'This'] @@ -59,6 +67,8 @@ input record. A common pattern is to sort complex objects using some of the object's indices as keys. For example: +.. doctest:: + >>> student_tuples = [ ... ('john', 'A', 15), ... ('jane', 'B', 12), @@ -69,6 +79,8 @@ as keys. For example: The same technique works for objects with named attributes. For example: +.. doctest:: + >>> class Student: ... def __init__(self, name, grade, age): ... self.name = name @@ -95,6 +107,8 @@ convenience functions to make accessor functions easier and faster. The Using those functions, the above examples become simpler and faster: +.. doctest:: + >>> from operator import itemgetter, attrgetter >>> sorted(student_tuples, key=itemgetter(2)) @@ -106,6 +120,8 @@ Using those functions, the above examples become simpler and faster: The operator module functions allow multiple levels of sorting. For example, to sort by *grade* then by *age*: +.. doctest:: + >>> sorted(student_tuples, key=itemgetter(1,2)) [('john', 'A', 15), ('dave', 'B', 10), ('jane', 'B', 12)] @@ -119,6 +135,8 @@ Both :meth:`list.sort` and :func:`sorted` accept a *reverse* parameter with a boolean value. This is used to flag descending sorts. For example, to get the student data in reverse *age* order: +.. doctest:: + >>> sorted(student_tuples, key=itemgetter(2), reverse=True) [('john', 'A', 15), ('jane', 'B', 12), ('dave', 'B', 10)] @@ -132,6 +150,8 @@ Sorts are guaranteed to be `stable `_\. That means that when multiple records have the same key, their original order is preserved. +.. doctest:: + >>> data = [('red', 1), ('blue', 1), ('red', 2), ('blue', 2)] >>> sorted(data, key=itemgetter(0)) [('blue', 1), ('blue', 2), ('red', 1), ('red', 2)] @@ -143,6 +163,8 @@ This wonderful property lets you build complex sorts in a series of sorting steps. For example, to sort the student data by descending *grade* and then ascending *age*, do the *age* sort first and then sort again using *grade*: +.. doctest:: + >>> s = sorted(student_objects, key=attrgetter('age')) # sort on secondary key >>> sorted(s, key=attrgetter('grade'), reverse=True) # now sort on primary key, descending [('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)] @@ -150,6 +172,8 @@ ascending *age*, do the *age* sort first and then sort again using *grade*: This can be abstracted out into a wrapper function that can take a list and tuples of field and order to sort them on multiple passes. +.. doctest:: + >>> def multisort(xs, specs): ... for key, reverse in reversed(specs): ... xs.sort(key=attrgetter(key), reverse=reverse) @@ -220,6 +244,8 @@ comparisons. That function should take two arguments to be compared and then return a negative value for less-than, return zero if they are equal, or return a positive value for greater-than. For example, we can do: +.. doctest:: + >>> def numeric_compare(x, y): ... return x - y >>> sorted([5, 2, 4, 1, 3], cmp=numeric_compare) # doctest: +SKIP @@ -227,6 +253,8 @@ a positive value for greater-than. For example, we can do: Or you can reverse the order of comparison with: +.. doctest:: + >>> def reverse_numeric(x, y): ... return y - x >>> sorted([5, 2, 4, 1, 3], cmp=reverse_numeric) # doctest: +SKIP @@ -234,7 +262,9 @@ Or you can reverse the order of comparison with: When porting code from Python 2.x to 3.x, the situation can arise when you have the user supplying a comparison function and you need to convert that to a key -function. The following wrapper makes that easy to do:: +function. The following wrapper makes that easy to do: + +.. testcode:: def cmp_to_key(mycmp): 'Convert a cmp= function into a key= function' @@ -255,6 +285,12 @@ function. The following wrapper makes that easy to do:: return mycmp(self.obj, other.obj) != 0 return K +.. doctest:: + :hide: + + >>> sorted([5, 2, 4, 1, 3], key=cmp_to_key(reverse_numeric)) + [5, 4, 3, 2, 1] + To convert to a key function, just wrap the old comparison function: .. testsetup:: @@ -280,6 +316,8 @@ Odd and Ends simulated without the parameter by using the builtin :func:`reversed` function twice: + .. doctest:: + >>> data = [('red', 1), ('blue', 1), ('red', 2), ('blue', 2)] >>> standard_way = sorted(data, key=itemgetter(0), reverse=True) >>> double_reversed = list(reversed(sorted(reversed(data), key=itemgetter(0)))) @@ -289,7 +327,9 @@ Odd and Ends * The sort routines are guaranteed to use :meth:`__lt__` when making comparisons between two objects. So, it is easy to add a standard sort order to a class by - defining an :meth:`__lt__` method:: + defining an :meth:`__lt__` method: + + .. doctest:: >>> Student.__lt__ = lambda self, other: self.age < other.age >>> sorted(student_objects) @@ -300,6 +340,8 @@ Odd and Ends are stored in a dictionary, they can be used to sort a separate list of student names: + .. doctest:: + >>> students = ['dave', 'john', 'jane'] >>> newgrades = {'john': 'F', 'jane':'A', 'dave': 'C'} >>> sorted(students, key=newgrades.__getitem__) From 7a041162468b83f6cad667b78ed5c786286aed2b Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Mon, 19 Apr 2021 23:35:53 +0100 Subject: [PATCH 102/108] bpo-25460: Surround suggestions by quotes (GH-25473) --- Lib/test/test_exceptions.py | 28 ++++++++++++++-------------- Python/pythonrun.c | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index d1e1b196c42789..d93b0f16c91d12 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -1453,12 +1453,12 @@ def EliminationOverAddition(): bluc = None print(bluch) - for func, suggestion in [(Substitution, "blech?"), - (Elimination, "blch?"), - (Addition, "bluchin?"), - (EliminationOverAddition, "blucha?"), - (SubstitutionOverElimination, "blach?"), - (SubstitutionOverAddition, "blach?")]: + for func, suggestion in [(Substitution, "'blech'?"), + (Elimination, "'blch'?"), + (Addition, "'bluchin'?"), + (EliminationOverAddition, "'blucha'?"), + (SubstitutionOverElimination, "'blach'?"), + (SubstitutionOverAddition, "'blach'?")]: err = None try: func() @@ -1475,7 +1475,7 @@ def func(): except NameError as exc: with support.captured_stderr() as err: sys.__excepthook__(*sys.exc_info()) - self.assertIn("global_for_suggestions?", err.getvalue()) + self.assertIn("'global_for_suggestions'?", err.getvalue()) def test_name_error_suggestions_from_builtins(self): def func(): @@ -1485,7 +1485,7 @@ def func(): except NameError as exc: with support.captured_stderr() as err: sys.__excepthook__(*sys.exc_info()) - self.assertIn("AttributeError?", err.getvalue()) + self.assertIn("'AttributeError'?", err.getvalue()) def test_name_error_suggestions_do_not_trigger_for_long_names(self): def f(): @@ -1628,12 +1628,12 @@ class EliminationOverAddition: blucha = None bluc = None - for cls, suggestion in [(Substitution, "blech?"), - (Elimination, "blch?"), - (Addition, "bluchin?"), - (EliminationOverAddition, "bluc?"), - (SubstitutionOverElimination, "blach?"), - (SubstitutionOverAddition, "blach?")]: + for cls, suggestion in [(Substitution, "'blech'?"), + (Elimination, "'blch'?"), + (Addition, "'bluchin'?"), + (EliminationOverAddition, "'bluc'?"), + (SubstitutionOverElimination, "'blach'?"), + (SubstitutionOverAddition, "'blach'?")]: try: cls().bluch except AttributeError as exc: diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 6f84cab702e980..8bd31348b2676d 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -956,10 +956,10 @@ print_exception(PyObject *f, PyObject *value) PyObject* suggestions = _Py_Offer_Suggestions(value); if (suggestions) { // Add a trailer ". Did you mean: (...)?" - err = PyFile_WriteString(". Did you mean: ", f); + err = PyFile_WriteString(". Did you mean: '", f); if (err == 0) { err = PyFile_WriteObject(suggestions, f, Py_PRINT_RAW); - err += PyFile_WriteString("?", f); + err += PyFile_WriteString("'?", f); } Py_DECREF(suggestions); } else if (PyErr_Occurred()) { From 28e48fef214455f7f948dba335d5ad3c604b7bb5 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Wed, 31 Mar 2021 06:49:38 -0700 Subject: [PATCH 103/108] wip --- Lib/enum.py | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++- Lib/re.py | 6 ++-- 2 files changed, 98 insertions(+), 3 deletions(-) diff --git a/Lib/enum.py b/Lib/enum.py index 17deb4b9c05ae7..32d351f3b10dcd 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -10,6 +10,7 @@ 'property', 'FlagBoundary', 'STRICT', 'CONFORM', 'EJECT', 'KEEP', 'global_flag_repr', 'global_enum_repr', 'global_enum', + 'simple_enum', ] @@ -391,13 +392,16 @@ def __prepare__(metacls, cls, bases, **kwds): ) return enum_dict - def __new__(metacls, cls, bases, classdict, boundary=None, **kwds): + def __new__(metacls, cls, bases, classdict, boundary=None, _simple=False, **kwds): # an Enum class is final once enumeration items have been defined; it # cannot be mixed with other types (int, float, etc.) if it has an # inherited __new__ unless a new __new__ is defined (or the resulting # class will fail). # # remove any keys listed in _ignore_ + if _simple: + # print('classdict:', classdict) + return super().__new__(metacls, cls, bases, classdict, **kwds) classdict.setdefault('_ignore_', []).append('_ignore_') ignore = classdict['_ignore_'] for key in ignore: @@ -1383,3 +1387,92 @@ def global_enum(cls): cls.__repr__ = global_enum_repr sys.modules[cls.__module__].__dict__.update(cls.__members__) return cls + +def simple_enum(etype=Enum, boundary=None): + """ + Directly converts a class into an Enum, bypassing all safety checks, etc. + """ + def convert_class(cls): + cls_name = cls.__name__ + attrs = {} + body = {} + body['_new_member_'] = new_member = etype._new_member_ + print('new is %r' % (new_member, )) + body['_use_args_'] = use_args = etype._use_args_ + body['_member_names_'] = member_names = [] + body['_member_map_'] = member_map = {} + body['_value2member_map_'] = value2member_map = {} + body['_member_type_'] = etype._member_type_ + if issubclass(etype, Flag): + body['_boundary_'] = boundary or etype._boundary_ + body['_flag_mask_'] = None + body['_all_bits_'] = None + body['_inverted_'] = None + for name, obj in cls.__dict__.items(): + if _is_dunder(name) or _is_private(cls_name, name) or _is_sunder(name) or _is_descriptor(obj): + body[name] = obj + else: + attrs[name] = obj + # + # double check that repr and friends are not the mixin's or various + # things break (such as pickle) + # however, if the method is defined in the Enum itself, don't replace + # it + for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): + if name not in body: + body[name] = getattr(etype, name) + enum_cls = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) + if issubclass(enum_cls, Flag): + # Flag / IntFlag + flag_mask = 0 + for order, (name, value) in enumerate(attrs.items()): + flag_mask |= value + if value in value2member_map: + # an alias to an existing member + member_map[name] = value2member_map[value] + else: + # create the member + if use_args: + member = new_member(enum_cls, value) + else: + member = new_member(enum_cls) + member._value_ = value + member._name_ = name + member._sort_order_ = order + member.__objclass__ = enum_cls + member_map[name] = member + value2member_map[value] = member + if _is_single_bit(value): + # not a multi-bit alias, record in _member_names_ + member_names.append(name) + flag_mask |= value + enum_cls._flag_mask_ = flag_mask + enum_cls._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 + # set correct __iter__ + member_list = [m._value_ for m in enum_class] + if member_list != sorted(member_list): + enum_class._iter_member_ = enum_class._iter_member_by_def_ + else: + # Enum / IntEnum / StrEnum + for name, value in attrs.items(): + if value in value2member_map: + # an alias to an existing member + member_map[name] = value2member_map[value] + else: + # create the member + if use_args: + member = new_member(enum_cls, value) + else: + member = new_member(enum_cls) + member._value_ = value + member._name_ = name + member._sort_order_ = order + member.__objclass__ = enum_cls + member_map[name] = member + value2member_map[value] = member + member_names.append(name) + if '__new__' in body: + enum_cls.__new_member__ = __new__ + enum_cls.__new__ = Enum.__new__ + return enum_cls + return convert_class diff --git a/Lib/re.py b/Lib/re.py index 5e40c7b9bb17d8..697db86757d8fc 100644 --- a/Lib/re.py +++ b/Lib/re.py @@ -142,8 +142,10 @@ __version__ = "2.2.1" -@enum.global_enum -class RegexFlag(enum.IntFlag, boundary=enum.KEEP): +@enum.simple_enum(enum.IntFlag, boundary=enum.KEEP) + +# class RegexFlag(enum.IntFlag, boundary=enum.KEEP): +class RegexFlag: ASCII = A = sre_compile.SRE_FLAG_ASCII # assume ascii "locale" IGNORECASE = I = sre_compile.SRE_FLAG_IGNORECASE # ignore case LOCALE = L = sre_compile.SRE_FLAG_LOCALE # assume current 8-bit locale From 528d02272c2d6dcf69793d891c448c374af1ca0b Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Wed, 31 Mar 2021 20:04:09 -0700 Subject: [PATCH 104/108] wip --- Lib/enum.py | 62 ++++++++++++++++++++++++++++++++++++----------------- Lib/re.py | 3 +-- 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/Lib/enum.py b/Lib/enum.py index 32d351f3b10dcd..0aa980e9c2175d 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -400,7 +400,6 @@ def __new__(metacls, cls, bases, classdict, boundary=None, _simple=False, **kwds # # remove any keys listed in _ignore_ if _simple: - # print('classdict:', classdict) return super().__new__(metacls, cls, bases, classdict, **kwds) classdict.setdefault('_ignore_', []).append('_ignore_') ignore = classdict['_ignore_'] @@ -1396,19 +1395,20 @@ def convert_class(cls): cls_name = cls.__name__ attrs = {} body = {} - body['_new_member_'] = new_member = etype._new_member_ - print('new is %r' % (new_member, )) + body['_new_member_'] = new_member = etype._member_type_.__new__ body['_use_args_'] = use_args = etype._use_args_ body['_member_names_'] = member_names = [] body['_member_map_'] = member_map = {} body['_value2member_map_'] = value2member_map = {} - body['_member_type_'] = etype._member_type_ + body['_member_type_'] = member_type = etype._member_type_ if issubclass(etype, Flag): body['_boundary_'] = boundary or etype._boundary_ body['_flag_mask_'] = None body['_all_bits_'] = None body['_inverted_'] = None for name, obj in cls.__dict__.items(): + if name in ('__dict__', '__weakref__'): + continue if _is_dunder(name) or _is_private(cls_name, name) or _is_sunder(name) or _is_descriptor(obj): body[name] = obj else: @@ -1418,61 +1418,83 @@ def convert_class(cls): # things break (such as pickle) # however, if the method is defined in the Enum itself, don't replace # it + # for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): + # if name not in body: + # body[name] = getattr(etype, name) + enum_class = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): - if name not in body: - body[name] = getattr(etype, name) - enum_cls = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) - if issubclass(enum_cls, Flag): + if name in body: + continue + class_method = getattr(enum_class, name) + obj_method = getattr(member_type, name, None) + enum_method = getattr(etype, name, None) + if obj_method is not None and obj_method is class_method: + setattr(enum_class, name, enum_method) + if issubclass(enum_class, Flag): # Flag / IntFlag flag_mask = 0 for order, (name, value) in enumerate(attrs.items()): flag_mask |= value if value in value2member_map: # an alias to an existing member + redirect = property() + redirect.__set_name__(enum_class, name) + setattr(enum_class, name, redirect) member_map[name] = value2member_map[value] else: # create the member if use_args: - member = new_member(enum_cls, value) + member = new_member(enum_class, value) else: - member = new_member(enum_cls) + member = new_member(enum_class) member._value_ = value member._name_ = name + member.__objclass__ = enum_class + member.__init__(value) member._sort_order_ = order - member.__objclass__ = enum_cls + redirect = property() + redirect.__set_name__(enum_class, name) + setattr(enum_class, name, redirect) member_map[name] = member value2member_map[value] = member if _is_single_bit(value): # not a multi-bit alias, record in _member_names_ member_names.append(name) flag_mask |= value - enum_cls._flag_mask_ = flag_mask - enum_cls._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 + enum_class._flag_mask_ = flag_mask + enum_class._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 # set correct __iter__ member_list = [m._value_ for m in enum_class] if member_list != sorted(member_list): enum_class._iter_member_ = enum_class._iter_member_by_def_ else: # Enum / IntEnum / StrEnum - for name, value in attrs.items(): + for order, (name, value) in enumerate(attrs.items()): if value in value2member_map: # an alias to an existing member member_map[name] = value2member_map[value] + redirect = property() + redirect.__set_name__(enum_class, name) + setattr(enum_class, name, redirect) else: # create the member if use_args: - member = new_member(enum_cls, value) + member = new_member(enum_class, value) else: - member = new_member(enum_cls) + member = new_member(enum_class) member._value_ = value member._name_ = name + member.__objclass__ = enum_class + member.__init__(value) member._sort_order_ = order - member.__objclass__ = enum_cls + redirect = property() + redirect.__set_name__(enum_class, name) + setattr(enum_class, name, redirect) member_map[name] = member value2member_map[value] = member member_names.append(name) if '__new__' in body: - enum_cls.__new_member__ = __new__ - enum_cls.__new__ = Enum.__new__ - return enum_cls + enum_class.__new_member__ = enum_class.__new__ + enum_class.__new__ = Enum.__new__ + return enum_class return convert_class diff --git a/Lib/re.py b/Lib/re.py index 697db86757d8fc..b7427e77daf626 100644 --- a/Lib/re.py +++ b/Lib/re.py @@ -142,9 +142,8 @@ __version__ = "2.2.1" +@enum.global_enum @enum.simple_enum(enum.IntFlag, boundary=enum.KEEP) - -# class RegexFlag(enum.IntFlag, boundary=enum.KEEP): class RegexFlag: ASCII = A = sre_compile.SRE_FLAG_ASCII # assume ascii "locale" IGNORECASE = I = sre_compile.SRE_FLAG_IGNORECASE # ignore case From f31718581c7697ad9b7560f1f0ab6fedbc24d7e0 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 8 Apr 2021 12:05:47 -0700 Subject: [PATCH 105/108] add simple_enum and test_simple_enum --- Doc/library/enum.rst | 39 ++++ Lib/ast.py | 5 +- Lib/enum.py | 208 ++++++++++++++++-- Lib/http/__init__.py | 6 +- Lib/pstats.py | 5 +- Lib/ssl.py | 13 +- Lib/test/test_ast.py | 30 +++ Lib/test/test_httplib.py | 145 ++++++++++++ Lib/test/test_pstats.py | 20 ++ Lib/test/test_ssl.py | 105 ++++++++- Lib/test/test_unicode.py | 9 +- Lib/test/test_uuid.py | 8 + Lib/tkinter/__init__.py | 5 +- Lib/tkinter/test/test_tkinter/test_misc.py | 44 ++++ Lib/uuid.py | 5 +- .../2021-04-08-11-47-31.bpo-38659.r_HFnU.rst | 4 + 16 files changed, 613 insertions(+), 38 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-04-08-11-47-31.bpo-38659.r_HFnU.rst diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index bc88303b789dea..494171e2f75386 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -117,6 +117,19 @@ Module Contents Enum class decorator that ensures only one name is bound to any one value. + :func:`simple_enum` + + Class decorator that converts a normal class into an :class:`Enum`. No + safety checks are done, and some advanced behavior (such as + :func:`__init_subclass__`) is not available. Enum creation can be faster + using :func:`simple_enum`. + + :func:`test_simple_enum` + + Function that can be used to test an enum created with + :func:`simple_enum` with the corresponding :class:`Enum`-subclassed + version. + .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` .. versionadded:: 3.10 ``StrEnum`` @@ -622,3 +635,29 @@ Utilites and Decorators ... ValueError: duplicate values found in : FOUR -> THREE +.. decorator:: simple_enum + + A :keyword:`class` decorator that converts a normal class into an enum:: + + >>> from enum import Enum, simple_enum + >>> @simple_enum(Enum): + ... class Color: + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> Color + + +.. function:: test_simple_enum + + A function that can be used to test an enum created with :func:`simple_enum` + against the version created by subclassing :class:`Enum`:: + + >>> from enum import Enum, test_simple_enum + >>> class CheckedColor(Enum): + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> test_simple_enum(CheckedColor, Color) + + If differences are found, a :exc:`ValueError` is raised. diff --git a/Lib/ast.py b/Lib/ast.py index e46ab43d5cfd30..ac4fc074961736 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -27,7 +27,7 @@ import sys from _ast import * from contextlib import contextmanager, nullcontext -from enum import IntEnum, auto +from enum import IntEnum, auto, simple_enum def parse(source, filename='', mode='exec', *, @@ -636,7 +636,8 @@ class Param(expr_context): # We unparse those infinities to INFSTR. _INFSTR = "1e" + repr(sys.float_info.max_10_exp + 1) -class _Precedence(IntEnum): +@simple_enum(IntEnum) +class _Precedence: """Precedence table that originated from python grammar.""" TUPLE = auto() diff --git a/Lib/enum.py b/Lib/enum.py index 0aa980e9c2175d..a936e0d389e0ef 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -10,7 +10,7 @@ 'property', 'FlagBoundary', 'STRICT', 'CONFORM', 'EJECT', 'KEEP', 'global_flag_repr', 'global_enum_repr', 'global_enum', - 'simple_enum', + 'simple_enum', 'test_simple_enum', ] @@ -698,7 +698,7 @@ def __setattr__(cls, name, value): """ member_map = cls.__dict__.get('_member_map_', {}) if name in member_map: - raise AttributeError('Cannot reassign members.') + raise AttributeError('Cannot reassign member %r.' % (name, )) super().__setattr__(name, value) def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, start=1, boundary=None): @@ -786,6 +786,42 @@ def _convert_(cls, name, module, filter, source=None, boundary=None): module_globals[name] = cls return cls + def _convert_new_(cls, name, module, filter, source=None, boundary=None): + """ + Create a new Enum subclass that replaces a collection of global constants + """ + # convert all constants from source (or module) that pass filter() to + # a new Enum called name, and export the enum and its members back to + # module; + # also, replace the __reduce_ex__ method so unpickling works in + # previous Python versions + module_globals = sys.modules[module].__dict__ + if source: + source = source.__dict__ + else: + source = module_globals + # _value2member_map_ is populated in the same order every time + # for a consistent reverse mapping of number to name when there + # are multiple names for the same number. + members = [ + (name, value) + for name, value in source.items() + if filter(name)] + try: + # sort by value + members.sort(key=lambda t: (t[1], t[0])) + except TypeError: + # unless some values aren't comparable, in which case sort by name + members.sort(key=lambda t: t[0]) + body = {t[0]: t[1] for t in members} + body['__module__'] = module + tmp_cls = type(name, (object, ), body) + cls = simple_enum(etype=cls, boundary=boundary)(tmp_cls) + # cls = cls(name, members, module=module, boundary=boundary or KEEP) + global_enum(cls) + module_globals[name] = cls + return cls + @staticmethod def _check_for_existing_members(class_name, bases): for chain in bases: @@ -858,7 +894,7 @@ def _find_new_(classdict, member_type, first_enum): __new__ = classdict.get('__new__', None) # should __new__ be saved as __new_member__ later? - save_new = __new__ is not None + save_new = first_enum is not None and __new__ is not None if __new__ is None: # check all possibles for __new_member__ before falling back to @@ -882,7 +918,7 @@ def _find_new_(classdict, member_type, first_enum): # if a non-object.__new__ is used then whatever value/tuple was # assigned to the enum member name will be passed to __new__ and to the # new enum member's __init__ - if __new__ is object.__new__: + if first_enum is None or __new__ in (Enum.__new__, object.__new__): use_args = False else: use_args = True @@ -1387,16 +1423,27 @@ def global_enum(cls): sys.modules[cls.__module__].__dict__.update(cls.__members__) return cls -def simple_enum(etype=Enum, boundary=None): +def simple_enum(etype=Enum, *, boundary=None, use_args=None): """ Directly converts a class into an Enum, bypassing all safety checks, etc. """ def convert_class(cls): + nonlocal use_args cls_name = cls.__name__ + if use_args is None: + use_args = etype._use_args_ + __new__ = cls.__dict__.get('__new__') + if __new__ is not None: + new_member = __new__.__func__ + else: + new_member = etype._member_type_.__new__ attrs = {} body = {} - body['_new_member_'] = new_member = etype._member_type_.__new__ - body['_use_args_'] = use_args = etype._use_args_ + if __new__ is not None: + body['__new_member__'] = new_member + body['_new_member_'] = new_member + body['_use_args_'] = use_args + body['_generate_next_value_'] = gnv = etype._generate_next_value_ body['_member_names_'] = member_names = [] body['_member_map_'] = member_map = {} body['_value2member_map_'] = value2member_map = {} @@ -1413,14 +1460,13 @@ def convert_class(cls): body[name] = obj else: attrs[name] = obj + if cls.__dict__.get('__doc__') is None: + body['__doc__'] = 'An enumeration.' # # double check that repr and friends are not the mixin's or various # things break (such as pickle) # however, if the method is defined in the Enum itself, don't replace # it - # for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): - # if name not in body: - # body[name] = getattr(etype, name) enum_class = type(cls_name, (etype, ), body, boundary=boundary, _simple=True) for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'): if name in body: @@ -1430,10 +1476,14 @@ def convert_class(cls): enum_method = getattr(etype, name, None) if obj_method is not None and obj_method is class_method: setattr(enum_class, name, enum_method) + gnv_last_values = [] if issubclass(enum_class, Flag): # Flag / IntFlag flag_mask = 0 - for order, (name, value) in enumerate(attrs.items()): + order = 0 + for name, value in attrs.items(): + if isinstance(value, auto) and auto.value is _auto_null: + value = gnv(name, 1, order, gnv_last_values) flag_mask |= value if value in value2member_map: # an alias to an existing member @@ -1444,10 +1494,14 @@ def convert_class(cls): else: # create the member if use_args: - member = new_member(enum_class, value) + if not isinstance(value, tuple): + value = (value, ) + member = new_member(enum_class, *value) + value = value[0] else: member = new_member(enum_class) - member._value_ = value + if __new__ is None: + member._value_ = value member._name_ = name member.__objclass__ = enum_class member.__init__(value) @@ -1460,7 +1514,8 @@ def convert_class(cls): if _is_single_bit(value): # not a multi-bit alias, record in _member_names_ member_names.append(name) - flag_mask |= value + order += 1 + gnv_last_values.append(value) enum_class._flag_mask_ = flag_mask enum_class._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 # set correct __iter__ @@ -1469,20 +1524,29 @@ def convert_class(cls): enum_class._iter_member_ = enum_class._iter_member_by_def_ else: # Enum / IntEnum / StrEnum - for order, (name, value) in enumerate(attrs.items()): + order = 0 + for name, value in attrs.items(): + if isinstance(value, auto): + if value.value is _auto_null: + value.value = gnv(name, 1, order, gnv_last_values) + value = value.value if value in value2member_map: # an alias to an existing member - member_map[name] = value2member_map[value] redirect = property() redirect.__set_name__(enum_class, name) setattr(enum_class, name, redirect) + member_map[name] = value2member_map[value] else: # create the member if use_args: - member = new_member(enum_class, value) + if not isinstance(value, tuple): + value = (value, ) + member = new_member(enum_class, *value) + value = value[0] else: member = new_member(enum_class) - member._value_ = value + if __new__ is None: + member._value_ = value member._name_ = name member.__objclass__ = enum_class member.__init__(value) @@ -1493,8 +1557,116 @@ def convert_class(cls): member_map[name] = member value2member_map[value] = member member_names.append(name) + order += 1 + gnv_last_values.append(value) if '__new__' in body: enum_class.__new_member__ = enum_class.__new__ enum_class.__new__ = Enum.__new__ return enum_class return convert_class + +def test_simple_enum(checked_enum, simple_enum): + """ + Compare a simple enum with the equivalent fully-checked enum. + """ + failed = [] + if checked_enum.__dict__ != simple_enum.__dict__: + checked_dict = checked_enum.__dict__ + checked_keys = list(checked_dict.keys()) + simple_dict = simple_enum.__dict__ + simple_keys = list(simple_dict.keys()) + member_names = set( + list(checked_enum._member_map_.keys()) + + list(simple_enum._member_map_.keys()) + ) + for key in set(checked_keys + simple_keys): + if key in ('__module__', '_member_map_', '_value2member_map_'): + # keys known to be different + continue + elif key in member_names: + # members are checked below + continue + elif key not in simple_keys: + failed.append("missing key: %r" % (key, )) + elif key not in checked_keys: + failed.append("extra key: %r" % (key, )) + else: + checked_value = checked_dict[key] + simple_value = simple_dict[key] + if callable(checked_value): + continue + if key == '__doc__': + # remove all spaces/tabs + compressed_checked_value = checked_value.replace(' ','').replace('\t','') + compressed_simple_value = simple_value.replace(' ','').replace('\t','') + if compressed_checked_value != compressed_simple_value: + failed.append("%r:\n %s\n %s" % ( + key, + "checked -> %r" % (checked_value, ), + "simple -> %r" % (simple_value, ), + )) + elif checked_value != simple_value: + failed.append("%r:\n %s\n %s" % ( + key, + "checked -> %r" % (checked_value, ), + "simple -> %r" % (simple_value, ), + )) + failed.sort() + for name in member_names: + failed_member = [] + if name not in simple_keys: + failed.append('missing member from simple enum: %r' % name) + elif name not in checked_keys: + failed.append('extra member in simple enum: %r' % name) + else: + checked_member_dict = checked_enum[name].__dict__ + checked_member_keys = list(checked_member_dict.keys()) + simple_member_dict = simple_enum[name].__dict__ + simple_member_keys = list(simple_member_dict.keys()) + for key in set(checked_member_keys + simple_member_keys): + if key in ('__module__', '__objclass__'): + # keys known to be different + continue + elif key not in simple_member_keys: + failed_member.append("missing key %r not in the simple enum member %r" % (key, name)) + elif key not in checked_member_keys: + failed_member.append("extra key %r in simple enum member %r" % (key, name)) + else: + checked_value = checked_member_dict[key] + simple_value = simple_member_dict[key] + if checked_value != simple_value: + failed_member.append("%r:\n %s\n %s" % ( + key, + "checked member -> %r" % (checked_value, ), + "simple member -> %r" % (simple_value, ), + )) + if failed_member: + failed.append('%r member mismatch:\n %s' % ( + name, '\n '.join(failed_member), + )) + for method in ( + '__str__', '__repr__', '__reduce_ex__', '__format__', + '__getnewargs_ex__', '__getnewargs__', '__reduce_ex__', '__reduce__' + ): + if method in simple_keys and method in checked_keys: + # cannot compare functions, and it exists in both, so we're good + continue + elif method not in simple_keys and method not in checked_keys: + # method is inherited -- check it out + checked_method = getattr(checked_enum, method, None) + simple_method = getattr(simple_enum, method, None) + if hasattr(checked_method, '__func__'): + checked_method = checked_method.__func__ + simple_method = simple_method.__func__ + if checked_method != simple_method: + failed.append("%r: %-30s %s" % ( + method, + "checked -> %r" % (checked_method, ), + "simple -> %r" % (simple_method, ), + )) + else: + # if the method existed in only one of the enums, it will have been caught + # in the first checks above + pass + if failed: + raise ValueError('enum mismatch:\n %s' % '\n '.join(failed)) diff --git a/Lib/http/__init__.py b/Lib/http/__init__.py index 37be765349ea00..7418a100625661 100644 --- a/Lib/http/__init__.py +++ b/Lib/http/__init__.py @@ -1,8 +1,10 @@ -from enum import IntEnum +from enum import IntEnum, simple_enum __all__ = ['HTTPStatus'] -class HTTPStatus(IntEnum): + +@simple_enum(IntEnum) +class HTTPStatus: """HTTP status codes and reason phrases Status codes from the following RFCs are all observed: diff --git a/Lib/pstats.py b/Lib/pstats.py index 0f93ae02c95074..ab848a4b681025 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -26,14 +26,15 @@ import marshal import re -from enum import Enum +from enum import StrEnum, simple_enum from functools import cmp_to_key from dataclasses import dataclass from typing import Dict __all__ = ["Stats", "SortKey", "FunctionProfile", "StatsProfile"] -class SortKey(str, Enum): +@simple_enum(StrEnum) +class SortKey: CALLS = 'calls', 'ncalls' CUMULATIVE = 'cumulative', 'cumtime' FILENAME = 'filename', 'module' diff --git a/Lib/ssl.py b/Lib/ssl.py index d631805d6cabe5..d5b0b74fbc920a 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -94,6 +94,7 @@ import os from collections import namedtuple from enum import Enum as _Enum, IntEnum as _IntEnum, IntFlag as _IntFlag +from enum import simple_enum as _simple_enum import _ssl # if we can't import it, let the error propagate @@ -155,7 +156,8 @@ _SSLv2_IF_EXISTS = getattr(_SSLMethod, 'PROTOCOL_SSLv2', None) -class TLSVersion(_IntEnum): +@_simple_enum(_IntEnum) +class TLSVersion: MINIMUM_SUPPORTED = _ssl.PROTO_MINIMUM_SUPPORTED SSLv3 = _ssl.PROTO_SSLv3 TLSv1 = _ssl.PROTO_TLSv1 @@ -165,7 +167,8 @@ class TLSVersion(_IntEnum): MAXIMUM_SUPPORTED = _ssl.PROTO_MAXIMUM_SUPPORTED -class _TLSContentType(_IntEnum): +@_simple_enum(_IntEnum) +class _TLSContentType: """Content types (record layer) See RFC 8446, section B.1 @@ -179,7 +182,8 @@ class _TLSContentType(_IntEnum): INNER_CONTENT_TYPE = 0x101 -class _TLSAlertType(_IntEnum): +@_simple_enum(_IntEnum) +class _TLSAlertType: """Alert types for TLSContentType.ALERT messages See RFC 8466, section B.2 @@ -220,7 +224,8 @@ class _TLSAlertType(_IntEnum): NO_APPLICATION_PROTOCOL = 120 -class _TLSMessageType(_IntEnum): +@_simple_enum(_IntEnum) +class _TLSMessageType: """Message types (handshake protocol) See RFC 8446, section B.3 diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index 682495839966b1..d2190fbe1e2c54 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -1,6 +1,7 @@ import ast import builtins import dis +import enum import os import sys import types @@ -698,6 +699,35 @@ def test_constant_as_name(self): with self.assertRaisesRegex(ValueError, f"Name node can't be used with '{constant}' constant"): compile(expr, "", "eval") + def test_precedence_enum(self): + class _Precedence(enum.IntEnum): + """Precedence table that originated from python grammar.""" + TUPLE = enum.auto() + YIELD = enum.auto() # 'yield', 'yield from' + TEST = enum.auto() # 'if'-'else', 'lambda' + OR = enum.auto() # 'or' + AND = enum.auto() # 'and' + NOT = enum.auto() # 'not' + CMP = enum.auto() # '<', '>', '==', '>=', '<=', '!=', + # 'in', 'not in', 'is', 'is not' + EXPR = enum.auto() + BOR = EXPR # '|' + BXOR = enum.auto() # '^' + BAND = enum.auto() # '&' + SHIFT = enum.auto() # '<<', '>>' + ARITH = enum.auto() # '+', '-' + TERM = enum.auto() # '*', '@', '/', '%', '//' + FACTOR = enum.auto() # unary '+', '-', '~' + POWER = enum.auto() # '**' + AWAIT = enum.auto() # 'await' + ATOM = enum.auto() + def next(self): + try: + return self.__class__(self + 1) + except ValueError: + return self + enum.test_simple_enum(_Precedence, ast._Precedence) + class ASTHelpers_Test(unittest.TestCase): maxDiff = None diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index 5fb45924e50822..b26f1f1ad2b798 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -1,3 +1,4 @@ +import enum import errno from http import client, HTTPStatus import io @@ -524,6 +525,150 @@ def test_dir_with_added_behavior_on_status(self): # see issue40084 self.assertTrue({'description', 'name', 'phrase', 'value'} <= set(dir(HTTPStatus(404)))) + def test_simple_httpstatus(self): + class CheckedHTTPStatus(enum.IntEnum): + """HTTP status codes and reason phrases + + Status codes from the following RFCs are all observed: + + * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616 + * RFC 6585: Additional HTTP Status Codes + * RFC 3229: Delta encoding in HTTP + * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518 + * RFC 5842: Binding Extensions to WebDAV + * RFC 7238: Permanent Redirect + * RFC 2295: Transparent Content Negotiation in HTTP + * RFC 2774: An HTTP Extension Framework + * RFC 7725: An HTTP Status Code to Report Legal Obstacles + * RFC 7540: Hypertext Transfer Protocol Version 2 (HTTP/2) + * RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) + * RFC 8297: An HTTP Status Code for Indicating Hints + * RFC 8470: Using Early Data in HTTP + """ + def __new__(cls, value, phrase, description=''): + obj = int.__new__(cls, value) + obj._value_ = value + + obj.phrase = phrase + obj.description = description + return obj + # informational + CONTINUE = 100, 'Continue', 'Request received, please continue' + SWITCHING_PROTOCOLS = (101, 'Switching Protocols', + 'Switching to new protocol; obey Upgrade header') + PROCESSING = 102, 'Processing' + EARLY_HINTS = 103, 'Early Hints' + # success + OK = 200, 'OK', 'Request fulfilled, document follows' + CREATED = 201, 'Created', 'Document created, URL follows' + ACCEPTED = (202, 'Accepted', + 'Request accepted, processing continues off-line') + NON_AUTHORITATIVE_INFORMATION = (203, + 'Non-Authoritative Information', 'Request fulfilled from cache') + NO_CONTENT = 204, 'No Content', 'Request fulfilled, nothing follows' + RESET_CONTENT = 205, 'Reset Content', 'Clear input form for further input' + PARTIAL_CONTENT = 206, 'Partial Content', 'Partial content follows' + MULTI_STATUS = 207, 'Multi-Status' + ALREADY_REPORTED = 208, 'Already Reported' + IM_USED = 226, 'IM Used' + # redirection + MULTIPLE_CHOICES = (300, 'Multiple Choices', + 'Object has several resources -- see URI list') + MOVED_PERMANENTLY = (301, 'Moved Permanently', + 'Object moved permanently -- see URI list') + FOUND = 302, 'Found', 'Object moved temporarily -- see URI list' + SEE_OTHER = 303, 'See Other', 'Object moved -- see Method and URL list' + NOT_MODIFIED = (304, 'Not Modified', + 'Document has not changed since given time') + USE_PROXY = (305, 'Use Proxy', + 'You must use proxy specified in Location to access this resource') + TEMPORARY_REDIRECT = (307, 'Temporary Redirect', + 'Object moved temporarily -- see URI list') + PERMANENT_REDIRECT = (308, 'Permanent Redirect', + 'Object moved permanently -- see URI list') + # client error + BAD_REQUEST = (400, 'Bad Request', + 'Bad request syntax or unsupported method') + UNAUTHORIZED = (401, 'Unauthorized', + 'No permission -- see authorization schemes') + PAYMENT_REQUIRED = (402, 'Payment Required', + 'No payment -- see charging schemes') + FORBIDDEN = (403, 'Forbidden', + 'Request forbidden -- authorization will not help') + NOT_FOUND = (404, 'Not Found', + 'Nothing matches the given URI') + METHOD_NOT_ALLOWED = (405, 'Method Not Allowed', + 'Specified method is invalid for this resource') + NOT_ACCEPTABLE = (406, 'Not Acceptable', + 'URI not available in preferred format') + PROXY_AUTHENTICATION_REQUIRED = (407, + 'Proxy Authentication Required', + 'You must authenticate with this proxy before proceeding') + REQUEST_TIMEOUT = (408, 'Request Timeout', + 'Request timed out; try again later') + CONFLICT = 409, 'Conflict', 'Request conflict' + GONE = (410, 'Gone', + 'URI no longer exists and has been permanently removed') + LENGTH_REQUIRED = (411, 'Length Required', + 'Client must specify Content-Length') + PRECONDITION_FAILED = (412, 'Precondition Failed', + 'Precondition in headers is false') + REQUEST_ENTITY_TOO_LARGE = (413, 'Request Entity Too Large', + 'Entity is too large') + REQUEST_URI_TOO_LONG = (414, 'Request-URI Too Long', + 'URI is too long') + UNSUPPORTED_MEDIA_TYPE = (415, 'Unsupported Media Type', + 'Entity body in unsupported format') + REQUESTED_RANGE_NOT_SATISFIABLE = (416, + 'Requested Range Not Satisfiable', + 'Cannot satisfy request range') + EXPECTATION_FAILED = (417, 'Expectation Failed', + 'Expect condition could not be satisfied') + IM_A_TEAPOT = (418, 'I\'m a Teapot', + 'Server refuses to brew coffee because it is a teapot.') + MISDIRECTED_REQUEST = (421, 'Misdirected Request', + 'Server is not able to produce a response') + UNPROCESSABLE_ENTITY = 422, 'Unprocessable Entity' + LOCKED = 423, 'Locked' + FAILED_DEPENDENCY = 424, 'Failed Dependency' + TOO_EARLY = 425, 'Too Early' + UPGRADE_REQUIRED = 426, 'Upgrade Required' + PRECONDITION_REQUIRED = (428, 'Precondition Required', + 'The origin server requires the request to be conditional') + TOO_MANY_REQUESTS = (429, 'Too Many Requests', + 'The user has sent too many requests in ' + 'a given amount of time ("rate limiting")') + REQUEST_HEADER_FIELDS_TOO_LARGE = (431, + 'Request Header Fields Too Large', + 'The server is unwilling to process the request because its header ' + 'fields are too large') + UNAVAILABLE_FOR_LEGAL_REASONS = (451, + 'Unavailable For Legal Reasons', + 'The server is denying access to the ' + 'resource as a consequence of a legal demand') + # server errors + INTERNAL_SERVER_ERROR = (500, 'Internal Server Error', + 'Server got itself in trouble') + NOT_IMPLEMENTED = (501, 'Not Implemented', + 'Server does not support this operation') + BAD_GATEWAY = (502, 'Bad Gateway', + 'Invalid responses from another server/proxy') + SERVICE_UNAVAILABLE = (503, 'Service Unavailable', + 'The server cannot process the request due to a high load') + GATEWAY_TIMEOUT = (504, 'Gateway Timeout', + 'The gateway server did not receive a timely response') + HTTP_VERSION_NOT_SUPPORTED = (505, 'HTTP Version Not Supported', + 'Cannot fulfill request') + VARIANT_ALSO_NEGOTIATES = 506, 'Variant Also Negotiates' + INSUFFICIENT_STORAGE = 507, 'Insufficient Storage' + LOOP_DETECTED = 508, 'Loop Detected' + NOT_EXTENDED = 510, 'Not Extended' + NETWORK_AUTHENTICATION_REQUIRED = (511, + 'Network Authentication Required', + 'The client needs to authenticate to gain network access') + enum.test_simple_enum(CheckedHTTPStatus, HTTPStatus) + + def test_status_lines(self): # Test HTTP status lines diff --git a/Lib/test/test_pstats.py b/Lib/test/test_pstats.py index 4f78b99fd1cae7..a73482df6292b0 100644 --- a/Lib/test/test_pstats.py +++ b/Lib/test/test_pstats.py @@ -3,6 +3,7 @@ from test import support from io import StringIO from pstats import SortKey +from enum import StrEnum, test_simple_enum import pstats import cProfile @@ -67,6 +68,25 @@ def test_sort_stats_enum(self): self.assertEqual( self.stats.sort_type, self.stats.sort_arg_dict_default[member.value][-1]) + class CheckedSortKey(StrEnum): + CALLS = 'calls', 'ncalls' + CUMULATIVE = 'cumulative', 'cumtime' + FILENAME = 'filename', 'module' + LINE = 'line' + NAME = 'name' + NFL = 'nfl' + PCALLS = 'pcalls' + STDNAME = 'stdname' + TIME = 'time', 'tottime' + def __new__(cls, *values): + value = values[0] + obj = str.__new__(cls, value) + obj._value_ = value + for other_value in values[1:]: + cls._value2member_map_[other_value] = obj + obj._all_values = values + return obj + test_simple_enum(CheckedSortKey, SortKey) def test_sort_starts_mix(self): self.assertRaises(TypeError, self.stats.sort_stats, diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index ae66c3e7d4a56c..a1fef31c4a317f 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -12,6 +12,8 @@ import socket import select import time +import datetime +import enum import gc import os import errno @@ -31,7 +33,7 @@ ssl = import_helper.import_module("ssl") -from ssl import TLSVersion, _TLSContentType, _TLSMessageType +from ssl import TLSVersion, _TLSContentType, _TLSMessageType, _TLSAlertType Py_DEBUG = hasattr(sys, 'gettotalrefcount') Py_DEBUG_WIN32 = Py_DEBUG and sys.platform == 'win32' @@ -4705,6 +4707,107 @@ def sni_cb(sock, servername, ctx): s.connect((HOST, server.port)) +class TestEnumerations(unittest.TestCase): + + def test_tlsversion(self): + class CheckedTLSVersion(enum.IntEnum): + MINIMUM_SUPPORTED = _ssl.PROTO_MINIMUM_SUPPORTED + SSLv3 = _ssl.PROTO_SSLv3 + TLSv1 = _ssl.PROTO_TLSv1 + TLSv1_1 = _ssl.PROTO_TLSv1_1 + TLSv1_2 = _ssl.PROTO_TLSv1_2 + TLSv1_3 = _ssl.PROTO_TLSv1_3 + MAXIMUM_SUPPORTED = _ssl.PROTO_MAXIMUM_SUPPORTED + enum.test_simple_enum(CheckedTLSVersion, TLSVersion) + + def test_tlscontenttype(self): + class Checked_TLSContentType(enum.IntEnum): + """Content types (record layer) + + See RFC 8446, section B.1 + """ + CHANGE_CIPHER_SPEC = 20 + ALERT = 21 + HANDSHAKE = 22 + APPLICATION_DATA = 23 + # pseudo content types + HEADER = 0x100 + INNER_CONTENT_TYPE = 0x101 + enum.test_simple_enum(Checked_TLSContentType, _TLSContentType) + + def test_tlsalerttype(self): + class Checked_TLSAlertType(enum.IntEnum): + """Alert types for TLSContentType.ALERT messages + + See RFC 8466, section B.2 + """ + CLOSE_NOTIFY = 0 + UNEXPECTED_MESSAGE = 10 + BAD_RECORD_MAC = 20 + DECRYPTION_FAILED = 21 + RECORD_OVERFLOW = 22 + DECOMPRESSION_FAILURE = 30 + HANDSHAKE_FAILURE = 40 + NO_CERTIFICATE = 41 + BAD_CERTIFICATE = 42 + UNSUPPORTED_CERTIFICATE = 43 + CERTIFICATE_REVOKED = 44 + CERTIFICATE_EXPIRED = 45 + CERTIFICATE_UNKNOWN = 46 + ILLEGAL_PARAMETER = 47 + UNKNOWN_CA = 48 + ACCESS_DENIED = 49 + DECODE_ERROR = 50 + DECRYPT_ERROR = 51 + EXPORT_RESTRICTION = 60 + PROTOCOL_VERSION = 70 + INSUFFICIENT_SECURITY = 71 + INTERNAL_ERROR = 80 + INAPPROPRIATE_FALLBACK = 86 + USER_CANCELED = 90 + NO_RENEGOTIATION = 100 + MISSING_EXTENSION = 109 + UNSUPPORTED_EXTENSION = 110 + CERTIFICATE_UNOBTAINABLE = 111 + UNRECOGNIZED_NAME = 112 + BAD_CERTIFICATE_STATUS_RESPONSE = 113 + BAD_CERTIFICATE_HASH_VALUE = 114 + UNKNOWN_PSK_IDENTITY = 115 + CERTIFICATE_REQUIRED = 116 + NO_APPLICATION_PROTOCOL = 120 + enum.test_simple_enum(Checked_TLSAlertType, _TLSAlertType) + + def test_tlsmessagetype(self): + class Checked_TLSMessageType(enum.IntEnum): + """Message types (handshake protocol) + + See RFC 8446, section B.3 + """ + HELLO_REQUEST = 0 + CLIENT_HELLO = 1 + SERVER_HELLO = 2 + HELLO_VERIFY_REQUEST = 3 + NEWSESSION_TICKET = 4 + END_OF_EARLY_DATA = 5 + HELLO_RETRY_REQUEST = 6 + ENCRYPTED_EXTENSIONS = 8 + CERTIFICATE = 11 + SERVER_KEY_EXCHANGE = 12 + CERTIFICATE_REQUEST = 13 + SERVER_DONE = 14 + CERTIFICATE_VERIFY = 15 + CLIENT_KEY_EXCHANGE = 16 + FINISHED = 20 + CERTIFICATE_URL = 21 + CERTIFICATE_STATUS = 22 + SUPPLEMENTAL_DATA = 23 + KEY_UPDATE = 24 + NEXT_PROTO = 67 + MESSAGE_HASH = 254 + CHANGE_CIPHER_SPEC = 0x0101 + enum.test_simple_enum(Checked_TLSMessageType, _TLSMessageType) + + def test_main(verbose=False): if support.verbose: plats = { diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index d47cf28782dd7e..0e6cbb61b2298b 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -1463,20 +1463,21 @@ class Float(float, enum.Enum): PI = 3.1415926 class Int(enum.IntEnum): IDES = 15 - class Str(str, enum.Enum): + class Str(enum.StrEnum): + # StrEnum uses the value and not the name for %s etc. ABC = 'abc' # Testing Unicode formatting strings... self.assertEqual("%s, %s" % (Str.ABC, Str.ABC), - 'ABC, ABC') + 'abc, abc') self.assertEqual("%s, %s, %d, %i, %u, %f, %5.2f" % (Str.ABC, Str.ABC, Int.IDES, Int.IDES, Int.IDES, Float.PI, Float.PI), - 'ABC, ABC, 15, 15, 15, 3.141593, 3.14') + 'abc, abc, 15, 15, 15, 3.141593, 3.14') # formatting jobs delegated from the string implementation: self.assertEqual('...%(foo)s...' % {'foo':Str.ABC}, - '...ABC...') + '...abc...') self.assertEqual('...%(foo)s...' % {'foo':Int.IDES}, '...IDES...') self.assertEqual('...%(foo)i...' % {'foo':Int.IDES}, diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py index d6a8333427a4a2..cfd6301059515d 100755 --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -4,6 +4,7 @@ import builtins import contextlib import copy +import enum import io import os import pickle @@ -31,6 +32,13 @@ def get_command_stdout(command, args): class BaseTestUUID: uuid = None + def test_safe_uuid_enum(self): + class CheckedSafeUUID(enum.Enum): + safe = 0 + unsafe = -1 + unknown = None + enum.test_simple_enum(CheckedSafeUUID, py_uuid.SafeUUID) + def test_UUID(self): equal = self.assertEqual ascending = [] diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 01dce7eff25c54..342429072f03aa 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -144,7 +144,8 @@ def _splitdict(tk, v, cut_minus=True, conv=None): return dict -class EventType(enum.StrEnum): +@enum.simple_enum(enum.StrEnum) +class EventType: KeyPress = '2' Key = KeyPress KeyRelease = '3' @@ -185,8 +186,6 @@ class EventType(enum.StrEnum): Deactivate = '37' MouseWheel = '38' - __str__ = str.__str__ - class Event: """Container for the properties of an event. diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index f6e5b4db1ae1fb..aa5becd0147b5e 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -1,5 +1,6 @@ import unittest import tkinter +import enum from test import support from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest @@ -261,6 +262,49 @@ def test_event_repr(self): " num=3 delta=-1 focus=True" " x=10 y=20 width=300 height=200>") + def test_eventtype_enum(self): + class CheckedEventType(enum.StrEnum): + KeyPress = '2' + Key = KeyPress + KeyRelease = '3' + ButtonPress = '4' + Button = ButtonPress + ButtonRelease = '5' + Motion = '6' + Enter = '7' + Leave = '8' + FocusIn = '9' + FocusOut = '10' + Keymap = '11' # undocumented + Expose = '12' + GraphicsExpose = '13' # undocumented + NoExpose = '14' # undocumented + Visibility = '15' + Create = '16' + Destroy = '17' + Unmap = '18' + Map = '19' + MapRequest = '20' + Reparent = '21' + Configure = '22' + ConfigureRequest = '23' + Gravity = '24' + ResizeRequest = '25' + Circulate = '26' + CirculateRequest = '27' + Property = '28' + SelectionClear = '29' # undocumented + SelectionRequest = '30' # undocumented + Selection = '31' # undocumented + Colormap = '32' + ClientMessage = '33' # undocumented + Mapping = '34' # undocumented + VirtualEvent = '35' # undocumented + Activate = '36' + Deactivate = '37' + MouseWheel = '38' + enum.test_simple_enum(CheckedEventType, tkinter.EventType) + def test_getboolean(self): for v in 'true', 'yes', 'on', '1', 't', 'y', 1, True: self.assertIs(self.root.getboolean(v), True) diff --git a/Lib/uuid.py b/Lib/uuid.py index 5ae0a3e5fa449d..44cc541d0cb9ad 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -47,7 +47,7 @@ import os import sys -from enum import Enum +from enum import Enum, simple_enum __author__ = 'Ka-Ping Yee ' @@ -75,7 +75,8 @@ bytes_ = bytes # The built-in bytes type -class SafeUUID(Enum): +@simple_enum(Enum) +class SafeUUID: safe = 0 unsafe = -1 unknown = None diff --git a/Misc/NEWS.d/next/Library/2021-04-08-11-47-31.bpo-38659.r_HFnU.rst b/Misc/NEWS.d/next/Library/2021-04-08-11-47-31.bpo-38659.r_HFnU.rst new file mode 100644 index 00000000000000..822584be1b221c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-08-11-47-31.bpo-38659.r_HFnU.rst @@ -0,0 +1,4 @@ +A ``simple_enum`` decorator is added to the ``enum`` module to convert a +normal class into an Enum. ``test_simple_enum`` added to test simple enums +against a corresponding normal Enum. Standard library modules updated to +use ``simple_enum``. From 47c11965f0a3b1d8b6cb441b7d358d551873dae8 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Thu, 8 Apr 2021 12:58:51 -0700 Subject: [PATCH 106/108] raise TypeError from test_simple_enum Instead of raising ValueError on mismatch, raise a TypeError instead. --- Doc/library/enum.rst | 2 +- Lib/enum.py | 2 +- Lib/test/test_enum.py | 19 ++++++++++++++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 494171e2f75386..4bfdffd1504ff2 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -660,4 +660,4 @@ Utilites and Decorators ... BLUE = auto() >>> test_simple_enum(CheckedColor, Color) - If differences are found, a :exc:`ValueError` is raised. + If differences are found, a :exc:`TypeError` is raised. diff --git a/Lib/enum.py b/Lib/enum.py index a936e0d389e0ef..ebfb15e17b452b 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -1669,4 +1669,4 @@ def test_simple_enum(checked_enum, simple_enum): # in the first checks above pass if failed: - raise ValueError('enum mismatch:\n %s' % '\n '.join(failed)) + raise TypeError('enum mismatch:\n %s' % '\n '.join(failed)) diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index b9d7f96a3e9485..f95a84ae944e6f 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -8,7 +8,7 @@ import threading from collections import OrderedDict from enum import Enum, IntEnum, StrEnum, EnumType, Flag, IntFlag, unique, auto -from enum import STRICT, CONFORM, EJECT, KEEP +from enum import STRICT, CONFORM, EJECT, KEEP, simple_enum, test_simple_enum from io import StringIO from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL from test import support @@ -3577,6 +3577,23 @@ def test_inspect_classify_class_attrs(self): if failed: self.fail("result does not equal expected, see print above") + def test_test_simple_enum(self): + @simple_enum(Enum) + class SimpleColor: + RED = 1 + GREEN = 2 + BLUE = 3 + class CheckedColor(Enum): + RED = 1 + GREEN = 2 + BLUE = 3 + self.assertTrue(test_simple_enum(CheckedColor, SimpleColor) is None) + SimpleColor.GREEN._value_ = 9 + self.assertRaisesRegex( + TypeError, "enum mismatch", + test_simple_enum, CheckedColor, SimpleColor, + ) + class MiscTestCase(unittest.TestCase): def test__all__(self): From 79a12e8658c96261bdb2b63d61b6abefdb8099bd Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Sat, 10 Apr 2021 20:28:20 -0700 Subject: [PATCH 107/108] changes: - make simple_enum and test_simple_enum private - add _old_convert_ to enable testing `IntEnum._convert_` and `IntFlag._convert_` transformations - add tests for the `_convert_`s --- Doc/library/enum.rst | 40 ------ Lib/ast.py | 4 +- Lib/enum.py | 135 ++++++++++++--------- Lib/http/__init__.py | 4 +- Lib/pstats.py | 4 +- Lib/re.py | 2 +- Lib/ssl.py | 2 +- Lib/test/test_ast.py | 2 +- Lib/test/test_enum.py | 50 ++++++-- Lib/test/test_httplib.py | 2 +- Lib/test/test_pstats.py | 4 +- Lib/test/test_signal.py | 27 +++++ Lib/test/test_socket.py | 35 ++++++ Lib/test/test_ssl.py | 69 ++++++++++- Lib/test/test_uuid.py | 2 +- Lib/tkinter/__init__.py | 2 +- Lib/tkinter/test/test_tkinter/test_misc.py | 2 +- Lib/uuid.py | 4 +- 18 files changed, 266 insertions(+), 124 deletions(-) diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst index 4bfdffd1504ff2..91c214eb668d11 100644 --- a/Doc/library/enum.rst +++ b/Doc/library/enum.rst @@ -117,19 +117,6 @@ Module Contents Enum class decorator that ensures only one name is bound to any one value. - :func:`simple_enum` - - Class decorator that converts a normal class into an :class:`Enum`. No - safety checks are done, and some advanced behavior (such as - :func:`__init_subclass__`) is not available. Enum creation can be faster - using :func:`simple_enum`. - - :func:`test_simple_enum` - - Function that can be used to test an enum created with - :func:`simple_enum` with the corresponding :class:`Enum`-subclassed - version. - .. versionadded:: 3.6 ``Flag``, ``IntFlag``, ``auto`` .. versionadded:: 3.10 ``StrEnum`` @@ -634,30 +621,3 @@ Utilites and Decorators Traceback (most recent call last): ... ValueError: duplicate values found in : FOUR -> THREE - -.. decorator:: simple_enum - - A :keyword:`class` decorator that converts a normal class into an enum:: - - >>> from enum import Enum, simple_enum - >>> @simple_enum(Enum): - ... class Color: - ... RED = auto() - ... GREEN = auto() - ... BLUE = auto() - >>> Color - - -.. function:: test_simple_enum - - A function that can be used to test an enum created with :func:`simple_enum` - against the version created by subclassing :class:`Enum`:: - - >>> from enum import Enum, test_simple_enum - >>> class CheckedColor(Enum): - ... RED = auto() - ... GREEN = auto() - ... BLUE = auto() - >>> test_simple_enum(CheckedColor, Color) - - If differences are found, a :exc:`TypeError` is raised. diff --git a/Lib/ast.py b/Lib/ast.py index ac4fc074961736..703f68ace6068f 100644 --- a/Lib/ast.py +++ b/Lib/ast.py @@ -27,7 +27,7 @@ import sys from _ast import * from contextlib import contextmanager, nullcontext -from enum import IntEnum, auto, simple_enum +from enum import IntEnum, auto, _simple_enum def parse(source, filename='', mode='exec', *, @@ -636,7 +636,7 @@ class Param(expr_context): # We unparse those infinities to INFSTR. _INFSTR = "1e" + repr(sys.float_info.max_10_exp + 1) -@simple_enum(IntEnum) +@_simple_enum(IntEnum) class _Precedence: """Precedence table that originated from python grammar.""" diff --git a/Lib/enum.py b/Lib/enum.py index ebfb15e17b452b..742b99ba178173 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -10,7 +10,6 @@ 'property', 'FlagBoundary', 'STRICT', 'CONFORM', 'EJECT', 'KEEP', 'global_flag_repr', 'global_enum_repr', 'global_enum', - 'simple_enum', 'test_simple_enum', ] @@ -392,7 +391,7 @@ def __prepare__(metacls, cls, bases, **kwds): ) return enum_dict - def __new__(metacls, cls, bases, classdict, boundary=None, _simple=False, **kwds): + def __new__(metacls, cls, bases, classdict, *, boundary=None, _simple=False, **kwds): # an Enum class is final once enumeration items have been defined; it # cannot be mixed with other types (int, float, etc.) if it has an # inherited __new__ unless a new __new__ is defined (or the resulting @@ -753,40 +752,8 @@ def _create_(cls, class_name, names, *, module=None, qualname=None, type=None, s return metacls.__new__(metacls, class_name, bases, classdict, boundary=boundary) - def _convert_(cls, name, module, filter, source=None, boundary=None): - """ - Create a new Enum subclass that replaces a collection of global constants - """ - # convert all constants from source (or module) that pass filter() to - # a new Enum called name, and export the enum and its members back to - # module; - # also, replace the __reduce_ex__ method so unpickling works in - # previous Python versions - module_globals = sys.modules[module].__dict__ - if source: - source = source.__dict__ - else: - source = module_globals - # _value2member_map_ is populated in the same order every time - # for a consistent reverse mapping of number to name when there - # are multiple names for the same number. - members = [ - (name, value) - for name, value in source.items() - if filter(name)] - try: - # sort by value - members.sort(key=lambda t: (t[1], t[0])) - except TypeError: - # unless some values aren't comparable, in which case sort by name - members.sort(key=lambda t: t[0]) - cls = cls(name, members, module=module, boundary=boundary or KEEP) - cls.__reduce_ex__ = _reduce_ex_by_name - global_enum(cls) - module_globals[name] = cls - return cls + def _convert_(cls, name, module, filter, source=None, *, boundary=None): - def _convert_new_(cls, name, module, filter, source=None, boundary=None): """ Create a new Enum subclass that replaces a collection of global constants """ @@ -816,8 +783,8 @@ def _convert_new_(cls, name, module, filter, source=None, boundary=None): body = {t[0]: t[1] for t in members} body['__module__'] = module tmp_cls = type(name, (object, ), body) - cls = simple_enum(etype=cls, boundary=boundary)(tmp_cls) - # cls = cls(name, members, module=module, boundary=boundary or KEEP) + cls = _simple_enum(etype=cls, boundary=boundary or KEEP)(tmp_cls) + cls.__reduce_ex__ = _reduce_ex_by_name global_enum(cls) module_globals[name] = cls return cls @@ -1228,7 +1195,7 @@ def _missing_(cls, value): pseudo_member = object.__new__(cls) else: pseudo_member = (__new__ or cls._member_type_.__new__)(cls, value) - if not hasattr(pseudo_member, 'value'): + if not hasattr(pseudo_member, '_value_'): pseudo_member._value_ = value if member_value: pseudo_member._name_ = '|'.join([ @@ -1423,9 +1390,21 @@ def global_enum(cls): sys.modules[cls.__module__].__dict__.update(cls.__members__) return cls -def simple_enum(etype=Enum, *, boundary=None, use_args=None): +def _simple_enum(etype=Enum, *, boundary=None, use_args=None): """ - Directly converts a class into an Enum, bypassing all safety checks, etc. + Class decorator that converts a normal class into an :class:`Enum`. No + safety checks are done, and some advanced behavior (such as + :func:`__init_subclass__`) is not available. Enum creation can be faster + using :func:`simple_enum`. + + >>> from enum import Enum, _simple_enum + >>> @_simple_enum(Enum) + ... class Color: + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> Color + """ def convert_class(cls): nonlocal use_args @@ -1479,12 +1458,10 @@ def convert_class(cls): gnv_last_values = [] if issubclass(enum_class, Flag): # Flag / IntFlag - flag_mask = 0 - order = 0 + single_bits = multi_bits = 0 for name, value in attrs.items(): if isinstance(value, auto) and auto.value is _auto_null: - value = gnv(name, 1, order, gnv_last_values) - flag_mask |= value + value = gnv(name, 1, len(member_names), gnv_last_values) if value in value2member_map: # an alias to an existing member redirect = property() @@ -1505,30 +1482,31 @@ def convert_class(cls): member._name_ = name member.__objclass__ = enum_class member.__init__(value) - member._sort_order_ = order redirect = property() redirect.__set_name__(enum_class, name) setattr(enum_class, name, redirect) member_map[name] = member + member._sort_order_ = len(member_names) value2member_map[value] = member if _is_single_bit(value): - # not a multi-bit alias, record in _member_names_ + # not a multi-bit alias, record in _member_names_ and _flag_mask_ member_names.append(name) - order += 1 + single_bits |= value + else: + multi_bits |= value gnv_last_values.append(value) - enum_class._flag_mask_ = flag_mask - enum_class._all_bits_ = 2 ** ((flag_mask).bit_length()) - 1 + enum_class._flag_mask_ = single_bits + enum_class._all_bits_ = 2 ** ((single_bits|multi_bits).bit_length()) - 1 # set correct __iter__ member_list = [m._value_ for m in enum_class] if member_list != sorted(member_list): enum_class._iter_member_ = enum_class._iter_member_by_def_ else: # Enum / IntEnum / StrEnum - order = 0 for name, value in attrs.items(): if isinstance(value, auto): if value.value is _auto_null: - value.value = gnv(name, 1, order, gnv_last_values) + value.value = gnv(name, 1, len(member_names), gnv_last_values) value = value.value if value in value2member_map: # an alias to an existing member @@ -1550,14 +1528,13 @@ def convert_class(cls): member._name_ = name member.__objclass__ = enum_class member.__init__(value) - member._sort_order_ = order + member._sort_order_ = len(member_names) redirect = property() redirect.__set_name__(enum_class, name) setattr(enum_class, name, redirect) member_map[name] = member value2member_map[value] = member member_names.append(name) - order += 1 gnv_last_values.append(value) if '__new__' in body: enum_class.__new_member__ = enum_class.__new__ @@ -1565,9 +1542,24 @@ def convert_class(cls): return enum_class return convert_class -def test_simple_enum(checked_enum, simple_enum): +def _test_simple_enum(checked_enum, simple_enum): """ - Compare a simple enum with the equivalent fully-checked enum. + A function that can be used to test an enum created with :func:`_simple_enum` + against the version created by subclassing :class:`Enum`:: + + >>> from enum import Enum, _simple_enum, _test_simple_enum + >>> @_simple_enum(Enum) + ... class Color: + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> class CheckedColor(Enum): + ... RED = auto() + ... GREEN = auto() + ... BLUE = auto() + >>> _test_simple_enum(CheckedColor, Color) + + If differences are found, a :exc:`TypeError` is raised. """ failed = [] if checked_enum.__dict__ != simple_enum.__dict__: @@ -1670,3 +1662,36 @@ def test_simple_enum(checked_enum, simple_enum): pass if failed: raise TypeError('enum mismatch:\n %s' % '\n '.join(failed)) + +def _old_convert_(etype, name, module, filter, source=None, *, boundary=None): + """ + Create a new Enum subclass that replaces a collection of global constants + """ + # convert all constants from source (or module) that pass filter() to + # a new Enum called name, and export the enum and its members back to + # module; + # also, replace the __reduce_ex__ method so unpickling works in + # previous Python versions + module_globals = sys.modules[module].__dict__ + if source: + source = source.__dict__ + else: + source = module_globals + # _value2member_map_ is populated in the same order every time + # for a consistent reverse mapping of number to name when there + # are multiple names for the same number. + members = [ + (name, value) + for name, value in source.items() + if filter(name)] + try: + # sort by value + members.sort(key=lambda t: (t[1], t[0])) + except TypeError: + # unless some values aren't comparable, in which case sort by name + members.sort(key=lambda t: t[0]) + cls = etype(name, members, module=module, boundary=boundary or KEEP) + cls.__reduce_ex__ = _reduce_ex_by_name + cls.__repr__ = global_enum_repr + return cls + diff --git a/Lib/http/__init__.py b/Lib/http/__init__.py index 7418a100625661..8b980e24a5603f 100644 --- a/Lib/http/__init__.py +++ b/Lib/http/__init__.py @@ -1,9 +1,9 @@ -from enum import IntEnum, simple_enum +from enum import IntEnum, _simple_enum __all__ = ['HTTPStatus'] -@simple_enum(IntEnum) +@_simple_enum(IntEnum) class HTTPStatus: """HTTP status codes and reason phrases diff --git a/Lib/pstats.py b/Lib/pstats.py index ab848a4b681025..e77459d38b33ec 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -26,14 +26,14 @@ import marshal import re -from enum import StrEnum, simple_enum +from enum import StrEnum, _simple_enum from functools import cmp_to_key from dataclasses import dataclass from typing import Dict __all__ = ["Stats", "SortKey", "FunctionProfile", "StatsProfile"] -@simple_enum(StrEnum) +@_simple_enum(StrEnum) class SortKey: CALLS = 'calls', 'ncalls' CUMULATIVE = 'cumulative', 'cumtime' diff --git a/Lib/re.py b/Lib/re.py index b7427e77daf626..ea41217ce08c2d 100644 --- a/Lib/re.py +++ b/Lib/re.py @@ -143,7 +143,7 @@ __version__ = "2.2.1" @enum.global_enum -@enum.simple_enum(enum.IntFlag, boundary=enum.KEEP) +@enum._simple_enum(enum.IntFlag, boundary=enum.KEEP) class RegexFlag: ASCII = A = sre_compile.SRE_FLAG_ASCII # assume ascii "locale" IGNORECASE = I = sre_compile.SRE_FLAG_IGNORECASE # ignore case diff --git a/Lib/ssl.py b/Lib/ssl.py index d5b0b74fbc920a..620ddaa93f962c 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -94,7 +94,7 @@ import os from collections import namedtuple from enum import Enum as _Enum, IntEnum as _IntEnum, IntFlag as _IntFlag -from enum import simple_enum as _simple_enum +from enum import _simple_enum, _test_simple_enum import _ssl # if we can't import it, let the error propagate diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index d2190fbe1e2c54..80d24e94040bcf 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -726,7 +726,7 @@ def next(self): return self.__class__(self + 1) except ValueError: return self - enum.test_simple_enum(_Precedence, ast._Precedence) + enum._test_simple_enum(_Precedence, ast._Precedence) class ASTHelpers_Test(unittest.TestCase): diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index f95a84ae944e6f..f2340d874b1f85 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -8,7 +8,7 @@ import threading from collections import OrderedDict from enum import Enum, IntEnum, StrEnum, EnumType, Flag, IntFlag, unique, auto -from enum import STRICT, CONFORM, EJECT, KEEP, simple_enum, test_simple_enum +from enum import STRICT, CONFORM, EJECT, KEEP, _simple_enum, _test_simple_enum from io import StringIO from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL from test import support @@ -2511,10 +2511,13 @@ class Bizarre(Flag, boundary=KEEP): d = 6 # self.assertRaisesRegex(ValueError, 'invalid value: 7', Iron, 7) + # self.assertIs(Water(7), Water.ONE|Water.TWO) self.assertIs(Water(~9), Water.TWO) + # self.assertEqual(Space(7), 7) self.assertTrue(type(Space(7)) is int) + # self.assertEqual(list(Bizarre), [Bizarre.c]) self.assertIs(Bizarre(3), Bizarre.b) self.assertIs(Bizarre(6), Bizarre.d) @@ -3053,16 +3056,20 @@ class Space(IntFlag, boundary=EJECT): EIGHT = 8 self.assertIs(Space._boundary_, EJECT) # + # class Bizarre(IntFlag, boundary=KEEP): b = 3 c = 4 d = 6 # self.assertRaisesRegex(ValueError, 'invalid value: 5', Iron, 5) + # self.assertIs(Water(7), Water.ONE|Water.TWO) self.assertIs(Water(~9), Water.TWO) + # self.assertEqual(Space(7), 7) self.assertTrue(type(Space(7)) is int) + # self.assertEqual(list(Bizarre), [Bizarre.c]) self.assertIs(Bizarre(3), Bizarre.b) self.assertIs(Bizarre(6), Bizarre.d) @@ -3578,7 +3585,7 @@ def test_inspect_classify_class_attrs(self): self.fail("result does not equal expected, see print above") def test_test_simple_enum(self): - @simple_enum(Enum) + @_simple_enum(Enum) class SimpleColor: RED = 1 GREEN = 2 @@ -3587,12 +3594,30 @@ class CheckedColor(Enum): RED = 1 GREEN = 2 BLUE = 3 - self.assertTrue(test_simple_enum(CheckedColor, SimpleColor) is None) + self.assertTrue(_test_simple_enum(CheckedColor, SimpleColor) is None) SimpleColor.GREEN._value_ = 9 self.assertRaisesRegex( TypeError, "enum mismatch", - test_simple_enum, CheckedColor, SimpleColor, + _test_simple_enum, CheckedColor, SimpleColor, ) + class CheckedMissing(IntFlag, boundary=KEEP): + SIXTY_FOUR = 64 + ONE_TWENTY_EIGHT = 128 + TWENTY_FORTY_EIGHT = 2048 + ALL = 2048 + 128 + 64 + 12 + CM = CheckedMissing + self.assertEqual(list(CheckedMissing), [CM.SIXTY_FOUR, CM.ONE_TWENTY_EIGHT, CM.TWENTY_FORTY_EIGHT]) + # + @_simple_enum(IntFlag, boundary=KEEP) + class Missing: + SIXTY_FOUR = 64 + ONE_TWENTY_EIGHT = 128 + TWENTY_FORTY_EIGHT = 2048 + ALL = 2048 + 128 + 64 + 12 + M = Missing + self.assertEqual(list(CheckedMissing), [M.SIXTY_FOUR, M.ONE_TWENTY_EIGHT, M.TWENTY_FORTY_EIGHT]) + # + _test_simple_enum(CheckedMissing, Missing) class MiscTestCase(unittest.TestCase): @@ -3609,6 +3634,13 @@ def test__all__(self): CONVERT_TEST_NAME_E = 5 CONVERT_TEST_NAME_F = 5 +CONVERT_STRING_TEST_NAME_D = 5 +CONVERT_STRING_TEST_NAME_C = 5 +CONVERT_STRING_TEST_NAME_B = 5 +CONVERT_STRING_TEST_NAME_A = 5 # This one should sort first. +CONVERT_STRING_TEST_NAME_E = 5 +CONVERT_STRING_TEST_NAME_F = 5 + class TestIntEnumConvert(unittest.TestCase): def test_convert_value_lookup_priority(self): test_type = enum.IntEnum._convert_( @@ -3656,14 +3688,16 @@ def test_convert_raise(self): filter=lambda x: x.startswith('CONVERT_TEST_')) def test_convert_repr_and_str(self): + # reset global constants, as previous tests could have converted the + # integer values to enums module = ('test.test_enum', '__main__')[__name__=='__main__'] test_type = enum.IntEnum._convert_( 'UnittestConvert', module, - filter=lambda x: x.startswith('CONVERT_TEST_')) - self.assertEqual(repr(test_type.CONVERT_TEST_NAME_A), '%s.CONVERT_TEST_NAME_A' % module) - self.assertEqual(str(test_type.CONVERT_TEST_NAME_A), 'CONVERT_TEST_NAME_A') - self.assertEqual(format(test_type.CONVERT_TEST_NAME_A), '5') + filter=lambda x: x.startswith('CONVERT_STRING_TEST_')) + self.assertEqual(repr(test_type.CONVERT_STRING_TEST_NAME_A), '%s.CONVERT_STRING_TEST_NAME_A' % module) + self.assertEqual(str(test_type.CONVERT_STRING_TEST_NAME_A), 'CONVERT_STRING_TEST_NAME_A') + self.assertEqual(format(test_type.CONVERT_STRING_TEST_NAME_A), '5') # global names for StrEnum._convert_ test CONVERT_STR_TEST_2 = 'goodbye' diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index b26f1f1ad2b798..438c2ebbb3d4db 100644 --- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -666,7 +666,7 @@ def __new__(cls, value, phrase, description=''): NETWORK_AUTHENTICATION_REQUIRED = (511, 'Network Authentication Required', 'The client needs to authenticate to gain network access') - enum.test_simple_enum(CheckedHTTPStatus, HTTPStatus) + enum._test_simple_enum(CheckedHTTPStatus, HTTPStatus) def test_status_lines(self): diff --git a/Lib/test/test_pstats.py b/Lib/test/test_pstats.py index a73482df6292b0..acc2fa5385d923 100644 --- a/Lib/test/test_pstats.py +++ b/Lib/test/test_pstats.py @@ -3,7 +3,7 @@ from test import support from io import StringIO from pstats import SortKey -from enum import StrEnum, test_simple_enum +from enum import StrEnum, _test_simple_enum import pstats import cProfile @@ -86,7 +86,7 @@ def __new__(cls, *values): cls._value2member_map_[other_value] = obj obj._all_values = values return obj - test_simple_enum(CheckedSortKey, SortKey) + _test_simple_enum(CheckedSortKey, SortKey) def test_sort_starts_mix(self): self.assertRaises(TypeError, self.stats.sort_stats, diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 8f943bedce3959..06b644e764aa7c 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -1,3 +1,4 @@ +import enum import errno import os import random @@ -33,6 +34,32 @@ def test_enums(self): self.assertIsInstance(sig, signal.Signals) self.assertEqual(sys.platform, "win32") + CheckedSignals = enum._old_convert_( + enum.IntEnum, 'Signals', 'signal', + lambda name: + name.isupper() + and (name.startswith('SIG') and not name.startswith('SIG_')) + or name.startswith('CTRL_'), + source=signal, + ) + enum._test_simple_enum(CheckedSignals, signal.Signals) + + CheckedHandlers = enum._old_convert_( + enum.IntEnum, 'Handlers', 'signal', + lambda name: name in ('SIG_DFL', 'SIG_IGN'), + source=signal, + ) + enum._test_simple_enum(CheckedHandlers, signal.Handlers) + + Sigmasks = getattr(signal, 'Sigmasks', None) + if Sigmasks is not None: + CheckedSigmasks = enum._old_convert_( + enum.IntEnum, 'Sigmasks', 'signal', + lambda name: name in ('SIG_BLOCK', 'SIG_UNBLOCK', 'SIG_SETMASK'), + source=signal, + ) + enum._test_simple_enum(CheckedSigmasks, Sigmasks) + @unittest.skipIf(sys.platform == "win32", "Not valid on Windows") class PosixTests(unittest.TestCase): diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index f91e00059daaa7..43a1d5bdcf5361 100755 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1941,6 +1941,41 @@ def test_socket_fileno_requires_socket_fd(self): fileno=afile.fileno()) self.assertEqual(cm.exception.errno, errno.ENOTSOCK) + def test_addressfamily_enum(self): + import _socket, enum + CheckedAddressFamily = enum._old_convert_( + enum.IntEnum, 'AddressFamily', 'socket', + lambda C: C.isupper() and C.startswith('AF_'), + source=_socket, + ) + enum._test_simple_enum(CheckedAddressFamily, socket.AddressFamily) + + def test_socketkind_enum(self): + import _socket, enum + CheckedSocketKind = enum._old_convert_( + enum.IntEnum, 'SocketKind', 'socket', + lambda C: C.isupper() and C.startswith('SOCK_'), + source=_socket, + ) + enum._test_simple_enum(CheckedSocketKind, socket.SocketKind) + + def test_msgflag_enum(self): + import _socket, enum + CheckedMsgFlag = enum._old_convert_( + enum.IntFlag, 'MsgFlag', 'socket', + lambda C: C.isupper() and C.startswith('MSG_'), + source=_socket, + ) + enum._test_simple_enum(CheckedMsgFlag, socket.MsgFlag) + + def test_addressinfo_enum(self): + import _socket, enum + CheckedAddressInfo = enum._old_convert_( + enum.IntFlag, 'AddressInfo', 'socket', + lambda C: C.isupper() and C.startswith('AI_'), + source=_socket) + enum._test_simple_enum(CheckedAddressInfo, socket.AddressInfo) + @unittest.skipUnless(HAVE_SOCKET_CAN, 'SocketCan required for this test.') class BasicCANTest(unittest.TestCase): diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index a1fef31c4a317f..3db53837ac641c 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1118,10 +1118,23 @@ def test_options(self): self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options) with warnings_helper.check_warnings(): ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1) + # <<<<<<< HEAD FIXME self.assertEqual(default, ctx.options) ctx.options = 0 # Ubuntu has OP_NO_SSLv3 forced on by default self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3) + # ======= + self.assertEqual( + default, ctx.options, + 'Failed comparison:\n ssl.OP_ALL: %50s %s\n default: %50s %s\n ctx.options: %50s %s' % (enum.bin(ssl.OP_ALL), ssl.OP_ALL, enum.bin(default), default, enum.bin(ctx.options), ctx.options), + ) + ctx.options = 0 + # Ubuntu has OP_NO_SSLv3 forced on by default + self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3) + else: + with self.assertRaises(ValueError): + ctx.options = 0 + # >>>>>>> changes: def test_verify_mode_protocol(self): with warnings_helper.check_warnings(): @@ -4718,7 +4731,7 @@ class CheckedTLSVersion(enum.IntEnum): TLSv1_2 = _ssl.PROTO_TLSv1_2 TLSv1_3 = _ssl.PROTO_TLSv1_3 MAXIMUM_SUPPORTED = _ssl.PROTO_MAXIMUM_SUPPORTED - enum.test_simple_enum(CheckedTLSVersion, TLSVersion) + enum._test_simple_enum(CheckedTLSVersion, TLSVersion) def test_tlscontenttype(self): class Checked_TLSContentType(enum.IntEnum): @@ -4733,7 +4746,7 @@ class Checked_TLSContentType(enum.IntEnum): # pseudo content types HEADER = 0x100 INNER_CONTENT_TYPE = 0x101 - enum.test_simple_enum(Checked_TLSContentType, _TLSContentType) + enum._test_simple_enum(Checked_TLSContentType, _TLSContentType) def test_tlsalerttype(self): class Checked_TLSAlertType(enum.IntEnum): @@ -4775,7 +4788,7 @@ class Checked_TLSAlertType(enum.IntEnum): UNKNOWN_PSK_IDENTITY = 115 CERTIFICATE_REQUIRED = 116 NO_APPLICATION_PROTOCOL = 120 - enum.test_simple_enum(Checked_TLSAlertType, _TLSAlertType) + enum._test_simple_enum(Checked_TLSAlertType, _TLSAlertType) def test_tlsmessagetype(self): class Checked_TLSMessageType(enum.IntEnum): @@ -4805,8 +4818,56 @@ class Checked_TLSMessageType(enum.IntEnum): NEXT_PROTO = 67 MESSAGE_HASH = 254 CHANGE_CIPHER_SPEC = 0x0101 - enum.test_simple_enum(Checked_TLSMessageType, _TLSMessageType) + enum._test_simple_enum(Checked_TLSMessageType, _TLSMessageType) + def test_sslmethod(self): + Checked_SSLMethod = enum._old_convert_( + enum.IntEnum, '_SSLMethod', 'ssl', + lambda name: name.startswith('PROTOCOL_') and name != 'PROTOCOL_SSLv23', + source=ssl._ssl, + ) + enum._test_simple_enum(Checked_SSLMethod, ssl._SSLMethod) + + def test_options(self): + CheckedOptions = enum._old_convert_( + enum.FlagEnum, 'Options', 'ssl', + lambda name: name.startswith('OP_'), + source=ssl._ssl, + ) + enum._test_simple_enum(CheckedOptions, ssl.Options) + + + def test_alertdescription(self): + CheckedAlertDescription = enum._old_convert_( + enum.IntEnum, 'AlertDescription', 'ssl', + lambda name: name.startswith('ALERT_DESCRIPTION_'), + source=ssl._ssl, + ) + enum._test_simple_enum(CheckedAlertDescription, ssl.AlertDescription) + + def test_sslerrornumber(self): + Checked_SSLMethod = enum._old_convert_( + enum.IntEnum, '_SSLMethod', 'ssl', + lambda name: name.startswith('PROTOCOL_') and name != 'PROTOCOL_SSLv23', + source=ssl._ssl, + ) + enum._test_simple_enum(Checked_SSLMethod, ssl._SSLMethod) + + def test_verifyflags(self): + CheckedVerifyFlags = enum._old_convert_( + enum.FlagEnum, 'VerifyFlags', 'ssl', + lambda name: name.startswith('VERIFY_'), + source=ssl._ssl, + ) + enum._test_simple_enum(CheckedVerifyFlags, ssl.VerifyFlags) + + def test_verifymode(self): + CheckedVerifyMode = enum._old_convert_( + enum.IntEnum, 'VerifyMode', 'ssl', + lambda name: name.startswith('CERT_'), + source=ssl._ssl, + ) + enum._test_simple_enum(CheckedVerifyMode, ssl.VerifyMode) def test_main(verbose=False): if support.verbose: diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py index cfd6301059515d..3f56192c70e846 100755 --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -37,7 +37,7 @@ class CheckedSafeUUID(enum.Enum): safe = 0 unsafe = -1 unknown = None - enum.test_simple_enum(CheckedSafeUUID, py_uuid.SafeUUID) + enum._test_simple_enum(CheckedSafeUUID, py_uuid.SafeUUID) def test_UUID(self): equal = self.assertEqual diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 342429072f03aa..369004c9d1b3d4 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -144,7 +144,7 @@ def _splitdict(tk, v, cut_minus=True, conv=None): return dict -@enum.simple_enum(enum.StrEnum) +@enum._simple_enum(enum.StrEnum) class EventType: KeyPress = '2' Key = KeyPress diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index aa5becd0147b5e..d4b7cbd867bc04 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -303,7 +303,7 @@ class CheckedEventType(enum.StrEnum): Activate = '36' Deactivate = '37' MouseWheel = '38' - enum.test_simple_enum(CheckedEventType, tkinter.EventType) + enum._test_simple_enum(CheckedEventType, tkinter.EventType) def test_getboolean(self): for v in 'true', 'yes', 'on', '1', 't', 'y', 1, True: diff --git a/Lib/uuid.py b/Lib/uuid.py index 44cc541d0cb9ad..67da88560cfb12 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -47,7 +47,7 @@ import os import sys -from enum import Enum, simple_enum +from enum import Enum, _simple_enum __author__ = 'Ka-Ping Yee ' @@ -75,7 +75,7 @@ bytes_ = bytes # The built-in bytes type -@simple_enum(Enum) +@_simple_enum(Enum) class SafeUUID: safe = 0 unsafe = -1 From af77e464150773c17185272baa51e82c87cf8619 Mon Sep 17 00:00:00 2001 From: Ethan Furman Date: Mon, 19 Apr 2021 16:04:54 -0700 Subject: [PATCH 108/108] update after rebase --- Lib/test/test_ssl.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 3db53837ac641c..a9f34288571ecb 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1118,23 +1118,10 @@ def test_options(self): self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options) with warnings_helper.check_warnings(): ctx.options = (ctx.options & ~ssl.OP_NO_TLSv1) - # <<<<<<< HEAD FIXME self.assertEqual(default, ctx.options) ctx.options = 0 # Ubuntu has OP_NO_SSLv3 forced on by default self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3) - # ======= - self.assertEqual( - default, ctx.options, - 'Failed comparison:\n ssl.OP_ALL: %50s %s\n default: %50s %s\n ctx.options: %50s %s' % (enum.bin(ssl.OP_ALL), ssl.OP_ALL, enum.bin(default), default, enum.bin(ctx.options), ctx.options), - ) - ctx.options = 0 - # Ubuntu has OP_NO_SSLv3 forced on by default - self.assertEqual(0, ctx.options & ~ssl.OP_NO_SSLv3) - else: - with self.assertRaises(ValueError): - ctx.options = 0 - # >>>>>>> changes: def test_verify_mode_protocol(self): with warnings_helper.check_warnings():