<commit_before>#!/usr/bin/env python
# -*- encoding: utf-8 -*-

# Copyright 2011-2020, <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


"""
This module contains client implementations for the Bolt messaging
protocol. It contains a base :class:`.Bolt` class, which is a type of
:class:`.Connection`, and which is further extended by a separate class
for each protocol version. :class:`.Bolt1` extends :class:`.Bolt`,
:class:`.Bolt2` extends :class:`.Bolt1`, and so on.

Each subclass therefore introduces deltas atop the previous protocol
version. This reduces duplication of client code at the expense of more
work should an old protocol version be removed.

As of Bolt 4.0, the protocol versioning scheme aligned directly with
that of Neo4j itself. Prior to this, the protocol was versioned with a
single integer that did not necessarily increment in line with each
Neo4j product release.
"""


__all__ = [
    "BoltMessageReader",
    "BoltMessageWriter",
    "Bolt",
    "Bolt1",
    "Bolt2",
    "Bolt3",
    "Bolt4x0",
    "BoltTransaction",
    "BoltResult",
    "BoltResponse",
    "BoltProtocolError",
]


from collections import deque
from io import BytesIO
from itertools import islice
from logging import getLogger
from struct import pack as struct_pack, unpack as struct_unpack

from packaging.version import Version
from six import raise_from

from py2neo.client import Connection, Transaction, Result, Failure, Bookmark, \
    TransactionError, BrokenTransactionError
from py2neo.client.config import bolt_user_agent
from py2neo.client.packstream import pack, UnpackStream, PackStreamHydrant
from py2neo.wiring import Wire, BrokenWireError


log = getLogger(__name__)<commit_msg>Export Bolt4x1<commit_after>#!/usr/bin/env python
# -*- encoding: utf-8 -*-

# Copyright 2011-2020, <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


"""
This module contains client implementations for the Bolt messaging
protocol. It contains a base :class:`.Bolt` class, which is a type of
:class:`.Connection`, and which is further extended by a separate class
for each protocol version. :class:`.Bolt1` extends :class:`.Bolt`,
:class:`.Bolt2` extends :class:`.Bolt1`, and so on.

Each subclass therefore introduces deltas atop the previous protocol
version. This reduces duplication of client code at the expense of more
work should an old protocol version be removed.

As of Bolt 4.0, the protocol versioning scheme aligned directly with
that of Neo4j itself. Prior to this, the protocol was versioned with a
single integer that did not necessarily increment in line with each
Neo4j product release.
"""


__all__ = [
    "BoltMessageReader",
    "BoltMessageWriter",
    "Bolt",
    "Bolt1",
    "Bolt2",
    "Bolt3",
    "Bolt4x0",
    "Bolt4x1",
    "BoltTransaction",
    "BoltResult",
    "BoltResponse",
    "BoltProtocolError",
]


from collections import deque
from io import BytesIO
from itertools import islice
from logging import getLogger
from struct import pack as struct_pack, unpack as struct_unpack

from packaging.version import Version
from six import raise_from

from py2neo.client import Connection, Transaction, Result, Failure, Bookmark, \
    TransactionError, BrokenTransactionError
from py2neo.client.config import bolt_user_agent
from py2neo.client.packstream import pack, UnpackStream, PackStreamHydrant
from py2neo.wiring import Wire, BrokenWireError


log = getLogger(__name__)
{'fraction_non_alphanumeric': 0.07544177616674218, 'fraction_numerical': 0.014046216583597644, 'mean_word_length': 4.49813200498132, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5071748', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1212, 'n_words': 537}