xjZ :ddlmZddlmZddlmZmZddlmZddl m Z ee Z dZ dZdZd Ze ee d e ee ZeeZee ee d e ee Zed Zed e ee Zd ZdZe ddedeeeffdZddededeeeffdZy))Mapping) getLogger)compilesplit)unquote) deprecatedz[ \t]*zC[\x21\x23-\x27\x2a\x2b\x2d\x2e\x30-\x39\x41-\x5a\x5e-\x7a\x7c\x7e]+z+[\x21\x23-\x2b\x2d-\x3a\x3c-\x5b\x5d-\x7e]*z/[\x20\x21\x23-\x2b\x2d-\x3a\x3c-\x5b\x5d-\x7e]*=z [ \t]*,[ \t]*|zHeader format invalid! Header values in environment variables must be URL encoded per the OpenTelemetry Protocol Exporter specification: %szHeader format invalid! Header values in environment variables must be URL encoded per the OpenTelemetry Protocol Exporter specification or a comma separated list of name=value occurrences: %szBYou should use parse_env_headers. Deprecated since version 1.15.0.sreturnct|S)N)parse_env_headers)r s i/mnt/ssd/data/Dropbox/adrian/sandbox/mcp-query/venv/lib/python3.12/site-packages/opentelemetry/util/re.py parse_headersr3s Q liberalci}tt|}|D]E}|stj|j }|s|st j t|I|rg|j}|jdd\}}t|j j}t|j }|||<tj|j } | st j t|| j} | jdd\}}|j j}|j }|||<H|S)a Parse ``s``, which is a ``str`` instance containing HTTP headers encoded for use in ENV variables per the W3C Baggage HTTP header format at https://www.w3.org/TR/baggage/#baggage-http-header-format, except that additional semi-colon delimited metadata is not supported. If ``liberal`` is True we try to parse ``s`` anyway to be more compatible with other languages SDKs that accept non URL-encoded headers by default. r ) r_DELIMITER_PATTERN_HEADER_PATTERN fullmatchstrip_loggerwarning-_INVALID_HEADER_ERROR_MESSAGE_STRICT_TEMPLATEstringrlower_LIBERAL_HEADER_PATTERN._INVALID_HEADER_ERROR_MESSAGE_LIBERAL_TEMPLATE) r rheaders headers_listheader header_match match_stringnamevalueliberal_header_matchliberal_match_strings rrr:s@!G#$6:L"" &00@ G OO=v    , 3 3L&,,S!4KD%4=&&(..0DEN((*E!GDM$;#D#D $ (BF(<(C(C .44S!r8s)$ ( H  K ? Jvk]4&$ tfM+,! vk]4&$(='>tfE-.014& dVLL. ;/ H S WS#X.  //t/S8I/r